@meteora-ag/dlmm 1.9.12-rc.1 → 1.9.13

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.js CHANGED
@@ -10205,7 +10205,6 @@ var CollectFeeMode = /* @__PURE__ */ ((CollectFeeMode2) => {
10205
10205
  CollectFeeMode2[CollectFeeMode2["OnlyY"] = 1] = "OnlyY";
10206
10206
  return CollectFeeMode2;
10207
10207
  })(CollectFeeMode || {});
10208
- var MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT = 5;
10209
10208
 
10210
10209
  // src/dlmm/error.ts
10211
10210
 
@@ -13276,7 +13275,7 @@ function binRangeToBinIdArray(minBinId, maxBinId) {
13276
13275
  }
13277
13276
  return binIdArray;
13278
13277
  }
13279
- function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, pairAddress, programId, maxActiveBinSlippage = 0, includeSlippageForBinArray = false) {
13278
+ function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, pairAddress, programId) {
13280
13279
  let indexMap = /* @__PURE__ */ new Map();
13281
13280
  removes.forEach((value) => {
13282
13281
  let minBinId = value.minBinId;
@@ -13302,13 +13301,10 @@ function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, p
13302
13301
  adds.forEach((value) => {
13303
13302
  const minBinId = activeId + value.minDeltaId;
13304
13303
  const maxBinId = activeId + value.maxDeltaId;
13305
- let binArrayIndex = binIdToBinArrayIndex(
13306
- includeSlippageForBinArray ? new (0, _bnjs2.default)(minBinId - maxActiveBinSlippage) : new (0, _bnjs2.default)(minBinId)
13307
- );
13308
- let binArrayIndexes2 = [];
13309
- 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);
13310
13306
  while (true) {
13311
- binArrayIndexes2.push(binArrayIndex.toNumber());
13307
+ indexMap.set(binArrayIndex.toNumber(), true);
13312
13308
  const [binArrayLowerBinId, binArrayUpperBinId] = getBinArrayLowerUpperBinId(binArrayIndex);
13313
13309
  if (upperBinId.gte(binArrayLowerBinId) && upperBinId.lte(binArrayUpperBinId)) {
13314
13310
  break;
@@ -13316,13 +13312,6 @@ function getRebalanceBinArrayIndexesAndBitmapCoverage(adds, removes, activeId, p
13316
13312
  binArrayIndex = binArrayIndex.add(new (0, _bnjs2.default)(1));
13317
13313
  }
13318
13314
  }
13319
- if (includeSlippageForBinArray && binArrayIndexes2.length > MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) {
13320
- const start = Math.floor((binArrayIndexes2.length - MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) / 2);
13321
- binArrayIndexes2 = binArrayIndexes2.slice(start, start + MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT);
13322
- }
13323
- binArrayIndexes2.forEach((index) => {
13324
- indexMap.set(index, true);
13325
- });
13326
13315
  });
13327
13316
  const binArrayIndexes = Array.from(indexMap.keys()).map((idx) => new (0, _bnjs2.default)(idx));
13328
13317
  const requireBitmapExtension = binArrayIndexes.some(
@@ -15326,7 +15315,7 @@ function resetUninvolvedLiquidityParams(minDeltaId, maxDeltaId, favorXInActiveId
15326
15315
  deltaY
15327
15316
  };
15328
15317
  }
15329
- async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercentage, maxActiveBinSlippage, position, positionMinBinId, positionMaxBinId, liquidityStrategyParameters, owner, payer, isParallel, skipSolWrappingOperation = false, includeSlippageForBinArray = false) {
15318
+ async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercentage, maxActiveBinSlippage, position, positionMinBinId, positionMaxBinId, liquidityStrategyParameters, owner, payer, isParallel, skipSolWrappingOperation = false) {
15330
15319
  const { slices, accounts: transferHookAccounts } = dlmm.getPotentialToken2022IxDataAndAccounts(0 /* Liquidity */);
15331
15320
  const userTokenX = _spltoken.getAssociatedTokenAddressSync.call(void 0,
15332
15321
  dlmm.lbPair.tokenXMint,
@@ -15367,14 +15356,10 @@ async function chunkDepositWithRebalanceEndpoint(dlmm, strategy, slippagePercent
15367
15356
  const chunkMaxBinId = chunkedBinRange[i].upperBinId;
15368
15357
  const initBinArrayIxs = [];
15369
15358
  const initBitmapIxs = [];
15370
- let binArrayIndexes = getBinArrayIndexesCoverage(
15371
- includeSlippageForBinArray ? new (0, _anchor.BN)(chunkMinBinId - maxActiveBinSlippage) : new (0, _anchor.BN)(chunkMinBinId),
15372
- includeSlippageForBinArray ? new (0, _anchor.BN)(chunkMaxBinId + maxActiveBinSlippage) : new (0, _anchor.BN)(chunkMaxBinId)
15359
+ const binArrayIndexes = getBinArrayIndexesCoverage(
15360
+ new (0, _anchor.BN)(chunkMinBinId),
15361
+ new (0, _anchor.BN)(chunkMaxBinId)
15373
15362
  );
15374
- if (includeSlippageForBinArray && binArrayIndexes.length > MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) {
15375
- const start = Math.floor((binArrayIndexes.length - MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT) / 2);
15376
- binArrayIndexes = binArrayIndexes.slice(start, start + MAX_ALLOWED_REBALANCE_BIN_ARRAY_COUNT);
15377
- }
15378
15363
  const overflowDefaultBinArrayBitmap = binArrayIndexes.reduce(
15379
15364
  (acc, binArrayIndex) => acc || isOverflowDefaultBinArrayBitmap(binArrayIndex),
15380
15365
  false
@@ -16763,6 +16748,242 @@ var DLMM = class {
16763
16748
  }
16764
16749
  return positionsMap;
16765
16750
  }
16751
+ /**
16752
+ * The function `getPositionsByUserAndTokenAddress` retrieves all of a user's positions across every
16753
+ * DLMM pool that includes the given token mint as either the X or Y token.
16754
+ * @param {Connection} connection - The `connection` parameter is an instance of the `Connection`
16755
+ * class, which represents the connection to the Solana blockchain.
16756
+ * @param {PublicKey} userPubKey - The user's wallet public key.
16757
+ * @param {PublicKey} tokenMint - The token mint used to filter pools. Only positions in pools whose
16758
+ * `tokenXMint` or `tokenYMint` matches this mint are returned.
16759
+ * @param {Opt} [opt] - An optional object that contains additional options for the function.
16760
+ * @param {GetPositionsOpt} [getPositionsOpt] - Optional settings for chunked position fetching
16761
+ * @returns The function `getPositionsByUserAndTokenAddress` returns a `Promise` that resolves to a
16762
+ * `Map` object. The `Map` object contains key-value pairs, where the key is a string representing the
16763
+ * LB Pair account, and the value is an object of PositionInfo. Only pools containing `tokenMint` are
16764
+ * included.
16765
+ */
16766
+ static async getPositionsByUserAndTokenAddress(connection, userPubKey, tokenMint, opt, getPositionsOpt) {
16767
+ const allPositions = await DLMM.getAllLbPairPositionsByUser(
16768
+ connection,
16769
+ userPubKey,
16770
+ opt,
16771
+ getPositionsOpt
16772
+ );
16773
+ const targetMint = tokenMint.toBase58();
16774
+ const filteredPositions = /* @__PURE__ */ new Map();
16775
+ for (const [lbPairKey, positionInfo] of allPositions) {
16776
+ const tokenXMint = positionInfo.lbPair.tokenXMint.toBase58();
16777
+ const tokenYMint = positionInfo.lbPair.tokenYMint.toBase58();
16778
+ if (tokenXMint === targetMint || tokenYMint === targetMint) {
16779
+ filteredPositions.set(lbPairKey, positionInfo);
16780
+ }
16781
+ }
16782
+ return filteredPositions;
16783
+ }
16784
+ /**
16785
+ * The function `getLimitOrdersByUserAndTokenAddress` retrieves all of a user's limit orders across
16786
+ * every DLMM pool that includes the given token mint as either the X or Y token.
16787
+ * @param {Connection} connection - The `connection` parameter is an instance of the `Connection`
16788
+ * class, which represents the connection to the Solana blockchain.
16789
+ * @param {PublicKey} userPubKey - The user's wallet public key.
16790
+ * @param {PublicKey} tokenMint - The token mint used to filter pools. Only limit orders in pools
16791
+ * whose `tokenXMint` or `tokenYMint` matches this mint are returned.
16792
+ * @param {Opt} [opt] - An optional object that contains additional options for the function.
16793
+ * @returns The function `getLimitOrdersByUserAndTokenAddress` returns a `Promise` that resolves to a
16794
+ * `Map` object keyed by LB Pair account (base58), where each value is a `LimitOrderInfo` containing
16795
+ * the LB pair state, token reserves, and the parsed limit orders for that pool.
16796
+ */
16797
+ static async getLimitOrdersByUserAndTokenAddress(connection, userPubKey, tokenMint, opt) {
16798
+ const program = createProgram(connection, opt);
16799
+ const limitOrderAccounts = await chunkedGetProgramAccounts(
16800
+ program.provider.connection,
16801
+ program.programId,
16802
+ [limitOrderFilter(), limitOrderOwnerFilter(userPubKey)]
16803
+ );
16804
+ const limitOrderWrappers = limitOrderAccounts.map(
16805
+ ({ pubkey, account }) => wrapLimitOrder(program, pubkey, account)
16806
+ );
16807
+ if (limitOrderWrappers.length === 0) {
16808
+ return /* @__PURE__ */ new Map();
16809
+ }
16810
+ const lbPairKeys = Array.from(
16811
+ new Set(limitOrderWrappers.map((lo) => lo.lbPair().toBase58()))
16812
+ ).map((key) => new (0, _web3js.PublicKey)(key));
16813
+ const lbPairAccInfos = await chunkedGetMultipleAccountInfos(
16814
+ connection,
16815
+ lbPairKeys
16816
+ );
16817
+ const lbPairMap = /* @__PURE__ */ new Map();
16818
+ lbPairKeys.forEach((lbPairPubkey, i) => {
16819
+ const accInfo = lbPairAccInfos[i];
16820
+ if (!accInfo) {
16821
+ throw new Error(`LB Pair account ${lbPairPubkey.toBase58()} not found`);
16822
+ }
16823
+ lbPairMap.set(
16824
+ lbPairPubkey.toBase58(),
16825
+ decodeAccount(program, "lbPair", accInfo.data)
16826
+ );
16827
+ });
16828
+ const targetMint = tokenMint.toBase58();
16829
+ const matchingLbPairKeys = lbPairKeys.filter((lbPairPubkey) => {
16830
+ const lbPairState = lbPairMap.get(lbPairPubkey.toBase58());
16831
+ return lbPairState.tokenXMint.toBase58() === targetMint || lbPairState.tokenYMint.toBase58() === targetMint;
16832
+ });
16833
+ if (matchingLbPairKeys.length === 0) {
16834
+ return /* @__PURE__ */ new Map();
16835
+ }
16836
+ const matchingLbPairSet = new Set(
16837
+ matchingLbPairKeys.map((key) => key.toBase58())
16838
+ );
16839
+ const matchingLimitOrders = limitOrderWrappers.filter(
16840
+ (lo) => matchingLbPairSet.has(lo.lbPair().toBase58())
16841
+ );
16842
+ const reserveAndMintKeys = matchingLbPairKeys.map((lbPairPubkey) => {
16843
+ const { reserveX, reserveY, tokenXMint, tokenYMint } = lbPairMap.get(
16844
+ lbPairPubkey.toBase58()
16845
+ );
16846
+ return [reserveX, reserveY, tokenXMint, tokenYMint];
16847
+ }).flat();
16848
+ const binArrayPubkeySet = /* @__PURE__ */ new Set();
16849
+ matchingLimitOrders.forEach((lo) => {
16850
+ lo.getBinArrayKeysCoverage(program.programId).forEach((key) => {
16851
+ binArrayPubkeySet.add(key.toBase58());
16852
+ });
16853
+ });
16854
+ const binArrayKeys = Array.from(binArrayPubkeySet).map(
16855
+ (key) => new (0, _web3js.PublicKey)(key)
16856
+ );
16857
+ const [clockAccInfo, ...rest] = await chunkedGetMultipleAccountInfos(
16858
+ connection,
16859
+ [_web3js.SYSVAR_CLOCK_PUBKEY, ...binArrayKeys, ...reserveAndMintKeys]
16860
+ );
16861
+ const binArraysAccInfo = rest.slice(0, binArrayKeys.length);
16862
+ const reserveAndMintAccInfo = rest.slice(binArrayKeys.length);
16863
+ const clock = ClockLayout.decode(clockAccInfo.data);
16864
+ const binArrayMap = /* @__PURE__ */ new Map();
16865
+ binArrayKeys.forEach((binArrayPubkey, i) => {
16866
+ const accInfo = binArraysAccInfo[i];
16867
+ if (accInfo) {
16868
+ binArrayMap.set(
16869
+ binArrayPubkey.toBase58(),
16870
+ decodeAccount(program, "binArray", accInfo.data)
16871
+ );
16872
+ }
16873
+ });
16874
+ const seenMints = /* @__PURE__ */ new Set();
16875
+ const mintsWithAccount = matchingLbPairKeys.flatMap((lbPairPubkey, idx) => {
16876
+ const { tokenXMint, tokenYMint } = lbPairMap.get(
16877
+ lbPairPubkey.toBase58()
16878
+ );
16879
+ const index = idx * 4;
16880
+ return [
16881
+ {
16882
+ mintAddress: tokenXMint,
16883
+ mintAccountInfo: reserveAndMintAccInfo[index + 2]
16884
+ },
16885
+ {
16886
+ mintAddress: tokenYMint,
16887
+ mintAccountInfo: reserveAndMintAccInfo[index + 3]
16888
+ }
16889
+ ];
16890
+ }).filter(({ mintAddress, mintAccountInfo }) => {
16891
+ if (!mintAccountInfo || seenMints.has(mintAddress.toBase58())) {
16892
+ return false;
16893
+ }
16894
+ seenMints.add(mintAddress.toBase58());
16895
+ return true;
16896
+ });
16897
+ const mintHookAccountsMap = await getMultipleMintsExtraAccountMetasForTransferHook(
16898
+ connection,
16899
+ mintsWithAccount
16900
+ );
16901
+ const lbPairTokenMap = /* @__PURE__ */ new Map();
16902
+ matchingLbPairKeys.forEach((lbPairPubkey, idx) => {
16903
+ const index = idx * 4;
16904
+ const reserveXAccount = reserveAndMintAccInfo[index];
16905
+ const reserveYAccount = reserveAndMintAccInfo[index + 1];
16906
+ const mintXAccount = reserveAndMintAccInfo[index + 2];
16907
+ const mintYAccount = reserveAndMintAccInfo[index + 3];
16908
+ if (!reserveXAccount || !reserveYAccount) {
16909
+ throw new Error(
16910
+ `Reserve account for LB Pair ${lbPairPubkey.toBase58()} not found`
16911
+ );
16912
+ }
16913
+ if (!mintXAccount || !mintYAccount) {
16914
+ throw new Error(
16915
+ `Mint account for LB Pair ${lbPairPubkey.toBase58()} not found`
16916
+ );
16917
+ }
16918
+ const lbPairState = lbPairMap.get(lbPairPubkey.toBase58());
16919
+ const reserveAccX = _spltoken.AccountLayout.decode(reserveXAccount.data);
16920
+ const reserveAccY = _spltoken.AccountLayout.decode(reserveYAccount.data);
16921
+ const mintX = _spltoken.unpackMint.call(void 0,
16922
+ reserveAccX.mint,
16923
+ mintXAccount,
16924
+ mintXAccount.owner
16925
+ );
16926
+ const mintY = _spltoken.unpackMint.call(void 0,
16927
+ reserveAccY.mint,
16928
+ mintYAccount,
16929
+ mintYAccount.owner
16930
+ );
16931
+ const { tokenXProgram, tokenYProgram } = getTokenProgramId(lbPairState);
16932
+ const tokenX = {
16933
+ publicKey: lbPairState.tokenXMint,
16934
+ reserve: lbPairState.reserveX,
16935
+ amount: reserveAccX.amount,
16936
+ mint: mintX,
16937
+ owner: tokenXProgram,
16938
+ transferHookAccountMetas: _nullishCoalesce(mintHookAccountsMap.get(lbPairState.tokenXMint.toBase58()), () => ( []))
16939
+ };
16940
+ const tokenY = {
16941
+ publicKey: lbPairState.tokenYMint,
16942
+ reserve: lbPairState.reserveY,
16943
+ amount: reserveAccY.amount,
16944
+ mint: mintY,
16945
+ owner: tokenYProgram,
16946
+ transferHookAccountMetas: _nullishCoalesce(mintHookAccountsMap.get(lbPairState.tokenYMint.toBase58()), () => ( []))
16947
+ };
16948
+ lbPairTokenMap.set(lbPairPubkey.toBase58(), {
16949
+ tokenX,
16950
+ tokenY,
16951
+ mintX,
16952
+ mintY
16953
+ });
16954
+ });
16955
+ const limitOrdersMap = /* @__PURE__ */ new Map();
16956
+ for (const lo of matchingLimitOrders) {
16957
+ const lbPairKey = lo.lbPair().toBase58();
16958
+ const lbPairState = lbPairMap.get(lbPairKey);
16959
+ const { tokenX, tokenY, mintX, mintY } = lbPairTokenMap.get(lbPairKey);
16960
+ const parsedLo = lo.parseInfo(
16961
+ program.programId,
16962
+ lbPairState,
16963
+ mintX,
16964
+ mintY,
16965
+ clock,
16966
+ binArrayMap
16967
+ );
16968
+ const entry = {
16969
+ publicKey: lo.address(),
16970
+ limitOrderData: parsedLo
16971
+ };
16972
+ const existing = limitOrdersMap.get(lbPairKey);
16973
+ if (existing) {
16974
+ existing.limitOrders.push(entry);
16975
+ } else {
16976
+ limitOrdersMap.set(lbPairKey, {
16977
+ publicKey: lo.lbPair(),
16978
+ lbPair: lbPairState,
16979
+ tokenX,
16980
+ tokenY,
16981
+ limitOrders: [entry]
16982
+ });
16983
+ }
16984
+ }
16985
+ return limitOrdersMap;
16986
+ }
16766
16987
  static getPricePerLamport(tokenXDecimal, tokenYDecimal, price) {
16767
16988
  return new (0, _decimaljs2.default)(price).mul(new (0, _decimaljs2.default)(10 ** (tokenYDecimal - tokenXDecimal))).toString();
16768
16989
  }
@@ -18170,7 +18391,7 @@ var DLMM = class {
18170
18391
  * @param slippagePercentage The slippage percentage for adding liquidity.
18171
18392
  * @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
18172
18393
  */
18173
- async initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage, altAddress, includeSlippageForBinArray = false) {
18394
+ async initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage, altAddress) {
18174
18395
  const maxActiveBinSlippage = getAndCapMaxActiveBinSlippage(
18175
18396
  slippagePercentage,
18176
18397
  this.lbPair.binStep,
@@ -18241,8 +18462,7 @@ var DLMM = class {
18241
18462
  owner,
18242
18463
  payer,
18243
18464
  true,
18244
- _optionalChain([this, 'access', _110 => _110.opt, 'optionalAccess', _111 => _111.skipSolWrappingOperation]),
18245
- includeSlippageForBinArray
18465
+ _optionalChain([this, 'access', _110 => _110.opt, 'optionalAccess', _111 => _111.skipSolWrappingOperation])
18246
18466
  );
18247
18467
  for (const instructions of addLiquidityIxs) {
18248
18468
  const txIxs = [];
@@ -18278,7 +18498,7 @@ var DLMM = class {
18278
18498
  * @param slippagePercentage The slippage percentage for adding liquidity.
18279
18499
  * @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
18280
18500
  */
18281
- async initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage, includeSlippageForBinArray = false) {
18501
+ async initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator, totalXAmount, totalYAmount, strategy, owner, payer, slippagePercentage) {
18282
18502
  const maxActiveBinSlippage = getAndCapMaxActiveBinSlippage(
18283
18503
  slippagePercentage,
18284
18504
  this.lbPair.binStep,
@@ -18364,8 +18584,7 @@ var DLMM = class {
18364
18584
  owner,
18365
18585
  payer,
18366
18586
  false,
18367
- _optionalChain([this, 'access', _112 => _112.opt, 'optionalAccess', _113 => _113.skipSolWrappingOperation]),
18368
- includeSlippageForBinArray
18587
+ _optionalChain([this, 'access', _112 => _112.opt, 'optionalAccess', _113 => _113.skipSolWrappingOperation])
18369
18588
  );
18370
18589
  instructionsByPositions.push({
18371
18590
  positionKeypair: position,
@@ -18399,8 +18618,7 @@ var DLMM = class {
18399
18618
  totalYAmount,
18400
18619
  strategy,
18401
18620
  user,
18402
- slippage,
18403
- includeSlippageForBinArray = false
18621
+ slippage
18404
18622
  }) {
18405
18623
  const maxActiveBinSlippage = getAndCapMaxActiveBinSlippage(
18406
18624
  slippage,
@@ -18430,8 +18648,7 @@ var DLMM = class {
18430
18648
  user,
18431
18649
  user,
18432
18650
  true,
18433
- _optionalChain([this, 'access', _114 => _114.opt, 'optionalAccess', _115 => _115.skipSolWrappingOperation]),
18434
- includeSlippageForBinArray
18651
+ _optionalChain([this, 'access', _114 => _114.opt, 'optionalAccess', _115 => _115.skipSolWrappingOperation])
18435
18652
  );
18436
18653
  const latestBlockhashInfo = await this.program.provider.connection.getLatestBlockhash();
18437
18654
  return chunkedAddLiquidityIx.map((ixs) => {
@@ -21685,7 +21902,7 @@ var DLMM = class {
21685
21902
  *
21686
21903
  * @returns An object containing the instructions to initialize new bin arrays and the instruction to rebalance the position.
21687
21904
  */
21688
- async rebalancePosition(rebalancePositionResponse, maxActiveBinSlippage, rentPayer, slippage = 100, includeSlippageForBinArray = false) {
21905
+ async rebalancePosition(rebalancePositionResponse, maxActiveBinSlippage, rentPayer, slippage = 100) {
21689
21906
  const { rebalancePosition, simulationResult } = rebalancePositionResponse;
21690
21907
  const { lbPair, shouldClaimFee, shouldClaimReward, owner, address } = rebalancePosition;
21691
21908
  const { depositParams, withdrawParams } = simulationResult;
@@ -21758,9 +21975,7 @@ var DLMM = class {
21758
21975
  withdrawParams,
21759
21976
  activeId.toNumber(),
21760
21977
  this.pubkey,
21761
- this.program.programId,
21762
- maxActiveBinSlippage.toNumber(),
21763
- includeSlippageForBinArray
21978
+ this.program.programId
21764
21979
  );
21765
21980
  const binArrayPublicKeys = binArrayIndexes.map((index) => {
21766
21981
  const [binArrayPubkey] = deriveBinArray(
@@ -23108,8 +23323,7 @@ var src_default = DLMM;
23108
23323
 
23109
23324
 
23110
23325
 
23111
-
23112
- 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_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;
23326
+ 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;
23113
23327
  //# sourceMappingURL=index.js.map
23114
23328
 
23115
23329
  // CJS interop: Make default export primary for require() compatibility