Business Accounts are in early access. See the overview for the model.
Prerequisites
- A Dynamic client initialized with your environment ID (see Creating a Dynamic Client and Initializing the Dynamic Client)
- An authenticated user, because every business account call acts on behalf of the signed-in user
- Business Accounts access for your Dynamic account. Business Accounts are in early access, so talk to Dynamic to get access before you build.
- Email sign-in turned on. In the Dynamic developer console, turn on Email under Sign-in Methods.
- EVM turned on as a chain. In the Dynamic developer console, turn on EVM under Chains & Networks. Without it, wallet creation and signing fail silently.
@dynamic-labs-sdk/react-hooksinstalled and the app wrapped inDynamicProvider, as in the React quickstart
1
Create the business account
useCreateBusinessAccount returns a mutation hook; mutateAsync resolves to the new account, whose id you need for every later call. The signed-in user becomes the owner.account.id is set, and the caller is the account’s owner.2
Create a wallet for the account
createWalletForBusinessAccount mints an embedded wallet owned by the account and seats the caller as its first signer. Use the useCreateWalletForBusinessAccount hook.3
Add a second signer
Adding a signer exercises three SDK behaviors in one call:A user who signed in with an email code has no passkey, so See Step-up authentication for the full email code flow and the other methods.Expected outcome: the teammate’s email resolves to a user, the reshare mints their key share, and the call resolves to
- Step-up authentication. Adding a signer requires an elevated token scoped to
business_account:signer:add(see Step-Up Authentication for the model). Check first withcheckStepUpAuth, then verify with a passkey or an email code, passingrequestedScopes. The code below uses a passkey; if the user signed in with an email code, use the email code version after it. - Intent signing. When the SDK cannot construct the intent locally, for example when the target is identified by email,
addBusinessAccountSignerthrowsBusinessAccountIntentRequiredError. Signerror.intentwithsignBusinessAccountIntentand retry with the returnedintentandintentSignature. - Governance. When the account requires approvals for signer changes, the call returns a pending action instead of a share set. Narrow it with
isBusinessAccountActionRequiredand surface the proposal for approval.
authenticatePasskeyMFA throws NoPasskeyCredentialsFoundError. Replace that call with an email code check that passes the same requestedScopes:{ shareSetId } (or a pending proposal when governance applies). Becoming a signer also makes the teammate a viewer member of the account. See Manage signers for password and targetSignerPassword, which are required when your environment mandates wallet passwords.4
Give the teammate an admin role
A signer can sign, but only a member can approve proposals or administer the account. Step 3 already made the teammate a For a user without a passkey, use the email code version from the previous step, with
viewer member, and adding a member again returns the existing member and ignores role. Change the role with updateBusinessAccountMemberRole instead, scoped to business_account:member:role:update. It needs the member’s userId, which getBusinessAccount returns.scope set to TokenScope.BusinessAccountmemberroleupdate.Expected outcome: the teammate is now an admin member of the account and still a signer on its wallet.5
Require an approval before signing
createPolicy attaches rules to the account. An approvalRequirements rule turns signing into a propose, approve, and resume flow. This rule requires one approval from an admin or owner member for every signing operation on the account’s EVM wallets.admin or owner before the wallet signs. Set eligibleApproverRoles explicitly; omitting it lets any verified approver role satisfy the requirement, and the initiator never counts toward requiredApprovals. The rule needs more eligible members than requiredApprovals, so ['admin'] alone would be refused with governance_unsatisfiable on an account with one admin; see Requirements and roles.createPolicy writes legacy rules. To require approval only under a specific condition, such as a large transfer of one token, write a declarative approval rule instead; see Declarative rules for business accounts.6
Sign a message through the quorum
With the quorum rule active, The teammate then approves from their own session, reading the proposals awaiting their approval. Approving needs an elevated token scoped to Back in the initiator’s session, Expected outcome:
signMessage rejects with SigningConsentRequiredError instead of returning a signature: the SDK signs the operation’s intent automatically and opens a proposal carrying that intent.business_account:proposal:approve, so the teammate steps up first. The code below uses an email code. A teammate with a passkey calls authenticatePasskeyMFA with the same requestedScopes, as in step 3.resumeSigningProposal consumes the satisfied proposal and returns the signature.signature is a hex signature from the business-account wallet, produced only after the admin approved the proposal. For the full quorum flow, including intent inspection and transaction signing, see Quorum policies.What just happened
You created a business account with yourself as owner, gave it an EVM wallet on which you are the first signer, elevated your session for thebusiness_account:signer:add and business_account:member:role:update scopes, added a teammate as a second signer (signing the server-returned intent when the target was identified by email), made them an admin member, attached a quorum rule requiring an admin approval to sign, had the teammate step up for business_account:proposal:approve to approve, and produced a signature through the propose, approve, and resume flow. The account, not any single user, owns the wallet and its signing rights.
Next steps
Members & roles
Change roles, remove members, or invite viewers.
Governance
Require approvals for signer, member, and wallet changes.
Quorum policies
The full propose, approve, and resume signing flow, including transactions.
Policies
Constrain what signers and wallets may do.
Step-up auth
Every scope that requires an elevated token, and every way to get one.