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 signer in their account. For which kind of rules a layer holds and how declarative rules are enabled, see Managing layers.
The signer-Layer applies to a single signer share set on a wallet. This includes the caller’s own share set, delegated access share sets, and additional signers on a business-account wallet. Omit shareSetId to target the caller’s own active share set. To find a share set id for another signer, use getWalletAccountShareSets from the JavaScript SDK; see the business accounts policies guide.
A
shareSetId is the current identifier for a signer. It rotates when wallet shares are refreshed or reshared, so re-read it with getWalletAccountShareSets before each update. The policy is bound to a stable signerId that the enclave mints, so a rotated shareSetId still points to the same policy.Read the signer-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
removeSignerPolicyRule({ walletAccount, ruleId, shareSetId }).
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
Account layer
Rules that apply to every wallet in a business account.
Wallet layer
Rules that apply to a single wallet.
Managing layers
Auth, which kind of rules a layer holds, and signer-modifiable rules.
Rule examples
Ready-made declarative rules.