Skip to content

pullPieces

pullPieces(client, options): Promise<PullResponse>

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

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.

ParameterTypeDescription
clientClient<Transport, Chain, Account>The viem client with account for signing.
optionsOptionsTypepullPieces.OptionsType

Promise<PullResponse>

The current status of the pull operation. pullPieces.ReturnType

Errors pullPieces.ErrorType