@meteora-ag/dynamic-bonding-curve-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.cts CHANGED
@@ -3101,6 +3101,21 @@ type DynamicBondingCurve = {
3101
3101
  code: 6040;
3102
3102
  name: 'migrationFeeHasBeenWithdraw';
3103
3103
  msg: 'Migration fee has been withdraw';
3104
+ },
3105
+ {
3106
+ code: 6041;
3107
+ name: 'invalidBaseFeeMode';
3108
+ msg: 'Invalid base fee mode';
3109
+ },
3110
+ {
3111
+ code: 6042;
3112
+ name: 'invalidFeeRateLimiter';
3113
+ msg: 'Invalid fee rate limiter';
3114
+ },
3115
+ {
3116
+ code: 6043;
3117
+ name: 'failToValidateSingleSwapInstruction';
3118
+ msg: 'Fail to validate single swap instruction in rate limiter';
3104
3119
  }
3105
3120
  ];
3106
3121
  types: [
@@ -3118,19 +3133,19 @@ type DynamicBondingCurve = {
3118
3133
  type: 'u64';
3119
3134
  },
3120
3135
  {
3121
- name: 'periodFrequency';
3136
+ name: 'secondFactor';
3122
3137
  type: 'u64';
3123
3138
  },
3124
3139
  {
3125
- name: 'reductionFactor';
3140
+ name: 'thirdFactor';
3126
3141
  type: 'u64';
3127
3142
  },
3128
3143
  {
3129
- name: 'numberOfPeriod';
3144
+ name: 'firstFactor';
3130
3145
  type: 'u16';
3131
3146
  },
3132
3147
  {
3133
- name: 'feeSchedulerMode';
3148
+ name: 'baseFeeMode';
3134
3149
  type: 'u8';
3135
3150
  },
3136
3151
  {
@@ -3152,19 +3167,19 @@ type DynamicBondingCurve = {
3152
3167
  type: 'u64';
3153
3168
  },
3154
3169
  {
3155
- name: 'numberOfPeriod';
3170
+ name: 'firstFactor';
3156
3171
  type: 'u16';
3157
3172
  },
3158
3173
  {
3159
- name: 'periodFrequency';
3174
+ name: 'secondFactor';
3160
3175
  type: 'u64';
3161
3176
  },
3162
3177
  {
3163
- name: 'reductionFactor';
3178
+ name: 'thirdFactor';
3164
3179
  type: 'u64';
3165
3180
  },
3166
3181
  {
3167
- name: 'feeSchedulerMode';
3182
+ name: 'baseFeeMode';
3168
3183
  type: 'u8';
3169
3184
  }
3170
3185
  ];
@@ -5043,9 +5058,10 @@ declare enum GetFeeMode {
5043
5058
  QuoteToken = 0,
5044
5059
  OutputToken = 1
5045
5060
  }
5046
- declare enum FeeSchedulerMode {
5047
- Linear = 0,
5048
- Exponential = 1
5061
+ declare enum BaseFeeMode {
5062
+ FeeSchedulerLinear = 0,
5063
+ FeeSchedulerExponential = 1,
5064
+ RateLimiter = 2
5049
5065
  }
5050
5066
  declare enum MigrationFeeOption {
5051
5067
  FixedBps25 = 0,
@@ -5082,18 +5098,23 @@ type CreateDammV1MigrationMetadataParam = {
5082
5098
  type CreateDammV2MigrationMetadataParam = CreateDammV1MigrationMetadataParam;
5083
5099
  type BaseFee = {
5084
5100
  cliffFeeNumerator: BN;
5085
- numberOfPeriod: number;
5086
- periodFrequency: BN;
5087
- reductionFactor: BN;
5088
- feeSchedulerMode: FeeSchedulerMode;
5101
+ firstFactor: number;
5102
+ secondFactor: BN;
5103
+ thirdFactor: BN;
5104
+ baseFeeMode: BaseFeeMode;
5089
5105
  };
5090
5106
  type FeeSchedulerParams = {
5091
5107
  startingFeeBps: number;
5092
5108
  endingFeeBps: number;
5093
5109
  numberOfPeriod: number;
5094
- feeSchedulerMode: FeeSchedulerMode;
5095
5110
  totalDuration: number;
5096
5111
  };
5112
+ type RateLimiterParams = {
5113
+ baseFeeBps: number;
5114
+ feeIncrementBps: number;
5115
+ referenceAmount: number;
5116
+ maxLimiterDuration: number;
5117
+ };
5097
5118
  type LockedVestingParams = {
5098
5119
  totalLockedVestingAmount: number;
5099
5120
  numberOfVestingPeriod: number;
@@ -5101,13 +5122,20 @@ type LockedVestingParams = {
5101
5122
  totalVestingDuration: number;
5102
5123
  cliffDurationFromMigrationTime: number;
5103
5124
  };
5125
+ type BaseFeeParams = {
5126
+ baseFeeMode: BaseFeeMode.FeeSchedulerLinear | BaseFeeMode.FeeSchedulerExponential;
5127
+ feeSchedulerParam: FeeSchedulerParams;
5128
+ } | {
5129
+ baseFeeMode: BaseFeeMode.RateLimiter;
5130
+ rateLimiterParam: RateLimiterParams;
5131
+ };
5104
5132
  type BuildCurveBaseParam = {
5105
5133
  totalTokenSupply: number;
5106
5134
  migrationOption: MigrationOption;
5107
5135
  tokenBaseDecimal: TokenDecimal;
5108
5136
  tokenQuoteDecimal: TokenDecimal;
5109
5137
  lockedVestingParam: LockedVestingParams;
5110
- feeSchedulerParam: FeeSchedulerParams;
5138
+ baseFeeParams: BaseFeeParams;
5111
5139
  dynamicFeeEnabled: boolean;
5112
5140
  activationType: ActivationType;
5113
5141
  collectFeeMode: CollectFeeMode;
@@ -5205,6 +5233,11 @@ type SwapQuoteParam = {
5205
5233
  hasReferral: boolean;
5206
5234
  currentPoint: BN;
5207
5235
  };
5236
+ type SwapQuoteExactInParam = {
5237
+ virtualPool: VirtualPool;
5238
+ config: PoolConfig;
5239
+ currentPoint: BN;
5240
+ };
5208
5241
  type MigrateToDammV1Param = {
5209
5242
  payer: PublicKey;
5210
5243
  virtualPool: PublicKey;
@@ -5483,6 +5516,9 @@ declare class PoolService extends DynamicBondingCurveProgram {
5483
5516
  * @returns The swap quote result
5484
5517
  */
5485
5518
  swapQuote(swapQuoteParam: SwapQuoteParam): Promise<QuoteResult>;
5519
+ swapQuoteExactIn(swapQuoteExactInParam: SwapQuoteExactInParam): {
5520
+ exactAmountIn: BN$1;
5521
+ };
5486
5522
  }
5487
5523
 
5488
5524
  declare class MigrationService extends DynamicBondingCurveProgram {
@@ -5806,12 +5842,17 @@ declare const MAX_SQRT_PRICE: BN$1;
5806
5842
  declare const RESOLUTION = 64;
5807
5843
  declare const ONE_Q64: BN$1;
5808
5844
  declare const FEE_DENOMINATOR = 1000000000;
5809
- declare const MAX_FEE_NUMERATOR = 500000000;
5845
+ declare const MAX_FEE_BPS = 9900;
5846
+ declare const MIN_FEE_BPS = 1;
5847
+ declare const MIN_FEE_NUMERATOR = 100000;
5848
+ declare const MAX_FEE_NUMERATOR = 990000000;
5810
5849
  declare const BASIS_POINT_MAX = 10000;
5811
5850
  declare const MAX_CURVE_POINT = 16;
5812
5851
  declare const PARTNER_SURPLUS_SHARE = 80;
5813
5852
  declare const SWAP_BUFFER_PERCENTAGE = 25;
5814
5853
  declare const MAX_SWALLOW_PERCENTAGE = 20;
5854
+ declare const MAX_RATE_LIMITER_DURATION_IN_SECONDS = 43200;
5855
+ declare const MAX_RATE_LIMITER_DURATION_IN_SLOTS = 108000;
5815
5856
  declare const SLOT_DURATION = 400;
5816
5857
  declare const TIMESTAMP_DURATION = 1000;
5817
5858
  declare const DYNAMIC_BONDING_CURVE_PROGRAM_ID: PublicKey;
@@ -6017,25 +6058,36 @@ declare const getPercentageSupplyOnMigration: (initialMarketCap: Decimal, migrat
6017
6058
  */
6018
6059
  declare const getMigrationQuoteAmount: (migrationMarketCap: Decimal, percentageSupplyOnMigration: Decimal) => Decimal;
6019
6060
  /**
6020
- * Calculates base fee parameters for a fee scheduler system.
6021
- * @param {number} maxBaseFeeBps - Maximum fee in basis points
6022
- * @param {number} minBaseFeeBps - Minimum fee in basis points
6023
- * @param {FeeSchedulerMode} feeSchedulerMode - Mode for fee reduction (Linear or Exponential)
6061
+ * Get the fee scheduler parameters
6062
+ * @param {number} startingBaseFeeBps - Starting fee in basis points
6063
+ * @param {number} endingBaseFeeBps - Ending fee in basis points
6064
+ * @param {BaseFeeMode} baseFeeMode - Mode for fee reduction (Linear or Exponential)
6024
6065
  * @param {number} numberOfPeriod - Number of periods over which to schedule fee reduction
6025
- * @param {BN} periodFrequency - Time interval between fee reductions
6066
+ * @param {BN} totalDuration - Total duration of the fee scheduler
6026
6067
  *
6027
6068
  * @returns {BaseFee}
6028
6069
  */
6029
- declare function getBaseFeeParams(startingBaseFeeBps: number, endingBaseFeeBps: number, feeSchedulerMode: FeeSchedulerMode, numberOfPeriod: number, totalDuration: number): BaseFee;
6070
+ declare function getFeeSchedulerParams(startingBaseFeeBps: number, endingBaseFeeBps: number, baseFeeMode: BaseFeeMode, numberOfPeriod: number, totalDuration: number): BaseFee;
6030
6071
  /**
6031
- * Get the minimum base fee in basis points
6072
+ * Calculate the ending base fee of fee scheduler in basis points
6032
6073
  * @param cliffFeeNumerator - The cliff fee numerator
6033
6074
  * @param numberOfPeriod - The number of period
6034
6075
  * @param reductionFactor - The reduction factor
6035
6076
  * @param feeSchedulerMode - The fee scheduler mode
6036
6077
  * @returns The minimum base fee in basis points
6037
6078
  */
6038
- declare function getMinBaseFeeBps(cliffFeeNumerator: number, numberOfPeriod: number, reductionFactor: number, feeSchedulerMode: FeeSchedulerMode): number;
6079
+ declare function calculateFeeSchedulerEndingBaseFeeBps(cliffFeeNumerator: number, numberOfPeriod: number, reductionFactor: number, baseFeeMode: BaseFeeMode): number;
6080
+ /**
6081
+ * Get the rate limiter parameters
6082
+ * @param baseFeeBps - The base fee in basis points
6083
+ * @param feeIncrementBps - The fee increment in basis points
6084
+ * @param referenceAmount - The reference amount
6085
+ * @param maxLimiterDuration - The max rate limiter duration
6086
+ * @param tokenQuoteDecimal - The token quote decimal
6087
+ * @param activationType - The activation type
6088
+ * @returns The rate limiter parameters
6089
+ */
6090
+ declare function getRateLimiterParams(baseFeeBps: number, feeIncrementBps: number, referenceAmount: number, maxLimiterDuration: number, tokenQuoteDecimal: TokenDecimal, activationType: ActivationType): BaseFee;
6039
6091
  /**
6040
6092
  * Get the dynamic fee parameters (20% of base fee)
6041
6093
  * @param baseFeeBps - The base fee in basis points
@@ -6077,6 +6129,38 @@ declare const getTwoCurve: (migrationSqrtPrice: BN$1, midSqrtPrice: BN$1, initia
6077
6129
  liquidity: BN$1;
6078
6130
  }[];
6079
6131
  };
6132
+ /**
6133
+ * Check if rate limiter should be applied based on pool configuration and state
6134
+ * @param baseFeeMode - The base fee mode
6135
+ * @param swapBaseForQuote - Whether the swap is from base to quote
6136
+ * @param currentPoint - The current point
6137
+ * @param activationPoint - The activation point
6138
+ * @param maxLimiterDuration - The maximum limiter duration
6139
+ * @returns Whether rate limiter should be applied
6140
+ */
6141
+ declare function checkRateLimiterApplied(baseFeeMode: BaseFeeMode, swapBaseForQuote: boolean, currentPoint: BN$1, activationPoint: BN$1, maxLimiterDuration: BN$1): boolean;
6142
+ /**
6143
+ * Get base fee parameters based on the base fee mode
6144
+ * @param baseFeeParams - The base fee parameters
6145
+ * @param tokenQuoteDecimal - The token quote decimal
6146
+ * @param activationType - The activation type
6147
+ * @returns The base fee parameters
6148
+ */
6149
+ declare function getBaseFeeParams(baseFeeParams: {
6150
+ baseFeeMode: BaseFeeMode;
6151
+ rateLimiterParam?: {
6152
+ baseFeeBps: number;
6153
+ feeIncrementBps: number;
6154
+ referenceAmount: number;
6155
+ maxLimiterDuration: number;
6156
+ };
6157
+ feeSchedulerParam?: {
6158
+ startingFeeBps: number;
6159
+ endingFeeBps: number;
6160
+ numberOfPeriod: number;
6161
+ totalDuration: number;
6162
+ };
6163
+ }, tokenQuoteDecimal: TokenDecimal, activationType: ActivationType): BaseFee;
6080
6164
 
6081
6165
  /**
6082
6166
  * Derive DBC event authority
@@ -6327,9 +6411,25 @@ declare function feeNumeratorToBps(feeNumerator: BN$1): number;
6327
6411
  /**
6328
6412
  * Validate the pool fees
6329
6413
  * @param poolFees - The pool fees
6414
+ * @param collectFeeMode - The collect fee mode
6415
+ * @param activationType - The activation type
6330
6416
  * @returns true if the pool fees are valid, false otherwise
6331
6417
  */
6332
- declare function validatePoolFees(poolFees: any): boolean;
6418
+ declare function validatePoolFees(poolFees: PoolFeeParameters, collectFeeMode: CollectFeeMode, activationType: ActivationType): boolean;
6419
+ /**
6420
+ * Validate the fee scheduler parameters
6421
+ * @param feeScheduler - The fee scheduler parameters
6422
+ * @returns true if the fee scheduler parameters are valid, false otherwise
6423
+ */
6424
+ declare function validateFeeScheduler(feeScheduler: BaseFee): boolean;
6425
+ /**
6426
+ * Validate the fee rate limiter parameters
6427
+ * @param feeRateLimiter - The fee rate limiter parameters
6428
+ * @param collectFeeMode - The collect fee mode
6429
+ * @param activationType - The activation type
6430
+ * @returns true if the fee rate limiter parameters are valid, false otherwise
6431
+ */
6432
+ declare function validateFeeRateLimiter(feeRateLimiter: BaseFee, collectFeeMode: CollectFeeMode, activationType: ActivationType): boolean;
6333
6433
  /**
6334
6434
  * Validate the collect fee mode
6335
6435
  * @param collectFeeMode - The collect fee mode
@@ -6390,7 +6490,10 @@ declare function validateCurve(curve: Array<{
6390
6490
  * @param swapBaseAmountBuffer - The swap base amount buffer
6391
6491
  * @returns true if the token supply is valid, false otherwise
6392
6492
  */
6393
- declare function validateTokenSupply(tokenSupply: any, leftoverReceiver: PublicKey, swapBaseAmount: BN$1, migrationBaseAmount: BN$1, lockedVesting: any, swapBaseAmountBuffer: BN$1): boolean;
6493
+ declare function validateTokenSupply(tokenSupply: {
6494
+ preMigrationTokenSupply: BN$1;
6495
+ postMigrationTokenSupply: BN$1;
6496
+ }, leftoverReceiver: PublicKey, swapBaseAmount: BN$1, migrationBaseAmount: BN$1, lockedVesting: LockedVestingParameters, swapBaseAmountBuffer: BN$1): boolean;
6394
6497
  /**
6395
6498
  * Validate the update authority option
6396
6499
  * @param option - The update authority option
@@ -13344,30 +13447,31 @@ declare function getInitialLiquidityFromDeltaBase(baseAmount: BN$1, sqrtMaxPrice
13344
13447
  */
13345
13448
  declare function getInitializeAmounts(sqrtMinPrice: BN$1, sqrtMaxPrice: BN$1, sqrtPrice: BN$1, liquidity: BN$1): [BN$1, BN$1];
13346
13449
 
13347
- /**
13348
- * Get fee in period for exponential fee scheduler
13349
- * @param cliffFeeNumerator Cliff fee numerator
13350
- * @param reductionFactor Reduction factor
13351
- * @param period Period
13352
- * @returns Fee numerator
13353
- */
13354
- declare function getFeeInPeriod(cliffFeeNumerator: BN$1, reductionFactor: BN$1, period: number): BN$1;
13355
13450
  /**
13356
13451
  * Get current base fee numerator
13357
13452
  * @param baseFee Base fee parameters
13453
+ * @param tradeDirection Trade direction
13358
13454
  * @param currentPoint Current point
13359
13455
  * @param activationPoint Activation point
13456
+ * @param inputAmount Input amount (optional, used for rate limiter)
13360
13457
  * @returns Current base fee numerator
13361
13458
  */
13362
- declare function getCurrentBaseFeeNumerator(baseFee: {
13459
+ declare function getBaseFeeNumerator(baseFee: {
13363
13460
  cliffFeeNumerator: BN$1;
13364
- feeSchedulerMode: number;
13365
- numberOfPeriod: number;
13366
- periodFrequency: BN$1;
13367
- reductionFactor: BN$1;
13368
- }, currentPoint: BN$1, activationPoint: BN$1): BN$1;
13461
+ firstFactor: number;
13462
+ secondFactor: BN$1;
13463
+ thirdFactor: BN$1;
13464
+ baseFeeMode: BaseFeeMode;
13465
+ }, tradeDirection: TradeDirection, currentPoint: BN$1, activationPoint: BN$1, inputAmount?: BN$1): BN$1;
13466
+ /**
13467
+ * Get variable fee from dynamic fee
13468
+ * @param dynamicFee Dynamic fee parameters
13469
+ * @param volatilityTracker Volatility tracker
13470
+ * @returns Variable fee
13471
+ */
13472
+ declare function getVariableFee(dynamicFee: DynamicFeeConfig, volatilityTracker: VolatilityTracker): BN$1;
13369
13473
  /**
13370
- * Get fee on amount
13474
+ * Get fee on amount for rate limiter
13371
13475
  * @param amount Amount
13372
13476
  * @param poolFees Pool fees
13373
13477
  * @param isReferral Whether referral is used
@@ -13376,14 +13480,7 @@ declare function getCurrentBaseFeeNumerator(baseFee: {
13376
13480
  * @param volatilityTracker Volatility tracker
13377
13481
  * @returns Fee on amount result
13378
13482
  */
13379
- declare function getFeeOnAmount(amount: BN$1, poolFees: PoolFeesConfig, isReferral: boolean, currentPoint: BN$1, activationPoint: BN$1, volatilityTracker: VolatilityTracker): FeeOnAmountResult;
13380
- /**
13381
- * Get variable fee from dynamic fee
13382
- * @param dynamicFee Dynamic fee parameters
13383
- * @param volatilityTracker Volatility tracker
13384
- * @returns Variable fee
13385
- */
13386
- declare function getVariableFee(dynamicFee: DynamicFeeConfig, volatilityTracker: VolatilityTracker): BN$1;
13483
+ declare function getFeeOnAmount(amount: BN$1, poolFees: PoolFeesConfig, isReferral: boolean, currentPoint: BN$1, activationPoint: BN$1, volatilityTracker: VolatilityTracker, tradeDirection: TradeDirection): FeeOnAmountResult;
13387
13484
 
13388
13485
  /**
13389
13486
  * Get swap result
@@ -13443,5 +13540,42 @@ declare function getFeeMode(collectFeeMode: GetFeeMode, tradeDirection: TradeDir
13443
13540
  * @returns Swap quote result
13444
13541
  */
13445
13542
  declare function swapQuote(virtualPool: VirtualPool, config: PoolConfig, swapBaseForQuote: boolean, amountIn: BN$1, slippageBps: number, hasReferral: boolean, currentPoint: BN$1): Promise<QuoteResult>;
13543
+ /**
13544
+ * Calculate the required quote amount for exact input
13545
+ * @param migrationQuoteThreshold Migration quote threshold
13546
+ * @param quoteReserve Current quote reserve
13547
+ * @param collectFeeMode Fee collection mode
13548
+ * @param config Pool config state
13549
+ * @param currentPoint Current point
13550
+ * @returns Required quote amount
13551
+ */
13552
+ declare function calculateQuoteExactInAmount(config: PoolConfig, virtualPool: VirtualPool, currentPoint: BN$1): BN$1;
13553
+
13554
+ /**
13555
+ * Get fee in period for linear fee scheduler
13556
+ * @param cliffFeeNumerator Cliff fee numerator
13557
+ * @param reductionFactor Reduction factor
13558
+ * @param period Period
13559
+ * @returns Fee numerator
13560
+ */
13561
+ declare function getFeeNumeratorOnLinearFeeScheduler(cliffFeeNumerator: BN$1, reductionFactor: BN$1, period: number): BN$1;
13562
+ /**
13563
+ * Get fee in period for exponential fee scheduler
13564
+ * @param cliffFeeNumerator Cliff fee numerator
13565
+ * @param reductionFactor Reduction factor
13566
+ * @param period Period
13567
+ * @returns Fee numerator
13568
+ */
13569
+ declare function getFeeNumeratorOnExponentialFeeScheduler(cliffFeeNumerator: BN$1, reductionFactor: BN$1, period: number): BN$1;
13570
+
13571
+ /**
13572
+ * Calculate the fee numerator on rate limiter
13573
+ * @param cliffFeeNumerator - The cliff fee numerator
13574
+ * @param referenceAmount - The reference amount
13575
+ * @param feeIncrementBps - The fee increment bps
13576
+ * @param inputAmount - The input amount
13577
+ * @returns The fee numerator
13578
+ */
13579
+ declare function getFeeNumeratorOnRateLimiter(cliffFeeNumerator: BN$1, referenceAmount: BN$1, feeIncrementBps: BN$1, inputAmount: BN$1): BN$1;
13446
13580
 
13447
- export { ActivationType, BASE_ADDRESS, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeConfig, type BuildCurveBaseParam, type BuildCurveParam, type BuildCurveWithLiquidityWeightsParam, type BuildCurveWithMarketCapParam, type BuildCurveWithTwoSegmentsParam, type ClaimCreatorTradingFee2Param, type ClaimCreatorTradingFeeAccounts, type ClaimCreatorTradingFeeParam, type ClaimCreatorTradingFeeWithQuoteMintNotSolParam, type ClaimCreatorTradingFeeWithQuoteMintSolParam, type ClaimFeeOperator, type ClaimPartnerTradingFeeWithQuoteMintNotSolParam, type ClaimPartnerTradingFeeWithQuoteMintSolParam, type ClaimProtocolFeeAccounts, type ClaimTradingFee2Param, type ClaimTradingFeeAccounts, type ClaimTradingFeeParam, type CloseClaimFeeOperatorAccounts, CollectFeeMode, type Config, type ConfigParameters, type CreateClaimFeeOperatorAccounts, type CreateConfigAccounts, type CreateConfigAndPoolParam, type CreateConfigAndPoolWithFirstBuyParam, type CreateConfigParam, type CreateDammV1MigrationMetadataParam, type CreateDammV2MigrationMetadataParam, type CreateLockerAccounts, type CreateLockerParam, type CreatePartnerMetadata, type CreatePartnerMetadataParam, type CreatePartnerMetadataParameters, type CreatePoolParam, type CreatePoolWithFirstBuyParam, type CreateVirtualPoolMetadata, type CreateVirtualPoolMetadataParam, type CreateVirtualPoolMetadataParameters, CreatorService, type CreatorWithdrawSurplusAccounts, type CreatorWithdrawSurplusParam, DAMM_V1_MIGRATION_FEE_ADDRESS, DAMM_V1_PROGRAM_ID, DAMM_V2_MIGRATION_FEE_ADDRESS, DAMM_V2_PROGRAM_ID, DYNAMIC_BONDING_CURVE_PROGRAM_ID, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, type DammLpTokenParam, DynamicBondingCurveClient, DynamicBondingCurveProgram, type DynamicFeeConfig, type DynamicFeeParameters, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, type FeeResult, FeeSchedulerMode, type FeeSchedulerParams, GetFeeMode, type InitializePoolBaseParam, type InitializePoolParameters, type InitializeVirtualPoolWithSplTokenAccounts, type InitializeVirtualPoolWithToken2022Accounts, LOCKER_PROGRAM_ID, type LiquidityDistributionParameters, type LockEscrow, type LockedVestingParameters, type LockedVestingParams, MAX_CURVE_POINT, MAX_FEE_NUMERATOR, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_SQRT_PRICE, MAX_SWALLOW_PERCENTAGE, METAPLEX_PROGRAM_ID, MIN_SQRT_PRICE, type MeteoraDammMigrationMetadata, type MeteoraDammV2MigrationMetadata, type MigrateMeteoraDammAccounts, type MigrateMeteoraDammClaimLpTokenAccounts, type MigrateMeteoraDammLockLpTokenAccounts, type MigrateToDammV1Param, type MigrateToDammV2Param, type MigrateToDammV2Response, type MigrationDammV2Accounts, type MigrationDammV2CreateMetadataAccounts, MigrationFeeOption, type MigrationMeteoraDammCreateMetadataAccounts, MigrationOption, MigrationService, OFFSET, ONE_Q64, PARTNER_SURPLUS_SHARE, type PartnerMetadata, PartnerService, type PartnerWithdrawSurplusAccounts, type PartnerWithdrawSurplusParam, type PoolConfig, type PoolFeeParameters, type PoolFees, type PoolFeesConfig, type PoolMetrics, PoolService, type PrepareSwapParams, type QuoteResult, RESOLUTION, Rounding, SLOT_DURATION, SWAP_BUFFER_PERCENTAGE, type SwapAccounts, type SwapAmount, type SwapParam, type SwapParameters, type SwapQuoteParam, type SwapResult, TIMESTAMP_DURATION, TokenDecimal, TokenType, TokenUpdateAuthorityOption, TradeDirection, type TransferPoolCreatorAccounts, type TransferPoolCreatorParam, U64_MAX, VAULT_PROGRAM_ID, type VirtualPool, type VirtualPoolMetadata, type VolatilityTracker, type WithdrawLeftoverAccounts, type WithdrawLeftoverParam, type WithdrawMigrationFeeParam, bpsToFeeNumerator, buildCurve, buildCurveWithLiquidityWeights, buildCurveWithMarketCap, buildCurveWithTwoSegments, cleanUpTokenAccountTx, convertDecimalToBN, convertToLamports, createDammV1Program, createDammV2Program, createDbcProgram, createInitializePermissionlessDynamicVaultIx, createLockEscrowIx, createProgramAccountFilter, createVaultProgram, deriveBaseKeyForLocker, deriveDammV1EventAuthority, deriveDammV1LockEscrowAddress, deriveDammV1LpMintAddress, deriveDammV1MigrationMetadataAddress, deriveDammV1PoolAddress, deriveDammV1PoolAuthority, deriveDammV1ProtocolFeeAddress, deriveDammV1VaultLPAddress, deriveDammV2EventAuthority, deriveDammV2LockEscrowAddress, deriveDammV2MigrationMetadataAddress, deriveDammV2PoolAddress, deriveDammV2PoolAuthority, deriveDammV2TokenVaultAddress, deriveDbcEventAuthority, deriveDbcPoolAddress, deriveDbcPoolAuthority, deriveDbcPoolMetadata, deriveDbcTokenVaultAddress, deriveEscrow, deriveLockerEventAuthority, deriveMintMetadata, derivePartnerMetadata, derivePositionAddress, derivePositionNftAccount, deriveTokenVaultKey, deriveVaultAddress, deriveVaultLpMintAddress, deriveVaultPdas, feeNumeratorToBps, findAssociatedTokenAddress, fromDecimalToBN, getAccountCreationTimestamp, getAccountCreationTimestamps, getAccountData, getBaseFeeParams, getBaseTokenForSwap, getCurrentBaseFeeNumerator, getDeltaAmountBase, getDeltaAmountBaseUnsigned, getDeltaAmountQuoteUnsigned, getDynamicFeeParams, getFeeInPeriod, getFeeMode, getFeeOnAmount, getFirstCurve, getFirstKey, getInitialLiquidityFromDeltaBase, getInitialLiquidityFromDeltaQuote, getInitializeAmounts, getLiquidity, getLockedVestingParams, getMigrationBaseToken, getMigrationQuoteAmount, getMigrationQuoteAmountFromMigrationQuoteThreshold, getMigrationQuoteThresholdFromMigrationQuoteAmount, getMigrationThresholdPrice, getMinBaseFeeBps, getNextSqrtPriceFromAmountBaseRoundingUp, getNextSqrtPriceFromAmountQuoteRoundingDown, getNextSqrtPriceFromInput, getOrCreateATAInstruction, getPercentageSupplyOnMigration, getPriceFromSqrtPrice, getSecondKey, getSqrtPriceFromMarketCap, getSqrtPriceFromPrice, getSwapAmountFromBaseToQuote, getSwapAmountFromQuoteToBase, getSwapAmountWithBuffer, getSwapResult, getTokenDecimals, getTokenProgram, getTokenType, getTotalSupplyFromCurve, getTotalTokenSupply, getTotalVestingAmount, getTwoCurve, getVariableFee, isDefaultLockedVesting, isNativeSol, prepareTokenAccountTx, swapQuote, unwrapSOLInstruction, validateActivationType, validateBalance, validateBaseTokenType, validateCollectFeeMode, validateConfigParameters, validateCurve, validateLPPercentages, validateMigrationAndTokenType, validateMigrationFeeOption, validatePoolFees, validateSwapAmount, validateTokenDecimals, validateTokenSupply, validateTokenUpdateAuthorityOptions, wrapSOLInstruction };
13581
+ export { ActivationType, BASE_ADDRESS, BASIS_POINT_MAX, BIN_STEP_BPS_DEFAULT, BIN_STEP_BPS_U128_DEFAULT, type BaseFee, type BaseFeeConfig, BaseFeeMode, type BuildCurveBaseParam, type BuildCurveParam, type BuildCurveWithLiquidityWeightsParam, type BuildCurveWithMarketCapParam, type BuildCurveWithTwoSegmentsParam, type ClaimCreatorTradingFee2Param, type ClaimCreatorTradingFeeAccounts, type ClaimCreatorTradingFeeParam, type ClaimCreatorTradingFeeWithQuoteMintNotSolParam, type ClaimCreatorTradingFeeWithQuoteMintSolParam, type ClaimFeeOperator, type ClaimPartnerTradingFeeWithQuoteMintNotSolParam, type ClaimPartnerTradingFeeWithQuoteMintSolParam, type ClaimProtocolFeeAccounts, type ClaimTradingFee2Param, type ClaimTradingFeeAccounts, type ClaimTradingFeeParam, type CloseClaimFeeOperatorAccounts, CollectFeeMode, type Config, type ConfigParameters, type CreateClaimFeeOperatorAccounts, type CreateConfigAccounts, type CreateConfigAndPoolParam, type CreateConfigAndPoolWithFirstBuyParam, type CreateConfigParam, type CreateDammV1MigrationMetadataParam, type CreateDammV2MigrationMetadataParam, type CreateLockerAccounts, type CreateLockerParam, type CreatePartnerMetadata, type CreatePartnerMetadataParam, type CreatePartnerMetadataParameters, type CreatePoolParam, type CreatePoolWithFirstBuyParam, type CreateVirtualPoolMetadata, type CreateVirtualPoolMetadataParam, type CreateVirtualPoolMetadataParameters, CreatorService, type CreatorWithdrawSurplusAccounts, type CreatorWithdrawSurplusParam, DAMM_V1_MIGRATION_FEE_ADDRESS, DAMM_V1_PROGRAM_ID, DAMM_V2_MIGRATION_FEE_ADDRESS, DAMM_V2_PROGRAM_ID, DYNAMIC_BONDING_CURVE_PROGRAM_ID, DYNAMIC_FEE_DECAY_PERIOD_DEFAULT, DYNAMIC_FEE_FILTER_PERIOD_DEFAULT, DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT, type DammLpTokenParam, DynamicBondingCurveClient, DynamicBondingCurveProgram, type DynamicFeeConfig, type DynamicFeeParameters, FEE_DENOMINATOR, type FeeMode, type FeeOnAmountResult, type FeeResult, type FeeSchedulerParams, GetFeeMode, type InitializePoolBaseParam, type InitializePoolParameters, type InitializeVirtualPoolWithSplTokenAccounts, type InitializeVirtualPoolWithToken2022Accounts, LOCKER_PROGRAM_ID, type LiquidityDistributionParameters, type LockEscrow, type LockedVestingParameters, type LockedVestingParams, MAX_CURVE_POINT, MAX_FEE_BPS, MAX_FEE_NUMERATOR, MAX_PRICE_CHANGE_BPS_DEFAULT, MAX_RATE_LIMITER_DURATION_IN_SECONDS, MAX_RATE_LIMITER_DURATION_IN_SLOTS, MAX_SQRT_PRICE, MAX_SWALLOW_PERCENTAGE, METAPLEX_PROGRAM_ID, MIN_FEE_BPS, MIN_FEE_NUMERATOR, MIN_SQRT_PRICE, type MeteoraDammMigrationMetadata, type MeteoraDammV2MigrationMetadata, type MigrateMeteoraDammAccounts, type MigrateMeteoraDammClaimLpTokenAccounts, type MigrateMeteoraDammLockLpTokenAccounts, type MigrateToDammV1Param, type MigrateToDammV2Param, type MigrateToDammV2Response, type MigrationDammV2Accounts, type MigrationDammV2CreateMetadataAccounts, MigrationFeeOption, type MigrationMeteoraDammCreateMetadataAccounts, MigrationOption, MigrationService, OFFSET, ONE_Q64, PARTNER_SURPLUS_SHARE, type PartnerMetadata, PartnerService, type PartnerWithdrawSurplusAccounts, type PartnerWithdrawSurplusParam, type PoolConfig, type PoolFeeParameters, type PoolFees, type PoolFeesConfig, type PoolMetrics, PoolService, type PrepareSwapParams, type QuoteResult, RESOLUTION, type RateLimiterParams, Rounding, SLOT_DURATION, SWAP_BUFFER_PERCENTAGE, type SwapAccounts, type SwapAmount, type SwapParam, type SwapParameters, type SwapQuoteExactInParam, type SwapQuoteParam, type SwapResult, TIMESTAMP_DURATION, TokenDecimal, TokenType, TokenUpdateAuthorityOption, TradeDirection, type TransferPoolCreatorAccounts, type TransferPoolCreatorParam, U64_MAX, VAULT_PROGRAM_ID, type VirtualPool, type VirtualPoolMetadata, type VolatilityTracker, type WithdrawLeftoverAccounts, type WithdrawLeftoverParam, type WithdrawMigrationFeeParam, bpsToFeeNumerator, buildCurve, buildCurveWithLiquidityWeights, buildCurveWithMarketCap, buildCurveWithTwoSegments, calculateFeeSchedulerEndingBaseFeeBps, calculateQuoteExactInAmount, checkRateLimiterApplied, cleanUpTokenAccountTx, convertDecimalToBN, convertToLamports, createDammV1Program, createDammV2Program, createDbcProgram, createInitializePermissionlessDynamicVaultIx, createLockEscrowIx, createProgramAccountFilter, createVaultProgram, deriveBaseKeyForLocker, deriveDammV1EventAuthority, deriveDammV1LockEscrowAddress, deriveDammV1LpMintAddress, deriveDammV1MigrationMetadataAddress, deriveDammV1PoolAddress, deriveDammV1PoolAuthority, deriveDammV1ProtocolFeeAddress, deriveDammV1VaultLPAddress, deriveDammV2EventAuthority, deriveDammV2LockEscrowAddress, deriveDammV2MigrationMetadataAddress, deriveDammV2PoolAddress, deriveDammV2PoolAuthority, deriveDammV2TokenVaultAddress, deriveDbcEventAuthority, deriveDbcPoolAddress, deriveDbcPoolAuthority, deriveDbcPoolMetadata, deriveDbcTokenVaultAddress, deriveEscrow, deriveLockerEventAuthority, deriveMintMetadata, derivePartnerMetadata, derivePositionAddress, derivePositionNftAccount, deriveTokenVaultKey, deriveVaultAddress, deriveVaultLpMintAddress, deriveVaultPdas, feeNumeratorToBps, findAssociatedTokenAddress, fromDecimalToBN, getAccountCreationTimestamp, getAccountCreationTimestamps, getAccountData, getBaseFeeNumerator, getBaseFeeParams, getBaseTokenForSwap, getDeltaAmountBase, getDeltaAmountBaseUnsigned, getDeltaAmountQuoteUnsigned, getDynamicFeeParams, getFeeMode, getFeeNumeratorOnExponentialFeeScheduler, getFeeNumeratorOnLinearFeeScheduler, getFeeNumeratorOnRateLimiter, getFeeOnAmount, getFeeSchedulerParams, getFirstCurve, getFirstKey, getInitialLiquidityFromDeltaBase, getInitialLiquidityFromDeltaQuote, getInitializeAmounts, getLiquidity, getLockedVestingParams, getMigrationBaseToken, getMigrationQuoteAmount, getMigrationQuoteAmountFromMigrationQuoteThreshold, getMigrationQuoteThresholdFromMigrationQuoteAmount, getMigrationThresholdPrice, getNextSqrtPriceFromAmountBaseRoundingUp, getNextSqrtPriceFromAmountQuoteRoundingDown, getNextSqrtPriceFromInput, getOrCreateATAInstruction, getPercentageSupplyOnMigration, getPriceFromSqrtPrice, getRateLimiterParams, getSecondKey, getSqrtPriceFromMarketCap, getSqrtPriceFromPrice, getSwapAmountFromBaseToQuote, getSwapAmountFromQuoteToBase, getSwapAmountWithBuffer, getSwapResult, getTokenDecimals, getTokenProgram, getTokenType, getTotalSupplyFromCurve, getTotalTokenSupply, getTotalVestingAmount, getTwoCurve, getVariableFee, isDefaultLockedVesting, isNativeSol, prepareTokenAccountTx, swapQuote, unwrapSOLInstruction, validateActivationType, validateBalance, validateBaseTokenType, validateCollectFeeMode, validateConfigParameters, validateCurve, validateFeeRateLimiter, validateFeeScheduler, validateLPPercentages, validateMigrationAndTokenType, validateMigrationFeeOption, validatePoolFees, validateSwapAmount, validateTokenDecimals, validateTokenSupply, validateTokenUpdateAuthorityOptions, wrapSOLInstruction };