MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / bytes

Method bytes

sdk/packages/identifiers/src/commit-id.ts:175–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 */
174 @Memoize()
175 get bytes(): Uint8Array {
176 const codec = new Uint8Array(varint.encode(STREAMID_CODEC))
177 const type = new Uint8Array(varint.encode(this.type))
178
179 const commitBytes = this.#commit?.bytes || new Uint8Array([0])
180 return uint8ArrayConcat([codec, type, this.cid.bytes, commitBytes])
181 }
182
183 /**
184 * Compare equality with another CommitID.

Callers 6

mainFunction · 0.45
as_partsMethod · 0.45
with_sep_keyMethod · 0.45
with_peer_idMethod · 0.45
with_rangeMethod · 0.45
eventsFunction · 0.45

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected