import { PublicClient, TransactionReceipt } from 'viem'; import { HexString } from '../blockchain'; export declare const isEmptyCalldata: (calldata: HexString) => calldata is "0x"; /** * Returns the receipt of a mined transaction, or throws when it reverted. * * IMPLEMENTATION NOTE: viem's `waitForTransactionReceipt` resolves with the * receipt whatever its outcome and reports a revert only through * `receipt.status === 'reverted'` * (https://viem.sh/docs/actions/public/waitForTransactionReceipt#returns), so a * caller that awaits the receipt alone treats a reverted transaction as mined. */ export declare const assertTransactionSucceeded: (receipt: TransactionReceipt) => TransactionReceipt; /** * Total time a receipt wait keeps trying before giving up on a broadcast * transaction. Slow-to-mine transactions usually confirm well within this * window; viem's own default gives up after 180s. */ export declare const WAIT_FOR_RECEIPT_TIMEOUT_MILLIS = 360000; type ReceiptWaiter = Pick; interface ReceiptWaitOptions { timeoutMillis?: number; retryDelayMillis?: number; } /** * Wraps a public client so `waitForTransactionReceipt` stays patient for * {@link WAIT_FOR_RECEIPT_TIMEOUT_MILLIS} instead of viem's 180s default. * * viem's wait also rejects with `TransactionReceiptNotFoundError` / * `TransactionNotFoundError` long before its timeout when the RPC node lags * behind the mempool (its internal lookups exhaust their retries). Those * rejections mean the transaction is still pending, so the wrapper retries * the wait until the deadline and only then throws * `WaitForTransactionReceiptTimeoutError` with the transaction hash. */ export declare const withRetriedReceiptWait: (client: TClient, options?: ReceiptWaitOptions) => TClient; export {};