/** * RFC 8785 JSON Canonicalization Scheme (JCS) implementation * https://www.rfc-editor.org/rfc/rfc8785 * * This module provides deterministic JSON serialization for cryptographic * signing. Any two compliant implementations will produce identical byte * sequences for the same input, enabling signature verification. * * Key properties: * - Object keys sorted lexicographically by UTF-16 code units * - No whitespace between tokens * - Numbers serialized per ES6 specification * - Strings minimally escaped (only required escapes) */ export declare class CanonicalizeError extends Error { readonly value?: unknown | undefined; constructor(message: string, value?: unknown | undefined); } /** * Canonicalize a JavaScript value to RFC 8785 JSON string. * * @param value - Any JSON-compatible value * @returns Canonical JSON string * @throws CanonicalizeError for non-JSON values (undefined, NaN, Infinity, BigInt, etc.) */ export declare function canonicalize(value: unknown): string; /** * Verify that a JSON string is in canonical form. * * @param json - JSON string to verify * @returns true if the string is in canonical form */ export declare function isCanonical(json: string): boolean; /** * Parse JSON and return canonical form. * * @param json - JSON string (may be non-canonical) * @returns Canonical JSON string */ export declare function parseAndCanonicalize(json: string): string; //# sourceMappingURL=canonicalize.d.ts.map