import { ChainId } from '../chain'; import { Amount, Price, Type } from '../currency'; import { Percent } from '../math'; import { Address } from 'viem'; import { LiquidityProviders } from './liquidity-providers'; import { MultiRoute } from '../tines'; export interface UseTradeParams { chainId: ChainId; fromToken: Type | undefined; toToken: Type | undefined; amount: Amount | undefined; slippagePercentage: string; recipient: Address | undefined; enabled: boolean; maxFlowNumber?: number; providers?: LiquidityProviders[]; onError?(e: Error): void; } export interface UseTradeReturn { swapPrice: Price | undefined; priceImpact: Percent | undefined; amountIn: Amount | undefined; amountOut: Amount | undefined; minAmountOut: Amount | undefined; feeAmount: Amount | undefined; bestSingleAmountOut: Amount | undefined; bestSingleDex: string | undefined; gasSpent: string | undefined; functionName: "toobExecute" | "transferValueAndtoobExecute"; writeArgs: any; route: MultiRoute; value?: bigint | undefined; }