import type { AttributionAxes, AttributionAxisTag, AttributionEnvelope, ComputeAxisItem, DataAxisItem, GovernanceAxisEntry, ProtocolAxisItem } from './types.js'; /** Format a numeric weight or decimal-string input as the canonical * 6-digit-after-point decimal string required by §2.5. Accepts numbers in * [0, 1] or already-canonical strings. */ export declare function toWeightString(value: number | string): string; /** Reject timestamps that a lenient parser would accept but §2.5 forbids. * Forces ISO-8601 UTC with millisecond precision and literal Z suffix. */ export declare function assertCanonicalTimestamp(ts: string): void; /** Produce the canonical timestamp for "now" or a supplied Date. Spec §2.5 * rejects `+00:00` and drops sub-ms precision; toISOString() already emits * the required shape. */ export declare function canonicalTimestamp(now?: Date): string; /** Sort an axis to §2.5 ordering so distinct orderings of the same logical * content produce byte-identical canonicalizations. * * D: lexicographic by source_did. * P: lexicographic by module_id + '\u0000' + module_version. * C: lexicographic by provider_did. * G: preserved as-is (root-to-leaf by depth). * * Residual buckets always sort to the end of their axis so their fixed * identifier does not collide with DID ordering. At most one residual is * permitted per axis; duplicates throw. */ export declare function sortDataAxis(items: DataAxisItem[]): DataAxisItem[]; export declare function sortProtocolAxis(items: ProtocolAxisItem[]): ProtocolAxisItem[]; export declare function sortComputeAxis(items: ComputeAxisItem[]): ComputeAxisItem[]; /** Governance axis is ordered by increasing depth (root principal first). * Duplicate depths within the same chain are rejected. */ export declare function orderGovernanceAxis(items: GovernanceAxisEntry[]): GovernanceAxisEntry[]; /** Normalize all four axes to their canonical ordering. Callers can hand us * unsorted input; the primitive never emits unsorted canonical bytes. */ export declare function normalizeAxes(axes: AttributionAxes): AttributionAxes; /** SHA-256(canonical(axis_content)) as raw 32 bytes. §2.1. */ export declare function hashAxisLeaf(axis: unknown): Buffer; /** Internal Merkle node: SHA-256(left_bytes || right_bytes). §2.1. */ export declare function hashNode(left: Buffer, right: Buffer): Buffer; /** Hex sha256 of canonicalize(envelope). Used for signing and for deriving * action_ref from the action tuple. */ export declare function canonicalHashHex(obj: unknown): string; /** The canonical envelope §2.3 that Ed25519 signs. Returned as a string so * Python and TypeScript sign/verify exactly the same bytes. */ export declare function envelopeBytes(env: AttributionEnvelope): string; /** Type-safe enumeration of axis tags, for iteration. */ export declare const ATTRIBUTION_AXIS_TAGS: ReadonlyArray; //# sourceMappingURL=canonical.d.ts.map