# PrepareResult

Defined in: [packages/synapse-sdk/src/types.ts:61](https://github.com/FilOzone/synapse-sdk/blob/b11ef4f7e3c201d8bba29973a09628063e6547b1/packages/synapse-sdk/src/types.ts#L61)

Result of the prepare() method on StorageManager

## Properties

### costs

> **costs**: [`OutputType`](/reference/filoz/synapse-sdk/synapse/namespaces/getuploadcosts/type-aliases/outputtype/)

Defined in: [packages/synapse-sdk/src/types.ts:63](https://github.com/FilOzone/synapse-sdk/blob/b11ef4f7e3c201d8bba29973a09628063e6547b1/packages/synapse-sdk/src/types.ts#L63)

The cost breakdown (either passed in or freshly computed).

***

### transaction

> **transaction**: \{ `depositAmount`: `bigint`; `execute`: (`options?`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `hash`: `` `0x${string}` ``; `receipt`: `TransactionReceipt`\<`bigint`, `number`, `"success"` \| `"reverted"`, `TransactionType`\> \| `null`; \}\>; `includesApproval`: `boolean`; \} \| `null`

Defined in: [packages/synapse-sdk/src/types.ts:65](https://github.com/FilOzone/synapse-sdk/blob/b11ef4f7e3c201d8bba29973a09628063e6547b1/packages/synapse-sdk/src/types.ts#L65)

The single transaction to execute, or null if already ready.

#### Type Declaration

\{ `depositAmount`: `bigint`; `execute`: (`options?`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `hash`: `` `0x${string}` ``; `receipt`: `TransactionReceipt`\<`bigint`, `number`, `"success"` \| `"reverted"`, `TransactionType`\> \| `null`; \}\>; `includesApproval`: `boolean`; \}

#### depositAmount

> **depositAmount**: `bigint`

Amount to deposit into the payments contract. 0n when only approval is needed.

#### execute()

> **execute**: (`options?`) => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `hash`: `` `0x${string}` ``; `receipt`: `TransactionReceipt`\<`bigint`, `number`, `"success"` \| `"reverted"`, `TransactionType`\> \| `null`; \}\>

Execute the transaction, wait for confirmation, and return the hash + receipt.

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `options?` | \{ `onHash?`: (`hash`) => `void`; \} |
| `options.onHash?` | (`hash`) => `void` |

##### Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `hash`: `` `0x${string}` ``; `receipt`: `TransactionReceipt`\<`bigint`, `number`, `"success"` \| `"reverted"`, `TransactionType`\> \| `null`; \}\>

#### includesApproval

> **includesApproval**: `boolean`

Whether this transaction includes FWSS operator approval.

`null`