PrepareResult
Defined in: packages/synapse-sdk/src/types.ts:61
Result of the prepare() method on StorageManager
Properties
Section titled “Properties”costs:
OutputType
Defined in: packages/synapse-sdk/src/types.ts:63
The cost breakdown (either passed in or freshly computed).
transaction
Section titled “transaction”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.
Type Declaration
Section titled “Type Declaration”{ depositAmount: bigint; execute: (options?) => Promise<{ hash: `0x${string}`; receipt: TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> | null; }>; includesApproval: boolean; }
depositAmount
Section titled “depositAmount”depositAmount:
bigint
Amount to deposit into the payments contract. 0n when only approval is needed.
execute()
Section titled “execute()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | { onHash?: (hash) => void; } |
options.onHash? | (hash) => void |
Returns
Section titled “Returns”Promise<{ hash: `0x${string}`; receipt: TransactionReceipt<bigint, number, "success" | "reverted", TransactionType> | null; }>
includesApproval
Section titled “includesApproval”includesApproval:
boolean
Whether this transaction includes FWSS operator approval.
null