PieceCIDTransform
Defined in: packages/synapse-core/src/piece/calculate.ts:93
A pass-through TransformStream that computes the PieceCID of the data flowing through it. The PieceCIDTransform.result promise resolves once the input stream closes.
Example
Section titled “Example”const { transform, result } = Piece.transformStream()await source.pipeThrough(transform).pipeTo(uploadSink)const piece = await resultProperties
Section titled “Properties”result
Section titled “result”Defined in: packages/synapse-core/src/piece/calculate.ts:95
transform
Section titled “transform”
readonlytransform:TransformStream<Uint8Array<ArrayBufferLike>,Uint8Array<ArrayBufferLike>>
Defined in: packages/synapse-core/src/piece/calculate.ts:94