Class

Block

Block(data, cid)

Block represents an immutable block of data that is uniquely referenced with a cid. It satisfies the default IPFS IPLD block interface: https://github.com/ipld/js-ipld-block.

Constructor

# new Block(data, cid)

Block creates an immutable block of data with the given content identifier (CID).
Parameters:
Name Type Description
data Buffer The data to be stored in the block as a buffer.
cid CID The content identifier of the data.

View Source core/blockstore.ts, line 16

Classes

Block