@meteora-ag/dlmm 1.9.11 → 1.9.12
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/index.d.ts +8 -9
- package/dist/index.js +120 -128
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10165,6 +10165,9 @@ var POSITION_MAX_LENGTH = new (0, _anchor.BN)(
|
|
|
10165
10165
|
var MAX_RESIZE_LENGTH = new (0, _anchor.BN)(
|
|
10166
10166
|
_nullishCoalesce(_optionalChain([CONSTANTS, 'access', _22 => _22.find, 'call', _23 => _23(([_, v]) => v.name == "MAX_RESIZE_LENGTH"), 'optionalAccess', _24 => _24[1], 'access', _25 => _25.value]), () => ( 0))
|
|
10167
10167
|
);
|
|
10168
|
+
var MAX_BIN_ID_PER_BIN_STEP = Number(
|
|
10169
|
+
_nullishCoalesce(_optionalChain([CONSTANTS, 'access', _26 => _26.find, 'call', _27 => _27(([_, v]) => v.name == "MAX_BIN_ID_PER_BIN_STEP"), 'optionalAccess', _28 => _28[1], 'access', _29 => _29.value]), () => ( 0))
|
|
10170
|
+
);
|
|
10168
10171
|
var SIMULATION_USER = new (0, _web3js.PublicKey)(
|
|
10169
10172
|
"HrY9qR5TiB2xPzzvbBu5KrBorMfYGQXh9osXydz4jy9s"
|
|
10170
10173
|
);
|
|
@@ -10178,13 +10181,13 @@ var ILM_BASE = new (0, _web3js.PublicKey)(
|
|
|
10178
10181
|
var MAX_EXTRA_BIN_ARRAYS = 3;
|
|
10179
10182
|
var U64_MAX = new (0, _anchor.BN)("18446744073709551615");
|
|
10180
10183
|
var MAX_BINS_PER_POSITION = new (0, _anchor.BN)(
|
|
10181
|
-
_nullishCoalesce(_optionalChain([CONSTANTS, 'access',
|
|
10184
|
+
_nullishCoalesce(_optionalChain([CONSTANTS, 'access', _30 => _30.find, 'call', _31 => _31(([_, v]) => v.name == "POSITION_MAX_LENGTH"), 'optionalAccess', _32 => _32[1], 'access', _33 => _33.value]), () => ( 0))
|
|
10182
10185
|
);
|
|
10183
10186
|
var MAX_BIN_PER_LIMIT_ORDER = new (0, _anchor.BN)(
|
|
10184
|
-
_nullishCoalesce(_optionalChain([CONSTANTS, 'access',
|
|
10187
|
+
_nullishCoalesce(_optionalChain([CONSTANTS, 'access', _34 => _34.find, 'call', _35 => _35(([_, v]) => v.name == "MAX_BIN_PER_LIMIT_ORDER"), 'optionalAccess', _36 => _36[1], 'access', _37 => _37.value]), () => ( 0))
|
|
10185
10188
|
);
|
|
10186
10189
|
var LIMIT_ORDER_FEE_SHARE = new (0, _anchor.BN)(
|
|
10187
|
-
_nullishCoalesce(_optionalChain([CONSTANTS, 'access',
|
|
10190
|
+
_nullishCoalesce(_optionalChain([CONSTANTS, 'access', _38 => _38.find, 'call', _39 => _39(([_, v]) => v.name == "LIMIT_ORDER_FEE_SHARE"), 'optionalAccess', _40 => _40[1], 'access', _41 => _41.value]), () => ( 0))
|
|
10188
10191
|
);
|
|
10189
10192
|
var FunctionType = /* @__PURE__ */ ((FunctionType2) => {
|
|
10190
10193
|
FunctionType2[FunctionType2["Undetermined"] = 0] = "Undetermined";
|
|
@@ -10202,7 +10205,6 @@ var CollectFeeMode = /* @__PURE__ */ ((CollectFeeMode2) => {
|
|
|
10202
10205
|
CollectFeeMode2[CollectFeeMode2["OnlyY"] = 1] = "OnlyY";
|
|
10203
10206
|
return CollectFeeMode2;
|
|
10204
10207
|
})(CollectFeeMode || {});
|
|
10205
|
-
var MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT = 5;
|
|
10206
10208
|
|
|
10207
10209
|
// src/dlmm/error.ts
|
|
10208
10210
|
|
|
@@ -10218,7 +10220,7 @@ var DLMMError = class extends Error {
|
|
|
10218
10220
|
const anchorError = _anchor.AnchorError.parse(
|
|
10219
10221
|
JSON.parse(JSON.stringify(error)).logs
|
|
10220
10222
|
);
|
|
10221
|
-
if (_optionalChain([anchorError, 'optionalAccess',
|
|
10223
|
+
if (_optionalChain([anchorError, 'optionalAccess', _42 => _42.program, 'access', _43 => _43.toBase58, 'call', _44 => _44()]) === LBCLMM_PROGRAM_IDS["mainnet-beta"]) {
|
|
10222
10224
|
_errorCode = anchorError.error.errorCode.number;
|
|
10223
10225
|
_errorName = anchorError.error.errorCode.code;
|
|
10224
10226
|
_errorMessage = anchorError.error.errorMessage;
|
|
@@ -12201,11 +12203,11 @@ var getSimulationComputeUnits = async (connection, instructions, payer, lookupTa
|
|
|
12201
12203
|
sigVerify: false,
|
|
12202
12204
|
commitment
|
|
12203
12205
|
});
|
|
12204
|
-
if (_optionalChain([rpcResponse, 'optionalAccess',
|
|
12205
|
-
const logs = _optionalChain([rpcResponse, 'access',
|
|
12206
|
+
if (_optionalChain([rpcResponse, 'optionalAccess', _45 => _45.value, 'optionalAccess', _46 => _46.err])) {
|
|
12207
|
+
const logs = _optionalChain([rpcResponse, 'access', _47 => _47.value, 'access', _48 => _48.logs, 'optionalAccess', _49 => _49.join, 'call', _50 => _50("\n \u2022 ")]) || "No logs available";
|
|
12206
12208
|
throw new Error(
|
|
12207
12209
|
`Transaction simulation failed:
|
|
12208
|
-
\u2022${logs}` + JSON.stringify(_optionalChain([rpcResponse, 'optionalAccess',
|
|
12210
|
+
\u2022${logs}` + JSON.stringify(_optionalChain([rpcResponse, 'optionalAccess', _51 => _51.value, 'optionalAccess', _52 => _52.err]))
|
|
12209
12211
|
);
|
|
12210
12212
|
}
|
|
12211
12213
|
return rpcResponse.value.unitsConsumed || null;
|
|
@@ -13273,7 +13275,7 @@ function binRangeToBinIdArray(minBinId, maxBinId) {
|
|
|
13273
13275
|
}
|
|
13274
13276
|
return binIdArray;
|
|
13275
13277
|
}
|
|
13276
|
-
function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, pairAddress, programId
|
|
13278
|
+
function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, pairAddress, programId) {
|
|
13277
13279
|
let indexMap = /* @__PURE__ */ new Map();
|
|
13278
13280
|
removes.forEach((value) => {
|
|
13279
13281
|
let minBinId = value.minBinId;
|
|
@@ -13299,13 +13301,10 @@ function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, p
|
|
|
13299
13301
|
adds.forEach((value) => {
|
|
13300
13302
|
const minBinId = activeId + value.minDeltaId;
|
|
13301
13303
|
const maxBinId = activeId + value.maxDeltaId;
|
|
13302
|
-
let binArrayIndex = binIdToBinArrayIndex(
|
|
13303
|
-
|
|
13304
|
-
);
|
|
13305
|
-
let binArrayIndexes2 = [];
|
|
13306
|
-
const upperBinId = includeSlippageForBinArray ? new (0, _bnjs2.default)(maxBinId + maxActiveBinSlippage) : new (0, _bnjs2.default)(maxBinId);
|
|
13304
|
+
let binArrayIndex = binIdToBinArrayIndex(new (0, _bnjs2.default)(minBinId));
|
|
13305
|
+
const upperBinId = new (0, _bnjs2.default)(maxBinId);
|
|
13307
13306
|
while (true) {
|
|
13308
|
-
|
|
13307
|
+
indexMap.set(binArrayIndex.toNumber(), true);
|
|
13309
13308
|
const [binArrayLowerBinId, binArrayUpperBinId] = getBinArrayLowerUpperBinId(binArrayIndex);
|
|
13310
13309
|
if (upperBinId.gte(binArrayLowerBinId) && upperBinId.lte(binArrayUpperBinId)) {
|
|
13311
13310
|
break;
|
|
@@ -13313,13 +13312,6 @@ function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, p
|
|
|
13313
13312
|
binArrayIndex = binArrayIndex.add(new (0, _bnjs2.default)(1));
|
|
13314
13313
|
}
|
|
13315
13314
|
}
|
|
13316
|
-
if (includeSlippageForBinArray && binArrayIndexes2.length > MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) {
|
|
13317
|
-
const start = Math.floor((binArrayIndexes2.length - MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) / 2);
|
|
13318
|
-
binArrayIndexes2 = binArrayIndexes2.slice(start, start + MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT);
|
|
13319
|
-
}
|
|
13320
|
-
binArrayIndexes2.forEach((index) => {
|
|
13321
|
-
indexMap.set(index, true);
|
|
13322
|
-
});
|
|
13323
13315
|
});
|
|
13324
13316
|
const binArrayIndexes = Array.from(indexMap.keys()).map((idx) => new (0, _bnjs2.default)(idx));
|
|
13325
13317
|
const requireBitmapExtension = binArrayIndexes.some(
|
|
@@ -13385,19 +13377,22 @@ function findBaseDeltaX(amountX, minDeltaId, maxDeltaId, binStep, activeId) {
|
|
|
13385
13377
|
if (minDeltaId.gt(maxDeltaId) || amountX.lte(new (0, _bnjs2.default)(0))) {
|
|
13386
13378
|
return new (0, _bnjs2.default)(0);
|
|
13387
13379
|
}
|
|
13380
|
+
const m1 = minDeltaId;
|
|
13381
|
+
const m2 = maxDeltaId;
|
|
13388
13382
|
let b = new (0, _bnjs2.default)(0);
|
|
13389
13383
|
let c = new (0, _bnjs2.default)(0);
|
|
13390
|
-
let
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
const
|
|
13396
|
-
b = b.add(
|
|
13397
|
-
|
|
13398
|
-
|
|
13384
|
+
let s = new (0, _bnjs2.default)(0);
|
|
13385
|
+
const base = getQPriceBaseFactor(binStep);
|
|
13386
|
+
const maxBinId = activeId.add(maxDeltaId);
|
|
13387
|
+
let inverseBasePrice = pow(base, maxBinId.neg());
|
|
13388
|
+
for (let m = m2.toNumber(); m >= m1.toNumber(); m--) {
|
|
13389
|
+
const pm = inverseBasePrice;
|
|
13390
|
+
b = b.add(m1.mul(pm));
|
|
13391
|
+
c = c.add(new (0, _bnjs2.default)(m).mul(pm));
|
|
13392
|
+
s = s.add(pm);
|
|
13393
|
+
inverseBasePrice = inverseBasePrice.mul(base).shrn(SCALE_OFFSET);
|
|
13399
13394
|
}
|
|
13400
|
-
return amountX.shln(SCALE_OFFSET).div(c.sub(b));
|
|
13395
|
+
return amountX.shln(SCALE_OFFSET).div(c.sub(b).add(s));
|
|
13401
13396
|
}
|
|
13402
13397
|
function findX0AndDeltaX(amountX, minDeltaId, maxDeltaId, binStep, activeId) {
|
|
13403
13398
|
if (minDeltaId.gt(maxDeltaId) || amountX.lte(new (0, _bnjs2.default)(0)) || amountX.isZero()) {
|
|
@@ -13413,8 +13408,14 @@ function findX0AndDeltaX(amountX, minDeltaId, maxDeltaId, binStep, activeId) {
|
|
|
13413
13408
|
binStep,
|
|
13414
13409
|
activeId
|
|
13415
13410
|
);
|
|
13416
|
-
|
|
13411
|
+
let maxProbe = 100;
|
|
13417
13412
|
while (true) {
|
|
13413
|
+
if (maxProbe < 0) {
|
|
13414
|
+
throw new Error(
|
|
13415
|
+
"Something wrong: Unable to find suitable x0 and delta_x within probe limit"
|
|
13416
|
+
);
|
|
13417
|
+
}
|
|
13418
|
+
const x0 = minDeltaId.neg().addn(1).mul(baseDeltaX);
|
|
13418
13419
|
const amountInBins = getAmountInBinsAskSide(
|
|
13419
13420
|
activeId,
|
|
13420
13421
|
binStep,
|
|
@@ -13427,7 +13428,8 @@ function findX0AndDeltaX(amountX, minDeltaId, maxDeltaId, binStep, activeId) {
|
|
|
13427
13428
|
return acc.add(amountX2);
|
|
13428
13429
|
}, new (0, _bnjs2.default)(0));
|
|
13429
13430
|
if (totalAmountX.gt(amountX)) {
|
|
13430
|
-
baseDeltaX = baseDeltaX.
|
|
13431
|
+
baseDeltaX = baseDeltaX.subn(1);
|
|
13432
|
+
maxProbe--;
|
|
13431
13433
|
} else {
|
|
13432
13434
|
return {
|
|
13433
13435
|
base: x0,
|
|
@@ -15083,7 +15085,7 @@ async function getTokenBalance(conn, tokenAccount) {
|
|
|
15083
15085
|
var parseLogs = (eventParser, logs) => {
|
|
15084
15086
|
if (!logs.length)
|
|
15085
15087
|
throw new Error("No logs found");
|
|
15086
|
-
for (const event of _optionalChain([eventParser, 'optionalAccess',
|
|
15088
|
+
for (const event of _optionalChain([eventParser, 'optionalAccess', _53 => _53.parseLogs, 'call', _54 => _54(logs)])) {
|
|
15087
15089
|
return event.data;
|
|
15088
15090
|
}
|
|
15089
15091
|
throw new Error("No events found");
|
|
@@ -15238,14 +15240,14 @@ var getEstimatedComputeUnitIxWithBuffer = async (connection, instructions, feePa
|
|
|
15238
15240
|
return _web3js.ComputeBudgetProgram.setComputeUnitLimit({ units });
|
|
15239
15241
|
};
|
|
15240
15242
|
function createProgram(connection, opt) {
|
|
15241
|
-
const cluster = _optionalChain([opt, 'optionalAccess',
|
|
15243
|
+
const cluster = _optionalChain([opt, 'optionalAccess', _55 => _55.cluster]) || "mainnet-beta";
|
|
15242
15244
|
const provider = new (0, _anchor.AnchorProvider)(
|
|
15243
15245
|
connection,
|
|
15244
15246
|
{},
|
|
15245
15247
|
_anchor.AnchorProvider.defaultOptions()
|
|
15246
15248
|
);
|
|
15247
15249
|
return new (0, _anchor.Program)(
|
|
15248
|
-
{ ...idl_default, address: _nullishCoalesce(_optionalChain([opt, 'optionalAccess',
|
|
15250
|
+
{ ...idl_default, address: _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _56 => _56.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])) },
|
|
15249
15251
|
provider
|
|
15250
15252
|
);
|
|
15251
15253
|
}
|
|
@@ -15253,9 +15255,9 @@ function decodeAccount(program, accountName, buffer) {
|
|
|
15253
15255
|
return program.coder.accounts.decode(accountName, buffer);
|
|
15254
15256
|
}
|
|
15255
15257
|
function getAccountDiscriminator(accountName) {
|
|
15256
|
-
return _optionalChain([idl_default, 'access',
|
|
15258
|
+
return _optionalChain([idl_default, 'access', _57 => _57.accounts, 'access', _58 => _58.find, 'call', _59 => _59(
|
|
15257
15259
|
(acc) => acc.name.toLowerCase() === accountName.toLowerCase()
|
|
15258
|
-
), 'optionalAccess',
|
|
15260
|
+
), 'optionalAccess', _60 => _60.discriminator]);
|
|
15259
15261
|
}
|
|
15260
15262
|
function capSlippagePercentage(slippage) {
|
|
15261
15263
|
if (slippage > 100) {
|
|
@@ -15313,7 +15315,7 @@ function resetUninvolvedLiquidityParams(minDeltaId, maxDeltaId, favorXInActiveId
|
|
|
15313
15315
|
deltaY
|
|
15314
15316
|
};
|
|
15315
15317
|
}
|
|
15316
|
-
async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercentage, maxActiveBinSlippage, position, positionMinBinId, positionMaxBinId, liquidityStrategyParameters, owner, payer, isParallel, skipSolWrappingOperation = false
|
|
15318
|
+
async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercentage, maxActiveBinSlippage, position, positionMinBinId, positionMaxBinId, liquidityStrategyParameters, owner, payer, isParallel, skipSolWrappingOperation = false) {
|
|
15317
15319
|
const { slices, accounts: transferHookAccounts } = dlmm.getPotentialToken2022IxDataAndAccounts(0 /* Liquidity */);
|
|
15318
15320
|
const userTokenX = _spltoken.getAssociatedTokenAddressSync.call(void 0,
|
|
15319
15321
|
dlmm.lbPair.tokenXMint,
|
|
@@ -15354,14 +15356,10 @@ async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercent
|
|
|
15354
15356
|
const chunkMaxBinId = chunkedBinRange[i].upperBinId;
|
|
15355
15357
|
const initBinArrayIxs = [];
|
|
15356
15358
|
const initBitmapIxs = [];
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
|
|
15359
|
+
const binArrayIndexes = getBinArrayIndexesCoverage(
|
|
15360
|
+
new (0, _anchor.BN)(chunkMinBinId),
|
|
15361
|
+
new (0, _anchor.BN)(chunkMaxBinId)
|
|
15360
15362
|
);
|
|
15361
|
-
if (includeSlippageForBinArray && binArrayIndexes.length > MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) {
|
|
15362
|
-
const start = Math.floor((binArrayIndexes.length - MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) / 2);
|
|
15363
|
-
binArrayIndexes = binArrayIndexes.slice(start, start + MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT);
|
|
15364
|
-
}
|
|
15365
15363
|
const overflowDefaultBinArrayBitmap = binArrayIndexes.reduce(
|
|
15366
15364
|
(acc, binArrayIndex) => acc || isOverflowDefaultBinArrayBitmap(binArrayIndex),
|
|
15367
15365
|
false
|
|
@@ -16175,7 +16173,7 @@ var DLMM = class {
|
|
|
16175
16173
|
connection,
|
|
16176
16174
|
accountsToFetch
|
|
16177
16175
|
);
|
|
16178
|
-
const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access',
|
|
16176
|
+
const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _61 => _61[0], 'optionalAccess', _62 => _62.data]);
|
|
16179
16177
|
if (!lbPairAccountInfoBuffer)
|
|
16180
16178
|
throw new Error(`LB Pair account ${dlmm.toBase58()} not found`);
|
|
16181
16179
|
const lbPairAccInfo = decodeAccount(
|
|
@@ -16183,7 +16181,7 @@ var DLMM = class {
|
|
|
16183
16181
|
"lbPair",
|
|
16184
16182
|
lbPairAccountInfoBuffer
|
|
16185
16183
|
);
|
|
16186
|
-
const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access',
|
|
16184
|
+
const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _63 => _63[1], 'optionalAccess', _64 => _64.data]);
|
|
16187
16185
|
let binArrayBitMapExtensionAccInfo = null;
|
|
16188
16186
|
if (binArrayBitMapAccountInfoBuffer) {
|
|
16189
16187
|
binArrayBitMapExtensionAccInfo = decodeAccount(
|
|
@@ -16192,7 +16190,7 @@ var DLMM = class {
|
|
|
16192
16190
|
binArrayBitMapAccountInfoBuffer
|
|
16193
16191
|
);
|
|
16194
16192
|
}
|
|
16195
|
-
const clockAccountInfoBuffer = _optionalChain([accountsInfo, 'access',
|
|
16193
|
+
const clockAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _65 => _65[2], 'optionalAccess', _66 => _66.data]);
|
|
16196
16194
|
if (!clockAccountInfoBuffer)
|
|
16197
16195
|
throw new Error(`Clock account not found`);
|
|
16198
16196
|
const clock = ClockLayout.decode(clockAccountInfoBuffer);
|
|
@@ -16345,14 +16343,14 @@ var DLMM = class {
|
|
|
16345
16343
|
accountsToFetch
|
|
16346
16344
|
);
|
|
16347
16345
|
const clockAccount = accountsInfo.pop();
|
|
16348
|
-
const clockAccountInfoBuffer = _optionalChain([clockAccount, 'optionalAccess',
|
|
16346
|
+
const clockAccountInfoBuffer = _optionalChain([clockAccount, 'optionalAccess', _67 => _67.data]);
|
|
16349
16347
|
if (!clockAccountInfoBuffer)
|
|
16350
16348
|
throw new Error(`Clock account not found`);
|
|
16351
16349
|
const clock = ClockLayout.decode(clockAccountInfoBuffer);
|
|
16352
16350
|
const lbPairArraysMap = /* @__PURE__ */ new Map();
|
|
16353
16351
|
for (let i = 0; i < dlmmList.length; i++) {
|
|
16354
16352
|
const lbPairPubKey = dlmmList[i];
|
|
16355
|
-
const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access',
|
|
16353
|
+
const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _68 => _68[i], 'optionalAccess', _69 => _69.data]);
|
|
16356
16354
|
if (!lbPairAccountInfoBuffer)
|
|
16357
16355
|
throw new Error(`LB Pair account ${lbPairPubKey.toBase58()} not found`);
|
|
16358
16356
|
const lbPairAccInfo = decodeAccount(
|
|
@@ -16366,7 +16364,7 @@ var DLMM = class {
|
|
|
16366
16364
|
for (let i = dlmmList.length; i < accountsInfo.length; i++) {
|
|
16367
16365
|
const index = i - dlmmList.length;
|
|
16368
16366
|
const lbPairPubkey = dlmmList[index];
|
|
16369
|
-
const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access',
|
|
16367
|
+
const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _70 => _70[i], 'optionalAccess', _71 => _71.data]);
|
|
16370
16368
|
if (binArrayBitMapAccountInfoBuffer) {
|
|
16371
16369
|
const binArrayBitMapExtensionAccInfo = decodeAccount(
|
|
16372
16370
|
program,
|
|
@@ -16566,9 +16564,9 @@ var DLMM = class {
|
|
|
16566
16564
|
program.provider.connection,
|
|
16567
16565
|
program.programId,
|
|
16568
16566
|
[positionV2Filter(), positionOwnerFilter(userPubKey)],
|
|
16569
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
16570
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
16571
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
16567
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _72 => _72.chunkSize]),
|
|
16568
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _73 => _73.onChunkFetched]),
|
|
16569
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _74 => _74.isParallelExecution])
|
|
16572
16570
|
);
|
|
16573
16571
|
const positionWrappers = [
|
|
16574
16572
|
...positionsV2.map((p) => wrapPosition(program, p.pubkey, p.account))
|
|
@@ -16699,8 +16697,8 @@ var DLMM = class {
|
|
|
16699
16697
|
const { mintX, mintY, rewardMint0, rewardMint1 } = lbPairMintMap.get(
|
|
16700
16698
|
lbPair.toBase58()
|
|
16701
16699
|
);
|
|
16702
|
-
const reserveXBalance = _nullishCoalesce(_optionalChain([lbPairReserveMap, 'access',
|
|
16703
|
-
const reserveYBalance = _nullishCoalesce(_optionalChain([lbPairReserveMap, 'access',
|
|
16700
|
+
const reserveXBalance = _nullishCoalesce(_optionalChain([lbPairReserveMap, 'access', _75 => _75.get, 'call', _76 => _76(lbPair.toBase58()), 'optionalAccess', _77 => _77.reserveX]), () => ( BigInt(0)));
|
|
16701
|
+
const reserveYBalance = _nullishCoalesce(_optionalChain([lbPairReserveMap, 'access', _78 => _78.get, 'call', _79 => _79(lbPair.toBase58()), 'optionalAccess', _80 => _80.reserveY]), () => ( BigInt(0)));
|
|
16704
16702
|
const { tokenXProgram, tokenYProgram } = getTokenProgramId(lbPairAcc);
|
|
16705
16703
|
const tokenX = {
|
|
16706
16704
|
publicKey: lbPairAcc.tokenXMint,
|
|
@@ -16738,7 +16736,7 @@ var DLMM = class {
|
|
|
16738
16736
|
tokenX,
|
|
16739
16737
|
tokenY,
|
|
16740
16738
|
lbPairPositionsData: [
|
|
16741
|
-
..._nullishCoalesce(_optionalChain([positionsMap, 'access',
|
|
16739
|
+
..._nullishCoalesce(_optionalChain([positionsMap, 'access', _81 => _81.get, 'call', _82 => _82(lbPair.toBase58()), 'optionalAccess', _83 => _83.lbPairPositionsData]), () => ( [])),
|
|
16742
16740
|
{
|
|
16743
16741
|
publicKey: positionPubkey,
|
|
16744
16742
|
positionData,
|
|
@@ -16772,9 +16770,9 @@ var DLMM = class {
|
|
|
16772
16770
|
this.program.provider.connection,
|
|
16773
16771
|
this.program.programId,
|
|
16774
16772
|
[positionLbPairFilter(this.pubkey)],
|
|
16775
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
16776
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
16777
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
16773
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _84 => _84.chunkSize]),
|
|
16774
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _85 => _85.onChunkFetched]),
|
|
16775
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _86 => _86.isParallelExecution])
|
|
16778
16776
|
);
|
|
16779
16777
|
const lbPairPositions = positionAccounts.map((acc) => {
|
|
16780
16778
|
return wrapPosition(this.program, acc.pubkey, acc.account);
|
|
@@ -16943,7 +16941,7 @@ var DLMM = class {
|
|
|
16943
16941
|
);
|
|
16944
16942
|
preInstructions.push(createUserTokenYIx);
|
|
16945
16943
|
const postInstructions = [];
|
|
16946
|
-
if ((tokenX.equals(_spltoken.NATIVE_MINT) || tokenY.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([opt, 'optionalAccess',
|
|
16944
|
+
if ((tokenX.equals(_spltoken.NATIVE_MINT) || tokenY.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([opt, 'optionalAccess', _87 => _87.skipSolWrappingOperation])) {
|
|
16947
16945
|
const wrapAmount = BigInt(1);
|
|
16948
16946
|
if (tokenX.equals(_spltoken.NATIVE_MINT)) {
|
|
16949
16947
|
const wrapSOLIxX = wrapSOLInstruction(
|
|
@@ -17067,7 +17065,7 @@ var DLMM = class {
|
|
|
17067
17065
|
);
|
|
17068
17066
|
preInstructions.push(createUserTokenYIx);
|
|
17069
17067
|
const postInstructions = [];
|
|
17070
|
-
if ((tokenX.equals(_spltoken.NATIVE_MINT) || tokenY.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([opt, 'optionalAccess',
|
|
17068
|
+
if ((tokenX.equals(_spltoken.NATIVE_MINT) || tokenY.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([opt, 'optionalAccess', _88 => _88.skipSolWrappingOperation])) {
|
|
17071
17069
|
const wrapAmount = BigInt(1);
|
|
17072
17070
|
if (tokenX.equals(_spltoken.NATIVE_MINT)) {
|
|
17073
17071
|
const wrapSOLIxX = wrapSOLInstruction(
|
|
@@ -17198,8 +17196,8 @@ var DLMM = class {
|
|
|
17198
17196
|
presetParameterState.concreteFunctionType,
|
|
17199
17197
|
presetParameterState.collectFeeMode,
|
|
17200
17198
|
{
|
|
17201
|
-
cluster: _optionalChain([opt, 'optionalAccess',
|
|
17202
|
-
programId: _optionalChain([opt, 'optionalAccess',
|
|
17199
|
+
cluster: _optionalChain([opt, 'optionalAccess', _89 => _89.cluster]),
|
|
17200
|
+
programId: _optionalChain([opt, 'optionalAccess', _90 => _90.programId])
|
|
17203
17201
|
}
|
|
17204
17202
|
);
|
|
17205
17203
|
if (existsPool) {
|
|
@@ -17427,7 +17425,7 @@ var DLMM = class {
|
|
|
17427
17425
|
swapForY,
|
|
17428
17426
|
new (0, _anchor.BN)(activeIdToLoop),
|
|
17429
17427
|
this.lbPair,
|
|
17430
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17428
|
+
_nullishCoalesce(_optionalChain([this, 'access', _91 => _91.binArrayBitmapExtension, 'optionalAccess', _92 => _92.account]), () => ( null))
|
|
17431
17429
|
);
|
|
17432
17430
|
if (binArrayIndex === null)
|
|
17433
17431
|
shouldStop = true;
|
|
@@ -17820,9 +17818,9 @@ var DLMM = class {
|
|
|
17820
17818
|
positionOwnerFilter(userPubKey),
|
|
17821
17819
|
positionLbPairFilter(this.pubkey)
|
|
17822
17820
|
],
|
|
17823
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
17824
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
17825
|
-
_optionalChain([getPositionsOpt, 'optionalAccess',
|
|
17821
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _93 => _93.chunkSize]),
|
|
17822
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _94 => _94.onChunkFetched]),
|
|
17823
|
+
_optionalChain([getPositionsOpt, 'optionalAccess', _95 => _95.isParallelExecution])
|
|
17826
17824
|
)
|
|
17827
17825
|
]);
|
|
17828
17826
|
const [activeBin, positionsV2] = promiseResults;
|
|
@@ -17887,8 +17885,8 @@ var DLMM = class {
|
|
|
17887
17885
|
position,
|
|
17888
17886
|
this.tokenX.mint,
|
|
17889
17887
|
this.tokenY.mint,
|
|
17890
|
-
_optionalChain([this, 'access',
|
|
17891
|
-
_optionalChain([this, 'access',
|
|
17888
|
+
_optionalChain([this, 'access', _96 => _96.rewards, 'access', _97 => _97[0], 'optionalAccess', _98 => _98.mint]),
|
|
17889
|
+
_optionalChain([this, 'access', _99 => _99.rewards, 'access', _100 => _100[1], 'optionalAccess', _101 => _101.mint]),
|
|
17892
17890
|
positionBinArraysMapV2
|
|
17893
17891
|
),
|
|
17894
17892
|
version: position.version()
|
|
@@ -18139,8 +18137,8 @@ var DLMM = class {
|
|
|
18139
18137
|
position,
|
|
18140
18138
|
this.tokenX.mint,
|
|
18141
18139
|
this.tokenY.mint,
|
|
18142
|
-
_optionalChain([this, 'access',
|
|
18143
|
-
_optionalChain([this, 'access',
|
|
18140
|
+
_optionalChain([this, 'access', _102 => _102.rewards, 'access', _103 => _103[0], 'optionalAccess', _104 => _104.mint]),
|
|
18141
|
+
_optionalChain([this, 'access', _105 => _105.rewards, 'access', _106 => _106[1], 'optionalAccess', _107 => _107.mint]),
|
|
18144
18142
|
binArrayMap
|
|
18145
18143
|
),
|
|
18146
18144
|
version: position.version()
|
|
@@ -18157,7 +18155,7 @@ var DLMM = class {
|
|
|
18157
18155
|
* @param slippagePercentage The slippage percentage for adding liquidity.
|
|
18158
18156
|
* @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
|
|
18159
18157
|
*/
|
|
18160
|
-
async initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage, altAddress
|
|
18158
|
+
async initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage, altAddress) {
|
|
18161
18159
|
const maxActiveBinSlippage = getAndCapMaxActiveBinSlippage(
|
|
18162
18160
|
slippagePercentage,
|
|
18163
18161
|
this.lbPair.binStep,
|
|
@@ -18165,7 +18163,7 @@ var DLMM = class {
|
|
|
18165
18163
|
);
|
|
18166
18164
|
const { minBinId, maxBinId } = strategy;
|
|
18167
18165
|
const binCount = getBinCount(minBinId, maxBinId);
|
|
18168
|
-
const defaultAltAddressString = _nullishCoalesce(altAddress, () => ( ALT_ADDRESS[_optionalChain([this, 'access',
|
|
18166
|
+
const defaultAltAddressString = _nullishCoalesce(altAddress, () => ( ALT_ADDRESS[_optionalChain([this, 'access', _108 => _108.opt, 'optionalAccess', _109 => _109.cluster])]));
|
|
18169
18167
|
if (defaultAltAddressString) {
|
|
18170
18168
|
altAddress = new (0, _web3js.PublicKey)(defaultAltAddressString);
|
|
18171
18169
|
}
|
|
@@ -18228,8 +18226,7 @@ var DLMM = class {
|
|
|
18228
18226
|
owner,
|
|
18229
18227
|
payer,
|
|
18230
18228
|
true,
|
|
18231
|
-
_optionalChain([this, 'access',
|
|
18232
|
-
includeSlippageForBinArray
|
|
18229
|
+
_optionalChain([this, 'access', _110 => _110.opt, 'optionalAccess', _111 => _111.skipSolWrappingOperation])
|
|
18233
18230
|
);
|
|
18234
18231
|
for (const instructions of addLiquidityIxs) {
|
|
18235
18232
|
const txIxs = [];
|
|
@@ -18265,7 +18262,7 @@ var DLMM = class {
|
|
|
18265
18262
|
* @param slippagePercentage The slippage percentage for adding liquidity.
|
|
18266
18263
|
* @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
|
|
18267
18264
|
*/
|
|
18268
|
-
async initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage
|
|
18265
|
+
async initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage) {
|
|
18269
18266
|
const maxActiveBinSlippage = getAndCapMaxActiveBinSlippage(
|
|
18270
18267
|
slippagePercentage,
|
|
18271
18268
|
this.lbPair.binStep,
|
|
@@ -18351,8 +18348,7 @@ var DLMM = class {
|
|
|
18351
18348
|
owner,
|
|
18352
18349
|
payer,
|
|
18353
18350
|
false,
|
|
18354
|
-
_optionalChain([this, 'access',
|
|
18355
|
-
includeSlippageForBinArray
|
|
18351
|
+
_optionalChain([this, 'access', _112 => _112.opt, 'optionalAccess', _113 => _113.skipSolWrappingOperation])
|
|
18356
18352
|
);
|
|
18357
18353
|
instructionsByPositions.push({
|
|
18358
18354
|
positionKeypair: position,
|
|
@@ -18386,8 +18382,7 @@ var DLMM = class {
|
|
|
18386
18382
|
totalYAmount,
|
|
18387
18383
|
strategy,
|
|
18388
18384
|
user,
|
|
18389
|
-
slippage
|
|
18390
|
-
includeSlippageForBinArray = false
|
|
18385
|
+
slippage
|
|
18391
18386
|
}) {
|
|
18392
18387
|
const maxActiveBinSlippage = getAndCapMaxActiveBinSlippage(
|
|
18393
18388
|
slippage,
|
|
@@ -18417,8 +18412,7 @@ var DLMM = class {
|
|
|
18417
18412
|
user,
|
|
18418
18413
|
user,
|
|
18419
18414
|
true,
|
|
18420
|
-
_optionalChain([this, 'access',
|
|
18421
|
-
includeSlippageForBinArray
|
|
18415
|
+
_optionalChain([this, 'access', _114 => _114.opt, 'optionalAccess', _115 => _115.skipSolWrappingOperation])
|
|
18422
18416
|
);
|
|
18423
18417
|
const latestBlockhashInfo = await this.program.provider.connection.getLatestBlockhash();
|
|
18424
18418
|
return chunkedAddLiquidityIx.map((ixs) => {
|
|
@@ -18493,7 +18487,7 @@ var DLMM = class {
|
|
|
18493
18487
|
]);
|
|
18494
18488
|
createPayerTokenXIx && preInstructions.push(createPayerTokenXIx);
|
|
18495
18489
|
createPayerTokenYIx && preInstructions.push(createPayerTokenYIx);
|
|
18496
|
-
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access',
|
|
18490
|
+
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access', _116 => _116.opt, 'optionalAccess', _117 => _117.skipSolWrappingOperation])) {
|
|
18497
18491
|
const wrapSOLIx = wrapSOLInstruction(
|
|
18498
18492
|
user,
|
|
18499
18493
|
userTokenX,
|
|
@@ -18501,7 +18495,7 @@ var DLMM = class {
|
|
|
18501
18495
|
);
|
|
18502
18496
|
preInstructions.push(...wrapSOLIx);
|
|
18503
18497
|
}
|
|
18504
|
-
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access',
|
|
18498
|
+
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access', _118 => _118.opt, 'optionalAccess', _119 => _119.skipSolWrappingOperation])) {
|
|
18505
18499
|
const wrapSOLIx = wrapSOLInstruction(
|
|
18506
18500
|
user,
|
|
18507
18501
|
userTokenY,
|
|
@@ -18513,7 +18507,7 @@ var DLMM = class {
|
|
|
18513
18507
|
if ([
|
|
18514
18508
|
this.tokenX.publicKey.toBase58(),
|
|
18515
18509
|
this.tokenY.publicKey.toBase58()
|
|
18516
|
-
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access',
|
|
18510
|
+
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access', _120 => _120.opt, 'optionalAccess', _121 => _121.skipSolWrappingOperation])) {
|
|
18517
18511
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
18518
18512
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
18519
18513
|
}
|
|
@@ -18647,7 +18641,7 @@ var DLMM = class {
|
|
|
18647
18641
|
]);
|
|
18648
18642
|
createPayerTokenXIx && preInstructions.push(createPayerTokenXIx);
|
|
18649
18643
|
createPayerTokenYIx && preInstructions.push(createPayerTokenYIx);
|
|
18650
|
-
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access',
|
|
18644
|
+
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access', _122 => _122.opt, 'optionalAccess', _123 => _123.skipSolWrappingOperation])) {
|
|
18651
18645
|
const wrapSOLIx = wrapSOLInstruction(
|
|
18652
18646
|
user,
|
|
18653
18647
|
userTokenX,
|
|
@@ -18655,7 +18649,7 @@ var DLMM = class {
|
|
|
18655
18649
|
);
|
|
18656
18650
|
preInstructions.push(...wrapSOLIx);
|
|
18657
18651
|
}
|
|
18658
|
-
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access',
|
|
18652
|
+
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access', _124 => _124.opt, 'optionalAccess', _125 => _125.skipSolWrappingOperation])) {
|
|
18659
18653
|
const wrapSOLIx = wrapSOLInstruction(
|
|
18660
18654
|
user,
|
|
18661
18655
|
userTokenY,
|
|
@@ -18667,7 +18661,7 @@ var DLMM = class {
|
|
|
18667
18661
|
if ([
|
|
18668
18662
|
this.tokenX.publicKey.toBase58(),
|
|
18669
18663
|
this.tokenY.publicKey.toBase58()
|
|
18670
|
-
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access',
|
|
18664
|
+
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access', _126 => _126.opt, 'optionalAccess', _127 => _127.skipSolWrappingOperation])) {
|
|
18671
18665
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
18672
18666
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
18673
18667
|
}
|
|
@@ -18851,7 +18845,7 @@ var DLMM = class {
|
|
|
18851
18845
|
]);
|
|
18852
18846
|
createPayerTokenXIx && preInstructions.push(createPayerTokenXIx);
|
|
18853
18847
|
createPayerTokenYIx && preInstructions.push(createPayerTokenYIx);
|
|
18854
|
-
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access',
|
|
18848
|
+
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access', _128 => _128.opt, 'optionalAccess', _129 => _129.skipSolWrappingOperation])) {
|
|
18855
18849
|
const wrapSOLIx = wrapSOLInstruction(
|
|
18856
18850
|
user,
|
|
18857
18851
|
userTokenX,
|
|
@@ -18859,7 +18853,7 @@ var DLMM = class {
|
|
|
18859
18853
|
);
|
|
18860
18854
|
preInstructions.push(...wrapSOLIx);
|
|
18861
18855
|
}
|
|
18862
|
-
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access',
|
|
18856
|
+
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access', _130 => _130.opt, 'optionalAccess', _131 => _131.skipSolWrappingOperation])) {
|
|
18863
18857
|
const wrapSOLIx = wrapSOLInstruction(
|
|
18864
18858
|
user,
|
|
18865
18859
|
userTokenY,
|
|
@@ -18871,7 +18865,7 @@ var DLMM = class {
|
|
|
18871
18865
|
if ([
|
|
18872
18866
|
this.tokenX.publicKey.toBase58(),
|
|
18873
18867
|
this.tokenY.publicKey.toBase58()
|
|
18874
|
-
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access',
|
|
18868
|
+
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access', _132 => _132.opt, 'optionalAccess', _133 => _133.skipSolWrappingOperation])) {
|
|
18875
18869
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
18876
18870
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
18877
18871
|
}
|
|
@@ -19041,7 +19035,7 @@ var DLMM = class {
|
|
|
19041
19035
|
user
|
|
19042
19036
|
);
|
|
19043
19037
|
preInstructions.push(...createBinArrayIxs);
|
|
19044
|
-
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalChunkedXAmount.isZero() && !_optionalChain([this, 'access',
|
|
19038
|
+
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalChunkedXAmount.isZero() && !_optionalChain([this, 'access', _134 => _134.opt, 'optionalAccess', _135 => _135.skipSolWrappingOperation])) {
|
|
19045
19039
|
const wrapSOLIx = wrapSOLInstruction(
|
|
19046
19040
|
user,
|
|
19047
19041
|
userTokenX,
|
|
@@ -19051,7 +19045,7 @@ var DLMM = class {
|
|
|
19051
19045
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
19052
19046
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
19053
19047
|
}
|
|
19054
|
-
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalChunkedYAmount.isZero() && !_optionalChain([this, 'access',
|
|
19048
|
+
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalChunkedYAmount.isZero() && !_optionalChain([this, 'access', _136 => _136.opt, 'optionalAccess', _137 => _137.skipSolWrappingOperation])) {
|
|
19055
19049
|
const wrapSOLIx = wrapSOLInstruction(
|
|
19056
19050
|
user,
|
|
19057
19051
|
userTokenY,
|
|
@@ -19204,7 +19198,7 @@ var DLMM = class {
|
|
|
19204
19198
|
]);
|
|
19205
19199
|
createPayerTokenXIx && preInstructions.push(createPayerTokenXIx);
|
|
19206
19200
|
createPayerTokenYIx && preInstructions.push(createPayerTokenYIx);
|
|
19207
|
-
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access',
|
|
19201
|
+
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && !totalXAmount.isZero() && !_optionalChain([this, 'access', _138 => _138.opt, 'optionalAccess', _139 => _139.skipSolWrappingOperation])) {
|
|
19208
19202
|
const wrapSOLIx = wrapSOLInstruction(
|
|
19209
19203
|
user,
|
|
19210
19204
|
userTokenX,
|
|
@@ -19212,7 +19206,7 @@ var DLMM = class {
|
|
|
19212
19206
|
);
|
|
19213
19207
|
preInstructions.push(...wrapSOLIx);
|
|
19214
19208
|
}
|
|
19215
|
-
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access',
|
|
19209
|
+
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && !totalYAmount.isZero() && !_optionalChain([this, 'access', _140 => _140.opt, 'optionalAccess', _141 => _141.skipSolWrappingOperation])) {
|
|
19216
19210
|
const wrapSOLIx = wrapSOLInstruction(
|
|
19217
19211
|
user,
|
|
19218
19212
|
userTokenY,
|
|
@@ -19224,7 +19218,7 @@ var DLMM = class {
|
|
|
19224
19218
|
if ([
|
|
19225
19219
|
this.tokenX.publicKey.toBase58(),
|
|
19226
19220
|
this.tokenY.publicKey.toBase58()
|
|
19227
|
-
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access',
|
|
19221
|
+
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access', _142 => _142.opt, 'optionalAccess', _143 => _143.skipSolWrappingOperation])) {
|
|
19228
19222
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
19229
19223
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
19230
19224
|
}
|
|
@@ -19513,7 +19507,7 @@ var DLMM = class {
|
|
|
19513
19507
|
if ([
|
|
19514
19508
|
this.tokenX.publicKey.toBase58(),
|
|
19515
19509
|
this.tokenY.publicKey.toBase58()
|
|
19516
|
-
].includes(_spltoken.NATIVE_MINT.toBase58()) && (!skipUnwrapSOL || !_optionalChain([this, 'access',
|
|
19510
|
+
].includes(_spltoken.NATIVE_MINT.toBase58()) && (!skipUnwrapSOL || !_optionalChain([this, 'access', _144 => _144.opt, 'optionalAccess', _145 => _145.skipSolWrappingOperation]))) {
|
|
19517
19511
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
19518
19512
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
19519
19513
|
}
|
|
@@ -19670,7 +19664,7 @@ var DLMM = class {
|
|
|
19670
19664
|
swapForY,
|
|
19671
19665
|
activeId,
|
|
19672
19666
|
this.lbPair,
|
|
19673
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
19667
|
+
_nullishCoalesce(_optionalChain([this, 'access', _146 => _146.binArrayBitmapExtension, 'optionalAccess', _147 => _147.account]), () => ( null)),
|
|
19674
19668
|
binArrays
|
|
19675
19669
|
);
|
|
19676
19670
|
if (binArrayAccountToSwap == null) {
|
|
@@ -19744,7 +19738,7 @@ var DLMM = class {
|
|
|
19744
19738
|
swapForY,
|
|
19745
19739
|
activeId,
|
|
19746
19740
|
this.lbPair,
|
|
19747
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
19741
|
+
_nullishCoalesce(_optionalChain([this, 'access', _148 => _148.binArrayBitmapExtension, 'optionalAccess', _149 => _149.account]), () => ( null)),
|
|
19748
19742
|
binArrays
|
|
19749
19743
|
);
|
|
19750
19744
|
if (binArrayAccountToSwap == null) {
|
|
@@ -19843,7 +19837,7 @@ var DLMM = class {
|
|
|
19843
19837
|
swapForY,
|
|
19844
19838
|
activeId,
|
|
19845
19839
|
this.lbPair,
|
|
19846
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
19840
|
+
_nullishCoalesce(_optionalChain([this, 'access', _150 => _150.binArrayBitmapExtension, 'optionalAccess', _151 => _151.account]), () => ( null)),
|
|
19847
19841
|
binArrays
|
|
19848
19842
|
);
|
|
19849
19843
|
if (binArrayAccountToSwap == null) {
|
|
@@ -19940,7 +19934,7 @@ var DLMM = class {
|
|
|
19940
19934
|
swapForY,
|
|
19941
19935
|
activeId,
|
|
19942
19936
|
this.lbPair,
|
|
19943
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
19937
|
+
_nullishCoalesce(_optionalChain([this, 'access', _152 => _152.binArrayBitmapExtension, 'optionalAccess', _153 => _153.account]), () => ( null)),
|
|
19944
19938
|
binArrays
|
|
19945
19939
|
);
|
|
19946
19940
|
if (binArrayAccountToSwap == null) {
|
|
@@ -20023,7 +20017,7 @@ var DLMM = class {
|
|
|
20023
20017
|
]);
|
|
20024
20018
|
createInTokenAccountIx && preInstructions.push(createInTokenAccountIx);
|
|
20025
20019
|
createOutTokenAccountIx && preInstructions.push(createOutTokenAccountIx);
|
|
20026
|
-
if (inToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
20020
|
+
if (inToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _154 => _154.opt, 'optionalAccess', _155 => _155.skipSolWrappingOperation])) {
|
|
20027
20021
|
const wrapSOLIx = wrapSOLInstruction(
|
|
20028
20022
|
user,
|
|
20029
20023
|
userTokenIn,
|
|
@@ -20033,7 +20027,7 @@ var DLMM = class {
|
|
|
20033
20027
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
20034
20028
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
20035
20029
|
}
|
|
20036
|
-
if (outToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
20030
|
+
if (outToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _156 => _156.opt, 'optionalAccess', _157 => _157.skipSolWrappingOperation])) {
|
|
20037
20031
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
20038
20032
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
20039
20033
|
}
|
|
@@ -20119,7 +20113,7 @@ var DLMM = class {
|
|
|
20119
20113
|
]);
|
|
20120
20114
|
createInTokenAccountIx && preInstructions.push(createInTokenAccountIx);
|
|
20121
20115
|
createOutTokenAccountIx && preInstructions.push(createOutTokenAccountIx);
|
|
20122
|
-
if (inToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
20116
|
+
if (inToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _158 => _158.opt, 'optionalAccess', _159 => _159.skipSolWrappingOperation])) {
|
|
20123
20117
|
const wrapSOLIx = wrapSOLInstruction(
|
|
20124
20118
|
user,
|
|
20125
20119
|
userTokenIn,
|
|
@@ -20129,7 +20123,7 @@ var DLMM = class {
|
|
|
20129
20123
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
20130
20124
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
20131
20125
|
}
|
|
20132
|
-
if (outToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
20126
|
+
if (outToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _160 => _160.opt, 'optionalAccess', _161 => _161.skipSolWrappingOperation])) {
|
|
20133
20127
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
20134
20128
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
20135
20129
|
}
|
|
@@ -20221,7 +20215,7 @@ var DLMM = class {
|
|
|
20221
20215
|
]);
|
|
20222
20216
|
createInTokenAccountIx && preInstructions.push(createInTokenAccountIx);
|
|
20223
20217
|
createOutTokenAccountIx && preInstructions.push(createOutTokenAccountIx);
|
|
20224
|
-
if (inToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
20218
|
+
if (inToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _162 => _162.opt, 'optionalAccess', _163 => _163.skipSolWrappingOperation])) {
|
|
20225
20219
|
const wrapSOLIx = wrapSOLInstruction(
|
|
20226
20220
|
user,
|
|
20227
20221
|
userTokenIn,
|
|
@@ -20231,7 +20225,7 @@ var DLMM = class {
|
|
|
20231
20225
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
20232
20226
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
20233
20227
|
}
|
|
20234
|
-
if (outToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
20228
|
+
if (outToken.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _164 => _164.opt, 'optionalAccess', _165 => _165.skipSolWrappingOperation])) {
|
|
20235
20229
|
const closeWrappedSOLIx = await unwrapSOLInstruction(user);
|
|
20236
20230
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
20237
20231
|
}
|
|
@@ -21292,7 +21286,7 @@ var DLMM = class {
|
|
|
21292
21286
|
swapForY,
|
|
21293
21287
|
new (0, _anchor.BN)(activeBinId),
|
|
21294
21288
|
this.lbPair,
|
|
21295
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
21289
|
+
_nullishCoalesce(_optionalChain([this, 'access', _166 => _166.binArrayBitmapExtension, 'optionalAccess', _167 => _167.account]), () => ( null))
|
|
21296
21290
|
);
|
|
21297
21291
|
if (toBinArrayIndex === null)
|
|
21298
21292
|
return true;
|
|
@@ -21329,7 +21323,7 @@ var DLMM = class {
|
|
|
21329
21323
|
swapForY,
|
|
21330
21324
|
new (0, _anchor.BN)(activeBinId),
|
|
21331
21325
|
this.lbPair,
|
|
21332
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
21326
|
+
_nullishCoalesce(_optionalChain([this, 'access', _168 => _168.binArrayBitmapExtension, 'optionalAccess', _169 => _169.account]), () => ( null))
|
|
21333
21327
|
);
|
|
21334
21328
|
const marketPriceBinArrayIndex = binIdToBinArrayIndex(
|
|
21335
21329
|
new (0, _anchor.BN)(marketPriceBinId)
|
|
@@ -21365,7 +21359,7 @@ var DLMM = class {
|
|
|
21365
21359
|
let binArrayBitmapExtension = null;
|
|
21366
21360
|
if (binArrayBitMapExtensionPubkey) {
|
|
21367
21361
|
binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
|
|
21368
|
-
if (!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
21362
|
+
if (!_optionalChain([binArrayAccounts, 'optionalAccess', _170 => _170[0]])) {
|
|
21369
21363
|
const initializeBitmapExtensionIx = await this.program.methods.initializeBinArrayBitmapExtension().accountsPartial({
|
|
21370
21364
|
binArrayBitmapExtension: binArrayBitMapExtensionPubkey,
|
|
21371
21365
|
funder: owner,
|
|
@@ -21375,10 +21369,10 @@ var DLMM = class {
|
|
|
21375
21369
|
preInstructions.push(initializeBitmapExtensionIx);
|
|
21376
21370
|
}
|
|
21377
21371
|
}
|
|
21378
|
-
if (!!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
21372
|
+
if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _171 => _171[1]])) {
|
|
21379
21373
|
fromBinArray = fromBinArrayPubkey;
|
|
21380
21374
|
}
|
|
21381
|
-
if (!!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
21375
|
+
if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _172 => _172[2]]) && !!toBinArrayIndex) {
|
|
21382
21376
|
toBinArray = toBinArrayPubkey;
|
|
21383
21377
|
}
|
|
21384
21378
|
const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
|
|
@@ -21672,7 +21666,7 @@ var DLMM = class {
|
|
|
21672
21666
|
*
|
|
21673
21667
|
* @returns An object containing the instructions to initialize new bin arrays and the instruction to rebalance the position.
|
|
21674
21668
|
*/
|
|
21675
|
-
async rebalancePosition(rebalancePositionResponse, maxActiveBinSlippage, rentPayer, slippage = 100
|
|
21669
|
+
async rebalancePosition(rebalancePositionResponse, maxActiveBinSlippage, rentPayer, slippage = 100) {
|
|
21676
21670
|
const { rebalancePosition, simulationResult } = rebalancePositionResponse;
|
|
21677
21671
|
const { lbPair, shouldClaimFee, shouldClaimReward, owner, address } = rebalancePosition;
|
|
21678
21672
|
const { depositParams, withdrawParams } = simulationResult;
|
|
@@ -21745,9 +21739,7 @@ var DLMM = class {
|
|
|
21745
21739
|
withdrawParams,
|
|
21746
21740
|
activeId.toNumber(),
|
|
21747
21741
|
this.pubkey,
|
|
21748
|
-
this.program.programId
|
|
21749
|
-
maxActiveBinSlippage.toNumber(),
|
|
21750
|
-
includeSlippageForBinArray
|
|
21742
|
+
this.program.programId
|
|
21751
21743
|
);
|
|
21752
21744
|
const binArrayPublicKeys = binArrayIndexes.map((index) => {
|
|
21753
21745
|
const [binArrayPubkey] = deriveBinArray(
|
|
@@ -21827,7 +21819,7 @@ var DLMM = class {
|
|
|
21827
21819
|
slippage
|
|
21828
21820
|
);
|
|
21829
21821
|
const postInstructions = [];
|
|
21830
|
-
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && simulationResult.actualAmountXDeposited.gtn(0) && !_optionalChain([this, 'access',
|
|
21822
|
+
if (this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) && simulationResult.actualAmountXDeposited.gtn(0) && !_optionalChain([this, 'access', _173 => _173.opt, 'optionalAccess', _174 => _174.skipSolWrappingOperation])) {
|
|
21831
21823
|
const wrapSOLIx = wrapSOLInstruction(
|
|
21832
21824
|
owner,
|
|
21833
21825
|
userTokenX,
|
|
@@ -21835,7 +21827,7 @@ var DLMM = class {
|
|
|
21835
21827
|
);
|
|
21836
21828
|
preInstructions.push(...wrapSOLIx);
|
|
21837
21829
|
}
|
|
21838
|
-
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && simulationResult.actualAmountYDeposited.gtn(0) && !_optionalChain([this, 'access',
|
|
21830
|
+
if (this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT) && simulationResult.actualAmountYDeposited.gtn(0) && !_optionalChain([this, 'access', _175 => _175.opt, 'optionalAccess', _176 => _176.skipSolWrappingOperation])) {
|
|
21839
21831
|
const wrapSOLIx = wrapSOLInstruction(
|
|
21840
21832
|
owner,
|
|
21841
21833
|
userTokenY,
|
|
@@ -21843,7 +21835,7 @@ var DLMM = class {
|
|
|
21843
21835
|
);
|
|
21844
21836
|
preInstructions.push(...wrapSOLIx);
|
|
21845
21837
|
}
|
|
21846
|
-
if ((this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) || this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([this, 'access',
|
|
21838
|
+
if ((this.tokenX.publicKey.equals(_spltoken.NATIVE_MINT) || this.tokenY.publicKey.equals(_spltoken.NATIVE_MINT)) && !_optionalChain([this, 'access', _177 => _177.opt, 'optionalAccess', _178 => _178.skipSolWrappingOperation])) {
|
|
21847
21839
|
const closeWrappedSOLIx = await unwrapSOLInstruction(owner);
|
|
21848
21840
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
21849
21841
|
}
|
|
@@ -22035,7 +22027,7 @@ var DLMM = class {
|
|
|
22035
22027
|
true,
|
|
22036
22028
|
tokenProgram
|
|
22037
22029
|
);
|
|
22038
|
-
if (tokenMint.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access',
|
|
22030
|
+
if (tokenMint.equals(_spltoken.NATIVE_MINT) && !_optionalChain([this, 'access', _179 => _179.opt, 'optionalAccess', _180 => _180.skipSolWrappingOperation])) {
|
|
22039
22031
|
const totalAmount = params.bins.reduce(
|
|
22040
22032
|
(acc, { amount }) => acc.add(amount),
|
|
22041
22033
|
new (0, _anchor.BN)(0)
|
|
@@ -22120,7 +22112,7 @@ var DLMM = class {
|
|
|
22120
22112
|
this.tokenY.owner
|
|
22121
22113
|
);
|
|
22122
22114
|
if (this.tokenX.mint.address.equals(_spltoken.NATIVE_MINT)) {
|
|
22123
|
-
if (!_optionalChain([this, 'access',
|
|
22115
|
+
if (!_optionalChain([this, 'access', _181 => _181.opt, 'optionalAccess', _182 => _182.skipSolWrappingOperation])) {
|
|
22124
22116
|
preInstructions.push(
|
|
22125
22117
|
_spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
22126
22118
|
owner,
|
|
@@ -22144,7 +22136,7 @@ var DLMM = class {
|
|
|
22144
22136
|
);
|
|
22145
22137
|
}
|
|
22146
22138
|
if (this.tokenY.mint.address.equals(_spltoken.NATIVE_MINT)) {
|
|
22147
|
-
if (!_optionalChain([this, 'access',
|
|
22139
|
+
if (!_optionalChain([this, 'access', _183 => _183.opt, 'optionalAccess', _184 => _184.skipSolWrappingOperation])) {
|
|
22148
22140
|
preInstructions.push(
|
|
22149
22141
|
_spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
|
|
22150
22142
|
owner,
|
|
@@ -22570,7 +22562,7 @@ var DLMM = class {
|
|
|
22570
22562
|
);
|
|
22571
22563
|
})
|
|
22572
22564
|
);
|
|
22573
|
-
const version = _nullishCoalesce(_optionalChain([binArrays, 'access',
|
|
22565
|
+
const version = _nullishCoalesce(_optionalChain([binArrays, 'access', _185 => _185.find, 'call', _186 => _186((binArray) => binArray != null), 'optionalAccess', _187 => _187.version]), () => ( 1));
|
|
22574
22566
|
return Array.from(
|
|
22575
22567
|
enumerateBins(
|
|
22576
22568
|
binsById,
|
|
@@ -22766,7 +22758,7 @@ var DLMM = class {
|
|
|
22766
22758
|
if ([
|
|
22767
22759
|
this.tokenX.publicKey.toBase58(),
|
|
22768
22760
|
this.tokenY.publicKey.toBase58()
|
|
22769
|
-
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access',
|
|
22761
|
+
].includes(_spltoken.NATIVE_MINT.toBase58()) && !_optionalChain([this, 'access', _188 => _188.opt, 'optionalAccess', _189 => _189.skipSolWrappingOperation])) {
|
|
22770
22762
|
const closeWrappedSOLIx = await unwrapSOLInstruction(owner);
|
|
22771
22763
|
closeWrappedSOLIx && postInstructions.push(closeWrappedSOLIx);
|
|
22772
22764
|
}
|
|
@@ -23095,7 +23087,7 @@ var src_default = DLMM;
|
|
|
23095
23087
|
|
|
23096
23088
|
|
|
23097
23089
|
|
|
23098
|
-
exports.ADMIN = ADMIN; exports.ALT_ADDRESS = ALT_ADDRESS; exports.ActionType = ActionType; exports.ActivationType = ActivationType; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_ARRAY_BITMAP_FEE = BIN_ARRAY_BITMAP_FEE; exports.BIN_ARRAY_BITMAP_FEE_BN = BIN_ARRAY_BITMAP_FEE_BN; exports.BIN_ARRAY_BITMAP_SIZE = BIN_ARRAY_BITMAP_SIZE; exports.BIN_ARRAY_DEFAULT_VERSION = BIN_ARRAY_DEFAULT_VERSION; exports.BIN_ARRAY_FEE = BIN_ARRAY_FEE; exports.BIN_ARRAY_FEE_BN = BIN_ARRAY_FEE_BN; exports.BinLiquidity = BinLiquidity; exports.BitmapType = BitmapType; exports.ClockLayout = ClockLayout; exports.CollectFeeMode = CollectFeeMode; exports.ConcreteFunctionType = ConcreteFunctionType; exports.DEFAULT_BIN_PER_POSITION = DEFAULT_BIN_PER_POSITION; exports.DLMMError = DLMMError; exports.DlmmSdkError = DlmmSdkError; exports.DynamicOracle = DynamicOracle; exports.EXTENSION_BINARRAY_BITMAP_SIZE = EXTENSION_BINARRAY_BITMAP_SIZE; exports.FEE_PRECISION = FEE_PRECISION; exports.FunctionType = FunctionType; exports.IDL = idl_default; exports.ILM_BASE = ILM_BASE; exports.LBCLMM_PROGRAM_IDS = LBCLMM_PROGRAM_IDS; exports.LIMIT_ORDER_BIN_DATA_SIZE = LIMIT_ORDER_BIN_DATA_SIZE; exports.LIMIT_ORDER_FEE_SHARE = LIMIT_ORDER_FEE_SHARE; exports.LIMIT_ORDER_MIN_SIZE = LIMIT_ORDER_MIN_SIZE; exports.LimitOrderStatus = LimitOrderStatus; exports.MAX_ACTIVE_BIN_SLIPPAGE = MAX_ACTIVE_BIN_SLIPPAGE; exports.MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT = MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT; exports.MAX_BINS_PER_POSITION = MAX_BINS_PER_POSITION; exports.MAX_BIN_ARRAY_SIZE = MAX_BIN_ARRAY_SIZE; exports.MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX; exports.MAX_BIN_PER_LIMIT_ORDER = MAX_BIN_PER_LIMIT_ORDER; exports.MAX_CLAIM_ALL_ALLOWED = MAX_CLAIM_ALL_ALLOWED; exports.MAX_EXTRA_BIN_ARRAYS = MAX_EXTRA_BIN_ARRAYS; exports.MAX_FEE_RATE = MAX_FEE_RATE; exports.MAX_RESIZE_LENGTH = MAX_RESIZE_LENGTH; exports.MEMO_PROGRAM_ID = MEMO_PROGRAM_ID; exports.Network = Network; exports.Observation = Observation; exports.POOL_FEE = POOL_FEE; exports.POOL_FEE_BN = POOL_FEE_BN; exports.POSITION_BIN_DATA_SIZE = POSITION_BIN_DATA_SIZE; exports.POSITION_FEE = POSITION_FEE; exports.POSITION_FEE_BN = POSITION_FEE_BN; exports.POSITION_MAX_LENGTH = POSITION_MAX_LENGTH; exports.POSITION_MIN_SIZE = POSITION_MIN_SIZE; exports.PRECISION = PRECISION; exports.PairStatus = PairStatus; exports.PairType = PairType; exports.PositionPermission = PositionPermission; exports.PositionV2Wrapper = PositionV2Wrapper; exports.PositionVersion = PositionVersion; exports.REBALANCE_POSITION_PADDING = REBALANCE_POSITION_PADDING; exports.RebalancePosition = RebalancePosition; exports.ResizeSide = ResizeSide; exports.Rounding = Rounding; exports.SCALE = SCALE; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SIMULATION_USER = SIMULATION_USER; exports.ShrinkMode = ShrinkMode; exports.Strategy = Strategy; exports.StrategyType = StrategyType; exports.TOKEN_ACCOUNT_FEE = TOKEN_ACCOUNT_FEE; exports.TOKEN_ACCOUNT_FEE_BN = TOKEN_ACCOUNT_FEE_BN; exports.U64_MAX = U64_MAX; exports.autoFillXByStrategy = autoFillXByStrategy; exports.autoFillXByWeight = autoFillXByWeight; exports.autoFillYByStrategy = autoFillYByStrategy; exports.autoFillYByWeight = autoFillYByWeight; exports.binArrayLbPairFilter = binArrayLbPairFilter; exports.binDeltaToMinMaxBinId = binDeltaToMinMaxBinId; exports.binIdToBinArrayIndex = binIdToBinArrayIndex; exports.buildBitFlagAndNegateStrategyParameters = buildBitFlagAndNegateStrategyParameters; exports.buildLiquidityStrategyParameters = buildLiquidityStrategyParameters; exports.calculateBidAskDistribution = calculateBidAskDistribution; exports.calculateNormalDistribution = calculateNormalDistribution; exports.calculatePositionSize = calculatePositionSize; exports.calculateSpotDistribution = calculateSpotDistribution; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.capSlippagePercentage = capSlippagePercentage; exports.chunkBinRange = chunkBinRange; exports.chunkBinRangeIntoExtendedPositions = chunkBinRangeIntoExtendedPositions; exports.chunkDepositWithRebalanceEndpoint = chunkDepositWithRebalanceEndpoint; exports.chunkPositionBinRange = chunkPositionBinRange; exports.chunkedFetchMultipleBinArrayBitmapExtensionAccount = chunkedFetchMultipleBinArrayBitmapExtensionAccount; exports.chunkedFetchMultiplePoolAccount = chunkedFetchMultiplePoolAccount; exports.chunkedGetMultipleAccountInfos = chunkedGetMultipleAccountInfos; exports.chunkedGetProgramAccounts = chunkedGetProgramAccounts; exports.chunks = chunks; exports.compressBinAmount = compressBinAmount; exports.computeBaseFactorFromFeeBps = computeBaseFactorFromFeeBps; exports.computeFee = computeFee; exports.computeFeeFromAmount = computeFeeFromAmount; exports.computeProtocolFee = computeProtocolFee; exports.createProgram = createProgram; exports.decodeAccount = decodeAccount; exports.decodeExtendedPosition = decodeExtendedPosition; exports.decodeRewardPerTokenStored = decodeRewardPerTokenStored; exports.default = src_default; exports.deriveBinArray = deriveBinArray; exports.deriveBinArrayBitmapExtension = deriveBinArrayBitmapExtension; exports.deriveCustomizablePermissionlessLbPair = deriveCustomizablePermissionlessLbPair; exports.deriveEventAuthority = deriveEventAuthority; exports.deriveLbPair = deriveLbPair; exports.deriveLbPair2 = deriveLbPair2; exports.deriveLbPairWithPresetParamWithIndexKey = deriveLbPairWithPresetParamWithIndexKey; exports.deriveOperator = deriveOperator; exports.deriveOracle = deriveOracle; exports.derivePermissionLbPair = derivePermissionLbPair; exports.derivePlaceHolderAccountMeta = derivePlaceHolderAccountMeta; exports.derivePosition = derivePosition; exports.derivePresetParameter = derivePresetParameter; exports.derivePresetParameter2 = derivePresetParameter2; exports.derivePresetParameterWithIndex = derivePresetParameterWithIndex; exports.deriveReserve = deriveReserve; exports.deriveRewardVault = deriveRewardVault; exports.deriveTokenBadge = deriveTokenBadge; exports.distributeAmountToCompressedBinsByRatio = distributeAmountToCompressedBinsByRatio; exports.encodePositionPermissions = encodePositionPermissions; exports.enumerateBins = enumerateBins; exports.findNextBinArrayIndexWithLiquidity = findNextBinArrayIndexWithLiquidity; exports.findNextBinArrayWithLiquidity = findNextBinArrayWithLiquidity; exports.findOptimumDecompressMultiplier = findOptimumDecompressMultiplier; exports.fromWeightDistributionToAmount = fromWeightDistributionToAmount; exports.fromWeightDistributionToAmountOneSide = fromWeightDistributionToAmountOneSide; exports.generateAmountForBinRange = generateAmountForBinRange; exports.generateBinAmount = generateBinAmount; exports.getAccountDiscriminator = getAccountDiscriminator; exports.getAmountIn = getAmountIn; exports.getAmountInBinsAskSide = getAmountInBinsAskSide; exports.getAmountInBinsBidSide = getAmountInBinsBidSide; exports.getAmountOut = getAmountOut; exports.getAndCapMaxActiveBinSlippage = getAndCapMaxActiveBinSlippage; exports.getAutoFillAmountByRebalancedPosition = getAutoFillAmountByRebalancedPosition; exports.getBaseFee = getBaseFee; exports.getBinArrayAccountMetasCoverage = getBinArrayAccountMetasCoverage; exports.getBinArrayIndexesCoverage = getBinArrayIndexesCoverage; exports.getBinArrayInfoForNonContiguousBinIds = getBinArrayInfoForNonContiguousBinIds; exports.getBinArrayKeysCoverage = getBinArrayKeysCoverage; exports.getBinArrayLowerUpperBinId = getBinArrayLowerUpperBinId; exports.getBinArraysRequiredByPositionRange = getBinArraysRequiredByPositionRange; exports.getBinCount = getBinCount; exports.getBinFromBinArray = getBinFromBinArray; exports.getBinIdIndexInBinArray = getBinIdIndexInBinArray; exports.getBinMaxAmountOut = getBinMaxAmountOut; exports.getC = getC; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getExtendedPositionBinCount = getExtendedPositionBinCount; exports.getExtraAccountMetasForTransferHook = getExtraAccountMetasForTransferHook; exports.getFeeMode = getFeeMode; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getLimitOrderLiquidity = getLimitOrderLiquidity; exports.getLiquidityStrategyParameterBuilder = getLiquidityStrategyParameterBuilder; exports.getMultipleMintsExtraAccountMetasForTransferHook = getMultipleMintsExtraAccountMetasForTransferHook; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPositionCount = getPositionCount; exports.getPositionCountByBinCount = getPositionCountByBinCount; exports.getPositionExpandRentExemption = getPositionExpandRentExemption; exports.getPositionLowerUpperBinIdWithLiquidity = getPositionLowerUpperBinIdWithLiquidity; exports.getPositionRentExemption = getPositionRentExemption; exports.getPriceOfBinByBinId = getPriceOfBinByBinId; exports.getQPriceBaseFactor = getQPriceBaseFactor; exports.getQPriceFromId = getQPriceFromId; exports.getRebalanceBinArrayIndexesAndBitmapCoverage = getRebalanceBinArrayIndexesAndBitmapCoverage; exports.getSlippageMaxAmount = getSlippageMaxAmount; exports.getSlippageMinAmount = getSlippageMinAmount; exports.getTokenBalance = getTokenBalance; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgramId = getTokenProgramId; exports.getTokensMintFromPoolAddress = getTokensMintFromPoolAddress; exports.getTotalFee = getTotalFee; exports.getVariableFee = getVariableFee; exports.isBinIdWithinBinArray = isBinIdWithinBinArray; exports.isOverflowDefaultBinArrayBitmap = isOverflowDefaultBinArrayBitmap; exports.isPositionNoFee = isPositionNoFee; exports.isPositionNoReward = isPositionNoReward; exports.isSupportLimitOrder = isSupportLimitOrder; exports.limitOrderFilter = limitOrderFilter; exports.limitOrderLbPairFilter = limitOrderLbPairFilter; exports.limitOrderOwnerFilter = limitOrderOwnerFilter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.parseLogs = parseLogs; exports.positionLbPairFilter = positionLbPairFilter; exports.positionOwnerFilter = positionOwnerFilter; exports.positionV2Filter = positionV2Filter; exports.presetParameter2BaseFactorFilter = presetParameter2BaseFactorFilter; exports.presetParameter2BaseFeePowerFactor = presetParameter2BaseFeePowerFactor; exports.presetParameter2BinStepFilter = presetParameter2BinStepFilter; exports.range = range; exports.resetUninvolvedLiquidityParams = resetUninvolvedLiquidityParams; exports.shlDiv = shlDiv; exports.splitFee = splitFee; exports.suggestBalancedXParametersFromY = suggestBalancedXParametersFromY; exports.suggestBalancedYParametersFromX = suggestBalancedYParametersFromX; exports.swapExactInQuoteAtBin = swapExactInQuoteAtBin; exports.swapExactOutQuoteAtBin = swapExactOutQuoteAtBin; exports.toAmountAskSide = toAmountAskSide; exports.toAmountBidSide = toAmountBidSide; exports.toAmountBothSide = toAmountBothSide; exports.toAmountIntoBins = toAmountIntoBins; exports.toAmountsBothSideByStrategy = toAmountsBothSideByStrategy; exports.toStrategyParameters = toStrategyParameters; exports.toWeightDistribution = toWeightDistribution; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.wrapOracle = wrapOracle; exports.wrapPosition = wrapPosition; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
23090
|
+
exports.ADMIN = ADMIN; exports.ALT_ADDRESS = ALT_ADDRESS; exports.ActionType = ActionType; exports.ActivationType = ActivationType; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_ARRAY_BITMAP_FEE = BIN_ARRAY_BITMAP_FEE; exports.BIN_ARRAY_BITMAP_FEE_BN = BIN_ARRAY_BITMAP_FEE_BN; exports.BIN_ARRAY_BITMAP_SIZE = BIN_ARRAY_BITMAP_SIZE; exports.BIN_ARRAY_DEFAULT_VERSION = BIN_ARRAY_DEFAULT_VERSION; exports.BIN_ARRAY_FEE = BIN_ARRAY_FEE; exports.BIN_ARRAY_FEE_BN = BIN_ARRAY_FEE_BN; exports.BinLiquidity = BinLiquidity; exports.BitmapType = BitmapType; exports.ClockLayout = ClockLayout; exports.CollectFeeMode = CollectFeeMode; exports.ConcreteFunctionType = ConcreteFunctionType; exports.DEFAULT_BIN_PER_POSITION = DEFAULT_BIN_PER_POSITION; exports.DLMMError = DLMMError; exports.DlmmSdkError = DlmmSdkError; exports.DynamicOracle = DynamicOracle; exports.EXTENSION_BINARRAY_BITMAP_SIZE = EXTENSION_BINARRAY_BITMAP_SIZE; exports.FEE_PRECISION = FEE_PRECISION; exports.FunctionType = FunctionType; exports.IDL = idl_default; exports.ILM_BASE = ILM_BASE; exports.LBCLMM_PROGRAM_IDS = LBCLMM_PROGRAM_IDS; exports.LIMIT_ORDER_BIN_DATA_SIZE = LIMIT_ORDER_BIN_DATA_SIZE; exports.LIMIT_ORDER_FEE_SHARE = LIMIT_ORDER_FEE_SHARE; exports.LIMIT_ORDER_MIN_SIZE = LIMIT_ORDER_MIN_SIZE; exports.LimitOrderStatus = LimitOrderStatus; exports.MAX_ACTIVE_BIN_SLIPPAGE = MAX_ACTIVE_BIN_SLIPPAGE; exports.MAX_BINS_PER_POSITION = MAX_BINS_PER_POSITION; exports.MAX_BIN_ARRAY_SIZE = MAX_BIN_ARRAY_SIZE; exports.MAX_BIN_ID_PER_BIN_STEP = MAX_BIN_ID_PER_BIN_STEP; exports.MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX; exports.MAX_BIN_PER_LIMIT_ORDER = MAX_BIN_PER_LIMIT_ORDER; exports.MAX_CLAIM_ALL_ALLOWED = MAX_CLAIM_ALL_ALLOWED; exports.MAX_EXTRA_BIN_ARRAYS = MAX_EXTRA_BIN_ARRAYS; exports.MAX_FEE_RATE = MAX_FEE_RATE; exports.MAX_RESIZE_LENGTH = MAX_RESIZE_LENGTH; exports.MEMO_PROGRAM_ID = MEMO_PROGRAM_ID; exports.Network = Network; exports.Observation = Observation; exports.POOL_FEE = POOL_FEE; exports.POOL_FEE_BN = POOL_FEE_BN; exports.POSITION_BIN_DATA_SIZE = POSITION_BIN_DATA_SIZE; exports.POSITION_FEE = POSITION_FEE; exports.POSITION_FEE_BN = POSITION_FEE_BN; exports.POSITION_MAX_LENGTH = POSITION_MAX_LENGTH; exports.POSITION_MIN_SIZE = POSITION_MIN_SIZE; exports.PRECISION = PRECISION; exports.PairStatus = PairStatus; exports.PairType = PairType; exports.PositionPermission = PositionPermission; exports.PositionV2Wrapper = PositionV2Wrapper; exports.PositionVersion = PositionVersion; exports.REBALANCE_POSITION_PADDING = REBALANCE_POSITION_PADDING; exports.RebalancePosition = RebalancePosition; exports.ResizeSide = ResizeSide; exports.Rounding = Rounding; exports.SCALE = SCALE; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SIMULATION_USER = SIMULATION_USER; exports.ShrinkMode = ShrinkMode; exports.Strategy = Strategy; exports.StrategyType = StrategyType; exports.TOKEN_ACCOUNT_FEE = TOKEN_ACCOUNT_FEE; exports.TOKEN_ACCOUNT_FEE_BN = TOKEN_ACCOUNT_FEE_BN; exports.U64_MAX = U64_MAX; exports.autoFillXByStrategy = autoFillXByStrategy; exports.autoFillXByWeight = autoFillXByWeight; exports.autoFillYByStrategy = autoFillYByStrategy; exports.autoFillYByWeight = autoFillYByWeight; exports.binArrayLbPairFilter = binArrayLbPairFilter; exports.binDeltaToMinMaxBinId = binDeltaToMinMaxBinId; exports.binIdToBinArrayIndex = binIdToBinArrayIndex; exports.buildBitFlagAndNegateStrategyParameters = buildBitFlagAndNegateStrategyParameters; exports.buildLiquidityStrategyParameters = buildLiquidityStrategyParameters; exports.calculateBidAskDistribution = calculateBidAskDistribution; exports.calculateNormalDistribution = calculateNormalDistribution; exports.calculatePositionSize = calculatePositionSize; exports.calculateSpotDistribution = calculateSpotDistribution; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.capSlippagePercentage = capSlippagePercentage; exports.chunkBinRange = chunkBinRange; exports.chunkBinRangeIntoExtendedPositions = chunkBinRangeIntoExtendedPositions; exports.chunkDepositWithRebalanceEndpoint = chunkDepositWithRebalanceEndpoint; exports.chunkPositionBinRange = chunkPositionBinRange; exports.chunkedFetchMultipleBinArrayBitmapExtensionAccount = chunkedFetchMultipleBinArrayBitmapExtensionAccount; exports.chunkedFetchMultiplePoolAccount = chunkedFetchMultiplePoolAccount; exports.chunkedGetMultipleAccountInfos = chunkedGetMultipleAccountInfos; exports.chunkedGetProgramAccounts = chunkedGetProgramAccounts; exports.chunks = chunks; exports.compressBinAmount = compressBinAmount; exports.computeBaseFactorFromFeeBps = computeBaseFactorFromFeeBps; exports.computeFee = computeFee; exports.computeFeeFromAmount = computeFeeFromAmount; exports.computeProtocolFee = computeProtocolFee; exports.createProgram = createProgram; exports.decodeAccount = decodeAccount; exports.decodeExtendedPosition = decodeExtendedPosition; exports.decodeRewardPerTokenStored = decodeRewardPerTokenStored; exports.default = src_default; exports.deriveBinArray = deriveBinArray; exports.deriveBinArrayBitmapExtension = deriveBinArrayBitmapExtension; exports.deriveCustomizablePermissionlessLbPair = deriveCustomizablePermissionlessLbPair; exports.deriveEventAuthority = deriveEventAuthority; exports.deriveLbPair = deriveLbPair; exports.deriveLbPair2 = deriveLbPair2; exports.deriveLbPairWithPresetParamWithIndexKey = deriveLbPairWithPresetParamWithIndexKey; exports.deriveOperator = deriveOperator; exports.deriveOracle = deriveOracle; exports.derivePermissionLbPair = derivePermissionLbPair; exports.derivePlaceHolderAccountMeta = derivePlaceHolderAccountMeta; exports.derivePosition = derivePosition; exports.derivePresetParameter = derivePresetParameter; exports.derivePresetParameter2 = derivePresetParameter2; exports.derivePresetParameterWithIndex = derivePresetParameterWithIndex; exports.deriveReserve = deriveReserve; exports.deriveRewardVault = deriveRewardVault; exports.deriveTokenBadge = deriveTokenBadge; exports.distributeAmountToCompressedBinsByRatio = distributeAmountToCompressedBinsByRatio; exports.encodePositionPermissions = encodePositionPermissions; exports.enumerateBins = enumerateBins; exports.findNextBinArrayIndexWithLiquidity = findNextBinArrayIndexWithLiquidity; exports.findNextBinArrayWithLiquidity = findNextBinArrayWithLiquidity; exports.findOptimumDecompressMultiplier = findOptimumDecompressMultiplier; exports.fromWeightDistributionToAmount = fromWeightDistributionToAmount; exports.fromWeightDistributionToAmountOneSide = fromWeightDistributionToAmountOneSide; exports.generateAmountForBinRange = generateAmountForBinRange; exports.generateBinAmount = generateBinAmount; exports.getAccountDiscriminator = getAccountDiscriminator; exports.getAmountIn = getAmountIn; exports.getAmountInBinsAskSide = getAmountInBinsAskSide; exports.getAmountInBinsBidSide = getAmountInBinsBidSide; exports.getAmountOut = getAmountOut; exports.getAndCapMaxActiveBinSlippage = getAndCapMaxActiveBinSlippage; exports.getAutoFillAmountByRebalancedPosition = getAutoFillAmountByRebalancedPosition; exports.getBaseFee = getBaseFee; exports.getBinArrayAccountMetasCoverage = getBinArrayAccountMetasCoverage; exports.getBinArrayIndexesCoverage = getBinArrayIndexesCoverage; exports.getBinArrayInfoForNonContiguousBinIds = getBinArrayInfoForNonContiguousBinIds; exports.getBinArrayKeysCoverage = getBinArrayKeysCoverage; exports.getBinArrayLowerUpperBinId = getBinArrayLowerUpperBinId; exports.getBinArraysRequiredByPositionRange = getBinArraysRequiredByPositionRange; exports.getBinCount = getBinCount; exports.getBinFromBinArray = getBinFromBinArray; exports.getBinIdIndexInBinArray = getBinIdIndexInBinArray; exports.getBinMaxAmountOut = getBinMaxAmountOut; exports.getC = getC; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getExtendedPositionBinCount = getExtendedPositionBinCount; exports.getExtraAccountMetasForTransferHook = getExtraAccountMetasForTransferHook; exports.getFeeMode = getFeeMode; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getLimitOrderLiquidity = getLimitOrderLiquidity; exports.getLiquidityStrategyParameterBuilder = getLiquidityStrategyParameterBuilder; exports.getMultipleMintsExtraAccountMetasForTransferHook = getMultipleMintsExtraAccountMetasForTransferHook; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPositionCount = getPositionCount; exports.getPositionCountByBinCount = getPositionCountByBinCount; exports.getPositionExpandRentExemption = getPositionExpandRentExemption; exports.getPositionLowerUpperBinIdWithLiquidity = getPositionLowerUpperBinIdWithLiquidity; exports.getPositionRentExemption = getPositionRentExemption; exports.getPriceOfBinByBinId = getPriceOfBinByBinId; exports.getQPriceBaseFactor = getQPriceBaseFactor; exports.getQPriceFromId = getQPriceFromId; exports.getRebalanceBinArrayIndexesAndBitmapCoverage = getRebalanceBinArrayIndexesAndBitmapCoverage; exports.getSlippageMaxAmount = getSlippageMaxAmount; exports.getSlippageMinAmount = getSlippageMinAmount; exports.getTokenBalance = getTokenBalance; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgramId = getTokenProgramId; exports.getTokensMintFromPoolAddress = getTokensMintFromPoolAddress; exports.getTotalFee = getTotalFee; exports.getVariableFee = getVariableFee; exports.isBinIdWithinBinArray = isBinIdWithinBinArray; exports.isOverflowDefaultBinArrayBitmap = isOverflowDefaultBinArrayBitmap; exports.isPositionNoFee = isPositionNoFee; exports.isPositionNoReward = isPositionNoReward; exports.isSupportLimitOrder = isSupportLimitOrder; exports.limitOrderFilter = limitOrderFilter; exports.limitOrderLbPairFilter = limitOrderLbPairFilter; exports.limitOrderOwnerFilter = limitOrderOwnerFilter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.parseLogs = parseLogs; exports.positionLbPairFilter = positionLbPairFilter; exports.positionOwnerFilter = positionOwnerFilter; exports.positionV2Filter = positionV2Filter; exports.presetParameter2BaseFactorFilter = presetParameter2BaseFactorFilter; exports.presetParameter2BaseFeePowerFactor = presetParameter2BaseFeePowerFactor; exports.presetParameter2BinStepFilter = presetParameter2BinStepFilter; exports.range = range; exports.resetUninvolvedLiquidityParams = resetUninvolvedLiquidityParams; exports.shlDiv = shlDiv; exports.splitFee = splitFee; exports.suggestBalancedXParametersFromY = suggestBalancedXParametersFromY; exports.suggestBalancedYParametersFromX = suggestBalancedYParametersFromX; exports.swapExactInQuoteAtBin = swapExactInQuoteAtBin; exports.swapExactOutQuoteAtBin = swapExactOutQuoteAtBin; exports.toAmountAskSide = toAmountAskSide; exports.toAmountBidSide = toAmountBidSide; exports.toAmountBothSide = toAmountBothSide; exports.toAmountIntoBins = toAmountIntoBins; exports.toAmountsBothSideByStrategy = toAmountsBothSideByStrategy; exports.toStrategyParameters = toStrategyParameters; exports.toWeightDistribution = toWeightDistribution; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.wrapOracle = wrapOracle; exports.wrapPosition = wrapPosition; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
23099
23091
|
//# sourceMappingURL=index.js.map
|
|
23100
23092
|
|
|
23101
23093
|
// CJS interop: Make default export primary for require() compatibility
|