@meteora-ag/dlmm 1.0.13 → 1.0.15-abc123.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.d.ts +6 -3
- package/dist/index.js +208 -68
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +207 -67
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -5143,15 +5143,18 @@ declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distri
|
|
|
5143
5143
|
amountX: BN;
|
|
5144
5144
|
amountY: BN;
|
|
5145
5145
|
}[];
|
|
5146
|
-
declare function calculateStrategyParameter({ minBinId, maxBinId, strategy, activeBinId,
|
|
5146
|
+
declare function calculateStrategyParameter({ minBinId, maxBinId, strategy, activeBinId, totalXAmount, totalYAmount, amountXInActiveBin, amountYInActiveBin, binStep, }: {
|
|
5147
5147
|
minBinId: number;
|
|
5148
5148
|
maxBinId: number;
|
|
5149
5149
|
strategy: StrategyType;
|
|
5150
5150
|
activeBinId: number;
|
|
5151
|
-
activeBinPrice: string;
|
|
5152
5151
|
totalXAmount: BN;
|
|
5153
5152
|
totalYAmount: BN;
|
|
5153
|
+
amountXInActiveBin: BN;
|
|
5154
|
+
amountYInActiveBin: BN;
|
|
5155
|
+
binStep: number;
|
|
5154
5156
|
}): StrategyParameters;
|
|
5157
|
+
declare function assertEqualNumber(x: BN, y: BN, precision: BN): boolean;
|
|
5155
5158
|
|
|
5156
5159
|
declare function getBaseFee(binStep: number, sParameter: sParameters): BN;
|
|
5157
5160
|
declare function getVariableFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN;
|
|
@@ -5284,4 +5287,4 @@ declare const MAX_CLAIM_ALL_ALLOWED = 3;
|
|
|
5284
5287
|
declare const MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26;
|
|
5285
5288
|
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
5286
5289
|
|
|
5287
|
-
export { ADMIN, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, DLMMError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_POSITION, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, Network, PRECISION, ParabolicParameter, Position, PositionBinData, PositionData, PositionInfo, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SpotParameter, StrategyParameters, StrategyType, SwapFee, SwapParams, SwapQuote, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TokenReserve, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, calculateStrategyParameter, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeBudgetIx, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveLbPair, deriveOracle, derivePosition, derivePresetParameter, deriveReserve, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromStrategyParamsToWeightDistribution, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinFromBinArray, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parabolicParameter, parseLogs, sParameters, spotParameter, swapQuoteAtBin, swapQuoteAtBinWithCap, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
|
|
5290
|
+
export { ADMIN, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, DLMMError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_POSITION, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, Network, PRECISION, ParabolicParameter, Position, PositionBinData, PositionData, PositionInfo, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SpotParameter, StrategyParameters, StrategyType, SwapFee, SwapParams, SwapQuote, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TokenReserve, assertEqualNumber, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, calculateStrategyParameter, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeBudgetIx, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveLbPair, deriveOracle, derivePosition, derivePresetParameter, deriveReserve, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromStrategyParamsToWeightDistribution, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinFromBinArray, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parabolicParameter, parseLogs, sParameters, spotParameter, swapQuoteAtBin, swapQuoteAtBinWithCap, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
|
package/dist/index.js
CHANGED
|
@@ -5558,89 +5558,228 @@ function calculateStrategyParameter({
|
|
|
5558
5558
|
maxBinId,
|
|
5559
5559
|
strategy,
|
|
5560
5560
|
activeBinId,
|
|
5561
|
-
activeBinPrice,
|
|
5562
5561
|
totalXAmount,
|
|
5563
|
-
totalYAmount
|
|
5562
|
+
totalYAmount,
|
|
5563
|
+
amountXInActiveBin,
|
|
5564
|
+
amountYInActiveBin,
|
|
5565
|
+
binStep
|
|
5564
5566
|
}) {
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
const
|
|
5569
|
-
const
|
|
5570
|
-
|
|
5567
|
+
if (totalXAmount.isZero() && totalYAmount.isZero()) {
|
|
5568
|
+
throw Error("Invalid parameters");
|
|
5569
|
+
}
|
|
5570
|
+
const isOnlyBidSide = totalXAmount.isZero();
|
|
5571
|
+
const isOnlyAskSide = totalYAmount.isZero();
|
|
5572
|
+
if (activeBinId > maxBinId && !isOnlyBidSide) {
|
|
5573
|
+
throw Error("Invalid parameters");
|
|
5574
|
+
}
|
|
5575
|
+
if (activeBinId < minBinId && !isOnlyAskSide) {
|
|
5576
|
+
throw Error("Invalid parameters");
|
|
5577
|
+
}
|
|
5578
|
+
const centerBinId = (() => {
|
|
5579
|
+
if (activeBinId > maxBinId) {
|
|
5580
|
+
return maxBinId;
|
|
5581
|
+
}
|
|
5582
|
+
if (activeBinId < minBinId) {
|
|
5583
|
+
return minBinId;
|
|
5584
|
+
}
|
|
5585
|
+
return activeBinId;
|
|
5586
|
+
})();
|
|
5587
|
+
if (strategy === 0 /* Spot */) {
|
|
5588
|
+
if (isOnlyBidSide) {
|
|
5571
5589
|
return {
|
|
5590
|
+
maxBinId,
|
|
5591
|
+
minBinId,
|
|
5592
|
+
strategyType: strategy,
|
|
5572
5593
|
aRight: 0,
|
|
5573
|
-
aLeft: 0
|
|
5594
|
+
aLeft: 0,
|
|
5595
|
+
centerBinId,
|
|
5596
|
+
weightLeft: 1,
|
|
5597
|
+
weightRight: 0
|
|
5574
5598
|
};
|
|
5575
5599
|
}
|
|
5576
|
-
|
|
5577
|
-
const isXSingleSide = totalYAmount.isZero();
|
|
5578
|
-
const aRight2 = (() => {
|
|
5579
|
-
if (isYSingleSide)
|
|
5580
|
-
return 0;
|
|
5581
|
-
if (isXSingleSide)
|
|
5582
|
-
return 2e3;
|
|
5583
|
-
return Math.floor(
|
|
5584
|
-
totalXAmountDecimal.mul(activeBinPriceDecimal).div(total).mul(new (0, _decimaljs2.default)(5e3)).toNumber()
|
|
5585
|
-
);
|
|
5586
|
-
})();
|
|
5587
|
-
const aLeft2 = (() => {
|
|
5588
|
-
if (isYSingleSide)
|
|
5589
|
-
return 2e3;
|
|
5590
|
-
if (isXSingleSide)
|
|
5591
|
-
return 0;
|
|
5592
|
-
return Math.floor(
|
|
5593
|
-
totalYAmountDecimal.div(total).mul(new (0, _decimaljs2.default)(5e3)).toNumber()
|
|
5594
|
-
);
|
|
5595
|
-
})();
|
|
5596
|
-
return {
|
|
5597
|
-
aRight: aRight2,
|
|
5598
|
-
aLeft: aLeft2
|
|
5599
|
-
};
|
|
5600
|
-
})();
|
|
5601
|
-
const { weightRight, weightLeft } = (() => {
|
|
5602
|
-
if (strategy !== 0 /* Spot */) {
|
|
5600
|
+
if (isOnlyAskSide) {
|
|
5603
5601
|
return {
|
|
5604
|
-
|
|
5605
|
-
|
|
5602
|
+
maxBinId,
|
|
5603
|
+
minBinId,
|
|
5604
|
+
strategyType: strategy,
|
|
5605
|
+
aRight: 0,
|
|
5606
|
+
aLeft: 0,
|
|
5607
|
+
centerBinId,
|
|
5608
|
+
weightLeft: 0,
|
|
5609
|
+
weightRight: 1
|
|
5606
5610
|
};
|
|
5607
5611
|
}
|
|
5608
|
-
const
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5612
|
+
const { weightLeft, weightRight, aLeft, aRight } = estimationParametersLoop({
|
|
5613
|
+
minBinId,
|
|
5614
|
+
maxBinId,
|
|
5615
|
+
strategy,
|
|
5616
|
+
activeBinId,
|
|
5617
|
+
totalXAmount,
|
|
5618
|
+
totalYAmount,
|
|
5619
|
+
amountXInActiveBin,
|
|
5620
|
+
amountYInActiveBin,
|
|
5621
|
+
binStep,
|
|
5622
|
+
centerBinId,
|
|
5623
|
+
weightLeft: 1,
|
|
5624
|
+
weightRight: 1,
|
|
5625
|
+
aLeft: 0,
|
|
5626
|
+
aRight: 0
|
|
5627
|
+
});
|
|
5618
5628
|
return {
|
|
5619
|
-
|
|
5620
|
-
|
|
5629
|
+
maxBinId,
|
|
5630
|
+
minBinId,
|
|
5631
|
+
strategyType: strategy,
|
|
5632
|
+
aRight,
|
|
5633
|
+
aLeft,
|
|
5634
|
+
centerBinId,
|
|
5635
|
+
weightLeft,
|
|
5636
|
+
weightRight
|
|
5621
5637
|
};
|
|
5622
|
-
}
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5638
|
+
} else {
|
|
5639
|
+
if (isOnlyBidSide) {
|
|
5640
|
+
return {
|
|
5641
|
+
maxBinId,
|
|
5642
|
+
minBinId,
|
|
5643
|
+
strategyType: strategy,
|
|
5644
|
+
aRight: 0,
|
|
5645
|
+
aLeft: 2e3,
|
|
5646
|
+
centerBinId,
|
|
5647
|
+
weightLeft: 0,
|
|
5648
|
+
weightRight: 0
|
|
5649
|
+
};
|
|
5626
5650
|
}
|
|
5627
|
-
if (
|
|
5628
|
-
return
|
|
5651
|
+
if (isOnlyAskSide) {
|
|
5652
|
+
return {
|
|
5653
|
+
maxBinId,
|
|
5654
|
+
minBinId,
|
|
5655
|
+
strategyType: strategy,
|
|
5656
|
+
aRight: 2e3,
|
|
5657
|
+
aLeft: 0,
|
|
5658
|
+
centerBinId,
|
|
5659
|
+
weightLeft: 0,
|
|
5660
|
+
weightRight: 0
|
|
5661
|
+
};
|
|
5629
5662
|
}
|
|
5630
|
-
|
|
5631
|
-
|
|
5663
|
+
const { weightLeft, weightRight, aLeft, aRight } = estimationParametersLoop({
|
|
5664
|
+
minBinId,
|
|
5665
|
+
maxBinId,
|
|
5666
|
+
strategy,
|
|
5667
|
+
activeBinId,
|
|
5668
|
+
totalXAmount,
|
|
5669
|
+
totalYAmount,
|
|
5670
|
+
amountXInActiveBin,
|
|
5671
|
+
amountYInActiveBin,
|
|
5672
|
+
binStep,
|
|
5673
|
+
centerBinId,
|
|
5674
|
+
weightLeft: 0,
|
|
5675
|
+
weightRight: 0,
|
|
5676
|
+
aLeft: 100,
|
|
5677
|
+
aRight: 100
|
|
5678
|
+
});
|
|
5679
|
+
return {
|
|
5680
|
+
maxBinId,
|
|
5681
|
+
minBinId,
|
|
5682
|
+
strategyType: strategy,
|
|
5683
|
+
aRight,
|
|
5684
|
+
aLeft,
|
|
5685
|
+
centerBinId,
|
|
5686
|
+
weightLeft,
|
|
5687
|
+
weightRight
|
|
5688
|
+
};
|
|
5689
|
+
}
|
|
5690
|
+
}
|
|
5691
|
+
function assertEqualNumber(x, y, precision) {
|
|
5692
|
+
if (x.cmp(y) == -1) {
|
|
5693
|
+
return false;
|
|
5694
|
+
}
|
|
5695
|
+
const diff = x.sub(y).mul(new (0, _anchor.BN)(100)).div(x);
|
|
5696
|
+
return diff.cmp(precision) < 1;
|
|
5697
|
+
}
|
|
5698
|
+
function estimationParametersLoop({
|
|
5699
|
+
minBinId,
|
|
5700
|
+
maxBinId,
|
|
5701
|
+
strategy,
|
|
5702
|
+
activeBinId,
|
|
5703
|
+
totalXAmount,
|
|
5704
|
+
totalYAmount,
|
|
5705
|
+
amountXInActiveBin,
|
|
5706
|
+
amountYInActiveBin,
|
|
5707
|
+
binStep,
|
|
5708
|
+
centerBinId,
|
|
5709
|
+
weightLeft,
|
|
5710
|
+
weightRight,
|
|
5711
|
+
aLeft,
|
|
5712
|
+
aRight
|
|
5713
|
+
}, maxLoop = 5) {
|
|
5714
|
+
let index = 0;
|
|
5715
|
+
while (index < maxLoop) {
|
|
5716
|
+
let strategyParameters = {
|
|
5717
|
+
maxBinId,
|
|
5718
|
+
minBinId,
|
|
5719
|
+
strategyType: strategy,
|
|
5720
|
+
aRight,
|
|
5721
|
+
aLeft,
|
|
5722
|
+
centerBinId,
|
|
5723
|
+
weightLeft,
|
|
5724
|
+
weightRight
|
|
5725
|
+
};
|
|
5726
|
+
let weightDistributions = fromStrategyParamsToWeightDistribution(strategyParameters);
|
|
5727
|
+
let amounts = fromWeightDistributionToAmount(totalXAmount, totalYAmount, weightDistributions, binStep, activeBinId, amountXInActiveBin, amountYInActiveBin);
|
|
5728
|
+
const estimateX = amounts.reduce(function(sum, el) {
|
|
5729
|
+
return sum.add(el.amountX);
|
|
5730
|
+
}, new (0, _anchor.BN)(0));
|
|
5731
|
+
const estimateY = amounts.reduce(function(sum, el) {
|
|
5732
|
+
return sum.add(el.amountY);
|
|
5733
|
+
}, new (0, _anchor.BN)(0));
|
|
5734
|
+
const weight = calibrateNumber(totalXAmount, totalYAmount, estimateX, estimateY, weightLeft, weightRight);
|
|
5735
|
+
weightLeft = weight.left;
|
|
5736
|
+
weightRight = weight.right;
|
|
5737
|
+
const a = calibrateNumber(totalXAmount, totalYAmount, estimateX, estimateY, aLeft, aRight);
|
|
5738
|
+
aLeft = a.left;
|
|
5739
|
+
aRight = a.right;
|
|
5740
|
+
index += 1;
|
|
5741
|
+
if (assertEqualNumber(totalXAmount, estimateX, new (0, _anchor.BN)(5)) && assertEqualNumber(totalYAmount, estimateY, new (0, _anchor.BN)(5))) {
|
|
5742
|
+
break;
|
|
5632
5743
|
}
|
|
5633
|
-
|
|
5634
|
-
})();
|
|
5744
|
+
}
|
|
5635
5745
|
return {
|
|
5636
|
-
|
|
5637
|
-
centerBinId,
|
|
5638
|
-
aRight,
|
|
5639
|
-
aLeft,
|
|
5640
|
-
maxBinId,
|
|
5641
|
-
minBinId,
|
|
5746
|
+
weightLeft,
|
|
5642
5747
|
weightRight,
|
|
5643
|
-
|
|
5748
|
+
aLeft,
|
|
5749
|
+
aRight
|
|
5750
|
+
};
|
|
5751
|
+
}
|
|
5752
|
+
function calibrateNumber(amountX, amountY, estimateX, estimateY, leftValue, rightValue) {
|
|
5753
|
+
if (leftValue == 0 || rightValue == 0) {
|
|
5754
|
+
return {
|
|
5755
|
+
left: leftValue,
|
|
5756
|
+
right: rightValue
|
|
5757
|
+
};
|
|
5758
|
+
}
|
|
5759
|
+
const amountXDec = new (0, _decimaljs2.default)(amountX.toString());
|
|
5760
|
+
const amountYDec = new (0, _decimaljs2.default)(amountY.toString());
|
|
5761
|
+
const estimateXDec = new (0, _decimaljs2.default)(estimateX.toString());
|
|
5762
|
+
const estimateYDec = new (0, _decimaljs2.default)(estimateY.toString());
|
|
5763
|
+
let left = leftValue;
|
|
5764
|
+
let right = rightValue;
|
|
5765
|
+
if (estimateXDec.div(amountXDec) < estimateYDec.div(amountYDec)) {
|
|
5766
|
+
right = new (0, _decimaljs2.default)(rightValue).mul(estimateYDec.div(amountYDec)).div(estimateXDec.div(amountXDec)).floor().toNumber();
|
|
5767
|
+
} else {
|
|
5768
|
+
left = new (0, _decimaljs2.default)(leftValue).mul(estimateXDec.div(amountXDec)).div(estimateYDec.div(amountYDec)).floor().toNumber();
|
|
5769
|
+
}
|
|
5770
|
+
if (left >= 32768 || right >= 32768) {
|
|
5771
|
+
left = Math.floor(left * 32768 / (left + right));
|
|
5772
|
+
right = Math.floor(right * 32768 / (left + right));
|
|
5773
|
+
}
|
|
5774
|
+
if (left <= 0) {
|
|
5775
|
+
left = 1;
|
|
5776
|
+
}
|
|
5777
|
+
if (right <= 0) {
|
|
5778
|
+
right = 1;
|
|
5779
|
+
}
|
|
5780
|
+
return {
|
|
5781
|
+
left,
|
|
5782
|
+
right
|
|
5644
5783
|
};
|
|
5645
5784
|
}
|
|
5646
5785
|
|
|
@@ -9250,5 +9389,6 @@ var src_default = DLMM;
|
|
|
9250
9389
|
|
|
9251
9390
|
|
|
9252
9391
|
|
|
9253
|
-
|
|
9392
|
+
|
|
9393
|
+
exports.ADMIN = ADMIN; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_ARRAY_BITMAP_SIZE = BIN_ARRAY_BITMAP_SIZE; exports.BitmapType = BitmapType; exports.DLMMError = DLMMError; exports.EXTENSION_BINARRAY_BITMAP_SIZE = EXTENSION_BINARRAY_BITMAP_SIZE; exports.FEE_PRECISION = FEE_PRECISION; exports.IDL = IDL; exports.LBCLMM_PROGRAM_IDS = LBCLMM_PROGRAM_IDS; exports.MAX_ACTIVE_BIN_SLIPPAGE = MAX_ACTIVE_BIN_SLIPPAGE; exports.MAX_BIN_ARRAY_SIZE = MAX_BIN_ARRAY_SIZE; exports.MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX; exports.MAX_BIN_PER_POSITION = MAX_BIN_PER_POSITION; exports.MAX_CLAIM_ALL_ALLOWED = MAX_CLAIM_ALL_ALLOWED; exports.MAX_FEE_RATE = MAX_FEE_RATE; exports.Network = Network; exports.PRECISION = PRECISION; exports.PositionVersion = PositionVersion; exports.SCALE = SCALE; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SIMULATION_USER = SIMULATION_USER; exports.StrategyType = StrategyType; exports.assertEqualNumber = assertEqualNumber; exports.binIdToBinArrayIndex = binIdToBinArrayIndex; exports.calculateBidAskDistribution = calculateBidAskDistribution; exports.calculateNormalDistribution = calculateNormalDistribution; exports.calculateSpotDistribution = calculateSpotDistribution; exports.calculateStrategyParameter = calculateStrategyParameter; exports.chunkedFetchMultipleBinArrayBitmapExtensionAccount = chunkedFetchMultipleBinArrayBitmapExtensionAccount; exports.chunkedFetchMultiplePoolAccount = chunkedFetchMultiplePoolAccount; exports.chunkedGetMultipleAccountInfos = chunkedGetMultipleAccountInfos; exports.chunks = chunks; exports.computeBudgetIx = computeBudgetIx; exports.computeFee = computeFee; exports.computeFeeFromAmount = computeFeeFromAmount; exports.computeProtocolFee = computeProtocolFee; exports.default = src_default; exports.deriveBinArray = deriveBinArray; exports.deriveBinArrayBitmapExtension = deriveBinArrayBitmapExtension; exports.deriveLbPair = deriveLbPair; exports.deriveOracle = deriveOracle; exports.derivePosition = derivePosition; exports.derivePresetParameter = derivePresetParameter; exports.deriveReserve = deriveReserve; exports.findNextBinArrayIndexWithLiquidity = findNextBinArrayIndexWithLiquidity; exports.findNextBinArrayWithLiquidity = findNextBinArrayWithLiquidity; exports.fromStrategyParamsToWeightDistribution = fromStrategyParamsToWeightDistribution; exports.fromWeightDistributionToAmount = fromWeightDistributionToAmount; exports.fromWeightDistributionToAmountOneSide = fromWeightDistributionToAmountOneSide; exports.getBaseFee = getBaseFee; exports.getBinArrayLowerUpperBinId = getBinArrayLowerUpperBinId; exports.getBinFromBinArray = getBinFromBinArray; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getOutAmount = getOutAmount; exports.getPriceOfBinByBinId = getPriceOfBinByBinId; exports.getTokenBalance = getTokenBalance; exports.getTokenDecimals = getTokenDecimals; exports.getTotalFee = getTotalFee; exports.getVariableFee = getVariableFee; exports.isBinIdWithinBinArray = isBinIdWithinBinArray; exports.isOverflowDefaultBinArrayBitmap = isOverflowDefaultBinArrayBitmap; exports.parabolicParameter = parabolicParameter; exports.parseLogs = parseLogs; exports.spotParameter = spotParameter; exports.swapQuoteAtBin = swapQuoteAtBin; exports.swapQuoteAtBinWithCap = swapQuoteAtBinWithCap; exports.toStrategyParameters = toStrategyParameters; exports.toWeightDistribution = toWeightDistribution; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
9254
9394
|
//# sourceMappingURL=index.js.map
|