import { type Hash } from "node:crypto"; export declare function sha256Hex(input: string | Uint8Array): string; export declare function hash6(input: string): string; /** * Canonical-JSON serializer. Sorted object keys, arrays preserve insertion * order, `undefined` object fields are dropped, `null` is preserved, and * non-finite numbers (NaN, ±Infinity) render as `null`. Always returns a * single string — convenient for small / medium payloads. * * For payloads large enough to risk V8's max-string-length limit (≈ 512 MB * for one-byte strings, ≈ 256 MB for two-byte strings) prefer * {@link writeCanonicalJson}, which streams chunks through a user-provided * callback and never materializes one monolithic string. */ export declare function canonicalJson(value: unknown): string; /** * Streaming variant of {@link canonicalJson}. Emits canonical-JSON bytes in * order by calling `emit(chunk)` zero-or-more times. The concatenation of * every emitted chunk is byte-identical to `canonicalJson(value)`. * * The streaming form is the only one safe for large aggregates: a 1.3 M-edge * graph's canonical JSON is ~400 MB, which blows V8's single-string cap * (`RangeError: Invalid string length`). By contrast, each individual * chunk here is tiny — a primitive, a key/value separator, or a serialized * leaf — so the caller (typically a `crypto.Hash.update` wrapper) can digest * arbitrarily large inputs without retaining them. */ export declare function writeCanonicalJson(value: unknown, emit: (chunk: string) => void): void; /** * Feed the canonical-JSON form of `value` into a Node crypto Hash instance. * Convenience wrapper over {@link writeCanonicalJson}; provided so callers * don't have to reinvent the `emit → hasher.update` glue. */ export declare function hashCanonicalJson(value: unknown, hasher: Hash): void; //# sourceMappingURL=hash.d.ts.map