A policy governs which transactions a wallet can authorize. Every wallet must have at least one policy attached before it can sign outbound transactions — Dakota’s policy engine default-denies any transaction on a wallet with zero attached policies (Documentation Index
Fetch the complete documentation index at: https://docs.dakota.xyz/llms.txt
Use this file to discover all available pages before exploring further.
"transaction denied: No policies found for wallet", HTTP 403). Inbound deposits are independent of policies: an on-chain address can always receive crypto regardless of the wallet’s governance.
Policies are versioned, mutable resources. You attach them to wallets, and a wallet can have multiple policies layered on top of one another. The policy engine evaluates all attached policies for every transaction and applies the result.
Anatomy of a Policy
A policy is three things:- A signer group that governs the policy itself. Future mutations of the policy — adding rules, deleting it, updating limits — must be signed by members of this group via the endorsed-request flow. It can be the same group attached to the wallet, or a separate admin group for stricter compartmentalization.
- One or more rules. Each rule has a
rule_type, anaction(allowordeny), and adefinitionwhose shape depends on the rule type. - Metadata. A human-readable
nameand optionaldescription.
Rule Types
There are three rule types. Each evaluates a different aspect of the transaction.approval_threshold
Requires a minimum number of valid signatures from the policy’s signer group.
threshold— minimum number of signers required.- The rule always applies to every transaction (it’s a count check, not a conditional).
- If the threshold is met → emit the rule’s
action(allow or deny). If not met → emit the inverted action.
approval_threshold with threshold: 1 and action: allow.
amount_threshold
Sets transaction-value limits. Useful for tiered approval (small transfers single-sig, large transfers multi-sig) or hard caps.
amount— decimal string, evaluated against the transaction’s amount in the policy’scurrency.- The rule applies only when the transaction’s amount exceeds
amount. Below threshold, the rule does not apply (does not contribute allow or deny).
address_list
Restricts which on-chain destinations a wallet can send to. Allow-list (only these) or deny-list (block these).
- The rule applies only when the destination address is in the
addresseslist. - For an allow-list, set
action: allowand pair with a default-deny in another rule (or rely on the policy engine’s default-deny on no-applicable-policy). - For a deny-list, set
action: denyand the listed addresses are blocked outright.
Evaluation Order
For a given transaction, the policy engine:- Loads every policy attached to the wallet. If zero policies, return
denyimmediately ("No policies found for wallet"). - For each policy, evaluates each rule in turn. A rule produces one of: applied + allow, applied + deny, or not-applicable.
- Aggregates per policy: if any rule denies → policy = deny. Else if any rule allows → policy = allow. Else (no rule applied) → policy = not-applicable.
- Aggregates across policies: if any policy denies → transaction = deny. Else if any policy allows → transaction = allow. Else (no applicable policy) → transaction = deny (default).
Lifecycle
| Operation | Endpoint | Endorsed? | Signed by |
|---|---|---|---|
| Create policy | POST /policies | No | API key only |
| Add a rule | POST /policies/{policy_id}/rules | Yes | Policy’s own signer group |
| Update a rule | PATCH /policies/{policy_id}/rules/{rule_id} | Yes | Policy’s own signer group |
| Remove a rule | DELETE /policies/{policy_id}/rules/{rule_id} | Yes | Policy’s own signer group |
| Delete policy | DELETE /policies/{policy_id} | Yes | Policy’s own signer group |
| Attach to wallet | PUT /policies/{policy_id}/wallets/{wallet_id} | Yes | A signer group attached to the wallet |
| Detach from wallet | DELETE /policies/{policy_id}/wallets/{wallet_id} | Yes | A signer group attached to the wallet |
Practical Examples
”Default permissive” — single signature, no restrictions
For sandbox testing or low-risk accounts:“Tiered approval by amount” — single-sig under $10k, dual-sig above
approval_threshold rule lets dual-sig through.
”Sanctions deny-list” — block specific addresses outright
Related
- Common Flows — Create a Policy — happy-path curl walk-through.
- Wallet Transaction Signing — endorsed-request flow for mutating an existing policy or attaching/detaching to a wallet.
- Wallets — architectural overview of signer groups, policies, and intents.