/** * Receipt → HTML. Presentation only: no files, no network, no schema change. * Demo /proof and the console tab both call this. A second copy will drift. */ import type { Receipt, ReceiptChainCheck, PolicyDecision } from './receipt.js'; export declare function wantsReceiptHtml(accept: string | undefined, format?: string | null): boolean; export declare function serializeReceiptJson(value: unknown): string; export interface ReceiptViewOperation { request: string; policy: PolicyDecision; rowsReturned?: number | null; maskedCount?: number | null; sample?: string; reason?: string; } export type AnchorDisplay = 'pending' | 'unverified' | 'verified'; export interface ReceiptViewAnchor { log?: string; state: 'pending' | 'bitcoin'; ref?: string; /** What the page may print. Absent + claimed bitcoin → unverified. */ display?: AnchorDisplay; } /** Presentation document. Not a receipt field and not a LiveProof schema. */ export interface ReceiptView { title: string; generatedAt: string; limitations: string[]; claim?: string; operations: ReceiptViewOperation[]; chain: { seq: number | string; entries?: number | string; head: string; }; chainIntegrity?: ReceiptChainCheck; signature: { alg: string; keyId: string; meaning: boolean; } | null; signatureAbsentNote?: string; publicKey: string | null; verify: string; anchor: ReceiptViewAnchor | null; jsonHref?: string; /** Presentation only. Same language as model.source — never "verified". */ destination?: { value: string | null; sourceNote: string; }; } /** Structural input for the demo /proof payload. Lives here so nexus does not keep a renderer. */ export interface ProofLike { generatedAt: string; engine: { name: string; version: string; }; operations: ReceiptViewOperation[]; chain: { seq: number; head: string; entries: number; }; signature: { alg: string; keyId: string; value?: string; } | null; publicKey: string | null; signatureMeaning: boolean; anchor: ReceiptViewAnchor | null; /** Set only after sidecar OTS verification. */ anchorVerified?: boolean; verify: string; claim: string; limitations: string[]; } export declare const RECEIPT_VIEW_CLAIM = "This record shows it was not altered, deleted, reordered or backdated after the fact. It does not prove it was correct at the moment it was created."; export declare function presentKnownText(text: string): string; export declare function resolveAnchorDisplay(anchor: { state: string; } | null | undefined, opts?: { verified?: boolean; display?: AnchorDisplay; }): AnchorDisplay | null; export declare function proofToView(proof: ProofLike): ReceiptView; export interface ReceiptToViewExtras { publicKey?: string | null; verify?: string; entries?: number; chainIntegrity?: ReceiptChainCheck; jsonHref?: string; limitations?: string[]; claim?: string; /** Sidecar OTS result. Absent = treat claimed bitcoin as unverified. */ anchorDisplay?: AnchorDisplay; } export declare function receiptToView(receipt: Receipt, extras?: ReceiptToViewExtras): ReceiptView; export declare function renderReceiptHtml(view: ReceiptView, opts?: { mode?: 'document' | 'fragment'; }): string; /** @deprecated name kept for the demo route; same function. */ export declare const renderProofHtml: (proof: ProofLike) => string; export declare const wantsProofHtml: typeof wantsReceiptHtml; export declare const serializeProofJson: typeof serializeReceiptJson; //# sourceMappingURL=receipt-view.d.ts.map