/** * Four.meme 内盘捆绑换手(Merkle Bundle) * * 功能:钱包A卖出代币 → 钱包B买入相同数量 → 原子执行 */ import { CommonBundleConfig } from '../../../utils/bundle-helpers.js'; import { type GeneratedWallet } from '../../../utils/wallet.js'; export type UserType = 'v0' | 'v1'; export interface FourSwapSignConfig { rpcUrl: string; gasLimit?: number | bigint; gasLimitMultiplier?: number; minGasPriceGwei?: number; maxGasPriceGwei?: number; txType?: 0 | 2; chainId?: number; reserveGasBNB?: number; userType?: UserType; bribeAmount?: number; } export interface FourSwapConfig extends CommonBundleConfig { apiKey: string; customRpcUrl?: string; bundleBlockOffset?: number; reserveGasBNB?: number; waitForConfirmation?: boolean; waitTimeoutMs?: number; skipApprovalCheck?: boolean; } export interface FourBundleSwapSignParams { sellerPrivateKey: string; sellAmount?: string; sellPercentage?: number; buyerPrivateKey: string; tokenAddress: string; config: FourSwapSignConfig; startNonces?: number[]; } export interface FourBundleSwapParams { sellerPrivateKey: string; sellAmount?: string; sellPercentage?: number; buyerPrivateKey: string; tokenAddress: string; config: FourSwapConfig; } /** * ✅ Swap 结果(简化版) */ export type FourSwapResult = { signedTransactions: string[]; profitHopWallets?: GeneratedWallet[]; metadata?: { sellerAddress: string; buyerAddress: string; sellAmount: string; buyAmount: string; hasApproval?: boolean; profitAmount?: string; }; }; /** * Four内盘捆绑换手 */ export declare function fourBundleSwapMerkle(params: FourBundleSwapSignParams): Promise; /** * Four 批量换手参数(一卖多买) */ export interface FourBatchSwapSignParams { sellerPrivateKey: string; sellAmount?: string; sellPercentage?: number; buyerPrivateKeys: string[]; buyerRatios?: number[]; tokenAddress: string; config: FourSwapSignConfig; startNonces?: number[]; } /** * Four 批量换手结果 */ export interface FourBatchSwapResult { signedTransactions: string[]; profitHopWallets?: GeneratedWallet[]; metadata?: { sellerAddress: string; buyerAddresses: string[]; sellAmount: string; buyAmounts: string[]; hasApproval?: boolean; profitAmount?: string; }; } /** * Four 内盘批量换手(一卖多买) * * 功能:主钱包一次卖出 → 多个子钱包同时买入 → 在同一个区块中完成 * 限制:最多 24 个买方(服务器限制 25 笔交易,包含 1 笔利润交易) */ export declare function fourBatchSwapMerkle(params: FourBatchSwapSignParams): Promise; /** * Four 快捷批量换手参数 */ export interface FourQuickBatchSwapSignParams { sellerPrivateKey: string; sellAmount?: string; sellPercentage?: number; buyerPrivateKeys: string[]; buyerRatios?: number[]; buyerAmounts?: string[]; tokenAddress: string; config: FourSwapSignConfig; disperseHopCount?: number; startNonces?: number[]; } /** * Four 快捷批量换手结果 */ export interface FourQuickBatchSwapResult { signedTransactions: string[]; disperseHopWallets?: GeneratedWallet[]; profitHopWallets?: GeneratedWallet[]; metadata?: { sellerAddress: string; buyerAddresses: string[]; sellAmount: string; estimatedBNBOut: string; transferAmounts: string[]; profitAmount?: string; disperseHopCount?: number; }; } /** * Four 内盘快捷批量换手(资金利用率模式) * * 流程:[贿赂] → [卖出] → [转账多跳...] → [买入1, 买入2, ...] → [利润] * * 特点: * - 子钱包不需要预先有 BNB * - 资金来自主钱包卖出代币所得 * - 提升资金利用率 * - ✅ 支持转账多跳,隐藏资金流向 * * 限制:根据多跳数动态计算最大买方数量 */ export declare function fourQuickBatchSwapMerkle(params: FourQuickBatchSwapSignParams): Promise;