/** * Pure receipt-chain LINKAGE verifier. * * Checks only that each token's signed body `prev` field matches the predecessor commitment * (literal 'null' for a root, or 'sha256:'+hex(sha256(previous_token)) for a link). Does NOT * verify Ed25519 signatures, expiry, keys, or authorization — those live on the verify-receipt * path. Linkage ≠ authenticity. * * The composition / guard MUST NOT call this over a package-held chain and report the result as * product truth; a consumer re-runs this (and signature verify) on an export they hold. */ /** Literal stored in the receipt body when the issuer was given no previous receipt. */ export declare const RECEIPT_PREV_NULL = "null"; export type ReceiptChainLinkageReason = 'malformed_token' | 'broken_link' | 'unexpected_predecessor'; export type ReceiptChainLinkageResult = { ok: true; /** Number of tokens examined (0 for an empty list — vacuously linked). */ length: number; } | { ok: false; length: number; /** 0-based index of the token that failed the check. */ failedAt: number; reason: ReceiptChainLinkageReason; /** What the verifier expected in body.prev (when known). */ expected?: string; /** What body.prev actually contained (when parsed). */ actual?: string; }; /** * sha256 hex digest of a prior receipt token, in the issuer's prev-slot form: * `sha256:` + hex (matches server chain-attestation issueReceipt). */ export declare function previousReceiptCommitment(previousToken: string): string; /** * Decode the JSON body of a chain receipt token (`base64url(body).base64url(sig)`). * Returns null if the token is not two segments or the body is not JSON with a string `prev`. */ export declare function decodeReceiptBodyPrev(token: string): { prev: string; } | null; /** * Verify predecessor-hash LINKAGE over an ordered list of receipt tokens. * * - Empty list → ok (vacuous). * - tokens[0] must have prev === 'null' (root of this presented sequence). * - tokens[i] must have prev === previousReceiptCommitment(tokens[i-1]). * * Does not contact the network or consult a clock. */ export declare function verifyReceiptChainLinkage(tokens: readonly string[]): ReceiptChainLinkageResult; //# sourceMappingURL=receipt-chain.d.ts.map