import type { Address, Account, ControlFlowOptions, BaseUnits } from '../../../types.js'; import type { Chain } from '../index.js'; import type { Abi, Client, FeeValuesEIP1559 } from 'viem'; /** * Parameters for the {@link exactInputSingle} function. */ export type ExactInputSingleParams = { /** The address of the token or chain contract, if applicable. */ tokenIn: Address | { address: Address; abi?: Abi; }; /** The amount to be transferred. Can be specified directly or as a function that returns a promise resolving to the amount. */ amountIn: BaseUnits; /** The address of the token or chain contract, if applicable. */ tokenOut: Address | { address: Address; abi?: Abi; }; /** The amount to be transferred. Can be specified directly or as a function that returns a promise resolving to the amount. */ amountOutMinimum?: BaseUnits; /** Fee pool */ fee?: number; /** Used to set the limit for the price the swap will push the pool to */ sqrtPriceLimitX96?: bigint; /** The recipient's address or account. */ account: Address | Account; /** Includes the approve() step in the transaction. */ withApprove?: boolean; /** The gas limit for the transaction. */ gas?: bigint; /** The fee values for the transaction. Can be specified directly or as a function that returns a promise resolving to the fee values. */ fees?: FeeValuesEIP1559; /** The blockchain network on which the transaction will be executed. */ chain?: Chain; }; /** * Executes an exact input single swap on Uniswap V3. * * @param client - The client instance to use for the operation. * @param params - Parameters for the exact input single swap operation. * @returns A promise that resolves to the transaction hash of the executed swap. * @throws {UnsupportedChainError} If the specified chain is not supported. * @example * ```typescript * const txHash = await client.exactInputSingle({ * tokenIn: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', // WETH * amountIn: 1000000n, // 1 WETH * tokenOut: '0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238', // USDC * account: '0xYourAccountAddress', // Your account address * chain: ETH_SEPOLIA, // Ethereum Sepolia * }); * // => '0xTransactionHash' * ``` */ export declare function exactInputSingle(client: Client, params: ExactInputSingleParams & ControlFlowOptions): Promise<`0x${string}`>;