Interface Block<T, C, A, V>

Represents an IPLD block (including its CID) that can be decoded to data of type T.

interface Block<T, C, A, V> {
    bytes: ByteView<T>;
    cid: Link<T, C, A, V>;
}

Type Parameters

  • T = unknown

    Logical type of the data encoded in the block

  • C extends number = number

    multicodec code corresponding to codec used to encode the block

  • A extends number = number

    multicodec code corresponding to the hashing algorithm used in CID creation.

  • V extends Version = 1

    CID version

Hierarchy (view full)

Properties

Properties

bytes: ByteView<T>
cid: Link<T, C, A, V>