import type { CreateReadFidelityReceiptInput, ReadFidelityReceipt, ReadFidelityVerifyResult, VerifyAgainstSourceResult, VerifyResponsesResult } from './types.js'; /** * Canonical signing preimage: RFC 8785 JCS of the record with the * `sig` key removed entirely. Accepts a signed record (sig dropped) * or an unsigned draft (no sig key present). */ export declare function canonicalNoSig(record: object): string; /** * Build and sign a read fidelity receipt. Validates the input * (n MUST equal challenge.span_commitments.length, challenge.seed MUST * equal the seed derivation, every digest MUST be * "sha256:<64 lowercase hex>", timestamps MUST be ISO 8601), sets * `attester` from the private key, and signs the JCS canonical form of * the record with the sig key excluded. Throws on any validation * failure; nothing is signed unless the record is internally * consistent. */ export declare function createReadFidelityReceipt(fields: CreateReadFidelityReceiptInput, privateKeyHex: string): ReadFidelityReceipt; /** * Verify a read fidelity receipt: shape checks, n consistency against * challenge.span_commitments, Ed25519 signature against the embedded * attester, and the seed derivation recompute. Accepts unknown and * never throws on malformed input; failures carry a reason code. */ export declare function verifyReadFidelityReceipt(record: unknown): ReadFidelityVerifyResult; /** * Verify a receipt against the source text it claims to sample: * everything verifyReadFidelityReceipt checks, plus a recompute of the * spans from challenge.seed / n / span_len over `sourceText`, a sha256 * commitment of each recomputed span, and a positionwise comparison * against challenge.span_commitments. ALL commitments must match. * `signature_valid` and `seed_valid` are reported independently. */ export declare function verifyAgainstSource(record: unknown, sourceText: string): VerifyAgainstSourceResult; /** * Recompute k for a set of readback responses against the source text: * resample the spans the record commits to, score `responses` under * exact_match_v1, and compare the recomputed k with the recorded k and * the responses JCS digest with the recorded response_digest. Throws * when the source cannot produce the spans (wrong length) or when * `responses` has the wrong length; use verifyAgainstSource first to * establish that the record matches the source at all. */ export declare function verifyResponses(record: ReadFidelityReceipt, sourceText: string, responses: readonly string[]): VerifyResponsesResult; //# sourceMappingURL=receipt.d.ts.map