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 { IntentOpenReceipt } from "./types.js"; export type WaitForUserIntentOpenReceiptTimeoutErrorType = WaitForUserIntentOpenReceiptTimeoutError & { name: "WaitForUserIntentOpenReceiptTimeoutError"; }; export declare class WaitForUserIntentOpenReceiptTimeoutError extends Error { constructor({ uiHash }: { uiHash: Hex; }); } export type WaitForUserIntentOpenReceiptParameters = { /** 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 WaitForUserIntentOpenReceiptReturnType = IntentOpenReceipt; /** * Waits for a User Intent open receipt to be ready. * * - Polls {@link getUserIntentOpenReceipt} 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 WaitForUserIntentOpenReceiptParameters} * @returns The open receipt of the user intent. {@link WaitForUserIntentOpenReceiptReturnType} * * @example * import { createIntentClient, http } from '@zerodev/intent' * import { mainnet } from 'viem/chains' * * const client = createIntentClient({ * chain: mainnet, * transport: http(), * }) * * const receipt = await client.waitForUserIntentOpenReceipt({ * uiHash: '0x...', * }) */ export declare function waitForUserIntentOpenReceipt(client: Client, parameters: WaitForUserIntentOpenReceiptParameters, version: INTENT_VERSION_TYPE): Promise; //# sourceMappingURL=waitForUserIntentOpenReceipt.d.ts.map