Skip to content

waitForPullPieces

waitForPullPieces(client, options): Promise<ReturnType>

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

Wait for pull pieces completion.

Repeatedly calls the pull endpoint until all pieces are complete or any piece fails. Since the endpoint is idempotent, this effectively polls for status updates.

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

Promise<ReturnType>

The final status when complete or failed. waitForPullPieces.ReturnType

Errors waitForPullPieces.ErrorType