/** * Canonicalization and hash-payload assembly per SPEC/uvrn-receipt-v1.md §1–2. * This module is environment-pure (no crypto, no Node APIs) so the Cloudflare worker and the * browser can import it directly — one canonicalization implementation in the whole ecosystem. */ import type { NetworkReceipt } from '../types'; export { CANONICAL_SERIALIZATION_V2, CanonicalSerializationError, canonicalSerializeV2, } from '@uvrn/core/canonical-serialize-2'; export type { CanonicalSerializationErrorCode } from '@uvrn/core/canonical-serialize-2'; /** * Stable receipt API delegated to core's environment-pure canonical-serialize-2 implementation. */ export declare function canonicalize(value: unknown): string; /** * The declared hash field list for `uvrn-receipt-4` (SPEC §2.4). * The hash covers exactly these fields; everything else on the envelope is ignored by verifiers. */ export declare const NETWORK_RECEIPT_HASH_FIELDS: readonly ["schemaVersion", "kind", "claim", "source", "action", "occurredAt", "payload", "topic", "tags", "narrative", "links", "chainId", "sdk"]; /** * assembleHashInput picks the declared `uvrn-receipt-4` hash fields off an envelope, * including optional fields only when present. Unknown envelope fields are ignored by design * (the additive unknown-field rule). */ export declare function assembleHashInput(receipt: Partial | Record): Record; /** * The declared hash field list for the frozen legacy registry shape `drvc3-receipt-1` * (SPEC §2.3). `sdk` is required there; the optional tail is included only when present. */ export declare const LEGACY_RECEIPT_HASH_FIELDS: readonly ["schemaVersion", "source", "action", "payload", "occurredAt", "sdk", "tags", "receiptType", "narrative", "links", "chainId"]; /** * assembleLegacyHashInput reproduces the worker's frozen `drvc3-receipt-1` hash input so the * registry can retire its hand-rolled duplicate. Behavior is byte-identical to the live worker. */ export declare function assembleLegacyHashInput(record: Record): Record; /** Matches a prefixed receipt hash, e.g. `sha256:ab12...` (64 lowercase hex chars). */ export declare const RECEIPT_HASH_PATTERN: RegExp; /** formatReceiptHash wraps a raw lowercase hex digest in the prefixed encoding. */ export declare function formatReceiptHash(hex: string): string; //# sourceMappingURL=index.d.ts.map