import type { Wallet } from 'ethers'; import type { GeneratedWallet } from '../../../utils/wallet.js'; export declare const XLAYER_CHAIN_ID: 196; export declare const WOKB_ADDRESS: string; export declare const POTATO_V2_ROUTER: string; export declare const POTATO_V3_ROUTER: string; export declare const NATIVE_TRANSFER_GAS_LIMIT: 21055n; export { ZERO_ADDRESS } from '../../../core/constants/index.js'; export type UserType = 'v0' | 'v1'; export type SwapRouteType = 'v2' | 'v3-single' | 'v3-multi'; export interface V2RouteParams { routeType: 'v2'; v2Path: string[]; } export interface V3SingleRouteParams { routeType: 'v3-single'; v3TokenIn: string; v3TokenOut: string; v3Fee: number; v2Path?: string[]; } export interface V3MultiRouteParams { routeType: 'v3-multi'; v3LpAddresses: string[]; v3ExactTokenIn: string; v2Path?: string[]; } export type RouteParams = V2RouteParams | V3SingleRouteParams | V3MultiRouteParams; export interface XLayerEoaSwapConfig { rpcUrl: string; gasLimit?: number | bigint; gasLimitMultiplier?: number; minGasPriceGwei?: number; maxGasPriceGwei?: number; txType?: 0 | 2; reserveGasBNB?: number; userType?: UserType; bribeAmount?: number; } export interface XLayerQuickBatchSwapParams { sellerPrivateKey: string; sellAmount?: string; sellPercentage?: number; buyerPrivateKeys: string[]; buyerRatios?: number[]; buyerAmounts?: string[]; tokenAddress: string; routeParams: RouteParams; config: XLayerEoaSwapConfig; quoteToken?: string; quoteTokenDecimals?: number; disperseHopCount?: number; startNonces?: number[]; } export interface XLayerQuickBatchSwapResult { signedTransactions: string[]; disperseHopWallets?: GeneratedWallet[]; profitHopWallets?: GeneratedWallet[]; metadata?: { sellerAddress: string; buyerAddresses: string[]; sellAmount: string; estimatedOutput: string; transferAmounts: string[]; profitAmount?: string; useNativeToken: boolean; disperseHopCount?: number; }; } export interface XLayerCrossSwapParams { sellerPrivateKeys: string[]; sellAmounts: string[]; buyerPrivateKeys: string[]; tokenAddress: string; routeParams: RouteParams; config: XLayerEoaSwapConfig; quoteToken?: string; quoteTokenDecimals?: number; buyersPerSell?: number; disperseHopCount?: number; /** ✅ 预获取的 nonce(地址 -> nonce),避免 nonce 不同步 */ startNonces?: Map; } export interface XLayerCrossSwapResult { signedTransactions: string[]; rounds: Array<{ sellerAddress: string; buyerAddresses: string[]; sellAmount: string; bundleHash?: string; }>; disperseHopWallets?: GeneratedWallet[]; profitHopWallets?: GeneratedWallet[]; } export type DisperseHopPath = { targetAddress: string; hopWallets: Wallet[]; hopWalletsInfo: GeneratedWallet[]; };