waitForBundle

Waits for the EIP-5792 bundle to be confirmed.

Example

import { waitForBundle } from "thirdweb/wallets/eip5792";
const result = await waitForBundle({
client,
chain,
wallet,
bundleId: "0x123...",
});
function waitForBundle(options: {
bundleId: string;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
maxBlocksWaitTime?: number;
wallet: Wallet;

Parameters

The options for waiting for the bundle. By default, the max wait time is 100 blocks.

Type

let options: {
bundleId: string;
chain: Readonly<ChainOptions & { rpc: string }>;
client: ThirdwebClient;
maxBlocksWaitTime?: number;
wallet: Wallet;
};

Returns

let returnType: {
receipts: Array<WalletCallReceipt<bigint, "success" | "reverted">>;
status: "PENDING" | "CONFIRMED";
};

A promise that resolves with the final getCallsStatus result.