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 the wallet owner, or a business-account owner or admin for a wallet in their account. For which kind of rules a layer holds and how declarative rules are enabled, see Managing layers.
The wallet-Layer applies to a single wallet.
Read the wallet-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. In the JavaScript SDK examples, walletAccount is the WaaS wallet account, for example one returned by getWalletAccounts().
- Legacy rules (cURL)
- Legacy rules (JavaScript SDK)
- Declarative rules (cURL)
- Declarative rules (JavaScript SDK)
Remove a rule
removeWalletPolicyRule({ walletAccount, 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
Signer layer
Rules that apply to a single signer share set.
Account layer
Rules that apply to every wallet in a business account.
Managing layers
Auth, which kind of rules a layer holds, and signer-modifiable rules.
Rule examples
Ready-made declarative rules.