@meteora-ag/dlmm 1.9.13 → 1.9.14-rc.1

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 CHANGED
@@ -12457,8 +12457,8 @@ interface BinLiquidity {
12457
12457
  rewardPerTokenStored: BN[];
12458
12458
  }
12459
12459
  declare namespace BinLiquidity {
12460
- function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, lbPair: LbPair): BinLiquidity;
12461
- function empty(binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity;
12460
+ function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, lbPair: LbPair, baseMultiplier?: Decimal, quoteMultiplier?: Decimal): BinLiquidity;
12461
+ function empty(binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, baseMultiplier?: Decimal, quoteMultiplier?: Decimal): BinLiquidity;
12462
12462
  }
12463
12463
  interface SwapQuote {
12464
12464
  consumedInAmount: BN;
@@ -12732,7 +12732,7 @@ declare function getBinArraysRequiredByPositionRange(pair: PublicKey, fromBinId:
12732
12732
  key: PublicKey;
12733
12733
  index: BN;
12734
12734
  }[];
12735
- declare function enumerateBins(binsById: Map<number, Bin>, lowerBinId: number, upperBinId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, lbPair: LbPair): Generator<BinLiquidity, void, unknown>;
12735
+ declare function enumerateBins(binsById: Map<number, Bin>, lowerBinId: number, upperBinId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, lbPair: LbPair, baseMultiplier?: Decimal, quoteMultiplier?: Decimal): Generator<BinLiquidity, void, unknown>;
12736
12736
  declare function getBinIdIndexInBinArray(binId: BN, lowerBinId: BN, upperBinId: BN): BN;
12737
12737
  declare function binDeltaToMinMaxBinId(binDelta: number, activeBinId: number): {
12738
12738
  minBinId: number;
@@ -13023,6 +13023,30 @@ interface TransferFeeExcludedAmount {
13023
13023
  transferFee: BN$1;
13024
13024
  }
13025
13025
  declare function calculateTransferFeeExcludedAmount(transferFeeIncludedAmount: BN$1, mint: Mint, currentEpoch: number): TransferFeeExcludedAmount;
13026
+ /**
13027
+ * Returns the Token-2022 ScaledUiAmount extension multiplier for a mint at the
13028
+ * given unix timestamp. Returns 1 when the mint has no ScaledUiAmount extension,
13029
+ * so callers can multiply unconditionally.
13030
+ *
13031
+ * The extension supports a scheduled multiplier switch: once the current time
13032
+ * reaches `newMultiplierEffectiveTimestamp`, `newMultiplier` takes over from
13033
+ * `multiplier`. This mirrors the on-chain UI amount computation.
13034
+ */
13035
+ declare function getScaledUiAmountMultiplier(mint: Mint, unixTimestamp: number): Decimal;
13036
+ /**
13037
+ * Scales a raw token amount by a ScaledUiAmount multiplier, flooring to the
13038
+ * nearest integer lamport. Returns the amount unchanged when the multiplier is 1.
13039
+ */
13040
+ declare function scaleAmountByMultiplier(amount: BN$1, multiplier: Decimal): BN$1;
13041
+ /**
13042
+ * Scales a decimals-adjusted price (`pricePerToken`, expressed as quote per base)
13043
+ * by the ScaledUiAmount multipliers of both mints:
13044
+ * `pricePerToken * quoteMultiplier / baseMultiplier`.
13045
+ *
13046
+ * Falls back to the unscaled price when `baseMultiplier` is zero (a pathological
13047
+ * mint configuration) to avoid producing `Infinity`.
13048
+ */
13049
+ declare function scalePricePerToken(pricePerToken: string, baseMultiplier: Decimal, quoteMultiplier: Decimal): string;
13026
13050
 
13027
13051
  declare function getPriceOfBinByBinId(binId: number, binStep: number): Decimal;
13028
13052
  /** private */
@@ -13232,7 +13256,7 @@ declare class Observation {
13232
13256
  constructor(cumulativeActiveBinId: BN$1, createdAt: BN$1, lastUpdatedAt: BN$1);
13233
13257
  isInitialized(): boolean;
13234
13258
  }
13235
- declare function wrapOracle(oracleAddress: PublicKey, data: Buffer, binStep: number, currentActiveBinId: BN$1, baseTokenDecimals: number, quoteTokenDecimals: number, program: Program<LbClmm>): DynamicOracle;
13259
+ declare function wrapOracle(oracleAddress: PublicKey, data: Buffer, binStep: number, currentActiveBinId: BN$1, baseTokenDecimals: number, quoteTokenDecimals: number, program: Program<LbClmm>, baseMultiplier?: Decimal, quoteMultiplier?: Decimal): DynamicOracle;
13236
13260
  declare class DynamicOracle implements IDynamicOracle {
13237
13261
  readonly oracleAddress: PublicKey;
13238
13262
  readonly metadata: Oracle;
@@ -13241,7 +13265,9 @@ declare class DynamicOracle implements IDynamicOracle {
13241
13265
  private currentActiveBinId;
13242
13266
  private baseTokenDecimals;
13243
13267
  private quoteTokenDecimals;
13244
- constructor(oracleAddress: PublicKey, metadata: Oracle, observations: Observation[], binStep: number, currentActiveBinId: BN$1, baseTokenDecimals: number, quoteTokenDecimals: number);
13268
+ private baseMultiplier;
13269
+ private quoteMultiplier;
13270
+ constructor(oracleAddress: PublicKey, metadata: Oracle, observations: Observation[], binStep: number, currentActiveBinId: BN$1, baseTokenDecimals: number, quoteTokenDecimals: number, baseMultiplier?: Decimal, quoteMultiplier?: Decimal);
13245
13271
  nextIndex(): number;
13246
13272
  getEarliestSample(): Observation;
13247
13273
  getLatestSample(): Observation;
@@ -26463,4 +26489,4 @@ declare const limitOrderFilter: () => GetProgramAccountsFilter;
26463
26489
  declare const limitOrderOwnerFilter: (owner: PublicKey) => GetProgramAccountsFilter;
26464
26490
  declare const limitOrderLbPairFilter: (lbPair: PublicKey) => GetProgramAccountsFilter;
26465
26491
 
26466
- export { ADMIN, ALT_ADDRESS, AccountName, ActionType, ActivationType, AmountIntoBin, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_FEE, BIN_ARRAY_BITMAP_FEE_BN, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_DEFAULT_VERSION, BIN_ARRAY_FEE, BIN_ARRAY_FEE_BN, BidAskParameters, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ChunkCallback, ChunkCallbackInfo, ClmmProgram, Clock, ClockLayout, CollectFeeMode, CompressedBinDepositAmount, CompressedBinDepositAmounts, ConcreteFunctionType, CreateRebalancePositionParams, DEFAULT_BIN_PER_POSITION, DLMMError, DlmmSdkError, DynamicOracle, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, ExtendedPositionBinData, FEE_PRECISION, FeeInfo, FeeMode, FunctionType, GetOrCreateATAResponse, GetPositionsOpt, IAccountsCache, IDL, IDynamicOracle, ILM_BASE, IPosition, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, InitializeMultiplePositionAndAddLiquidityByStrategyResponse, InitializeMultiplePositionAndAddLiquidityByStrategyResponse2, LBCLMM_PROGRAM_IDS, LIMIT_ORDER_BIN_DATA_SIZE, LIMIT_ORDER_FEE_SHARE, LIMIT_ORDER_MIN_SIZE, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LimitOrder, LimitOrderBinData, LimitOrderInfo, LimitOrderStatus, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, LiquidityStrategyParameterBuilder, LiquidityStrategyParameters, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BINS_PER_POSITION, MAX_BIN_ARRAY_SIZE, MAX_BIN_ID_PER_BIN_STEP, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_LIMIT_ORDER, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, MAX_RESIZE_LENGTH, MEMO_PROGRAM_ID, Network, Observation, Opt, Oracle, POOL_FEE, POOL_FEE_BN, POSITION_BIN_DATA_SIZE, POSITION_FEE, POSITION_FEE_BN, POSITION_MAX_LENGTH, POSITION_MIN_SIZE, PRECISION, PairLockInfo, PairStatus, PairType, ParsedLimitOrderWithPubkey, PlaceLimitOrderParams, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionPermission, PositionV2, PositionV2Wrapper, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, REBALANCE_POSITION_PADDING, RebalanceAddLiquidityParam, RebalancePosition, RebalancePositionBinArrayRentalCostQuote, RebalancePositionResponse, RebalanceRemoveLiquidityParam, RebalanceWithDeposit, RebalanceWithWithdraw, RemainingAccountInfo, RemainingAccountsInfoSlice, ResizeSide, ResizeSideEnum, RewardInfo, RewardInfos, Rounding, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityCostBreakdown, SeedLiquidityResponse, SeedLiquiditySingleBinResponse, ShrinkMode, SimulateRebalanceResp, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializeMultiplePositionAndAddLiquidityParamsByStrategy, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TOKEN_ACCOUNT_FEE, TOKEN_ACCOUNT_FEE_BN, TQuoteCreatePositionParams, TokenReserve, TwapResult, U64_MAX, UserFeeInfo, UserRewardInfo, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binArrayLbPairFilter, binDeltaToMinMaxBinId, binIdToBinArrayIndex, buildBitFlagAndNegateStrategyParameters, buildLiquidityStrategyParameters, calculateBidAskDistribution, calculateNormalDistribution, calculatePositionSize, calculateSpotDistribution, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, capSlippagePercentage, chunkBinRange, chunkBinRangeIntoExtendedPositions, chunkDepositWithRebalanceEndpoint, chunkPositionBinRange, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunkedGetProgramAccounts, chunks, compressBinAmount, computeBaseFactorFromFeeBps, computeFee, computeFeeFromAmount, computeProtocolFee, createProgram, decodeAccount, decodeExtendedPosition, decodeRewardPerTokenStored, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOperator, deriveOracle, derivePermissionLbPair, derivePlaceHolderAccountMeta, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, distributeAmountToCompressedBinsByRatio, encodePositionPermissions, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, findOptimumDecompressMultiplier, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, generateAmountForBinRange, generateBinAmount, getAccountDiscriminator, getAmountIn, getAmountInBinsAskSide, getAmountInBinsBidSide, getAmountOut, getAndCapMaxActiveBinSlippage, getAutoFillAmountByRebalancedPosition, getBaseFee, getBinArrayAccountMetasCoverage, getBinArrayIndexesCoverage, getBinArrayInfoForNonContiguousBinIds, getBinArrayKeysCoverage, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinCount, getBinFromBinArray, getBinIdIndexInBinArray, getBinMaxAmountOut, getC, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExtendedPositionBinCount, getExtraAccountMetasForTransferHook, getFeeMode, getIncludedFeeAmount, getLimitOrderLiquidity, getLiquidityStrategyParameterBuilder, getMultipleMintsExtraAccountMetasForTransferHook, getOrCreateATAInstruction, getPositionCount, getPositionCountByBinCount, getPositionExpandRentExemption, getPositionLowerUpperBinIdWithLiquidity, getPositionRentExemption, getPriceOfBinByBinId, getQPriceBaseFactor, getQPriceFromId, getRebalanceBinArrayIndexesAndBitmapCoverage, getSlippageMaxAmount, getSlippageMinAmount, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, isPositionNoFee, isPositionNoReward, isSupportLimitOrder, limitOrderFilter, limitOrderLbPairFilter, limitOrderOwnerFilter, mulDiv, mulShr, parseLogs, positionLbPairFilter, positionOwnerFilter, positionV2Filter, presetParameter2BaseFactorFilter, presetParameter2BaseFeePowerFactor, presetParameter2BinStepFilter, range, resetUninvolvedLiquidityParams, sParameters, shlDiv, splitFee, suggestBalancedXParametersFromY, suggestBalancedYParametersFromX, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountIntoBins, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapOracle, wrapPosition, wrapSOLInstruction };
26492
+ export { ADMIN, ALT_ADDRESS, AccountName, ActionType, ActivationType, AmountIntoBin, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_FEE, BIN_ARRAY_BITMAP_FEE_BN, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_DEFAULT_VERSION, BIN_ARRAY_FEE, BIN_ARRAY_FEE_BN, BidAskParameters, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ChunkCallback, ChunkCallbackInfo, ClmmProgram, Clock, ClockLayout, CollectFeeMode, CompressedBinDepositAmount, CompressedBinDepositAmounts, ConcreteFunctionType, CreateRebalancePositionParams, DEFAULT_BIN_PER_POSITION, DLMMError, DlmmSdkError, DynamicOracle, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, ExtendedPositionBinData, FEE_PRECISION, FeeInfo, FeeMode, FunctionType, GetOrCreateATAResponse, GetPositionsOpt, IAccountsCache, IDL, IDynamicOracle, ILM_BASE, IPosition, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, InitializeMultiplePositionAndAddLiquidityByStrategyResponse, InitializeMultiplePositionAndAddLiquidityByStrategyResponse2, LBCLMM_PROGRAM_IDS, LIMIT_ORDER_BIN_DATA_SIZE, LIMIT_ORDER_FEE_SHARE, LIMIT_ORDER_MIN_SIZE, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LimitOrder, LimitOrderBinData, LimitOrderInfo, LimitOrderStatus, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, LiquidityStrategyParameterBuilder, LiquidityStrategyParameters, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BINS_PER_POSITION, MAX_BIN_ARRAY_SIZE, MAX_BIN_ID_PER_BIN_STEP, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_LIMIT_ORDER, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, MAX_RESIZE_LENGTH, MEMO_PROGRAM_ID, Network, Observation, Opt, Oracle, POOL_FEE, POOL_FEE_BN, POSITION_BIN_DATA_SIZE, POSITION_FEE, POSITION_FEE_BN, POSITION_MAX_LENGTH, POSITION_MIN_SIZE, PRECISION, PairLockInfo, PairStatus, PairType, ParsedLimitOrderWithPubkey, PlaceLimitOrderParams, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionPermission, PositionV2, PositionV2Wrapper, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, REBALANCE_POSITION_PADDING, RebalanceAddLiquidityParam, RebalancePosition, RebalancePositionBinArrayRentalCostQuote, RebalancePositionResponse, RebalanceRemoveLiquidityParam, RebalanceWithDeposit, RebalanceWithWithdraw, RemainingAccountInfo, RemainingAccountsInfoSlice, ResizeSide, ResizeSideEnum, RewardInfo, RewardInfos, Rounding, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityCostBreakdown, SeedLiquidityResponse, SeedLiquiditySingleBinResponse, ShrinkMode, SimulateRebalanceResp, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializeMultiplePositionAndAddLiquidityParamsByStrategy, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TOKEN_ACCOUNT_FEE, TOKEN_ACCOUNT_FEE_BN, TQuoteCreatePositionParams, TokenReserve, TwapResult, U64_MAX, UserFeeInfo, UserRewardInfo, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binArrayLbPairFilter, binDeltaToMinMaxBinId, binIdToBinArrayIndex, buildBitFlagAndNegateStrategyParameters, buildLiquidityStrategyParameters, calculateBidAskDistribution, calculateNormalDistribution, calculatePositionSize, calculateSpotDistribution, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, capSlippagePercentage, chunkBinRange, chunkBinRangeIntoExtendedPositions, chunkDepositWithRebalanceEndpoint, chunkPositionBinRange, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunkedGetProgramAccounts, chunks, compressBinAmount, computeBaseFactorFromFeeBps, computeFee, computeFeeFromAmount, computeProtocolFee, createProgram, decodeAccount, decodeExtendedPosition, decodeRewardPerTokenStored, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOperator, deriveOracle, derivePermissionLbPair, derivePlaceHolderAccountMeta, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, distributeAmountToCompressedBinsByRatio, encodePositionPermissions, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, findOptimumDecompressMultiplier, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, generateAmountForBinRange, generateBinAmount, getAccountDiscriminator, getAmountIn, getAmountInBinsAskSide, getAmountInBinsBidSide, getAmountOut, getAndCapMaxActiveBinSlippage, getAutoFillAmountByRebalancedPosition, getBaseFee, getBinArrayAccountMetasCoverage, getBinArrayIndexesCoverage, getBinArrayInfoForNonContiguousBinIds, getBinArrayKeysCoverage, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinCount, getBinFromBinArray, getBinIdIndexInBinArray, getBinMaxAmountOut, getC, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExtendedPositionBinCount, getExtraAccountMetasForTransferHook, getFeeMode, getIncludedFeeAmount, getLimitOrderLiquidity, getLiquidityStrategyParameterBuilder, getMultipleMintsExtraAccountMetasForTransferHook, getOrCreateATAInstruction, getPositionCount, getPositionCountByBinCount, getPositionExpandRentExemption, getPositionLowerUpperBinIdWithLiquidity, getPositionRentExemption, getPriceOfBinByBinId, getQPriceBaseFactor, getQPriceFromId, getRebalanceBinArrayIndexesAndBitmapCoverage, getScaledUiAmountMultiplier, getSlippageMaxAmount, getSlippageMinAmount, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, isPositionNoFee, isPositionNoReward, isSupportLimitOrder, limitOrderFilter, limitOrderLbPairFilter, limitOrderOwnerFilter, mulDiv, mulShr, parseLogs, positionLbPairFilter, positionOwnerFilter, positionV2Filter, presetParameter2BaseFactorFilter, presetParameter2BaseFeePowerFactor, presetParameter2BinStepFilter, range, resetUninvolvedLiquidityParams, sParameters, scaleAmountByMultiplier, scalePricePerToken, shlDiv, splitFee, suggestBalancedXParametersFromY, suggestBalancedYParametersFromX, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountIntoBins, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapOracle, wrapPosition, wrapSOLInstruction };
package/dist/index.js CHANGED
@@ -10323,13 +10323,17 @@ var LIMIT_ORDER_MIN_SIZE = 112;
10323
10323
  var LIMIT_ORDER_BIN_DATA_SIZE = 32;
10324
10324
  var BinLiquidity;
10325
10325
  ((BinLiquidity2) => {
10326
- function fromBin(bin, binId, binStep, baseTokenDecimal, quoteTokenDecimal, version, lbPair) {
10326
+ function fromBin(bin, binId, binStep, baseTokenDecimal, quoteTokenDecimal, version, lbPair, baseMultiplier = new (0, _decimaljs2.default)(1), quoteMultiplier = new (0, _decimaljs2.default)(1)) {
10327
10327
  const pricePerLamport = getPriceOfBinByBinId(binId, binStep).toString();
10328
10328
  const supportLimitOrder = isSupportLimitOrder(lbPair);
10329
- const xAmount = bin.amountX;
10330
- const yAmount = bin.amountY;
10329
+ const xAmount = scaleAmountByMultiplier(bin.amountX, baseMultiplier);
10330
+ const yAmount = scaleAmountByMultiplier(bin.amountY, quoteMultiplier);
10331
10331
  const supply = bin.liquiditySupply;
10332
- const pricePerToken = new (0, _decimaljs2.default)(pricePerLamport).mul(new (0, _decimaljs2.default)(10 ** (baseTokenDecimal - quoteTokenDecimal))).toString();
10332
+ const pricePerToken = scalePricePerToken(
10333
+ new (0, _decimaljs2.default)(pricePerLamport).mul(new (0, _decimaljs2.default)(10 ** (baseTokenDecimal - quoteTokenDecimal))).toString(),
10334
+ baseMultiplier,
10335
+ quoteMultiplier
10336
+ );
10333
10337
  const feeAmountXPerTokenStored = bin.feeAmountXPerTokenStored;
10334
10338
  const feeAmountYPerTokenStored = bin.feeAmountYPerTokenStored;
10335
10339
  if (supportLimitOrder) {
@@ -10379,7 +10383,7 @@ var BinLiquidity;
10379
10383
  }
10380
10384
  }
10381
10385
  BinLiquidity2.fromBin = fromBin;
10382
- function empty(binId, binStep, baseTokenDecimal, quoteTokenDecimal, version) {
10386
+ function empty(binId, binStep, baseTokenDecimal, quoteTokenDecimal, version, baseMultiplier = new (0, _decimaljs2.default)(1), quoteMultiplier = new (0, _decimaljs2.default)(1)) {
10383
10387
  const pricePerLamport = getPriceOfBinByBinId(binId, binStep).toString();
10384
10388
  return {
10385
10389
  binId,
@@ -10388,7 +10392,11 @@ var BinLiquidity;
10388
10392
  supply: new (0, _anchor.BN)(0),
10389
10393
  price: pricePerLamport,
10390
10394
  version,
10391
- pricePerToken: new (0, _decimaljs2.default)(pricePerLamport).mul(new (0, _decimaljs2.default)(10 ** (baseTokenDecimal - quoteTokenDecimal))).toString(),
10395
+ pricePerToken: scalePricePerToken(
10396
+ new (0, _decimaljs2.default)(pricePerLamport).mul(new (0, _decimaljs2.default)(10 ** (baseTokenDecimal - quoteTokenDecimal))).toString(),
10397
+ baseMultiplier,
10398
+ quoteMultiplier
10399
+ ),
10392
10400
  feeAmountXPerTokenStored: new (0, _anchor.BN)(0),
10393
10401
  feeAmountYPerTokenStored: new (0, _anchor.BN)(0),
10394
10402
  rewardPerTokenStored: [new (0, _anchor.BN)(0), new (0, _anchor.BN)(0)],
@@ -10451,6 +10459,7 @@ var LimitOrderStatus = /* @__PURE__ */ ((LimitOrderStatus2) => {
10451
10459
 
10452
10460
 
10453
10461
 
10462
+
10454
10463
  // src/dlmm/helpers/derive.ts
10455
10464
 
10456
10465
  function sortTokenMints(tokenX, tokenY) {
@@ -10746,6 +10755,7 @@ var _gaussian = require('gaussian'); var _gaussian2 = _interopRequireDefault(_ga
10746
10755
 
10747
10756
 
10748
10757
 
10758
+
10749
10759
  async function getMultipleMintsExtraAccountMetasForTransferHook(connection, mintAddressesWithAccountInfo) {
10750
10760
  const extraAccountMetas = await Promise.all(
10751
10761
  mintAddressesWithAccountInfo.map(
@@ -10886,6 +10896,45 @@ function calculateTransferFeeExcludedAmount(transferFeeIncludedAmount, mint, cur
10886
10896
  transferFee: new (0, _bnjs2.default)(transferFee.toString())
10887
10897
  };
10888
10898
  }
10899
+ var SCALED_UI_AMOUNT_CONFIG_EXTENSION_TYPE = 25;
10900
+ var SCALED_UI_AMOUNT_CONFIG_SIZE = 56;
10901
+ function getScaledUiAmountMultiplier(mint, unixTimestamp) {
10902
+ const tlvData = mint.tlvData;
10903
+ if (!tlvData || tlvData.length === 0) {
10904
+ return new (0, _decimaljs2.default)(1);
10905
+ }
10906
+ let offset = 0;
10907
+ while (offset + 4 <= tlvData.length) {
10908
+ const extensionType = tlvData.readUInt16LE(offset);
10909
+ const length = tlvData.readUInt16LE(offset + 2);
10910
+ const dataStart = offset + 4;
10911
+ if (extensionType === SCALED_UI_AMOUNT_CONFIG_EXTENSION_TYPE && dataStart + SCALED_UI_AMOUNT_CONFIG_SIZE <= tlvData.length) {
10912
+ const multiplier = tlvData.readDoubleLE(dataStart + 32);
10913
+ const newMultiplierEffectiveTimestamp = tlvData.readBigUInt64LE(
10914
+ dataStart + 40
10915
+ );
10916
+ const newMultiplier = tlvData.readDoubleLE(dataStart + 48);
10917
+ const effectiveMultiplier = BigInt(unixTimestamp) >= newMultiplierEffectiveTimestamp ? newMultiplier : multiplier;
10918
+ return new (0, _decimaljs2.default)(effectiveMultiplier);
10919
+ }
10920
+ offset = dataStart + length;
10921
+ }
10922
+ return new (0, _decimaljs2.default)(1);
10923
+ }
10924
+ function scaleAmountByMultiplier(amount, multiplier) {
10925
+ if (multiplier.eq(1)) {
10926
+ return amount;
10927
+ }
10928
+ return new (0, _bnjs2.default)(
10929
+ new (0, _decimaljs2.default)(amount.toString()).mul(multiplier).floor().toString()
10930
+ );
10931
+ }
10932
+ function scalePricePerToken(pricePerToken, baseMultiplier, quoteMultiplier) {
10933
+ if (baseMultiplier.isZero()) {
10934
+ return pricePerToken;
10935
+ }
10936
+ return new (0, _decimaljs2.default)(pricePerToken).mul(quoteMultiplier).div(baseMultiplier).toString();
10937
+ }
10889
10938
 
10890
10939
  // src/dlmm/helpers/weightToAmounts.ts
10891
10940
  function toAmountBidSide(activeId, totalAmount, distributions, mintY, clock) {
@@ -12059,7 +12108,7 @@ function getBinArraysRequiredByPositionRange(pair, fromBinId, toBinId, programId
12059
12108
  index
12060
12109
  }));
12061
12110
  }
12062
- function* enumerateBins(binsById, lowerBinId, upperBinId, binStep, baseTokenDecimal, quoteTokenDecimal, version, lbPair) {
12111
+ function* enumerateBins(binsById, lowerBinId, upperBinId, binStep, baseTokenDecimal, quoteTokenDecimal, version, lbPair, baseMultiplier = new (0, _decimaljs2.default)(1), quoteMultiplier = new (0, _decimaljs2.default)(1)) {
12063
12112
  for (let currentBinId = lowerBinId; currentBinId <= upperBinId; currentBinId++) {
12064
12113
  const bin = binsById.get(currentBinId);
12065
12114
  if (bin != null) {
@@ -12070,7 +12119,9 @@ function* enumerateBins(binsById, lowerBinId, upperBinId, binStep, baseTokenDeci
12070
12119
  baseTokenDecimal,
12071
12120
  quoteTokenDecimal,
12072
12121
  version,
12073
- lbPair
12122
+ lbPair,
12123
+ baseMultiplier,
12124
+ quoteMultiplier
12074
12125
  );
12075
12126
  } else {
12076
12127
  yield BinLiquidity.empty(
@@ -12078,7 +12129,9 @@ function* enumerateBins(binsById, lowerBinId, upperBinId, binStep, baseTokenDeci
12078
12129
  binStep,
12079
12130
  baseTokenDecimal,
12080
12131
  quoteTokenDecimal,
12081
- version
12132
+ version,
12133
+ baseMultiplier,
12134
+ quoteMultiplier
12082
12135
  );
12083
12136
  }
12084
12137
  }
@@ -14852,7 +14905,7 @@ var Observation = class {
14852
14905
  return !this.createdAt.isZero() && !this.lastUpdatedAt.isZero();
14853
14906
  }
14854
14907
  };
14855
- function wrapOracle(oracleAddress, data, binStep, currentActiveBinId, baseTokenDecimals, quoteTokenDecimals, program) {
14908
+ function wrapOracle(oracleAddress, data, binStep, currentActiveBinId, baseTokenDecimals, quoteTokenDecimals, program, baseMultiplier = new (0, _decimaljs2.default)(1), quoteMultiplier = new (0, _decimaljs2.default)(1)) {
14856
14909
  const oracleBaseData = data.subarray(0, ORACLE_METADATA_SIZE);
14857
14910
  const oracleState = decodeAccount(program, "oracle", oracleBaseData);
14858
14911
  const observationSlice = data.subarray(ORACLE_METADATA_SIZE);
@@ -14884,11 +14937,13 @@ function wrapOracle(oracleAddress, data, binStep, currentActiveBinId, baseTokenD
14884
14937
  binStep,
14885
14938
  currentActiveBinId,
14886
14939
  baseTokenDecimals,
14887
- quoteTokenDecimals
14940
+ quoteTokenDecimals,
14941
+ baseMultiplier,
14942
+ quoteMultiplier
14888
14943
  );
14889
14944
  }
14890
14945
  var DynamicOracle = class {
14891
- constructor(oracleAddress, metadata, observations, binStep, currentActiveBinId, baseTokenDecimals, quoteTokenDecimals) {
14946
+ constructor(oracleAddress, metadata, observations, binStep, currentActiveBinId, baseTokenDecimals, quoteTokenDecimals, baseMultiplier = new (0, _decimaljs2.default)(1), quoteMultiplier = new (0, _decimaljs2.default)(1)) {
14892
14947
  this.oracleAddress = oracleAddress;
14893
14948
  this.metadata = metadata;
14894
14949
  this.observations = observations;
@@ -14896,6 +14951,8 @@ var DynamicOracle = class {
14896
14951
  this.currentActiveBinId = currentActiveBinId;
14897
14952
  this.baseTokenDecimals = baseTokenDecimals;
14898
14953
  this.quoteTokenDecimals = quoteTokenDecimals;
14954
+ this.baseMultiplier = baseMultiplier;
14955
+ this.quoteMultiplier = quoteMultiplier;
14899
14956
  }
14900
14957
  nextIndex() {
14901
14958
  const currentIndex = this.metadata.idx.toNumber();
@@ -15002,8 +15059,9 @@ var DynamicOracle = class {
15002
15059
  this.baseTokenDecimals - this.quoteTokenDecimals
15003
15060
  );
15004
15061
  const quoteAdjustment = new (0, _decimaljs2.default)(10).pow(this.quoteTokenDecimals);
15062
+ const priceScaleFactor = this.baseMultiplier.isZero() ? new (0, _decimaljs2.default)(1) : this.quoteMultiplier.div(this.baseMultiplier);
15005
15063
  return {
15006
- value: result.value.mul(uiMultiplier).mul(quoteAdjustment).floor().div(quoteAdjustment),
15064
+ value: result.value.mul(uiMultiplier).mul(quoteAdjustment).floor().div(quoteAdjustment).mul(priceScaleFactor),
15007
15065
  duration: result.duration
15008
15066
  };
15009
15067
  }
@@ -17869,11 +17927,15 @@ var DLMM = class {
17869
17927
  * @returns {string} real price of bin
17870
17928
  */
17871
17929
  fromPricePerLamport(pricePerLamport) {
17930
+ const nowTs = this.clock.unixTimestamp.toNumber();
17931
+ const baseMultiplier = getScaledUiAmountMultiplier(this.tokenX.mint, nowTs);
17932
+ const quoteMultiplier = getScaledUiAmountMultiplier(this.tokenY.mint, nowTs);
17933
+ const priceScaleFactor = baseMultiplier.isZero() ? new (0, _decimaljs2.default)(1) : quoteMultiplier.div(baseMultiplier);
17872
17934
  return new (0, _decimaljs2.default)(pricePerLamport).div(
17873
17935
  new (0, _decimaljs2.default)(
17874
17936
  10 ** (this.tokenY.mint.decimals - this.tokenX.mint.decimals)
17875
17937
  )
17876
- ).toString();
17938
+ ).mul(priceScaleFactor).toString();
17877
17939
  }
17878
17940
  /**
17879
17941
  * The function retrieves the active bin ID and its corresponding price.
@@ -20208,6 +20270,16 @@ var DLMM = class {
20208
20270
  this.clock.epoch.toNumber()
20209
20271
  ).amount;
20210
20272
  const minOutAmount = transferFeeExcludedAmountOut.mul(new (0, _anchor.BN)(BASIS_POINT_MAX).sub(allowedSlippage)).div(new (0, _anchor.BN)(BASIS_POINT_MAX));
20273
+ const nowTs = this.clock.unixTimestamp.toNumber();
20274
+ const endPriceBaseMultiplier = getScaledUiAmountMultiplier(
20275
+ this.tokenX.mint,
20276
+ nowTs
20277
+ );
20278
+ const endPriceQuoteMultiplier = getScaledUiAmountMultiplier(
20279
+ this.tokenY.mint,
20280
+ nowTs
20281
+ );
20282
+ const scaledEndPrice = endPriceBaseMultiplier.isZero() ? endPrice : endPrice.mul(endPriceQuoteMultiplier).div(endPriceBaseMultiplier);
20211
20283
  return {
20212
20284
  consumedInAmount: transferFeeIncludedInAmount,
20213
20285
  outAmount: transferFeeExcludedAmountOut,
@@ -20216,7 +20288,7 @@ var DLMM = class {
20216
20288
  minOutAmount,
20217
20289
  priceImpact,
20218
20290
  binArraysPubkey,
20219
- endPrice,
20291
+ endPrice: scaledEndPrice,
20220
20292
  feeOnInput
20221
20293
  };
20222
20294
  }
@@ -22542,6 +22614,11 @@ var DLMM = class {
22542
22614
  const totalClaimedFeeYAmount = position.totalClaimedFeeYAmount();
22543
22615
  const positionRewardInfos = position.rewardInfos();
22544
22616
  const feeOwner = position.feeOwner();
22617
+ const nowTs = clock.unixTimestamp.toNumber();
22618
+ const baseMultiplier = getScaledUiAmountMultiplier(baseMint, nowTs);
22619
+ const quoteMultiplier = getScaledUiAmountMultiplier(quoteMint, nowTs);
22620
+ const rewardOneMultiplier = rewardMint0 ? getScaledUiAmountMultiplier(rewardMint0, nowTs) : new (0, _decimaljs2.default)(1);
22621
+ const rewardTwoMultiplier = rewardMint1 ? getScaledUiAmountMultiplier(rewardMint1, nowTs) : new (0, _decimaljs2.default)(1);
22545
22622
  const bins = this.getBinsBetweenLowerAndUpperBound(
22546
22623
  lbPairKey,
22547
22624
  lbPair,
@@ -22550,7 +22627,9 @@ var DLMM = class {
22550
22627
  baseMint.decimals,
22551
22628
  quoteMint.decimals,
22552
22629
  binArrayMap,
22553
- program.programId
22630
+ program.programId,
22631
+ baseMultiplier,
22632
+ quoteMultiplier
22554
22633
  );
22555
22634
  if (!bins.length)
22556
22635
  return null;
@@ -22633,10 +22712,19 @@ var DLMM = class {
22633
22712
  positionLiquidity: posShare.toString(),
22634
22713
  positionXAmount: positionXAmount.toString(),
22635
22714
  positionYAmount: positionYAmount.toString(),
22636
- positionFeeXAmount: claimableFeeX.toString(),
22637
- positionFeeYAmount: claimableFeeY.toString(),
22715
+ positionFeeXAmount: scaleAmountByMultiplier(
22716
+ claimableFeeX,
22717
+ baseMultiplier
22718
+ ).toString(),
22719
+ positionFeeYAmount: scaleAmountByMultiplier(
22720
+ claimableFeeY,
22721
+ quoteMultiplier
22722
+ ).toString(),
22638
22723
  positionRewardAmount: claimableRewardsInBin.map(
22639
- (amount) => amount.toString()
22724
+ (amount, j) => scaleAmountByMultiplier(
22725
+ amount,
22726
+ j === 0 ? rewardOneMultiplier : rewardTwoMultiplier
22727
+ ).toString()
22640
22728
  )
22641
22729
  });
22642
22730
  });
@@ -22680,29 +22768,48 @@ var DLMM = class {
22680
22768
  currentEpoch
22681
22769
  ).amount;
22682
22770
  return {
22771
+ // totals inherit the scale from the already-scaled bin amounts
22683
22772
  totalXAmount: totalXAmount.toString(),
22684
22773
  totalYAmount: totalYAmount.toString(),
22685
22774
  positionBinData: positionData,
22686
22775
  lastUpdatedAt,
22687
22776
  lowerBinId: lowerBinId.toNumber(),
22688
22777
  upperBinId: upperBinId.toNumber(),
22689
- feeX,
22690
- feeY,
22691
- rewardOne,
22692
- rewardTwo,
22778
+ feeX: scaleAmountByMultiplier(feeX, baseMultiplier),
22779
+ feeY: scaleAmountByMultiplier(feeY, quoteMultiplier),
22780
+ rewardOne: scaleAmountByMultiplier(rewardOne, rewardOneMultiplier),
22781
+ rewardTwo: scaleAmountByMultiplier(rewardTwo, rewardTwoMultiplier),
22693
22782
  feeOwner,
22694
- totalClaimedFeeXAmount,
22695
- totalClaimedFeeYAmount,
22783
+ totalClaimedFeeXAmount: scaleAmountByMultiplier(
22784
+ totalClaimedFeeXAmount,
22785
+ baseMultiplier
22786
+ ),
22787
+ totalClaimedFeeYAmount: scaleAmountByMultiplier(
22788
+ totalClaimedFeeYAmount,
22789
+ quoteMultiplier
22790
+ ),
22696
22791
  totalXAmountExcludeTransferFee,
22697
22792
  totalYAmountExcludeTransferFee,
22698
- rewardOneExcludeTransferFee,
22699
- rewardTwoExcludeTransferFee,
22700
- feeXExcludeTransferFee,
22701
- feeYExcludeTransferFee,
22793
+ rewardOneExcludeTransferFee: scaleAmountByMultiplier(
22794
+ rewardOneExcludeTransferFee,
22795
+ rewardOneMultiplier
22796
+ ),
22797
+ rewardTwoExcludeTransferFee: scaleAmountByMultiplier(
22798
+ rewardTwoExcludeTransferFee,
22799
+ rewardTwoMultiplier
22800
+ ),
22801
+ feeXExcludeTransferFee: scaleAmountByMultiplier(
22802
+ feeXExcludeTransferFee,
22803
+ baseMultiplier
22804
+ ),
22805
+ feeYExcludeTransferFee: scaleAmountByMultiplier(
22806
+ feeYExcludeTransferFee,
22807
+ quoteMultiplier
22808
+ ),
22702
22809
  owner: position.owner()
22703
22810
  };
22704
22811
  }
22705
- static getBinsBetweenLowerAndUpperBound(lbPairKey, lbPair, lowerBinId, upperBinId, baseTokenDecimal, quoteTokenDecimal, binArrayMap, programId) {
22812
+ static getBinsBetweenLowerAndUpperBound(lbPairKey, lbPair, lowerBinId, upperBinId, baseTokenDecimal, quoteTokenDecimal, binArrayMap, programId, baseMultiplier = new (0, _decimaljs2.default)(1), quoteMultiplier = new (0, _decimaljs2.default)(1)) {
22706
22813
  const lowerBinArrayIndex = binIdToBinArrayIndex(new (0, _anchor.BN)(lowerBinId));
22707
22814
  const upperBinArrayIndex = binIdToBinArrayIndex(new (0, _anchor.BN)(upperBinId));
22708
22815
  let bins = [];
@@ -22725,7 +22832,9 @@ var DLMM = class {
22725
22832
  lbPair.binStep,
22726
22833
  baseTokenDecimal,
22727
22834
  quoteTokenDecimal,
22728
- BIN_ARRAY_DEFAULT_VERSION
22835
+ BIN_ARRAY_DEFAULT_VERSION,
22836
+ baseMultiplier,
22837
+ quoteMultiplier
22729
22838
  )
22730
22839
  );
22731
22840
  } else {
@@ -22738,7 +22847,9 @@ var DLMM = class {
22738
22847
  baseTokenDecimal,
22739
22848
  quoteTokenDecimal,
22740
22849
  binArray.version,
22741
- lbPair
22850
+ lbPair,
22851
+ baseMultiplier,
22852
+ quoteMultiplier
22742
22853
  )
22743
22854
  );
22744
22855
  }
@@ -22799,6 +22910,15 @@ var DLMM = class {
22799
22910
  })
22800
22911
  );
22801
22912
  const version = _nullishCoalesce(_optionalChain([binArrays, 'access', _185 => _185.find, 'call', _186 => _186((binArray) => binArray != null), 'optionalAccess', _187 => _187.version]), () => ( 1));
22913
+ const nowTs = this.clock.unixTimestamp.toNumber();
22914
+ const baseMultiplier = getScaledUiAmountMultiplier(
22915
+ this.tokenX.mint,
22916
+ nowTs
22917
+ );
22918
+ const quoteMultiplier = getScaledUiAmountMultiplier(
22919
+ this.tokenY.mint,
22920
+ nowTs
22921
+ );
22802
22922
  return Array.from(
22803
22923
  enumerateBins(
22804
22924
  binsById,
@@ -22808,7 +22928,9 @@ var DLMM = class {
22808
22928
  baseTokenDecimal,
22809
22929
  quoteTokenDecimal,
22810
22930
  version,
22811
- this.lbPair
22931
+ this.lbPair,
22932
+ baseMultiplier,
22933
+ quoteMultiplier
22812
22934
  )
22813
22935
  );
22814
22936
  }
@@ -23071,6 +23193,7 @@ var DLMM = class {
23071
23193
  "lbPair",
23072
23194
  lbPairAccountInfo.data
23073
23195
  );
23196
+ const nowTs = this.clock.unixTimestamp.toNumber();
23074
23197
  return wrapOracle(
23075
23198
  oracleAddress,
23076
23199
  oracleAccountInfo.data,
@@ -23078,7 +23201,9 @@ var DLMM = class {
23078
23201
  new (0, _anchor.BN)(lbPairState.activeId),
23079
23202
  this.tokenX.mint.decimals,
23080
23203
  this.tokenY.mint.decimals,
23081
- this.program
23204
+ this.program,
23205
+ getScaledUiAmountMultiplier(this.tokenX.mint, nowTs),
23206
+ getScaledUiAmountMultiplier(this.tokenY.mint, nowTs)
23082
23207
  );
23083
23208
  }
23084
23209
  /**
@@ -23323,7 +23448,10 @@ var src_default = DLMM;
23323
23448
 
23324
23449
 
23325
23450
 
23326
- exports.ADMIN = ADMIN; exports.ALT_ADDRESS = ALT_ADDRESS; 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_DEFAULT_VERSION = BIN_ARRAY_DEFAULT_VERSION; 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.CollectFeeMode = CollectFeeMode; exports.ConcreteFunctionType = ConcreteFunctionType; exports.DEFAULT_BIN_PER_POSITION = DEFAULT_BIN_PER_POSITION; exports.DLMMError = DLMMError; exports.DlmmSdkError = DlmmSdkError; exports.DynamicOracle = DynamicOracle; exports.EXTENSION_BINARRAY_BITMAP_SIZE = EXTENSION_BINARRAY_BITMAP_SIZE; exports.FEE_PRECISION = FEE_PRECISION; exports.FunctionType = FunctionType; exports.IDL = idl_default; exports.ILM_BASE = ILM_BASE; exports.LBCLMM_PROGRAM_IDS = LBCLMM_PROGRAM_IDS; exports.LIMIT_ORDER_BIN_DATA_SIZE = LIMIT_ORDER_BIN_DATA_SIZE; exports.LIMIT_ORDER_FEE_SHARE = LIMIT_ORDER_FEE_SHARE; exports.LIMIT_ORDER_MIN_SIZE = LIMIT_ORDER_MIN_SIZE; exports.LimitOrderStatus = LimitOrderStatus; 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_ID_PER_BIN_STEP = MAX_BIN_ID_PER_BIN_STEP; exports.MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX; exports.MAX_BIN_PER_LIMIT_ORDER = MAX_BIN_PER_LIMIT_ORDER; 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.Observation = Observation; 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.PositionPermission = PositionPermission; exports.PositionV2Wrapper = PositionV2Wrapper; exports.PositionVersion = PositionVersion; exports.REBALANCE_POSITION_PADDING = REBALANCE_POSITION_PADDING; exports.RebalancePosition = RebalancePosition; exports.ResizeSide = ResizeSide; exports.Rounding = Rounding; exports.SCALE = SCALE; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SIMULATION_USER = SIMULATION_USER; exports.ShrinkMode = ShrinkMode; 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.binArrayLbPairFilter = binArrayLbPairFilter; exports.binDeltaToMinMaxBinId = binDeltaToMinMaxBinId; exports.binIdToBinArrayIndex = binIdToBinArrayIndex; exports.buildBitFlagAndNegateStrategyParameters = buildBitFlagAndNegateStrategyParameters; exports.buildLiquidityStrategyParameters = buildLiquidityStrategyParameters; exports.calculateBidAskDistribution = calculateBidAskDistribution; exports.calculateNormalDistribution = calculateNormalDistribution; exports.calculatePositionSize = calculatePositionSize; exports.calculateSpotDistribution = calculateSpotDistribution; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; 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.chunkedGetProgramAccounts = chunkedGetProgramAccounts; exports.chunks = chunks; exports.compressBinAmount = compressBinAmount; exports.computeBaseFactorFromFeeBps = computeBaseFactorFromFeeBps; exports.computeFee = computeFee; exports.computeFeeFromAmount = computeFeeFromAmount; exports.computeProtocolFee = computeProtocolFee; exports.createProgram = createProgram; exports.decodeAccount = decodeAccount; exports.decodeExtendedPosition = decodeExtendedPosition; exports.decodeRewardPerTokenStored = decodeRewardPerTokenStored; 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.deriveOperator = deriveOperator; 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.distributeAmountToCompressedBinsByRatio = distributeAmountToCompressedBinsByRatio; exports.encodePositionPermissions = encodePositionPermissions; exports.enumerateBins = enumerateBins; exports.findNextBinArrayIndexWithLiquidity = findNextBinArrayIndexWithLiquidity; exports.findNextBinArrayWithLiquidity = findNextBinArrayWithLiquidity; exports.findOptimumDecompressMultiplier = findOptimumDecompressMultiplier; exports.fromWeightDistributionToAmount = fromWeightDistributionToAmount; exports.fromWeightDistributionToAmountOneSide = fromWeightDistributionToAmountOneSide; exports.generateAmountForBinRange = generateAmountForBinRange; exports.generateBinAmount = generateBinAmount; exports.getAccountDiscriminator = getAccountDiscriminator; exports.getAmountIn = getAmountIn; exports.getAmountInBinsAskSide = getAmountInBinsAskSide; exports.getAmountInBinsBidSide = getAmountInBinsBidSide; exports.getAmountOut = getAmountOut; exports.getAndCapMaxActiveBinSlippage = getAndCapMaxActiveBinSlippage; exports.getAutoFillAmountByRebalancedPosition = getAutoFillAmountByRebalancedPosition; exports.getBaseFee = getBaseFee; exports.getBinArrayAccountMetasCoverage = getBinArrayAccountMetasCoverage; exports.getBinArrayIndexesCoverage = getBinArrayIndexesCoverage; exports.getBinArrayInfoForNonContiguousBinIds = getBinArrayInfoForNonContiguousBinIds; exports.getBinArrayKeysCoverage = getBinArrayKeysCoverage; exports.getBinArrayLowerUpperBinId = getBinArrayLowerUpperBinId; exports.getBinArraysRequiredByPositionRange = getBinArraysRequiredByPositionRange; exports.getBinCount = getBinCount; exports.getBinFromBinArray = getBinFromBinArray; exports.getBinIdIndexInBinArray = getBinIdIndexInBinArray; exports.getBinMaxAmountOut = getBinMaxAmountOut; exports.getC = getC; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getExtendedPositionBinCount = getExtendedPositionBinCount; exports.getExtraAccountMetasForTransferHook = getExtraAccountMetasForTransferHook; exports.getFeeMode = getFeeMode; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getLimitOrderLiquidity = getLimitOrderLiquidity; exports.getLiquidityStrategyParameterBuilder = getLiquidityStrategyParameterBuilder; exports.getMultipleMintsExtraAccountMetasForTransferHook = getMultipleMintsExtraAccountMetasForTransferHook; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPositionCount = getPositionCount; exports.getPositionCountByBinCount = getPositionCountByBinCount; exports.getPositionExpandRentExemption = getPositionExpandRentExemption; exports.getPositionLowerUpperBinIdWithLiquidity = getPositionLowerUpperBinIdWithLiquidity; exports.getPositionRentExemption = getPositionRentExemption; exports.getPriceOfBinByBinId = getPriceOfBinByBinId; exports.getQPriceBaseFactor = getQPriceBaseFactor; exports.getQPriceFromId = getQPriceFromId; 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.isSupportLimitOrder = isSupportLimitOrder; exports.limitOrderFilter = limitOrderFilter; exports.limitOrderLbPairFilter = limitOrderLbPairFilter; exports.limitOrderOwnerFilter = limitOrderOwnerFilter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.parseLogs = parseLogs; exports.positionLbPairFilter = positionLbPairFilter; exports.positionOwnerFilter = positionOwnerFilter; exports.positionV2Filter = positionV2Filter; exports.presetParameter2BaseFactorFilter = presetParameter2BaseFactorFilter; exports.presetParameter2BaseFeePowerFactor = presetParameter2BaseFeePowerFactor; exports.presetParameter2BinStepFilter = presetParameter2BinStepFilter; exports.range = range; exports.resetUninvolvedLiquidityParams = resetUninvolvedLiquidityParams; exports.shlDiv = shlDiv; exports.splitFee = splitFee; 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.wrapOracle = wrapOracle; exports.wrapPosition = wrapPosition; exports.wrapSOLInstruction = wrapSOLInstruction;
23451
+
23452
+
23453
+
23454
+ exports.ADMIN = ADMIN; exports.ALT_ADDRESS = ALT_ADDRESS; 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_DEFAULT_VERSION = BIN_ARRAY_DEFAULT_VERSION; 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.CollectFeeMode = CollectFeeMode; exports.ConcreteFunctionType = ConcreteFunctionType; exports.DEFAULT_BIN_PER_POSITION = DEFAULT_BIN_PER_POSITION; exports.DLMMError = DLMMError; exports.DlmmSdkError = DlmmSdkError; exports.DynamicOracle = DynamicOracle; exports.EXTENSION_BINARRAY_BITMAP_SIZE = EXTENSION_BINARRAY_BITMAP_SIZE; exports.FEE_PRECISION = FEE_PRECISION; exports.FunctionType = FunctionType; exports.IDL = idl_default; exports.ILM_BASE = ILM_BASE; exports.LBCLMM_PROGRAM_IDS = LBCLMM_PROGRAM_IDS; exports.LIMIT_ORDER_BIN_DATA_SIZE = LIMIT_ORDER_BIN_DATA_SIZE; exports.LIMIT_ORDER_FEE_SHARE = LIMIT_ORDER_FEE_SHARE; exports.LIMIT_ORDER_MIN_SIZE = LIMIT_ORDER_MIN_SIZE; exports.LimitOrderStatus = LimitOrderStatus; 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_ID_PER_BIN_STEP = MAX_BIN_ID_PER_BIN_STEP; exports.MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX; exports.MAX_BIN_PER_LIMIT_ORDER = MAX_BIN_PER_LIMIT_ORDER; 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.Observation = Observation; 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.PositionPermission = PositionPermission; exports.PositionV2Wrapper = PositionV2Wrapper; exports.PositionVersion = PositionVersion; exports.REBALANCE_POSITION_PADDING = REBALANCE_POSITION_PADDING; exports.RebalancePosition = RebalancePosition; exports.ResizeSide = ResizeSide; exports.Rounding = Rounding; exports.SCALE = SCALE; exports.SCALE_OFFSET = SCALE_OFFSET; exports.SIMULATION_USER = SIMULATION_USER; exports.ShrinkMode = ShrinkMode; 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.binArrayLbPairFilter = binArrayLbPairFilter; exports.binDeltaToMinMaxBinId = binDeltaToMinMaxBinId; exports.binIdToBinArrayIndex = binIdToBinArrayIndex; exports.buildBitFlagAndNegateStrategyParameters = buildBitFlagAndNegateStrategyParameters; exports.buildLiquidityStrategyParameters = buildLiquidityStrategyParameters; exports.calculateBidAskDistribution = calculateBidAskDistribution; exports.calculateNormalDistribution = calculateNormalDistribution; exports.calculatePositionSize = calculatePositionSize; exports.calculateSpotDistribution = calculateSpotDistribution; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; 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.chunkedGetProgramAccounts = chunkedGetProgramAccounts; exports.chunks = chunks; exports.compressBinAmount = compressBinAmount; exports.computeBaseFactorFromFeeBps = computeBaseFactorFromFeeBps; exports.computeFee = computeFee; exports.computeFeeFromAmount = computeFeeFromAmount; exports.computeProtocolFee = computeProtocolFee; exports.createProgram = createProgram; exports.decodeAccount = decodeAccount; exports.decodeExtendedPosition = decodeExtendedPosition; exports.decodeRewardPerTokenStored = decodeRewardPerTokenStored; 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.deriveOperator = deriveOperator; 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.distributeAmountToCompressedBinsByRatio = distributeAmountToCompressedBinsByRatio; exports.encodePositionPermissions = encodePositionPermissions; exports.enumerateBins = enumerateBins; exports.findNextBinArrayIndexWithLiquidity = findNextBinArrayIndexWithLiquidity; exports.findNextBinArrayWithLiquidity = findNextBinArrayWithLiquidity; exports.findOptimumDecompressMultiplier = findOptimumDecompressMultiplier; exports.fromWeightDistributionToAmount = fromWeightDistributionToAmount; exports.fromWeightDistributionToAmountOneSide = fromWeightDistributionToAmountOneSide; exports.generateAmountForBinRange = generateAmountForBinRange; exports.generateBinAmount = generateBinAmount; exports.getAccountDiscriminator = getAccountDiscriminator; exports.getAmountIn = getAmountIn; exports.getAmountInBinsAskSide = getAmountInBinsAskSide; exports.getAmountInBinsBidSide = getAmountInBinsBidSide; exports.getAmountOut = getAmountOut; exports.getAndCapMaxActiveBinSlippage = getAndCapMaxActiveBinSlippage; exports.getAutoFillAmountByRebalancedPosition = getAutoFillAmountByRebalancedPosition; exports.getBaseFee = getBaseFee; exports.getBinArrayAccountMetasCoverage = getBinArrayAccountMetasCoverage; exports.getBinArrayIndexesCoverage = getBinArrayIndexesCoverage; exports.getBinArrayInfoForNonContiguousBinIds = getBinArrayInfoForNonContiguousBinIds; exports.getBinArrayKeysCoverage = getBinArrayKeysCoverage; exports.getBinArrayLowerUpperBinId = getBinArrayLowerUpperBinId; exports.getBinArraysRequiredByPositionRange = getBinArraysRequiredByPositionRange; exports.getBinCount = getBinCount; exports.getBinFromBinArray = getBinFromBinArray; exports.getBinIdIndexInBinArray = getBinIdIndexInBinArray; exports.getBinMaxAmountOut = getBinMaxAmountOut; exports.getC = getC; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getExtendedPositionBinCount = getExtendedPositionBinCount; exports.getExtraAccountMetasForTransferHook = getExtraAccountMetasForTransferHook; exports.getFeeMode = getFeeMode; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getLimitOrderLiquidity = getLimitOrderLiquidity; exports.getLiquidityStrategyParameterBuilder = getLiquidityStrategyParameterBuilder; exports.getMultipleMintsExtraAccountMetasForTransferHook = getMultipleMintsExtraAccountMetasForTransferHook; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPositionCount = getPositionCount; exports.getPositionCountByBinCount = getPositionCountByBinCount; exports.getPositionExpandRentExemption = getPositionExpandRentExemption; exports.getPositionLowerUpperBinIdWithLiquidity = getPositionLowerUpperBinIdWithLiquidity; exports.getPositionRentExemption = getPositionRentExemption; exports.getPriceOfBinByBinId = getPriceOfBinByBinId; exports.getQPriceBaseFactor = getQPriceBaseFactor; exports.getQPriceFromId = getQPriceFromId; exports.getRebalanceBinArrayIndexesAndBitmapCoverage = getRebalanceBinArrayIndexesAndBitmapCoverage; exports.getScaledUiAmountMultiplier = getScaledUiAmountMultiplier; 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.isSupportLimitOrder = isSupportLimitOrder; exports.limitOrderFilter = limitOrderFilter; exports.limitOrderLbPairFilter = limitOrderLbPairFilter; exports.limitOrderOwnerFilter = limitOrderOwnerFilter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.parseLogs = parseLogs; exports.positionLbPairFilter = positionLbPairFilter; exports.positionOwnerFilter = positionOwnerFilter; exports.positionV2Filter = positionV2Filter; exports.presetParameter2BaseFactorFilter = presetParameter2BaseFactorFilter; exports.presetParameter2BaseFeePowerFactor = presetParameter2BaseFeePowerFactor; exports.presetParameter2BinStepFilter = presetParameter2BinStepFilter; exports.range = range; exports.resetUninvolvedLiquidityParams = resetUninvolvedLiquidityParams; exports.scaleAmountByMultiplier = scaleAmountByMultiplier; exports.scalePricePerToken = scalePricePerToken; exports.shlDiv = shlDiv; exports.splitFee = splitFee; 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.wrapOracle = wrapOracle; exports.wrapPosition = wrapPosition; exports.wrapSOLInstruction = wrapSOLInstruction;
23327
23455
  //# sourceMappingURL=index.js.map
23328
23456
 
23329
23457
  // CJS interop: Make default export primary for require() compatibility