/** * EIP-7702 捆绑换手 * * 在一笔交易中完成: * 1. 主钱包卖币 → 获得 OKB * 2. OKB 多跳转账 → 中间钱包1 → 中间钱包2 → 最终钱包 * 3. 最终钱包买币 * * 支持 FLAP 内盘、V2 和 V3 三种交易类型 * 只生成签名,由调用方决定如何提交 */ import type { BundleBatchSwapParams, BundleMultiSwapParams, BundleMultiSwapResult, BundleSwapParams, BundleSwapResult } from './types.js'; /** * 捆绑换手 - 生成签名后的交易 * * @param params 换手参数 * @returns 签名后的交易和元数据 * * @example * // FLAP 内盘换手 * const result = await bundleSwap({ * sellerPrivateKey: '0x...', * buyerPrivateKey: '0x...', * tokenAddress: '0x...', * sellAmount: '100', * tradeType: 'FLAP', * hopCount: 2, * }); */ export type { BundleSwapParams, BundleBatchSwapParams } from './types.js'; export declare function bundleSwap(params: BundleSwapParams): Promise; /** * 批量换手(一卖多买)- 生成签名后的交易 * * @param params 批量换手参数 * @returns 签名后的交易和元数据 * * @example * // FLAP 内盘一对多换手 * const result = await bundleBatchSwap({ * sellerPrivateKey: '0x...', * buyerPrivateKeys: ['0x...', '0x...'], * tokenAddress: '0x...', * sellAmount: '100', * tradeType: 'FLAP', * }); */ export declare function bundleBatchSwap(params: BundleBatchSwapParams): Promise; export type { BundleMultiSwapParams, BundleMultiSwapResult } from './types.js'; /** * 多对多换手 - 多个卖家 + 多个买家 * * 核心逻辑:[利润刮取] + [卖出Ops...] + [买入Ops...] * * 特点: * - 多个卖家同时卖出 * - 多个买家同时买入 * - 所有操作在一笔交易中原子执行 * - 利润根据 userType 动态计算 * * @example * const result = await bundleMultiSwap({ * mainPrivateKey: '0x...', // Payer 支付 Gas * sellerPrivateKeys: ['0x...', '0x...'], * buyerPrivateKeys: ['0x...', '0x...'], * totalBuyAmount: '0.1', // 总买入 0.1 OKB * tokenAddress: '0x...', * tradeType: 'V3', * userType: 'v0', * }); */ export declare function bundleMultiSwap(params: BundleMultiSwapParams): Promise;