Interface ContentId<Code, HashCode>

A content hash ID.

interface ContentId {
    /: Uint8Array;
    bytes: Uint8Array;
    code: Code;
    multihash: MultihashDigest<HashCode>;
    equals(rhs): boolean;
    toJSON(): {
        /: string;
    };
    toString(base?): string;
}

Type Parameters

  • Code extends number = number

  • HashCode extends number = number

Hierarchy

Properties

/: Uint8Array

Byte representation of this ID.

bytes: Uint8Array

Byte representation of this ID.

code: Code

Multicodec code of this ID.

multihash: MultihashDigest<HashCode>

Multihash value of this ID.

Methods

  • Returns a JSON representation of this ID.

    Returns {
        /: string;
    }

    • /: string

Generated using TypeDoc