Skip to main content

Module canonical

Module canonical 

Source
Expand description

Shared graphforge-canonical/1 envelope and byte primitives.

Domain owners define their registered schemas and logical-value encoders. This module owns the common bounded byte writer, closed fingerprint domains, SHA-256 envelope, and UUIDv8 projection.

Structs§

CanonicalReader
Strict reader for the fixed-width canonical grammar.
CanonicalWriter
Bounded writer for the fixed-width canonical grammar.

Enums§

CanonicalDomain
Closed fingerprint domains in graphforge-canonical/1.
CanonicalError
Structured canonicalization failures.

Constants§

CANONICAL_CONTRACT_VERSION
Frozen canonical contract version.
MAX_CANONICAL_BINARY_BYTES
Maximum binary value size in version 1.
MAX_CANONICAL_PAYLOAD_BYTES
Maximum canonical payload size in version 1.
MAX_CANONICAL_TEXT_BYTES
Maximum UTF-8 value size in version 1.

Functions§

fingerprint
Compute the domain-separated SHA-256 fingerprint.
fingerprint_preimage
Build the frozen fingerprint preimage for a canonical payload.
uuid_v8
Project a full canonical fingerprint into an RFC 9562 UUIDv8.