@meteora-ag/dlmm 1.3.11 → 1.3.12-rc.0

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
@@ -6472,13 +6472,42 @@ function generateBinAmount(amount, binStep, binId, tokenXDecimal, tokenYDecimal,
6472
6472
  return new (0, _anchor.BN)(c1.sub(c0).floor().toString());
6473
6473
  }
6474
6474
 
6475
- // src/dlmm/helpers/index.ts
6476
- var _helpers = require('@solana-developers/helpers');
6477
-
6478
6475
  // src/dlmm/helpers/computeUnit.ts
6476
+
6479
6477
  var DEFAULT_ADD_LIQUIDITY_CU = 8e5;
6480
6478
  var MIN_CU_BUFFER = 5e4;
6481
6479
  var MAX_CU_BUFFER = 2e5;
6480
+ var getSimulationComputeUnits = async (connection, instructions, payer, lookupTables, commitment = "confirmed") => {
6481
+ const testInstructions = [
6482
+ // Set an arbitrarily high number in simulation
6483
+ // so we can be sure the transaction will succeed
6484
+ // and get the real compute units used
6485
+ _web3js.ComputeBudgetProgram.setComputeUnitLimit({ units: 14e5 }),
6486
+ ...instructions
6487
+ ];
6488
+ const testTransaction = new (0, _web3js.VersionedTransaction)(
6489
+ new (0, _web3js.TransactionMessage)({
6490
+ instructions: testInstructions,
6491
+ payerKey: payer,
6492
+ // RecentBlockhash can by any public key during simulation
6493
+ // since 'replaceRecentBlockhash' is set to 'true' below
6494
+ recentBlockhash: _web3js.PublicKey.default.toString()
6495
+ }).compileToV0Message(lookupTables)
6496
+ );
6497
+ const rpcResponse = await connection.simulateTransaction(testTransaction, {
6498
+ replaceRecentBlockhash: true,
6499
+ sigVerify: false,
6500
+ commitment
6501
+ });
6502
+ if (_optionalChain([rpcResponse, 'optionalAccess', _21 => _21.value, 'optionalAccess', _22 => _22.err])) {
6503
+ const logs = _optionalChain([rpcResponse, 'access', _23 => _23.value, 'access', _24 => _24.logs, 'optionalAccess', _25 => _25.join, 'call', _26 => _26("\n \u2022 ")]) || "No logs available";
6504
+ throw new Error(
6505
+ `Transaction simulation failed:
6506
+ \u2022${logs}` + JSON.stringify(_optionalChain([rpcResponse, 'optionalAccess', _27 => _27.value, 'optionalAccess', _28 => _28.err]))
6507
+ );
6508
+ }
6509
+ return rpcResponse.value.unitsConsumed || null;
6510
+ };
6482
6511
 
6483
6512
  // src/dlmm/helpers/derive.ts
6484
6513
 
@@ -7615,7 +7644,7 @@ async function getTokensMintFromPoolAddress(connection, poolAddress, opt) {
7615
7644
  );
7616
7645
  const program = new (0, _anchor.Program)(
7617
7646
  IDL,
7618
- LBCLMM_PROGRAM_IDS[_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _21 => _21.cluster]), () => ( "mainnet-beta"))],
7647
+ LBCLMM_PROGRAM_IDS[_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _29 => _29.cluster]), () => ( "mainnet-beta"))],
7619
7648
  provider
7620
7649
  );
7621
7650
  const poolAccount = await program.account.lbPair.fetchNullable(
@@ -7693,7 +7722,7 @@ async function getTokenBalance(conn, tokenAccount) {
7693
7722
  var parseLogs = (eventParser, logs) => {
7694
7723
  if (!logs.length)
7695
7724
  throw new Error("No logs found");
7696
- for (const event of _optionalChain([eventParser, 'optionalAccess', _22 => _22.parseLogs, 'call', _23 => _23(logs)])) {
7725
+ for (const event of _optionalChain([eventParser, 'optionalAccess', _30 => _30.parseLogs, 'call', _31 => _31(logs)])) {
7697
7726
  return event.data;
7698
7727
  }
7699
7728
  throw new Error("No events found");
@@ -7750,7 +7779,7 @@ var getEstimatedComputeUnitUsageWithBuffer = async (connection, instructions, fe
7750
7779
  }
7751
7780
  buffer = Math.max(0, buffer);
7752
7781
  buffer = Math.min(1, buffer);
7753
- const estimatedComputeUnitUsage = await _helpers.getSimulationComputeUnits.call(void 0,
7782
+ const estimatedComputeUnitUsage = await getSimulationComputeUnits(
7754
7783
  connection,
7755
7784
  instructions,
7756
7785
  feePayer,
@@ -7808,13 +7837,13 @@ var DLMM = class {
7808
7837
  );
7809
7838
  const program = new (0, _anchor.Program)(
7810
7839
  IDL,
7811
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _24 => _24.programId]), () => ( LBCLMM_PROGRAM_IDS[_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _25 => _25.cluster]), () => ( "mainnet-beta"))])),
7840
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _32 => _32.programId]), () => ( LBCLMM_PROGRAM_IDS[_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _33 => _33.cluster]), () => ( "mainnet-beta"))])),
7812
7841
  provider
