Expand description
Deterministic generic CBOR, DAG-CBOR, and content-identifier helpers.
Structs§
- Deterministic
Cbor MapEntry - Entry in a deterministic-CBOR map.
- Deterministic
Cbor Negative Integer - Validated negative integer in the deterministic-CBOR supported range.
Enums§
- Cbor
Error - Error returned when decoding fails to conform to the DAG-CBOR profile.
- Cbor
Value - A decoded DAG-CBOR value.
- Deterministic
Cbor Error - Error returned by deterministic generic-CBOR encoding and decoding.
- Deterministic
Cbor Integer - Integer domain supported by the deterministic generic-CBOR profile.
- Deterministic
Cbor MapKey - Map key domain supported by deterministic generic CBOR.
- Deterministic
Cbor Profile Error - Errors raised by deterministic-CBOR profile construction and validation.
- Deterministic
Cbor Value - Value domain supported by deterministic generic CBOR.
Constants§
- DAG_
CBOR_ CODEC - dag-cbor multicodec code (IPLD)
- DETERMINISTIC_
CBOR_ NEGATIVE_ MAX - Largest negative integer supported by the deterministic generic profile.
- DETERMINISTIC_
CBOR_ NEGATIVE_ MIN - Smallest negative integer supported by the deterministic generic profile.
- MAX_
DETERMINISTIC_ CBOR_ AGGREGATE_ BYTE_ STRING_ BYTES - Maximum aggregate bytes across all byte-string values.
- MAX_
DETERMINISTIC_ CBOR_ AGGREGATE_ TEXT_ BYTES - Maximum aggregate UTF-8 bytes across all text values and text map keys.
- MAX_
DETERMINISTIC_ CBOR_ CONTAINER_ ENTRIES - Maximum entries in a single deterministic-CBOR array or map.
- MAX_
DETERMINISTIC_ CBOR_ INPUT_ LEN - Maximum encoded deterministic-CBOR byte length accepted at public decode boundaries.
- MAX_
DETERMINISTIC_ CBOR_ NESTING_ DEPTH - Maximum recursive array/map nesting depth for deterministic generic CBOR.
- MAX_
DETERMINISTIC_ CBOR_ NODES - Maximum semantic nodes in a deterministic-CBOR value tree.
- MAX_
DETERMINISTIC_ CBOR_ OUTPUT_ LEN - Maximum deterministic-CBOR byte length the encoder may produce.
Functions§
- compute_
cid_ dag_ cbor - Computes the CIDv1 (dag-cbor, sha2-256) of
bytesin canonical base32-lower string form. - 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.
- decode_
deterministic_ cbor - Decode deterministic generic-CBOR bytes into the supported semantic value.
- encode_
dag_ cbor - Encode a value using canonical DAG-CBOR.
- encode_
deterministic_ cbor - Encode a value using the deterministic generic-CBOR profile.
- 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.