# getAddPiecesResult

> **getAddPiecesResult**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getaddpiecesresult/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/warm-storage/submission-result.ts:75](https://github.com/FilOzone/synapse-sdk/blob/56f1ef3fb5ccfea19fb80cb59e997e381f37d85a/packages/synapse-core/src/warm-storage/submission-result.ts#L75)

Check on chain whether an add pieces submission landed, without the SP or any transaction hash.

FWSS records each used add pieces nonce, so this works whichever transaction carried the call,
including a replace-by-fee replacement whose hash was never seen. If `added` is false, resubmitting
the same `extraData` is safe: FWSS rejects a reused nonce, so the pieces can never be added twice.
Do not sign new extra data for the same pieces while the original could still land.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`\> | The client to use to read the nonce. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/warm-storage/namespaces/getaddpiecesresult/type-aliases/optionstype/) | [getAddPiecesResult.OptionsType](/reference/filoz/synapse-core/warm-storage/namespaces/getaddpiecesresult/type-aliases/optionstype/) |

## Returns

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

The result [getAddPiecesResult.OutputType](/reference/filoz/synapse-core/warm-storage/namespaces/getaddpiecesresult/type-aliases/outputtype/)

## Throws

Errors [getAddPiecesResult.ErrorType](/reference/filoz/synapse-core/warm-storage/namespaces/getaddpiecesresult/type-aliases/errortype/)

## Example

```ts
import { getAddPiecesResult } from '@filoz/synapse-core/warm-storage'
import { createPublicClient, http } from 'viem'
import { calibration } from '@filoz/synapse-core/chains'

const client = createPublicClient({
  chain: calibration,
  transport: http(),
})

// `extraData` and `pieceCount` were persisted from `addPieces` before a crash
const result = await getAddPiecesResult(client, {
  payer: '0x0000000000000000000000000000000000000000',
  extraData: '0x...',
  pieceCount: 2,
})

if (result.added) {
  console.log(result.dataSetId, result.pieceIds)
}
```