@meteora-ag/dlmm 1.5.0-sam.5 → 1.5.0-test.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
@@ -9390,12 +9390,9 @@ function toWeightBidAsk(minBinId, maxBinId, activeId) {
9390
9390
  return distributions;
9391
9391
  }
9392
9392
  function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amountX, amountY, amountXInActiveBin, amountYInActiveBin, strategyType, mintX, mintY, clock) {
9393
- console.log("SDK", strategyType, activeId, minBinId, maxBinId);
9394
9393
  const isSingleSideX = amountY.isZero();
9395
- console.log("\u{1F680} ~ isSingleSideX:", isSingleSideX);
9396
9394
  switch (strategyType) {
9397
9395
  case 0 /* Spot */: {
9398
- console.log("test0", activeId < minBinId || activeId > maxBinId);
9399
9396
  if (activeId < minBinId || activeId > maxBinId) {
9400
9397
  const weights = toWeightSpotBalanced(minBinId, maxBinId);
9401
9398
  return toAmountBothSide(
@@ -9413,10 +9410,8 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9413
9410
  }
9414
9411
  const amountsInBin = [];
9415
9412
  if (!isSingleSideX) {
9416
- console.log("test", minBinId <= activeId);
9417
9413
  if (minBinId <= activeId) {
9418
9414
  const weights = toWeightSpotBalanced(minBinId, activeId);
9419
- console.log("\u{1F680} ~ weights:", weights);
9420
9415
  const amounts = toAmountBidSide(
9421
9416
  activeId,
9422
9417
  amountY,
@@ -9424,7 +9419,6 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9424
9419
  mintY,
9425
9420
  clock
9426
9421
  );
9427
- console.log("\u{1F680} ~ amounts:", amounts);
9428
9422
  for (let bin of amounts) {
9429
9423
  amountsInBin.push({
9430
9424
  binId: bin.binId,
@@ -9433,10 +9427,8 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9433
9427
  });
9434
9428
  }
9435
9429
  }
9436
- console.log("test2", activeId < maxBinId);
9437
9430
  if (activeId < maxBinId) {
9438
9431
  const weights = toWeightSpotBalanced(activeId + 1, maxBinId);
9439
- console.log("\u{1F680} ~ weights:", weights);
9440
9432
  const amounts = toAmountAskSide(
9441
9433
  activeId,
9442
9434
  binStep,
@@ -9445,7 +9437,6 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
9445
9437
  mintX,
9446
9438
  clock
9447
9439
  );
9448
- console.log("\u{1F680} ~ amounts:", amounts);
9449
9440
  for (let bin of amounts) {
9450
9441
  amountsInBin.push({
9451
9442
  binId: bin.binId,
@@ -10368,11 +10359,9 @@ var DLMM = class {
10368
10359
  */
10369
10360
  static async create(connection, dlmm, opt) {
10370
10361
  const cluster = _optionalChain([opt, 'optionalAccess', _38 => _38.cluster]) || "mainnet-beta";
10371
- const provider = new (0, _anchor.AnchorProvider)(
10372
- connection,
10373
- {},
10374
- _anchor.AnchorProvider.defaultOptions()
10375
- );
10362
+ const provider = new (0, _anchor.AnchorProvider)(connection, {}, {
10363
+ commitment: "confirmed"
10364
+ });
10376
10365
  const program = new (0, _anchor.Program)(
10377
10366
  IDL,
10378
10367
  _nullishCoalesce(_optionalChain([opt, 'optionalAccess', _39 => _39.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),