four-flap-meme-sdk 1.3.91 → 1.3.93

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.
Files changed (127) hide show
  1. package/dist/clients/blockrazor.js +0 -1
  2. package/dist/contracts/tm-bundle-merkle/config.d.ts +5 -0
  3. package/dist/contracts/tm-bundle-merkle/config.js +10 -0
  4. package/dist/contracts/tm-bundle-merkle/core.js +92 -24
  5. package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +103 -54
  6. package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +0 -1
  7. package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +36 -6
  8. package/dist/contracts/tm-bundle-merkle/swap.d.ts +0 -3
  9. package/dist/contracts/tm-bundle-merkle/swap.js +59 -6
  10. package/dist/flap/portal-bundle-merkle/config.d.ts +8 -0
  11. package/dist/flap/portal-bundle-merkle/config.js +17 -0
  12. package/dist/flap/portal-bundle-merkle/core.js +120 -68
  13. package/dist/flap/portal-bundle-merkle/encryption.d.ts +16 -0
  14. package/dist/flap/portal-bundle-merkle/encryption.js +146 -0
  15. package/dist/flap/portal-bundle-merkle/pancake-proxy.js +136 -78
  16. package/dist/flap/portal-bundle-merkle/swap-buy-first.d.ts +0 -2
  17. package/dist/flap/portal-bundle-merkle/swap-buy-first.js +49 -30
  18. package/dist/flap/portal-bundle-merkle/swap.d.ts +0 -2
  19. package/dist/flap/portal-bundle-merkle/swap.js +75 -47
  20. package/dist/flap/portal-bundle-merkle/types.d.ts +1 -0
  21. package/dist/index.d.ts +1 -2
  22. package/dist/index.js +0 -1
  23. package/dist/pancake/bundle-buy-first.d.ts +1 -1
  24. package/dist/pancake/bundle-buy-first.js +49 -17
  25. package/dist/pancake/bundle-swap.d.ts +1 -4
  26. package/dist/pancake/bundle-swap.js +98 -33
  27. package/dist/utils/erc20.d.ts +108 -2
  28. package/dist/utils/erc20.js +65 -17
  29. package/package.json +4 -39
  30. package/dist/sol/constants.d.ts +0 -126
  31. package/dist/sol/constants.js +0 -145
  32. package/dist/sol/dex/index.d.ts +0 -8
  33. package/dist/sol/dex/index.js +0 -12
  34. package/dist/sol/dex/meteora/client.d.ts +0 -76
  35. package/dist/sol/dex/meteora/client.js +0 -219
  36. package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +0 -61
  37. package/dist/sol/dex/meteora/damm-v1-bundle.js +0 -112
  38. package/dist/sol/dex/meteora/damm-v1.d.ts +0 -118
  39. package/dist/sol/dex/meteora/damm-v1.js +0 -315
  40. package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +0 -82
  41. package/dist/sol/dex/meteora/damm-v2-bundle.js +0 -242
  42. package/dist/sol/dex/meteora/damm-v2.d.ts +0 -172
  43. package/dist/sol/dex/meteora/damm-v2.js +0 -632
  44. package/dist/sol/dex/meteora/dbc-bundle.d.ts +0 -123
  45. package/dist/sol/dex/meteora/dbc-bundle.js +0 -304
  46. package/dist/sol/dex/meteora/dbc.d.ts +0 -192
  47. package/dist/sol/dex/meteora/dbc.js +0 -619
  48. package/dist/sol/dex/meteora/dlmm-bundle.d.ts +0 -39
  49. package/dist/sol/dex/meteora/dlmm-bundle.js +0 -189
  50. package/dist/sol/dex/meteora/dlmm.d.ts +0 -146
  51. package/dist/sol/dex/meteora/dlmm.js +0 -593
  52. package/dist/sol/dex/meteora/index.d.ts +0 -25
  53. package/dist/sol/dex/meteora/index.js +0 -65
  54. package/dist/sol/dex/meteora/types.d.ts +0 -787
  55. package/dist/sol/dex/meteora/types.js +0 -110
  56. package/dist/sol/dex/orca/index.d.ts +0 -10
  57. package/dist/sol/dex/orca/index.js +0 -16
  58. package/dist/sol/dex/orca/orca-bundle.d.ts +0 -41
  59. package/dist/sol/dex/orca/orca-bundle.js +0 -173
  60. package/dist/sol/dex/orca/orca.d.ts +0 -65
  61. package/dist/sol/dex/orca/orca.js +0 -474
  62. package/dist/sol/dex/orca/types.d.ts +0 -263
  63. package/dist/sol/dex/orca/types.js +0 -38
  64. package/dist/sol/dex/orca/wavebreak-bundle.d.ts +0 -34
  65. package/dist/sol/dex/orca/wavebreak-bundle.js +0 -198
  66. package/dist/sol/dex/orca/wavebreak-types.d.ts +0 -227
  67. package/dist/sol/dex/orca/wavebreak-types.js +0 -23
  68. package/dist/sol/dex/orca/wavebreak.d.ts +0 -78
  69. package/dist/sol/dex/orca/wavebreak.js +0 -497
  70. package/dist/sol/dex/pump/index.d.ts +0 -9
  71. package/dist/sol/dex/pump/index.js +0 -14
  72. package/dist/sol/dex/pump/pump-bundle.d.ts +0 -92
  73. package/dist/sol/dex/pump/pump-bundle.js +0 -383
  74. package/dist/sol/dex/pump/pump-swap-bundle.d.ts +0 -103
  75. package/dist/sol/dex/pump/pump-swap-bundle.js +0 -380
  76. package/dist/sol/dex/pump/pump-swap.d.ts +0 -46
  77. package/dist/sol/dex/pump/pump-swap.js +0 -199
  78. package/dist/sol/dex/pump/pump.d.ts +0 -35
  79. package/dist/sol/dex/pump/pump.js +0 -352
  80. package/dist/sol/dex/pump/types.d.ts +0 -215
  81. package/dist/sol/dex/pump/types.js +0 -5
  82. package/dist/sol/dex/raydium/index.d.ts +0 -8
  83. package/dist/sol/dex/raydium/index.js +0 -12
  84. package/dist/sol/dex/raydium/launchlab.d.ts +0 -68
  85. package/dist/sol/dex/raydium/launchlab.js +0 -210
  86. package/dist/sol/dex/raydium/raydium-bundle.d.ts +0 -64
  87. package/dist/sol/dex/raydium/raydium-bundle.js +0 -324
  88. package/dist/sol/dex/raydium/raydium.d.ts +0 -40
  89. package/dist/sol/dex/raydium/raydium.js +0 -366
  90. package/dist/sol/dex/raydium/types.d.ts +0 -240
  91. package/dist/sol/dex/raydium/types.js +0 -5
  92. package/dist/sol/index.d.ts +0 -10
  93. package/dist/sol/index.js +0 -16
  94. package/dist/sol/jito/bundle.d.ts +0 -90
  95. package/dist/sol/jito/bundle.js +0 -263
  96. package/dist/sol/jito/index.d.ts +0 -7
  97. package/dist/sol/jito/index.js +0 -7
  98. package/dist/sol/jito/tip.d.ts +0 -51
  99. package/dist/sol/jito/tip.js +0 -83
  100. package/dist/sol/jito/types.d.ts +0 -100
  101. package/dist/sol/jito/types.js +0 -5
  102. package/dist/sol/token/create-complete.d.ts +0 -115
  103. package/dist/sol/token/create-complete.js +0 -235
  104. package/dist/sol/token/create-token.d.ts +0 -57
  105. package/dist/sol/token/create-token.js +0 -230
  106. package/dist/sol/token/index.d.ts +0 -9
  107. package/dist/sol/token/index.js +0 -14
  108. package/dist/sol/token/metadata-upload.d.ts +0 -86
  109. package/dist/sol/token/metadata-upload.js +0 -173
  110. package/dist/sol/token/metadata.d.ts +0 -92
  111. package/dist/sol/token/metadata.js +0 -274
  112. package/dist/sol/token/types.d.ts +0 -153
  113. package/dist/sol/token/types.js +0 -5
  114. package/dist/sol/types.d.ts +0 -176
  115. package/dist/sol/types.js +0 -7
  116. package/dist/sol/utils/balance.d.ts +0 -160
  117. package/dist/sol/utils/balance.js +0 -638
  118. package/dist/sol/utils/connection.d.ts +0 -78
  119. package/dist/sol/utils/connection.js +0 -168
  120. package/dist/sol/utils/index.d.ts +0 -9
  121. package/dist/sol/utils/index.js +0 -9
  122. package/dist/sol/utils/lp-inspect.d.ts +0 -129
  123. package/dist/sol/utils/lp-inspect.js +0 -529
  124. package/dist/sol/utils/transfer.d.ts +0 -125
  125. package/dist/sol/utils/transfer.js +0 -220
  126. package/dist/sol/utils/wallet.d.ts +0 -107
  127. package/dist/sol/utils/wallet.js +0 -210
