waitForUserOperationTransaction

1const waitForUserOperationTransaction: <TTransport, TChain>(
2 client,
3 args,
4) => Promise<Hex>;

Defined in: aa-sdk/core/src/actions/smartAccount/waitForUserOperationTransacation.ts:34

Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached.

Example

1import { createSmartAccountClient } from "@aa-sdk/core";
2
3// smart account client is already extended with waitForUserOperationTransaction
4const client = createSmartAccountClient(...);
5const result = await client.waitForUserOperationTransaction({
6 hash: "0x...",
7 retries: {...} // optional param to configure the retry amounts
8});

Type Parameters

Type ParameterDefault type

TTransport extends Transport

Transport

TChain extends Chain | undefined

Chain | undefined

Parameters

ParameterTypeDescription

client

Client<TTransport, TChain, any>

args

WaitForUserOperationTxParameters

The parameters for the transaction to wait for

Returns

Promise<Hex>

A promise that resolves to the transaction hash when the transaction is confirmed