@meteora-ag/dlmm 1.5.0-sam.4 → 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 +3 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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(activeId < minBinId || activeId > maxBinId);
|
|
9399
9396
|
if (activeId < minBinId || activeId > maxBinId) {
|
|
9400
9397
|
const weights = toWeightSpotBalanced(minBinId, maxBinId);
|
|
9401
9398
|
return toAmountBothSide(
|
|
@@ -9415,7 +9412,6 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
9415
9412
|
if (!isSingleSideX) {
|
|
9416
9413
|
if (minBinId <= activeId) {
|
|
9417
9414
|
const weights = toWeightSpotBalanced(minBinId, activeId);
|
|
9418
|
-
console.log("\u{1F680} ~ weights:", weights);
|
|
9419
9415
|
const amounts = toAmountBidSide(
|
|
9420
9416
|
activeId,
|
|
9421
9417
|
amountY,
|
|
@@ -9423,7 +9419,6 @@ function toAmountsBothSideByStrategy(activeId, binStep, minBinId, maxBinId, amou
|
|
|
9423
9419
|
mintY,
|
|
9424
9420
|
clock
|
|
9425
9421
|
);
|
|
9426
|
-
console.log("\u{1F680} ~ amounts:", amounts);
|
|
9427
9422
|
for (let bin of amounts) {
|
|
9428
9423
|
amountsInBin.push({
|
|
9429
9424
|
binId: bin.binId,
|
|
@@ -10364,11 +10359,9 @@ var DLMM = class {
|
|
|
10364
10359
|
*/
|
|
10365
10360
|
static async create(connection, dlmm, opt) {
|
|
10366
10361
|
const cluster = _optionalChain([opt, 'optionalAccess', _38 => _38.cluster]) || "mainnet-beta";
|
|
10367
|
-
const provider = new (0, _anchor.AnchorProvider)(
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
_anchor.AnchorProvider.defaultOptions()
|
|
10371
|
-
);
|
|
10362
|
+
const provider = new (0, _anchor.AnchorProvider)(connection, {}, {
|
|
10363
|
+
commitment: "confirmed"
|
|
10364
|
+
});
|
|
10372
10365
|
const program = new (0, _anchor.Program)(
|
|
10373
10366
|
IDL,
|
|
10374
10367
|
_nullishCoalesce(_optionalChain([opt, 'optionalAccess', _39 => _39.programId]), () => ( LBCLMM_PROGRAM_IDS[cluster])),
|