@@ -1,189 +0,0 @@
1
- /**
2
- * Meteora DLMM Bundle 批量交易
3
- *
4
- * 支持 Jito Bundle 的批量买卖
5
- */
6
- import BN from 'bn.js';
7
- import { getConnection, getDlmmPool } from './client.js';
8
- import { buildTipInstruction } from '../../jito/tip.js';
9
- // ============================================================================
10
- // Bundle 批量买入
11
- // ============================================================================
12
- /**
13
- * 签名 DLMM Bundle 批量买入交易
14
- *
15
- * @param params Bundle 参数
16
- * @param connection 可选连接
17
- */
18
- export async function signDlmmBundleBuy(params, connection) {
19
- const conn = getConnection(connection);
20
- const dlmmPool = await getDlmmPool(params.poolAddress, connection);
21
- const signedTransactions = [];
22
- // 确定交易方向 - 买入代币 = 用 Y 换 X
23
- const swapForY = false;
24
- // 获取 bin arrays
25
- const binArrays = await dlmmPool.getBinArrayForSwap(swapForY);
26
- const binArraysPubkey = binArrays.map((ba) => ba.publicKey);
27
- // 为每个钱包构建交易
28
- for (let i = 0; i < params.trades.length; i++) {
29
- const trade = params.trades[i];
30
- // 获取报价
31
- const quote = dlmmPool.swapQuote(trade.amountIn, swapForY, new BN(params.slippageBps || 100), binArrays);
32
- const minAmountOut = trade.minAmountOut || quote.minOutAmount;
33
- // 构建 Swap 交易
34
- const swapTx = await dlmmPool.swap({
35
- inToken: dlmmPool.tokenY.publicKey,
36
- binArraysPubkey,
37
- inAmount: trade.amountIn,
38
- lbPair: dlmmPool.pubkey,
39
- user: trade.wallet.publicKey,
40
- minOutAmount: minAmountOut,
41
- outToken: dlmmPool.tokenX.publicKey,
42
- });
43
- // 如果是最后一笔交易,添加 Jito tip
44
- if (i === params.trades.length - 1 && params.jitoTipLamports) {
45
- const tipIx = buildTipInstruction(trade.wallet.publicKey, BigInt(params.jitoTipLamports));
46
- swapTx.add(tipIx);
47
- }
48
- // 设置 blockhash
49
- const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash();
50
- swapTx.recentBlockhash = blockhash;
51
- swapTx.lastValidBlockHeight = lastValidBlockHeight;
52
- swapTx.feePayer = trade.wallet.publicKey;
53
- // 签名
54
- swapTx.sign(trade.wallet);
55
- signedTransactions.push(swapTx);
56
- }
57
- return {
58
- signedTransactions,
59
- type: 'dlmm_bundle_buy',
60
- poolAddress: params.poolAddress,
61
- tradeCount: params.trades.length,
62
- jitoTipLamports: params.jitoTipLamports || 0,
63
- };
64
- }
65
- // ============================================================================
66
- // Bundle 批量卖出
67
- // ============================================================================
68
- /**
69
- * 签名 DLMM Bundle 批量卖出交易
70
- *
71
- * @param params Bundle 参数
72
- * @param connection 可选连接
73
- */
74
- export async function signDlmmBundleSell(params, connection) {
75
- const conn = getConnection(connection);
76
- const dlmmPool = await getDlmmPool(params.poolAddress, connection);
77
- const signedTransactions = [];
78
- // 确定交易方向 - 卖出代币 = 用 X 换 Y
79
- const swapForY = true;
80
- // 获取 bin arrays
81
- const binArrays = await dlmmPool.getBinArrayForSwap(swapForY);
82
- const binArraysPubkey = binArrays.map((ba) => ba.publicKey);
83
- // 为每个钱包构建交易
84
- for (let i = 0; i < params.trades.length; i++) {
85
- const trade = params.trades[i];
86
- // 获取报价
87
- const quote = dlmmPool.swapQuote(trade.amountIn, swapForY, new BN(params.slippageBps || 100), binArrays);
88
- const minAmountOut = trade.minAmountOut || quote.minOutAmount;
89
- // 构建 Swap 交易
90
- const swapTx = await dlmmPool.swap({
91
- inToken: dlmmPool.tokenX.publicKey,
92
- binArraysPubkey,
93
- inAmount: trade.amountIn,
94
- lbPair: dlmmPool.pubkey,
95
- user: trade.wallet.publicKey,
96
- minOutAmount: minAmountOut,
97
- outToken: dlmmPool.tokenY.publicKey,
98
- });
99
- // 如果是最后一笔交易,添加 Jito tip
100
- if (i === params.trades.length - 1 && params.jitoTipLamports) {
101
- const tipIx = buildTipInstruction(trade.wallet.publicKey, BigInt(params.jitoTipLamports));
102
- swapTx.add(tipIx);
103
- }
104
- // 设置 blockhash
105
- const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash();
106
- swapTx.recentBlockhash = blockhash;
107
- swapTx.lastValidBlockHeight = lastValidBlockHeight;
108
- swapTx.feePayer = trade.wallet.publicKey;
109
- // 签名
110
- swapTx.sign(trade.wallet);
111
- signedTransactions.push(swapTx);
112
- }
113
- return {
114
- signedTransactions,
115
- type: 'dlmm_bundle_sell',
116
- poolAddress: params.poolAddress,
117
- tradeCount: params.trades.length,
118
- jitoTipLamports: params.jitoTipLamports || 0,
119
- };
120
- }
121
- // ============================================================================
122
- // Bundle 通用 Swap
123
- // ============================================================================
124
- /**
125
- * 签名 DLMM Bundle 通用 Swap 交易
126
- *
127
- * @param params Bundle 参数
128
- * @param swapForY 是否用 X 换 Y (true = 卖出, false = 买入)
129
- * @param connection 可选连接
130
- */
131
- export async function signDlmmBundleSwap(params, swapForY, connection) {
132
- const conn = getConnection(connection);
133
- const dlmmPool = await getDlmmPool(params.poolAddress, connection);
134
- const signedTransactions = [];
135
- // 获取 bin arrays
136
- const binArrays = await dlmmPool.getBinArrayForSwap(swapForY);
137
- const binArraysPubkey = binArrays.map((ba) => ba.publicKey);
138
- const inToken = swapForY ? dlmmPool.tokenX.publicKey : dlmmPool.tokenY.publicKey;
139
- const outToken = swapForY ? dlmmPool.tokenY.publicKey : dlmmPool.tokenX.publicKey;
140
- // 为每个钱包构建交易
141
- for (let i = 0; i < params.trades.length; i++) {
142
- const trade = params.trades[i];
143
- // 获取报价
144
- const quote = dlmmPool.swapQuote(trade.amountIn, swapForY, new BN(params.slippageBps || 100), binArrays);
145
- const minAmountOut = trade.minAmountOut || quote.minOutAmount;
146
- // 构建 Swap 交易
147
- const swapTx = await dlmmPool.swap({
148
- inToken,
149
- binArraysPubkey,
150
- inAmount: trade.amountIn,
151
- lbPair: dlmmPool.pubkey,
152
- user: trade.wallet.publicKey,
153
- minOutAmount: minAmountOut,
154
- outToken,
155
- });
156
- // 如果是最后一笔交易,添加 Jito tip
157
- if (i === params.trades.length - 1 && params.jitoTipLamports) {
158
- const tipIx = buildTipInstruction(trade.wallet.publicKey, BigInt(params.jitoTipLamports));
159
- swapTx.add(tipIx);
160
- }
161
- // 设置 blockhash
162
- const { blockhash, lastValidBlockHeight } = await conn.getLatestBlockhash();
163
- swapTx.recentBlockhash = blockhash;
164
- swapTx.lastValidBlockHeight = lastValidBlockHeight;
165
- swapTx.feePayer = trade.wallet.publicKey;
166
- // 签名
167
- swapTx.sign(trade.wallet);
168
- signedTransactions.push(swapTx);
169
- }
170
- return {
171
- signedTransactions,
172
- type: swapForY ? 'dlmm_bundle_sell' : 'dlmm_bundle_buy',
173
- poolAddress: params.poolAddress,
174
- tradeCount: params.trades.length,
175
- jitoTipLamports: params.jitoTipLamports || 0,
176
- };
177
- }
178
- /**
179
- * 将 Bundle 结果转换为后端 API 请求格式
180
- */
181
- export function toDlmmBundleApiRequest(result) {
182
- return {
183
- transactions: result.signedTransactions.map((tx) => tx.serialize().toString('base64')),
184
- type: result.type,
185
- poolAddress: result.poolAddress,
186
- tradeCount: result.tradeCount,
187
- jitoTipLamports: result.jitoTipLamports,
188
- };
189
- }
@@ -1,146 +0,0 @@
1
- /**
2
- * Meteora DLMM (Dynamic Liquidity Market Maker) 集成
3
- *
4
- * 基于 https://github.com/MeteoraAg/dlmm-sdk 源码分析
5
- * DLMM 是 Meteora 的集中流动性池,类似于 Uniswap V3
6
- */
7
- import { Connection, Keypair, Transaction } from '@solana/web3.js';
8
- import BN from 'bn.js';
9
- import type { DlmmPoolInfo, DlmmSwapParams, DlmmAddLiquidityParams, DlmmRemoveLiquidityParams, MeteoraSignedResult } from './types.js';
10
- /**
11
- * 获取 DLMM 池信息
12
- * @param poolAddress 池地址
13
- * @param connection 可选连接
14
- */
15
- export declare function getDlmmPoolInfo(poolAddress: string, connection?: Connection): Promise<DlmmPoolInfo>;
16
- /**
17
- * 通过 Token Mint 查找 DLMM 池
18
- * @param tokenXMint Token X Mint 地址
19
- * @param tokenYMint Token Y Mint 地址
20
- * @param connection 可选连接
21
- */
22
- export declare function findDlmmPool(tokenXMint: string, tokenYMint: string, connection?: Connection): Promise<string | null>;
23
- /**
24
- * 签名 DLMM Swap 交易
25
- * @param params Swap 参数
26
- * @param wallet 钱包
27
- * @param connection 可选连接
28
- */
29
- export declare function signDlmmSwap(params: DlmmSwapParams, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
30
- /**
31
- * 签名 DLMM 添加流动性交易
32
- * @param params 添加流动性参数
33
- * @param wallet 钱包
34
- * @param positionKeypair 仓位 Keypair(如果创建新仓位)
35
- * @param connection 可选连接
36
- */
37
- export declare function signDlmmAddLiquidity(params: DlmmAddLiquidityParams, wallet: Keypair, positionKeypair?: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
38
- /**
39
- * 签名 DLMM 移除流动性交易
40
- * @param params 移除流动性参数
41
- * @param wallet 钱包
42
- * @param connection 可选连接
43
- */
44
- export declare function signDlmmRemoveLiquidity(params: DlmmRemoveLiquidityParams, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult & {
45
- signedTransactions?: Transaction[];
46
- }>;
47
- /**
48
- * 签名创建 DLMM 池交易
49
- * @param tokenXMint Token X Mint 地址
50
- * @param tokenYMint Token Y Mint 地址
51
- * @param binStep Bin Step
52
- * @param activeId 初始活跃 Bin ID
53
- * @param feeBps 费率 (bps)
54
- * @param wallet 钱包
55
- * @param connection 可选连接
56
- */
57
- export declare function signDlmmCreatePool(tokenXMint: string, tokenYMint: string, binStep: number, activeId: number, feeBps: number, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
58
- /**
59
- * 签名领取 DLMM 手续费交易
60
- * @param poolAddress 池地址
61
- * @param positionAddress 仓位地址
62
- * @param wallet 钱包
63
- * @param connection 可选连接
64
- */
65
- export declare function signDlmmClaimFees(poolAddress: string, positionAddress: string, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
66
- /**
67
- * 获取用户在池中的所有仓位
68
- * @param poolAddress 池地址
69
- * @param userAddress 用户地址
70
- * @param connection 可选连接
71
- */
72
- export declare function getDlmmUserPositions(poolAddress: string, userAddress: string, connection?: Connection): Promise<any[]>;
73
- /**
74
- * 获取 DLMM Swap 报价
75
- * @param poolAddress 池地址
76
- * @param amountIn 输入金额
77
- * @param swapYtoX 是否从 Y 交换到 X
78
- * @param slippageBps 滑点 (bps)
79
- * @param connection 可选连接
80
- */
81
- export declare function getDlmmSwapQuote(poolAddress: string, amountIn: BN, swapYtoX: boolean, slippageBps?: number, connection?: Connection): Promise<{
82
- consumedInAmount: string;
83
- outAmount: string;
84
- minOutAmount: string;
85
- fee: string;
86
- priceImpact: string;
87
- }>;
88
- /**
89
- * 签名 DLMM Swap Exact Out 交易 (指定输出金额)
90
- * @param poolAddress 池地址
91
- * @param amountOut 期望输出金额
92
- * @param inputMint 输入代币 Mint
93
- * @param maxAmountIn 最大输入金额
94
- * @param wallet 钱包
95
- * @param connection 可选连接
96
- */
97
- export declare function signDlmmSwapExactOut(poolAddress: string, amountOut: BN, inputMint: string, maxAmountIn: BN, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
98
- /**
99
- * 签名领取 DLMM 所有奖励交易
100
- * @param poolAddress 池地址
101
- * @param positionAddresses 仓位地址列表
102
- * @param wallet 钱包
103
- * @param connection 可选连接
104
- */
105
- export declare function signDlmmClaimAllRewards(poolAddress: string, positionAddresses: string[], wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
106
- /**
107
- * 签名关闭 DLMM 仓位交易
108
- * @param poolAddress 池地址
109
- * @param positionAddress 仓位地址
110
- * @param wallet 钱包
111
- * @param connection 可选连接
112
- */
113
- export declare function signDlmmClosePosition(poolAddress: string, positionAddress: string, wallet: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
114
- /**
115
- * 签名创建空的 DLMM 仓位交易
116
- * @param poolAddress 池地址
117
- * @param wallet 钱包
118
- * @param positionKeypair 仓位 Keypair
119
- * @param connection 可选连接
120
- */
121
- export declare function signDlmmCreateEmptyPosition(poolAddress: string, wallet: Keypair, positionKeypair: Keypair, connection?: Connection): Promise<MeteoraSignedResult>;
122
- /**
123
- * 获取用户在所有 DLMM 池中的仓位
124
- * @param userAddress 用户地址
125
- * @param connection 可选连接
126
- */
127
- export declare function getAllDlmmUserPositions(userAddress: string, connection?: Connection): Promise<{
128
- poolAddress: string;
129
- positions: any[];
130
- }[]>;
131
- /**
132
- * 计算 Bin ID 对应的价格
133
- * @param binId Bin ID
134
- * @param binStep Bin Step
135
- * @param tokenXDecimals Token X 精度
136
- * @param tokenYDecimals Token Y 精度
137
- */
138
- export declare function calculatePriceFromBinId(binId: number, binStep: number, tokenXDecimals: number, tokenYDecimals: number): number;
139
- /**
140
- * 计算价格对应的 Bin ID
141
- * @param price 价格
142
- * @param binStep Bin Step
143
- * @param tokenXDecimals Token X 精度
144
- * @param tokenYDecimals Token Y 精度
145
- */
146
- export declare function calculateBinIdFromPrice(price: number, binStep: number, tokenXDecimals: number, tokenYDecimals: number): number;