7813
7842
  );
7814
7843
  return program.account.lbPair.all();
7815
7844
  }
7816
7845
  static async getPairPubkeyIfExists(connection, tokenX, tokenY, binStep, baseFactor, opt) {
7817
- const cluster = _optionalChain([opt, 'optionalAccess', _26 => _26.cluster]) || "mainnet-beta";
7846
+ const cluster = _optionalChain([opt, 'optionalAccess', _34 => _34.cluster]) || "mainnet-beta";
7818
7847
  const provider = new (0, _anchor.AnchorProvider)(
7819
7848
  connection,
7820
7849
  {},
@@ -7822,7 +7851,7 @@ var DLMM = class {
7822
7851
  );
7823
7852
  const program = new (0, _anchor.Program)(
7824
7853
  IDL,
7825
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _27 => _27.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
7854
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _35 => _35.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
7826
7855
  provider
7827
7856
  );
7828
7857
  try {
@@ -7861,7 +7890,7 @@ var DLMM = class {
7861
7890
  * @returns The `create` function returns a `Promise` that resolves to a `DLMM` object.
7862
7891
  */
7863
7892
  static async create(connection, dlmm, opt) {
7864
- const cluster = _optionalChain([opt, 'optionalAccess', _28 => _28.cluster]) || "mainnet-beta";
7893
+ const cluster = _optionalChain([opt, 'optionalAccess', _36 => _36.cluster]) || "mainnet-beta";
7865
7894
  const provider = new (0, _anchor.AnchorProvider)(
7866
7895
  connection,
7867
7896
  {},
@@ -7869,7 +7898,7 @@ var DLMM = class {
7869
7898
  );
7870
7899
  const program = new (0, _anchor.Program)(
7871
7900
  IDL,
7872
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _29 => _29.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
7901
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _37 => _37.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
7873
7902
  provider
7874
7903
  );
7875
7904
  const binArrayBitMapExtensionPubkey = deriveBinArrayBitmapExtension(
@@ -7885,14 +7914,14 @@ var DLMM = class {
7885
7914
  connection,
7886
7915
  accountsToFetch
7887
7916
  );
7888
- const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _30 => _30[0], 'optionalAccess', _31 => _31.data]);
7917
+ const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _38 => _38[0], 'optionalAccess', _39 => _39.data]);
7889
7918
  if (!lbPairAccountInfoBuffer)
7890
7919
  throw new Error(`LB Pair account ${dlmm.toBase58()} not found`);
7891
7920
  const lbPairAccInfo = program.coder.accounts.decode(
7892
7921
  "lbPair",
7893
7922
  lbPairAccountInfoBuffer
7894
7923
  );
7895
- const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _32 => _32[1], 'optionalAccess', _33 => _33.data]);
7924
+ const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _40 => _40[1], 'optionalAccess', _41 => _41.data]);
7896
7925
  let binArrayBitMapExtensionAccInfo = null;
7897
7926
  if (binArrayBitMapAccountInfoBuffer) {
7898
7927
  binArrayBitMapExtensionAccInfo = program.coder.accounts.decode(
@@ -7900,7 +7929,7 @@ var DLMM = class {
7900
7929
  binArrayBitMapAccountInfoBuffer
7901
7930
  );
7902
7931
  }
7903
- const clockAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _34 => _34[2], 'optionalAccess', _35 => _35.data]);
7932
+ const clockAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _42 => _42[2], 'optionalAccess', _43 => _43.data]);
7904
7933
  if (!clockAccountInfoBuffer)
7905
7934
  throw new Error(`Clock account not found`);
7906
7935
  const clock = ClockLayout.decode(clockAccountInfoBuffer);
