@meteora-ag/dlmm 1.6.0-rc.26 → 1.6.0-rc.27
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 +146 -2
- package/dist/index.js +110 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _coral_xyz_anchor from '@coral-xyz/anchor';
|
|
2
2
|
import { Program, BN as BN$1, IdlAccounts, ProgramAccount, IdlTypes, EventParser } from '@coral-xyz/anchor';
|
|
3
3
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
4
|
-
import { PublicKey, Connection, AccountMeta, Keypair, TransactionInstruction, Cluster, Transaction } from '@solana/web3.js';
|
|
4
|
+
import { PublicKey, Connection, AccountMeta, Keypair, TransactionInstruction, Cluster, AccountInfo, Transaction } from '@solana/web3.js';
|
|
5
5
|
import Decimal from 'decimal.js';
|
|
6
6
|
import { IdlDiscriminator } from '@coral-xyz/anchor/dist/cjs/idl';
|
|
7
7
|
import { Mint } from '@solana/spl-token';
|
|
@@ -9755,6 +9755,150 @@ declare function getTokenProgramId(lbPairState: LbPair): {
|
|
|
9755
9755
|
tokenYProgram: PublicKey;
|
|
9756
9756
|
};
|
|
9757
9757
|
|
|
9758
|
+
interface IPosition {
|
|
9759
|
+
address(): PublicKey;
|
|
9760
|
+
lowerBinId(): BN;
|
|
9761
|
+
upperBinId(): BN;
|
|
9762
|
+
liquidityShares(): BN[];
|
|
9763
|
+
rewardInfos(): UserRewardInfo[];
|
|
9764
|
+
feeInfos(): UserFeeInfo[];
|
|
9765
|
+
lastUpdatedAt(): BN;
|
|
9766
|
+
lbPair(): PublicKey;
|
|
9767
|
+
totalClaimedFeeXAmount(): BN;
|
|
9768
|
+
totalClaimedFeeYAmount(): BN;
|
|
9769
|
+
totalClaimedRewards(): BN[];
|
|
9770
|
+
operator(): PublicKey;
|
|
9771
|
+
lockReleasePoint(): BN;
|
|
9772
|
+
feeOwner(): PublicKey;
|
|
9773
|
+
owner(): PublicKey;
|
|
9774
|
+
getBinArrayIndexesCoverage(): BN[];
|
|
9775
|
+
getBinArrayKeysCoverage(programId: PublicKey): PublicKey[];
|
|
9776
|
+
version(): PositionVersion;
|
|
9777
|
+
width(): BN;
|
|
9778
|
+
}
|
|
9779
|
+
interface CombinedPositionBinData {
|
|
9780
|
+
liquidityShares: BN[];
|
|
9781
|
+
rewardInfos: UserRewardInfo[];
|
|
9782
|
+
feeInfos: UserFeeInfo[];
|
|
9783
|
+
}
|
|
9784
|
+
declare function wrapPosition(program: Program<LbClmm>, key: PublicKey, account: AccountInfo<Buffer>): IPosition;
|
|
9785
|
+
declare class PositionV2Wrapper implements IPosition {
|
|
9786
|
+
positionAddress: PublicKey;
|
|
9787
|
+
inner: PositionV2;
|
|
9788
|
+
extended: ExtendedPositionBinData[];
|
|
9789
|
+
combinedPositionBinData: CombinedPositionBinData;
|
|
9790
|
+
constructor(positionAddress: PublicKey, inner: PositionV2, extended: ExtendedPositionBinData[], combinedPositionBinData: CombinedPositionBinData);
|
|
9791
|
+
address(): PublicKey;
|
|
9792
|
+
totalClaimedRewards(): BN[];
|
|
9793
|
+
feeOwner(): PublicKey;
|
|
9794
|
+
lockReleasePoint(): BN;
|
|
9795
|
+
operator(): PublicKey;
|
|
9796
|
+
totalClaimedFeeYAmount(): BN;
|
|
9797
|
+
totalClaimedFeeXAmount(): BN;
|
|
9798
|
+
lbPair(): PublicKey;
|
|
9799
|
+
lowerBinId(): BN;
|
|
9800
|
+
upperBinId(): BN;
|
|
9801
|
+
liquidityShares(): BN[];
|
|
9802
|
+
rewardInfos(): UserRewardInfo[];
|
|
9803
|
+
feeInfos(): UserFeeInfo[];
|
|
9804
|
+
lastUpdatedAt(): BN;
|
|
9805
|
+
getBinArrayIndexesCoverage(): BN[];
|
|
9806
|
+
getBinArrayKeysCoverage(programId: PublicKey): PublicKey[];
|
|
9807
|
+
version(): PositionVersion;
|
|
9808
|
+
owner(): PublicKey;
|
|
9809
|
+
width(): BN;
|
|
9810
|
+
}
|
|
9811
|
+
|
|
9812
|
+
declare function getBinArrayIndexesCoverage(lowerBinId: BN, upperBinId: BN): BN[];
|
|
9813
|
+
declare function getBinArrayKeysCoverage(lowerBinId: BN, upperBinId: BN, lbPair: PublicKey, programId: PublicKey): PublicKey[];
|
|
9814
|
+
declare function getBinArrayAccountMetasCoverage(lowerBinId: BN, upperBinId: BN, lbPair: PublicKey, programId: PublicKey): AccountMeta[];
|
|
9815
|
+
declare function getPositionLowerUpperBinIdWithLiquidity(position: PositionData): {
|
|
9816
|
+
lowerBinId: BN;
|
|
9817
|
+
upperBinId: BN;
|
|
9818
|
+
} | null;
|
|
9819
|
+
declare function isPositionNoFee(position: PositionData): boolean;
|
|
9820
|
+
declare function isPositionNoReward(position: PositionData): boolean;
|
|
9821
|
+
/**
|
|
9822
|
+
* Divides a range of bin IDs into chunks, each with a maximum length defined by POSITION_MAX_LENGTH,
|
|
9823
|
+
* and returns an array of objects representing the lower and upper bin IDs for each chunk.
|
|
9824
|
+
*
|
|
9825
|
+
* @param {number} minBinId - The starting bin ID of the range.
|
|
9826
|
+
* @param {number} maxBinId - The ending bin ID of the range.
|
|
9827
|
+
* @returns {{ lowerBinId: number; upperBinId: number }[]} An array of objects, each containing a
|
|
9828
|
+
* 'lowerBinId' and 'upperBinId', representing the range of bin IDs in each chunk.
|
|
9829
|
+
*/
|
|
9830
|
+
declare function chunkBinRangeIntoExtendedPositions(minBinId: number, maxBinId: number): {
|
|
9831
|
+
lowerBinId: number;
|
|
9832
|
+
upperBinId: number;
|
|
9833
|
+
}[];
|
|
9834
|
+
/**
|
|
9835
|
+
* Divides a range of bin IDs into chunks, each with a length defined by DEFAULT_BIN_PER_POSITION,
|
|
9836
|
+
* and returns an array of objects representing the lower and upper bin IDs for each chunk.
|
|
9837
|
+
* Mainly used for chunking bin range to execute multiple add/remove liquidity, claim fee/reward
|
|
9838
|
+
*
|
|
9839
|
+
* @param {number} minBinId - The starting bin ID of the range.
|
|
9840
|
+
* @param {number} maxBinId - The ending bin ID of the range.
|
|
9841
|
+
* @returns {{ lowerBinId: number; upperBinId: number }[]} An array of objects, each containing a
|
|
9842
|
+
* 'lowerBinId' and 'upperBinId', representing the range of bin IDs in each chunk.
|
|
9843
|
+
*/
|
|
9844
|
+
declare function chunkBinRange(minBinId: number, maxBinId: number): {
|
|
9845
|
+
lowerBinId: number;
|
|
9846
|
+
upperBinId: number;
|
|
9847
|
+
}[];
|
|
9848
|
+
declare function chunkPositionBinRange(position: LbPosition, minBinId: number, maxBinId: number): {
|
|
9849
|
+
minBinId: number;
|
|
9850
|
+
maxBinId: number;
|
|
9851
|
+
amountX: BN;
|
|
9852
|
+
amountY: BN;
|
|
9853
|
+
feeXAmount: BN;
|
|
9854
|
+
feeYAmount: BN;
|
|
9855
|
+
rewardAmounts: BN[];
|
|
9856
|
+
}[];
|
|
9857
|
+
declare function calculatePositionSize(binCount: BN): BN;
|
|
9858
|
+
/**
|
|
9859
|
+
* Get the minimum balance required to pay for the rent exemption of a
|
|
9860
|
+
* position with the given bin count.
|
|
9861
|
+
*
|
|
9862
|
+
* @param connection The connection to the Solana RPC node.
|
|
9863
|
+
* @param binCount The number of bins in the position.
|
|
9864
|
+
* @returns The minimum balance required to pay for the rent exemption.
|
|
9865
|
+
*/
|
|
9866
|
+
declare function getPositionRentExemption(connection: Connection, binCount: BN): Promise<number>;
|
|
9867
|
+
/**
|
|
9868
|
+
* Calculate the minimum lamports required to expand a position to a given
|
|
9869
|
+
* width.
|
|
9870
|
+
*
|
|
9871
|
+
* The function takes into account the current width of the position and the
|
|
9872
|
+
* width to expand to. If the expanded width is less than or equal to the
|
|
9873
|
+
* default bin count per position, the function returns 0.
|
|
9874
|
+
*
|
|
9875
|
+
* @param currentMinBinId The current minimum bin ID of the position.
|
|
9876
|
+
* @param currentMaxBinId The current maximum bin ID of the position.
|
|
9877
|
+
* @param connection The connection to the Solana RPC node.
|
|
9878
|
+
* @param binCountToExpand The number of bins to expand the position by.
|
|
9879
|
+
* @returns The minimum lamports required to expand the position to the given
|
|
9880
|
+
* width.
|
|
9881
|
+
*/
|
|
9882
|
+
declare function getPositionExpandRentExemption(currentMinBinId: BN, currentMaxBinId: BN, connection: Connection, binCountToExpand: BN): Promise<number>;
|
|
9883
|
+
/**
|
|
9884
|
+
* Calculate the number of extended bins in a position.
|
|
9885
|
+
*
|
|
9886
|
+
* @param minBinId The minimum bin ID of the position.
|
|
9887
|
+
* @param maxBinId The maximum bin ID of the position.
|
|
9888
|
+
* @returns The number of extended bins in the position. If the position width is
|
|
9889
|
+
* less than or equal to the default bin count per position, returns 0.
|
|
9890
|
+
*/
|
|
9891
|
+
declare function getExtendedPositionBinCount(minBinId: BN, maxBinId: BN): BN;
|
|
9892
|
+
/**
|
|
9893
|
+
* Decode the extended position data.
|
|
9894
|
+
*
|
|
9895
|
+
* @param base The base position with the base data.
|
|
9896
|
+
* @param program The program that the position is associated with.
|
|
9897
|
+
* @param bytes The buffer of bytes to decode.
|
|
9898
|
+
* @returns The decoded extended position data.
|
|
9899
|
+
*/
|
|
9900
|
+
declare function decodeExtendedPosition(base: PositionV2, program: Program<LbClmm>, bytes: Buffer): ExtendedPositionBinData[];
|
|
9901
|
+
|
|
9758
9902
|
/**
|
|
9759
9903
|
* Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
|
|
9760
9904
|
* @param activeId The bin id of the active bin.
|
|
@@ -21775,4 +21919,4 @@ declare const MAX_EXTRA_BIN_ARRAYS = 3;
|
|
|
21775
21919
|
declare const U64_MAX: BN$1;
|
|
21776
21920
|
declare const MAX_BINS_PER_POSITION: BN$1;
|
|
21777
21921
|
|
|
21778
|
-
export { ADMIN, AccountName, ActionType, ActivationType, AmountIntoBin, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_FEE, BIN_ARRAY_BITMAP_FEE_BN, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, BIN_ARRAY_FEE_BN, BidAskParameters, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, CreateRebalancePositionParams, DEFAULT_BIN_PER_POSITION, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, ExtendedPositionBinData, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, InitializeMultiplePositionAndAddLiquidityByStrategyResponse, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, LiquidityStrategyParameterBuilder, LiquidityStrategyParameters, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BINS_PER_POSITION, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, MAX_RESIZE_LENGTH, MEMO_PROGRAM_ID, Network, Opt, POOL_FEE, POOL_FEE_BN, POSITION_BIN_DATA_SIZE, POSITION_FEE, POSITION_FEE_BN, POSITION_MAX_LENGTH, POSITION_MIN_SIZE, PRECISION, PairLockInfo, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionV2, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, RebalanceAddLiquidityParam, RebalancePosition, RebalancePositionBinArrayRentalCostQuote, RebalancePositionResponse, RebalanceRemoveLiquidityParam, RebalanceWithDeposit, RebalanceWithWithdraw, RemainingAccountInfo, RemainingAccountsInfoSlice, ResizeSide, ResizeSideEnum, RewardInfo, RewardInfos, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityCostBreakdown, SeedLiquidityResponse, SeedLiquiditySingleBinResponse, SimulateRebalanceResp, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializeMultiplePositionAndAddLiquidityParamsByStrategy, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TOKEN_ACCOUNT_FEE, TOKEN_ACCOUNT_FEE_BN, TQuoteCreatePositionParams, TokenReserve, U64_MAX, UserFeeInfo, UserRewardInfo, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, buildBitFlagAndNegateStrategyParameters, buildLiquidityStrategyParameters, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, capSlippagePercentage, chunkDepositWithRebalanceEndpoint, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, createProgram, decodeAccount, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOracle, derivePermissionLbPair, derivePlaceHolderAccountMeta, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getAccountDiscriminator, getAmountInBinsAskSide, getAmountInBinsBidSide, getAndCapMaxActiveBinSlippage, getAutoFillAmountByRebalancedPosition, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinCount, getBinFromBinArray, getBinIdIndexInBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getLiquidityStrategyParameterBuilder, getOrCreateATAInstruction, getOutAmount, getPositionCountByBinCount, getPriceOfBinByBinId, getRebalanceBinArrayIndexesAndBitmapCoverage, getSlippageMaxAmount, getSlippageMinAmount, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, resetUninvolvedLiquidityParams, sParameters, suggestBalancedXParametersFromY, suggestBalancedYParametersFromX, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountIntoBins, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, updateBinArray, vParameters, wrapSOLInstruction };
|
|
21922
|
+
export { ADMIN, AccountName, ActionType, ActivationType, AmountIntoBin, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_FEE, BIN_ARRAY_BITMAP_FEE_BN, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, BIN_ARRAY_FEE_BN, BidAskParameters, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, CreateRebalancePositionParams, DEFAULT_BIN_PER_POSITION, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, ExtendedPositionBinData, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, IPosition, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, InitializeMultiplePositionAndAddLiquidityByStrategyResponse, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, LiquidityStrategyParameterBuilder, LiquidityStrategyParameters, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BINS_PER_POSITION, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, MAX_RESIZE_LENGTH, MEMO_PROGRAM_ID, Network, Opt, POOL_FEE, POOL_FEE_BN, POSITION_BIN_DATA_SIZE, POSITION_FEE, POSITION_FEE_BN, POSITION_MAX_LENGTH, POSITION_MIN_SIZE, PRECISION, PairLockInfo, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionV2, PositionV2Wrapper, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, RebalanceAddLiquidityParam, RebalancePosition, RebalancePositionBinArrayRentalCostQuote, RebalancePositionResponse, RebalanceRemoveLiquidityParam, RebalanceWithDeposit, RebalanceWithWithdraw, RemainingAccountInfo, RemainingAccountsInfoSlice, ResizeSide, ResizeSideEnum, RewardInfo, RewardInfos, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityCostBreakdown, SeedLiquidityResponse, SeedLiquiditySingleBinResponse, SimulateRebalanceResp, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializeMultiplePositionAndAddLiquidityParamsByStrategy, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TOKEN_ACCOUNT_FEE, TOKEN_ACCOUNT_FEE_BN, TQuoteCreatePositionParams, TokenReserve, U64_MAX, UserFeeInfo, UserRewardInfo, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, buildBitFlagAndNegateStrategyParameters, buildLiquidityStrategyParameters, calculateBidAskDistribution, calculateNormalDistribution, calculatePositionSize, calculateSpotDistribution, capSlippagePercentage, chunkBinRange, chunkBinRangeIntoExtendedPositions, chunkDepositWithRebalanceEndpoint, chunkPositionBinRange, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, createProgram, decodeAccount, decodeExtendedPosition, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOracle, derivePermissionLbPair, derivePlaceHolderAccountMeta, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getAccountDiscriminator, getAmountInBinsAskSide, getAmountInBinsBidSide, getAndCapMaxActiveBinSlippage, getAutoFillAmountByRebalancedPosition, getBaseFee, getBinArrayAccountMetasCoverage, getBinArrayIndexesCoverage, getBinArrayKeysCoverage, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinCount, getBinFromBinArray, getBinIdIndexInBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExtendedPositionBinCount, getLiquidityStrategyParameterBuilder, getOrCreateATAInstruction, getOutAmount, getPositionCountByBinCount, getPositionExpandRentExemption, getPositionLowerUpperBinIdWithLiquidity, getPositionRentExemption, getPriceOfBinByBinId, getRebalanceBinArrayIndexesAndBitmapCoverage, getSlippageMaxAmount, getSlippageMinAmount, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, isPositionNoFee, isPositionNoReward, parseLogs, range, resetUninvolvedLiquidityParams, sParameters, suggestBalancedXParametersFromY, suggestBalancedYParametersFromX, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountIntoBins, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, updateBinArray, vParameters, wrapPosition, wrapSOLInstruction };
|
package/dist/index.js
CHANGED
|
@@ -11267,6 +11267,20 @@ function isPositionNoFee(position) {
|
|
|
11267
11267
|
function isPositionNoReward(position) {
|
|
11268
11268
|
return position.rewardOne.isZero() && position.rewardTwo.isZero();
|
|
11269
11269
|
}
|
|
11270
|
+
function chunkBinRangeIntoExtendedPositions(minBinId, maxBinId) {
|
|
11271
|
+
const chunkedBinRange = [];
|
|
11272
|
+
for (let currentMinBinId = minBinId; currentMinBinId <= maxBinId; currentMinBinId += POSITION_MAX_LENGTH.toNumber()) {
|
|
11273
|
+
const currentMaxBinId = Math.min(
|
|
11274
|
+
currentMinBinId + POSITION_MAX_LENGTH.toNumber() - 1,
|
|
11275
|
+
maxBinId
|
|
11276
|
+
);
|
|
11277
|
+
chunkedBinRange.push({
|
|
11278
|
+
lowerBinId: currentMinBinId,
|
|
11279
|
+
upperBinId: currentMaxBinId
|
|
11280
|
+
});
|
|
11281
|
+
}
|
|
11282
|
+
return chunkedBinRange;
|
|
11283
|
+
}
|
|
11270
11284
|
function chunkBinRange(minBinId, maxBinId) {
|
|
11271
11285
|
const chunkedBinRange = [];
|
|
11272
11286
|
let startBinId = minBinId;
|
|
@@ -11283,6 +11297,65 @@ function chunkBinRange(minBinId, maxBinId) {
|
|
|
11283
11297
|
}
|
|
11284
11298
|
return chunkedBinRange;
|
|
11285
11299
|
}
|
|
11300
|
+
function chunkPositionBinRange(position, minBinId, maxBinId) {
|
|
11301
|
+
const chunkedFeesAndRewards = [];
|
|
11302
|
+
let totalAmountX = new (0, _bnjs2.default)(0);
|
|
11303
|
+
let totalAmountY = new (0, _bnjs2.default)(0);
|
|
11304
|
+
let totalFeeXAmount = new (0, _bnjs2.default)(0);
|
|
11305
|
+
let totalFeeYAmount = new (0, _bnjs2.default)(0);
|
|
11306
|
+
let totalRewardAmounts = [new (0, _bnjs2.default)(0), new (0, _bnjs2.default)(0)];
|
|
11307
|
+
let count = 0;
|
|
11308
|
+
for (let i = 0; i < position.positionData.positionBinData.length; i++) {
|
|
11309
|
+
const positionBinData = position.positionData.positionBinData[i];
|
|
11310
|
+
if (positionBinData.binId >= minBinId && positionBinData.binId <= maxBinId) {
|
|
11311
|
+
totalFeeXAmount = totalFeeXAmount.add(
|
|
11312
|
+
new (0, _bnjs2.default)(positionBinData.positionFeeXAmount)
|
|
11313
|
+
);
|
|
11314
|
+
totalFeeYAmount = totalFeeYAmount.add(
|
|
11315
|
+
new (0, _bnjs2.default)(positionBinData.positionFeeYAmount)
|
|
11316
|
+
);
|
|
11317
|
+
totalAmountX = totalAmountX.add(new (0, _bnjs2.default)(positionBinData.positionXAmount));
|
|
11318
|
+
totalAmountY = totalAmountY.add(new (0, _bnjs2.default)(positionBinData.positionYAmount));
|
|
11319
|
+
for (const [
|
|
11320
|
+
index,
|
|
11321
|
+
reward
|
|
11322
|
+
] of positionBinData.positionRewardAmount.entries()) {
|
|
11323
|
+
totalRewardAmounts[index] = totalRewardAmounts[index].add(
|
|
11324
|
+
new (0, _bnjs2.default)(reward)
|
|
11325
|
+
);
|
|
11326
|
+
}
|
|
11327
|
+
count++;
|
|
11328
|
+
}
|
|
11329
|
+
if (count === DEFAULT_BIN_PER_POSITION.toNumber() || positionBinData.binId == maxBinId) {
|
|
11330
|
+
chunkedFeesAndRewards.push({
|
|
11331
|
+
minBinId: positionBinData.binId - count + 1,
|
|
11332
|
+
maxBinId: positionBinData.binId,
|
|
11333
|
+
feeXAmount: totalFeeXAmount,
|
|
11334
|
+
feeYAmount: totalFeeYAmount,
|
|
11335
|
+
rewardAmounts: totalRewardAmounts,
|
|
11336
|
+
amountX: totalAmountX,
|
|
11337
|
+
amountY: totalAmountY
|
|
11338
|
+
});
|
|
11339
|
+
totalFeeXAmount = new (0, _bnjs2.default)(0);
|
|
11340
|
+
totalFeeYAmount = new (0, _bnjs2.default)(0);
|
|
11341
|
+
totalAmountX = new (0, _bnjs2.default)(0);
|
|
11342
|
+
totalAmountY = new (0, _bnjs2.default)(0);
|
|
11343
|
+
totalRewardAmounts = [new (0, _bnjs2.default)(0), new (0, _bnjs2.default)(0)];
|
|
11344
|
+
count = 0;
|
|
11345
|
+
}
|
|
11346
|
+
}
|
|
11347
|
+
return chunkedFeesAndRewards;
|
|
11348
|
+
}
|
|
11349
|
+
function calculatePositionSize(binCount) {
|
|
11350
|
+
const extraBinCount = binCount.gt(DEFAULT_BIN_PER_POSITION) ? binCount.sub(DEFAULT_BIN_PER_POSITION) : new (0, _bnjs2.default)(0);
|
|
11351
|
+
return new (0, _bnjs2.default)(POSITION_MIN_SIZE).add(
|
|
11352
|
+
extraBinCount.mul(new (0, _bnjs2.default)(POSITION_BIN_DATA_SIZE))
|
|
11353
|
+
);
|
|
11354
|
+
}
|
|
11355
|
+
function getPositionRentExemption(connection, binCount) {
|
|
11356
|
+
const size = calculatePositionSize(binCount);
|
|
11357
|
+
return connection.getMinimumBalanceForRentExemption(size.toNumber());
|
|
11358
|
+
}
|
|
11286
11359
|
async function getPositionExpandRentExemption(currentMinBinId, currentMaxBinId, connection, binCountToExpand) {
|
|
11287
11360
|
const currentPositionWidth = currentMaxBinId.sub(currentMinBinId).addn(1);
|
|
11288
11361
|
const positionWidthAfterExpand = currentPositionWidth.add(binCountToExpand);
|
|
@@ -15036,7 +15109,11 @@ var DLMM = class {
|
|
|
15036
15109
|
tokenY,
|
|
15037
15110
|
new (0, _anchor.BN)(presetParameterState.binStep),
|
|
15038
15111
|
new (0, _anchor.BN)(presetParameterState.baseFactor),
|
|
15039
|
-
new (0, _anchor.BN)(presetParameterState.baseFactor)
|
|
15112
|
+
new (0, _anchor.BN)(presetParameterState.baseFactor),
|
|
15113
|
+
{
|
|
15114
|
+
cluster: _optionalChain([opt, 'optionalAccess', _69 => _69.cluster]),
|
|
15115
|
+
programId: _optionalChain([opt, 'optionalAccess', _70 => _70.programId])
|
|
15116
|
+
}
|
|
15040
15117
|
);
|
|
15041
15118
|
if (existsPool) {
|
|
15042
15119
|
throw new Error("Pool already exists");
|
|
@@ -15263,7 +15340,7 @@ var DLMM = class {
|
|
|
15263
15340
|
swapForY,
|
|
15264
15341
|
new (0, _anchor.BN)(activeIdToLoop),
|
|
15265
15342
|
this.lbPair,
|
|
15266
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
15343
|
+
_nullishCoalesce(_optionalChain([this, 'access', _71 => _71.binArrayBitmapExtension, 'optionalAccess', _72 => _72.account]), () => ( null))
|
|
15267
15344
|
);
|
|
15268
15345
|
if (binArrayIndex === null)
|
|
15269
15346
|
shouldStop = true;
|
|
@@ -15594,8 +15671,8 @@ var DLMM = class {
|
|
|
15594
15671
|
position,
|
|
15595
15672
|
this.tokenX.mint,
|
|
15596
15673
|
this.tokenY.mint,
|
|
15597
|
-
_optionalChain([this, 'access',
|
|
15598
|
-
_optionalChain([this, 'access',
|
|
15674
|
+
_optionalChain([this, 'access', _73 => _73.rewards, 'access', _74 => _74[0], 'optionalAccess', _75 => _75.mint]),
|
|
15675
|
+
_optionalChain([this, 'access', _76 => _76.rewards, 'access', _77 => _77[1], 'optionalAccess', _78 => _78.mint]),
|
|
15599
15676
|
positionBinArraysMapV2
|
|
15600
15677
|
),
|
|
15601
15678
|
version: position.version()
|
|
@@ -15748,8 +15825,8 @@ var DLMM = class {
|
|
|
15748
15825
|
position,
|
|
15749
15826
|
this.tokenX.mint,
|
|
15750
15827
|
this.tokenY.mint,
|
|
15751
|
-
_optionalChain([this, 'access',
|
|
15752
|
-
_optionalChain([this, 'access',
|
|
15828
|
+
_optionalChain([this, 'access', _79 => _79.rewards, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.mint]),
|
|
15829
|
+
_optionalChain([this, 'access', _82 => _82.rewards, 'access', _83 => _83[1], 'optionalAccess', _84 => _84.mint]),
|
|
15753
15830
|
binArrayMap
|
|
15754
15831
|
),
|
|
15755
15832
|
version: position.version()
|
|
@@ -16925,7 +17002,7 @@ var DLMM = class {
|
|
|
16925
17002
|
swapForY,
|
|
16926
17003
|
activeId,
|
|
16927
17004
|
this.lbPair,
|
|
16928
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17005
|
+
_nullishCoalesce(_optionalChain([this, 'access', _85 => _85.binArrayBitmapExtension, 'optionalAccess', _86 => _86.account]), () => ( null)),
|
|
16929
17006
|
binArrays
|
|
16930
17007
|
);
|
|
16931
17008
|
if (binArrayAccountToSwap == null) {
|
|
@@ -16990,7 +17067,7 @@ var DLMM = class {
|
|
|
16990
17067
|
swapForY,
|
|
16991
17068
|
activeId,
|
|
16992
17069
|
this.lbPair,
|
|
16993
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17070
|
+
_nullishCoalesce(_optionalChain([this, 'access', _87 => _87.binArrayBitmapExtension, 'optionalAccess', _88 => _88.account]), () => ( null)),
|
|
16994
17071
|
binArrays
|
|
16995
17072
|
);
|
|
16996
17073
|
if (binArrayAccountToSwap == null) {
|
|
@@ -17087,7 +17164,7 @@ var DLMM = class {
|
|
|
17087
17164
|
swapForY,
|
|
17088
17165
|
activeId,
|
|
17089
17166
|
this.lbPair,
|
|
17090
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17167
|
+
_nullishCoalesce(_optionalChain([this, 'access', _89 => _89.binArrayBitmapExtension, 'optionalAccess', _90 => _90.account]), () => ( null)),
|
|
17091
17168
|
binArrays
|
|
17092
17169
|
);
|
|
17093
17170
|
if (binArrayAccountToSwap == null) {
|
|
@@ -17175,7 +17252,7 @@ var DLMM = class {
|
|
|
17175
17252
|
swapForY,
|
|
17176
17253
|
activeId,
|
|
17177
17254
|
this.lbPair,
|
|
17178
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17255
|
+
_nullishCoalesce(_optionalChain([this, 'access', _91 => _91.binArrayBitmapExtension, 'optionalAccess', _92 => _92.account]), () => ( null)),
|
|
17179
17256
|
binArrays
|
|
17180
17257
|
);
|
|
17181
17258
|
if (binArrayAccountToSwap == null) {
|
|
@@ -18521,7 +18598,7 @@ var DLMM = class {
|
|
|
18521
18598
|
swapForY,
|
|
18522
18599
|
new (0, _anchor.BN)(activeBinId),
|
|
18523
18600
|
this.lbPair,
|
|
18524
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
18601
|
+
_nullishCoalesce(_optionalChain([this, 'access', _93 => _93.binArrayBitmapExtension, 'optionalAccess', _94 => _94.account]), () => ( null))
|
|
18525
18602
|
);
|
|
18526
18603
|
if (toBinArrayIndex === null)
|
|
18527
18604
|
return true;
|
|
@@ -18558,7 +18635,7 @@ var DLMM = class {
|
|
|
18558
18635
|
swapForY,
|
|
18559
18636
|
new (0, _anchor.BN)(activeBinId),
|
|
18560
18637
|
this.lbPair,
|
|
18561
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
18638
|
+
_nullishCoalesce(_optionalChain([this, 'access', _95 => _95.binArrayBitmapExtension, 'optionalAccess', _96 => _96.account]), () => ( null))
|
|
18562
18639
|
);
|
|
18563
18640
|
const marketPriceBinArrayIndex = binIdToBinArrayIndex(
|
|
18564
18641
|
new (0, _anchor.BN)(marketPriceBinId)
|
|
@@ -18594,7 +18671,7 @@ var DLMM = class {
|
|
|
18594
18671
|
let binArrayBitmapExtension = null;
|
|
18595
18672
|
if (binArrayBitMapExtensionPubkey) {
|
|
18596
18673
|
binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
|
|
18597
|
-
if (!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
18674
|
+
if (!_optionalChain([binArrayAccounts, 'optionalAccess', _97 => _97[0]])) {
|
|
18598
18675
|
const initializeBitmapExtensionIx = await this.program.methods.initializeBinArrayBitmapExtension().accountsPartial({
|
|
18599
18676
|
binArrayBitmapExtension: binArrayBitMapExtensionPubkey,
|
|
18600
18677
|
funder: owner,
|
|
@@ -18603,10 +18680,10 @@ var DLMM = class {
|
|
|
18603
18680
|
preInstructions.push(initializeBitmapExtensionIx);
|
|
18604
18681
|
}
|
|
18605
18682
|
}
|
|
18606
|
-
if (!!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
18683
|
+
if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _98 => _98[1]])) {
|
|
18607
18684
|
fromBinArray = fromBinArrayPubkey;
|
|
18608
18685
|
}
|
|
18609
|
-
if (!!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
18686
|
+
if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _99 => _99[2]]) && !!toBinArrayIndex) {
|
|
18610
18687
|
toBinArray = toBinArrayPubkey;
|
|
18611
18688
|
}
|
|
18612
18689
|
const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
|
|
@@ -19512,7 +19589,7 @@ var DLMM = class {
|
|
|
19512
19589
|
);
|
|
19513
19590
|
})
|
|
19514
19591
|
);
|
|
19515
|
-
const version = _nullishCoalesce(_optionalChain([binArrays, 'access',
|
|
19592
|
+
const version = _nullishCoalesce(_optionalChain([binArrays, 'access', _100 => _100.find, 'call', _101 => _101((binArray) => binArray != null), 'optionalAccess', _102 => _102.version]), () => ( 1));
|
|
19516
19593
|
return Array.from(
|
|
19517
19594
|
enumerateBins(
|
|
19518
19595
|
binsById,
|
|
@@ -19912,5 +19989,21 @@ var src_default = DLMM;
|
|
|
19912
19989
|
|
|
19913
19990
|
|
|
19914
19991
|
|
|
19915
|
-
|
|
19992
|
+
|
|
19993
|
+
|
|
19994
|
+
|
|
19995
|
+
|
|
19996
|
+
|
|
19997
|
+
|
|
19998
|
+
|
|
19999
|
+
|
|
20000
|
+
|
|
20001
|
+
|
|
20002
|
+
|
|
20003
|
+
|
|
20004
|
+
|
|
20005
|
+
|
|
20006
|
+
|
|
20007
|
+
|
|
20008
|
+
exports.ADMIN = ADMIN; exports.ActionType = ActionType; exports.ActivationType = ActivationType; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_ARRAY_BITMAP_FEE = BIN_ARRAY_BITMAP_FEE; exports.BIN_ARRAY_BITMAP_FEE_BN = BIN_ARRAY_BITMAP_FEE_BN; exports.BIN_ARRAY_BITMAP_SIZE = BIN_ARRAY_BITMAP_SIZE; exports.BIN_ARRAY_FEE = BIN_ARRAY_FEE; exports.BIN_ARRAY_FEE_BN = BIN_ARRAY_FEE_BN; exports.BinLiquidity = BinLiquidity; exports.BitmapType = BitmapType; exports.ClockLayout = ClockLayout; exports.DEFAULT_BIN_PER_POSITION = DEFAULT_BIN_PER_POSITION; exports.DLMMError = DLMMError; exports.DlmmSdkError = DlmmSdkError; exports.EXTENSION_BINARRAY_BITMAP_SIZE = EXTENSION_BINARRAY_BITMAP_SIZE; exports.FEE_PRECISION = FEE_PRECISION; exports.IDL = dlmm_default; exports.ILM_BASE = ILM_BASE; exports.LBCLMM_PROGRAM_IDS = LBCLMM_PROGRAM_IDS; exports.MAX_ACTIVE_BIN_SLIPPAGE = MAX_ACTIVE_BIN_SLIPPAGE; exports.MAX_BINS_PER_POSITION = MAX_BINS_PER_POSITION; 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_CLAIM_ALL_ALLOWED = MAX_CLAIM_ALL_ALLOWED; exports.MAX_EXTRA_BIN_ARRAYS = MAX_EXTRA_BIN_ARRAYS; exports.MAX_FEE_RATE = MAX_FEE_RATE; exports.MAX_RESIZE_LENGTH = MAX_RESIZE_LENGTH; exports.MEMO_PROGRAM_ID = MEMO_PROGRAM_ID; exports.Network = Network; exports.POOL_FEE = POOL_FEE; exports.POOL_FEE_BN = POOL_FEE_BN; exports.POSITION_BIN_DATA_SIZE = POSITION_BIN_DATA_SIZE; exports.POSITION_FEE = POSITION_FEE; exports.POSITION_FEE_BN = POSITION_FEE_BN; exports.POSITION_MAX_LENGTH = POSITION_MAX_LENGTH; exports.POSITION_MIN_SIZE = POSITION_MIN_SIZE; exports.PRECISION = PRECISION; exports.PairStatus = PairStatus; exports.PairType = PairType; exports.PositionV2Wrapper = PositionV2Wrapper; exports.PositionVersion = PositionVersion; exports.RebalancePosition = RebalancePosition; exports.ResizeSide = ResizeSide; exports.SCALE = SCALE; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SIMULATION_USER = SIMULATION_USER; exports.Strategy = Strategy; exports.StrategyType = StrategyType; exports.TOKEN_ACCOUNT_FEE = TOKEN_ACCOUNT_FEE; exports.TOKEN_ACCOUNT_FEE_BN = TOKEN_ACCOUNT_FEE_BN; exports.U64_MAX = U64_MAX; exports.autoFillXByStrategy = autoFillXByStrategy; exports.autoFillXByWeight = autoFillXByWeight; exports.autoFillYByStrategy = autoFillYByStrategy; exports.autoFillYByWeight = autoFillYByWeight; exports.binIdToBinArrayIndex = binIdToBinArrayIndex; exports.buildBitFlagAndNegateStrategyParameters = buildBitFlagAndNegateStrategyParameters; exports.buildLiquidityStrategyParameters = buildLiquidityStrategyParameters; exports.calculateBidAskDistribution = calculateBidAskDistribution; exports.calculateNormalDistribution = calculateNormalDistribution; exports.calculatePositionSize = calculatePositionSize; exports.calculateSpotDistribution = calculateSpotDistribution; exports.capSlippagePercentage = capSlippagePercentage; exports.chunkBinRange = chunkBinRange; exports.chunkBinRangeIntoExtendedPositions = chunkBinRangeIntoExtendedPositions; exports.chunkDepositWithRebalanceEndpoint = chunkDepositWithRebalanceEndpoint; exports.chunkPositionBinRange = chunkPositionBinRange; exports.chunkedFetchMultipleBinArrayBitmapExtensionAccount = chunkedFetchMultipleBinArrayBitmapExtensionAccount; exports.chunkedFetchMultiplePoolAccount = chunkedFetchMultiplePoolAccount; exports.chunkedGetMultipleAccountInfos = chunkedGetMultipleAccountInfos; exports.chunks = chunks; exports.computeFee = computeFee; exports.computeFeeFromAmount = computeFeeFromAmount; exports.computeProtocolFee = computeProtocolFee; exports.createProgram = createProgram; exports.decodeAccount = decodeAccount; exports.decodeExtendedPosition = decodeExtendedPosition; exports.default = src_default; exports.deriveBinArray = deriveBinArray; exports.deriveBinArrayBitmapExtension = deriveBinArrayBitmapExtension; exports.deriveCustomizablePermissionlessLbPair = deriveCustomizablePermissionlessLbPair; exports.deriveEventAuthority = deriveEventAuthority; exports.deriveLbPair = deriveLbPair; exports.deriveLbPair2 = deriveLbPair2; exports.deriveLbPairWithPresetParamWithIndexKey = deriveLbPairWithPresetParamWithIndexKey; exports.deriveOracle = deriveOracle; exports.derivePermissionLbPair = derivePermissionLbPair; exports.derivePlaceHolderAccountMeta = derivePlaceHolderAccountMeta; exports.derivePosition = derivePosition; exports.derivePresetParameter = derivePresetParameter; exports.derivePresetParameter2 = derivePresetParameter2; exports.derivePresetParameterWithIndex = derivePresetParameterWithIndex; exports.deriveReserve = deriveReserve; exports.deriveRewardVault = deriveRewardVault; exports.deriveTokenBadge = deriveTokenBadge; exports.enumerateBins = enumerateBins; exports.findNextBinArrayIndexWithLiquidity = findNextBinArrayIndexWithLiquidity; exports.findNextBinArrayWithLiquidity = findNextBinArrayWithLiquidity; exports.fromWeightDistributionToAmount = fromWeightDistributionToAmount; exports.fromWeightDistributionToAmountOneSide = fromWeightDistributionToAmountOneSide; exports.getAccountDiscriminator = getAccountDiscriminator; exports.getAmountInBinsAskSide = getAmountInBinsAskSide; exports.getAmountInBinsBidSide = getAmountInBinsBidSide; exports.getAndCapMaxActiveBinSlippage = getAndCapMaxActiveBinSlippage; exports.getAutoFillAmountByRebalancedPosition = getAutoFillAmountByRebalancedPosition; exports.getBaseFee = getBaseFee; exports.getBinArrayAccountMetasCoverage = getBinArrayAccountMetasCoverage; exports.getBinArrayIndexesCoverage = getBinArrayIndexesCoverage; exports.getBinArrayKeysCoverage = getBinArrayKeysCoverage2; exports.getBinArrayLowerUpperBinId = getBinArrayLowerUpperBinId; exports.getBinArraysRequiredByPositionRange = getBinArraysRequiredByPositionRange; exports.getBinCount = getBinCount; exports.getBinFromBinArray = getBinFromBinArray; exports.getBinIdIndexInBinArray = getBinIdIndexInBinArray; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExtendedPositionBinCount = getExtendedPositionBinCount; exports.getLiquidityStrategyParameterBuilder = getLiquidityStrategyParameterBuilder; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getOutAmount = getOutAmount; exports.getPositionCountByBinCount = getPositionCountByBinCount; exports.getPositionExpandRentExemption = getPositionExpandRentExemption; exports.getPositionLowerUpperBinIdWithLiquidity = getPositionLowerUpperBinIdWithLiquidity; exports.getPositionRentExemption = getPositionRentExemption; exports.getPriceOfBinByBinId = getPriceOfBinByBinId; exports.getRebalanceBinArrayIndexesAndBitmapCoverage = getRebalanceBinArrayIndexesAndBitmapCoverage; exports.getSlippageMaxAmount = getSlippageMaxAmount; exports.getSlippageMinAmount = getSlippageMinAmount; exports.getTokenBalance = getTokenBalance; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgramId = getTokenProgramId; exports.getTokensMintFromPoolAddress = getTokensMintFromPoolAddress; exports.getTotalFee = getTotalFee; exports.getVariableFee = getVariableFee; exports.isBinIdWithinBinArray = isBinIdWithinBinArray; exports.isOverflowDefaultBinArrayBitmap = isOverflowDefaultBinArrayBitmap; exports.isPositionNoFee = isPositionNoFee; exports.isPositionNoReward = isPositionNoReward; exports.parseLogs = parseLogs; exports.range = range; exports.resetUninvolvedLiquidityParams = resetUninvolvedLiquidityParams; exports.suggestBalancedXParametersFromY = suggestBalancedXParametersFromY; exports.suggestBalancedYParametersFromX = suggestBalancedYParametersFromX; exports.swapExactInQuoteAtBin = swapExactInQuoteAtBin; exports.swapExactOutQuoteAtBin = swapExactOutQuoteAtBin; exports.toAmountAskSide = toAmountAskSide; exports.toAmountBidSide = toAmountBidSide; exports.toAmountBothSide = toAmountBothSide; exports.toAmountIntoBins = toAmountIntoBins; exports.toAmountsBothSideByStrategy = toAmountsBothSideByStrategy; exports.toStrategyParameters = toStrategyParameters; exports.toWeightDistribution = toWeightDistribution; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.updateBinArray = updateBinArray; exports.wrapPosition = wrapPosition; exports.wrapSOLInstruction = wrapSOLInstruction;
|
|
19916
20009
|
//# sourceMappingURL=index.js.map
|