@meteora-ag/dlmm 1.3.17-rc.6 → 1.3.17-rc.7

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
@@ -7926,6 +7926,32 @@ var DLMM = class {
7926
7926
  return null;
7927
7927
  }
7928
7928
  }
7929
+ static async getCustomizablePermissionlessLbPairIfExists(connection, tokenX, tokenY, opt) {
7930
+ const cluster = opt?.cluster || "mainnet-beta";
7931
+ const provider = new AnchorProvider2(
7932
+ connection,
7933
+ {},
7934
+ AnchorProvider2.defaultOptions()
7935
+ );
7936
+ const program = new Program3(
7937
+ IDL,
7938
+ opt?.programId ?? LBCLMM_PROGRAM_IDS[cluster],
7939
+ provider
7940
+ );
7941
+ try {
7942
+ const [lpPair] = deriveCustomizablePermissionlessLbPair(
7943
+ tokenX,
7944
+ tokenY,
7945
+ program.programId
7946
+ );
7947
+ const account = await program.account.lbPair.fetchNullable(lpPair);
7948
+ if (account)
7949
+ return lpPair;
7950
+ return null;
7951
+ } catch (error) {
7952
+ return null;
7953
+ }
7954
+ }
7929
7955
  /**
7930
7956
  * The `create` function is a static method that creates a new instance of the `DLMM` class
7931
7957
  * @param {Connection} connection - The `connection` parameter is an instance of the `Connection`
@@ -11283,7 +11309,6 @@ var DLMM = class {
11283
11309
  ]);
11284
11310
  }
11285
11311
  }
11286
- console.log("let return");
11287
11312
  return {
11288
11313
  sendPositionOwnerTokenProveIxs,
11289
11314
  initializeBinArraysAndPositionIxs,