@atcute/cid
v1.0.2
Published
create and parse AT Protocol-blessed CIDv1 format
Downloads
1,814
Readme
@atcute/cid
CIDv1 codec library.
const parsed = parse('bafyreihffx5a2e7k5uwrmmgofbvzujc5cmw5h4espouwuxt3liqoflx3ee');
// ^? { version: 1, code: 113, digest: { ... }, bytes: Uint8Array(36) }
// Creating a CID containing CBOR data
const cid = await create(0x71, buffer);
// Serializing CID into string
format(cid); // -> bafyrei...