Expand description
Canonical encoding and decoding of mnem objects.
Two codecs are exposed:
dagcbor- the canonical storage format. Byte-exact deterministic per SPEC §3. Every content hash in mnem is computed over DAG-CBOR output.dagjson- a debug / inspection format. Never hashed, never written to the object store as canonical content. Useful formnem cat-file --jsonand error messages.
The most common operation is dagcbor::hash_to_cid which encodes a
value to canonical CBOR and computes its content-addressed CID.
Re-exports§
pub use dagcbor::extract_links;pub use dagcbor::from_canonical_bytes;pub use dagcbor::hash_to_cid;pub use dagcbor::to_canonical_bytes;pub use dagjson::from_json_bytes;pub use dagjson::to_json_bytes;pub use json::IPLD_MAX_DEPTH;pub use json::JsonIpldError;pub use json::json_to_ipld;