Proposal: This page presents the draft API and profile model. Send feedback on GitHub.
Data model and schema reference
The companion schema is a draft 2020-12 JSON Schema. All listed object properties are required and additionalProperties is false. The schema supports syntactic validation; the semantic constraints below must also be implemented. A signed wrapper can contain several payload kinds, so every endpoint additionally verifies that its expected payload kind and signer role match.
| Definition | Required fields beyond v and kind, unless noted | Semantics |
|---|---|---|
policy | id, tenant, purpose, rules, unit, pool, limit, per, maxDepth, survive | One to eight exact action rules; each rule has action, resource, audience, releaseTo, args. The unit and pool define shared accounting. |
terms | id, rootId, parentGrantRef, origin, holder, keyId, gen, service, policyRef, depth, limit, per, epoch, nbf, exp | Embedded object, no v or kind. Root has parentGrantRef: null; child names the signed parent. |
challenge | id, nonce, purpose, contextRef, actorKeyId, recipient, iat, exp | Signed by a configured challenge issuer. Purposes are root-approval, join, request-proof, response-proof, ledger-control. |
approval | challengeRef, subject, termsRef, nbf, exp | Signed by the configured human key over the exact root terms and challenge. |
join | challengeRef, holder, keyId, gen, termsRef, nbf, exp | Candidate signs to prove possession for the exact terms and issued join challenge. |
parent-request | parentGrantRef, childTermsRef, joinRef, nbf, exp | Immediate parent signs this specific child birth request. |
grant | terms, approvalRef, parentRequestRef, joinRef, appraisalRef | Issuer-signed root or child. Root uses an approval reference and null parent request; child does the reverse. Referenced admission evidence must remain retrievable. |
appraisal | holder, keyId, gen, service, appraisalPolicy, measurement, nbf, exp | Trusted appraiser's statement about this instance under configured appraisal policy. |
intent | rootId, tenant, purpose, audience, action, resource, args, inputHash, releaseTo, units | Complete stable business action for this bounded vocabulary. args values are printable ASCII strings. |
attempt | op, record, intentRef, grantRef, policyRef, holder, keyId, gen, method, target, epoch, iat, exp | A particular signed attempt. op persists across an unchanged retry; record is fresh per new attempt. |
proof-result | proofType, direction, contextRef, challengeRef, actorKeyId, policyRef, witnessCommitment, verdict, iat, exp | A designated verifier's signed attestation. Here proofType is designated-verifier-attestation; verdict is accepted. It is not an independently verifiable native witness. |
proof | challenge, result | Embedded object, no v or kind; both members are signed envelopes. A real provider must define the challenge and native response validation. |
request | attemptRef, proofRef | Holder-signed statement. The attempt names the exact target, grant, intent, actor and policy. |
requestPacket | intent, input, attempt, proof, request, grantChain, policies, appraisal | Embedded transport object, no v or kind. input is lowercase hex of exact input bytes. Policies correspond one-for-one with the root-to-leaf grant chain. |
permit | id, op, record, intentRef, requestRef, proofRef, grantRef, policyRef, holder, keyId, audience, units, epoch, fence, iat, exp | State authority's short-lived reservation for one exact request and audience. |
outcome | op, permitRef, requestRef, intentRef, audience, row, resultHash, units, epoch, at | Resource assertion about a unique durable operation row and the exact result bytes. |
closure | op, permitRef, requestRef, intentRef, audience, epoch, at | Resource attests a terminal no-effect result. It must be mutually exclusive with an outcome for the same permit. |
response-context | op, record, requestRef, recipientKeyId, resourceKeyId, policyRef, status, contentType, resultHash, outcomeRef, iat, exp | Binds the response's content, status, recipient, actual resource identity and original signed request. |
response | contextRef, proofRef | Resource-signed statement over the context and response proof. |
responsePacket | context, result, proof, outcome, response | Embedded transport object; result is lowercase hex of exact result bytes. |
ledger-control | action, requestRef, permitRef, presentationRef, caller, nonce, idempotencyKey, iat, exp | Signed control action: check, redeem, settle, close or inspect. If a control proof is required, carry it separately and bind it to the control payload's context digest. |
ledger-decision | controlRef, requestRef, permitRef, caller, nonce, decision, sequence, epoch, fence, iat, exp | State-signed decision bound to the caller's exact control request and fresh nonce. |
ledger-event | ledger, sequence, prev, event, actor, op, objectRef, at | Signed event. prev is null at genesis and otherwise the previous signed event reference. |
checkpoint | ledger, sequence, head, stateHash, epoch, at | Independently retained keeper signature over the log head and a specified complete state projection. |
revocation | rootId, epoch, fence, at | State-signed advancement of a lineage fence. |
recovery | ledger, rootId, checkpointRef, nextEpoch, at | Authorized recovery for the exact trusted checkpoint and next epoch. |
The responsePacket schema models a committed response and requires an outcome. A denial, hold, closure, status response, and general error envelope need separate versioned schemas before they can be exchanged under this profile. This is a deliberate limitation of the worked contract; do not fill an outcome with invented evidence for a failed request.
Relationships beyond schema
terms.nbf < terms.exp; parent interval contains child interval. A proof, challenge, permit and response have nonempty intervals and cannot authorize outside their own or their controlling authority's intervals. Current eligibility uses a clock uncertainty interval, not an unchecked local timestamp.- Each grant's
terms.policyRefequals its correspondingH("policy", policy). Policies preserve tenant, purpose, pool and unit. Every child rule is an exact permitted parent rule; child'slimit,per,maxDepth,depthand lifetime never expand;survivecannot change from false to true. These exact-match rules are a starting vocabulary, not a general policy language. - A grant is issuer-signed, registered, uniquely identified and current. At use, the chain is root first, each
parentGrantRefequals the preceding signed grant reference, root and epoch are consistent, key and holder bindings are valid, depth strictly decreases, and each ancestor is valid and not revoked. - A challenge's
purpose,contextRef,actorKeyId,recipientand interval match the pending ceremony or message. Its unpredictable nonce comes from a cryptographic random generator; its identifier and nonce are consumed atomically at the authoritative verifier. The fixed fixture nonces are deterministic test values. - Every proof result is signed by a configured verifier for its proof type; it matches its signed challenge, context, actor, direction and policy. The verifier must actually perform its defined native checks before signing. A digest of a witness is not by itself a proof.
- The operation key in this guide is
(configured service, tenant, audience, op). Its first eligible reservation binds original root, holder, intent, resource and accounting meaning. A changed intent or actor under the same key is a conflict for an entitled caller. A transmission record is scoped to service, direction, actor key and generation. units > 0,units <= per, and settled plus outstanding reservations, including uncertain amounts, do not exceed the pool or inherited ceilings. State changes need a single transactional ordering point for that pool.