@meteora-ag/cp-amm-sdk 1.2.2 → 1.2.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
@@ -6086,6 +6086,7 @@ type VestingState = IdlAccounts<CpAmm$1>["vesting"];
6086
6086
  type ConfigState = IdlAccounts<CpAmm$1>["config"];
6087
6087
  type TokenBadgeState = IdlAccounts<CpAmm$1>["tokenBadge"];
6088
6088
  type RewardInfo = IdlTypes<CpAmm$1>["rewardInfo"];
6089
+ type UserRewardInfo = IdlTypes<CpAmm$1>["userRewardInfo"];
6089
6090
  /**
6090
6091
  * Dynamic fee parameters
6091
6092
  * @param binStep
@@ -6553,17 +6554,31 @@ type InitializeRewardParams = {
6553
6554
  rewardDuration: BN;
6554
6555
  pool: PublicKey;
6555
6556
  rewardMint: PublicKey;
6557
+ funder: PublicKey;
6558
+ payer: PublicKey;
6559
+ creator: PublicKey;
6560
+ rewardMintProgram: PublicKey;
6561
+ };
6562
+ type InitializeAndFundReward = {
6563
+ rewardIndex: number;
6564
+ rewardDuration: BN;
6565
+ pool: PublicKey;
6566
+ creator: PublicKey;
6556
6567
  payer: PublicKey;
6568
+ rewardMint: PublicKey;
6569
+ carryForward: boolean;
6570
+ amount: BN;
6571
+ rewardMintProgram: PublicKey;
6557
6572
  };
6558
6573
  type UpdateRewardDurationParams = {
6559
6574
  pool: PublicKey;
6560
- admin: PublicKey;
6575
+ signer: PublicKey;
6561
6576
  rewardIndex: number;
6562
6577
  newDuration: BN;
6563
6578
  };
6564
6579
  type UpdateRewardFunderParams = {
6565
6580
  pool: PublicKey;
6566
- admin: PublicKey;
6581
+ signer: PublicKey;
6567
6582
  rewardIndex: number;
6568
6583
  newFunder: PublicKey;
6569
6584
  };
@@ -6573,6 +6588,9 @@ type FundRewardParams = {
6573
6588
  pool: PublicKey;
6574
6589
  carryForward: boolean;
6575
6590
  amount: BN;
6591
+ rewardMint: PublicKey;
6592
+ rewardVault: PublicKey;
6593
+ rewardMintProgram: PublicKey;
6576
6594
  };
6577
6595
  type WithdrawIneligibleRewardParams = {
6578
6596
  rewardIndex: number;
@@ -6595,7 +6613,7 @@ type ClaimRewardParams = {
6595
6613
  positionState: PositionState;
6596
6614
  positionNftAccount: PublicKey;
6597
6615
  rewardIndex: number;
6598
- skipReward: number;
6616
+ isSkipReward: boolean;
6599
6617
  feePayer?: PublicKey;
6600
6618
  };
6601
6619
  type RefreshVestingParams = {
@@ -6799,6 +6817,15 @@ declare class CpAmm {
6799
6817
  * @returns Parsed PoolState.
6800
6818
  */
6801
6819
  fetchPoolState(pool: PublicKey): Promise<PoolState>;
6820
+ /**
6821
+ * Fetches all Pool states by tokenAMint.
6822
+ * @param tokenAMint - Public key of the tokenA mint.
6823
+ * @returns Array of matched pool accounts and their state.
6824
+ */
6825
+ fetchPoolStatesByTokenAMint(tokenAMint: PublicKey): Promise<Array<{
6826
+ publicKey: PublicKey;
6827
+ account: PoolState;
6828
+ }>>;
6802
6829
  /**
6803
6830
  * Fetches the Position state.
6804
6831
  * @param position - Public key of the position.
@@ -6859,11 +6886,26 @@ declare class CpAmm {
6859
6886
  position: PublicKey;
6860
6887
  positionState: PositionState;
6861
6888
  }>>;
6889
+ /**
6890
+ * Retrieves all vesting accounts associated with a position.
6891
+ * @param position - Public key of the position.
6892
+ * @returns Array of vesting account public keys and their states.
6893
+ */
6862
6894
  getAllVestingsByPosition(position: PublicKey): Promise<Array<{
6863
6895
  publicKey: PublicKey;
6864
6896
  account: VestingState;
6865
6897
  }>>;
6898
+ /**
6899
+ * Checks if a position has any locked liquidity.
6900
+ * @param position - Position state.
6901
+ * @returns True if the position has locked liquidity, false otherwise.
6902
+ */
6866
6903
  isLockedPosition(position: PositionState): boolean;