@@ -7961,7 +7990,7 @@ var DLMM = class {
7961
7990
  * objects.
7962
7991
  */
7963
7992
  static async createMultiple(connection, dlmmList, opt) {
7964
- const cluster = _optionalChain([opt, 'optionalAccess', _36 => _36.cluster]) || "mainnet-beta";
7993
+ const cluster = _optionalChain([opt, 'optionalAccess', _44 => _44.cluster]) || "mainnet-beta";
7965
7994
  const provider = new (0, _anchor.AnchorProvider)(
7966
7995
  connection,
7967
7996
  {},
@@ -7969,7 +7998,7 @@ var DLMM = class {
7969
7998
  );
7970
7999
  const program = new (0, _anchor.Program)(
7971
8000
  IDL,
7972
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _37 => _37.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
8001
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _45 => _45.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
7973
8002
  provider
7974
8003
  );
7975
8004
  const binArrayBitMapExtensions = dlmmList.map(
@@ -7985,14 +8014,14 @@ var DLMM = class {
7985
8014
  accountsToFetch
7986
8015
  );
7987
8016
  const clockAccount = accountsInfo.pop();
7988
- const clockAccountInfoBuffer = _optionalChain([clockAccount, 'optionalAccess', _38 => _38.data]);
8017
+ const clockAccountInfoBuffer = _optionalChain([clockAccount, 'optionalAccess', _46 => _46.data]);
7989
8018
  if (!clockAccountInfoBuffer)
7990
8019
  throw new Error(`Clock account not found`);
7991
8020
  const clock = ClockLayout.decode(clockAccountInfoBuffer);
7992
8021
  const lbPairArraysMap = /* @__PURE__ */ new Map();
7993
8022
  for (let i = 0; i < dlmmList.length; i++) {
7994
8023
  const lbPairPubKey = dlmmList[i];
7995
- const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _39 => _39[i], 'optionalAccess', _40 => _40.data]);
8024
+ const lbPairAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _47 => _47[i], 'optionalAccess', _48 => _48.data]);
7996
8025
  if (!lbPairAccountInfoBuffer)
7997
8026
  throw new Error(`LB Pair account ${lbPairPubKey.toBase58()} not found`);
7998
8027
  const binArrayAccInfo = program.coder.accounts.decode(
@@ -8005,7 +8034,7 @@ var DLMM = class {
8005
8034
  for (let i = dlmmList.length; i < accountsInfo.length; i++) {
8006
8035
  const index = i - dlmmList.length;
8007
8036
  const lbPairPubkey = dlmmList[index];
8008
- const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _41 => _41[i], 'optionalAccess', _42 => _42.data]);
8037
+ const binArrayBitMapAccountInfoBuffer = _optionalChain([accountsInfo, 'access', _49 => _49[i], 'optionalAccess', _50 => _50.data]);
8009
8038
  if (binArrayBitMapAccountInfoBuffer) {
8010
8039
  const binArrayBitMapExtensionAccInfo = program.coder.accounts.decode(
8011
8040
  "binArrayBitmapExtension",
@@ -8089,7 +8118,7 @@ var DLMM = class {
8089
8118
  );
8090
8119
  const program = new (0, _anchor.Program)(
8091
8120
  IDL,
8092
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _43 => _43.programId]), () => ( LBCLMM_PROGRAM_IDS[_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _44 => _44.cluster]), () => ( "mainnet-beta"))])),
8121
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _51 => _51.programId]), () => ( LBCLMM_PROGRAM_IDS[_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _52 => _52.cluster]), () => ( "mainnet-beta"))])),
8093
8122
  provider
8094
8123
  );
8095
8124
  const presetParameter = await program.account.presetParameter.all();
