Interface Link<Data, Format, Alg, V>

Represents an IPLD link to a specific data of type T.

Template: T

Logical type of the data being linked to.

Template: C

multicodec code corresponding to a codec linked data is encoded with

Template: A

multicodec code corresponding to the hashing algorithm of the CID

interface Link<Data, Format, Alg, V> {
    [Marker]?: Data;
    byteLength: number;
    byteOffset: number;
    bytes: ByteView<Link<Data, Format, Alg, V>>;
    code: Format;
    multihash: MultihashDigest<Alg>;
    version: V;
    equals(other): other is Link<Data, Format, Alg, Version>;
    link(): Link<Data, Format, Alg, V>;
    toString<Prefix>(base?): ToString<Link<Data, Format, Alg, Version>, Prefix>;
    toV1(): Link<Data, Format, Alg, 1>;
}

Type Parameters

  • Data extends unknown = unknown
  • Format extends number = number
  • Alg extends number = number
  • V extends Version = 1

    CID version

Hierarchy (view full)

Implemented by

Properties

[Marker]?: Data
byteLength: number
byteOffset: number
code: Format
multihash: MultihashDigest<Alg>
version: V

Methods