PieceRetriever
Defined in: packages/synapse-sdk/src/types.ts:113
PieceRetriever interface for fetching pieces from various sources Returns standard Web API Response objects for flexibility
Properties
Section titled “Properties”fetchPiece()
Section titled “fetchPiece()”fetchPiece: (
pieceCid,client,options?) =>Promise<Response>
Defined in: packages/synapse-sdk/src/types.ts:121
Fetch a piece from available sources
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
pieceCid | PieceLink | The PieceCID identifier of the piece (validated internally) |
client | `0x${string}` | The client address requesting the piece |
options? | { providerAddress?: `0x${string}`; signal?: AbortSignal; withCDN?: boolean; } | Optional retrieval parameters |
options.providerAddress? | `0x${string}` | - |
options.signal? | AbortSignal | - |
options.withCDN? | boolean | - |
Returns
Section titled “Returns”A Response object that can be processed for the piece data