@@ -8107,7 +8136,7 @@ var DLMM = class {
8107
8136
  * Pair account, and the value is an object of PositionInfo
8108
8137
  */
8109
8138
  static async getAllLbPairPositionsByUser(connection, userPubKey, opt) {
8110
- const cluster = _optionalChain([opt, 'optionalAccess', _45 => _45.cluster]) || "mainnet-beta";
8139
+ const cluster = _optionalChain([opt, 'optionalAccess', _53 => _53.cluster]) || "mainnet-beta";
8111
8140
  const provider = new (0, _anchor.AnchorProvider)(
8112
8141
  connection,
8113
8142
  {},
@@ -8115,7 +8144,7 @@ var DLMM = class {
8115
8144
  );
8116
8145
  const program = new (0, _anchor.Program)(
8117
8146
  IDL,
8118
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _46 => _46.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
8147
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _54 => _54.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
8119
8148
  provider
8120
8149
  );
8121
8150
  const positionsV2 = await program.account.positionV2.all([
@@ -8249,8 +8278,8 @@ var DLMM = class {
8249
8278
  getTokenDecimals(program.provider.connection, lbPairAcc.tokenXMint),
8250
8279
  getTokenDecimals(program.provider.connection, lbPairAcc.tokenYMint)
8251
8280
  ]);
8252
- const reserveXBalance = _nullishCoalesce(_optionalChain([lbPairReserveMapV2, 'access', _47 => _47.get, 'call', _48 => _48(lbPair.toBase58()), 'optionalAccess', _49 => _49.reserveX]), () => ( BigInt(0)));
8253
- const reserveYBalance = _nullishCoalesce(_optionalChain([lbPairReserveMapV2, 'access', _50 => _50.get, 'call', _51 => _51(lbPair.toBase58()), 'optionalAccess', _52 => _52.reserveY]), () => ( BigInt(0)));
8281
+ const reserveXBalance = _nullishCoalesce(_optionalChain([lbPairReserveMapV2, 'access', _55 => _55.get, 'call', _56 => _56(lbPair.toBase58()), 'optionalAccess', _57 => _57.reserveX]), () => ( BigInt(0)));
8282
+ const reserveYBalance = _nullishCoalesce(_optionalChain([lbPairReserveMapV2, 'access', _58 => _58.get, 'call', _59 => _59(lbPair.toBase58()), 'optionalAccess', _60 => _60.reserveY]), () => ( BigInt(0)));
8254
8283
  const tokenX = {
8255
8284
  publicKey: lbPairAcc.tokenXMint,
8256
8285
  reserve: lbPairAcc.reserveX,
@@ -8296,7 +8325,7 @@ var DLMM = class {
8296
8325
  tokenX,
8297
8326
  tokenY,
8298
8327
  lbPairPositionsData: [
8299
- ..._nullishCoalesce(_optionalChain([positionsMap, 'access', _53 => _53.get, 'call', _54 => _54(lbPair.toBase58()), 'optionalAccess', _55 => _55.lbPairPositionsData]), () => ( [])),
8328
+ ..._nullishCoalesce(_optionalChain([positionsMap, 'access', _61 => _61.get, 'call', _62 => _62(lbPair.toBase58()), 'optionalAccess', _63 => _63.lbPairPositionsData]), () => ( [])),
8300
8329
  {
8301
8330
  publicKey: positionPubKey,
8302
8331
  positionData,
@@ -8325,7 +8354,7 @@ var DLMM = class {
8325
8354
  );
8326
8355
  const program = new (0, _anchor.Program)(
8327
8356
  IDL,
8328
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _56 => _56.programId]), () => ( LBCLMM_PROGRAM_IDS[opt.cluster])),
8357
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _64 => _64.programId]), () => ( LBCLMM_PROGRAM_IDS[opt.cluster])),
8329
8358
  provider
8330
8359
  );
8331
8360
  const [lbPair] = derivePermissionLbPair(
@@ -8374,7 +8403,7 @@ var DLMM = class {
8374
8403
  );
8375
8404
  const program = new (0, _anchor.Program)(
8376
8405
  IDL,
8377
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _57 => _57.programId]), () => ( LBCLMM_PROGRAM_IDS[opt.cluster])),
8406
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _65 => _65.programId]), () => ( LBCLMM_PROGRAM_IDS[opt.cluster])),
8378
8407
  provider
8379
8408
  );
8380
8409
  const [lbPair] = deriveCustomizablePermissionlessLbPair(
@@ -8423,7 +8452,7 @@ var DLMM = class {
8423
8452
  );
8424
8453
  const program = new (0, _anchor.Program)(
8425
8454
  IDL,
8426
- _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _58 => _58.programId]), () => ( LBCLMM_PROGRAM_IDS[opt.cluster])),
8455
+ _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _66 => _66.programId]), () => ( LBCLMM_PROGRAM_IDS[opt.cluster])),
8427
8456
  provider
8428
8457
  );
