@meteora-ag/cp-amm-sdk 1.2.7 → 1.2.8-rc.0
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 +33 -48
- package/dist/index.d.ts +33 -48
- package/dist/index.js +74 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -76
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicKey, Transaction, Connection, TransactionInstruction, AddressLookupTableAccount, Commitment, GetProgramAccountsFilter } from '@solana/web3.js';
|
|
2
|
-
import { Program, IdlAccounts,
|
|
2
|
+
import { Program, IdlAccounts, IdlTypes, BN, BorshCoder } from '@coral-xyz/anchor';
|
|
3
3
|
import { Mint } from '@solana/spl-token';
|
|
4
4
|
import Decimal from 'decimal.js';
|
|
5
5
|
import BN$1 from 'bn.js';
|
|
@@ -6448,6 +6448,7 @@ type DynamicFeeStruct = IdlTypes<CpAmm$1>["dynamicFeeStruct"];
|
|
|
6448
6448
|
*/
|
|
6449
6449
|
type BaseFee = IdlTypes<CpAmm$1>["baseFeeParameters"];
|
|
6450
6450
|
type PoolFeesStruct = IdlTypes<CpAmm$1>["poolFeesStruct"];
|
|
6451
|
+
type DecodedPoolFees = PodAlignedFeeTimeScheduler | PodAlignedFeeRateLimiter | PodAlignedFeeMarketCapScheduler;
|
|
6451
6452
|
type PoolFeesParams = {
|
|
6452
6453
|
baseFee: BaseFee;
|
|
6453
6454
|
padding: number[];
|
|
@@ -6768,6 +6769,7 @@ type SwapParams = {
|
|
|
6768
6769
|
tokenAProgram: PublicKey;
|
|
6769
6770
|
tokenBProgram: PublicKey;
|
|
6770
6771
|
referralTokenAccount: PublicKey | null;
|
|
6772
|
+
receiver?: PublicKey;
|
|
6771
6773
|
poolState?: PoolState;
|
|
6772
6774
|
};
|
|
6773
6775
|
type Swap2Params = {
|
|
@@ -6782,6 +6784,7 @@ type Swap2Params = {
|
|
|
6782
6784
|
tokenAProgram: PublicKey;
|
|
6783
6785
|
tokenBProgram: PublicKey;
|
|
6784
6786
|
referralTokenAccount: PublicKey | null;
|
|
6787
|
+
receiver?: PublicKey;
|
|
6785
6788
|
poolState?: PoolState;
|
|
6786
6789
|
} & ({
|
|
6787
6790
|
swapMode: SwapMode.ExactIn;
|
|
@@ -7150,36 +7153,31 @@ declare class CpAmm {
|
|
|
7150
7153
|
publicKey: PublicKey;
|
|
7151
7154
|
account: PoolState;
|
|
7152
7155
|
}>>;
|
|
7153
|
-
fetchPoolFees(pool: PublicKey): Promise<
|
|
7154
|
-
cliffFeeNumerator: BN$1;
|
|
7155
|
-
baseFeeMode: number;
|
|
7156
|
-
padding: number[];
|
|
7157
|
-
numberOfPeriod: number;
|
|
7158
|
-
periodFrequency: BN$1;
|
|
7159
|
-
reductionFactor: BN$1;
|
|
7160
|
-
} | {
|
|
7161
|
-
cliffFeeNumerator: BN$1;
|
|
7162
|
-
baseFeeMode: number;
|
|
7163
|
-
padding: number[];
|
|
7164
|
-
numberOfPeriod: number;
|
|
7165
|
-
sqrtPriceStepBps: number;
|
|
7166
|
-
schedulerExpirationDuration: number;
|
|
7167
|
-
reductionFactor: BN$1;
|
|
7168
|
-
} | {
|
|
7169
|
-
cliffFeeNumerator: BN$1;
|
|
7170
|
-
baseFeeMode: number;
|
|
7171
|
-
padding: number[];
|
|
7172
|
-
feeIncrementBps: number;
|
|
7173
|
-
maxLimiterDuration: number;
|
|
7174
|
-
maxFeeBps: number;
|
|
7175
|
-
referenceAmount: BN$1;
|
|
7176
|
-
}>;
|
|
7156
|
+
fetchPoolFees(pool: PublicKey): Promise<DecodedPoolFees | null>;
|
|
7177
7157
|
/**
|
|
7178
7158
|
* Fetches the Position state.
|
|
7179
7159
|
* @param position - Public key of the position.
|
|
7180
7160
|
* @returns Parsed PositionState.
|
|
7181
7161
|
*/
|
|
7182
7162
|
fetchPositionState(position: PublicKey): Promise<PositionState>;
|
|
7163
|
+
/**
|
|
7164
|
+
* Fetches multiple Config states.
|
|
7165
|
+
* @param configs - Array of public keys of config accounts.
|
|
7166
|
+
* @returns Array of parsed ConfigState.
|
|
7167
|
+
*/
|
|
7168
|
+
getMultipleConfigs(configs: PublicKey[]): Promise<ConfigState[]>;
|
|
7169
|
+
/**
|
|
7170
|
+
* Fetches multiple Pool states.
|
|
7171
|
+
* @param pools - Array of public keys of pool accounts.
|
|
7172
|
+
* @returns Array of parsed PoolState.
|
|
7173
|
+
*/
|
|
7174
|
+
getMultiplePools(pools: PublicKey[]): Promise<PoolState[]>;
|
|
7175
|
+
/**
|
|
7176
|
+
* Fetches multiple Position states.
|
|
7177
|
+
* @param positions - Array of public keys of position accounts.
|
|
7178
|
+
* @returns Array of parsed PositionState.
|
|
7179
|
+
*/
|
|
7180
|
+
getMultiplePositions(positions: PublicKey[]): Promise<PositionState[]>;
|
|
7183
7181
|
/**
|
|
7184
7182
|
* Retrieves all config accounts.
|
|
7185
7183
|
* @returns Array of config public keys and their states.
|
|
@@ -8133,7 +8131,7 @@ declare function getTotalFeeNumerator(poolFees: PoolFeesStruct, baseFeeNumerator
|
|
|
8133
8131
|
* @param maxFeeNumerator - The max fee numerator
|
|
8134
8132
|
* @returns The total trading fee from included fee amount
|
|
8135
8133
|
*/
|
|
8136
|
-
declare function getTotalTradingFeeFromIncludedFeeAmount(
|
|
8134
|
+
declare function getTotalTradingFeeFromIncludedFeeAmount(poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, includedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
8137
8135
|
/**
|
|
8138
8136
|
* Gets the total trading fee from excluded fee amount
|
|
8139
8137
|
* @param poolFees - The pool fees
|
|
@@ -8144,7 +8142,7 @@ declare function getTotalTradingFeeFromIncludedFeeAmount(program: Program<CpAmm$
|
|
|
8144
8142
|
* @param maxFeeNumerator - The max fee numerator
|
|
8145
8143
|
* @returns The total trading fee from excluded fee amount
|
|
8146
8144
|
*/
|
|
8147
|
-
declare function getTotalTradingFeeFromExcludedFeeAmount(
|
|
8145
|
+
declare function getTotalTradingFeeFromExcludedFeeAmount(poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, excludedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
8148
8146
|
/**
|
|
8149
8147
|
* Splits the fees
|
|
8150
8148
|
* @param poolFees - The pool fees
|
|
@@ -8284,11 +8282,10 @@ declare class FeeMarketCapScheduler implements BaseFeeHandler {
|
|
|
8284
8282
|
}
|
|
8285
8283
|
/**
|
|
8286
8284
|
* Get base fee handler based on base fee mode
|
|
8287
|
-
* @param program Program instance
|
|
8288
8285
|
* @param rawData Raw data
|
|
8289
8286
|
* @returns Base fee handler instance
|
|
8290
8287
|
*/
|
|
8291
|
-
declare function getBaseFeeHandler(
|
|
8288
|
+
declare function getBaseFeeHandler(rawData: number[]): BaseFeeHandler;
|
|
8292
8289
|
|
|
8293
8290
|
/**
|
|
8294
8291
|
* Check if dynamic fee is enabled
|
|
@@ -8329,18 +8326,6 @@ declare function getFeeNumeratorOnExponentialFeeScheduler(cliffFeeNumerator: BN$
|
|
|
8329
8326
|
*/
|
|
8330
8327
|
declare function getMaxBaseFeeNumerator(cliffFeeNumerator: BN$1): BN$1;
|
|
8331
8328
|
|
|
8332
|
-
/**
|
|
8333
|
-
* Converts a BorshFeeTimeScheduler object to a PodAlignedFeeTimeScheduler object,
|
|
8334
|
-
* @param borshFeeScheduler The BorshFeeTimeScheduler instance to convert.
|
|
8335
|
-
* @returns The corresponding PodAlignedFeeTimeScheduler object.
|
|
8336
|
-
*/
|
|
8337
|
-
declare function toPodAlignedFeeTimeScheduler(borshFeeScheduler: BorshFeeTimeScheduler): PodAlignedFeeTimeScheduler;
|
|
8338
|
-
/**
|
|
8339
|
-
* Converts a PodAlignedFeeTimeScheduler object to a BorshFeeTimeScheduler object,
|
|
8340
|
-
* @param podAlignedFeeScheduler The PodAlignedFeeTimeScheduler instance to convert.
|
|
8341
|
-
* @returns The corresponding BorshFeeTimeScheduler object.
|
|
8342
|
-
*/
|
|
8343
|
-
declare function toBorshFeeTimeScheduler(podAlignedFeeScheduler: PodAlignedFeeTimeScheduler): BorshFeeTimeScheduler;
|
|
8344
8329
|
/**
|
|
8345
8330
|
* Gets the base fee numerator by period for the time fee scheduler.
|
|
8346
8331
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
@@ -8500,7 +8485,7 @@ declare function getFeeNumeratorFromExcludedFeeAmount(excludedFeeAmount: BN$1, r
|
|
|
8500
8485
|
* @param currentPoint - The current point
|
|
8501
8486
|
* @returns The swap result from exact input
|
|
8502
8487
|
*/
|
|
8503
|
-
declare function getSwapResultFromExactInput(
|
|
8488
|
+
declare function getSwapResultFromExactInput(poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8504
8489
|
/**
|
|
8505
8490
|
* Calculates the swap result from exact input
|
|
8506
8491
|
* @param poolState - The pool state
|
|
@@ -8532,7 +8517,7 @@ declare function calculateBtoAFromAmountIn(poolState: PoolState, amountIn: BN$1)
|
|
|
8532
8517
|
* @param currentPoint - The current point
|
|
8533
8518
|
* @returns The swap result from partial input
|
|
8534
8519
|
*/
|
|
8535
|
-
declare function getSwapResultFromPartialInput(
|
|
8520
|
+
declare function getSwapResultFromPartialInput(poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8536
8521
|
/**
|
|
8537
8522
|
* Calculates the swap result from partial input
|
|
8538
8523
|
* @param poolState - The pool state
|
|
@@ -8564,7 +8549,7 @@ declare function calculateBtoAFromPartialAmountIn(poolState: PoolState, amountIn
|
|
|
8564
8549
|
* @param currentPoint - The current point
|
|
8565
8550
|
* @returns The swap result from exact output
|
|
8566
8551
|
*/
|
|
8567
|
-
declare function getSwapResultFromExactOutput(
|
|
8552
|
+
declare function getSwapResultFromExactOutput(poolState: PoolState, amountOut: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8568
8553
|
/**
|
|
8569
8554
|
* Calculates the swap result from exact output
|
|
8570
8555
|
* @param poolState - The pool state
|
|
@@ -8599,7 +8584,7 @@ declare function calculateBtoAFromAmountOut(poolState: PoolState, amountOut: BN$
|
|
|
8599
8584
|
* @param outputTokenInfo - The output token info
|
|
8600
8585
|
* @returns The swap quote exact input
|
|
8601
8586
|
*/
|
|
8602
|
-
declare function swapQuoteExactInput(
|
|
8587
|
+
declare function swapQuoteExactInput(pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8603
8588
|
mint: Mint;
|
|
8604
8589
|
currentEpoch: number;
|
|
8605
8590
|
}, outputTokenInfo?: {
|
|
@@ -8620,7 +8605,7 @@ declare function swapQuoteExactInput(program: Program<CpAmm$1>, pool: PoolState,
|
|
|
8620
8605
|
* @param outputTokenInfo - The output token info
|
|
8621
8606
|
* @returns The swap quote exact output
|
|
8622
8607
|
*/
|
|
8623
|
-
declare function swapQuoteExactOutput(
|
|
8608
|
+
declare function swapQuoteExactOutput(pool: PoolState, currentPoint: BN$1, amountOut: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8624
8609
|
mint: Mint;
|
|
8625
8610
|
currentEpoch: number;
|
|
8626
8611
|
}, outputTokenInfo?: {
|
|
@@ -8641,7 +8626,7 @@ declare function swapQuoteExactOutput(program: Program<CpAmm$1>, pool: PoolState
|
|
|
8641
8626
|
* @param outputTokenInfo - The output token info
|
|
8642
8627
|
* @returns The swap quote partial input
|
|
8643
8628
|
*/
|
|
8644
|
-
declare function swapQuotePartialInput(
|
|
8629
|
+
declare function swapQuotePartialInput(pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8645
8630
|
mint: Mint;
|
|
8646
8631
|
currentEpoch: number;
|
|
8647
8632
|
}, outputTokenInfo?: {
|
|
@@ -16555,4 +16540,4 @@ var cp_amm = {
|
|
|
16555
16540
|
constants: constants
|
|
16556
16541
|
};
|
|
16557
16542
|
|
|
16558
|
-
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 BorshFeeMarketCapScheduler, type BorshFeeRateLimiter, type BorshFeeTimeScheduler, 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, FEE_PADDING, FeeMarketCapScheduler, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeTimeScheduler, 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 PodAlignedFeeMarketCapScheduler, type PodAlignedFeeRateLimiter, type PodAlignedFeeTimeScheduler, 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 SwapResult2, type TokenBadgeState, TradeDirection, type TransferHookState, 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, cpAmmCoder, decimalToQ64, decodeFeeMarketCapSchedulerParams, decodeFeeRateLimiterParams, decodeFeeTimeSchedulerParams, decodePodAlignedFeeMarketCapScheduler, decodePodAlignedFeeRateLimiter, decodePodAlignedFeeTimeScheduler, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, deriveOperatorAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, encodeFeeMarketCapSchedulerParams, encodeFeeRateLimiterParams, encodeFeeTimeSchedulerParams, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMarketCapBaseFeeNumerator, getFeeMarketCapBaseFeeNumeratorByPeriod, getFeeMarketCapMinBaseFeeNumerator, getFeeMarketCapSchedulerParams, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeTimeBaseFeeNumerator, getFeeTimeBaseFeeNumeratorByPeriod, getFeeTimeMinBaseFeeNumerator, getFeeTimeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, 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, hasTransferHookExtension, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput,
|
|
16543
|
+
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 BorshFeeMarketCapScheduler, type BorshFeeRateLimiter, type BorshFeeTimeScheduler, 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 DecodedPoolFees, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, FEE_PADDING, FeeMarketCapScheduler, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeTimeScheduler, 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 PodAlignedFeeMarketCapScheduler, type PodAlignedFeeRateLimiter, type PodAlignedFeeTimeScheduler, 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 SwapResult2, type TokenBadgeState, TradeDirection, type TransferHookState, 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, cpAmmCoder, decimalToQ64, decodeFeeMarketCapSchedulerParams, decodeFeeRateLimiterParams, decodeFeeTimeSchedulerParams, decodePodAlignedFeeMarketCapScheduler, decodePodAlignedFeeRateLimiter, decodePodAlignedFeeTimeScheduler, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, deriveOperatorAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, encodeFeeMarketCapSchedulerParams, encodeFeeRateLimiterParams, encodeFeeTimeSchedulerParams, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMarketCapBaseFeeNumerator, getFeeMarketCapBaseFeeNumeratorByPeriod, getFeeMarketCapMinBaseFeeNumerator, getFeeMarketCapSchedulerParams, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeTimeBaseFeeNumerator, getFeeTimeBaseFeeNumeratorByPeriod, getFeeTimeMinBaseFeeNumerator, getFeeTimeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, 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, hasTransferHookExtension, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toNumerator, unwrapSOLInstruction, validateFeeFraction, validateFeeMarketCapBaseFeeIsStatic, validateFeeMarketCapScheduler, validateFeeRateLimiter, validateFeeRateLimiterBaseFeeIsStatic, validateFeeTimeScheduler, validateFeeTimeSchedulerBaseFeeIsStatic, validateNoTransferHook, vestingByPositionFilter, wrapSOLInstruction };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicKey, Transaction, Connection, TransactionInstruction, AddressLookupTableAccount, Commitment, GetProgramAccountsFilter } from '@solana/web3.js';
|
|
2
|
-
import { Program, IdlAccounts,
|
|
2
|
+
import { Program, IdlAccounts, IdlTypes, BN, BorshCoder } from '@coral-xyz/anchor';
|
|
3
3
|
import { Mint } from '@solana/spl-token';
|
|
4
4
|
import Decimal from 'decimal.js';
|
|
5
5
|
import BN$1 from 'bn.js';
|
|
@@ -6448,6 +6448,7 @@ type DynamicFeeStruct = IdlTypes<CpAmm$1>["dynamicFeeStruct"];
|
|
|
6448
6448
|
*/
|
|
6449
6449
|
type BaseFee = IdlTypes<CpAmm$1>["baseFeeParameters"];
|
|
6450
6450
|
type PoolFeesStruct = IdlTypes<CpAmm$1>["poolFeesStruct"];
|
|
6451
|
+
type DecodedPoolFees = PodAlignedFeeTimeScheduler | PodAlignedFeeRateLimiter | PodAlignedFeeMarketCapScheduler;
|
|
6451
6452
|
type PoolFeesParams = {
|
|
6452
6453
|
baseFee: BaseFee;
|
|
6453
6454
|
padding: number[];
|
|
@@ -6768,6 +6769,7 @@ type SwapParams = {
|
|
|
6768
6769
|
tokenAProgram: PublicKey;
|
|
6769
6770
|
tokenBProgram: PublicKey;
|
|
6770
6771
|
referralTokenAccount: PublicKey | null;
|
|
6772
|
+
receiver?: PublicKey;
|
|
6771
6773
|
poolState?: PoolState;
|
|
6772
6774
|
};
|
|
6773
6775
|
type Swap2Params = {
|
|
@@ -6782,6 +6784,7 @@ type Swap2Params = {
|
|
|
6782
6784
|
tokenAProgram: PublicKey;
|
|
6783
6785
|
tokenBProgram: PublicKey;
|
|
6784
6786
|
referralTokenAccount: PublicKey | null;
|
|
6787
|
+
receiver?: PublicKey;
|
|
6785
6788
|
poolState?: PoolState;
|
|
6786
6789
|
} & ({
|
|
6787
6790
|
swapMode: SwapMode.ExactIn;
|
|
@@ -7150,36 +7153,31 @@ declare class CpAmm {
|
|
|
7150
7153
|
publicKey: PublicKey;
|
|
7151
7154
|
account: PoolState;
|
|
7152
7155
|
}>>;
|
|
7153
|
-
fetchPoolFees(pool: PublicKey): Promise<
|
|
7154
|
-
cliffFeeNumerator: BN$1;
|
|
7155
|
-
baseFeeMode: number;
|
|
7156
|
-
padding: number[];
|
|
7157
|
-
numberOfPeriod: number;
|
|
7158
|
-
periodFrequency: BN$1;
|
|
7159
|
-
reductionFactor: BN$1;
|
|
7160
|
-
} | {
|
|
7161
|
-
cliffFeeNumerator: BN$1;
|
|
7162
|
-
baseFeeMode: number;
|
|
7163
|
-
padding: number[];
|
|
7164
|
-
numberOfPeriod: number;
|
|
7165
|
-
sqrtPriceStepBps: number;
|
|
7166
|
-
schedulerExpirationDuration: number;
|
|
7167
|
-
reductionFactor: BN$1;
|
|
7168
|
-
} | {
|
|
7169
|
-
cliffFeeNumerator: BN$1;
|
|
7170
|
-
baseFeeMode: number;
|
|
7171
|
-
padding: number[];
|
|
7172
|
-
feeIncrementBps: number;
|
|
7173
|
-
maxLimiterDuration: number;
|
|
7174
|
-
maxFeeBps: number;
|
|
7175
|
-
referenceAmount: BN$1;
|
|
7176
|
-
}>;
|
|
7156
|
+
fetchPoolFees(pool: PublicKey): Promise<DecodedPoolFees | null>;
|
|
7177
7157
|
/**
|
|
7178
7158
|
* Fetches the Position state.
|
|
7179
7159
|
* @param position - Public key of the position.
|
|
7180
7160
|
* @returns Parsed PositionState.
|
|
7181
7161
|
*/
|
|
7182
7162
|
fetchPositionState(position: PublicKey): Promise<PositionState>;
|
|
7163
|
+
/**
|
|
7164
|
+
* Fetches multiple Config states.
|
|
7165
|
+
* @param configs - Array of public keys of config accounts.
|
|
7166
|
+
* @returns Array of parsed ConfigState.
|
|
7167
|
+
*/
|
|
7168
|
+
getMultipleConfigs(configs: PublicKey[]): Promise<ConfigState[]>;
|
|
7169
|
+
/**
|
|
7170
|
+
* Fetches multiple Pool states.
|
|
7171
|
+
* @param pools - Array of public keys of pool accounts.
|
|
7172
|
+
* @returns Array of parsed PoolState.
|
|
7173
|
+
*/
|
|
7174
|
+
getMultiplePools(pools: PublicKey[]): Promise<PoolState[]>;
|
|
7175
|
+
/**
|
|
7176
|
+
* Fetches multiple Position states.
|
|
7177
|
+
* @param positions - Array of public keys of position accounts.
|
|
7178
|
+
* @returns Array of parsed PositionState.
|
|
7179
|
+
*/
|
|
7180
|
+
getMultiplePositions(positions: PublicKey[]): Promise<PositionState[]>;
|
|
7183
7181
|
/**
|
|
7184
7182
|
* Retrieves all config accounts.
|
|
7185
7183
|
* @returns Array of config public keys and their states.
|
|
@@ -8133,7 +8131,7 @@ declare function getTotalFeeNumerator(poolFees: PoolFeesStruct, baseFeeNumerator
|
|
|
8133
8131
|
* @param maxFeeNumerator - The max fee numerator
|
|
8134
8132
|
* @returns The total trading fee from included fee amount
|
|
8135
8133
|
*/
|
|
8136
|
-
declare function getTotalTradingFeeFromIncludedFeeAmount(
|
|
8134
|
+
declare function getTotalTradingFeeFromIncludedFeeAmount(poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, includedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
8137
8135
|
/**
|
|
8138
8136
|
* Gets the total trading fee from excluded fee amount
|
|
8139
8137
|
* @param poolFees - The pool fees
|
|
@@ -8144,7 +8142,7 @@ declare function getTotalTradingFeeFromIncludedFeeAmount(program: Program<CpAmm$
|
|
|
8144
8142
|
* @param maxFeeNumerator - The max fee numerator
|
|
8145
8143
|
* @returns The total trading fee from excluded fee amount
|
|
8146
8144
|
*/
|
|
8147
|
-
declare function getTotalTradingFeeFromExcludedFeeAmount(
|
|
8145
|
+
declare function getTotalTradingFeeFromExcludedFeeAmount(poolFees: PoolFeesStruct, currentPoint: BN, activationPoint: BN, excludedFeeAmount: BN, tradeDirection: TradeDirection, maxFeeNumerator: BN, initSqrtPrice: BN, currentSqrtPrice: BN): BN;
|
|
8148
8146
|
/**
|
|
8149
8147
|
* Splits the fees
|
|
8150
8148
|
* @param poolFees - The pool fees
|
|
@@ -8284,11 +8282,10 @@ declare class FeeMarketCapScheduler implements BaseFeeHandler {
|
|
|
8284
8282
|
}
|
|
8285
8283
|
/**
|
|
8286
8284
|
* Get base fee handler based on base fee mode
|
|
8287
|
-
* @param program Program instance
|
|
8288
8285
|
* @param rawData Raw data
|
|
8289
8286
|
* @returns Base fee handler instance
|
|
8290
8287
|
*/
|
|
8291
|
-
declare function getBaseFeeHandler(
|
|
8288
|
+
declare function getBaseFeeHandler(rawData: number[]): BaseFeeHandler;
|
|
8292
8289
|
|
|
8293
8290
|
/**
|
|
8294
8291
|
* Check if dynamic fee is enabled
|
|
@@ -8329,18 +8326,6 @@ declare function getFeeNumeratorOnExponentialFeeScheduler(cliffFeeNumerator: BN$
|
|
|
8329
8326
|
*/
|
|
8330
8327
|
declare function getMaxBaseFeeNumerator(cliffFeeNumerator: BN$1): BN$1;
|
|
8331
8328
|
|
|
8332
|
-
/**
|
|
8333
|
-
* Converts a BorshFeeTimeScheduler object to a PodAlignedFeeTimeScheduler object,
|
|
8334
|
-
* @param borshFeeScheduler The BorshFeeTimeScheduler instance to convert.
|
|
8335
|
-
* @returns The corresponding PodAlignedFeeTimeScheduler object.
|
|
8336
|
-
*/
|
|
8337
|
-
declare function toPodAlignedFeeTimeScheduler(borshFeeScheduler: BorshFeeTimeScheduler): PodAlignedFeeTimeScheduler;
|
|
8338
|
-
/**
|
|
8339
|
-
* Converts a PodAlignedFeeTimeScheduler object to a BorshFeeTimeScheduler object,
|
|
8340
|
-
* @param podAlignedFeeScheduler The PodAlignedFeeTimeScheduler instance to convert.
|
|
8341
|
-
* @returns The corresponding BorshFeeTimeScheduler object.
|
|
8342
|
-
*/
|
|
8343
|
-
declare function toBorshFeeTimeScheduler(podAlignedFeeScheduler: PodAlignedFeeTimeScheduler): BorshFeeTimeScheduler;
|
|
8344
8329
|
/**
|
|
8345
8330
|
* Gets the base fee numerator by period for the time fee scheduler.
|
|
8346
8331
|
* @param cliffFeeNumerator - The cliff fee numerator.
|
|
@@ -8500,7 +8485,7 @@ declare function getFeeNumeratorFromExcludedFeeAmount(excludedFeeAmount: BN$1, r
|
|
|
8500
8485
|
* @param currentPoint - The current point
|
|
8501
8486
|
* @returns The swap result from exact input
|
|
8502
8487
|
*/
|
|
8503
|
-
declare function getSwapResultFromExactInput(
|
|
8488
|
+
declare function getSwapResultFromExactInput(poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8504
8489
|
/**
|
|
8505
8490
|
* Calculates the swap result from exact input
|
|
8506
8491
|
* @param poolState - The pool state
|
|
@@ -8532,7 +8517,7 @@ declare function calculateBtoAFromAmountIn(poolState: PoolState, amountIn: BN$1)
|
|
|
8532
8517
|
* @param currentPoint - The current point
|
|
8533
8518
|
* @returns The swap result from partial input
|
|
8534
8519
|
*/
|
|
8535
|
-
declare function getSwapResultFromPartialInput(
|
|
8520
|
+
declare function getSwapResultFromPartialInput(poolState: PoolState, amountIn: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8536
8521
|
/**
|
|
8537
8522
|
* Calculates the swap result from partial input
|
|
8538
8523
|
* @param poolState - The pool state
|
|
@@ -8564,7 +8549,7 @@ declare function calculateBtoAFromPartialAmountIn(poolState: PoolState, amountIn
|
|
|
8564
8549
|
* @param currentPoint - The current point
|
|
8565
8550
|
* @returns The swap result from exact output
|
|
8566
8551
|
*/
|
|
8567
|
-
declare function getSwapResultFromExactOutput(
|
|
8552
|
+
declare function getSwapResultFromExactOutput(poolState: PoolState, amountOut: BN$1, feeMode: FeeMode, tradeDirection: TradeDirection, currentPoint: BN$1): SwapResult2;
|
|
8568
8553
|
/**
|
|
8569
8554
|
* Calculates the swap result from exact output
|
|
8570
8555
|
* @param poolState - The pool state
|
|
@@ -8599,7 +8584,7 @@ declare function calculateBtoAFromAmountOut(poolState: PoolState, amountOut: BN$
|
|
|
8599
8584
|
* @param outputTokenInfo - The output token info
|
|
8600
8585
|
* @returns The swap quote exact input
|
|
8601
8586
|
*/
|
|
8602
|
-
declare function swapQuoteExactInput(
|
|
8587
|
+
declare function swapQuoteExactInput(pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8603
8588
|
mint: Mint;
|
|
8604
8589
|
currentEpoch: number;
|
|
8605
8590
|
}, outputTokenInfo?: {
|
|
@@ -8620,7 +8605,7 @@ declare function swapQuoteExactInput(program: Program<CpAmm$1>, pool: PoolState,
|
|
|
8620
8605
|
* @param outputTokenInfo - The output token info
|
|
8621
8606
|
* @returns The swap quote exact output
|
|
8622
8607
|
*/
|
|
8623
|
-
declare function swapQuoteExactOutput(
|
|
8608
|
+
declare function swapQuoteExactOutput(pool: PoolState, currentPoint: BN$1, amountOut: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8624
8609
|
mint: Mint;
|
|
8625
8610
|
currentEpoch: number;
|
|
8626
8611
|
}, outputTokenInfo?: {
|
|
@@ -8641,7 +8626,7 @@ declare function swapQuoteExactOutput(program: Program<CpAmm$1>, pool: PoolState
|
|
|
8641
8626
|
* @param outputTokenInfo - The output token info
|
|
8642
8627
|
* @returns The swap quote partial input
|
|
8643
8628
|
*/
|
|
8644
|
-
declare function swapQuotePartialInput(
|
|
8629
|
+
declare function swapQuotePartialInput(pool: PoolState, currentPoint: BN$1, amountIn: BN$1, slippage: number, aToB: boolean, hasReferral: boolean, tokenADecimal: number, tokenBDecimal: number, inputTokenInfo?: {
|
|
8645
8630
|
mint: Mint;
|
|
8646
8631
|
currentEpoch: number;
|
|
8647
8632
|
}, outputTokenInfo?: {
|
|
@@ -16555,4 +16540,4 @@ var cp_amm = {
|
|
|
16555
16540
|
constants: constants
|
|
16556
16541
|
};
|
|
16557
16542
|
|
|
16558
|
-
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 BorshFeeMarketCapScheduler, type BorshFeeRateLimiter, type BorshFeeTimeScheduler, 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, FEE_PADDING, FeeMarketCapScheduler, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeTimeScheduler, 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 PodAlignedFeeMarketCapScheduler, type PodAlignedFeeRateLimiter, type PodAlignedFeeTimeScheduler, 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 SwapResult2, type TokenBadgeState, TradeDirection, type TransferHookState, 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, cpAmmCoder, decimalToQ64, decodeFeeMarketCapSchedulerParams, decodeFeeRateLimiterParams, decodeFeeTimeSchedulerParams, decodePodAlignedFeeMarketCapScheduler, decodePodAlignedFeeRateLimiter, decodePodAlignedFeeTimeScheduler, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, deriveOperatorAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, encodeFeeMarketCapSchedulerParams, encodeFeeRateLimiterParams, encodeFeeTimeSchedulerParams, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMarketCapBaseFeeNumerator, getFeeMarketCapBaseFeeNumeratorByPeriod, getFeeMarketCapMinBaseFeeNumerator, getFeeMarketCapSchedulerParams, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeTimeBaseFeeNumerator, getFeeTimeBaseFeeNumeratorByPeriod, getFeeTimeMinBaseFeeNumerator, getFeeTimeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, 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, hasTransferHookExtension, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput,
|
|
16543
|
+
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 BorshFeeMarketCapScheduler, type BorshFeeRateLimiter, type BorshFeeTimeScheduler, 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 DecodedPoolFees, type DepositQuote, type DynamicFee, type DynamicFeeParams, type DynamicFeeStruct, FEE_DENOMINATOR, FEE_PADDING, FeeMarketCapScheduler, type FeeMode, type FeeOnAmountResult, FeeRateLimiter, FeeTimeScheduler, 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 PodAlignedFeeMarketCapScheduler, type PodAlignedFeeRateLimiter, type PodAlignedFeeTimeScheduler, 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 SwapResult2, type TokenBadgeState, TradeDirection, type TransferHookState, 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, cpAmmCoder, decimalToQ64, decodeFeeMarketCapSchedulerParams, decodeFeeRateLimiterParams, decodeFeeTimeSchedulerParams, decodePodAlignedFeeMarketCapScheduler, decodePodAlignedFeeRateLimiter, decodePodAlignedFeeTimeScheduler, deriveClaimFeeOperatorAddress, deriveConfigAddress, deriveCustomizablePoolAddress, deriveOperatorAddress, derivePoolAddress, derivePoolAuthority, derivePositionAddress, derivePositionNftAccount, deriveRewardVaultAddress, deriveTokenBadgeAddress, deriveTokenVaultAddress, encodeFeeMarketCapSchedulerParams, encodeFeeRateLimiterParams, encodeFeeTimeSchedulerParams, feeNumeratorToBps, fromDecimalToBN, getAllPositionNftAccountByOwner, getAllUserPositionNftAccount, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta, getAmountWithSlippage, getAvailableVestingLiquidity, getBaseFeeHandler, getBaseFeeParams, getCheckedAmounts, getCurrentPoint, getDynamicFeeNumerator, getDynamicFeeParams, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExcludedFeeAmountFromIncludedFeeAmount, getFeeInPeriod, getFeeMarketCapBaseFeeNumerator, getFeeMarketCapBaseFeeNumeratorByPeriod, getFeeMarketCapMinBaseFeeNumerator, getFeeMarketCapSchedulerParams, getFeeMode, getFeeNumeratorFromExcludedFeeAmount, getFeeNumeratorFromIncludedFeeAmount, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeOnAmount, getFeeTimeBaseFeeNumerator, getFeeTimeBaseFeeNumeratorByPeriod, getFeeTimeMinBaseFeeNumerator, getFeeTimeSchedulerParams, getFirstKey, getIncludedFeeAmount, getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getMaxAmountWithSlippage, getMaxBaseFeeNumerator, getMaxFeeBps, getMaxFeeNumerator, getMaxIndex, 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, hasTransferHookExtension, isDynamicFeeEnabled, isNonZeroRateLimiter, isRateLimiterApplied, isSwapEnabled, isVestingComplete, isZeroRateLimiter, mulDiv, offsetBasedFilter, parseFeeSchedulerSecondFactor, parseRateLimiterSecondFactor, positionByPoolFilter, pow, q64ToDecimal, splitFees, sqrt, swapQuoteExactInput, swapQuoteExactOutput, swapQuotePartialInput, toNumerator, unwrapSOLInstruction, validateFeeFraction, validateFeeMarketCapBaseFeeIsStatic, validateFeeMarketCapScheduler, validateFeeRateLimiter, validateFeeRateLimiterBaseFeeIsStatic, validateFeeTimeScheduler, validateFeeTimeSchedulerBaseFeeIsStatic, validateNoTransferHook, vestingByPositionFilter, wrapSOLInstruction };
|