# waitForPullStatus

> **waitForPullStatus**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PullResponse`](/reference/filoz/synapse-core/sp/type-aliases/pullresponse/)\>

Defined in: [packages/synapse-core/src/sp/pull.ts:211](https://github.com/FilOzone/synapse-sdk/blob/b11ef4f7e3c201d8bba29973a09628063e6547b1/packages/synapse-core/src/sp/pull.ts#L211)

Wait for pull 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.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`, `Account`\> | The viem client with account for signing. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/waitforpullstatus/type-aliases/optionstype/) | [waitForPullStatus.OptionsType](/reference/filoz/synapse-core/sp/namespaces/waitforpullstatus/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`PullResponse`](/reference/filoz/synapse-core/sp/type-aliases/pullresponse/)\>

The final status when complete or failed. [waitForPullStatus.ReturnType](/reference/filoz/synapse-core/sp/namespaces/waitforpullstatus/type-aliases/returntype/)

## Throws

Errors [waitForPullStatus.ErrorType](/reference/filoz/synapse-core/sp/namespaces/waitforpullstatus/type-aliases/errortype/)