Business Accounts are in early access. See the overview for the model. For the governance model itself, the approval lifecycle, and the requirement fields, see Governance.
Initiate a governed action
The following example uses a known user ID. The SDK can construct and sign this intent locally.- JavaScript
BusinessAccountActionRequired. The satisfied value on each entry in approvalRequirements is authoritative. Do not infer readiness from approved >= required.
Approve, veto, or execute a proposal
- JavaScript
vetoBusinessAccountProposal to reject a proposal permanently. Use withdrawBusinessAccountProposalApproval to revoke an approval. Use executeBusinessAccountProposal to apply a satisfied proposal when the account does not execute it automatically.
When the account executes matching proposals automatically, the approval that satisfies the final requirement also applies the account change. The returned proposal has
status: 'executed'.Set governance requirements
setBusinessAccountGovernance replaces the account’s entire governance section. It does not merge with the current value. Omitting an action removes that action’s approval requirements. Read the current value first when you want to change only one action.
- JavaScript
Requirement fields
Scope a requirement with when
Omit when to apply a requirement to every change for that action. Set it to restrict the requirement to matching changes.
initiatorRolesandinitiatorUserIdsapply to every governed action.targetUserIdsapplies toaddMember,removeMember,updateMemberRole,transferOwnership,addSignerToWallet, andremoveSignerFromWallet.walletIdsapplies toaddWallet,linkWallet,removeWallet,addSignerToWallet, andremoveSignerFromWallet.rolematches the role granted byaddMember. ForremoveMember,updateMemberRole,transferOwnership,addSignerToWallet, andremoveSignerFromWallet, it matches the target member’s current role.newRoleapplies only toupdateMemberRole.
when object use AND logic. A requirement does not match when its action does not contain the field it needs.
eligibleApproverRoles and mandatoryApproverRoles can contain a built-in role (owner, admin, viewer) or a custom role created with defineBusinessAccountRole. For the full list of governed actions, see Governance.
Handle BusinessAccountIntentRequiredError
Business Account mutation helpers construct and sign intents automatically when the request contains enough information. If a mutation throws
BusinessAccountIntentRequiredError, sign error.intent and retry the same mutation with signedIntent.BusinessAccountIntentRequiredError when the SDK cannot construct the exact intent locally or the server rejects a locally constructed intent. This occurs when you add a member by email or another identifier because the server must resolve or create the target user first.
Sign the returned intent without changing it. Retry the same mutation with the resulting signedIntent.
- JavaScript
executeBusinessAccountProposal. Do not rebuild or modify the signed intent.