Wallet and signer policy layers are in early access. Talk to us if you’d like to participate.
/sdk/<environment_id>/... and authenticate with the signed-in end user’s JWT (<user_jwt>), not an environment API token. The caller must be a business-account owner or admin. For which kind of rules a layer holds and how declarative rules are enabled, see Managing layers.
The account layer applies to every wallet in a business account. It is created when you first write to it.
Read the account-Layer
Add or update a rule
For a declarative rule, the rule goes indeclarativeRule instead of rule, and ruleId is optional: leave it out to create a rule, and the response returns the generated id.
- Legacy rules (cURL)
- Legacy rules (JavaScript SDK)
- Declarative rules (cURL)
- Declarative rules (JavaScript SDK)
Remove a rule
removeAccountPolicyRule({ businessAccountId, ruleId }).
Replace the layer’s rules
op: "replace" sets the layer’s full rule list in one write, so any rule you leave out is removed. Keep the ruleId of every rule you are keeping. The examples use declarative rules. Only environment admins and business-account admins can replace a layer.
- cURL
- JavaScript SDK
Next steps
Wallet layer
Rules that apply to a single wallet.
Signer layer
Rules that apply to a single signer share set.
Managing layers
Auth, which kind of rules a layer holds, and signer-modifiable rules.
Rule examples
Ready-made declarative rules.