Expand description
DAG-CBOR encode/decode and content-identifier helpers.
Enums§
- Cbor
Error - Error returned when decoding fails to conform to the DAG-CBOR profile.
- Cbor
Value - A decoded DAG-CBOR value.
Constants§
- DAG_
CBOR_ CODEC - dag-cbor multicodec code (IPLD)
Functions§
- compute_
cid_ dag_ cbor - Computes the CIDv1 (dag-cbor, sha2-256) of
bytesas a lowercase string. - dag_
cbor_ multihash - Returns a sha2-256 multihash of
bytesfor use in a CID. - decode_
dag_ cbor - Decode canonical DAG-CBOR bytes into a CborValue.
- encode_
dag_ cbor - Encode a value using canonical DAG-CBOR.
- is_
valid_ cid_ string - Returns whether
sparses as a valid CID string. - sha2_
256_ content_ hash - Returns the raw sha2-256 digest of
bytes. - try_
parse_ cid - Parses
sas a CID, returningNoneif it is not a valid CID string. - verify_
dag_ cbor_ cid - Recomputes the CID of
bytesand compares it tocid_str.
Type Aliases§
- Content
Hash - Hash output for sha2-256
- DagCbor
Multihash - Multihash envelope size used by the CID stack for sha2-256 digests.