https://api.allternit.com, and the Agency API endpoints on this page are not served yet. Receipt-backed completion is part of the alpha gate (restart, resume, verify, replay, receipt-backed completion).
Endpoints
The Receipt object
Receipt IDs start withrcpt_.
content_hashis SHA-256 over the canonical JSON (RFC 8785, JCS) of every field exceptcontent_hashandsignature.prev_hashis the previous receipt’scontent_hashin the same run. It isnullonly at index 0.- A correction appends a new receipt with
supersedesset. Receipts are never edited. payloadis an open object whose shape depends ontype. Component identities appear in it only withview=debug.
Receipt types
ReceiptTypeSignature
signature (ReceiptSignature):
The signed material is the JCS-canonical form of {schema_id, schema_version, domain, content_hash}. Including the schema ID, schema version and the domain tag allternit.receipt.v1 means a signature cannot be reused for another schema, version or protocol.
Provenance
provenance items (Provenance):
List receipts
Parameters
type takes a comma-separated list, for example ?type=verification,policy. A filtered list is not a complete chain; fetch without type to verify.
Responses
ReceiptPage:Example
payload bodies are left empty.
Verify a receipt chain
content_hash, prev_hash, signature and the published keys.
Parameters
Responses
ReceiptChainVerification:Example
signatures_valid is null if any receipt is unsigned. When a check fails, first_invalid_index is the index of the first receipt that does not verify.
Get a receipt
Parameters
Responses
Example
Get verification keys
ReceiptSignature.key_id. This endpoint needs no authentication.
Responses
Jwks:Example
Verify independently
The steps:- Fetch every receipt for the run, unfiltered, in chain order.
- For each receipt, drop
content_hashandsignature, canonicalize the rest with RFC 8785, hash with SHA-256 and compare withcontent_hash. - Check
indexis sequential andprev_hashequals the previouscontent_hash(nullat index 0). - For each signature, canonicalize
{schema_id, schema_version, domain, content_hash}and verify the Ed25519 signature (value, base64url) with the JWKS key whosekidmatcheskey_id. Checkdomainisallternit.receipt.v1.
rfc8785 and cryptography in Python, and canonicalize plus the built-in node:crypto in Node.js. Fetch receipts with the default view, since the hash covers the receipt as served in that view.
This code follows the v0.3 contract text. The chain and signatures are implemented in the internal work runtime, but the Agency API endpoints and public keys route are not served yet, so this code has not been run against the public API. Expect details to be confirmed at alpha.