import type { Chain, Client, Hex, Transport } from "viem"; import type { SmartAccount } from "viem/account-abstraction"; import type { CombinedIntentRpcSchema } from "../client/intentClient.js"; import type { INTENT_VERSION_TYPE } from "../types/intent.js"; import type { IntentExecutionReceipt } from "./types.js"; export type WaitForUserIntentExecutionReceiptTimeoutErrorType = WaitForUserIntentExecutionReceiptTimeoutError & { name: "WaitForUserIntentExecutionReceiptTimeoutError"; }; export declare class WaitForUserIntentExecutionReceiptTimeoutError extends Error { constructor({ uiHash }: { uiHash: Hex; }); } export type WaitForUserIntentExecutionReceiptParameters = { /** The hash of the User Intent. */ uiHash: Hex; /** * Polling frequency (in ms). Defaults to the client's pollingInterval config. * @default client.pollingInterval */ pollingInterval?: number; /** * The number of times to retry. * @default 6 */ retryCount?: number; /** Optional timeout (in ms) to wait before stopping polling. */ timeout?: number; }; export type WaitForUserIntentExecutionReceiptReturnType = IntentExecutionReceipt; /** * Waits for a User Intent execution receipt to be ready. * * - Polls {@link getUserIntentExecutionReceipt} on a specified interval. * - If the receipt is found, returns the receipt. * - If the receipt times out or exceeds retry count, throws an error. * * @param client - Client to use * @param parameters - {@link WaitForUserIntentExecutionReceiptParameters} * @returns The execution receipt of the user intent. {@link WaitForUserIntentExecutionReceiptReturnType} * * @example * import { createIntentClient, http } from '@zerodev/intent' * import { mainnet } from 'viem/chains' * * const client = createIntentClient({ * chain: mainnet, * transport: http(), * }) * * const receipt = await client.waitForUserIntentExecutionReceipt({ * uiHash: '0x...', * }) */ export declare function waitForUserIntentExecutionReceipt(client: Client, parameters: WaitForUserIntentExecutionReceiptParameters, version: INTENT_VERSION_TYPE): Promise; //# sourceMappingURL=waitForUserIntentExecutionReceipt.d.ts.map