@meteora-ag/cp-amm-sdk 1.0.0-rc.3 → 1.0.0-rc.4

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.mts CHANGED
@@ -5781,14 +5781,14 @@ declare class CpAmm {
5781
5781
  * @param params - Swap parameters including input amount, pool state, slippage, etc.
5782
5782
  * @returns Swap quote including expected output amount, fee, and price impact.
5783
5783
  */
5784
- getQuote(params: GetQuoteParams): Promise<{
5784
+ getQuote(params: GetQuoteParams): {
5785
5785
  swapInAmount: BN;
5786
5786
  consumedInAmount: BN;
5787
5787
  swapOutAmount: BN;
5788
5788
  minSwapOutAmount: BN;
5789
5789
  totalFee: BN;
5790
5790
  priceImpact: number;
5791
- }>;
5791
+ };
5792
5792
  /**
5793
5793
  * Calculates the deposit quote for liquidity pool.
5794
5794
  *
@@ -5799,7 +5799,7 @@ declare class CpAmm {
5799
5799
  * @returns {BN} returns.outputAmount - The calculated corresponding amount of the other token.
5800
5800
  * @returns {BN} returns.liquidityDelta - The amount of liquidity that will be added to the pool.
5801
5801
  */
5802
- getDepositQuote(params: GetDepositQuoteParams): Promise<DepositQuote>;
5802
+ getDepositQuote(params: GetDepositQuoteParams): DepositQuote;
5803
5803
  /**
5804
5804
  * Calculates the withdrawal quote for removing liquidity from a concentrated liquidity pool.
5805
5805
  *
@@ -5813,7 +5813,7 @@ declare class CpAmm {
5813
5813
  * @returns {BN} returns.outAmountA - The calculated amount of token A to be received (after deducting transfer fees)
5814
5814
  * @returns {BN} returns.outAmountB - The calculated amount of token B to be received (after deducting transfer fees)
5815
5815
  */
5816
- getWithdrawQuote(params: GetWithdrawQuoteParams): Promise<WithdrawQuote>;
5816
+ getWithdrawQuote(params: GetWithdrawQuoteParams): WithdrawQuote;
5817
5817
  /**
5818
5818
  * Calculates liquidity and corresponding token amounts for token A single-sided pool creation
5819
5819
  * Only supports initialization where initial price equals min sqrt price
@@ -5974,7 +5974,6 @@ declare function deriveCustomizablePoolAddress(tokenAMint: PublicKey, tokenBMint
5974
5974
  declare function deriveTokenBadgeAddress(tokenMint: PublicKey): PublicKey;
5975
5975
  declare function deriveClaimFeeOperatorAddress(operator: PublicKey): PublicKey;
5976
5976
  declare function derivePositionNftAccount(positionNftMint: PublicKey): PublicKey;
5977
- declare function deriveTokenBadge(tokenMint: PublicKey): PublicKey;
5978
5977
 
5979
5978
  declare const CP_AMM_PROGRAM_ID: PublicKey;
5980
5979
  declare const LIQUIDITY_SCALE = 128;
@@ -5982,7 +5981,6 @@ declare const SCALE_OFFSET = 64;
5982
5981
  declare const BASIS_POINT_MAX = 10000;
5983
5982
  declare const MAX_FEE_NUMERATOR = 500000000;
5984
5983
  declare const FEE_DENOMINATOR = 1000000000;
5985
- declare const PRECISION = 1000000;
5986
5984
  declare const MIN_SQRT_PRICE: BN;
5987
5985
  declare const MAX_SQRT_PRICE: BN;
5988
5986
  declare const MIN_CU_BUFFER = 50000;
@@ -5996,7 +5994,6 @@ declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: Pub
5996
5994
  }>;
5997
5995
  declare const wrapSOLInstruction: (from: PublicKey, to: PublicKey, amount: bigint) => TransactionInstruction[];
5998
5996
  declare const unwrapSOLInstruction: (owner: PublicKey, allowOwnerOffCurve?: boolean) => Promise<TransactionInstruction>;
5999
- declare function getNftOwner(connection: Connection, nftMint: PublicKey): Promise<PublicKey>;
6000
5997
  declare function getAllUserPositionNftAccount(connection: Connection, user: PublicKey): Promise<Array<{
6001
5998
  positionNft: PublicKey;
6002
5999
  positionNftAccount: PublicKey;
@@ -6155,7 +6152,6 @@ declare const ONE: BN;
6155
6152
  declare function pow(base: BN, exp: BN): BN;
6156
6153
 
6157
6154
  declare function mulDiv(x: BN, y: BN, denominator: BN, rounding: Rounding): BN;
6158
- declare function divCeil(a: BN, b: BN): BN;
6159
6155
  declare function q64ToDecimal(num: BN, decimalPlaces?: number): Decimal;
6160
6156
  declare function decimalToQ64(num: Decimal): BN;
6161
6157
 
@@ -12498,4 +12494,4 @@ var CpAmmIDL = {
12498
12494
  types: types
12499
12495
  };
12500
12496
 
12501
- export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, type BaseFee, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionParams, type DepositQuote, type DynamicFee, type DynamicFeeParams, FEE_DENOMINATOR, type FeeMode, FeeSchedulerMode, type FundRewardParams, type GetDepositQuoteParams, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX_CU_BUFFER, MAX_FEE_NUMERATOR, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_SQRT_PRICE, type MergePositionParams, ONE, PRECISION, type PermanentLockParams, type PoolFeesParams, type PoolState, type PositionState, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PreparedPoolCreation, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, type SwapParams, type SwapQuotes, type TokenBadgeState, TradeDirection, type TxBuilder, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, decimalToQ64, CpAmmIDL as default, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadge, deriveTokenBadgeAddress, deriveTokenVaultAddress, divCeil, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAvailableVestingLiquidity, getBaseFeeNumerator, getDynamicFeeNumerator, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getFeeNumerator, getFirstKey, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMinAmountWithSlippage, getNextSqrtPrice, getNftOwner, getOrCreateATAInstruction, getPriceFromSqrtPrice, getPriceImpact, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapAmount, getTokenDecimals, getTokenProgram, getTotalLockedLiquidity, getUnClaimReward, isVestingComplete, mulDiv, positionByPoolFilter, pow, q64ToDecimal, unwrapSOLInstruction, vestingByPositionFilter, wrapSOLInstruction };
12497
+ export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, type BaseFee, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionParams, type DepositQuote, type DynamicFee, type DynamicFeeParams, FEE_DENOMINATOR, type FeeMode, FeeSchedulerMode, type FundRewardParams, type GetDepositQuoteParams, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX_CU_BUFFER, MAX_FEE_NUMERATOR, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_SQRT_PRICE, type MergePositionParams, ONE, type PermanentLockParams, type PoolFeesParams, type PoolState, type PositionState, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PreparedPoolCreation, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, type SwapParams, type SwapQuotes, type TokenBadgeState, TradeDirection, type TxBuilder, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, decimalToQ64, CpAmmIDL as default, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAvailableVestingLiquidity, getBaseFeeNumerator, getDynamicFeeNumerator, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getFeeNumerator, getFirstKey, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMinAmountWithSlippage, getNextSqrtPrice, getOrCreateATAInstruction, getPriceFromSqrtPrice, getPriceImpact, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapAmount, getTokenDecimals, getTokenProgram, getTotalLockedLiquidity, getUnClaimReward, isVestingComplete, mulDiv, positionByPoolFilter, pow, q64ToDecimal, unwrapSOLInstruction, vestingByPositionFilter, wrapSOLInstruction };
package/dist/index.d.ts CHANGED
@@ -5781,14 +5781,14 @@ declare class CpAmm {
5781
5781
  * @param params - Swap parameters including input amount, pool state, slippage, etc.
5782
5782
  * @returns Swap quote including expected output amount, fee, and price impact.
5783
5783
  */
5784
- getQuote(params: GetQuoteParams): Promise<{
5784
+ getQuote(params: GetQuoteParams): {
5785
5785
  swapInAmount: BN;
5786
5786
  consumedInAmount: BN;
5787
5787
  swapOutAmount: BN;
5788
5788
  minSwapOutAmount: BN;
5789
5789
  totalFee: BN;
5790
5790
  priceImpact: number;
5791
- }>;
5791
+ };
5792
5792
  /**
5793
5793
  * Calculates the deposit quote for liquidity pool.
5794
5794
  *
@@ -5799,7 +5799,7 @@ declare class CpAmm {
5799
5799
  * @returns {BN} returns.outputAmount - The calculated corresponding amount of the other token.
5800
5800
  * @returns {BN} returns.liquidityDelta - The amount of liquidity that will be added to the pool.
5801
5801
  */
5802
- getDepositQuote(params: GetDepositQuoteParams): Promise<DepositQuote>;
5802
+ getDepositQuote(params: GetDepositQuoteParams): DepositQuote;
5803
5803
  /**
5804
5804
  * Calculates the withdrawal quote for removing liquidity from a concentrated liquidity pool.
5805
5805
  *
@@ -5813,7 +5813,7 @@ declare class CpAmm {
5813
5813
  * @returns {BN} returns.outAmountA - The calculated amount of token A to be received (after deducting transfer fees)
5814
5814
  * @returns {BN} returns.outAmountB - The calculated amount of token B to be received (after deducting transfer fees)
5815
5815
  */
5816
- getWithdrawQuote(params: GetWithdrawQuoteParams): Promise<WithdrawQuote>;
5816
+ getWithdrawQuote(params: GetWithdrawQuoteParams): WithdrawQuote;
5817
5817
  /**
5818
5818
  * Calculates liquidity and corresponding token amounts for token A single-sided pool creation
5819
5819
  * Only supports initialization where initial price equals min sqrt price
@@ -5974,7 +5974,6 @@ declare function deriveCustomizablePoolAddress(tokenAMint: PublicKey, tokenBMint
5974
5974
  declare function deriveTokenBadgeAddress(tokenMint: PublicKey): PublicKey;
5975
5975
  declare function deriveClaimFeeOperatorAddress(operator: PublicKey): PublicKey;
5976
5976
  declare function derivePositionNftAccount(positionNftMint: PublicKey): PublicKey;
5977
- declare function deriveTokenBadge(tokenMint: PublicKey): PublicKey;
5978
5977
 
5979
5978
  declare const CP_AMM_PROGRAM_ID: PublicKey;
5980
5979
  declare const LIQUIDITY_SCALE = 128;
@@ -5982,7 +5981,6 @@ declare const SCALE_OFFSET = 64;
5982
5981
  declare const BASIS_POINT_MAX = 10000;
5983
5982
  declare const MAX_FEE_NUMERATOR = 500000000;
5984
5983
  declare const FEE_DENOMINATOR = 1000000000;
5985
- declare const PRECISION = 1000000;
5986
5984
  declare const MIN_SQRT_PRICE: BN;
5987
5985
  declare const MAX_SQRT_PRICE: BN;
5988
5986
  declare const MIN_CU_BUFFER = 50000;
@@ -5996,7 +5994,6 @@ declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: Pub
5996
5994
  }>;
5997
5995
  declare const wrapSOLInstruction: (from: PublicKey, to: PublicKey, amount: bigint) => TransactionInstruction[];
5998
5996
  declare const unwrapSOLInstruction: (owner: PublicKey, allowOwnerOffCurve?: boolean) => Promise<TransactionInstruction>;
5999
- declare function getNftOwner(connection: Connection, nftMint: PublicKey): Promise<PublicKey>;
6000
5997
  declare function getAllUserPositionNftAccount(connection: Connection, user: PublicKey): Promise<Array<{
6001
5998
  positionNft: PublicKey;
6002
5999
  positionNftAccount: PublicKey;
@@ -6155,7 +6152,6 @@ declare const ONE: BN;
6155
6152
  declare function pow(base: BN, exp: BN): BN;
6156
6153
 
6157
6154
  declare function mulDiv(x: BN, y: BN, denominator: BN, rounding: Rounding): BN;
6158
- declare function divCeil(a: BN, b: BN): BN;
6159
6155
  declare function q64ToDecimal(num: BN, decimalPlaces?: number): Decimal;
6160
6156
  declare function decimalToQ64(num: Decimal): BN;
6161
6157
 
@@ -12498,4 +12494,4 @@ var CpAmmIDL = {
12498
12494
  types: types
12499
12495
  };
12500
12496
 
12501
- export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, type BaseFee, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionParams, type DepositQuote, type DynamicFee, type DynamicFeeParams, FEE_DENOMINATOR, type FeeMode, FeeSchedulerMode, type FundRewardParams, type GetDepositQuoteParams, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX_CU_BUFFER, MAX_FEE_NUMERATOR, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_SQRT_PRICE, type MergePositionParams, ONE, PRECISION, type PermanentLockParams, type PoolFeesParams, type PoolState, type PositionState, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PreparedPoolCreation, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, type SwapParams, type SwapQuotes, type TokenBadgeState, TradeDirection, type TxBuilder, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, decimalToQ64, CpAmmIDL as default, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadge, deriveTokenBadgeAddress, deriveTokenVaultAddress, divCeil, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAvailableVestingLiquidity, getBaseFeeNumerator, getDynamicFeeNumerator, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getFeeNumerator, getFirstKey, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMinAmountWithSlippage, getNextSqrtPrice, getNftOwner, getOrCreateATAInstruction, getPriceFromSqrtPrice, getPriceImpact, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapAmount, getTokenDecimals, getTokenProgram, getTotalLockedLiquidity, getUnClaimReward, isVestingComplete, mulDiv, positionByPoolFilter, pow, q64ToDecimal, unwrapSOLInstruction, vestingByPositionFilter, wrapSOLInstruction };
12497
+ export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, type BaseFee, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionParams, type DepositQuote, type DynamicFee, type DynamicFeeParams, FEE_DENOMINATOR, type FeeMode, FeeSchedulerMode, type FundRewardParams, type GetDepositQuoteParams, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX_CU_BUFFER, MAX_FEE_NUMERATOR, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_SQRT_PRICE, type MergePositionParams, ONE, type PermanentLockParams, type PoolFeesParams, type PoolState, type PositionState, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PreparedPoolCreation, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, type SwapParams, type SwapQuotes, type TokenBadgeState, TradeDirection, type TxBuilder, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, decimalToQ64, CpAmmIDL as default, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAvailableVestingLiquidity, getBaseFeeNumerator, getDynamicFeeNumerator, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getFeeNumerator, getFirstKey, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMinAmountWithSlippage, getNextSqrtPrice, getOrCreateATAInstruction, getPriceFromSqrtPrice, getPriceImpact, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapAmount, getTokenDecimals, getTokenProgram, getTotalLockedLiquidity, getUnClaimReward, isVestingComplete, mulDiv, positionByPoolFilter, pow, q64ToDecimal, unwrapSOLInstruction, vestingByPositionFilter, wrapSOLInstruction };
package/dist/index.js CHANGED
@@ -6401,7 +6401,6 @@ var SCALE_OFFSET = 64;
6401
6401
  var BASIS_POINT_MAX = 1e4;
6402
6402
  var MAX_FEE_NUMERATOR = 5e8;
6403
6403
  var FEE_DENOMINATOR = 1e9;
6404
- var PRECISION = 1e6;
6405
6404
  var MIN_SQRT_PRICE = new (0, _anchor.BN)("4295048016");
6406
6405
  var MAX_SQRT_PRICE = new (0, _anchor.BN)("79226673521066979257578248091");
6407
6406
  var MIN_CU_BUFFER = 5e4;
@@ -6493,12 +6492,6 @@ function derivePositionNftAccount(positionNftMint) {
6493
6492
  CP_AMM_PROGRAM_ID
6494
6493
  )[0];
6495
6494
  }
6496
- function deriveTokenBadge(tokenMint) {
6497
- return _web3js.PublicKey.findProgramAddressSync(
6498
- [Buffer.from("token_badge"), tokenMint.toBuffer()],
6499
- CP_AMM_PROGRAM_ID
6500
- )[0];
6501
- }
6502
6495
 
6503
6496
  // src/helpers/token.ts
6504
6497
  var _bytes = require('@coral-xyz/anchor/dist/cjs/utils/bytes');
@@ -6519,7 +6512,6 @@ var _bytes = require('@coral-xyz/anchor/dist/cjs/utils/bytes');
6519
6512
 
6520
6513
 
6521
6514
 
6522
-
6523
6515
  function getTokenProgram(flag) {
6524
6516
  return flag == 0 ? _spltoken.TOKEN_PROGRAM_ID : _spltoken.TOKEN_2022_PROGRAM_ID;
6525
6517
  }
@@ -6590,16 +6582,6 @@ var unwrapSOLInstruction = (owner, allowOwnerOffCurve = true) => __async(void 0,
6590
6582
  }
6591
6583
  return null;
6592
6584
  });
6593
- function getNftOwner(connection, nftMint) {
6594
- return __async(this, null, function* () {
6595
- const largesTokenAccount = yield connection.getTokenLargestAccounts(nftMint);
6596
- const accountInfo = yield connection.getParsedAccountInfo(
6597
- largesTokenAccount.value[0].address
6598
- );
6599
- const owner = new (0, _web3js.PublicKey)(accountInfo.value.data.parsed.info.owner);
6600
- return new (0, _web3js.PublicKey)(owner);
6601
- });
6602
- }
6603
6585
  function getAllUserPositionNftAccount(connection, user) {
6604
6586
  return __async(this, null, function* () {
6605
6587
  const filters = [
@@ -6752,12 +6734,6 @@ function mulDiv(x, y, denominator, rounding) {
6752
6734
  }
6753
6735
  return div;
6754
6736
  }
6755
- function divCeil(a, b) {
6756
- if (a.isZero()) {
6757
- return new (0, _anchor.BN)(0);
6758
- }
6759
- return a.add(b.sub(new (0, _anchor.BN)(1))).div(b);
6760
- }
6761
6737
  function q64ToDecimal(num, decimalPlaces) {
6762
6738
  return new (0, _decimaljs2.default)(num.toString()).div(_decimaljs2.default.pow(2, 64)).toDecimalPlaces(decimalPlaces);
6763
6739
  }
@@ -6849,7 +6825,7 @@ function getFeeNumerator(currentPoint, activationPoint, numberOfPeriod, periodFr
6849
6825
  new (0, _anchor.BN)(binStep),
6850
6826
  new (0, _anchor.BN)(variableFeeControl)
6851
6827
  );
6852
- feeNumerator.add(dynamicFeeNumberator);
6828
+ feeNumerator = feeNumerator.add(dynamicFeeNumberator);
6853
6829
  }
6854
6830
  return feeNumerator.gt(new (0, _anchor.BN)(MAX_FEE_NUMERATOR)) ? new (0, _anchor.BN)(MAX_FEE_NUMERATOR) : feeNumerator;
6855
6831
  }
@@ -7164,11 +7140,11 @@ function getAvailableVestingLiquidity(vestingData, currentPoint) {
7164
7140
  numberOfPeriod,
7165
7141
  totalReleasedLiquidity
7166
7142
  } = vestingData;
7167
- if (currentPoint < cliffPoint) {
7143
+ if (currentPoint.lt(cliffPoint)) {
7168
7144
  return new (0, _anchor.BN)(0);
7169
7145
  }
7170
7146
  if (periodFrequency.isZero()) {
7171
- return cliffUnlockLiquidity.sub(totalReleasedLiquidity);
7147
+ return cliffUnlockLiquidity;
7172
7148
  }
7173
7149
  let passedPeriod = new (0, _anchor.BN)(currentPoint).sub(cliffPoint).div(periodFrequency);
7174
7150
  passedPeriod = _bnjs.min.call(void 0, passedPeriod, new (0, _anchor.BN)(numberOfPeriod));
@@ -7246,12 +7222,12 @@ var CpAmm = class {
7246
7222
  getTokenBadgeAccounts(tokenAMint, tokenBMint) {
7247
7223
  return [
7248
7224
  {
7249
- pubkey: deriveTokenBadge(tokenAMint),
7225
+ pubkey: deriveTokenBadgeAddress(tokenAMint),
7250
7226
  isWritable: false,
7251
7227
  isSigner: false
7252
7228
  },
7253
7229
  {
7254
- pubkey: deriveTokenBadge(tokenBMint),
7230
+ pubkey: deriveTokenBadgeAddress(tokenBMint),
7255
7231
  isWritable: false,
7256
7232
  isSigner: false
7257
7233
  }
@@ -7706,87 +7682,85 @@ var CpAmm = class {
7706
7682
  * @returns Swap quote including expected output amount, fee, and price impact.
7707
7683
  */
7708
7684
  getQuote(params) {
7709
- return __async(this, null, function* () {
7710
- const {
7685
+ const {
7686
+ inAmount,
7687
+ inputTokenMint,
7688
+ slippage,
7689
+ poolState,
7690
+ currentTime,
7691
+ currentSlot,
7692
+ inputTokenInfo,
7693
+ outputTokenInfo
7694
+ } = params;
7695
+ const {
7696
+ sqrtPrice: sqrtPriceQ64,
7697
+ liquidity: liquidityQ64,
7698
+ activationType,
7699
+ activationPoint,
7700
+ collectFeeMode,
7701
+ poolFees
7702
+ } = poolState;
7703
+ const {
7704
+ feeSchedulerMode,
7705
+ cliffFeeNumerator,
7706
+ numberOfPeriod,
7707
+ reductionFactor,
7708
+ periodFrequency
7709
+ } = poolFees.baseFee;
7710
+ const dynamicFee = poolFees.dynamicFee;
7711
+ let actualAmountIn = inAmount;
7712
+ if (inputTokenInfo) {
7713
+ actualAmountIn = calculateTransferFeeExcludedAmount(
7711
7714
  inAmount,
7712
- inputTokenMint,
7713
- slippage,
7714
- poolState,
7715
- currentTime,
7716
- currentSlot,
7717
- inputTokenInfo,
7718
- outputTokenInfo
7719
- } = params;
7720
- const {
7721
- sqrtPrice: sqrtPriceQ64,
7722
- liquidity: liquidityQ64,
7723
- activationType,
7724
- activationPoint,
7725
- collectFeeMode,
7726
- poolFees
7727
- } = poolState;
7728
- const {
7729
- feeSchedulerMode,
7730
- cliffFeeNumerator,
7731
- numberOfPeriod,
7732
- reductionFactor,
7733
- periodFrequency
7734
- } = poolFees.baseFee;
7735
- const dynamicFee = poolFees.dynamicFee;
7736
- let actualAmountIn = inAmount;
7737
- if (inputTokenInfo) {
7738
- actualAmountIn = calculateTransferFeeExcludedAmount(
7739
- inAmount,
7740
- inputTokenInfo.mint,
7741
- inputTokenInfo.currentEpoch
7742
- ).amount;
7743
- }
7744
- const aToB = poolState.tokenAMint.equals(inputTokenMint);
7745
- const currentPoint = activationType ? currentTime : currentSlot;
7746
- let dynamicFeeParams;
7747
- if (dynamicFee.initialized) {
7748
- const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFee;
7749
- dynamicFeeParams = { volatilityAccumulator, binStep, variableFeeControl };
7750
- }
7751
- const tradeFeeNumerator = getFeeNumerator(
7752
- currentPoint,
7753
- activationPoint,
7754
- numberOfPeriod,
7755
- periodFrequency,
7756
- feeSchedulerMode,
7757
- cliffFeeNumerator,
7758
- reductionFactor,
7759
- dynamicFeeParams
7760
- );
7761
- const { amountOut, totalFee } = getSwapAmount(
7762
- actualAmountIn,
7763
- sqrtPriceQ64,
7764
- liquidityQ64,
7765
- tradeFeeNumerator,
7766
- aToB,
7767
- collectFeeMode
7768
- );
7769
- let actualAmountOut = amountOut;
7770
- if (outputTokenInfo) {
7771
- actualAmountOut = calculateTransferFeeExcludedAmount(
7772
- amountOut,
7773
- outputTokenInfo.mint,
7774
- outputTokenInfo.currentEpoch
7775
- ).amount;
7776
- }
7777
- const minSwapOutAmount = getMinAmountWithSlippage(
7778
- actualAmountOut,
7779
- slippage
7780
- );
7781
- return {
7782
- swapInAmount: inAmount,
7783
- consumedInAmount: actualAmountIn,
7784
- swapOutAmount: actualAmountOut,
7785
- minSwapOutAmount,
7786
- totalFee,
7787
- priceImpact: getPriceImpact(minSwapOutAmount, actualAmountOut)
7788
- };
7789
- });
7715
+ inputTokenInfo.mint,
7716
+ inputTokenInfo.currentEpoch
7717
+ ).amount;
7718
+ }
7719
+ const aToB = poolState.tokenAMint.equals(inputTokenMint);
7720
+ const currentPoint = activationType ? currentTime : currentSlot;
7721
+ let dynamicFeeParams;
7722
+ if (dynamicFee.initialized) {
7723
+ const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFee;
7724
+ dynamicFeeParams = { volatilityAccumulator, binStep, variableFeeControl };
7725
+ }
7726
+ const tradeFeeNumerator = getFeeNumerator(
7727
+ currentPoint,
7728
+ activationPoint,
7729
+ numberOfPeriod,
7730
+ periodFrequency,
7731
+ feeSchedulerMode,
7732
+ cliffFeeNumerator,
7733
+ reductionFactor,
7734
+ dynamicFeeParams
7735
+ );
7736
+ const { amountOut, totalFee } = getSwapAmount(
7737
+ actualAmountIn,
7738
+ sqrtPriceQ64,
7739
+ liquidityQ64,
7740
+ tradeFeeNumerator,
7741
+ aToB,
7742
+ collectFeeMode
7743
+ );
7744
+ let actualAmountOut = amountOut;
7745
+ if (outputTokenInfo) {
7746
+ actualAmountOut = calculateTransferFeeExcludedAmount(
7747
+ amountOut,
7748
+ outputTokenInfo.mint,
7749
+ outputTokenInfo.currentEpoch
7750
+ ).amount;
7751
+ }
7752
+ const minSwapOutAmount = getMinAmountWithSlippage(
7753
+ actualAmountOut,
7754
+ slippage
7755
+ );
7756
+ return {
7757
+ swapInAmount: inAmount,
7758
+ consumedInAmount: actualAmountIn,
7759
+ swapOutAmount: actualAmountOut,
7760
+ minSwapOutAmount,
7761
+ totalFee,
7762
+ priceImpact: getPriceImpact(minSwapOutAmount, actualAmountOut)
7763
+ };
7790
7764
  }
7791
7765
  /**
7792
7766
  * Calculates the deposit quote for liquidity pool.
@@ -7799,61 +7773,59 @@ var CpAmm = class {
7799
7773
  * @returns {BN} returns.liquidityDelta - The amount of liquidity that will be added to the pool.
7800
7774
  */
7801
7775
  getDepositQuote(params) {
7802
- return __async(this, null, function* () {
7803
- const {
7776
+ const {
7777
+ inAmount,
7778
+ isTokenA,
7779
+ inputTokenInfo,
7780
+ outputTokenInfo,
7781
+ minSqrtPrice,
7782
+ maxSqrtPrice,
7783
+ sqrtPrice
7784
+ } = params;
7785
+ const actualAmountIn = inputTokenInfo ? inAmount.sub(
7786
+ calculateTransferFeeIncludedAmount(
7804
7787
  inAmount,
7805
- isTokenA,
7806
- inputTokenInfo,
7807
- outputTokenInfo,
7788
+ inputTokenInfo.mint,
7789
+ inputTokenInfo.currentEpoch
7790
+ ).transferFee
7791
+ ) : inAmount;
7792
+ const { liquidityDelta, rawAmount } = isTokenA ? {
7793
+ liquidityDelta: getLiquidityDeltaFromAmountA(
7794
+ actualAmountIn,
7795
+ sqrtPrice,
7796
+ maxSqrtPrice
7797
+ ),
7798
+ rawAmount: (delta) => getAmountBFromLiquidityDelta(
7799
+ delta,
7800
+ sqrtPrice,
7801
+ minSqrtPrice,
7802
+ 0 /* Up */
7803
+ )
7804
+ } : {
7805
+ liquidityDelta: getLiquidityDeltaFromAmountB(
7806
+ actualAmountIn,
7808
7807
  minSqrtPrice,
7809
- maxSqrtPrice,
7810
7808
  sqrtPrice
7811
- } = params;
7812
- const actualAmountIn = inputTokenInfo ? inAmount.sub(
7813
- calculateTransferFeeIncludedAmount(
7814
- inAmount,
7815
- inputTokenInfo.mint,
7816
- inputTokenInfo.currentEpoch
7817
- ).transferFee
7818
- ) : inAmount;
7819
- const { liquidityDelta, rawAmount } = isTokenA ? {
7820
- liquidityDelta: getLiquidityDeltaFromAmountA(
7821
- actualAmountIn,
7822
- sqrtPrice,
7823
- maxSqrtPrice
7824
- ),
7825
- rawAmount: (delta) => getAmountBFromLiquidityDelta(
7826
- delta,
7827
- sqrtPrice,
7828
- minSqrtPrice,
7829
- 0 /* Up */
7830
- )
7831
- } : {
7832
- liquidityDelta: getLiquidityDeltaFromAmountB(
7833
- actualAmountIn,
7834
- minSqrtPrice,
7835
- sqrtPrice
7836
- ),
7837
- rawAmount: (delta) => getAmountAFromLiquidityDelta(
7838
- delta,
7839
- sqrtPrice,
7840
- maxSqrtPrice,
7841
- 0 /* Up */
7842
- )
7843
- };
7844
- const rawOutputAmount = new (0, _anchor.BN)(rawAmount(liquidityDelta));
7845
- const outputAmount = outputTokenInfo ? calculateTransferFeeIncludedAmount(
7846
- rawOutputAmount,
7847
- outputTokenInfo.mint,
7848
- outputTokenInfo.currentEpoch
7849
- ).amount : rawOutputAmount;
7850
- return {
7851
- actualInputAmount: actualAmountIn,
7852
- consumedInputAmount: inAmount,
7853
- liquidityDelta,
7854
- outputAmount
7855
- };
7856
- });
7809
+ ),
7810
+ rawAmount: (delta) => getAmountAFromLiquidityDelta(
7811
+ delta,
7812
+ sqrtPrice,
7813
+ maxSqrtPrice,
7814
+ 0 /* Up */
7815
+ )
7816
+ };
7817
+ const rawOutputAmount = new (0, _anchor.BN)(rawAmount(liquidityDelta));
7818
+ const outputAmount = outputTokenInfo ? calculateTransferFeeIncludedAmount(
7819
+ rawOutputAmount,
7820
+ outputTokenInfo.mint,
7821
+ outputTokenInfo.currentEpoch
7822
+ ).amount : rawOutputAmount;
7823
+ return {
7824
+ actualInputAmount: actualAmountIn,
7825
+ consumedInputAmount: inAmount,
7826
+ liquidityDelta,
7827
+ outputAmount
7828
+ };
7857
7829
  }
7858
7830
  /**
7859
7831
  * Calculates the withdrawal quote for removing liquidity from a concentrated liquidity pool.
@@ -7869,41 +7841,39 @@ var CpAmm = class {
7869
7841
  * @returns {BN} returns.outAmountB - The calculated amount of token B to be received (after deducting transfer fees)
7870
7842
  */
7871
7843
  getWithdrawQuote(params) {
7872
- return __async(this, null, function* () {
7873
- const {
7874
- liquidityDelta,
7875
- sqrtPrice,
7876
- maxSqrtPrice,
7877
- minSqrtPrice,
7878
- tokenATokenInfo,
7879
- tokenBTokenInfo
7880
- } = params;
7881
- const amountA = getAmountAFromLiquidityDelta(
7882
- liquidityDelta,
7883
- sqrtPrice,
7884
- maxSqrtPrice,
7885
- 1 /* Down */
7886
- );
7887
- const amountB = getAmountBFromLiquidityDelta(
7888
- liquidityDelta,
7889
- sqrtPrice,
7890
- minSqrtPrice,
7891
- 1 /* Down */
7892
- );
7893
- return {
7894
- liquidityDelta,
7895
- outAmountA: tokenATokenInfo ? calculateTransferFeeExcludedAmount(
7896
- amountA,
7897
- tokenATokenInfo.mint,
7898
- tokenATokenInfo.currentEpoch
7899
- ).amount : amountA,
7900
- outAmountB: tokenBTokenInfo ? calculateTransferFeeExcludedAmount(
7901
- amountB,
7902
- tokenBTokenInfo.mint,
7903
- tokenBTokenInfo.currentEpoch
7904
- ).amount : amountB
7905
- };
7906
- });
7844
+ const {
7845
+ liquidityDelta,
7846
+ sqrtPrice,
7847
+ maxSqrtPrice,
7848
+ minSqrtPrice,
7849
+ tokenATokenInfo,
7850
+ tokenBTokenInfo
7851
+ } = params;
7852
+ const amountA = getAmountAFromLiquidityDelta(
7853
+ liquidityDelta,
7854
+ sqrtPrice,
7855
+ maxSqrtPrice,
7856
+ 1 /* Down */
7857
+ );
7858
+ const amountB = getAmountBFromLiquidityDelta(
7859
+ liquidityDelta,
7860
+ sqrtPrice,
7861
+ minSqrtPrice,
7862
+ 1 /* Down */
7863
+ );
7864
+ return {
7865
+ liquidityDelta,
7866
+ outAmountA: tokenATokenInfo ? calculateTransferFeeExcludedAmount(
7867
+ amountA,
7868
+ tokenATokenInfo.mint,
7869
+ tokenATokenInfo.currentEpoch
7870
+ ).amount : amountA,
7871
+ outAmountB: tokenBTokenInfo ? calculateTransferFeeExcludedAmount(
7872
+ amountB,
7873
+ tokenBTokenInfo.mint,
7874
+ tokenBTokenInfo.currentEpoch
7875
+ ).amount : amountB
7876
+ };
7907
7877
  }
7908
7878
  /**
7909
7879
  * Calculates liquidity and corresponding token amounts for token A single-sided pool creation
@@ -9124,9 +9094,5 @@ var index_default = cp_amm_default;
9124
9094
 
9125
9095
 
9126
9096
 
9127
-
9128
-
9129
-
9130
-
9131
- exports.ActivationPoint = ActivationPoint; exports.ActivationType = ActivationType; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.CP_AMM_PROGRAM_ID = CP_AMM_PROGRAM_ID; exports.CollectFeeMode = CollectFeeMode; exports.CpAmm = CpAmm; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeSchedulerMode = FeeSchedulerMode; exports.LIQUIDITY_SCALE = LIQUIDITY_SCALE; exports.MAX_CU_BUFFER = MAX_CU_BUFFER; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MIN_CU_BUFFER = MIN_CU_BUFFER; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.ONE = ONE; exports.PRECISION = PRECISION; exports.Rounding = Rounding; exports.SCALE_OFFSET = SCALE_OFFSET; exports.TradeDirection = TradeDirection; exports.calculateInitSqrtPrice = calculateInitSqrtPrice; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.decimalToQ64 = decimalToQ64; exports.default = index_default; exports.deriveClaimFeeOperatorAddress = deriveClaimFeeOperatorAddress; exports.deriveConfigAddress = deriveConfigAddress; exports.deriveCustomizablePoolAddress = deriveCustomizablePoolAddress; exports.derivePoolAddress = derivePoolAddress; exports.derivePoolAuthority = derivePoolAuthority; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveRewardVaultAddress = deriveRewardVaultAddress; exports.deriveTokenBadge = deriveTokenBadge; exports.deriveTokenBadgeAddress = deriveTokenBadgeAddress; exports.deriveTokenVaultAddress = deriveTokenVaultAddress; exports.divCeil = divCeil; exports.getAllUserPositionNftAccount = getAllUserPositionNftAccount; exports.getAmountAFromLiquidityDelta = getAmountAFromLiquidityDelta; exports.getAmountBFromLiquidityDelta = getAmountBFromLiquidityDelta; exports.getAvailableVestingLiquidity = getAvailableVestingLiquidity; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getDynamicFeeNumerator = getDynamicFeeNumerator; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getFeeNumerator = getFeeNumerator; exports.getFirstKey = getFirstKey; exports.getLiquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA; exports.getLiquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB; exports.getMaxAmountWithSlippage = getMaxAmountWithSlippage; exports.getMinAmountWithSlippage = getMinAmountWithSlippage; exports.getNextSqrtPrice = getNextSqrtPrice; exports.getNftOwner = getNftOwner; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getPriceImpact = getPriceImpact; exports.getSecondKey = getSecondKey; exports.getSimulationComputeUnits = getSimulationComputeUnits; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmount = getSwapAmount; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTotalLockedLiquidity = getTotalLockedLiquidity; exports.getUnClaimReward = getUnClaimReward; exports.isVestingComplete = isVestingComplete; exports.mulDiv = mulDiv; exports.positionByPoolFilter = positionByPoolFilter; exports.pow = pow; exports.q64ToDecimal = q64ToDecimal; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.vestingByPositionFilter = vestingByPositionFilter; exports.wrapSOLInstruction = wrapSOLInstruction;
9097
+ exports.ActivationPoint = ActivationPoint; exports.ActivationType = ActivationType; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.CP_AMM_PROGRAM_ID = CP_AMM_PROGRAM_ID; exports.CollectFeeMode = CollectFeeMode; exports.CpAmm = CpAmm; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeSchedulerMode = FeeSchedulerMode; exports.LIQUIDITY_SCALE = LIQUIDITY_SCALE; exports.MAX_CU_BUFFER = MAX_CU_BUFFER; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MIN_CU_BUFFER = MIN_CU_BUFFER; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.ONE = ONE; exports.Rounding = Rounding; exports.SCALE_OFFSET = SCALE_OFFSET; exports.TradeDirection = TradeDirection; exports.calculateInitSqrtPrice = calculateInitSqrtPrice; exports.calculateTransferFeeExcludedAmount = calculateTransferFeeExcludedAmount; exports.calculateTransferFeeIncludedAmount = calculateTransferFeeIncludedAmount; exports.decimalToQ64 = decimalToQ64; exports.default = index_default; exports.deriveClaimFeeOperatorAddress = deriveClaimFeeOperatorAddress; exports.deriveConfigAddress = deriveConfigAddress; exports.deriveCustomizablePoolAddress = deriveCustomizablePoolAddress; exports.derivePoolAddress = derivePoolAddress; exports.derivePoolAuthority = derivePoolAuthority; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveRewardVaultAddress = deriveRewardVaultAddress; exports.deriveTokenBadgeAddress = deriveTokenBadgeAddress; exports.deriveTokenVaultAddress = deriveTokenVaultAddress; exports.getAllUserPositionNftAccount = getAllUserPositionNftAccount; exports.getAmountAFromLiquidityDelta = getAmountAFromLiquidityDelta; exports.getAmountBFromLiquidityDelta = getAmountBFromLiquidityDelta; exports.getAvailableVestingLiquidity = getAvailableVestingLiquidity; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getDynamicFeeNumerator = getDynamicFeeNumerator; exports.getEstimatedComputeUnitIxWithBuffer = getEstimatedComputeUnitIxWithBuffer; exports.getEstimatedComputeUnitUsageWithBuffer = getEstimatedComputeUnitUsageWithBuffer; exports.getFeeNumerator = getFeeNumerator; exports.getFirstKey = getFirstKey; exports.getLiquidityDeltaFromAmountA = getLiquidityDeltaFromAmountA; exports.getLiquidityDeltaFromAmountB = getLiquidityDeltaFromAmountB; exports.getMaxAmountWithSlippage = getMaxAmountWithSlippage; exports.getMinAmountWithSlippage = getMinAmountWithSlippage; exports.getNextSqrtPrice = getNextSqrtPrice; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getPriceImpact = getPriceImpact; exports.getSecondKey = getSecondKey; exports.getSimulationComputeUnits = getSimulationComputeUnits; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmount = getSwapAmount; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTotalLockedLiquidity = getTotalLockedLiquidity; exports.getUnClaimReward = getUnClaimReward; exports.isVestingComplete = isVestingComplete; exports.mulDiv = mulDiv; exports.positionByPoolFilter = positionByPoolFilter; exports.pow = pow; exports.q64ToDecimal = q64ToDecimal; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.vestingByPositionFilter = vestingByPositionFilter; exports.wrapSOLInstruction = wrapSOLInstruction;
9132
9098
  //# sourceMappingURL=index.js.map