import type { Chain } from '../providers/uniswap/index.js'; import type { Address, BaseUnits, ControlFlowOptions, NativeUnits } from '../types.js'; import type { Abi, Client } from 'viem'; /** * Parameters for the {@link getSwapExactInQuote} function. */ export type GetSwapExactInQuoteParams = { /** The token to swap from. */ tokenIn: Address | { address: Address; abi?: Abi; }; /** The amount of the token to swap from */ tokenInAmount: NativeUnits | BaseUnits; /** The token to swap to. */ tokenOut: Address | { address: Address; abi?: Abi; }; /** Fee pool */ fee?: number; /** The blockchain network on which the quote will be calculated. */ chain?: Chain; }; export type GetSwapExactInQuoteReturnType = { /** The input token address */ tokenIn: Address; /** The output token address */ tokenOut: Address; /** The amount of input token */ tokenInAmount: BaseUnits; /** The estimated minimum amount of the token to receive from the swap. This is used to protect against slippage. */ tokenOutAmount: BaseUnits; /** The gas estimate for the operation */ gas: bigint; /** The blockchain network on which the quote was calculated */ chain: Chain; }; /** * Gets a quote for swapping an exact amount of one token for another token * * @param client - The client instance to use for the operation. * @param params - Parameters for the operation * @returns An object containing the amount of output token and the gas estimate for the operation. * * @example * Calculating a quote for a swap of 1 USDC to WETH on Ethereum Sepolia * ```typescript * const quote = await client.getSwapExactInQuote({ * tokenIn: ETH_SEPOLIA.contracts.USDC, * tokenInAmount: '1', * tokenOut: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', * chain: ETH_SEPOLIA, * }) * ``` * * @example * Use quote to swap * * ```typescript * const quote = await client.getSwapExactInQuote({ * tokenIn: ETH_SEPOLIA.contracts.USDC, * tokenInAmount: '1', * tokenOut: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', * chain: ETH_SEPOLIA, * }) * * await client.swap({ ...quote, account }) * ``` */ export declare function getSwapExactInQuote(client: Client, params: GetSwapExactInQuoteParams & ControlFlowOptions): Promise;