import type { AmountLike } from '../../types/index.js'; import type { FourBundleMerkleConfig, FourSignConfig, MerkleSignedResult, QuoteTokenType, TokenPoolType, UserType } from './config.js'; export type DisperseMerkleParams = { fromPrivateKey: string; recipients: string[]; amount?: AmountLike; amounts?: AmountLike[]; tokenAddress?: string; tokenDecimals?: number; hopCount?: number | number[]; hopPrivateKeys?: string[][]; items?: Array<{ to: string; amount: AmountLike; hopCount?: number; hopPrivateKeys?: string[]; }>; config: FourBundleMerkleConfig; }; /** ✅ 分发参数(仅签名版本 - 精简) */ export type DisperseSignParams = { fromPrivateKey: string; recipients: string[]; amount?: AmountLike; amounts?: AmountLike[]; tokenAddress?: string; tokenDecimals?: number; hopCount?: number | number[]; hopPrivateKeys?: string[][]; items?: Array<{ to: string; amount: AmountLike; hopCount?: number; hopPrivateKeys?: string[]; }>; config: FourSignConfig; /** ✅ 新增:起始 nonce(用于并行调用时避免 nonce 冲突) */ startNonce?: number; /** ✅ 新增:代币池子类型(用于利润报价),默认 'v2' */ tokenPoolType?: TokenPoolType; /** ✅ 新增:报价代币类型(池子的计价代币),默认 'native'(BNB/MON) */ quoteToken?: QuoteTokenType; /** ✅ 新增:用户类型(用于利润费率),v0=万分之6,v1=万分之5,默认 v0 */ userType?: UserType; }; /** * ✅ 分发结果(简化版) * 包含 hopWallets 用于返回生成的多跳钱包私钥 */ export type DisperseMerkleResult = MerkleSignedResult; /** ✅ 归集参数(Merkle 版本 - 完整) */ export type SweepMerkleParams = { sourcePrivateKeys: string[]; target: string; targetPrivateKey?: string; ratioPct?: number; ratios?: number[]; amount?: AmountLike; amounts?: AmountLike[]; tokenAddress?: string; tokenDecimals?: number; skipIfInsufficient?: boolean; hopCount?: number | number[]; hopPrivateKeys?: string[][]; sources?: Array<{ privateKey: string; ratioPct?: number; amount?: AmountLike; hopCount?: number; hopPrivateKeys?: string[]; }>; config: FourBundleMerkleConfig; }; /** ✅ 归集参数(仅签名版本 - 精简) */ export type SweepSignParams = { sourcePrivateKeys: string[]; target: string; /** ✅ 新增:归集目标地址的私钥(用于支付利润,不提供则由归集金额最大的源钱包支付) */ targetPrivateKey?: string; ratioPct?: number; ratios?: number[]; amount?: AmountLike; amounts?: AmountLike[]; tokenAddress?: string; tokenDecimals?: number; skipIfInsufficient?: boolean; hopCount?: number | number[]; hopPrivateKeys?: string[][]; sources?: Array<{ privateKey: string; ratioPct?: number; amount?: AmountLike; hopCount?: number; hopPrivateKeys?: string[]; }>; config: FourSignConfig; /** ✅ 新增:起始 nonce(用于并行调用时避免 nonce 冲突,仅对第一个源钱包生效) */ startNonce?: number; /** ✅ 新增:代币池子类型(用于利润报价),默认 'v2' */ tokenPoolType?: TokenPoolType; /** ✅ 新增:报价代币类型(池子的计价代币),默认 'native'(BNB/MON) */ quoteToken?: QuoteTokenType; /** ✅ 新增:用户类型(用于利润费率),v0=万分之6,v1=万分之5,默认 v0 */ userType?: UserType; }; /** * ✅ 归集结果(简化版) * 包含 hopWallets 用于返回生成的多跳钱包私钥 */ export type SweepMerkleResult = MerkleSignedResult; /** * 多对多(地址一一对应)转账参数(仅签名版本) * - senderPrivateKeys / receiverAddresses 必须等长 * - amount / amounts 二选一(amounts 优先) * - 支持多跳:hopCount 可为 number 或逐对数组 * - 支持利润刮取:利润由第一个 sender 支付(作为额外费用,不扣减每对转账金额) */ export type PairwiseTransferSignParams = { senderPrivateKeys: string[]; receiverAddresses: string[]; amount?: AmountLike; amounts?: AmountLike[]; tokenAddress?: string; tokenDecimals?: number; hopCount?: number | number[]; hopPrivateKeys?: string[][]; config: FourSignConfig; /** ✅ 起始 nonce(仅对第一个 sender 生效,用于并行调用避免 nonce 冲突) */ startNonce?: number; tokenPoolType?: TokenPoolType; quoteToken?: QuoteTokenType; userType?: UserType; }; export type PairwiseTransferMerkleResult = MerkleSignedResult;