()
| 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. |
no test coverage detected