Waits for the EIP-5792 bundle to be confirmed.
This function is dependent on the wallet's support for EIP-5792 and could fail.
import { waitForCallsReceipt } from "thirdweb/wallets/eip5792";const result = await waitForCallsReceipt({ client, chain, wallet, id: "0x123...",});
Example with useSendCalls:
const sendResult = await sendCalls({ client, chain, wallet, calls: [...],});const confirmResult = await waitForCallsReceipt(sendResult);console.log("Transaction confirmed: ", confirmResult.receipts?.[0].transactionHash);
function waitForCallsReceipt(options: { chain: Readonly; client: ThirdwebClient; id: string; maxBlocksWaitTime?: number; wallet: Wallet;}): Promise<{ atomic: boolean; chainId: number; id: string; receipts?: Array<WalletCallReceipt<bigint, "success" | "reverted">>; status: undefined | "pending" | "success" | "failure"; statusCode: number; version: string;}>;
The options for waiting for the bundle. By default, the max wait time is 100 blocks.
let options: { chain: Readonly; client: ThirdwebClient; id: string; maxBlocksWaitTime?: number; wallet: Wallet;};
let returnType: { blockHash: Hex; blockNumber: quantity; gasUsed: quantity; logs: Array<{ address: string; data: Hex; topics: Array<Hex> }>; status: status; transactionHash: Hex;};
A promise that resolves with the final getCallsStatus result.