# waitForTerminateService

> **waitForTerminateService**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `fwssTerminated`: `true`; `serviceTerminationEpoch`: `bigint`; `terminationTxHash`: `""` \| `` `0x${string}` ``; \}\>

Defined in: [packages/synapse-core/src/sp/terminate-service.ts:308](https://github.com/FilOzone/synapse-sdk/blob/218f90f1cf7635dc33af6f880b64b845c99676bc/packages/synapse-core/src/sp/terminate-service.ts#L308)

Wait for the data set termination status.

GET /pdp/data-sets/{dataSetId}/terminate

Polls until the provider's transaction confirms and the termination epoch is
recorded.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/optionstype/) | [waitForTerminateService.OptionsType](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `fwssTerminated`: `true`; `serviceTerminationEpoch`: `bigint`; `terminationTxHash`: `""` \| `` `0x${string}` ``; \}\>

Status [waitForTerminateService.OutputType](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/outputtype/)

## Throws

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