@meteora-ag/dlmm 1.3.9-rc.1 → 1.3.9-rc.5
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 +7 -87
- package/dist/index.js +64 -144
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -111
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5334,15 +5334,6 @@ declare enum PairType {
|
|
|
5334
5334
|
Permissioned = 1
|
|
5335
5335
|
}
|
|
5336
5336
|
declare const Strategy: {
|
|
5337
|
-
SpotOneSide: {
|
|
5338
|
-
spotOneSide: {};
|
|
5339
|
-
};
|
|
5340
|
-
CurveOneSide: {
|
|
5341
|
-
curveOneSide: {};
|
|
5342
|
-
};
|
|
5343
|
-
BidAskOneSide: {
|
|
5344
|
-
bidAskOneSide: {};
|
|
5345
|
-
};
|
|
5346
5337
|
SpotBalanced: {
|
|
5347
5338
|
spotBalanced: {};
|
|
5348
5339
|
};
|
|
@@ -5363,15 +5354,12 @@ declare const Strategy: {
|
|
|
5363
5354
|
};
|
|
5364
5355
|
};
|
|
5365
5356
|
declare enum StrategyType {
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
SpotBalanced = 6,
|
|
5373
|
-
CurveBalanced = 7,
|
|
5374
|
-
BidAskBalanced = 8
|
|
5357
|
+
SpotImBalanced = 0,
|
|
5358
|
+
CurveImBalanced = 1,
|
|
5359
|
+
BidAskImBalanced = 2,
|
|
5360
|
+
SpotBalanced = 3,
|
|
5361
|
+
CurveBalanced = 4,
|
|
5362
|
+
BidAskBalanced = 5
|
|
5375
5363
|
}
|
|
5376
5364
|
declare enum ActivationType {
|
|
5377
5365
|
Slot = 0,
|
|
@@ -6251,10 +6239,6 @@ declare function autoFillXByWeight(activeId: number, binStep: number, amountY: B
|
|
|
6251
6239
|
weight: number;
|
|
6252
6240
|
}[]): BN;
|
|
6253
6241
|
|
|
6254
|
-
declare function toAmountsOneSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amount: BN, strategyType: StrategyType, depositForY: boolean): {
|
|
6255
|
-
binId: number;
|
|
6256
|
-
amount: BN;
|
|
6257
|
-
}[];
|
|
6258
6242
|
declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, strategyType: StrategyType): {
|
|
6259
6243
|
binId: number;
|
|
6260
6244
|
amountX: BN;
|
|
@@ -6263,58 +6247,10 @@ declare function toAmountsBothSideByStrategy(activeId: number, binStep: number,
|
|
|
6263
6247
|
declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
|
|
6264
6248
|
declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN;
|
|
6265
6249
|
declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): {
|
|
6266
|
-
minBinId: number;
|
|
6267
|
-
maxBinId: number;
|
|
6268
|
-
strategyType: {
|
|
6269
|
-
spotOneSide: {};
|
|
6270
|
-
curveOneSide?: undefined;
|
|
6271
|
-
bidAskOneSide?: undefined;
|
|
6272
|
-
spotBalanced?: undefined;
|
|
6273
|
-
curveBalanced?: undefined;
|
|
6274
|
-
bidAskBalanced?: undefined;
|
|
6275
|
-
spotImBalanced?: undefined;
|
|
6276
|
-
curveImBalanced?: undefined;
|
|
6277
|
-
bidAskImBalanced?: undefined;
|
|
6278
|
-
};
|
|
6279
|
-
parameteres: number[];
|
|
6280
|
-
} | {
|
|
6281
|
-
minBinId: number;
|
|
6282
|
-
maxBinId: number;
|
|
6283
|
-
strategyType: {
|
|
6284
|
-
curveOneSide: {};
|
|
6285
|
-
spotOneSide?: undefined;
|
|
6286
|
-
bidAskOneSide?: undefined;
|
|
6287
|
-
spotBalanced?: undefined;
|
|
6288
|
-
curveBalanced?: undefined;
|
|
6289
|
-
bidAskBalanced?: undefined;
|
|
6290
|
-
spotImBalanced?: undefined;
|
|
6291
|
-
curveImBalanced?: undefined;
|
|
6292
|
-
bidAskImBalanced?: undefined;
|
|
6293
|
-
};
|
|
6294
|
-
parameteres: number[];
|
|
6295
|
-
} | {
|
|
6296
|
-
minBinId: number;
|
|
6297
|
-
maxBinId: number;
|
|
6298
|
-
strategyType: {
|
|
6299
|
-
bidAskOneSide: {};
|
|
6300
|
-
spotOneSide?: undefined;
|
|
6301
|
-
curveOneSide?: undefined;
|
|
6302
|
-
spotBalanced?: undefined;
|
|
6303
|
-
curveBalanced?: undefined;
|
|
6304
|
-
bidAskBalanced?: undefined;
|
|
6305
|
-
spotImBalanced?: undefined;
|
|
6306
|
-
curveImBalanced?: undefined;
|
|
6307
|
-
bidAskImBalanced?: undefined;
|
|
6308
|
-
};
|
|
6309
|
-
parameteres: number[];
|
|
6310
|
-
} | {
|
|
6311
6250
|
minBinId: number;
|
|
6312
6251
|
maxBinId: number;
|
|
6313
6252
|
strategyType: {
|
|
6314
6253
|
spotBalanced: {};
|
|
6315
|
-
spotOneSide?: undefined;
|
|
6316
|
-
curveOneSide?: undefined;
|
|
6317
|
-
bidAskOneSide?: undefined;
|
|
6318
6254
|
curveBalanced?: undefined;
|
|
6319
6255
|
bidAskBalanced?: undefined;
|
|
6320
6256
|
spotImBalanced?: undefined;
|
|
@@ -6327,9 +6263,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6327
6263
|
maxBinId: number;
|
|
6328
6264
|
strategyType: {
|
|
6329
6265
|
curveBalanced: {};
|
|
6330
|
-
spotOneSide?: undefined;
|
|
6331
|
-
curveOneSide?: undefined;
|
|
6332
|
-
bidAskOneSide?: undefined;
|
|
6333
6266
|
spotBalanced?: undefined;
|
|
6334
6267
|
bidAskBalanced?: undefined;
|
|
6335
6268
|
spotImBalanced?: undefined;
|
|
@@ -6342,9 +6275,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6342
6275
|
maxBinId: number;
|
|
6343
6276
|
strategyType: {
|
|
6344
6277
|
bidAskBalanced: {};
|
|
6345
|
-
spotOneSide?: undefined;
|
|
6346
|
-
curveOneSide?: undefined;
|
|
6347
|
-
bidAskOneSide?: undefined;
|
|
6348
6278
|
spotBalanced?: undefined;
|
|
6349
6279
|
curveBalanced?: undefined;
|
|
6350
6280
|
spotImBalanced?: undefined;
|
|
@@ -6357,9 +6287,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6357
6287
|
maxBinId: number;
|
|
6358
6288
|
strategyType: {
|
|
6359
6289
|
spotImBalanced: {};
|
|
6360
|
-
spotOneSide?: undefined;
|
|
6361
|
-
curveOneSide?: undefined;
|
|
6362
|
-
bidAskOneSide?: undefined;
|
|
6363
6290
|
spotBalanced?: undefined;
|
|
6364
6291
|
curveBalanced?: undefined;
|
|
6365
6292
|
bidAskBalanced?: undefined;
|
|
@@ -6372,9 +6299,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6372
6299
|
maxBinId: number;
|
|
6373
6300
|
strategyType: {
|
|
6374
6301
|
curveImBalanced: {};
|
|
6375
|
-
spotOneSide?: undefined;
|
|
6376
|
-
curveOneSide?: undefined;
|
|
6377
|
-
bidAskOneSide?: undefined;
|
|
6378
6302
|
spotBalanced?: undefined;
|
|
6379
6303
|
curveBalanced?: undefined;
|
|
6380
6304
|
bidAskBalanced?: undefined;
|
|
@@ -6387,9 +6311,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6387
6311
|
maxBinId: number;
|
|
6388
6312
|
strategyType: {
|
|
6389
6313
|
bidAskImBalanced: {};
|
|
6390
|
-
spotOneSide?: undefined;
|
|
6391
|
-
curveOneSide?: undefined;
|
|
6392
|
-
bidAskOneSide?: undefined;
|
|
6393
6314
|
spotBalanced?: undefined;
|
|
6394
6315
|
curveBalanced?: undefined;
|
|
6395
6316
|
bidAskBalanced?: undefined;
|
|
@@ -6407,7 +6328,6 @@ declare function toStrategyParameters({ maxBinId, minBinId, strategyType, single
|
|
|
6407
6328
|
*/
|
|
6408
6329
|
declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: {
|
|
6409
6330
|
cluster?: Cluster;
|
|
6410
|
-
programId?: PublicKey;
|
|
6411
6331
|
}): Promise<{
|
|
6412
6332
|
tokenXMint: PublicKey;
|
|
6413
6333
|
tokenYMint: PublicKey;
|
|
@@ -6559,4 +6479,4 @@ declare const MAX_BIN_PER_TX = 69;
|
|
|
6559
6479
|
declare const MAX_ACTIVE_BIN_SLIPPAGE = 3;
|
|
6560
6480
|
declare const ILM_BASE: PublicKey;
|
|
6561
6481
|
|
|
6562
|
-
export { ADMIN, ActivationType, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_POSITION, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, Network, POSITION_FEE, PRECISION, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionV2, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityResponse, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveLbPair, deriveLbPair2, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, deriveReserve, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy,
|
|
6482
|
+
export { ADMIN, ActivationType, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_FEE, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ClmmProgram, Clock, ClockLayout, CompressedBinDepositAmount, CompressedBinDepositAmounts, DLMMError, DlmmSdkError, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, FEE_PRECISION, FeeInfo, GetOrCreateATAResponse, IAccountsCache, IDL, ILM_BASE, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, LBCLMM_PROGRAM_IDS, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_POSITION, MAX_BIN_PER_TX, MAX_CLAIM_ALL_ALLOWED, MAX_FEE_RATE, Network, POSITION_FEE, PRECISION, PairStatus, PairType, Position, PositionBinData, PositionData, PositionInfo, PositionV2, PositionVersion, ProgramStrategyParameter, ProgramStrategyType, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityResponse, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TQuoteCreatePositionParams, TokenReserve, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binIdToBinArrayIndex, calculateBidAskDistribution, calculateNormalDistribution, calculateSpotDistribution, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunks, computeFee, computeFeeFromAmount, computeProtocolFee, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveLbPair, deriveLbPair2, deriveOracle, derivePermissionLbPair, derivePosition, derivePresetParameter, derivePresetParameter2, deriveReserve, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, getBaseFee, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinFromBinArray, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getOrCreateATAInstruction, getOutAmount, getPriceOfBinByBinId, getTokenBalance, getTokenDecimals, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, parseLogs, range, sParameters, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapSOLInstruction };
|