Delegation Receipt v1
A delegation receipt is a compact JWS in which one DID (the delegator) grants capabilities to another DID (the delegatee). Receipts form a chain, root first, for example person → organization → agent → sub-agent.
Header
Section titled “Header”{ "alg": "EdDSA", "typ": "didis-delegation+jwt", "kid": "did:web:bank.example#key-1" }typmust bedidis-delegation+jwt.algisEdDSA,ES256orES256K.kidis a DID URL for a key in the issuer’scapabilityDelegationrelationship.
Payload
Section titled “Payload”{ "iss": "did:web:bank.example", "aud": "did:web:agent.example", "cap": ["payments.refund", "payments:read"], "nbf": 1791676800, "exp": 1791763200, "iat": 1791676800, "jti": "a unique id", "prf": "hex SHA-256 of the parent receipt"}| Claim | Required | Meaning |
|---|---|---|
iss |
yes | The delegator DID. |
aud |
yes | The delegatee DID. |
cap |
yes | Capabilities granted, at most 64. |
nbf, exp |
yes | Validity window (Unix seconds). |
iat |
no | Issue time. |
jti |
yes | Unique receipt ID. |
prf |
for all but the root | Lowercase hex SHA-256 of the parent receipt’s compact serialization. |
Capabilities
Section titled “Capabilities”- An exact tool name:
payments.refundgrants onlypayments.refund. - A namespaced tool:
payments:readgrants onlypayments:read, not a bareread. - A namespace wildcard:
payments:*grants every tool namedpayments:…, and nothing outside that namespace. - Everything:
*.
Matching is case-insensitive. Malformed capabilities (empty segments, * inside a name, whitespace) grant nothing. A child may narrow payments:* to payments:read or payments:card:*, but not widen it to * or move it to another namespace.
Chain rules
Section titled “Chain rules”A chain is valid only if every rule holds:
- Structure: each receipt is a well-formed JWS with the header and claims above.
- Signature: each receipt is signed by a
capabilityDelegationkey of itsiss. - Linkage: each receipt’s
audis the next receipt’siss, the next receipt’sprfis the hash of this one, and each child’s validity window lies inside its parent’s. - Time: every receipt is valid now (60 seconds clock skew allowed for
nbf). - Attenuation: a child grants nothing its parent did not grant.
- No cycles: no DID appears twice; no receipt delegates to its own issuer.
- Depth: 1 to 8 receipts.
- Root: if trusted roots are given, the first
issis one of them.
The leaf’s cap is the chain’s effective capabilities. A tool is authorised when one of them matches it.
What a valid chain shows
Section titled “What a valid chain shows”A valid chain proves who delegated which capabilities to whom, and when. It does not prove that the agent acts within those capabilities.
Verify chains with /v1/agents/verify-delegation and /v1/agents/authorize, or in the web app under Delegation receipts.