import type { IInstruction } from "@solana/kit"; import type { Address, Chain, Client, Hex, Transport } from "viem"; import type { PrepareUserOperationParameters, SmartAccount } from "viem/account-abstraction"; import type { CombinedIntentRpcSchema } from "../client/intentClient.js"; import type { INTENT_VERSION_TYPE } from "../types/intent.js"; type PrepareUserOperationParametersWithOptionalCalls = Omit, "calls"> & { calls?: calls; }; export type EstimateUserIntentFeesParameters = PrepareUserOperationParametersWithOptionalCalls & { inputTokens?: Array<{ address: Hex; amount?: bigint; chainId: number; }>; outputTokens?: Array<{ address: Hex; amount: bigint; chainId: number; }>; instructions?: IInstruction[]; gasToken?: "SPONSORED" | "NATIVE"; chainId?: number; }; export type EstimateUserIntentFeesResult = { inputPaymentTokens: Array<{ address: Address; amount: bigint; chainId: number; }>; gasPaymentTokens: Array<{ address: Address; amount: bigint; chainId: number; }>; }; /** * Estimates the fees for a user intent. * * @param client - Client to use * @param parameters - {@link EstimateUserIntentFeesParameters} * @returns The estimated fees. {@link EstimateUserIntentFeesResult} * * @example * import { createIntentClient, http } from '@zerodev/intent' * import { mainnet } from 'viem/chains' * * const client = createIntentClient({ * chain: mainnet, * transport: http(), * }) * * // Using callData * const intent1 = await client.estimateUserIntentFees({ * callData: '0x...', * inputTokens: [{ * address: '0x...', * amount: 1000000n, * chainId: 1n * }], * outputTokens: [{ * address: '0x...', * amount: 900000n, * chainId: 10n * }] * }) * * // Using calls * const intent2 = await client.estimateUserIntentFees({ * calls: [{ * to: '0x...', * value: 1000000n, * data: '0x...' * }], * inputTokens: [{ * address: '0x...', * amount: 1000000n, * chainId: 1n * }], * outputTokens: [{ * address: '0x...', * amount: 900000n, * chainId: 10n * }] * }) */ export declare function estimateUserIntentFees(client: Client, parameters: EstimateUserIntentFeesParameters, version: INTENT_VERSION_TYPE): Promise; export {}; //# sourceMappingURL=estimateUserIntentFees.d.ts.map