four-flap-meme-sdk 1.3.73 → 1.3.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,3 +8,4 @@ export { createTokenWithBundleBuyMerkle, batchBuyWithBundleMerkle, batchSellWith
8
8
  export { flapBundleBuyFirstMerkle, type FlapChain, type FlapBuyFirstSignConfig, type FlapBuyFirstConfig, type FlapBundleBuyFirstSignParams, type FlapBundleBuyFirstParams, type FlapBuyFirstResult } from './swap-buy-first.js';
9
9
  export { flapPrivateBuyMerkle, flapPrivateSellMerkle, flapBatchPrivateBuyMerkle, flapBatchPrivateSellMerkle } from './private.js';
10
10
  export { pancakeProxyBatchBuyMerkle, pancakeProxyBatchSellMerkle, approvePancakeProxy, approvePancakeProxyBatch } from './pancake-proxy.js';
11
+ export { flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle, type FlapDisperseSignParams, type FlapDisperseMerkleResult, type FlapSweepSignParams, type FlapSweepMerkleResult } from './utils.js';
@@ -13,3 +13,5 @@ export { flapBundleBuyFirstMerkle } from './swap-buy-first.js';
13
13
  export { flapPrivateBuyMerkle, flapPrivateSellMerkle, flapBatchPrivateBuyMerkle, flapBatchPrivateSellMerkle } from './private.js';
14
14
  // PancakeSwapProxy 代理交易方法(使用自定义代理合约)
15
15
  export { pancakeProxyBatchBuyMerkle, pancakeProxyBatchSellMerkle, approvePancakeProxy, approvePancakeProxyBatch } from './pancake-proxy.js';
16
+ // ✅ 归集和分散方法(支持利润提取、余额最大钱包支付、多跳、ERC20→原生代币报价、Multicall3)
17
+ export { flapDisperseWithBundleMerkle, flapSweepWithBundleMerkle } from './utils.js';
@@ -0,0 +1,88 @@
1
+ import type { FlapSignConfig } from './types.js';
2
+ /** 分散参数 */
3
+ export type FlapDisperseSignParams = {
4
+ chain: 'BSC' | 'MONAD' | 'XLAYER';
5
+ fromPrivateKey: string;
6
+ recipients: string[];
7
+ amount?: string;
8
+ amounts?: string[];
9
+ tokenAddress?: string;
10
+ tokenDecimals?: number;
11
+ hopCount?: number | number[];
12
+ hopPrivateKeys?: string[][];
13
+ items?: {
14
+ recipient: string;
15
+ amount: string | bigint;
16
+ hopCount?: number;
17
+ hopPrivateKeys?: string[];
18
+ }[];
19
+ config: FlapSignConfig;
20
+ startNonce?: number;
21
+ };
22
+ /** 分散结果 */
23
+ export type FlapDisperseMerkleResult = {
24
+ signedTransactions: string[];
25
+ hopWallets?: string[][];
26
+ metadata?: {
27
+ totalAmount: string;
28
+ profitAmount: string;
29
+ profitRecipient: string;
30
+ recipientCount: number;
31
+ isNative: boolean;
32
+ tokenAddress?: string;
33
+ };
34
+ };
35
+ /** 归集参数 */
36
+ export type FlapSweepSignParams = {
37
+ chain: 'BSC' | 'MONAD' | 'XLAYER';
38
+ sourcePrivateKeys: string[];
39
+ target: string;
40
+ ratioPct?: number;
41
+ ratios?: number[];
42
+ amount?: string;
43
+ amounts?: string[];
44
+ tokenAddress?: string;
45
+ tokenDecimals?: number;
46
+ skipIfInsufficient?: boolean;
47
+ hopCount?: number | number[];
48
+ hopPrivateKeys?: string[][];
49
+ sources?: {
50
+ privateKey: string;
51
+ ratioPct?: number;
52
+ amount?: string;
53
+ hopCount?: number;
54
+ hopPrivateKeys?: string[];
55
+ }[];
56
+ config: FlapSignConfig;
57
+ startNonce?: number;
58
+ };
59
+ /** 归集结果 */
60
+ export type FlapSweepMerkleResult = {
61
+ signedTransactions: string[];
62
+ hopWallets?: string[][];
63
+ metadata?: {
64
+ totalAmount: string;
65
+ profitAmount: string;
66
+ profitRecipient: string;
67
+ sourceCount: number;
68
+ isNative: boolean;
69
+ tokenAddress?: string;
70
+ };
71
+ };
72
+ /**
73
+ * Flap Protocol: 分散(仅签名版本)
74
+ * ✅ 支持利润提取
75
+ * ✅ 支持多跳
76
+ * ✅ 支持 ERC20→原生代币报价
77
+ * ✅ 支持 Multicall3 批量获取余额
78
+ */
79
+ export declare function flapDisperseWithBundleMerkle(params: FlapDisperseSignParams): Promise<FlapDisperseMerkleResult>;
80
+ /**
81
+ * Flap Protocol: 归集(仅签名版本)
82
+ * ✅ 支持利润提取
83
+ * ✅ 查询余额最大的钱包支付利润
84
+ * ✅ 支持多跳
85
+ * ✅ 支持 ERC20→原生代币报价
86
+ * ✅ 支持 Multicall3 批量获取余额
87
+ */
88
+ export declare function flapSweepWithBundleMerkle(params: FlapSweepSignParams): Promise<FlapSweepMerkleResult>;