Create a new StreamID.
new StreamID('tile', 'bagcqcerakszw2vsovxznyp5gfnpdj4cqm2xiv76yd24wkjewhhykovorwo6a');
new StreamID('tile', cid);
new StreamID(0, cid);
the stream type
Protected
Readonly
_tagStatic
fromStatic
fromSame as fromBytes, but returns an Error instance rather than throwing if there is a problem with the input. Note that some exceptions can still be thrown in certain cases, if they come from lower-level libraries like multibase, for example.
Static
fromStatic
fromSame as fromString but returns an Error instance rather than throwing if there is a problem with the input. Note that some exceptions can still be thrown in certain cases, if they come from lower-level libraries like multibase, for example.
Bytes representation of StreamID.
Genesis commits CID
Stream type code
Stream type name
Static
fromCreate a streamId from a genesis commit.
const streamId = StreamID.fromGenesis('tile', {
header: {
controllers:['did:3:kjz...'],
family: 'IDX'
}
});
the stream type
a genesis commit
Static
is
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.