@meteora-ag/dlmm 1.0.39-rc.29 → 1.0.39-rc.30

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 CHANGED
@@ -4932,7 +4932,6 @@ declare class DLMM {
4932
4932
  * @returns a Promise that resolves to an array of BinArrayAccount objects.
4933
4933
  */
4934
4934
  getBinArrays(): Promise<BinArrayAccount[]>;
4935
- getBinArraysWithLiquidity(): Promise<BinArray>;
4936
4935
  /**
4937
4936
  * The function `getBinArrayAroundActiveBin` retrieves a specified number of `BinArrayAccount`
4938
4937
  * objects from the blockchain, based on the active bin and its surrounding bin arrays.
package/dist/index.js CHANGED
@@ -7521,23 +7521,6 @@ var DLMM = class {
7521
7521
  }
7522
7522
  ]);
7523
7523
  }
7524
- async getBinArraysWithLiquidity() {
7525
- const binArrayIndex = findNextBinArrayIndexWithLiquidity(
7526
- false,
7527
- new (0, _anchor.BN)(this.lbPair.parameters.maxBinId),
7528
- this.lbPair,
7529
- _nullishCoalesce(_optionalChain([this, 'access', _54 => _54.binArrayBitmapExtension, 'optionalAccess', _55 => _55.account]), () => ( null))
7530
- );
7531
- const [binArrayPubkey] = deriveBinArray(
7532
- this.pubkey,
7533
- binArrayIndex,
7534
- this.program.programId
7535
- );
7536
- const binArrayAccount = await this.program.account.binArray.fetch(
7537
- binArrayPubkey
7538
- );
7539
- return binArrayAccount;
7540
- }
7541
7524
  /**
7542
7525
  * The function `getBinArrayAroundActiveBin` retrieves a specified number of `BinArrayAccount`
7543
7526
  * objects from the blockchain, based on the active bin and its surrounding bin arrays.
@@ -7556,7 +7539,7 @@ var DLMM = class {
7556
7539
  swapForY,
7557
7540
  new (0, _anchor.BN)(activeIdToLoop),
7558
7541
  this.lbPair,
7559
- _nullishCoalesce(_optionalChain([this, 'access', _56 => _56.binArrayBitmapExtension, 'optionalAccess', _57 => _57.account]), () => ( null))
7542
+ _nullishCoalesce(_optionalChain([this, 'access', _54 => _54.binArrayBitmapExtension, 'optionalAccess', _55 => _55.account]), () => ( null))
7560
7543
  );
7561
7544
  if (binArrayIndex === null)
7562
7545
  shouldStop = true;
@@ -8992,7 +8975,7 @@ var DLMM = class {
8992
8975
  swapForY,
8993
8976
  activeId,
8994
8977
  this.lbPair,
8995
- _optionalChain([this, 'access', _58 => _58.binArrayBitmapExtension, 'optionalAccess', _59 => _59.account]),
8978
+ _optionalChain([this, 'access', _56 => _56.binArrayBitmapExtension, 'optionalAccess', _57 => _57.account]),
8996
8979
  binArrays
8997
8980
  );
8998
8981
  if (binArrayAccountToSwap == null) {
@@ -9099,7 +9082,7 @@ var DLMM = class {
9099
9082
  swapForY,
9100
9083
  activeId,
9101
9084
  this.lbPair,
9102
- _nullishCoalesce(_optionalChain([this, 'access', _60 => _60.binArrayBitmapExtension, 'optionalAccess', _61 => _61.account]), () => ( null)),
9085
+ _nullishCoalesce(_optionalChain([this, 'access', _58 => _58.binArrayBitmapExtension, 'optionalAccess', _59 => _59.account]), () => ( null)),
9103
9086
  binArrays
9104
9087
  );
9105
9088
  if (binArrayAccountToSwap == null) {
@@ -9825,7 +9808,7 @@ var DLMM = class {
9825
9808
  swapForY,
9826
9809
  new (0, _anchor.BN)(activeBinId),
9827
9810
  this.lbPair,
9828
- _nullishCoalesce(_optionalChain([this, 'access', _62 => _62.binArrayBitmapExtension, 'optionalAccess', _63 => _63.account]), () => ( null))
9811
+ _nullishCoalesce(_optionalChain([this, 'access', _60 => _60.binArrayBitmapExtension, 'optionalAccess', _61 => _61.account]), () => ( null))
9829
9812
  );
9830
9813
  if (toBinArrayIndex === null)
9831
9814
  return true;
@@ -9862,7 +9845,7 @@ var DLMM = class {
9862
9845
  swapForY,
9863
9846
  new (0, _anchor.BN)(activeBinId),
9864
9847
  this.lbPair,
9865
- _nullishCoalesce(_optionalChain([this, 'access', _64 => _64.binArrayBitmapExtension, 'optionalAccess', _65 => _65.account]), () => ( null))
9848
+ _nullishCoalesce(_optionalChain([this, 'access', _62 => _62.binArrayBitmapExtension, 'optionalAccess', _63 => _63.account]), () => ( null))
9866
9849
  );
9867
9850
  const accountsToFetch = [];
9868
9851
  const [binArrayBitMapExtensionPubkey] = deriveBinArrayBitmapExtension(
@@ -9893,13 +9876,13 @@ var DLMM = class {
9893
9876
  let fromBinArray = null;
9894
9877
  let toBinArray = null;
9895
9878
  let binArrayBitmapExtension = null;
9896
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _66 => _66[0]])) {
9879
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _64 => _64[0]])) {
9897
9880
  binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
9898
9881
  }
9899
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _67 => _67[1]])) {
9882
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _65 => _65[1]])) {
9900
9883
  fromBinArray = fromBinArrayPubkey;
9901
9884
  }
9902
- if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _68 => _68[2]]) && !!toBinArrayIndex) {
9885
+ if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _66 => _66[2]]) && !!toBinArrayIndex) {
9903
9886
  toBinArray = toBinArrayPubkey;
9904
9887
  }
9905
9888
  const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
@@ -10521,7 +10504,7 @@ var DLMMError = class extends Error {
10521
10504
  const anchorError = _anchor.AnchorError.parse(
10522
10505
  JSON.parse(JSON.stringify(error)).logs
10523
10506
  );
10524
- if (_optionalChain([anchorError, 'optionalAccess', _69 => _69.program, 'access', _70 => _70.toBase58, 'call', _71 => _71()]) === LBCLMM_PROGRAM_IDS["mainnet-beta"]) {
10507
+ if (_optionalChain([anchorError, 'optionalAccess', _67 => _67.program, 'access', _68 => _68.toBase58, 'call', _69 => _69()]) === LBCLMM_PROGRAM_IDS["mainnet-beta"]) {
10525
10508
  _errorCode = anchorError.error.errorCode.number;
10526
10509
  _errorName = anchorError.error.errorCode.code;
10527
10510
  _errorMessage = anchorError.error.errorMessage;