@meteora-ag/dlmm 1.6.0-rc.25 → 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 +113 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -2
- 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()
|
|
@@ -16806,7 +16883,9 @@ var DLMM = class {
|
|
|
16806
16883
|
const setCUIx = await getEstimatedComputeUnitIxWithBuffer(
|
|
16807
16884
|
this.program.provider.connection,
|
|
16808
16885
|
ixs,
|
|
16809
|
-
user
|
|
16886
|
+
user,
|
|
16887
|
+
0.3
|
|
16888
|
+
// Extra 30% buffer CU
|
|
16810
16889
|
);
|
|
16811
16890
|
return [setCUIx, ...ixs];
|
|
16812
16891
|
})
|
|
@@ -16923,7 +17002,7 @@ var DLMM = class {
|
|
|
16923
17002
|
swapForY,
|
|
16924
17003
|
activeId,
|
|
16925
17004
|
this.lbPair,
|
|
16926
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17005
|
+
_nullishCoalesce(_optionalChain([this, 'access', _85 => _85.binArrayBitmapExtension, 'optionalAccess', _86 => _86.account]), () => ( null)),
|
|
16927
17006
|
binArrays
|
|
16928
17007
|
);
|
|
16929
17008
|
if (binArrayAccountToSwap == null) {
|
|
@@ -16988,7 +17067,7 @@ var DLMM = class {
|
|
|
16988
17067
|
swapForY,
|
|
16989
17068
|
activeId,
|
|
16990
17069
|
this.lbPair,
|
|
16991
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17070
|
+
_nullishCoalesce(_optionalChain([this, 'access', _87 => _87.binArrayBitmapExtension, 'optionalAccess', _88 => _88.account]), () => ( null)),
|
|
16992
17071
|
binArrays
|
|
16993
17072
|
);
|
|
16994
17073
|
if (binArrayAccountToSwap == null) {
|
|
@@ -17085,7 +17164,7 @@ var DLMM = class {
|
|
|
17085
17164
|
swapForY,
|
|
17086
17165
|
activeId,
|
|
17087
17166
|
this.lbPair,
|
|
17088
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17167
|
+
_nullishCoalesce(_optionalChain([this, 'access', _89 => _89.binArrayBitmapExtension, 'optionalAccess', _90 => _90.account]), () => ( null)),
|
|
17089
17168
|
binArrays
|
|
17090
17169
|
);
|
|
17091
17170
|
if (binArrayAccountToSwap == null) {
|
|
@@ -17173,7 +17252,7 @@ var DLMM = class {
|
|
|
17173
17252
|
swapForY,
|
|
17174
17253
|
activeId,
|
|
17175
17254
|
this.lbPair,
|
|
17176
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
17255
|
+
_nullishCoalesce(_optionalChain([this, 'access', _91 => _91.binArrayBitmapExtension, 'optionalAccess', _92 => _92.account]), () => ( null)),
|
|
17177
17256
|
binArrays
|
|
17178
17257
|
);
|
|
17179
17258
|
if (binArrayAccountToSwap == null) {
|
|
@@ -18519,7 +18598,7 @@ var DLMM = class {
|
|
|
18519
18598
|
swapForY,
|
|
18520
18599
|
new (0, _anchor.BN)(activeBinId),
|
|
18521
18600
|
this.lbPair,
|
|
18522
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
18601
|
+
_nullishCoalesce(_optionalChain([this, 'access', _93 => _93.binArrayBitmapExtension, 'optionalAccess', _94 => _94.account]), () => ( null))
|
|
18523
18602
|
);
|
|
18524
18603
|
if (toBinArrayIndex === null)
|
|
18525
18604
|
return true;
|
|
@@ -18556,7 +18635,7 @@ var DLMM = class {
|
|
|
18556
18635
|
swapForY,
|
|
18557
18636
|
new (0, _anchor.BN)(activeBinId),
|
|
18558
18637
|
this.lbPair,
|
|
18559
|
-
_nullishCoalesce(_optionalChain([this, 'access',
|
|
18638
|
+
_nullishCoalesce(_optionalChain([this, 'access', _95 => _95.binArrayBitmapExtension, 'optionalAccess', _96 => _96.account]), () => ( null))
|
|
18560
18639
|
);
|
|
18561
18640
|
const marketPriceBinArrayIndex = binIdToBinArrayIndex(
|
|
18562
18641
|
new (0, _anchor.BN)(marketPriceBinId)
|
|
@@ -18592,7 +18671,7 @@ var DLMM = class {
|
|
|
18592
18671
|
let binArrayBitmapExtension = null;
|
|
18593
18672
|
if (binArrayBitMapExtensionPubkey) {
|
|
18594
18673
|
binArrayBitmapExtension = binArrayBitMapExtensionPubkey;
|
|
18595
|
-
if (!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
18674
|
+
if (!_optionalChain([binArrayAccounts, 'optionalAccess', _97 => _97[0]])) {
|
|
18596
18675
|
const initializeBitmapExtensionIx = await this.program.methods.initializeBinArrayBitmapExtension().accountsPartial({
|
|
18597
18676
|
binArrayBitmapExtension: binArrayBitMapExtensionPubkey,
|
|
18598
18677
|
funder: owner,
|
|
@@ -18601,10 +18680,10 @@ var DLMM = class {
|
|
|
18601
18680
|
preInstructions.push(initializeBitmapExtensionIx);
|
|
18602
18681
|
}
|
|
18603
18682
|
}
|
|
18604
|
-
if (!!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
18683
|
+
if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _98 => _98[1]])) {
|
|
18605
18684
|
fromBinArray = fromBinArrayPubkey;
|
|
18606
18685
|
}
|
|
18607
|
-
if (!!_optionalChain([binArrayAccounts, 'optionalAccess',
|
|
18686
|
+
if (!!_optionalChain([binArrayAccounts, 'optionalAccess', _99 => _99[2]]) && !!toBinArrayIndex) {
|
|
18608
18687
|
toBinArray = toBinArrayPubkey;
|
|
18609
18688
|
}
|
|
18610
18689
|
const { blockhash, lastValidBlockHeight } = await this.program.provider.connection.getLatestBlockhash("confirmed");
|
|
@@ -19510,7 +19589,7 @@ var DLMM = class {
|
|
|
19510
19589
|
);
|
|
19511
19590
|
})
|
|
19512
19591
|
);
|
|
19513
|
-
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));
|
|
19514
19593
|
return Array.from(
|
|
19515
19594
|
enumerateBins(
|
|
19516
19595
|
binsById,
|
|
@@ -19910,5 +19989,21 @@ var src_default = DLMM;
|
|
|
19910
19989
|
|
|
19911
19990
|
|
|
19912
19991
|
|
|
19913
|
-
|
|
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;
|
|
19914
20009
|
//# sourceMappingURL=index.js.map
|