bet-test-sdk 1.3.4 → 1.3.5
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/browser/index.js
CHANGED
@@ -16085,7 +16085,7 @@ class CurveState {
|
|
16085
16085
|
if (isCompleted) {
|
16086
16086
|
throw new Error("Curve is completed");
|
16087
16087
|
}
|
16088
|
-
solAmount = solAmount * (DENOMINATOR
|
16088
|
+
solAmount = solAmount * (DENOMINATOR - FEE_BASIS_POINTS) / DENOMINATOR;
|
16089
16089
|
return this.getBuyTokenAmountOutWithoutFee(solAmount);
|
16090
16090
|
}
|
16091
16091
|
// In token, out sol
|
@@ -16103,7 +16103,7 @@ class CurveState {
|
|
16103
16103
|
let n = this.virtualSolReserves * tokenAmount;
|
16104
16104
|
let i = this.virtualTokenReserves - tokenAmount;
|
16105
16105
|
let r = n / i + 1n;
|
16106
|
-
return r * (DENOMINATOR
|
16106
|
+
return r * (DENOMINATOR + FEE_BASIS_POINTS) / DENOMINATOR;
|
16107
16107
|
}
|
16108
16108
|
// In token, out sol
|
16109
16109
|
getSellPriceByToken(tokenAmount, isCompleted) {
|
package/dist/cjs/curveState.js
CHANGED
@@ -55,7 +55,7 @@ class CurveState {
|
|
55
55
|
if (isCompleted) {
|
56
56
|
throw new Error("Curve is completed");
|
57
57
|
}
|
58
|
-
solAmount = solAmount * (constants_1.DENOMINATOR
|
58
|
+
solAmount = solAmount * (constants_1.DENOMINATOR - constants_1.FEE_BASIS_POINTS) / constants_1.DENOMINATOR;
|
59
59
|
return this.getBuyTokenAmountOutWithoutFee(solAmount);
|
60
60
|
}
|
61
61
|
// In token, out sol
|
@@ -73,7 +73,7 @@ class CurveState {
|
|
73
73
|
let n = this.virtualSolReserves * tokenAmount;
|
74
74
|
let i = this.virtualTokenReserves - tokenAmount;
|
75
75
|
let r = n / i + 1n;
|
76
|
-
return r * (constants_1.DENOMINATOR
|
76
|
+
return r * (constants_1.DENOMINATOR + constants_1.FEE_BASIS_POINTS) / constants_1.DENOMINATOR;
|
77
77
|
}
|
78
78
|
// In token, out sol
|
79
79
|
getSellPriceByToken(tokenAmount, isCompleted) {
|
package/dist/esm/curveState.js
CHANGED
@@ -52,7 +52,7 @@ export class CurveState {
|
|
52
52
|
if (isCompleted) {
|
53
53
|
throw new Error("Curve is completed");
|
54
54
|
}
|
55
|
-
solAmount = solAmount * (DENOMINATOR
|
55
|
+
solAmount = solAmount * (DENOMINATOR - FEE_BASIS_POINTS) / DENOMINATOR;
|
56
56
|
return this.getBuyTokenAmountOutWithoutFee(solAmount);
|
57
57
|
}
|
58
58
|
// In token, out sol
|
@@ -70,7 +70,7 @@ export class CurveState {
|
|
70
70
|
let n = this.virtualSolReserves * tokenAmount;
|
71
71
|
let i = this.virtualTokenReserves - tokenAmount;
|
72
72
|
let r = n / i + 1n;
|
73
|
-
return r * (DENOMINATOR
|
73
|
+
return r * (DENOMINATOR + FEE_BASIS_POINTS) / DENOMINATOR;
|
74
74
|
}
|
75
75
|
// In token, out sol
|
76
76
|
getSellPriceByToken(tokenAmount, isCompleted) {
|