When to use this
- Authorise an agent to spend up to N MINT/day on a specific token.
- Delegate signing authority to a hot wallet while the cold key stays offline.
- Grant short-lived approval for a one-off counterparty.
Prerequisites
- Controller DID (the granter) is funded.
- Subordinate DID (the grantee) exists.
Recipe
Define the mandate scope
Mandate actions reference transaction types from the chain. Common scopes:The full action set lives in
sigil-core/src/transaction.rs.Issue the mandate
scope.actions and reference the mandate id.Exercise the mandate
The grantee constructs a transaction normally, but adds a Each exercise updates the mandate’s running spend counters; the chain rejects the transaction if any cap would be breached.
mandate_id field referencing the granted authority. The executor verifies the grantee’s signature plus the mandate’s scope before applying state.Inspecting a mandate
Common errors
| Symptom | Cause | Fix |
|---|---|---|
mandate scope exceeded | Action outside scope.actions | Add the action when issuing, or split into a new mandate |
spend cap exceeded | spend_cap_per_day or _total hit | Wait for daily reset, or issue a higher cap |
grantor lineage shorter than grantee | Tried to grant authority a parent lineage does not have | Issue from a DID with the required lineage |
mandate expired | valid_until_height passed | Issue a new mandate |
Mandate composition rules
- A grantee may further delegate only the subset they hold, never more.
- Spend caps from parent mandates are enforced transitively.
- Lineage constraints are intersected — a grandchild mandate cannot exceed the grandparent’s bounds.
See also
- Primitive: mandates
- Cookbook: Set up social recovery — for emergency revocation.
- Concept: security model