{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://git.transaction.science/Transaction-Science/open-standards/raw/branch/main/wai/wai-quantum/schemas/receipt.v2.json", "title": "wai.quantum.receipt/2", "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks.", "type": "object", "required": ["alg", "canon", "key", "digest", "signature"], "properties": { "alg": { "const": "ed25519" }, "canon": { "const": "rfc8785", "description": "The canonical form the digest is taken over." }, "key": { "type": "string", "minLength": 64, "maxLength": 64, "pattern": "^[0-9a-f]{64}$", "description": "The signing key, 32 bytes in lower-case hex." }, "digest": { "type": "string", "minLength": 64, "maxLength": 64, "pattern": "^[0-9a-f]{64}$", "description": "The digest signed, 32 bytes in lower-case hex." }, "signature": { "type": "string", "minLength": 128, "maxLength": 128, "pattern": "^[0-9a-f]{128}$", "description": "The signature, 64 bytes in lower-case hex." }, "time": { "description": "When the receipt was issued and, where it states one, until when it is offered, by the signer's clock, in milliseconds since 1970-01-01T00:00:00Z. Absent on a receipt that seals no time (one from a host with no clock, or sealed before receipts stated one). With it, the digest is taken under the domain ending \\x03 and ends with len ‖ the canonical text of this member, so the time cannot be changed or taken off (section 8.2).", "type": "object", "required": ["issued_ms"], "additionalProperties": false, "properties": { "issued_ms": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "not_after_ms": { "type": "integer", "minimum": 1, "maximum": 9007199254740991, "description": "The first moment the receipt is no longer offered: after issued_ms." } } } }, "$defs": { "first": { "description": "The first form, before canon: the digest is over the compact text its writer wrote of each, members in the document's order (section 8.2 of wai/extensions/quantum-providers.md), under the domain ending \\x01. Never written now; still verified.", "type": "object", "required": ["alg", "key", "digest", "signature"], "properties": { "alg": { "const": "ed25519" }, "key": { "type": "string", "minLength": 64, "maxLength": 64, "pattern": "^[0-9a-f]{64}$" }, "digest": { "type": "string", "minLength": 64, "maxLength": 64, "pattern": "^[0-9a-f]{64}$" }, "signature": { "type": "string", "minLength": 128, "maxLength": 128, "pattern": "^[0-9a-f]{128}$" } } } } }