6904
+ /**
6905
+ * Checks if a position is permanently locked.
6906
+ * @param positionState - Position state.
6907
+ * @returns True if the position is permanently locked, false otherwise.
6908
+ */
6867
6909
  isPermanentLockedPosition(positionState: PositionState): boolean;
6868
6910
  /**
6869
6911
  * Checks if a position can be unlocked based on its locking state and vesting schedules.
@@ -6888,6 +6930,11 @@ declare class CpAmm {
6888
6930
  canUnlock: boolean;
6889
6931
  reason?: string;
6890
6932
  };
6933
+ /**
6934
+ * Checks if a pool exists.
6935
+ * @param pool - Public key of the pool.
6936
+ * @returns True if the pool exists, false otherwise.
6937
+ */
6891
6938
  isPoolExist(pool: PublicKey): Promise<boolean>;
6892
6939
  /**
6893
6940
  * Computes the liquidity delta based on the provided token amounts and sqrt price
@@ -6909,6 +6956,11 @@ declare class CpAmm {
6909
6956
  totalFee: BN$1;
6910
6957
  priceImpact: Decimal;
6911
6958
  };
6959
+ /**
6960
+ * Calculates the expected output amount or input amount for a swap depending on the swap mode.
6961
+ * @param params GetQuote2Params
6962
+ * @returns Quote2Result
6963
+ */
6912
6964
  getQuote2(params: GetQuote2Params): Quote2Result;
