aleph-cid 0.1.0

kubo-compatible IPFS CID computation for Aleph Cloud: UnixFS dag-pb hashing, HAMT-sharded directories and CARv1 framing.
Documentation

kubo-compatible IPFS CID computation for Aleph Cloud.

This crate is the single source of truth for client-side content addressing in the Aleph Rust workspace:

  • [cid]: the string-validated [cid::Cid] type (CIDv0/CIDv1), with serde support behind the serde feature.
  • [verify]: streaming CID hashers ([verify::Hasher]) for IPFS CIDv0/CIDv1 (UnixFS dag-pb, 256 KiB chunks, raw leaves), plus [verify::compute_cid] for one-shot CIDv0 computation.
  • [folder_hash]: UnixFS directory DAG construction matching ipfs add -r (plain directories and HAMT shards), with a block sink for streaming the DAG into a CAR file.
  • [car]: CARv1 framing: header/block writers and a strict root reader.

It deliberately contains no networking, signing, or async code, and no Aleph message types, so that it can be reused as-is from FFI bindings (e.g. a Python wheel). Golden CIDs in tests/folder_hash.rs are regenerated against real kubo via tests/regen-folder-hash-goldens.sh.