/** * bundle-swap 内部工具函数 * * 供 bundle-swap-single / bundle-swap-batch / bundle-swap-multi 共享使用, * 不作为公共 API 导出。 */ import { ethers, Wallet } from 'ethers'; import type { Call3Value, TradeType } from './types.js'; export declare function getDefaultRouter(tradeType: TradeType): string; /** * 截断小数位数,避免 parseEther/parseUnits 报错 * @param value 数值字符串 * @param decimals 保留的小数位数(默认 18) */ export declare function truncateDecimals(value: string, decimals?: number): string; /** * 获取卖出报价:预估卖出代币能得到多少 OKB */ export declare function quoteSellOutput(sellAmount: bigint, tokenAddress: string, tradeType: TradeType, fee: number, rpcUrl?: string): Promise; export declare function buildBuyCallInternal(wallet: Wallet, amount: bigint, tokenAddress: string, tradeType: TradeType, routerAddress: string, fee: number, delegateInterface: ethers.Interface, portalInterface: ethers.Interface): Call3Value; export declare function buildSellCallWithAmountInternal(wallet: Wallet, amount: bigint, tokenAddress: string, tradeType: TradeType, routerAddress: string, fee: number, delegateInterface: ethers.Interface, portalInterface: ethers.Interface): Call3Value;