Skip to content

pullPieces

pullPieces(client, options): Promise<ReturnType>

Defined in: packages/synapse-core/src/sp/pull-pieces.ts:445

Pull pieces from external storage providers into a data set.

Handles EIP-712 signing for authorization and calls the Curio POST /pdp/piece/pull endpoint. Curio verifies the client can pay by running an estimateGas on the resulting contract call.

The endpoint is idempotent - calling with the same extraData returns the status of the existing request rather than creating duplicates.

Parameter Type Description
client Client<Transport, Chain, Account> The viem client with account for signing.
options OptionsType pullPieces.OptionsType

Promise<ReturnType>

The current status of the pull operation. pullPieces.ReturnType

Errors pullPieces.ErrorType