Options
All
  • Public
  • Public/Protected
  • All
Menu

Stream identifier, no commit information included.

Contains stream type and CID of genesis commit.

Encoded as <multibase-prefix><multicodec-streamid><type><genesis-cid-bytes>.

String representation is base36-encoding of the bytes above.

Hierarchy

  • StreamID

Implements

Index

Constructors

constructor

  • new StreamID(type: string | number, cid: CID | string): StreamID
  • Create a new StreamID.

    example
    new StreamID('tile', 'bagcqcerakszw2vsovxznyp5gfnpdj4cqm2xiv76yd24wkjewhhykovorwo6a');
    new StreamID('tile', cid);
    new StreamID(0, cid);
    

    Parameters

    • type: string | number

      the stream type

    • cid: CID | string

    Returns StreamID

Properties

Protected Readonly _tag

_tag: symbol = TAG

Static fromBytes

fromBytes: fromBytes = fromBytes

Static fromString

fromString: fromString = fromString

Accessors

baseID

bytes

  • get bytes(): Uint8Array

cid

  • get cid(): CID

type

  • get type(): number

typeName

  • get typeName(): string

Methods

[Symbol.for('nodejs.util.inspect.custom')]

  • [Symbol.for('nodejs.util.inspect.custom')](): string

[Symbol.toPrimitive]

  • [Symbol.toPrimitive](): string

atCommit

  • atCommit(commit: CID | string | number): CommitID

equals

toString

  • toString(): string

toUrl

  • toUrl(): string

Static isInstance

  • isInstance(instance: any): instance is StreamID