# waitForCreateDataSet

> **waitForCreateDataSet**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp/namespaces/waitforcreatedataset/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/sp/wait-for-receipt.ts:234](https://github.com/FilOzone/synapse-sdk/blob/840d7b2c6263846ac51b7558000e62dd68d33a44/packages/synapse-core/src/sp/wait-for-receipt.ts#L234)

Wait for a create data set transaction on chain, following replace-by-fee replacements.

See [waitForAddPieces](/reference/filoz/synapse-core/sp/functions/waitforaddpieces/). For recovery after a crash, call `getCreateDataSetResult`.

## Parameters

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

## Returns

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

The outcome [waitForCreateDataSet.OutputType](/reference/filoz/synapse-core/sp/namespaces/waitforcreatedataset/type-aliases/outputtype/)

## Example

```ts
const result = await SP.createDataSet(client, options)
const { dataSetId } = await SP.waitForCreateDataSet({ client, ...result })
```

## Throws

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