/** * JCS RFC 8785 canonicalisation with the AlgoVoi-discipline rules. * * The canonicalisation discipline is the shared normative substrate for * x402, AP2, A2A, and MPP receipts, authored by AlgoVoi and proposed in PR #2453 in * x402-foundation/x402 (sole AlgoVoi authorship; replaces closed PR #2436). This module * wraps the `canonicalize` npm package (v3.0.0) with the discipline's * pre-canonicalisation rules. * * Reference matrix: https://gist.github.com/chopmob-cloud/b327814c4e17ed9fc7b4f29c8bda523c */ /** * Pin the discipline version. Receipts emitted under this substrate carry * this string in their canon_version field so a year-five verifier can pick * the correct re-canonicalisation rule from the retained bytes alone. */ export declare const CANON_VERSION: "jcs-rfc8785-v1"; export declare class CanonicalizationError extends Error { constructor(message: string); } /** * Return the canonical JCS string representation of obj. * * Applies AlgoVoi-discipline pre-canonicalisation type validation, then * delegates to canonicalize (RFC 8785) for the canonical bytes. * * Throws CanonicalizationError on type-validation failure. */ export declare function canonicalize(obj: unknown): string; /** * Return the canonical JCS UTF-8 bytes of obj as a Uint8Array. */ export declare function canonicalizeBytes(obj: unknown): Uint8Array; /** * Return the lowercase hex SHA-256 of the JCS canonical bytes of obj. * * This is the substrate primitive used by action_ref, compliance receipts, * audit chain entries, and the composite trust-query algorithm. The string * is plain hex without an algorithm prefix. */ export declare function sha256Jcs(obj: unknown): string; //# sourceMappingURL=canonicalize.d.ts.map