6913
6965
  /**
6914
6966
  * Calculates the deposit quote for liquidity pool.
@@ -6965,6 +7017,11 @@ declare class CpAmm {
6965
7017
  pool: PublicKey;
6966
7018
  position: PublicKey;
6967
7019
  }>;
7020
+ /**
7021
+ * Builds a transaction to create a customizable pool with dynamic config.
7022
+ * @param params InitializeCustomizeablePoolWithDynamicConfigParams
7023
+ * @returns Transaction and related addresses.
7024
+ */
6968
7025
  createCustomPoolWithDynamicConfig(params: InitializeCustomizeablePoolWithDynamicConfigParams): Promise<{
6969
7026
  tx: Transaction;
6970
7027
  pool: PublicKey;
@@ -7010,6 +7067,11 @@ declare class CpAmm {
7010
7067
  * @returns Transaction builder.
7011
7068
  */
7012
7069
  swap(params: SwapParams): TxBuilder;
7070
+ /**
7071
+ * Builds a transaction to perform a swap in the pool.
7072
+ * @param params Swap2Params
7073
+ * @returns Transaction builder.
7074
+ */
7013
7075
  swap2(params: Swap2Params): TxBuilder;
7014
7076
  /**
7015
7077
  * Builds a transaction to lock a position with vesting schedule.
@@ -7029,6 +7091,11 @@ declare class CpAmm {
7029
7091
  * @returns Transaction builder.
7030
7092
  */
7031
7093
  refreshVesting(params: RefreshVestingParams): TxBuilder;
7094
+ /**
7095
+ * Builds a transaction to close a position.
7096
+ * @param params ClosePositionParams
7097
+ * @returns Transaction builder.
7098
+ */
7032
7099
  closePosition(params: ClosePositionParams): TxBuilder;
7033
7100
  /**
7034
7101
  * Builds a transaction to remove all liquidity from a position and close it.
@@ -7055,6 +7122,18 @@ declare class CpAmm {
7055
7122
  * @throws {Error} If either position is locked or incompatible
7056
7123
  */
7057
7124
  mergePosition(params: MergePositionParams): TxBuilder;
7125
+ /**
7126
+ * Builds a transaction to initialize a reward for a pool.
7127
+ * @param params InitializeRewardParams
7128
+ * @returns Transaction builder.
7129
+ */
7130
+ initializeReward(params: InitializeRewardParams): TxBuilder;
7131
+ /**
7132
+ * Builds a transaction to initialize and fund a reward for a pool.
7133
+ * @param params InitializeAndFundReward
7134
+ * @returns Transaction builder.
7135
+ */
7136
+ initializeAndFundReward(params: InitializeAndFundReward): TxBuilder;
7058
7137
  /**
7059
7138
  * Builds a transaction to update reward duration.
7060
7139
  * @param {UpdateRewardDurationParams} params - Parameters including pool and new duration.
@@ -7103,7 +7182,17 @@ declare class CpAmm {
7103
7182
  * @returns Transaction builder.
7104
7183
  */
7105
7184
  claimReward(params: ClaimRewardParams): TxBuilder;
7185
+ /**
7186
+ * Builds a transaction to split a position into two positions.
7187
+ * @param params SplitPositionParams
7188
+ * @returns Transaction builder.
7189
+ */
7106
7190
  splitPosition(params: SplitPositionParams): TxBuilder;
7191
+ /**
7192
+ * Builds a transaction to split a position into two positions.
7193
+ * @param params SplitPosition2Params
7194
+ * @returns Transaction builder.
7195
+ */
7107
7196
  splitPosition2(params: SplitPosition2Params): TxBuilder;
7108
7197
  }
7109
7198
 
@@ -7314,11 +7403,20 @@ declare const getSqrtPriceFromPrice: (price: string, tokenADecimal: number, toke
7314
7403
  * @param positionState - The position state
7315
7404
  * @returns The unclaimed reward
7316
7405
  */
7317
- declare const getUnClaimReward: (poolState: PoolState, positionState: PositionState) => {
7406
+ declare const getUnClaimLpFee: (poolState: PoolState, positionState: PositionState) => {
7318
7407
  feeTokenA: BN;
7319
7408
  feeTokenB: BN;
7320
7409
  rewards: BN[];
7321
7410
  };
7411
+ declare function getRewardInfo(poolState: PoolState, rewardIndex: number, periodTime: BN, currentTime: BN): {
7412
+ rewardPerPeriod: BN;
7413
+ rewardBalance: BN;
7414
+ totalRewardDistributed: BN;
7415
+ };
7416
+ declare function getUserRewardPending(poolState: PoolState, positionState: PositionState, rewardIndex: number, currentTime: BN, periodTime: BN): {
7417
+ userRewardPerPeriod: BN;
7418
+ userPendingReward: BN;
7419
+ };
7322
7420
 
7323
7421
  /**
7324
7422
  * Filters for the position by pool
@@ -7332,6 +7430,13 @@ declare const positionByPoolFilter: (pool: PublicKey) => GetProgramAccountsFilte
7332
7430
  * @returns The filter for the vesting by position
7333
7431
  */
7334
7432
  declare const vestingByPositionFilter: (position: PublicKey) => GetProgramAccountsFilter;
7433
+ /**
7434
+ * Create a memcmp filter for offset-based filtering
7435
+ * @param value - The value to filter by
7436
+ * @param offset - The offset where the value field is located in the account data
7437
+ * @returns A GetProgramAccountsFilter array with the value filter
7438
+ */
7439
+ declare function offsetBasedFilter(value: PublicKey | string, offset: number): GetProgramAccountsFilter[];
7335
7440
 
7336
7441
  interface TransferFeeIncludedAmount {
7337
7442
  amount: BN;
@@ -15601,4 +15706,4 @@ var cp_amm = {
15601
15706
  types: types
15602
15707
  };
15603
15708
 
15604
- export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeHandler, BaseFeeMode, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, CURRENT_POOL_VERSION, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, cp_amm as CpAmmIdl, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionAndAddLiquidity, type CreatePositionParams, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, DYNAMIC_FEE_ROUNDING_OFFSET, DYNAMIC_FEE_SCALING_FACTOR, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeScheduler, type FundRewardParams, type GetDepositQuoteParams, type GetQuote2Params, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX, MAX_CU_BUFFER, MAX_EXPONENTIAL, MAX_FEE_BPS_V0, MAX_FEE_BPS_V1, MAX_FEE_NUMERATOR_V0, MAX_FEE_NUMERATOR_V1, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_RATE_LIMITER_DURATION_IN_SECONDS, MAX_RATE_LIMITER_DURATION_IN_SLOTS, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_FEE_BPS, MIN_FEE_NUMERATOR, MIN_SQRT_PRICE, type MergePositionParams, ONE_Q64, type PermanentLockParams, type PoolFeesParams, type PoolFeesStruct, type PoolState, PoolStatus, PoolVersion, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type Quote2Result, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, SPLIT_POSITION_DENOMINATOR, type SetupFeeClaimAccountsParams, type SplitFees, type SplitPosition2Params, type SplitPositionParams, type Swap2Params, type SwapAmount, SwapMode, type SwapParams, type SwapResult, type SwapResult2, type TokenBadgeState, TradeDirection, type TxBuilder, U128_MAX, U16_MAX, U64_MAX, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateAtoBFromAmountIn, calculateAtoBFromAmountOut, calculateAtoBFromPartialAmountIn, calculateBtoAFromAmountIn, calculateBtoAFromAmountOut, calculateBtoAFromPartialAmountIn, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, convertToFeeSchedulerSecondFactor, convertToLamports, convertToRateLimiterSecondFactor, decimalToQ64, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeNumerator, getBaseFeeNumeratorByPeriod, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, getMinBaseFeeNumerator, getNextSqrtPriceFromAmountInARoundingUp, getNextSqrtPriceFromAmountInBRoundingDown, getNextSqrtPriceFromAmountOutARoundingUp, getNextSqrtPriceFromAmountOutBRoundingDown, getNextSqrtPriceFromInput, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceChange, getPriceFromSqrtPrice, getPriceImpact, getRateLimiterParams, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapResultFromExactInput, getSwapResultFromExactOutput, getSwapResultFromPartialInput, getTokenDecimals, getTokenProgram, getTotalFeeNumerator, getTotalLockedLiquidity, getTotalTradingFeeFromExcludedFeeAmount, getTotalTradingFeeFromIncludedFeeAmount, getUnClaimReward, hasPartner, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toNumerator, unwrapSOLInstruction, validateFeeFraction, validateFeeRateLimiter, validateFeeScheduler, vestingByPositionFilter, wrapSOLInstruction };
15709
+ export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeHandler, BaseFeeMode, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, CURRENT_POOL_VERSION, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, cp_amm as CpAmmIdl, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionAndAddLiquidity, type CreatePositionParams, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, DYNAMIC_FEE_ROUNDING_OFFSET, DYNAMIC_FEE_SCALING_FACTOR, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeScheduler, type FundRewardParams, type GetDepositQuoteParams, type GetQuote2Params, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeAndFundReward, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX, MAX_CU_BUFFER, MAX_EXPONENTIAL, MAX_FEE_BPS_V0, MAX_FEE_BPS_V1, MAX_FEE_NUMERATOR_V0, MAX_FEE_NUMERATOR_V1, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_RATE_LIMITER_DURATION_IN_SECONDS, MAX_RATE_LIMITER_DURATION_IN_SLOTS, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_FEE_BPS, MIN_FEE_NUMERATOR, MIN_SQRT_PRICE, type MergePositionParams, ONE_Q64, type PermanentLockParams, type PoolFeesParams, type PoolFeesStruct, type PoolState, PoolStatus, PoolVersion, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type Quote2Result, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, SPLIT_POSITION_DENOMINATOR, type SetupFeeClaimAccountsParams, type SplitFees, type SplitPosition2Params, type SplitPositionParams, type Swap2Params, type SwapAmount, SwapMode, type SwapParams, type SwapResult, type SwapResult2, type TokenBadgeState, TradeDirection, type TxBuilder, U128_MAX, U16_MAX, U64_MAX, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type UserRewardInfo, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateAtoBFromAmountIn, calculateAtoBFromAmountOut, calculateAtoBFromPartialAmountIn, calculateBtoAFromAmountIn, calculateBtoAFromAmountOut, calculateBtoAFromPartialAmountIn, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, convertToFeeSchedulerSecondFactor, convertToLamports, convertToRateLimiterSecondFactor, decimalToQ64, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeNumerator, getBaseFeeNumeratorByPeriod, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, getMinBaseFeeNumerator, getNextSqrtPriceFromAmountInARoundingUp, getNextSqrtPriceFromAmountInBRoundingDown, getNextSqrtPriceFromAmountOutARoundingUp, getNextSqrtPriceFromAmountOutBRoundingDown, getNextSqrtPriceFromInput, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceChange, getPriceFromSqrtPrice, getPriceImpact, getRateLimiterParams, getRewardInfo, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapResultFromExactInput, getSwapResultFromExactOutput, getSwapResultFromPartialInput, getTokenDecimals, getTokenProgram, getTotalFeeNumerator, getTotalLockedLiquidity, getTotalTradingFeeFromExcludedFeeAmount, getTotalTradingFeeFromIncludedFeeAmount, getUnClaimLpFee, getUserRewardPending, hasPartner, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toNumerator, unwrapSOLInstruction, validateFeeFraction, validateFeeRateLimiter, validateFeeScheduler, vestingByPositionFilter, wrapSOLInstruction };
package/dist/index.d.ts CHANGED
@@ -6086,6 +6086,7 @@ type VestingState = IdlAccounts<CpAmm$1>["vesting"];
6086
6086
  type ConfigState = IdlAccounts<CpAmm$1>["config"];
6087
6087
  type TokenBadgeState = IdlAccounts<CpAmm$1>["tokenBadge"];
6088
6088
  type RewardInfo = IdlTypes<CpAmm$1>["rewardInfo"];
6089
+ type UserRewardInfo = IdlTypes<CpAmm$1>["userRewardInfo"];
6089
6090
  /**
6090
6091
  * Dynamic fee parameters
6091
6092
  * @param binStep
@@ -6553,17 +6554,31 @@ type InitializeRewardParams = {
6553
6554
  rewardDuration: BN;
6554
6555
  pool: PublicKey;
6555
6556
  rewardMint: PublicKey;
6557
+ funder: PublicKey;
6558
+ payer: PublicKey;
6559
+ creator: PublicKey;
6560
+ rewardMintProgram: PublicKey;
6561
+ };
6562
+ type InitializeAndFundReward = {
6563
+ rewardIndex: number;
6564
+ rewardDuration: BN;
6565
+ pool: PublicKey;
6566
+ creator: PublicKey;
6556
6567
  payer: PublicKey;
6568
+ rewardMint: PublicKey;
6569
+ carryForward: boolean;
6570
+ amount: BN;
6571
+ rewardMintProgram: PublicKey;
6557
6572
  };
6558
6573
  type UpdateRewardDurationParams = {
6559
6574
  pool: PublicKey;
6560
- admin: PublicKey;
6575
+ signer: PublicKey;
6561
6576
  rewardIndex: number;
6562
6577
  newDuration: BN;
6563
6578
  };
6564
6579
  type UpdateRewardFunderParams = {
6565
6580
  pool: PublicKey;
6566
- admin: PublicKey;
6581
+ signer: PublicKey;
6567
6582
  rewardIndex: number;
6568
6583
  newFunder: PublicKey;
6569
6584
  };
@@ -6573,6 +6588,9 @@ type FundRewardParams = {
6573
6588
  pool: PublicKey;
6574
6589
  carryForward: boolean;
6575
6590
  amount: BN;
6591
+ rewardMint: PublicKey;
6592
+ rewardVault: PublicKey;
6593
+ rewardMintProgram: PublicKey;
6576
6594
  };
6577
6595
  type WithdrawIneligibleRewardParams = {
6578
6596
  rewardIndex: number;
@@ -6595,7 +6613,7 @@ type ClaimRewardParams = {
6595
6613
  positionState: PositionState;
6596
6614
  positionNftAccount: PublicKey;
6597
6615
  rewardIndex: number;
6598
- skipReward: number;
6616
+ isSkipReward: boolean;
6599
6617
  feePayer?: PublicKey;
6600
6618
  };
6601
6619
  type RefreshVestingParams = {
@@ -6799,6 +6817,15 @@ declare class CpAmm {
6799
6817
  * @returns Parsed PoolState.
6800
6818
  */
6801
6819
  fetchPoolState(pool: PublicKey): Promise<PoolState>;
6820
+ /**
6821
+ * Fetches all Pool states by tokenAMint.
6822
+ * @param tokenAMint - Public key of the tokenA mint.
6823
+ * @returns Array of matched pool accounts and their state.
6824
+ */
6825
+ fetchPoolStatesByTokenAMint(tokenAMint: PublicKey): Promise<Array<{
6826
+ publicKey: PublicKey;
6827
+ account: PoolState;
6828
+ }>>;
6802
6829
  /**
6803
6830
  * Fetches the Position state.
6804
6831
  * @param position - Public key of the position.
@@ -6859,11 +6886,26 @@ declare class CpAmm {
6859
6886
  position: PublicKey;
6860
6887
  positionState: PositionState;
6861
6888
  }>>;
6889
+ /**
6890
+ * Retrieves all vesting accounts associated with a position.
6891
+ * @param position - Public key of the position.
6892
+ * @returns Array of vesting account public keys and their states.
6893
+ */
6862
6894
  getAllVestingsByPosition(position: PublicKey): Promise<Array<{
6863
6895
  publicKey: PublicKey;
6864
6896
  account: VestingState;
6865
6897
  }>>;
6898
+ /**
6899
+ * Checks if a position has any locked liquidity.
6900
+ * @param position - Position state.
6901
+ * @returns True if the position has locked liquidity, false otherwise.
6902
+ */
6866
6903
  isLockedPosition(position: PositionState): boolean;
6904
+ /**
6905
+ * Checks if a position is permanently locked.
6906
+ * @param positionState - Position state.
6907
+ * @returns True if the position is permanently locked, false otherwise.
6908
+ */
6867
6909
  isPermanentLockedPosition(positionState: PositionState): boolean;
6868
6910
  /**
6869
6911
  * Checks if a position can be unlocked based on its locking state and vesting schedules.
@@ -6888,6 +6930,11 @@ declare class CpAmm {
6888
6930
  canUnlock: boolean;
6889
6931
  reason?: string;
6890
6932
  };
6933
+ /**
6934
+ * Checks if a pool exists.
6935
+ * @param pool - Public key of the pool.
6936
+ * @returns True if the pool exists, false otherwise.
6937
+ */
6891
6938
  isPoolExist(pool: PublicKey): Promise<boolean>;
6892
6939
  /**
6893
6940
  * Computes the liquidity delta based on the provided token amounts and sqrt price
@@ -6909,6 +6956,11 @@ declare class CpAmm {
6909
6956
  totalFee: BN$1;
6910
6957
  priceImpact: Decimal;
6911
6958
  };
6959
+ /**
6960
+ * Calculates the expected output amount or input amount for a swap depending on the swap mode.
6961
+ * @param params GetQuote2Params
6962
+ * @returns Quote2Result
6963
+ */
6912
6964
  getQuote2(params: GetQuote2Params): Quote2Result;
6913
6965
  /**
6914
6966
  * Calculates the deposit quote for liquidity pool.
@@ -6965,6 +7017,11 @@ declare class CpAmm {
6965
7017
  pool: PublicKey;
6966
7018
  position: PublicKey;
6967
7019
  }>;
7020
+ /**
7021
+ * Builds a transaction to create a customizable pool with dynamic config.
7022
+ * @param params InitializeCustomizeablePoolWithDynamicConfigParams
7023
+ * @returns Transaction and related addresses.
7024
+ */
6968
7025
  createCustomPoolWithDynamicConfig(params: InitializeCustomizeablePoolWithDynamicConfigParams): Promise<{
6969
7026
  tx: Transaction;
6970
7027
  pool: PublicKey;
@@ -7010,6 +7067,11 @@ declare class CpAmm {
7010
7067
  * @returns Transaction builder.
7011
7068
  */
7012
7069
  swap(params: SwapParams): TxBuilder;
7070
+ /**
7071
+ * Builds a transaction to perform a swap in the pool.
7072
+ * @param params Swap2Params
7073
+ * @returns Transaction builder.
7074
+ */
7013
7075
  swap2(params: Swap2Params): TxBuilder;
7014
7076
  /**
7015
7077
  * Builds a transaction to lock a position with vesting schedule.
@@ -7029,6 +7091,11 @@ declare class CpAmm {
7029
7091
  * @returns Transaction builder.
7030
7092
  */
7031
7093
  refreshVesting(params: RefreshVestingParams): TxBuilder;
7094
+ /**
7095
+ * Builds a transaction to close a position.
7096
+ * @param params ClosePositionParams
7097
+ * @returns Transaction builder.
7098
+ */
7032
7099
  closePosition(params: ClosePositionParams): TxBuilder;
7033
7100
  /**
7034
7101
  * Builds a transaction to remove all liquidity from a position and close it.
@@ -7055,6 +7122,18 @@ declare class CpAmm {
7055
7122
  * @throws {Error} If either position is locked or incompatible
7056
7123
  */
7057
7124
  mergePosition(params: MergePositionParams): TxBuilder;
7125
+ /**
7126
+ * Builds a transaction to initialize a reward for a pool.
7127
+ * @param params InitializeRewardParams
7128
+ * @returns Transaction builder.
7129
+ */
7130
+ initializeReward(params: InitializeRewardParams): TxBuilder;
7131
+ /**
7132
+ * Builds a transaction to initialize and fund a reward for a pool.
7133
+ * @param params InitializeAndFundReward
7134
+ * @returns Transaction builder.
7135
+ */
7136
+ initializeAndFundReward(params: InitializeAndFundReward): TxBuilder;
7058
7137
  /**
7059
7138
  * Builds a transaction to update reward duration.
7060
7139
  * @param {UpdateRewardDurationParams} params - Parameters including pool and new duration.
@@ -7103,7 +7182,17 @@ declare class CpAmm {
7103
7182
  * @returns Transaction builder.
7104
7183
  */
7105
7184
  claimReward(params: ClaimRewardParams): TxBuilder;
7185
+ /**
7186
+ * Builds a transaction to split a position into two positions.
7187
+ * @param params SplitPositionParams
7188
+ * @returns Transaction builder.
7189
+ */
7106
7190
  splitPosition(params: SplitPositionParams): TxBuilder;
7191
+ /**
7192
+ * Builds a transaction to split a position into two positions.
7193
+ * @param params SplitPosition2Params
7194
+ * @returns Transaction builder.
7195
+ */
7107
7196
  splitPosition2(params: SplitPosition2Params): TxBuilder;
7108
7197
  }
7109
7198
 
@@ -7314,11 +7403,20 @@ declare const getSqrtPriceFromPrice: (price: string, tokenADecimal: number, toke
7314
7403
  * @param positionState - The position state
7315
7404
  * @returns The unclaimed reward
7316
7405
  */
7317
- declare const getUnClaimReward: (poolState: PoolState, positionState: PositionState) => {
7406
+ declare const getUnClaimLpFee: (poolState: PoolState, positionState: PositionState) => {
7318
7407
  feeTokenA: BN;
7319
7408
  feeTokenB: BN;
7320
7409
  rewards: BN[];
7321
7410
  };
7411
+ declare function getRewardInfo(poolState: PoolState, rewardIndex: number, periodTime: BN, currentTime: BN): {
7412
+ rewardPerPeriod: BN;
7413
+ rewardBalance: BN;
7414
+ totalRewardDistributed: BN;
7415
+ };
7416
+ declare function getUserRewardPending(poolState: PoolState, positionState: PositionState, rewardIndex: number, currentTime: BN, periodTime: BN): {
7417
+ userRewardPerPeriod: BN;
7418
+ userPendingReward: BN;
7419
+ };
7322
7420
 
7323
7421
  /**
7324
7422
  * Filters for the position by pool
@@ -7332,6 +7430,13 @@ declare const positionByPoolFilter: (pool: PublicKey) => GetProgramAccountsFilte
7332
7430
  * @returns The filter for the vesting by position
7333
7431
  */
7334
7432
  declare const vestingByPositionFilter: (position: PublicKey) => GetProgramAccountsFilter;
7433
+ /**
7434
+ * Create a memcmp filter for offset-based filtering
7435
+ * @param value - The value to filter by
7436
+ * @param offset - The offset where the value field is located in the account data
7437
+ * @returns A GetProgramAccountsFilter array with the value filter
7438
+ */
7439
+ declare function offsetBasedFilter(value: PublicKey | string, offset: number): GetProgramAccountsFilter[];
7335
7440
 
7336
7441
  interface TransferFeeIncludedAmount {
7337
7442
  amount: BN;
@@ -15601,4 +15706,4 @@ var cp_amm = {
15601
15706
  types: types
15602
15707
  };
15603
15708
 
15604
- export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeHandler, BaseFeeMode, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, CURRENT_POOL_VERSION, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, cp_amm as CpAmmIdl, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionAndAddLiquidity, type CreatePositionParams, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, DYNAMIC_FEE_ROUNDING_OFFSET, DYNAMIC_FEE_SCALING_FACTOR, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeScheduler, type FundRewardParams, type GetDepositQuoteParams, type GetQuote2Params, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX, MAX_CU_BUFFER, MAX_EXPONENTIAL, MAX_FEE_BPS_V0, MAX_FEE_BPS_V1, MAX_FEE_NUMERATOR_V0, MAX_FEE_NUMERATOR_V1, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_RATE_LIMITER_DURATION_IN_SECONDS, MAX_RATE_LIMITER_DURATION_IN_SLOTS, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_FEE_BPS, MIN_FEE_NUMERATOR, MIN_SQRT_PRICE, type MergePositionParams, ONE_Q64, type PermanentLockParams, type PoolFeesParams, type PoolFeesStruct, type PoolState, PoolStatus, PoolVersion, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type Quote2Result, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, SPLIT_POSITION_DENOMINATOR, type SetupFeeClaimAccountsParams, type SplitFees, type SplitPosition2Params, type SplitPositionParams, type Swap2Params, type SwapAmount, SwapMode, type SwapParams, type SwapResult, type SwapResult2, type TokenBadgeState, TradeDirection, type TxBuilder, U128_MAX, U16_MAX, U64_MAX, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateAtoBFromAmountIn, calculateAtoBFromAmountOut, calculateAtoBFromPartialAmountIn, calculateBtoAFromAmountIn, calculateBtoAFromAmountOut, calculateBtoAFromPartialAmountIn, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, convertToFeeSchedulerSecondFactor, convertToLamports, convertToRateLimiterSecondFactor, decimalToQ64, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeNumerator, getBaseFeeNumeratorByPeriod, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, getMinBaseFeeNumerator, getNextSqrtPriceFromAmountInARoundingUp, getNextSqrtPriceFromAmountInBRoundingDown, getNextSqrtPriceFromAmountOutARoundingUp, getNextSqrtPriceFromAmountOutBRoundingDown, getNextSqrtPriceFromInput, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceChange, getPriceFromSqrtPrice, getPriceImpact, getRateLimiterParams, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapResultFromExactInput, getSwapResultFromExactOutput, getSwapResultFromPartialInput, getTokenDecimals, getTokenProgram, getTotalFeeNumerator, getTotalLockedLiquidity, getTotalTradingFeeFromExcludedFeeAmount, getTotalTradingFeeFromIncludedFeeAmount, getUnClaimReward, hasPartner, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toNumerator, unwrapSOLInstruction, validateFeeFraction, validateFeeRateLimiter, validateFeeScheduler, vestingByPositionFilter, wrapSOLInstruction };
15709
+ export { ActivationPoint, ActivationType, type AddLiquidityParams, type AmmProgram, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeHandler, BaseFeeMode, type BuildAddLiquidityParams, type BuildLiquidatePositionInstructionParams, type BuildRemoveAllLiquidityInstructionParams, CP_AMM_PROGRAM_ID, CURRENT_POOL_VERSION, type ClaimPartnerFeeParams, type ClaimPositionFeeInstructionParams, type ClaimPositionFeeParams, type ClaimPositionFeeParams2, type ClaimRewardParams, type ClosePositionInstructionParams, type ClosePositionParams, CollectFeeMode, type ConfigState, CpAmm, cp_amm as CpAmmIdl, type CpAmm$1 as CpAmmTypes, type CreatePoolParams, type CreatePositionAndAddLiquidity, type CreatePositionParams, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, DYNAMIC_FEE_ROUNDING_OFFSET, DYNAMIC_FEE_SCALING_FACTOR, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeScheduler, type FundRewardParams, type GetDepositQuoteParams, type GetQuote2Params, type GetQuoteParams, type GetWithdrawQuoteParams, type InitializeAndFundReward, type InitializeCustomizeablePoolParams, type InitializeCustomizeablePoolWithDynamicConfigParams, type InitializeRewardParams, LIQUIDITY_SCALE, type LiquidityDeltaParams, type LockPositionParams, MAX, MAX_CU_BUFFER, MAX_EXPONENTIAL, MAX_FEE_BPS_V0, MAX_FEE_BPS_V1, MAX_FEE_NUMERATOR_V0, MAX_FEE_NUMERATOR_V1, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_RATE_LIMITER_DURATION_IN_SECONDS, MAX_RATE_LIMITER_DURATION_IN_SLOTS, MAX_SQRT_PRICE, MIN_CU_BUFFER, MIN_FEE_BPS, MIN_FEE_NUMERATOR, MIN_SQRT_PRICE, type MergePositionParams, ONE_Q64, type PermanentLockParams, type PoolFeesParams, type PoolFeesStruct, type PoolState, PoolStatus, PoolVersion, type PositionState, type PrepareCustomizablePoolParams, type PreparePoolCreationParams, type PreparePoolCreationSingleSide, type PrepareTokenAccountParams, type PreparedPoolCreation, type Quote2Result, type RefreshVestingParams, type RemoveAllLiquidityAndClosePositionParams, type RemoveAllLiquidityParams, type RemoveLiquidityParams, type RewardInfo, Rounding, SCALE_OFFSET, SPLIT_POSITION_DENOMINATOR, type SetupFeeClaimAccountsParams, type SplitFees, type SplitPosition2Params, type SplitPositionParams, type Swap2Params, type SwapAmount, SwapMode, type SwapParams, type SwapResult, type SwapResult2, type TokenBadgeState, TradeDirection, type TxBuilder, U128_MAX, U16_MAX, U64_MAX, type UpdateRewardDurationParams, type UpdateRewardFunderParams, type UserRewardInfo, type VestingState, type WithdrawIneligibleRewardParams, type WithdrawQuote, bpsToFeeNumerator, calculateAtoBFromAmountIn, calculateAtoBFromAmountOut, calculateAtoBFromPartialAmountIn, calculateBtoAFromAmountIn, calculateBtoAFromAmountOut, calculateBtoAFromPartialAmountIn, calculateInitSqrtPrice, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, convertToFeeSchedulerSecondFactor, convertToLamports, convertToRateLimiterSecondFactor, decimalToQ64, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeNumerator, getBaseFeeNumeratorByPeriod, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, getMinBaseFeeNumerator, getNextSqrtPriceFromAmountInARoundingUp, getNextSqrtPriceFromAmountInBRoundingDown, getNextSqrtPriceFromAmountOutARoundingUp, getNextSqrtPriceFromAmountOutBRoundingDown, getNextSqrtPriceFromInput, getNextSqrtPriceFromOutput, getOrCreateATAInstruction, getPriceChange, getPriceFromSqrtPrice, getPriceImpact, getRateLimiterParams, getRewardInfo, getSecondKey, getSimulationComputeUnits, getSqrtPriceFromPrice, getSwapResultFromExactInput, getSwapResultFromExactOutput, getSwapResultFromPartialInput, getTokenDecimals, getTokenProgram, getTotalFeeNumerator, getTotalLockedLiquidity, getTotalTradingFeeFromExcludedFeeAmount, getTotalTradingFeeFromIncludedFeeAmount, getUnClaimLpFee, getUserRewardPending, hasPartner, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toNumerator, unwrapSOLInstruction, validateFeeFraction, validateFeeRateLimiter, validateFeeScheduler, vestingByPositionFilter, wrapSOLInstruction };