multiformats - v13.3.6
    Preparing search index...

    Interface BlockView<T, C, A, V>

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

    interface BlockView<
        T = unknown,
        C extends number = number,
        A extends number = number,
        V extends Version = 1,
    > {
        bytes: ByteView<T>;
        cid: CID<T, C, A, V>;
        value: T;
        get(path: string): BlockCursorView<unknown>;
        links(): Iterable<[string, CID<unknown, number, number, Version>]>;
        tree(): Iterable<string>;
    }

    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 Summary)

    Implemented by

    Index

    Properties

    Methods

    Properties

    bytes: ByteView<T>
    cid: CID<T, C, A, V>
    value: T

    Methods