useWaitForReceipt
A hook to wait for a transaction receipt.
import { useWaitForReceipt } from "thirdweb/react";const { data: receipt, isLoading } = useWaitForReceipt({ client, chain, transactionHash,});
function useWaitForReceipt( options: | undefined | { chain: { readonly blockExplorers?: Array<{ apiUrl?: string; name: string; url: string; }>; readonly experimental?: { increaseZeroByteCount?: boolean }; readonly faucets?: Array<string>; readonly icon?: Icon; readonly id: number; readonly name?: string; readonly nativeCurrency?: { decimals?: number; name?: string; symbol?: string; }; readonly rpc: string; readonly testnet?: true; }; maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; },): UseQueryResult<TransactionReceipt>;
The options for waiting for a transaction receipt.
let options: | undefined | { chain: { readonly blockExplorers?: Array<{ apiUrl?: string; name: string; url: string; }>; readonly experimental?: { increaseZeroByteCount?: boolean }; readonly faucets?: Array<string>; readonly icon?: Icon; readonly id: number; readonly name?: string; readonly nativeCurrency?: { decimals?: number; name?: string; symbol?: string; }; readonly rpc: string; readonly testnet?: true; }; maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; };