8429
8458
  const existsPool = await this.getPairPubkeyIfExists(
@@ -8559,7 +8588,7 @@ var DLMM = class {
8559
8588
  swapForY,
8560
8589
  new (0, _anchor.BN)(activeIdToLoop),
8561
8590
  this.lbPair,
8562
- _nullishCoalesce(_optionalChain([this, 'access', _59 => _59.binArrayBitmapExtension, 'optionalAccess', _60 => _60.account]), () => ( null))
8591
+ _nullishCoalesce(_optionalChain([this, 'access', _67 => _67.binArrayBitmapExtension, 'optionalAccess', _68 => _68.account]), () => ( null))
8563
8592
  );
8564
8593
  if (binArrayIndex === null)
8565
8594
  shouldStop = true;
@@ -10046,7 +10075,7 @@ var DLMM = class {
10046
10075
  swapForY,
10047
10076
  activeId,
10048
10077
  this.lbPair,
10049
- _nullishCoalesce(_optionalChain([this, 'access', _61 => _61.binArrayBitmapExtension, 'optionalAccess', _62 => _62.account]), () => ( null)),
10078
+ _nullishCoalesce(_optionalChain([this, 'access', _69 => _69.binArrayBitmapExtension, 'optionalAccess', _70 => _70.account]), () => ( null)),
10050
10079
  binArrays
10051
10080
  );
10052
10081
  if (binArrayAccountToSwap == null) {
@@ -10151,7 +10180,7 @@ var DLMM = class {
10151
10180
  swapForY,
10152
10181
  activeId,
10153
10182
  this.lbPair,
10154
- _nullishCoalesce(_optionalChain([this, 'access', _63 => _63.binArrayBitmapExtension, 'optionalAccess', _64 => _64.account]), () => ( null)),
10183
+ _nullishCoalesce(_optionalChain([this, 'access', _71 => _71.binArrayBitmapExtension, 'optionalAccess', _72 => _72.account]), () => ( null)),
10155
10184
  binArrays
10156
10185
  );
10157
10186
  if (binArrayAccountToSwap == null) {
@@ -11345,7 +11374,7 @@ var DLMM = class {
11345
11374
  swapForY,
11346
11375
  new (0, _anchor.BN)(activeBinId),
11347
11376
  this.lbPair,
11348
- _nullishCoalesce(_optionalChain([this, 'access', _65 => _65.binArrayBitmapExtension, 'optionalAccess', _66 => _66.account]), () => ( null))
11377
+ _nullishCoalesce(_optionalChain([this, 'access', _73 => _73.binArrayBitmapExtension, 'optionalAccess', _74 => _74.account]), () => ( null))
11349
11378
  );
11350
11379
  if (toBinArrayIndex === null)
11351
11380
  return true;
@@ -11382,7 +11411,7 @@ var DLMM = class {
11382
11411
  swapForY,
11383
11412
  new (0, _anchor.BN)(activeBinId),
11384
11413
  this.lbPair,
11385
- _nullishCoalesce(_optionalChain([this, 'access', _67 => _67.binArrayBitmapExtension, 'optionalAccess', _68 => _68.account]), () => ( null))
11414
+ _nullishCoalesce(_optionalChain([this, 'access', _75 => _75.binArrayBitmapExtension, 'optionalAccess', _76 => _76.account]), () => ( null))
11386
11415
  );
11387
11416
  const accountsToFetch = [];
11388
11417
  const [binArrayBitMapExtensionPubkey] = deriveBinArrayBitmapExtension(
@@ -11413,13 +11442,13 @@ var DLMM = class {
11413
11442
  let fromBinArray = null;
11414
11443
  let toBinArray = null;
11415
11444
  let binArrayBitmapExtension = null;
11416
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _69 => _69[0]])) {
11445
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _77 => _77[0]])) {
11417
11446
  binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
11418
11447
  }
11419
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _70 => _70[1]])) {
11448
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _78 => _78[1]])) {
11420
11449
  fromBinArray = fromBinArrayPubkey;
11421
11450
  }
11422
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _71 => _71[2]]) && !!toBinArrayIndex) {
11451
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _79 => _79[2]]) && !!toBinArrayIndex) {
11423
11452
  toBinArray = toBinArrayPubkey;
11424
11453
  }
11425
11454
  const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
@@ -11895,7 +11924,7 @@ var DLMM = class {
11895
11924
  const [lowerBinId2] = getBinArrayLowerUpperBinId(index);
11896
11925
  return bins.map((b, i) => [lowerBinId2.toNumber() + i, b]);
11897
11926
  }));
11898
- const version = _nullishCoalesce(_optionalChain([binArrays, 'access', _72 => _72.find, 'call', _73 => _73((binArray) => binArray != null), 'optionalAccess', _74 => _74.version]), () => ( 1));
11927
+ const version = _nullishCoalesce(_optionalChain([binArrays, 'access', _80 => _80.find, 'call', _81 => _81((binArray) => binArray != null), 'optionalAccess', _82 => _82.version]), () => ( 1));
11899
11928
  return Array.from(enumerateBins(
11900
11929
  binsById,
11901
11930
  lowerBinId,