Mandate shape
Spending policy
| Kind | Description |
|---|---|
TotalCap | Absolute total over the mandate’s lifetime. |
DailyCap | Per-24-hour ceiling, resets at midnight UTC. |
EpochCap | Per-epoch ceiling, resets every 1,000 blocks. |
PerCallCap | Maximum amount per single transaction. |
Temporal policy
| Kind | Description |
|---|---|
ValidFrom | Earliest height the mandate is usable. |
ValidUntil | Latest height the mandate is usable. |
ValidFor | Duration from issuance. |
Allowed kinds
A list of transaction kinds the holder may sign while attaching the mandate. Common patterns:- DEX-only mandate:
[DexSwapExactIn, DexSwapExactOut]. - NFT-trade mandate:
[TransferNft, BurnNft]. - Treasury-disburse mandate:
[DisburseFromTreasury]. - Read-only mandate: empty list; useful only for capabilities like signed subscriptions.
Conditions
Conditions are deterministic expressions evaluated by the executor:Lifecycle
| Transaction | Purpose |
|---|---|
IssueMandate | Issue a new mandate. |
DelegateMandate | Issue a sub-mandate under an existing mandate. |
RevokeMandate | Revoke a mandate (and its subtree atomically). |
ConsumeMandate | Attach a mandate to a transaction the holder is signing. |
Lineage
Sub-mandates inherit the parent’s policy intersected with their own. The holder of a parent mandate cannot grant a sub-mandate that exceeds the parent’s caps; the executor reduces the sub-policy to the intersection at issuance.lineage_depth_max bounds how deep sub-mandates can nest. A value of 0 means the holder cannot re-delegate at all.
Revocation
Revocation is atomic: a singleRevokeMandate transaction marks the mandate and every descendant as revoked. Subsequent transactions attempting to use any of them reject with Unauthorised.
The issuer may revoke at any time. Holders cannot prevent revocation; the design is permissioned toward the issuer.
Use cases
| Use case | Pattern |
|---|---|
| Agent trading on behalf of a human | DEX-only mandate with daily cap. |
| Treasury operations under an org’s MHR | Disburse-only mandate with per-call cap and condition counterparty in allowlist. |
| Service account with quarterly budget | DailyCap + ValidFor + RevokeOnAbuse. |
| Sub-agent delegation | Sub-mandate with lineage_depth_max = 0 and tighter caps. |
RPC
| Method | Returns |
|---|---|
sigil_getMandate | A single mandate record by id. |
sigil_listMandatesByIssuer | All mandates issued by a DID. |
sigil_listMandatesByHolder | All mandates held by a DID. |
sigil_getMandateUsage | Cumulative spend and remaining caps. |
Implementation
- Types:
node/sigil-core/src/mandate.rs. - Executor:
node/sigil-node/src/executor_mandate.rs. - Durable state:
node/sigil-node/src/mandate_durable.rs.
See also
- Issue a mandate — recipe.
- Identity & lineage — how lineage proofs verify the chain.