four-flap-meme-sdk 1.3.93 → 1.3.94
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.
- package/dist/clients/blockrazor.js +1 -0
- package/dist/contracts/tm-bundle-merkle/config.d.ts +0 -5
- package/dist/contracts/tm-bundle-merkle/config.js +0 -10
- package/dist/contracts/tm-bundle-merkle/core.js +24 -92
- package/dist/contracts/tm-bundle-merkle/pancake-proxy.js +54 -103
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.d.ts +1 -0
- package/dist/contracts/tm-bundle-merkle/swap-buy-first.js +6 -36
- package/dist/contracts/tm-bundle-merkle/swap.d.ts +3 -0
- package/dist/contracts/tm-bundle-merkle/swap.js +6 -59
- package/dist/flap/portal-bundle-merkle/config.d.ts +0 -8
- package/dist/flap/portal-bundle-merkle/config.js +0 -17
- package/dist/flap/portal-bundle-merkle/core.js +68 -120
- package/dist/flap/portal-bundle-merkle/pancake-proxy.js +78 -136
- package/dist/flap/portal-bundle-merkle/swap-buy-first.d.ts +2 -0
- package/dist/flap/portal-bundle-merkle/swap-buy-first.js +30 -49
- package/dist/flap/portal-bundle-merkle/swap.d.ts +2 -0
- package/dist/flap/portal-bundle-merkle/swap.js +47 -75
- package/dist/flap/portal-bundle-merkle/types.d.ts +0 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/pancake/bundle-buy-first.d.ts +1 -1
- package/dist/pancake/bundle-buy-first.js +17 -49
- package/dist/pancake/bundle-swap.d.ts +4 -1
- package/dist/pancake/bundle-swap.js +33 -98
- package/dist/sol/constants.d.ts +126 -0
- package/dist/sol/constants.js +145 -0
- package/dist/sol/dex/index.d.ts +8 -0
- package/dist/sol/dex/index.js +12 -0
- package/dist/sol/dex/meteora/client.d.ts +76 -0
- package/dist/sol/dex/meteora/client.js +219 -0
- package/dist/sol/dex/meteora/damm-v1-bundle.d.ts +61 -0
- package/dist/sol/dex/meteora/damm-v1-bundle.js +112 -0
- package/dist/sol/dex/meteora/damm-v1.d.ts +118 -0
- package/dist/sol/dex/meteora/damm-v1.js +315 -0
- package/dist/sol/dex/meteora/damm-v2-bundle.d.ts +82 -0
- package/dist/sol/dex/meteora/damm-v2-bundle.js +242 -0
- package/dist/sol/dex/meteora/damm-v2.d.ts +172 -0
- package/dist/sol/dex/meteora/damm-v2.js +632 -0
- package/dist/sol/dex/meteora/dbc-bundle.d.ts +123 -0
- package/dist/sol/dex/meteora/dbc-bundle.js +304 -0
- package/dist/sol/dex/meteora/dbc.d.ts +192 -0
- package/dist/sol/dex/meteora/dbc.js +619 -0
- package/dist/sol/dex/meteora/dlmm-bundle.d.ts +39 -0
- package/dist/sol/dex/meteora/dlmm-bundle.js +189 -0
- package/dist/sol/dex/meteora/dlmm.d.ts +157 -0
- package/dist/sol/dex/meteora/dlmm.js +671 -0
- package/dist/sol/dex/meteora/index.d.ts +25 -0
- package/dist/sol/dex/meteora/index.js +65 -0
- package/dist/sol/dex/meteora/types.d.ts +787 -0
- package/dist/sol/dex/meteora/types.js +110 -0
- package/dist/sol/dex/orca/index.d.ts +10 -0
- package/dist/sol/dex/orca/index.js +16 -0
- package/dist/sol/dex/orca/orca-bundle.d.ts +41 -0
- package/dist/sol/dex/orca/orca-bundle.js +173 -0
- package/dist/sol/dex/orca/orca.d.ts +65 -0
- package/dist/sol/dex/orca/orca.js +474 -0
- package/dist/sol/dex/orca/types.d.ts +263 -0
- package/dist/sol/dex/orca/types.js +38 -0
- package/dist/sol/dex/orca/wavebreak-bundle.d.ts +34 -0
- package/dist/sol/dex/orca/wavebreak-bundle.js +198 -0
- package/dist/sol/dex/orca/wavebreak-types.d.ts +227 -0
- package/dist/sol/dex/orca/wavebreak-types.js +23 -0
- package/dist/sol/dex/orca/wavebreak.d.ts +78 -0
- package/dist/sol/dex/orca/wavebreak.js +497 -0
- package/dist/sol/dex/pump/index.d.ts +9 -0
- package/dist/sol/dex/pump/index.js +14 -0
- package/dist/sol/dex/pump/pump-bundle.d.ts +92 -0
- package/dist/sol/dex/pump/pump-bundle.js +383 -0
- package/dist/sol/dex/pump/pump-swap-bundle.d.ts +103 -0
- package/dist/sol/dex/pump/pump-swap-bundle.js +380 -0
- package/dist/sol/dex/pump/pump-swap.d.ts +46 -0
- package/dist/sol/dex/pump/pump-swap.js +199 -0
- package/dist/sol/dex/pump/pump.d.ts +35 -0
- package/dist/sol/dex/pump/pump.js +352 -0
- package/dist/sol/dex/pump/types.d.ts +215 -0
- package/dist/sol/dex/pump/types.js +5 -0
- package/dist/sol/dex/raydium/index.d.ts +8 -0
- package/dist/sol/dex/raydium/index.js +12 -0
- package/dist/sol/dex/raydium/launchlab.d.ts +68 -0
- package/dist/sol/dex/raydium/launchlab.js +210 -0
- package/dist/sol/dex/raydium/raydium-bundle.d.ts +64 -0
- package/dist/sol/dex/raydium/raydium-bundle.js +324 -0
- package/dist/sol/dex/raydium/raydium.d.ts +40 -0
- package/dist/sol/dex/raydium/raydium.js +366 -0
- package/dist/sol/dex/raydium/types.d.ts +240 -0
- package/dist/sol/dex/raydium/types.js +5 -0
- package/dist/sol/index.d.ts +10 -0
- package/dist/sol/index.js +16 -0
- package/dist/sol/jito/bundle.d.ts +90 -0
- package/dist/sol/jito/bundle.js +263 -0
- package/dist/sol/jito/index.d.ts +7 -0
- package/dist/sol/jito/index.js +7 -0
- package/dist/sol/jito/tip.d.ts +51 -0
- package/dist/sol/jito/tip.js +83 -0
- package/dist/sol/jito/types.d.ts +100 -0
- package/dist/sol/jito/types.js +5 -0
- package/dist/sol/token/create-complete.d.ts +115 -0
- package/dist/sol/token/create-complete.js +235 -0
- package/dist/sol/token/create-token.d.ts +57 -0
- package/dist/sol/token/create-token.js +230 -0
- package/dist/sol/token/index.d.ts +9 -0
- package/dist/sol/token/index.js +14 -0
- package/dist/sol/token/metadata-upload.d.ts +86 -0
- package/dist/sol/token/metadata-upload.js +173 -0
- package/dist/sol/token/metadata.d.ts +92 -0
- package/dist/sol/token/metadata.js +274 -0
- package/dist/sol/token/types.d.ts +153 -0
- package/dist/sol/token/types.js +5 -0
- package/dist/sol/types.d.ts +176 -0
- package/dist/sol/types.js +7 -0
- package/dist/sol/utils/balance.d.ts +160 -0
- package/dist/sol/utils/balance.js +638 -0
- package/dist/sol/utils/connection.d.ts +78 -0
- package/dist/sol/utils/connection.js +168 -0
- package/dist/sol/utils/index.d.ts +9 -0
- package/dist/sol/utils/index.js +9 -0
- package/dist/sol/utils/lp-inspect.d.ts +129 -0
- package/dist/sol/utils/lp-inspect.js +900 -0
- package/dist/sol/utils/transfer.d.ts +125 -0
- package/dist/sol/utils/transfer.js +220 -0
- package/dist/sol/utils/wallet.d.ts +107 -0
- package/dist/sol/utils/wallet.js +210 -0
- package/dist/utils/erc20.d.ts +2 -108
- package/dist/utils/erc20.js +17 -65
- package/package.json +39 -4
- package/dist/flap/portal-bundle-merkle/encryption.d.ts +0 -16
- package/dist/flap/portal-bundle-merkle/encryption.js +0 -146
|
@@ -99,10 +99,9 @@ async function buildSwapTransactions({ routeParams, sellAmountWei, buyAmountBNB,
|
|
|
99
99
|
);
|
|
100
100
|
return { sellUnsigned, buyUnsigned };
|
|
101
101
|
}
|
|
102
|
-
async function calculateBuyerBudget({ buyer, quotedBNBOut, reserveGasBNB, useNativeToken = true, quoteToken, quoteTokenDecimals = 18, provider }) {
|
|
102
|
+
async function calculateBuyerBudget({ buyer, quotedBNBOut, reserveGasBNB, slippageTolerance, useNativeToken = true, quoteToken, quoteTokenDecimals = 18, provider }) {
|
|
103
103
|
const reserveGas = ethers.parseEther((reserveGasBNB ?? 0.0005).toString());
|
|
104
|
-
|
|
105
|
-
const buyAmountBNB = quotedBNBOut;
|
|
104
|
+
const buyAmountBNB = applySlippage(quotedBNBOut, slippageTolerance);
|
|
106
105
|
// ✅ 根据是否使用原生代币获取不同的余额
|
|
107
106
|
let buyerBalance;
|
|
108
107
|
if (useNativeToken) {
|
|
@@ -129,46 +128,31 @@ async function calculateBuyerBudget({ buyer, quotedBNBOut, reserveGasBNB, useNat
|
|
|
129
128
|
return { buyerBalance, reserveGas, requiredBalance, buyAmountBNB, useNativeToken };
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
131
|
+
function applySlippage(amount, tolerancePercent = 0.5) {
|
|
132
|
+
if (amount === 0n) {
|
|
133
|
+
return 0n;
|
|
134
|
+
}
|
|
135
|
+
const bps = BigInt(Math.round(Math.max(0, tolerancePercent) * 100));
|
|
136
|
+
return (amount * (10000n + bps)) / 10000n;
|
|
137
|
+
}
|
|
138
|
+
async function planNonces({ seller, buyer, sameAddress, approvalExists, profitNeeded, nonceManager }) {
|
|
138
139
|
if (sameAddress) {
|
|
139
|
-
|
|
140
|
-
const txCount = countTruthy([needBribeTx, approvalExists, true, true, profitNeeded]);
|
|
140
|
+
const txCount = countTruthy([approvalExists, true, true, profitNeeded]);
|
|
141
141
|
const nonces = await nonceManager.getNextNonceBatch(buyer, txCount);
|
|
142
142
|
let idx = 0;
|
|
143
|
-
const bribeNonce = needBribeTx ? nonces[idx++] : undefined;
|
|
144
143
|
if (approvalExists)
|
|
145
144
|
idx++;
|
|
146
|
-
const sellerNonce = nonces[idx++];
|
|
147
145
|
const buyerNonce = nonces[idx++];
|
|
146
|
+
const sellerNonce = nonces[idx++];
|
|
148
147
|
const profitNonce = profitNeeded ? nonces[idx] : undefined;
|
|
149
|
-
return { sellerNonce, buyerNonce,
|
|
148
|
+
return { sellerNonce, buyerNonce, profitNonce };
|
|
150
149
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
const [sellerNonces, buyerNonce] = await Promise.all([
|
|
156
|
-
nonceManager.getNextNonceBatch(seller, sellerTxCount),
|
|
157
|
-
nonceManager.getNextNonce(buyer)
|
|
158
|
-
]);
|
|
159
|
-
let idx = 0;
|
|
160
|
-
const bribeNonce = needBribeTx ? sellerNonces[idx++] : undefined;
|
|
161
|
-
if (approvalExists)
|
|
162
|
-
idx++;
|
|
163
|
-
const sellerNonce = sellerNonces[idx++];
|
|
164
|
-
const profitNonce = profitNeeded ? sellerNonces[idx] : undefined;
|
|
165
|
-
return { sellerNonce, buyerNonce, bribeNonce, profitNonce };
|
|
150
|
+
const sellerNonce = await nonceManager.getNextNonce(seller);
|
|
151
|
+
if (profitNeeded) {
|
|
152
|
+
const [buyerNonce, profitNonce] = await nonceManager.getNextNonceBatch(buyer, 2);
|
|
153
|
+
return { sellerNonce, buyerNonce, profitNonce };
|
|
166
154
|
}
|
|
167
|
-
|
|
168
|
-
const [sellerNonce, buyerNonce] = await Promise.all([
|
|
169
|
-
nonceManager.getNextNonce(seller),
|
|
170
|
-
nonceManager.getNextNonce(buyer)
|
|
171
|
-
]);
|
|
155
|
+
const buyerNonce = await nonceManager.getNextNonce(buyer);
|
|
172
156
|
return { sellerNonce, buyerNonce };
|
|
173
157
|
}
|
|
174
158
|
async function buildProfitTransaction({ wallet, profitAmount, profitNonce, gasPrice, chainId, txType }) {
|
|
@@ -240,9 +224,6 @@ import { ethers, Contract, Wallet } from 'ethers';
|
|
|
240
224
|
import { calculateSellAmount } from '../utils/swap-helpers.js';
|
|
241
225
|
import { NonceManager } from '../utils/bundle-helpers.js';
|
|
242
226
|
import { ADDRESSES, PROFIT_CONFIG } from '../utils/constants.js';
|
|
243
|
-
// ✅ BlockRazor Builder EOA 地址(用于贿赂)
|
|
244
|
-
// 参考文档: https://blockrazor.gitbook.io/blockrazor/bsc/block-builder/send-bundle
|
|
245
|
-
const BLOCKRAZOR_BUILDER_EOA = '0x1266C6bE60392A8Ff346E8d5ECCd3E69dD9c5F20';
|
|
246
227
|
/**
|
|
247
228
|
* 获取 Gas Limit
|
|
248
229
|
*/
|
|
@@ -304,7 +285,7 @@ const ERC20_BALANCE_OF_ABI = ['function balanceOf(address) view returns (uint256
|
|
|
304
285
|
* ✅ 支持 quoteToken:传入 USDT 等地址时,卖出得到该代币,买入使用该代币
|
|
305
286
|
*/
|
|
306
287
|
export async function pancakeBundleSwapMerkle(params) {
|
|
307
|
-
const { sellerPrivateKey, sellAmount, sellPercentage, buyerPrivateKey, tokenAddress, routeParams, config, quoteToken, quoteTokenDecimals = 18 } = params;
|
|
288
|
+
const { sellerPrivateKey, sellAmount, sellPercentage, buyerPrivateKey, tokenAddress, routeParams, slippageTolerance = 0.5, config, quoteToken, quoteTokenDecimals = 18 } = params;
|
|
308
289
|
// ✅ 判断是否使用原生代币(BNB)或 ERC20 代币(如 USDT)
|
|
309
290
|
const useNativeToken = !quoteToken || quoteToken === ZERO_ADDRESS;
|
|
310
291
|
const context = createPancakeContext(config);
|
|
@@ -338,6 +319,7 @@ export async function pancakeBundleSwapMerkle(params) {
|
|
|
338
319
|
buyer,
|
|
339
320
|
quotedBNBOut: quoteResult.estimatedBNBOut,
|
|
340
321
|
reserveGasBNB: config.reserveGasBNB,
|
|
322
|
+
slippageTolerance,
|
|
341
323
|
useNativeToken,
|
|
342
324
|
quoteToken,
|
|
343
325
|
quoteTokenDecimals,
|
|
@@ -353,11 +335,6 @@ export async function pancakeBundleSwapMerkle(params) {
|
|
|
353
335
|
useNativeToken
|
|
354
336
|
});
|
|
355
337
|
const profitAmount = calculateProfitAmount(quoteResult.estimatedBNBOut);
|
|
356
|
-
// ✅ 获取贿赂金额
|
|
357
|
-
const bribeAmount = config.bribeAmount && config.bribeAmount > 0
|
|
358
|
-
? ethers.parseEther(String(config.bribeAmount))
|
|
359
|
-
: 0n;
|
|
360
|
-
const needBribeTx = bribeAmount > 0n;
|
|
361
338
|
// ✅ 使用共享的 NonceManager 规划 nonce(授权已消耗一个 nonce)
|
|
362
339
|
const noncePlan = await planNonces({
|
|
363
340
|
seller,
|
|
@@ -365,22 +342,8 @@ export async function pancakeBundleSwapMerkle(params) {
|
|
|
365
342
|
sameAddress,
|
|
366
343
|
approvalExists: !!approvalTx,
|
|
367
344
|
profitNeeded: profitAmount > 0n,
|
|
368
|
-
needBribeTx, // ✅ 新增
|
|
369
345
|
nonceManager
|
|
370
346
|
});
|
|
371
|
-
// ✅ 贿赂交易放在首位(由卖方发送,与利润交易同一钱包)
|
|
372
|
-
let bribeTx = null;
|
|
373
|
-
if (needBribeTx && noncePlan.bribeNonce !== undefined) {
|
|
374
|
-
bribeTx = await seller.signTransaction({
|
|
375
|
-
to: BLOCKRAZOR_BUILDER_EOA,
|
|
376
|
-
value: bribeAmount,
|
|
377
|
-
nonce: noncePlan.bribeNonce,
|
|
378
|
-
gasPrice,
|
|
379
|
-
gasLimit: 21000n,
|
|
380
|
-
chainId: context.chainId,
|
|
381
|
-
type: txType
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
347
|
const signedSell = await seller.signTransaction({
|
|
385
348
|
...swapUnsigned.sellUnsigned,
|
|
386
349
|
from: seller.address,
|
|
@@ -399,9 +362,8 @@ export async function pancakeBundleSwapMerkle(params) {
|
|
|
399
362
|
chainId: context.chainId,
|
|
400
363
|
type: txType
|
|
401
364
|
});
|
|
402
|
-
// ✅ 利润交易放在末尾(由卖方发送,与贿赂交易同一钱包)
|
|
403
365
|
const profitTx = await buildProfitTransaction({
|
|
404
|
-
wallet:
|
|
366
|
+
wallet: buyer,
|
|
405
367
|
profitAmount,
|
|
406
368
|
profitNonce: noncePlan.profitNonce,
|
|
407
369
|
gasPrice,
|
|
@@ -421,10 +383,7 @@ export async function pancakeBundleSwapMerkle(params) {
|
|
|
421
383
|
provider: context.provider,
|
|
422
384
|
buyerAddress: buyer.address
|
|
423
385
|
});
|
|
424
|
-
// ✅ 组装顺序:贿赂 → 授权 → 卖出 → 买入 → 利润
|
|
425
386
|
const signedTransactions = [];
|
|
426
|
-
if (bribeTx)
|
|
427
|
-
signedTransactions.push(bribeTx);
|
|
428
387
|
if (approvalTx)
|
|
429
388
|
signedTransactions.push(approvalTx);
|
|
430
389
|
signedTransactions.push(signedSell, signedBuy);
|
|
@@ -453,7 +412,7 @@ export async function pancakeBundleSwapMerkle(params) {
|
|
|
453
412
|
* 交易顺序:[授权(可选)] → [卖出] → [买入1, 买入2, ..., 买入N] → [利润]
|
|
454
413
|
*/
|
|
455
414
|
export async function pancakeBatchSwapMerkle(params) {
|
|
456
|
-
const { sellerPrivateKey, sellAmount, sellPercentage, buyerPrivateKeys, buyerAmounts, tokenAddress, routeParams, config, quoteToken, quoteTokenDecimals = 18 } = params;
|
|
415
|
+
const { sellerPrivateKey, sellAmount, sellPercentage, buyerPrivateKeys, buyerAmounts, tokenAddress, routeParams, slippageTolerance = 0.5, config, quoteToken, quoteTokenDecimals = 18 } = params;
|
|
457
416
|
// ✅ 校验买方数量(最多 24 个)
|
|
458
417
|
const MAX_BUYERS = 24;
|
|
459
418
|
if (buyerPrivateKeys.length === 0) {
|
|
@@ -492,9 +451,9 @@ export async function pancakeBatchSwapMerkle(params) {
|
|
|
492
451
|
provider: context.provider
|
|
493
452
|
});
|
|
494
453
|
const estimatedBNBOut = quoteResult.estimatedBNBOut;
|
|
495
|
-
// ✅
|
|
454
|
+
// ✅ 计算每个买方的买入金额
|
|
496
455
|
let buyAmountsWei;
|
|
497
|
-
const totalBuyAmount = estimatedBNBOut;
|
|
456
|
+
const totalBuyAmount = applySlippage(estimatedBNBOut, slippageTolerance);
|
|
498
457
|
if (buyerAmounts && buyerAmounts.length === buyers.length) {
|
|
499
458
|
// 方式1:使用指定的买入金额(USDT)
|
|
500
459
|
buyAmountsWei = buyerAmounts.map(amt => useNativeToken
|
|
@@ -572,41 +531,19 @@ export async function pancakeBatchSwapMerkle(params) {
|
|
|
572
531
|
return await proxyBuyer.swapV3MultiHop.populateTransaction(v3LpAddresses, exactTokenOut, buyAmount, 0n, buyer.address, { value: buyValue });
|
|
573
532
|
}
|
|
574
533
|
}));
|
|
575
|
-
// ✅
|
|
576
|
-
|
|
577
|
-
? ethers.parseEther(String(config.bribeAmount))
|
|
578
|
-
: 0n;
|
|
579
|
-
// ✅ 规划 Nonce(贿赂和利润都由卖方发送)
|
|
580
|
-
// 卖方: [贿赂(可选)] → [授权(可选)] → [卖出] → [利润(可选)]
|
|
581
|
-
let bribeNonce;
|
|
582
|
-
let sellNonceOffset = 0;
|
|
583
|
-
if (bribeAmount > 0n) {
|
|
584
|
-
bribeNonce = await nonceManager.getNextNonce(seller);
|
|
585
|
-
sellNonceOffset = 1; // 卖出交易 nonce 需要偏移
|
|
586
|
-
}
|
|
534
|
+
// ✅ 规划 Nonce(并行获取所有钱包的 nonce)
|
|
535
|
+
// 卖方: [授权(可选)] → [卖出]
|
|
587
536
|
const sellNonce = await nonceManager.getNextNonce(seller);
|
|
588
537
|
// ✅ 并行获取所有买方的 nonce
|
|
589
538
|
const buyerNonces = await Promise.all(buyers.map(buyer => nonceManager.getNextNonce(buyer)));
|
|
590
|
-
//
|
|
591
|
-
let bribeTx = null;
|
|
592
|
-
if (bribeAmount > 0n && bribeNonce !== undefined) {
|
|
593
|
-
bribeTx = await seller.signTransaction({
|
|
594
|
-
to: BLOCKRAZOR_BUILDER_EOA,
|
|
595
|
-
value: bribeAmount,
|
|
596
|
-
nonce: bribeNonce,
|
|
597
|
-
gasPrice,
|
|
598
|
-
gasLimit: 21000n,
|
|
599
|
-
chainId: context.chainId,
|
|
600
|
-
type: txType
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
// 利润交易放在末尾(由卖方发送,与贿赂交易一致)
|
|
539
|
+
// 利润交易:从第一个买方发送
|
|
604
540
|
const profitAmount = calculateProfitAmount(estimatedBNBOut);
|
|
605
541
|
let profitTx = null;
|
|
606
542
|
if (profitAmount > 0n) {
|
|
607
|
-
//
|
|
608
|
-
const
|
|
609
|
-
|
|
543
|
+
// 选择第一个买方作为利润支付者
|
|
544
|
+
const profitPayer = buyers[0];
|
|
545
|
+
const profitNonce = await nonceManager.getNextNonce(profitPayer);
|
|
546
|
+
profitTx = await profitPayer.signTransaction({
|
|
610
547
|
to: PROFIT_CONFIG.RECIPIENT,
|
|
611
548
|
value: profitAmount,
|
|
612
549
|
nonce: profitNonce,
|
|
@@ -643,16 +580,14 @@ export async function pancakeBatchSwapMerkle(params) {
|
|
|
643
580
|
signedSellPromise,
|
|
644
581
|
...signedBuyPromises
|
|
645
582
|
]);
|
|
646
|
-
// 4.
|
|
583
|
+
// 4. 按顺序组装交易数组
|
|
647
584
|
const signedTransactions = [];
|
|
648
|
-
if (bribeTx)
|
|
649
|
-
signedTransactions.push(bribeTx); // 贿赂(首位)
|
|
650
585
|
if (approvalTx)
|
|
651
586
|
signedTransactions.push(approvalTx); // 授权(如果有)
|
|
652
587
|
signedTransactions.push(signedSell); // 卖出
|
|
653
588
|
signedTransactions.push(...signedBuys); // 多个买入
|
|
654
589
|
if (profitTx)
|
|
655
|
-
signedTransactions.push(profitTx); //
|
|
590
|
+
signedTransactions.push(profitTx); // 利润(最后)
|
|
656
591
|
return {
|
|
657
592
|
signedTransactions,
|
|
658
593
|
metadata: {
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana SDK 常量配置
|
|
3
|
+
* @module sol/constants
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Jito 配置
|
|
7
|
+
*
|
|
8
|
+
* 注意:BLOCK_ENGINE_URL 需要由前端传入,不在 SDK 中写死
|
|
9
|
+
*/
|
|
10
|
+
export declare const JITO_CONFIG: {
|
|
11
|
+
/** Tip 账户列表(随机选择一个)- 这些是 Jito 官方账户,固定不变 */
|
|
12
|
+
readonly TIP_ACCOUNTS: readonly ["96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", "HFqU5x63VTqvQss8hp11i4bVmkzdNaVB6PYjYgNd4W5U", "Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY", "ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49", "DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh", "ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt", "DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL", "3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT"];
|
|
13
|
+
/** 最小 Tip(lamports) */
|
|
14
|
+
readonly MIN_TIP_LAMPORTS: 1000;
|
|
15
|
+
/** 默认 Tip(lamports)- 0.00001 SOL */
|
|
16
|
+
readonly DEFAULT_TIP_LAMPORTS: 10000;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Solana 系统程序地址
|
|
20
|
+
*/
|
|
21
|
+
export declare const SYSTEM_PROGRAMS: {
|
|
22
|
+
/** Token Program */
|
|
23
|
+
readonly TOKEN_PROGRAM: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
|
|
24
|
+
/** Token-2022 Program */
|
|
25
|
+
readonly TOKEN_2022_PROGRAM: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
26
|
+
/** Associated Token Account Program */
|
|
27
|
+
readonly ATA_PROGRAM: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
28
|
+
/** Metaplex Token Metadata Program */
|
|
29
|
+
readonly METADATA_PROGRAM: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
|
|
30
|
+
/** System Program */
|
|
31
|
+
readonly SYSTEM_PROGRAM: "11111111111111111111111111111111";
|
|
32
|
+
/** Rent Sysvar */
|
|
33
|
+
readonly RENT_SYSVAR: "SysvarRent111111111111111111111111111111111";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Pump.fun 程序地址
|
|
37
|
+
*/
|
|
38
|
+
export declare const PUMP_PROGRAMS: {
|
|
39
|
+
/** Pump Program ID */
|
|
40
|
+
readonly PUMP_PROGRAM: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
|
|
41
|
+
/** Pump Swap Program ID */
|
|
42
|
+
readonly PUMP_SWAP_PROGRAM: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
|
|
43
|
+
/** Global Config */
|
|
44
|
+
readonly GLOBAL_CONFIG: "4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf";
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Raydium 程序地址
|
|
48
|
+
*/
|
|
49
|
+
export declare const RAYDIUM_PROGRAMS: {
|
|
50
|
+
/** AMM Program ID */
|
|
51
|
+
readonly AMM_PROGRAM: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8";
|
|
52
|
+
/** CLMM Program ID */
|
|
53
|
+
readonly CLMM_PROGRAM: "CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK";
|
|
54
|
+
/** LaunchLab Program ID */
|
|
55
|
+
readonly LAUNCHLAB_PROGRAM: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj";
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Orca 程序地址
|
|
59
|
+
*/
|
|
60
|
+
export declare const ORCA_PROGRAMS: {
|
|
61
|
+
/** Whirlpool Program ID */
|
|
62
|
+
readonly WHIRLPOOL_PROGRAM: "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc";
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Meteora 程序地址
|
|
66
|
+
*/
|
|
67
|
+
export declare const METEORA_PROGRAMS: {
|
|
68
|
+
/** DLMM Program ID */
|
|
69
|
+
readonly DLMM_PROGRAM: "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
|
|
70
|
+
/** DAMM v2 Program ID */
|
|
71
|
+
readonly DAMM_V2_PROGRAM: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG";
|
|
72
|
+
/** DBC Program ID */
|
|
73
|
+
readonly DBC_PROGRAM: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN";
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* 常用代币地址
|
|
77
|
+
*/
|
|
78
|
+
export declare const TOKENS: {
|
|
79
|
+
/** Wrapped SOL */
|
|
80
|
+
readonly SOL: "So11111111111111111111111111111111111111112";
|
|
81
|
+
/** USDC */
|
|
82
|
+
readonly USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
|
|
83
|
+
/** USDT */
|
|
84
|
+
readonly USDT: "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB";
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* 交易默认配置
|
|
88
|
+
*/
|
|
89
|
+
export declare const TX_CONFIG: {
|
|
90
|
+
/** 默认滑点 1% */
|
|
91
|
+
readonly DEFAULT_SLIPPAGE: 1;
|
|
92
|
+
/** 最大滑点 50% */
|
|
93
|
+
readonly MAX_SLIPPAGE: 50;
|
|
94
|
+
/** 计算单元限制 */
|
|
95
|
+
readonly COMPUTE_UNIT_LIMIT: 200000;
|
|
96
|
+
/** 计算单元价格(microlamports) */
|
|
97
|
+
readonly COMPUTE_UNIT_PRICE: 50000;
|
|
98
|
+
/** 确认超时(毫秒) */
|
|
99
|
+
readonly CONFIRMATION_TIMEOUT: 60000;
|
|
100
|
+
/** 默认 commitment */
|
|
101
|
+
readonly DEFAULT_COMMITMENT: "confirmed";
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* 账户大小(用于计算租金)
|
|
105
|
+
*/
|
|
106
|
+
export declare const ACCOUNT_SIZE: {
|
|
107
|
+
/** Mint 账户大小 */
|
|
108
|
+
readonly MINT: 82;
|
|
109
|
+
/** Token 账户大小 */
|
|
110
|
+
readonly TOKEN_ACCOUNT: 165;
|
|
111
|
+
/** Metadata 账户大小(近似值) */
|
|
112
|
+
readonly METADATA: 679;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* SOL 单位换算
|
|
116
|
+
*/
|
|
117
|
+
export declare const SOL_DECIMALS = 9;
|
|
118
|
+
export declare const LAMPORTS_PER_SOL = 1000000000;
|
|
119
|
+
/**
|
|
120
|
+
* 将 SOL 转换为 lamports
|
|
121
|
+
*/
|
|
122
|
+
export declare function solToLamports(sol: number): bigint;
|
|
123
|
+
/**
|
|
124
|
+
* 将 lamports 转换为 SOL
|
|
125
|
+
*/
|
|
126
|
+
export declare function lamportsToSol(lamports: bigint): number;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana SDK 常量配置
|
|
3
|
+
* @module sol/constants
|
|
4
|
+
*/
|
|
5
|
+
// ==================== Jito Bundle 配置 ====================
|
|
6
|
+
/**
|
|
7
|
+
* Jito 配置
|
|
8
|
+
*
|
|
9
|
+
* 注意:BLOCK_ENGINE_URL 需要由前端传入,不在 SDK 中写死
|
|
10
|
+
*/
|
|
11
|
+
export const JITO_CONFIG = {
|
|
12
|
+
/** Tip 账户列表(随机选择一个)- 这些是 Jito 官方账户,固定不变 */
|
|
13
|
+
TIP_ACCOUNTS: [
|
|
14
|
+
'96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5',
|
|
15
|
+
'HFqU5x63VTqvQss8hp11i4bVmkzdNaVB6PYjYgNd4W5U',
|
|
16
|
+
'Cw8CFyM9FkoMi7K7Crf6HNQqf4uEMzpKw6QNghXLvLkY',
|
|
17
|
+
'ADaUMid9yfUytqMBgopwjb2DTLSokTSzL1zt6iGPaS49',
|
|
18
|
+
'DfXygSm4jCyNCybVYYK6DwvWqjKee8pbDmJGcLWNDXjh',
|
|
19
|
+
'ADuUkR4vqLUMWXxW9gh6D6L8pMSawimctcNZ5pGwDcEt',
|
|
20
|
+
'DttWaMuVvTiduZRnguLF7jNxTgiMBZ1hyAumKUiL2KRL',
|
|
21
|
+
'3AVi9Tg9Uo68tJfuvoKvqKNWKkC5wPdSSdeBnizKZ6jT',
|
|
22
|
+
],
|
|
23
|
+
/** 最小 Tip(lamports) */
|
|
24
|
+
MIN_TIP_LAMPORTS: 1000,
|
|
25
|
+
/** 默认 Tip(lamports)- 0.00001 SOL */
|
|
26
|
+
DEFAULT_TIP_LAMPORTS: 10000,
|
|
27
|
+
};
|
|
28
|
+
// ==================== 程序地址 ====================
|
|
29
|
+
/**
|
|
30
|
+
* Solana 系统程序地址
|
|
31
|
+
*/
|
|
32
|
+
export const SYSTEM_PROGRAMS = {
|
|
33
|
+
/** Token Program */
|
|
34
|
+
TOKEN_PROGRAM: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
|
|
35
|
+
/** Token-2022 Program */
|
|
36
|
+
TOKEN_2022_PROGRAM: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',
|
|
37
|
+
/** Associated Token Account Program */
|
|
38
|
+
ATA_PROGRAM: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL',
|
|
39
|
+
/** Metaplex Token Metadata Program */
|
|
40
|
+
METADATA_PROGRAM: 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s',
|
|
41
|
+
/** System Program */
|
|
42
|
+
SYSTEM_PROGRAM: '11111111111111111111111111111111',
|
|
43
|
+
/** Rent Sysvar */
|
|
44
|
+
RENT_SYSVAR: 'SysvarRent111111111111111111111111111111111',
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Pump.fun 程序地址
|
|
48
|
+
*/
|
|
49
|
+
export const PUMP_PROGRAMS = {
|
|
50
|
+
/** Pump Program ID */
|
|
51
|
+
PUMP_PROGRAM: '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P',
|
|
52
|
+
/** Pump Swap Program ID */
|
|
53
|
+
PUMP_SWAP_PROGRAM: 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA',
|
|
54
|
+
/** Global Config */
|
|
55
|
+
GLOBAL_CONFIG: '4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf',
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Raydium 程序地址
|
|
59
|
+
*/
|
|
60
|
+
export const RAYDIUM_PROGRAMS = {
|
|
61
|
+
/** AMM Program ID */
|
|
62
|
+
AMM_PROGRAM: '675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8',
|
|
63
|
+
/** CLMM Program ID */
|
|
64
|
+
CLMM_PROGRAM: 'CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK',
|
|
65
|
+
/** LaunchLab Program ID */
|
|
66
|
+
LAUNCHLAB_PROGRAM: 'LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj',
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Orca 程序地址
|
|
70
|
+
*/
|
|
71
|
+
export const ORCA_PROGRAMS = {
|
|
72
|
+
/** Whirlpool Program ID */
|
|
73
|
+
WHIRLPOOL_PROGRAM: 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc',
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Meteora 程序地址
|
|
77
|
+
*/
|
|
78
|
+
export const METEORA_PROGRAMS = {
|
|
79
|
+
/** DLMM Program ID */
|
|
80
|
+
DLMM_PROGRAM: 'LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo',
|
|
81
|
+
/** DAMM v2 Program ID */
|
|
82
|
+
DAMM_V2_PROGRAM: 'cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG',
|
|
83
|
+
/** DBC Program ID */
|
|
84
|
+
DBC_PROGRAM: 'dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN',
|
|
85
|
+
};
|
|
86
|
+
// ==================== 常用代币地址 ====================
|
|
87
|
+
/**
|
|
88
|
+
* 常用代币地址
|
|
89
|
+
*/
|
|
90
|
+
export const TOKENS = {
|
|
91
|
+
/** Wrapped SOL */
|
|
92
|
+
SOL: 'So11111111111111111111111111111111111111112',
|
|
93
|
+
/** USDC */
|
|
94
|
+
USDC: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
|
95
|
+
/** USDT */
|
|
96
|
+
USDT: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
|
|
97
|
+
};
|
|
98
|
+
// ==================== 交易配置 ====================
|
|
99
|
+
/**
|
|
100
|
+
* 交易默认配置
|
|
101
|
+
*/
|
|
102
|
+
export const TX_CONFIG = {
|
|
103
|
+
/** 默认滑点 1% */
|
|
104
|
+
DEFAULT_SLIPPAGE: 1,
|
|
105
|
+
/** 最大滑点 50% */
|
|
106
|
+
MAX_SLIPPAGE: 50,
|
|
107
|
+
/** 计算单元限制 */
|
|
108
|
+
COMPUTE_UNIT_LIMIT: 200000,
|
|
109
|
+
/** 计算单元价格(microlamports) */
|
|
110
|
+
COMPUTE_UNIT_PRICE: 50000,
|
|
111
|
+
/** 确认超时(毫秒) */
|
|
112
|
+
CONFIRMATION_TIMEOUT: 60000,
|
|
113
|
+
/** 默认 commitment */
|
|
114
|
+
DEFAULT_COMMITMENT: 'confirmed',
|
|
115
|
+
};
|
|
116
|
+
// ==================== 账户大小 ====================
|
|
117
|
+
/**
|
|
118
|
+
* 账户大小(用于计算租金)
|
|
119
|
+
*/
|
|
120
|
+
export const ACCOUNT_SIZE = {
|
|
121
|
+
/** Mint 账户大小 */
|
|
122
|
+
MINT: 82,
|
|
123
|
+
/** Token 账户大小 */
|
|
124
|
+
TOKEN_ACCOUNT: 165,
|
|
125
|
+
/** Metadata 账户大小(近似值) */
|
|
126
|
+
METADATA: 679,
|
|
127
|
+
};
|
|
128
|
+
// ==================== 单位换算 ====================
|
|
129
|
+
/**
|
|
130
|
+
* SOL 单位换算
|
|
131
|
+
*/
|
|
132
|
+
export const SOL_DECIMALS = 9;
|
|
133
|
+
export const LAMPORTS_PER_SOL = 1000000000;
|
|
134
|
+
/**
|
|
135
|
+
* 将 SOL 转换为 lamports
|
|
136
|
+
*/
|
|
137
|
+
export function solToLamports(sol) {
|
|
138
|
+
return BigInt(Math.floor(sol * LAMPORTS_PER_SOL));
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* 将 lamports 转换为 SOL
|
|
142
|
+
*/
|
|
143
|
+
export function lamportsToSol(lamports) {
|
|
144
|
+
return Number(lamports) / LAMPORTS_PER_SOL;
|
|
145
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meteora SDK 客户端管理器
|
|
3
|
+
*
|
|
4
|
+
* 统一管理 RPC 连接和 SDK 实例,避免重复实例化
|
|
5
|
+
*/
|
|
6
|
+
import { Connection } from '@solana/web3.js';
|
|
7
|
+
import { CpAmm } from '@meteora-ag/cp-amm-sdk';
|
|
8
|
+
import { DynamicBondingCurveClient } from '@meteora-ag/dynamic-bonding-curve-sdk';
|
|
9
|
+
/**
|
|
10
|
+
* 获取连接
|
|
11
|
+
* @param connection 可选的自定义连接
|
|
12
|
+
* @throws Error 如果没有传入连接且未设置默认连接
|
|
13
|
+
*/
|
|
14
|
+
export declare function getConnection(connection?: Connection): Connection;
|
|
15
|
+
/**
|
|
16
|
+
* 设置默认连接
|
|
17
|
+
* @param connection 新的连接实例
|
|
18
|
+
*/
|
|
19
|
+
export declare function setDefaultConnection(connection: Connection): void;
|
|
20
|
+
/**
|
|
21
|
+
* 重置默认连接
|
|
22
|
+
*/
|
|
23
|
+
export declare function resetDefaultConnection(): void;
|
|
24
|
+
/**
|
|
25
|
+
* 获取或创建 DLMM 池实例
|
|
26
|
+
* @param poolAddress 池地址
|
|
27
|
+
* @param connection 可选连接
|
|
28
|
+
* @param forceRefresh 强制刷新缓存
|
|
29
|
+
*/
|
|
30
|
+
export declare function getDlmmPool(poolAddress: string, connection?: Connection, forceRefresh?: boolean): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* 获取所有 DLMM 池列表
|
|
33
|
+
* @param connection 可选连接
|
|
34
|
+
*/
|
|
35
|
+
export declare function getAllDlmmPools(connection?: Connection): Promise<any[]>;
|
|
36
|
+
/**
|
|
37
|
+
* 清除 DLMM 池缓存
|
|
38
|
+
* @param poolAddress 可选,指定池地址;不传则清除全部
|
|
39
|
+
*/
|
|
40
|
+
export declare function clearDlmmCache(poolAddress?: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* 获取或创建 DBC 客户端
|
|
43
|
+
* @param connection 可选连接
|
|
44
|
+
*/
|
|
45
|
+
export declare function getDbcClient(connection?: Connection): DynamicBondingCurveClient;
|
|
46
|
+
/**
|
|
47
|
+
* 重置 DBC 客户端
|
|
48
|
+
*/
|
|
49
|
+
export declare function resetDbcClient(): void;
|
|
50
|
+
/**
|
|
51
|
+
* 获取或创建 DAMM v1 池实例
|
|
52
|
+
* @param poolAddress 池地址
|
|
53
|
+
* @param connection 可选连接
|
|
54
|
+
* @param forceRefresh 强制刷新缓存
|
|
55
|
+
*/
|
|
56
|
+
export declare function getDammV1Pool(poolAddress: string, connection?: Connection, forceRefresh?: boolean): Promise<any>;
|
|
57
|
+
/**
|
|
58
|
+
* 清除 DAMM v1 池缓存
|
|
59
|
+
* @param poolAddress 可选,指定池地址;不传则清除全部
|
|
60
|
+
*/
|
|
61
|
+
export declare function clearDammV1Cache(poolAddress?: string): void;
|
|
62
|
+
/**
|
|
63
|
+
* 获取或创建 DAMM v2 (CpAmm) 客户端
|
|
64
|
+
* @param connection 可选连接
|
|
65
|
+
*/
|
|
66
|
+
export declare function getCpAmmClient(connection?: Connection): CpAmm;
|
|
67
|
+
/**
|
|
68
|
+
* 重置 DAMM v2 客户端
|
|
69
|
+
*/
|
|
70
|
+
export declare function resetCpAmmClient(): void;
|
|
71
|
+
/**
|
|
72
|
+
* 清除所有 Meteora 缓存
|
|
73
|
+
*/
|
|
74
|
+
export declare function clearAllMeteoraCache(): void;
|
|
75
|
+
export declare function setCacheTtl(ttlMs: number): void;
|
|
76
|
+
export declare function getCacheTtl(): number;
|