PieceRetriever
Defined in: packages/synapse-sdk/src/types.ts:112
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:120
Fetch a piece from available sources
Parameters
Section titled “Parameters”| Parameter | Type | Description | 
|---|---|---|
pieceCid | PieceLink | The PieceCID identifier of the piece (validated internally) | 
client | string | The client address requesting the piece | 
options? | { providerAddress?: string; signal?: AbortSignal; withCDN?: boolean; } | Optional retrieval parameters | 
options.providerAddress? | string | - | 
options.signal? | AbortSignal | - | 
options.withCDN? | boolean | - | 
Returns
Section titled “Returns”A Response object that can be processed for the piece data