Expand description
Internal helpers for canonical JSON hashing and ArtifactId computation.
This module is not part of the stable API contract (Appendix C.1) and may change.
Canonical JSON and ArtifactId hashing helpers.
Policy:
- Structured data MUST be hashed as canonical JSON bytes (RFC 8785 / JCS-style).
- Hashed JSON MUST NOT contain floats (fractional numbers); use integer-scaled values or strings instead.
Enums§
- Canonical
Json Error - Errors returned when a JSON value cannot participate in canonical hashing.
Functions§
- artifact_
id_ for_ bytes - Compute the content-addressed
ArtifactIdfor raw bytes (SHA-256 lowercase hex). - artifact_
id_ for_ json - Compute the content-addressed
ArtifactIdfor structured JSON (canonical JSON bytes + SHA-256). - canonical_
json_ bytes - Serialize a
serde_json::Valueinto canonical JSON bytes.