/**
 * canonical — RFC 8785 JSON canonicalization with deterministic pre-processing.
 *
 * Pre-processing contract (applied depth-first before canonicalize):
 *   - Buffer / Uint8Array   → base64 string (RFC 4648 §4, no padding stripping)
 *   - undefined             → key is omitted (JSON.stringify-compatible semantics)
 *   - Date                  → ISO-8601 string via .toISOString()
 *   - BigInt                → { __bigint: string } (decimal representation)
 *   - NaN / Infinity / -0   → throws NonSerializablePayloadError
 *   - Circular references   → throws NonSerializablePayloadError
 *   - Everything else       → left unchanged (strings, booleans, null, plain numbers)
 *
 * Usage:
 *   import { canonicalize, NonSerializablePayloadError } from './canonical.js';
 *   const json = canonicalize({ b: 2, a: 1 }); // '{"a":1,"b":2}'
 *
 * @module trace/canonical
 */
/**
 * Thrown when the value graph contains a non-serializable primitive
 * (NaN, Infinity, -0) or a circular reference.
 */
export declare class NonSerializablePayloadError extends Error {
    readonly path: string[];
    constructor(reason: string, path: string[]);
}
/**
 * Produce the RFC 8785 canonical JSON string of any value.
 *
 * Pre-processes the value graph (Buffer→base64, Date→ISO-8601,
 * BigInt→{__bigint}, undefined→omit, cycles/NaN/Inf/-0→throw)
 * then applies `json-canonicalize` for deterministic key ordering.
 *
 * @throws {NonSerializablePayloadError} for NaN, Infinity, -0, or cycles.
 */
export declare function canonicalize(value: unknown): string;
//# sourceMappingURL=canonical.d.ts.map