Skip to main content

Module hash

Module hash 

Source
Expand description

Canonical JSON hashing used for payload hashes, idempotency keys, plan hashes and schema fingerprints.

“Canonical” here means: the value is serialized with serde, every object has its keys sorted lexicographically (recursively) and the result is rendered with serde_json’s compact writer. It is not full RFC 8785; in particular floating point formatting follows serde_json. Domain types that participate in hashes should avoid floats or accept that rule.

Structs§

Digest
A lowercase hexadecimal BLAKE3 digest (64 characters).

Enums§

HashError
Error raised when a value cannot be rendered as canonical JSON.

Functions§

canonical_digest
Returns the BLAKE3 digest of the canonical JSON rendering of value.
canonical_json
Renders value as canonical JSON (sorted keys, compact).
canonical_value
Renders value as a canonical serde_json::Value (sorted keys).
derive_uuid
Derives a stable, opaque UUID from domain-separated parts.
digest_hex
Returns the lowercase hexadecimal BLAKE3 digest of bytes.