export type CanonicalJsonValue = null | boolean | number | string | CanonicalJsonValue[] | { [key: string]: CanonicalJsonValue; }; /** * Cross-runtime hash profile used by every structured Nebula provenance hash. * * This value is included in the encoded root, so future profiles cannot share * a digest with this one even when their value encodings happen to match. */ export declare const CANONICAL_HASH_PROFILE: "nebula-canonical-hash-v1"; /** * Serialize a JSON value deterministically. * * Object keys are sorted recursively. Values that regular JSON.stringify * silently drops or coerces are rejected: provenance hashes must never depend * on an implicit lossy conversion. */ export declare function canonicalJson(value: unknown): string; export declare function sha256Hex(value: string | Buffer | Uint8Array): string; /** * Convert a JSON-like value to an injective, language-neutral typed tree. * * - Object keys use Unicode scalar/code-point order rather than JavaScript's * UTF-16 code-unit order. * - Safe integral numbers share one integer representation. * - Every other finite Number, including -0 and unsafe integral Numbers, is * represented by its exact big-endian IEEE-754 binary64 bits. * - Strings containing unpaired UTF-16 surrogates are rejected. * * The returned tree itself contains only JSON values, and contains no dynamic * object keys, so regular JSON serialization is deterministic cross-runtime. */ export declare function canonicalizeForHash(value: unknown): CanonicalJsonValue; /** Serialize the typed cross-runtime representation used as SHA-256 input. */ export declare function hashCanonicalJson(value: unknown): string; export declare function sha256Canonical(value: unknown): string;