@meteora-ag/cp-amm-sdk 1.1.2 → 1.1.3
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +41 -41
package/dist/index.d.mts
CHANGED
|
@@ -6608,7 +6608,7 @@ declare function getAllPositionNftAccountByOwner(connection: Connection, user: P
|
|
|
6608
6608
|
positionNftAccount: PublicKey;
|
|
6609
6609
|
}>>;
|
|
6610
6610
|
|
|
6611
|
-
declare function getBaseFeeNumerator(feeSchedulerMode: FeeSchedulerMode, cliffFeeNumerator: BN, period: BN, reductionFactor: BN
|
|
6611
|
+
declare function getBaseFeeNumerator(feeSchedulerMode: FeeSchedulerMode, cliffFeeNumerator: BN, period: BN, reductionFactor: BN): BN;
|
|
6612
6612
|
/**
|
|
6613
6613
|
* Calculates the dynamic fee numerator based on market volatility metrics
|
|
6614
6614
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -6608,7 +6608,7 @@ declare function getAllPositionNftAccountByOwner(connection: Connection, user: P
|
|
|
6608
6608
|
positionNftAccount: PublicKey;
|
|
6609
6609
|
}>>;
|
|
6610
6610
|
|
|
6611
|
-
declare function getBaseFeeNumerator(feeSchedulerMode: FeeSchedulerMode, cliffFeeNumerator: BN, period: BN, reductionFactor: BN
|
|
6611
|
+
declare function getBaseFeeNumerator(feeSchedulerMode: FeeSchedulerMode, cliffFeeNumerator: BN, period: BN, reductionFactor: BN): BN;
|
|
6612
6612
|
/**
|
|
6613
6613
|
* Calculates the dynamic fee numerator based on market volatility metrics
|
|
6614
6614
|
*
|
package/dist/index.js
CHANGED
|
@@ -7419,10 +7419,7 @@ function getNextSqrtPriceFromOutput(sqrtPrice, liquidity, outAmount, isB) {
|
|
|
7419
7419
|
|
|
7420
7420
|
// src/helpers/fee.ts
|
|
7421
7421
|
|
|
7422
|
-
function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reductionFactor
|
|
7423
|
-
if (periodFrequency.eq(new (0, _anchor.BN)(0)) || period.eq(new (0, _anchor.BN)(0))) {
|
|
7424
|
-
return cliffFeeNumerator;
|
|
7425
|
-
}
|
|
7422
|
+
function getBaseFeeNumerator(feeSchedulerMode, cliffFeeNumerator, period, reductionFactor) {
|
|
7426
7423
|
let feeNumerator;
|
|
7427
7424
|
if (feeSchedulerMode == 0 /* Linear */) {
|
|
7428
7425
|
feeNumerator = cliffFeeNumerator.sub(period.mul(reductionFactor));
|
|
@@ -7454,8 +7451,7 @@ function getFeeNumerator(currentPoint, activationPoint, numberOfPeriod, periodFr
|
|
|
7454
7451
|
feeSchedulerMode,
|
|
7455
7452
|
cliffFeeNumerator,
|
|
7456
7453
|
period,
|
|
7457
|
-
reductionFactor
|
|
7458
|
-
periodFrequency
|
|
7454
|
+
reductionFactor
|
|
7459
7455
|
);
|
|
7460
7456
|
if (dynamicFeeParams) {
|
|
7461
7457
|
const { volatilityAccumulator, binStep, variableFeeControl } = dynamicFeeParams;
|