Skip to content

PrepareResult

Defined in: packages/synapse-sdk/src/types.ts:61

Result of the prepare() method on StorageManager

costs: OutputType

Defined in: packages/synapse-sdk/src/types.ts:63

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


transaction: { depositAmount: bigint; execute: (options?) => Promise<{ hash: `0x${string}`; receipt: TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> | null; }>; includesApproval: boolean; } | null

Defined in: packages/synapse-sdk/src/types.ts:65

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

{ depositAmount: bigint; execute: (options?) => Promise<{ hash: `0x${string}`; receipt: TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> | null; }>; includesApproval: boolean; }

depositAmount: bigint

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

execute: (options?) => Promise<{ hash: `0x${string}`; receipt: TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> | null; }>

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

ParameterType
options?{ onHash?: (hash) => void; }
options.onHash?(hash) => void

Promise<{ hash: `0x${string}`; receipt: TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> | null; }>

includesApproval: boolean

Whether this transaction includes FWSS operator approval.

null