@meteora-ag/dlmm 1.5.0-rc.5 → 1.5.0-rc.6

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.mjs CHANGED
@@ -10520,13 +10520,15 @@ var SIMULATION_USER = new PublicKey(
10520
10520
  var PRECISION = 18446744073709552e3;
10521
10521
  var MAX_CLAIM_ALL_ALLOWED = 2;
10522
10522
  var MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26;
10523
- var MAX_BIN_PER_TX = 69;
10524
10523
  var MAX_ACTIVE_BIN_SLIPPAGE = 3;
10525
10524
  var ILM_BASE = new PublicKey(
10526
10525
  "MFGQxwAmB91SwuYX36okv2Qmdc9aMuHTwWGUrp4AtB1"
10527
10526
  );
10528
10527
  var MAX_EXTRA_BIN_ARRAYS = 3;
10529
10528
  var U64_MAX = new BN("18446744073709551615");
10529
+ var MAX_BINS_PER_POSITION = dlmm_zc_default.constants.find(
10530
+ ({ name }) => name == "POSITION_MAX_LENGTH"
10531
+ )?.value;
10530
10532
 
10531
10533
  // src/dlmm/error.ts
10532
10534
  import { AnchorError } from "@coral-xyz/anchor";
@@ -14417,7 +14419,9 @@ var DLMM = class {
14417
14419
  tokenBadgeX,
14418
14420
  tokenBadgeY
14419
14421
  ]);
14420
- const presetParameterState = await program.account.presetParameter2.fetch(presetParameter);
14422
+ const presetParameterState = await program.account.presetParameter2.fetch(
14423
+ presetParameter
14424
+ );
14421
14425
  const existsPool = await this.getPairPubkeyIfExists(
14422
14426
  connection,
14423
14427
  tokenX,
@@ -15036,7 +15040,9 @@ var DLMM = class {
15036
15040
  lowerBinArrayIndex.add(new BN14(1))
15037
15041
  );
15038
15042
  const binArraysCount = (await this.binArraysToBeCreate(lowerBinArrayIndex, upperBinArrayIndex)).length;
15039
- const positionCount = Math.ceil((maxBinId - minBinId + 1) / MAX_BIN_PER_TX);
15043
+ const positionCount = Math.ceil(
15044
+ (maxBinId - minBinId + 1) / Number(MAX_BINS_PER_POSITION)
15045
+ );
15040
15046
  const binArrayCost = binArraysCount * BIN_ARRAY_FEE;
15041
15047
  const positionCost = positionCount * POSITION_FEE;
15042
15048
  return {
@@ -16104,7 +16110,9 @@ var DLMM = class {
16104
16110
  slippage
16105
16111
  }) {
16106
16112
  const maxActiveBinSlippage = slippage ? Math.ceil(slippage / (this.lbPair.binStep / 100)) : MAX_ACTIVE_BIN_SLIPPAGE;
16107
- const positionAccount = await this.program.account.positionV2.fetch(positionPubKey);
16113
+ const positionAccount = await this.program.account.positionV2.fetch(
16114
+ positionPubKey
16115
+ );
16108
16116
  const { lowerBinId, upperBinId, binIds } = this.processXYAmountDistribution(xYAmountDistribution);
16109
16117
  if (lowerBinId < positionAccount.lowerBinId)
16110
16118
  throw new Error(
@@ -29514,9 +29522,9 @@ export {
29514
29522
  ILM_BASE,
29515
29523
  LBCLMM_PROGRAM_IDS,
29516
29524
  MAX_ACTIVE_BIN_SLIPPAGE,
29525
+ MAX_BINS_PER_POSITION,
29517
29526
  MAX_BIN_ARRAY_SIZE,
29518
29527
  MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX,
29519
- MAX_BIN_PER_TX,
29520
29528
  MAX_CLAIM_ALL_ALLOWED,
29521
29529
  MAX_EXTRA_BIN_ARRAYS,
29522
29530
  MAX_FEE_RATE,