CID is a self-describing content-addressed identifier. It uses cryptographic hashing to identify content, multicodec packed codes to label the content type, and multibase to encode the final identifier into a string.
CID is a self-describing content-addressed identifier. It uses cryptographic hashing to identify content, multicodec packed codes to label the content type, and multibase to encode the final identifier into a string. https://github.com/ipld/cid
(create codec mhash)
Construct a new v1 content identifier for a known codec type and multihash.
Construct a new v1 content identifier for a known codec type and multihash.
(decode data)
Decode a content identifier from a byte array.
Decode a content identifier from a byte array.
(encode cid)
Encode a content identifier into a binary representation. Returns the byte array.
Encode a content identifier into a binary representation. Returns the byte array.
(format cid)
(format base cid)
Format a CID into a string representation. Returns a multibase-prefixed string representing the encoded value. Uses base32 if not otherwise specified.
Format a CID into a string representation. Returns a multibase-prefixed string representing the encoded value. Uses base32 if not otherwise specified.
(inspect x)
Inspect a CID, encoded byte array, or string and return a map of information about the content identifier.
Inspect a CID, encoded byte array, or string and return a map of information about the content identifier.
(parse string)
Parse a content identifier from a base-encoded string.
Parse a content identifier from a base-encoded string.
(read-bytes data offset)
Read a content identifier from a byte array. Returns a tuple containing the CID and the number of bytes read.
Read a content identifier from a byte array. Returns a tuple containing the CID and the number of bytes read.
(write-bytes cid buffer offset)
Write an encoded content identifier to a byte array at the given offset. Returns the number of bytes written.
Write an encoded content identifier to a byte array at the given offset. Returns the number of bytes written.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close