@meteora-ag/dlmm 1.6.0-rc.19 → 1.6.0-rc.2
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 +364 -95
- package/dist/index.js +3252 -2779
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2777 -2304
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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
|
+
import { IdlDiscriminator } from '@coral-xyz/anchor/dist/cjs/idl';
|
|
6
7
|
import { Mint } from '@solana/spl-token';
|
|
7
8
|
import { AllAccountsMap } from '@coral-xyz/anchor/dist/cjs/program/namespace/types';
|
|
8
9
|
import BN from 'bn.js';
|
|
9
|
-
import { IdlDiscriminator } from '@coral-xyz/anchor/dist/cjs/idl';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
@@ -9126,6 +9126,13 @@ type LbClmm = {
|
|
|
9126
9126
|
];
|
|
9127
9127
|
};
|
|
9128
9128
|
|
|
9129
|
+
declare function buildBitFlagAndNegateStrategyParameters(x0: BN, y0: BN, deltaX: BN, deltaY: BN): {
|
|
9130
|
+
bitFlag: number;
|
|
9131
|
+
x0: BN;
|
|
9132
|
+
y0: BN;
|
|
9133
|
+
deltaX: BN;
|
|
9134
|
+
deltaY: BN;
|
|
9135
|
+
};
|
|
9129
9136
|
interface AmountIntoBin {
|
|
9130
9137
|
binId: BN;
|
|
9131
9138
|
amountX: BN;
|
|
@@ -9405,6 +9412,14 @@ interface TInitializePositionAndAddLiquidityParamsByStrategy {
|
|
|
9405
9412
|
user: PublicKey;
|
|
9406
9413
|
slippage?: number;
|
|
9407
9414
|
}
|
|
9415
|
+
interface InitializeMultiplePositionAndAddLiquidityByStrategyResponse {
|
|
9416
|
+
instructionsByPositions: {
|
|
9417
|
+
positionKeypair: Keypair;
|
|
9418
|
+
initializePositionIx: TransactionInstruction;
|
|
9419
|
+
initializeAtaIxs: TransactionInstruction[];
|
|
9420
|
+
addLiquidityIxs: TransactionInstruction[][];
|
|
9421
|
+
}[];
|
|
9422
|
+
}
|
|
9408
9423
|
interface TInitializeMultiplePositionAndAddLiquidityParamsByStrategy {
|
|
9409
9424
|
totalXAmount: BN$1;
|
|
9410
9425
|
totalYAmount: BN$1;
|
|
@@ -9637,31 +9652,6 @@ interface RebalancePositionBinArrayRentalCostQuote {
|
|
|
9637
9652
|
bitmapExtensionCost: number;
|
|
9638
9653
|
}
|
|
9639
9654
|
|
|
9640
|
-
/** private */
|
|
9641
|
-
declare function derivePresetParameterWithIndex(index: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9642
|
-
declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9643
|
-
/**
|
|
9644
|
-
*
|
|
9645
|
-
* @deprecated Use derivePresetParameter2
|
|
9646
|
-
*/
|
|
9647
|
-
declare function derivePresetParameter(binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9648
|
-
declare function derivePresetParameter2(binStep: BN$1, baseFactor: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9649
|
-
declare function deriveLbPair2(tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, baseFactor: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9650
|
-
/**
|
|
9651
|
-
*
|
|
9652
|
-
* @deprecated Use deriveLbPair2
|
|
9653
|
-
*/
|
|
9654
|
-
declare function deriveLbPair(tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9655
|
-
declare function deriveCustomizablePermissionlessLbPair(tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9656
|
-
declare function derivePermissionLbPair(baseKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9657
|
-
declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9658
|
-
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN$1, width: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9659
|
-
declare function deriveBinArray(lbPair: PublicKey, index: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9660
|
-
declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9661
|
-
declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9662
|
-
declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number];
|
|
9663
|
-
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9664
|
-
|
|
9665
9655
|
/** private */
|
|
9666
9656
|
declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN$1): boolean;
|
|
9667
9657
|
declare function deriveBinArrayBitmapExtension(lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
@@ -9703,6 +9693,238 @@ declare function updateBinArray(activeId: BN$1, clock: Clock, allRewardInfos: Re
|
|
|
9703
9693
|
}[];
|
|
9704
9694
|
};
|
|
9705
9695
|
|
|
9696
|
+
/** private */
|
|
9697
|
+
declare function derivePresetParameterWithIndex(index: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9698
|
+
declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9699
|
+
/**
|
|
9700
|
+
*
|
|
9701
|
+
* @deprecated Use derivePresetParameter2
|
|
9702
|
+
*/
|
|
9703
|
+
declare function derivePresetParameter(binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9704
|
+
declare function derivePresetParameter2(binStep: BN$1, baseFactor: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9705
|
+
declare function deriveLbPair2(tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, baseFactor: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9706
|
+
/**
|
|
9707
|
+
*
|
|
9708
|
+
* @deprecated Use deriveLbPair2
|
|
9709
|
+
*/
|
|
9710
|
+
declare function deriveLbPair(tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9711
|
+
declare function deriveCustomizablePermissionlessLbPair(tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9712
|
+
declare function derivePermissionLbPair(baseKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9713
|
+
declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9714
|
+
declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN$1, width: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9715
|
+
declare function deriveBinArray(lbPair: PublicKey, index: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9716
|
+
declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9717
|
+
declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
9718
|
+
declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number];
|
|
9719
|
+
declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN$1, programId: PublicKey): [PublicKey, number];
|
|
9720
|
+
declare function derivePlaceHolderAccountMeta(programId: PublicKey): AccountMeta;
|
|
9721
|
+
|
|
9722
|
+
declare function getBaseFee(binStep: number, sParameter: sParameters): BN$1;
|
|
9723
|
+
declare function getVariableFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN$1;
|
|
9724
|
+
declare function getTotalFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN$1;
|
|
9725
|
+
declare function computeFee(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1): BN$1;
|
|
9726
|
+
declare function computeFeeFromAmount(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmountWithFees: BN$1): BN$1;
|
|
9727
|
+
declare function computeProtocolFee(feeAmount: BN$1, sParameter: sParameters): BN$1;
|
|
9728
|
+
declare function swapExactOutQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, outAmount: BN$1, swapForY: boolean): {
|
|
9729
|
+
amountIn: BN$1;
|
|
9730
|
+
amountOut: BN$1;
|
|
9731
|
+
fee: BN$1;
|
|
9732
|
+
protocolFee: BN$1;
|
|
9733
|
+
};
|
|
9734
|
+
declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1, swapForY: boolean): {
|
|
9735
|
+
amountIn: BN$1;
|
|
9736
|
+
amountOut: BN$1;
|
|
9737
|
+
fee: BN$1;
|
|
9738
|
+
protocolFee: BN$1;
|
|
9739
|
+
};
|
|
9740
|
+
|
|
9741
|
+
/**
|
|
9742
|
+
* It fetches the pool account from the AMM program, and returns the mint addresses for the two tokens
|
|
9743
|
+
* @param {Connection} connection - Connection - The connection to the Solana cluster
|
|
9744
|
+
* @param {string} poolAddress - The address of the pool account.
|
|
9745
|
+
* @returns The tokenAMint and tokenBMint addresses for the pool.
|
|
9746
|
+
*/
|
|
9747
|
+
declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: {
|
|
9748
|
+
cluster?: Cluster;
|
|
9749
|
+
programId?: PublicKey;
|
|
9750
|
+
}): Promise<{
|
|
9751
|
+
tokenXMint: PublicKey;
|
|
9752
|
+
tokenYMint: PublicKey;
|
|
9753
|
+
}>;
|
|
9754
|
+
declare function getTokenProgramId(lbPairState: LbPair): {
|
|
9755
|
+
tokenXProgram: PublicKey;
|
|
9756
|
+
tokenYProgram: PublicKey;
|
|
9757
|
+
};
|
|
9758
|
+
|
|
9759
|
+
interface IPosition {
|
|
9760
|
+
address(): PublicKey;
|
|
9761
|
+
lowerBinId(): BN;
|
|
9762
|
+
upperBinId(): BN;
|
|
9763
|
+
liquidityShares(): BN[];
|
|
9764
|
+
rewardInfos(): UserRewardInfo[];
|
|
9765
|
+
feeInfos(): UserFeeInfo[];
|
|
9766
|
+
lastUpdatedAt(): BN;
|
|
9767
|
+
lbPair(): PublicKey;
|
|
9768
|
+
totalClaimedFeeXAmount(): BN;
|
|
9769
|
+
totalClaimedFeeYAmount(): BN;
|
|
9770
|
+
totalClaimedRewards(): BN[];
|
|
9771
|
+
operator(): PublicKey;
|
|
9772
|
+
lockReleasePoint(): BN;
|
|
9773
|
+
feeOwner(): PublicKey;
|
|
9774
|
+
owner(): PublicKey;
|
|
9775
|
+
getBinArrayIndexesCoverage(): BN[];
|
|
9776
|
+
getBinArrayKeysCoverage(programId: PublicKey): PublicKey[];
|
|
9777
|
+
version(): PositionVersion;
|
|
9778
|
+
width(): BN;
|
|
9779
|
+
}
|
|
9780
|
+
interface CombinedPositionBinData {
|
|
9781
|
+
liquidityShares: BN[];
|
|
9782
|
+
rewardInfos: UserRewardInfo[];
|
|
9783
|
+
feeInfos: UserFeeInfo[];
|
|
9784
|
+
}
|
|
9785
|
+
declare function wrapPosition(program: Program<LbClmm>, key: PublicKey, account: AccountInfo<Buffer>): IPosition;
|
|
9786
|
+
declare class PositionV2Wrapper implements IPosition {
|
|
9787
|
+
positionAddress: PublicKey;
|
|
9788
|
+
inner: PositionV2;
|
|
9789
|
+
extended: ExtendedPositionBinData[];
|
|
9790
|
+
combinedPositionBinData: CombinedPositionBinData;
|
|
9791
|
+
constructor(positionAddress: PublicKey, inner: PositionV2, extended: ExtendedPositionBinData[], combinedPositionBinData: CombinedPositionBinData);
|
|
9792
|
+
address(): PublicKey;
|
|
9793
|
+
totalClaimedRewards(): BN[];
|
|
9794
|
+
feeOwner(): PublicKey;
|
|
9795
|
+
lockReleasePoint(): BN;
|
|
9796
|
+
operator(): PublicKey;
|
|
9797
|
+
totalClaimedFeeYAmount(): BN;
|
|
9798
|
+
totalClaimedFeeXAmount(): BN;
|
|
9799
|
+
lbPair(): PublicKey;
|
|
9800
|
+
lowerBinId(): BN;
|
|
9801
|
+
upperBinId(): BN;
|
|
9802
|
+
liquidityShares(): BN[];
|
|
9803
|
+
rewardInfos(): UserRewardInfo[];
|
|
9804
|
+
feeInfos(): UserFeeInfo[];
|
|
9805
|
+
lastUpdatedAt(): BN;
|
|
9806
|
+
getBinArrayIndexesCoverage(): BN[];
|
|
9807
|
+
getBinArrayKeysCoverage(programId: PublicKey): PublicKey[];
|
|
9808
|
+
version(): PositionVersion;
|
|
9809
|
+
owner(): PublicKey;
|
|
9810
|
+
width(): BN;
|
|
9811
|
+
}
|
|
9812
|
+
|
|
9813
|
+
declare function getBinArrayIndexesCoverage(lowerBinId: BN, upperBinId: BN): BN[];
|
|
9814
|
+
declare function getBinArrayKeysCoverage(lowerBinId: BN, upperBinId: BN, lbPair: PublicKey, programId: PublicKey): PublicKey[];
|
|
9815
|
+
declare function getBinArrayAccountMetasCoverage(lowerBinId: BN, upperBinId: BN, lbPair: PublicKey, programId: PublicKey): AccountMeta[];
|
|
9816
|
+
declare function getPositionLowerUpperBinIdWithLiquidity(position: PositionData): {
|
|
9817
|
+
lowerBinId: BN;
|
|
9818
|
+
upperBinId: BN;
|
|
9819
|
+
} | null;
|
|
9820
|
+
declare function isPositionNoFee(position: PositionData): boolean;
|
|
9821
|
+
declare function isPositionNoReward(position: PositionData): boolean;
|
|
9822
|
+
/**
|
|
9823
|
+
* Divides a range of bin IDs into chunks, each with a maximum length defined by POSITION_MAX_LENGTH,
|
|
9824
|
+
* and returns an array of objects representing the lower and upper bin IDs for each chunk.
|
|
9825
|
+
*
|
|
9826
|
+
* @param {number} minBinId - The starting bin ID of the range.
|
|
9827
|
+
* @param {number} maxBinId - The ending bin ID of the range.
|
|
9828
|
+
* @returns {{ lowerBinId: number; upperBinId: number }[]} An array of objects, each containing a
|
|
9829
|
+
* 'lowerBinId' and 'upperBinId', representing the range of bin IDs in each chunk.
|
|
9830
|
+
*/
|
|
9831
|
+
declare function chunkBinRangeIntoExtendedPositions(minBinId: number, maxBinId: number): {
|
|
9832
|
+
lowerBinId: number;
|
|
9833
|
+
upperBinId: number;
|
|
9834
|
+
}[];
|
|
9835
|
+
/**
|
|
9836
|
+
* Divides a range of bin IDs into chunks, each with a length defined by DEFAULT_BIN_PER_POSITION,
|
|
9837
|
+
* and returns an array of objects representing the lower and upper bin IDs for each chunk.
|
|
9838
|
+
* Mainly used for chunking bin range to execute multiple add/remove liquidity, claim fee/reward
|
|
9839
|
+
*
|
|
9840
|
+
* @param {number} minBinId - The starting bin ID of the range.
|
|
9841
|
+
* @param {number} maxBinId - The ending bin ID of the range.
|
|
9842
|
+
* @returns {{ lowerBinId: number; upperBinId: number }[]} An array of objects, each containing a
|
|
9843
|
+
* 'lowerBinId' and 'upperBinId', representing the range of bin IDs in each chunk.
|
|
9844
|
+
*/
|
|
9845
|
+
declare function chunkBinRange(minBinId: number, maxBinId: number): {
|
|
9846
|
+
lowerBinId: number;
|
|
9847
|
+
upperBinId: number;
|
|
9848
|
+
}[];
|
|
9849
|
+
declare function chunkPositionBinRange(position: LbPosition, minBinId: number, maxBinId: number): {
|
|
9850
|
+
minBinId: number;
|
|
9851
|
+
maxBinId: number;
|
|
9852
|
+
amountX: BN;
|
|
9853
|
+
amountY: BN;
|
|
9854
|
+
feeXAmount: BN;
|
|
9855
|
+
feeYAmount: BN;
|
|
9856
|
+
rewardAmounts: BN[];
|
|
9857
|
+
}[];
|
|
9858
|
+
declare function calculatePositionSize(binCount: BN): BN;
|
|
9859
|
+
/**
|
|
9860
|
+
* Get the minimum balance required to pay for the rent exemption of a
|
|
9861
|
+
* position with the given bin count.
|
|
9862
|
+
*
|
|
9863
|
+
* @param connection The connection to the Solana RPC node.
|
|
9864
|
+
* @param binCount The number of bins in the position.
|
|
9865
|
+
* @returns The minimum balance required to pay for the rent exemption.
|
|
9866
|
+
*/
|
|
9867
|
+
declare function getPositionRentExemption(connection: Connection, binCount: BN): Promise<number>;
|
|
9868
|
+
/**
|
|
9869
|
+
* Calculate the minimum lamports required to expand a position to a given
|
|
9870
|
+
* width.
|
|
9871
|
+
*
|
|
9872
|
+
* The function takes into account the current width of the position and the
|
|
9873
|
+
* width to expand to. If the expanded width is less than or equal to the
|
|
9874
|
+
* default bin count per position, the function returns 0.
|
|
9875
|
+
*
|
|
9876
|
+
* @param currentMinBinId The current minimum bin ID of the position.
|
|
9877
|
+
* @param currentMaxBinId The current maximum bin ID of the position.
|
|
9878
|
+
* @param connection The connection to the Solana RPC node.
|
|
9879
|
+
* @param binCountToExpand The number of bins to expand the position by.
|
|
9880
|
+
* @returns The minimum lamports required to expand the position to the given
|
|
9881
|
+
* width.
|
|
9882
|
+
*/
|
|
9883
|
+
declare function getPositionExpandRentExemption(currentMinBinId: BN, currentMaxBinId: BN, connection: Connection, binCountToExpand: BN): Promise<number>;
|
|
9884
|
+
/**
|
|
9885
|
+
* Calculate the number of extended bins in a position.
|
|
9886
|
+
*
|
|
9887
|
+
* @param minBinId The minimum bin ID of the position.
|
|
9888
|
+
* @param maxBinId The maximum bin ID of the position.
|
|
9889
|
+
* @returns The number of extended bins in the position. If the position width is
|
|
9890
|
+
* less than or equal to the default bin count per position, returns 0.
|
|
9891
|
+
*/
|
|
9892
|
+
declare function getExtendedPositionBinCount(minBinId: BN, maxBinId: BN): BN;
|
|
9893
|
+
/**
|
|
9894
|
+
* Decode the extended position data.
|
|
9895
|
+
*
|
|
9896
|
+
* @param base The base position with the base data.
|
|
9897
|
+
* @param program The program that the position is associated with.
|
|
9898
|
+
* @param bytes The buffer of bytes to decode.
|
|
9899
|
+
* @returns The decoded extended position data.
|
|
9900
|
+
*/
|
|
9901
|
+
declare function decodeExtendedPosition(base: PositionV2, program: Program<LbClmm>, bytes: Buffer): ExtendedPositionBinData[];
|
|
9902
|
+
|
|
9903
|
+
/**
|
|
9904
|
+
* Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
|
|
9905
|
+
* @param activeId The bin id of the active bin.
|
|
9906
|
+
* @param binStep The step size of each bin.
|
|
9907
|
+
* @param minBinId The min bin id.
|
|
9908
|
+
* @param maxBinId The max bin id.
|
|
9909
|
+
* @param amountX The amount of X token to deposit.
|
|
9910
|
+
* @param amountY The amount of Y token to deposit.
|
|
9911
|
+
* @param amountXInActiveBin The amount of X token in the active bin.
|
|
9912
|
+
* @param amountYInActiveBin The amount of Y token in the active bin.
|
|
9913
|
+
* @param strategyType The strategy type.
|
|
9914
|
+
* @param mintX The mint info of X token. Get from DLMM instance.
|
|
9915
|
+
* @param mintY The mint info of Y token. Get from DLMM instance.
|
|
9916
|
+
* @param clock The clock info. Get from DLMM instance.
|
|
9917
|
+
* @returns The distribution of liquidity.
|
|
9918
|
+
*/
|
|
9919
|
+
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN$1, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, strategyType: StrategyType, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
9920
|
+
binId: number;
|
|
9921
|
+
amountX: BN$1;
|
|
9922
|
+
amountY: BN$1;
|
|
9923
|
+
}[];
|
|
9924
|
+
declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, minBinId: number, maxBinId: number, strategyType: StrategyType): BN$1;
|
|
9925
|
+
declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, minBinId: number, maxBinId: number, strategyType: StrategyType): BN$1;
|
|
9926
|
+
declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): ProgramStrategyParameter;
|
|
9927
|
+
|
|
9706
9928
|
declare function getPriceOfBinByBinId(binId: number, binStep: number): Decimal;
|
|
9707
9929
|
/** private */
|
|
9708
9930
|
declare function toWeightDistribution(amountX: BN$1, amountY: BN$1, distributions: {
|
|
@@ -9771,25 +9993,6 @@ declare function fromWeightDistributionToAmount(amountX: BN$1, amountY: BN$1, di
|
|
|
9771
9993
|
amountY: BN$1;
|
|
9772
9994
|
}[];
|
|
9773
9995
|
|
|
9774
|
-
declare function getBaseFee(binStep: number, sParameter: sParameters): BN$1;
|
|
9775
|
-
declare function getVariableFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN$1;
|
|
9776
|
-
declare function getTotalFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN$1;
|
|
9777
|
-
declare function computeFee(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1): BN$1;
|
|
9778
|
-
declare function computeFeeFromAmount(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmountWithFees: BN$1): BN$1;
|
|
9779
|
-
declare function computeProtocolFee(feeAmount: BN$1, sParameter: sParameters): BN$1;
|
|
9780
|
-
declare function swapExactOutQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, outAmount: BN$1, swapForY: boolean): {
|
|
9781
|
-
amountIn: BN$1;
|
|
9782
|
-
amountOut: BN$1;
|
|
9783
|
-
fee: BN$1;
|
|
9784
|
-
protocolFee: BN$1;
|
|
9785
|
-
};
|
|
9786
|
-
declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1, swapForY: boolean): {
|
|
9787
|
-
amountIn: BN$1;
|
|
9788
|
-
amountOut: BN$1;
|
|
9789
|
-
fee: BN$1;
|
|
9790
|
-
protocolFee: BN$1;
|
|
9791
|
-
};
|
|
9792
|
-
|
|
9793
9996
|
/**
|
|
9794
9997
|
* Distribute totalAmount to all bid side bins according to given distributions.
|
|
9795
9998
|
* @param activeId active bin id
|
|
@@ -9855,49 +10058,6 @@ declare function autoFillXByWeight(activeId: number, binStep: number, amountY: B
|
|
|
9855
10058
|
weight: number;
|
|
9856
10059
|
}[]): BN$1;
|
|
9857
10060
|
|
|
9858
|
-
/**
|
|
9859
|
-
* Given a strategy type and amounts of X and Y, returns the distribution of liquidity.
|
|
9860
|
-
* @param activeId The bin id of the active bin.
|
|
9861
|
-
* @param binStep The step size of each bin.
|
|
9862
|
-
* @param minBinId The min bin id.
|
|
9863
|
-
* @param maxBinId The max bin id.
|
|
9864
|
-
* @param amountX The amount of X token to deposit.
|
|
9865
|
-
* @param amountY The amount of Y token to deposit.
|
|
9866
|
-
* @param amountXInActiveBin The amount of X token in the active bin.
|
|
9867
|
-
* @param amountYInActiveBin The amount of Y token in the active bin.
|
|
9868
|
-
* @param strategyType The strategy type.
|
|
9869
|
-
* @param mintX The mint info of X token. Get from DLMM instance.
|
|
9870
|
-
* @param mintY The mint info of Y token. Get from DLMM instance.
|
|
9871
|
-
* @param clock The clock info. Get from DLMM instance.
|
|
9872
|
-
* @returns The distribution of liquidity.
|
|
9873
|
-
*/
|
|
9874
|
-
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN$1, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, strategyType: StrategyType, mintX: Mint, mintY: Mint, clock: Clock): {
|
|
9875
|
-
binId: number;
|
|
9876
|
-
amountX: BN$1;
|
|
9877
|
-
amountY: BN$1;
|
|
9878
|
-
}[];
|
|
9879
|
-
declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, minBinId: number, maxBinId: number, strategyType: StrategyType): BN$1;
|
|
9880
|
-
declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN$1, amountXInActiveBin: BN$1, amountYInActiveBin: BN$1, minBinId: number, maxBinId: number, strategyType: StrategyType): BN$1;
|
|
9881
|
-
declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): ProgramStrategyParameter;
|
|
9882
|
-
|
|
9883
|
-
/**
|
|
9884
|
-
* It fetches the pool account from the AMM program, and returns the mint addresses for the two tokens
|
|
9885
|
-
* @param {Connection} connection - Connection - The connection to the Solana cluster
|
|
9886
|
-
* @param {string} poolAddress - The address of the pool account.
|
|
9887
|
-
* @returns The tokenAMint and tokenBMint addresses for the pool.
|
|
9888
|
-
*/
|
|
9889
|
-
declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: {
|
|
9890
|
-
cluster?: Cluster;
|
|
9891
|
-
programId?: PublicKey;
|
|
9892
|
-
}): Promise<{
|
|
9893
|
-
tokenXMint: PublicKey;
|
|
9894
|
-
tokenYMint: PublicKey;
|
|
9895
|
-
}>;
|
|
9896
|
-
declare function getTokenProgramId(lbPairState: LbPair): {
|
|
9897
|
-
tokenXProgram: PublicKey;
|
|
9898
|
-
tokenYProgram: PublicKey;
|
|
9899
|
-
};
|
|
9900
|
-
|
|
9901
10061
|
declare function chunks<T>(array: T[], size: number): T[][];
|
|
9902
10062
|
declare function range<T>(min: number, max: number, mapfn: (i: number) => T): T[];
|
|
9903
10063
|
declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{
|
|
@@ -10005,7 +10165,78 @@ type Opt = {
|
|
|
10005
10165
|
declare function createProgram(connection: Connection, opt?: Opt): Program<LbClmm>;
|
|
10006
10166
|
declare function decodeAccount<T extends LbPair | BinArrayBitmapExtension | BinArray | PositionV2 | Position | PresetParameter | PresetParameter2>(program: Program<LbClmm>, accountName: AccountName, buffer: Buffer): T;
|
|
10007
10167
|
declare function getAccountDiscriminator(accountName: AccountName): IdlDiscriminator;
|
|
10168
|
+
/**
|
|
10169
|
+
* Caps a slippage percentage to be between 0 and 100.
|
|
10170
|
+
* @param slippage The slippage percentage to be capped.
|
|
10171
|
+
* @returns The capped slippage percentage.
|
|
10172
|
+
*/
|
|
10008
10173
|
declare function capSlippagePercentage(slippage: number): number;
|
|
10174
|
+
/**
|
|
10175
|
+
* Given a slippage percentage and a bin step, calculate the maximum number of bins
|
|
10176
|
+
* that the user is willing to allow the active bin to drift from the target price.
|
|
10177
|
+
* If the slippage percentage is 0 or null, return the maxActiveBinSlippage instead.
|
|
10178
|
+
*
|
|
10179
|
+
* @param slippagePercentage The slippage percentage in basis points.
|
|
10180
|
+
* @param binStep The bin step of the pair.
|
|
10181
|
+
* @param maxActiveBinSlippage The maximum number of bins that the active bin can drift.
|
|
10182
|
+
* @returns The maximum number of bins that the user is willing to allow the active bin to drift.
|
|
10183
|
+
*/
|
|
10184
|
+
declare function getAndCapMaxActiveBinSlippage(slippagePercentage: number, binStep: number, maxActiveBinSlippage: number): number;
|
|
10185
|
+
/**
|
|
10186
|
+
* Calculates the number of bins in a given range.
|
|
10187
|
+
*
|
|
10188
|
+
* @param minBinId The minimum bin id of the range.
|
|
10189
|
+
* @param maxBinId The maximum bin id of the range.
|
|
10190
|
+
* @returns The number of bins in the range.
|
|
10191
|
+
*/
|
|
10192
|
+
declare function getBinCount(minBinId: number, maxBinId: number): number;
|
|
10193
|
+
/**
|
|
10194
|
+
* Calculates the maximum amount of tokens after applying slippage to the given amount.
|
|
10195
|
+
*
|
|
10196
|
+
* @param amount The amount of tokens before slippage.
|
|
10197
|
+
* @param slippage The percentage of slippage to apply.
|
|
10198
|
+
* @returns The maximum amount of tokens after applying slippage. If the slippage is 100%, the maximum amount is U64_MAX.
|
|
10199
|
+
*
|
|
10200
|
+
**/
|
|
10201
|
+
declare function getSlippageMaxAmount(amount: BN$1, slippage: number): BN$1;
|
|
10202
|
+
/**
|
|
10203
|
+
* Calculates the minimum amount of tokens after applying slippage to the given amount.
|
|
10204
|
+
*
|
|
10205
|
+
* @param amount The amount of tokens before slippage.
|
|
10206
|
+
* @param slippage The percentage of slippage to apply.
|
|
10207
|
+
* @returns The minimum amount of tokens after applying slippage.
|
|
10208
|
+
*/
|
|
10209
|
+
declare function getSlippageMinAmount(amount: BN$1, slippage: number): BN$1;
|
|
10210
|
+
/**
|
|
10211
|
+
* Calculates the number of positions required to cover a range of bins.
|
|
10212
|
+
*
|
|
10213
|
+
* @param binCount The number of bins in the range.
|
|
10214
|
+
* @returns The number of positions required to cover the range of bins.
|
|
10215
|
+
*/
|
|
10216
|
+
declare function getPositionCountByBinCount(binCount: number): number;
|
|
10217
|
+
/**
|
|
10218
|
+
* Adjusts the liquidity parameters to reset uninvolved liquidity based on delta IDs.
|
|
10219
|
+
*
|
|
10220
|
+
* This function modifies the provided liquidity strategy parameters by resetting
|
|
10221
|
+
* the x0, y0, deltaX, and deltaY values when certain conditions regarding the
|
|
10222
|
+
* minDeltaId and maxDeltaId are met. If the maxDeltaId is less than or equal
|
|
10223
|
+
* to the end of the bid side delta ID, x0 and deltaX are set to zero. If the
|
|
10224
|
+
* minDeltaId is greater than or equal to the start of the ask side delta ID,
|
|
10225
|
+
* y0 and deltaY are set to zero.
|
|
10226
|
+
*
|
|
10227
|
+
* @param minDeltaId - The minimum delta ID.
|
|
10228
|
+
* @param maxDeltaId - The maximum delta ID.
|
|
10229
|
+
* @param favorXInActiveId - A boolean indicating if X is favored in the active bin.
|
|
10230
|
+
* @param params - The liquidity strategy parameters containing x0, y0, deltaX, and deltaY.
|
|
10231
|
+
* @returns An object containing the adjusted x0, y0, deltaX, and deltaY values.
|
|
10232
|
+
*/
|
|
10233
|
+
declare function resetUninvolvedLiquidityParams(minDeltaId: BN$1, maxDeltaId: BN$1, favorXInActiveId: boolean, params: LiquidityStrategyParameters): {
|
|
10234
|
+
x0: BN$1;
|
|
10235
|
+
y0: BN$1;
|
|
10236
|
+
deltaX: BN$1;
|
|
10237
|
+
deltaY: BN$1;
|
|
10238
|
+
};
|
|
10239
|
+
declare function chunkDepositWithRebalanceEndpoint(dlmm: DLMM, strategy: StrategyParameters, slippagePercentage: number, maxActiveBinSlippage: number, position: PublicKey, positionMinBinId: number, positionMaxBinId: number, liquidityStrategyParameters: LiquidityStrategyParameters, owner: PublicKey, payer: PublicKey, simulateCU: boolean): Promise<TransactionInstruction[][]>;
|
|
10009
10240
|
|
|
10010
10241
|
declare class DLMM {
|
|
10011
10242
|
pubkey: PublicKey;
|
|
@@ -10351,6 +10582,10 @@ declare class DLMM {
|
|
|
10351
10582
|
binArrayCost: Decimal;
|
|
10352
10583
|
}>;
|
|
10353
10584
|
quoteCreatePosition({ strategy }: TQuoteCreatePositionParams): Promise<{
|
|
10585
|
+
positionCount: number;
|
|
10586
|
+
positionCost: number;
|
|
10587
|
+
positionReallocCost: number;
|
|
10588
|
+
bitmapExtensionCost: number;
|
|
10354
10589
|
binArraysCount: number;
|
|
10355
10590
|
binArrayCost: number;
|
|
10356
10591
|
transactionCount: number;
|
|
@@ -10379,6 +10614,33 @@ declare class DLMM {
|
|
|
10379
10614
|
* - `version`: The version of the position (in this case, `Position.V2`)
|
|
10380
10615
|
*/
|
|
10381
10616
|
getPosition(positionPubKey: PublicKey): Promise<LbPosition>;
|
|
10617
|
+
/**
|
|
10618
|
+
* Creates multiple positions and adds liquidity by strategy without chainsaw issues.
|
|
10619
|
+
* @param positionKeypairGenerator A function that generates a specified number of keypairs.
|
|
10620
|
+
* @param totalXAmount The total amount of token X to be added.
|
|
10621
|
+
* @param totalYAmount The total amount of token Y to be added.
|
|
10622
|
+
* @param strategy The strategy for adding liquidity.
|
|
10623
|
+
* @param owner The owner of the position.
|
|
10624
|
+
* @param payer The payer of the transaction.
|
|
10625
|
+
* @param slippagePercentage The slippage percentage for adding liquidity.
|
|
10626
|
+
* @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`.
|
|
10627
|
+
*/
|
|
10628
|
+
initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator: (count: number) => Promise<Keypair[]>, totalXAmount: BN$1, totalYAmount: BN$1, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number): Promise<InitializeMultiplePositionAndAddLiquidityByStrategyResponse>;
|
|
10629
|
+
/**
|
|
10630
|
+
* Adds liquidity to an existing position using a specified strategy, allowing for chunkable transactions.
|
|
10631
|
+
* If adding liquidity to bin out of position range, it will automatically expand. The limitation is 70 bins.
|
|
10632
|
+
*
|
|
10633
|
+
* @param {TInitializePositionAndAddLiquidityParamsByStrategy} params - The parameters required for adding liquidity.
|
|
10634
|
+
* @param {PublicKey} params.positionPubKey - The public key of the position to which liquidity is being added.
|
|
10635
|
+
* @param {BN} params.totalXAmount - The total amount of token X to be added as liquidity.
|
|
10636
|
+
* @param {BN} params.totalYAmount - The total amount of token Y to be added as liquidity.
|
|
10637
|
+
* @param {StrategyParameters} params.strategy - The strategy parameters for adding liquidity.
|
|
10638
|
+
* @param {PublicKey} params.user - The public key of the user adding liquidity.
|
|
10639
|
+
* @param {number} params.slippage - The slippage percentage allowed for the transaction.
|
|
10640
|
+
*
|
|
10641
|
+
* @returns {Promise<Transaction[]>} A promise that resolves to an array of transactions for adding liquidity.
|
|
10642
|
+
*/
|
|
10643
|
+
addLiquidityByStrategyChunkable({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction[]>;
|
|
10382
10644
|
/**
|
|
10383
10645
|
* The function `initializePositionAndAddLiquidityByStrategy` function is used to initializes a position and adds liquidity
|
|
10384
10646
|
* @param {TInitializePositionAndAddLiquidityParamsByStrategy}
|
|
@@ -10407,7 +10669,7 @@ declare class DLMM {
|
|
|
10407
10669
|
*/
|
|
10408
10670
|
initializePositionAndAddLiquidityByWeight({ positionPubKey, totalXAmount, totalYAmount, xYAmountDistribution, user, slippage, }: TInitializePositionAndAddLiquidityParams): Promise<Transaction | Transaction[]>;
|
|
10409
10671
|
/**
|
|
10410
|
-
* The `addLiquidityByStrategy` function is used to add liquidity to existing position
|
|
10672
|
+
* The `addLiquidityByStrategy` function is used to add liquidity to existing position
|
|
10411
10673
|
* @param {TInitializePositionAndAddLiquidityParamsByStrategy}
|
|
10412
10674
|
* - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`)
|
|
10413
10675
|
* - `totalXAmount`: The total amount of token X to be added to the liquidity pool.
|
|
@@ -10415,9 +10677,10 @@ declare class DLMM {
|
|
|
10415
10677
|
* - `strategy`: The strategy parameters to be used for the liquidity pool (Can use `calculateStrategyParameter` to calculate).
|
|
10416
10678
|
* - `user`: The public key of the user account.
|
|
10417
10679
|
* - `slippage`: The slippage percentage to be used for the liquidity pool.
|
|
10418
|
-
* @returns {Promise<Transaction
|
|
10680
|
+
* @returns {Promise<Transaction>} The function `addLiquidityByWeight` returns a `Promise` that resolves to either a single
|
|
10681
|
+
* `Transaction` object
|
|
10419
10682
|
*/
|
|
10420
|
-
addLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction
|
|
10683
|
+
addLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise<Transaction>;
|
|
10421
10684
|
/**
|
|
10422
10685
|
* @deprecated Use `addLiquidityByStrategy` instead which support both token and token2022.
|
|
10423
10686
|
* The `addLiquidityByWeight` function is used to add liquidity to existing position
|
|
@@ -10732,7 +10995,10 @@ declare class DLMM {
|
|
|
10732
10995
|
*
|
|
10733
10996
|
* @returns An object containing the instructions to initialize new bin arrays and the instruction to rebalance the position.
|
|
10734
10997
|
*/
|
|
10735
|
-
rebalancePosition(rebalancePositionResponse: RebalancePositionResponse, maxActiveBinSlippage: BN$1, rentPayer?: PublicKey, slippage?: number): Promise<
|
|
10998
|
+
rebalancePosition(rebalancePositionResponse: RebalancePositionResponse, maxActiveBinSlippage: BN$1, rentPayer?: PublicKey, slippage?: number): Promise<{
|
|
10999
|
+
initBinArrayInstructions: TransactionInstruction[];
|
|
11000
|
+
rebalancePositionInstruction: TransactionInstruction[];
|
|
11001
|
+
}>;
|
|
10736
11002
|
/**
|
|
10737
11003
|
* Create an extended empty position.
|
|
10738
11004
|
*
|
|
@@ -10758,7 +11024,10 @@ declare class DLMM {
|
|
|
10758
11024
|
static updateReference(activeId: number, vParameter: vParameters, sParameter: sParameters, currentTimestamp: number): void;
|
|
10759
11025
|
private createClaimBuildMethod;
|
|
10760
11026
|
private createClaimSwapFeeMethod;
|
|
10761
|
-
|
|
11027
|
+
getPotentialToken2022IxDataAndAccounts(actionType: ActionType, rewardIndex?: number): {
|
|
11028
|
+
slices: RemainingAccountsInfoSlice[];
|
|
11029
|
+
accounts: AccountMeta[];
|
|
11030
|
+
};
|
|
10762
11031
|
}
|
|
10763
11032
|
|
|
10764
11033
|
var address = "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo";
|
|
@@ -21655,4 +21924,4 @@ declare const MAX_EXTRA_BIN_ARRAYS = 3;
|
|
|
21655
21924
|
declare const U64_MAX: BN$1;
|
|
21656
21925
|
declare const MAX_BINS_PER_POSITION: BN$1;
|
|
21657
21926
|
|
|
21658
|
-
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, 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, buildLiquidityStrategyParameters, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, capSlippagePercentage, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, createProgram, decodeAccount, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getAccountDiscriminator, getAmountInBinsAskSide, getAmountInBinsBidSide, getAutoFillAmountByRebalancedPosition, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getBinIdIndexInBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getLiquidityStrategyParameterBuilder, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getRebalanceBinArrayIndexesAndBitmapCoverage, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, suggestBalancedXParametersFromY, suggestBalancedYParametersFromX, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountIntoBins, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, updateBinArray, vParameters, wrapSOLInstruction };
|
|
21927
|
+
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 };
|