@whetstone-research/doppler-sdk 0.0.1-alpha.1
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/README.md +432 -0
- package/dist/DopplerSDK.d.mts +56 -0
- package/dist/DopplerSDK.d.ts +56 -0
- package/dist/DopplerSDK.js +23 -0
- package/dist/DopplerSDK.js.map +1 -0
- package/dist/DopplerSDK.mjs +14 -0
- package/dist/DopplerSDK.mjs.map +1 -0
- package/dist/__tests__/mocks/addresses.d.mts +46 -0
- package/dist/__tests__/mocks/addresses.d.ts +46 -0
- package/dist/__tests__/mocks/addresses.js +53 -0
- package/dist/__tests__/mocks/addresses.js.map +1 -0
- package/dist/__tests__/mocks/addresses.mjs +44 -0
- package/dist/__tests__/mocks/addresses.mjs.map +1 -0
- package/dist/__tests__/mocks/clients.d.mts +22 -0
- package/dist/__tests__/mocks/clients.d.ts +22 -0
- package/dist/__tests__/mocks/clients.js +17088 -0
- package/dist/__tests__/mocks/clients.js.map +1 -0
- package/dist/__tests__/mocks/clients.mjs +17084 -0
- package/dist/__tests__/mocks/clients.mjs.map +1 -0
- package/dist/abis/bytecodes.d.mts +5 -0
- package/dist/abis/bytecodes.d.ts +5 -0
- package/dist/abis/bytecodes.js +21 -0
- package/dist/abis/bytecodes.js.map +1 -0
- package/dist/abis/bytecodes.mjs +4 -0
- package/dist/abis/bytecodes.mjs.map +1 -0
- package/dist/abis/index.d.mts +1864 -0
- package/dist/abis/index.d.ts +1864 -0
- package/dist/abis/index.js +74 -0
- package/dist/abis/index.js.map +1 -0
- package/dist/abis/index.mjs +5 -0
- package/dist/abis/index.mjs.map +1 -0
- package/dist/addresses.d.mts +46 -0
- package/dist/addresses.d.ts +46 -0
- package/dist/addresses.js +21 -0
- package/dist/addresses.js.map +1 -0
- package/dist/addresses.mjs +4 -0
- package/dist/addresses.mjs.map +1 -0
- package/dist/chunk-2LPOXGKT.mjs +181 -0
- package/dist/chunk-2LPOXGKT.mjs.map +1 -0
- package/dist/chunk-4K5GBNQV.mjs +157 -0
- package/dist/chunk-4K5GBNQV.mjs.map +1 -0
- package/dist/chunk-5B7IYSVK.js +82 -0
- package/dist/chunk-5B7IYSVK.js.map +1 -0
- package/dist/chunk-6H6BP7GZ.mjs +12 -0
- package/dist/chunk-6H6BP7GZ.mjs.map +1 -0
- package/dist/chunk-6REZA4TU.mjs +268 -0
- package/dist/chunk-6REZA4TU.mjs.map +1 -0
- package/dist/chunk-AYPP5JEQ.mjs +67 -0
- package/dist/chunk-AYPP5JEQ.mjs.map +1 -0
- package/dist/chunk-AZLFJNTG.mjs +3 -0
- package/dist/chunk-AZLFJNTG.mjs.map +1 -0
- package/dist/chunk-BYK425DD.mjs +160 -0
- package/dist/chunk-BYK425DD.mjs.map +1 -0
- package/dist/chunk-BYR4WWCZ.mjs +80 -0
- package/dist/chunk-BYR4WWCZ.mjs.map +1 -0
- package/dist/chunk-CYDWEPFL.mjs +3 -0
- package/dist/chunk-CYDWEPFL.mjs.map +1 -0
- package/dist/chunk-DLL6MEJA.js +270 -0
- package/dist/chunk-DLL6MEJA.js.map +1 -0
- package/dist/chunk-DRBRT57F.js +4 -0
- package/dist/chunk-DRBRT57F.js.map +1 -0
- package/dist/chunk-ER42VG7H.js +102 -0
- package/dist/chunk-ER42VG7H.js.map +1 -0
- package/dist/chunk-FOESYJP3.mjs +3 -0
- package/dist/chunk-FOESYJP3.mjs.map +1 -0
- package/dist/chunk-IGLVXIHA.js +924 -0
- package/dist/chunk-IGLVXIHA.js.map +1 -0
- package/dist/chunk-IPW2I4JJ.mjs +922 -0
- package/dist/chunk-IPW2I4JJ.mjs.map +1 -0
- package/dist/chunk-IX32KFK3.js +14 -0
- package/dist/chunk-IX32KFK3.js.map +1 -0
- package/dist/chunk-JHKPKTCV.js +1269 -0
- package/dist/chunk-JHKPKTCV.js.map +1 -0
- package/dist/chunk-K7BWQVAX.js +185 -0
- package/dist/chunk-K7BWQVAX.js.map +1 -0
- package/dist/chunk-KEXKKQVW.js +42 -0
- package/dist/chunk-KEXKKQVW.js.map +1 -0
- package/dist/chunk-KPBCG4X2.js +76 -0
- package/dist/chunk-KPBCG4X2.js.map +1 -0
- package/dist/chunk-KRN3ROUE.js +4 -0
- package/dist/chunk-KRN3ROUE.js.map +1 -0
- package/dist/chunk-L4TKYN6R.mjs +207 -0
- package/dist/chunk-L4TKYN6R.mjs.map +1 -0
- package/dist/chunk-LOROXNH3.mjs +37 -0
- package/dist/chunk-LOROXNH3.mjs.map +1 -0
- package/dist/chunk-NDWBEGEN.mjs +8 -0
- package/dist/chunk-NDWBEGEN.mjs.map +1 -0
- package/dist/chunk-O55NMSZK.mjs +131 -0
- package/dist/chunk-O55NMSZK.mjs.map +1 -0
- package/dist/chunk-OMN7RXR4.js +12 -0
- package/dist/chunk-OMN7RXR4.js.map +1 -0
- package/dist/chunk-OPKQMN46.mjs +54 -0
- package/dist/chunk-OPKQMN46.mjs.map +1 -0
- package/dist/chunk-P7CHGWY7.js +4 -0
- package/dist/chunk-P7CHGWY7.js.map +1 -0
- package/dist/chunk-QSQGLWNY.mjs +3 -0
- package/dist/chunk-QSQGLWNY.mjs.map +1 -0
- package/dist/chunk-R3YCKIM4.js +133 -0
- package/dist/chunk-R3YCKIM4.js.map +1 -0
- package/dist/chunk-RV64M4Q6.mjs +3 -0
- package/dist/chunk-RV64M4Q6.mjs.map +1 -0
- package/dist/chunk-SIVXK7WY.js +162 -0
- package/dist/chunk-SIVXK7WY.js.map +1 -0
- package/dist/chunk-T644D54P.mjs +65 -0
- package/dist/chunk-T644D54P.mjs.map +1 -0
- package/dist/chunk-TOMVBPNZ.js +56 -0
- package/dist/chunk-TOMVBPNZ.js.map +1 -0
- package/dist/chunk-VEIVYUYF.js +4 -0
- package/dist/chunk-VEIVYUYF.js.map +1 -0
- package/dist/chunk-WQHTNL5L.js +4 -0
- package/dist/chunk-WQHTNL5L.js.map +1 -0
- package/dist/chunk-X3UMAHOJ.js +4 -0
- package/dist/chunk-X3UMAHOJ.js.map +1 -0
- package/dist/chunk-XG7K4R56.js +170 -0
- package/dist/chunk-XG7K4R56.js.map +1 -0
- package/dist/chunk-XJGF77WN.mjs +1254 -0
- package/dist/chunk-XJGF77WN.mjs.map +1 -0
- package/dist/chunk-XNMXN5SZ.mjs +3 -0
- package/dist/chunk-XNMXN5SZ.mjs.map +1 -0
- package/dist/chunk-YPNUUFAD.js +209 -0
- package/dist/chunk-YPNUUFAD.js.map +1 -0
- package/dist/constants.d.mts +50 -0
- package/dist/constants.d.ts +50 -0
- package/dist/constants.js +153 -0
- package/dist/constants.js.map +1 -0
- package/dist/constants.mjs +4 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/entities/DopplerFactory.d.mts +118 -0
- package/dist/entities/DopplerFactory.d.ts +118 -0
- package/dist/entities/DopplerFactory.js +17 -0
- package/dist/entities/DopplerFactory.js.map +1 -0
- package/dist/entities/DopplerFactory.mjs +8 -0
- package/dist/entities/DopplerFactory.mjs.map +1 -0
- package/dist/entities/auction/DynamicAuction.d.mts +57 -0
- package/dist/entities/auction/DynamicAuction.d.ts +57 -0
- package/dist/entities/auction/DynamicAuction.js +16 -0
- package/dist/entities/auction/DynamicAuction.js.map +1 -0
- package/dist/entities/auction/DynamicAuction.mjs +7 -0
- package/dist/entities/auction/DynamicAuction.mjs.map +1 -0
- package/dist/entities/auction/StaticAuction.d.mts +41 -0
- package/dist/entities/auction/StaticAuction.d.ts +41 -0
- package/dist/entities/auction/StaticAuction.js +16 -0
- package/dist/entities/auction/StaticAuction.js.map +1 -0
- package/dist/entities/auction/StaticAuction.mjs +7 -0
- package/dist/entities/auction/StaticAuction.mjs.map +1 -0
- package/dist/entities/auction/index.d.mts +4 -0
- package/dist/entities/auction/index.d.ts +4 -0
- package/dist/entities/auction/index.js +22 -0
- package/dist/entities/auction/index.js.map +1 -0
- package/dist/entities/auction/index.mjs +9 -0
- package/dist/entities/auction/index.mjs.map +1 -0
- package/dist/entities/quoter/Quoter.d.mts +108 -0
- package/dist/entities/quoter/Quoter.d.ts +108 -0
- package/dist/entities/quoter/Quoter.js +16 -0
- package/dist/entities/quoter/Quoter.js.map +1 -0
- package/dist/entities/quoter/Quoter.mjs +7 -0
- package/dist/entities/quoter/Quoter.mjs.map +1 -0
- package/dist/entities/quoter/index.d.mts +2 -0
- package/dist/entities/quoter/index.d.ts +2 -0
- package/dist/entities/quoter/index.js +17 -0
- package/dist/entities/quoter/index.js.map +1 -0
- package/dist/entities/quoter/index.mjs +8 -0
- package/dist/entities/quoter/index.mjs.map +1 -0
- package/dist/entities/token/derc20/Derc20.d.mts +76 -0
- package/dist/entities/token/derc20/Derc20.d.ts +76 -0
- package/dist/entities/token/derc20/Derc20.js +15 -0
- package/dist/entities/token/derc20/Derc20.js.map +1 -0
- package/dist/entities/token/derc20/Derc20.mjs +6 -0
- package/dist/entities/token/derc20/Derc20.mjs.map +1 -0
- package/dist/entities/token/derc20/index.d.mts +2 -0
- package/dist/entities/token/derc20/index.d.ts +2 -0
- package/dist/entities/token/derc20/index.js +16 -0
- package/dist/entities/token/derc20/index.js.map +1 -0
- package/dist/entities/token/derc20/index.mjs +7 -0
- package/dist/entities/token/derc20/index.mjs.map +1 -0
- package/dist/entities/token/eth/Eth.d.mts +50 -0
- package/dist/entities/token/eth/Eth.d.ts +50 -0
- package/dist/entities/token/eth/Eth.js +13 -0
- package/dist/entities/token/eth/Eth.js.map +1 -0
- package/dist/entities/token/eth/Eth.mjs +4 -0
- package/dist/entities/token/eth/Eth.mjs.map +1 -0
- package/dist/entities/token/eth/index.d.mts +2 -0
- package/dist/entities/token/eth/index.d.ts +2 -0
- package/dist/entities/token/eth/index.js +14 -0
- package/dist/entities/token/eth/index.js.map +1 -0
- package/dist/entities/token/eth/index.mjs +5 -0
- package/dist/entities/token/eth/index.mjs.map +1 -0
- package/dist/entities/token/index.d.mts +3 -0
- package/dist/entities/token/index.d.ts +3 -0
- package/dist/entities/token/index.js +23 -0
- package/dist/entities/token/index.js.map +1 -0
- package/dist/entities/token/index.mjs +10 -0
- package/dist/entities/token/index.mjs.map +1 -0
- package/dist/index.d.mts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +338 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +28 -0
- package/dist/index.mjs.map +1 -0
- package/dist/magic-string.es-NMLAOY5A.js +1298 -0
- package/dist/magic-string.es-NMLAOY5A.js.map +1 -0
- package/dist/magic-string.es-QCVTE6QG.mjs +1292 -0
- package/dist/magic-string.es-QCVTE6QG.mjs.map +1 -0
- package/dist/types.d.mts +206 -0
- package/dist/types.d.ts +206 -0
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +4 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +91 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +6 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/priceHelpers.d.mts +86 -0
- package/dist/utils/priceHelpers.d.ts +86 -0
- package/dist/utils/priceHelpers.js +42 -0
- package/dist/utils/priceHelpers.js.map +1 -0
- package/dist/utils/priceHelpers.mjs +5 -0
- package/dist/utils/priceHelpers.mjs.map +1 -0
- package/dist/utils/tickMath.d.mts +65 -0
- package/dist/utils/tickMath.d.ts +65 -0
- package/dist/utils/tickMath.js +57 -0
- package/dist/utils/tickMath.js.map +1 -0
- package/dist/utils/tickMath.mjs +4 -0
- package/dist/utils/tickMath.mjs.map +1 -0
- package/package.json +62 -0
package/dist/types.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.mjs"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice } from './tickMath.mjs';
|
|
2
|
+
export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice } from './priceHelpers.mjs';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice } from './tickMath.js';
|
|
2
|
+
export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice } from './priceHelpers.js';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../chunk-DRBRT57F.js');
|
|
4
|
+
var chunkKPBCG4X2_js = require('../chunk-KPBCG4X2.js');
|
|
5
|
+
var chunkXG7K4R56_js = require('../chunk-XG7K4R56.js');
|
|
6
|
+
require('../chunk-KEXKKQVW.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "calculateFDV", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkKPBCG4X2_js.calculateFDV; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "calculateGamma", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkKPBCG4X2_js.calculateGamma; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "calculateMarketCap", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkKPBCG4X2_js.calculateMarketCap; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "calculateTickRange", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkKPBCG4X2_js.calculateTickRange; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "calculateTokensToSell", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunkKPBCG4X2_js.calculateTokensToSell; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "estimatePriceAtEpoch", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkKPBCG4X2_js.estimatePriceAtEpoch; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "estimateSlippage", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return chunkKPBCG4X2_js.estimateSlippage; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "formatTickAsPrice", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return chunkKPBCG4X2_js.formatTickAsPrice; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "MAX_SQRT_RATIO", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return chunkXG7K4R56_js.MAX_SQRT_RATIO; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "MAX_TICK", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunkXG7K4R56_js.MAX_TICK; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "MIN_SQRT_RATIO", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return chunkXG7K4R56_js.MIN_SQRT_RATIO; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "MIN_TICK", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return chunkXG7K4R56_js.MIN_TICK; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "Q96", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return chunkXG7K4R56_js.Q96; }
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "getNearestUsableTick", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return chunkXG7K4R56_js.getNearestUsableTick; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "getSqrtRatioAtTick", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunkXG7K4R56_js.getSqrtRatioAtTick; }
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "getTickAtSqrtRatio", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return chunkXG7K4R56_js.getTickAtSqrtRatio; }
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "priceToSqrtPriceX96", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () { return chunkXG7K4R56_js.priceToSqrtPriceX96; }
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "priceToTick", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () { return chunkXG7K4R56_js.priceToTick; }
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "sqrtPriceX96ToPrice", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () { return chunkXG7K4R56_js.sqrtPriceX96ToPrice; }
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "tickToPrice", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return chunkXG7K4R56_js.tickToPrice; }
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=index.js.map
|
|
91
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '../chunk-CYDWEPFL.mjs';
|
|
2
|
+
export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice } from '../chunk-AYPP5JEQ.mjs';
|
|
3
|
+
export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice } from '../chunk-4K5GBNQV.mjs';
|
|
4
|
+
import '../chunk-LOROXNH3.mjs';
|
|
5
|
+
//# sourceMappingURL=index.mjs.map
|
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Price helper utilities for common token launch scenarios
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Calculate the tick range for a desired price range
|
|
6
|
+
* @param minPrice Minimum price (ETH per token)
|
|
7
|
+
* @param maxPrice Maximum price (ETH per token)
|
|
8
|
+
* @param tickSpacing The tick spacing of the pool
|
|
9
|
+
* @param wethDecimals Decimals of WETH (usually 18)
|
|
10
|
+
* @param tokenDecimals Decimals of the token (usually 18)
|
|
11
|
+
* @returns Object with startTick and endTick
|
|
12
|
+
*/
|
|
13
|
+
declare function calculateTickRange(minPrice: number, maxPrice: number, tickSpacing: number, wethDecimals?: number, tokenDecimals?: number): {
|
|
14
|
+
startTick: number;
|
|
15
|
+
endTick: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Calculate the number of tokens to sell based on desired raise
|
|
19
|
+
* @param targetRaiseETH Target amount to raise in ETH
|
|
20
|
+
* @param avgPricePerToken Average expected price per token in ETH
|
|
21
|
+
* @returns Number of tokens to sell (as bigint)
|
|
22
|
+
*/
|
|
23
|
+
declare function calculateTokensToSell(targetRaiseETH: number, avgPricePerToken: number): bigint;
|
|
24
|
+
/**
|
|
25
|
+
* Calculate gamma for dynamic auctions
|
|
26
|
+
* @param startTick Starting tick
|
|
27
|
+
* @param endTick Ending tick
|
|
28
|
+
* @param durationDays Duration in days
|
|
29
|
+
* @param epochLengthHours Epoch length in hours
|
|
30
|
+
* @returns Gamma value
|
|
31
|
+
*/
|
|
32
|
+
declare function calculateGamma(startTick: number, endTick: number, durationDays: number, epochLengthHours: number): number;
|
|
33
|
+
/**
|
|
34
|
+
* Estimate the price at a specific epoch in a dynamic auction
|
|
35
|
+
* @param startTick Starting tick
|
|
36
|
+
* @param gamma Tick movement per epoch
|
|
37
|
+
* @param currentEpoch Current epoch number
|
|
38
|
+
* @param tokenDecimals Token decimals
|
|
39
|
+
* @param wethDecimals WETH decimals
|
|
40
|
+
* @param isIncreasing Whether price increases (true) or decreases (false) over time
|
|
41
|
+
* @returns Estimated price in ETH per token
|
|
42
|
+
*/
|
|
43
|
+
declare function estimatePriceAtEpoch(startTick: number, gamma: number, currentEpoch: number, tokenDecimals?: number, wethDecimals?: number, isIncreasing?: boolean): number;
|
|
44
|
+
/**
|
|
45
|
+
* Format a tick value to a human-readable price string
|
|
46
|
+
* @param tick The tick value
|
|
47
|
+
* @param tokenSymbol Symbol of the token
|
|
48
|
+
* @param numeraireSymbol Symbol of the numeraire (e.g., "ETH")
|
|
49
|
+
* @param tokenDecimals Token decimals
|
|
50
|
+
* @param numeraireDecimals Numeraire decimals
|
|
51
|
+
* @returns Formatted price string
|
|
52
|
+
*/
|
|
53
|
+
declare function formatTickAsPrice(tick: number, tokenSymbol: string, numeraireSymbol: string, tokenDecimals?: number, numeraireDecimals?: number): string;
|
|
54
|
+
/**
|
|
55
|
+
* Calculate the market cap at a given price
|
|
56
|
+
* @param totalSupply Total token supply (as bigint)
|
|
57
|
+
* @param pricePerToken Price per token in ETH
|
|
58
|
+
* @param ethPrice Current ETH price in USD (optional)
|
|
59
|
+
* @returns Market cap object with ETH and USD values
|
|
60
|
+
*/
|
|
61
|
+
declare function calculateMarketCap(totalSupply: bigint, pricePerToken: number, ethPrice?: number): {
|
|
62
|
+
eth: string;
|
|
63
|
+
usd?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Calculate fully diluted valuation (FDV)
|
|
67
|
+
* @param totalSupply Total token supply including vested tokens (as bigint)
|
|
68
|
+
* @param pricePerToken Price per token in ETH
|
|
69
|
+
* @param ethPrice Current ETH price in USD (optional)
|
|
70
|
+
* @returns FDV object with ETH and USD values
|
|
71
|
+
*/
|
|
72
|
+
declare function calculateFDV(totalSupply: bigint, pricePerToken: number, ethPrice?: number): {
|
|
73
|
+
eth: string;
|
|
74
|
+
usd?: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Estimate slippage for a trade in a concentrated liquidity pool
|
|
78
|
+
* @param amountIn Amount to trade
|
|
79
|
+
* @param liquidity Current liquidity
|
|
80
|
+
* @param currentTick Current tick
|
|
81
|
+
* @param fee Pool fee (e.g., 3000 for 0.3%)
|
|
82
|
+
* @returns Estimated slippage percentage
|
|
83
|
+
*/
|
|
84
|
+
declare function estimateSlippage(amountIn: bigint, liquidity: bigint, currentTick: number, fee: number): number;
|
|
85
|
+
|
|
86
|
+
export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Price helper utilities for common token launch scenarios
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Calculate the tick range for a desired price range
|
|
6
|
+
* @param minPrice Minimum price (ETH per token)
|
|
7
|
+
* @param maxPrice Maximum price (ETH per token)
|
|
8
|
+
* @param tickSpacing The tick spacing of the pool
|
|
9
|
+
* @param wethDecimals Decimals of WETH (usually 18)
|
|
10
|
+
* @param tokenDecimals Decimals of the token (usually 18)
|
|
11
|
+
* @returns Object with startTick and endTick
|
|
12
|
+
*/
|
|
13
|
+
declare function calculateTickRange(minPrice: number, maxPrice: number, tickSpacing: number, wethDecimals?: number, tokenDecimals?: number): {
|
|
14
|
+
startTick: number;
|
|
15
|
+
endTick: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Calculate the number of tokens to sell based on desired raise
|
|
19
|
+
* @param targetRaiseETH Target amount to raise in ETH
|
|
20
|
+
* @param avgPricePerToken Average expected price per token in ETH
|
|
21
|
+
* @returns Number of tokens to sell (as bigint)
|
|
22
|
+
*/
|
|
23
|
+
declare function calculateTokensToSell(targetRaiseETH: number, avgPricePerToken: number): bigint;
|
|
24
|
+
/**
|
|
25
|
+
* Calculate gamma for dynamic auctions
|
|
26
|
+
* @param startTick Starting tick
|
|
27
|
+
* @param endTick Ending tick
|
|
28
|
+
* @param durationDays Duration in days
|
|
29
|
+
* @param epochLengthHours Epoch length in hours
|
|
30
|
+
* @returns Gamma value
|
|
31
|
+
*/
|
|
32
|
+
declare function calculateGamma(startTick: number, endTick: number, durationDays: number, epochLengthHours: number): number;
|
|
33
|
+
/**
|
|
34
|
+
* Estimate the price at a specific epoch in a dynamic auction
|
|
35
|
+
* @param startTick Starting tick
|
|
36
|
+
* @param gamma Tick movement per epoch
|
|
37
|
+
* @param currentEpoch Current epoch number
|
|
38
|
+
* @param tokenDecimals Token decimals
|
|
39
|
+
* @param wethDecimals WETH decimals
|
|
40
|
+
* @param isIncreasing Whether price increases (true) or decreases (false) over time
|
|
41
|
+
* @returns Estimated price in ETH per token
|
|
42
|
+
*/
|
|
43
|
+
declare function estimatePriceAtEpoch(startTick: number, gamma: number, currentEpoch: number, tokenDecimals?: number, wethDecimals?: number, isIncreasing?: boolean): number;
|
|
44
|
+
/**
|
|
45
|
+
* Format a tick value to a human-readable price string
|
|
46
|
+
* @param tick The tick value
|
|
47
|
+
* @param tokenSymbol Symbol of the token
|
|
48
|
+
* @param numeraireSymbol Symbol of the numeraire (e.g., "ETH")
|
|
49
|
+
* @param tokenDecimals Token decimals
|
|
50
|
+
* @param numeraireDecimals Numeraire decimals
|
|
51
|
+
* @returns Formatted price string
|
|
52
|
+
*/
|
|
53
|
+
declare function formatTickAsPrice(tick: number, tokenSymbol: string, numeraireSymbol: string, tokenDecimals?: number, numeraireDecimals?: number): string;
|
|
54
|
+
/**
|
|
55
|
+
* Calculate the market cap at a given price
|
|
56
|
+
* @param totalSupply Total token supply (as bigint)
|
|
57
|
+
* @param pricePerToken Price per token in ETH
|
|
58
|
+
* @param ethPrice Current ETH price in USD (optional)
|
|
59
|
+
* @returns Market cap object with ETH and USD values
|
|
60
|
+
*/
|
|
61
|
+
declare function calculateMarketCap(totalSupply: bigint, pricePerToken: number, ethPrice?: number): {
|
|
62
|
+
eth: string;
|
|
63
|
+
usd?: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Calculate fully diluted valuation (FDV)
|
|
67
|
+
* @param totalSupply Total token supply including vested tokens (as bigint)
|
|
68
|
+
* @param pricePerToken Price per token in ETH
|
|
69
|
+
* @param ethPrice Current ETH price in USD (optional)
|
|
70
|
+
* @returns FDV object with ETH and USD values
|
|
71
|
+
*/
|
|
72
|
+
declare function calculateFDV(totalSupply: bigint, pricePerToken: number, ethPrice?: number): {
|
|
73
|
+
eth: string;
|
|
74
|
+
usd?: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Estimate slippage for a trade in a concentrated liquidity pool
|
|
78
|
+
* @param amountIn Amount to trade
|
|
79
|
+
* @param liquidity Current liquidity
|
|
80
|
+
* @param currentTick Current tick
|
|
81
|
+
* @param fee Pool fee (e.g., 3000 for 0.3%)
|
|
82
|
+
* @returns Estimated slippage percentage
|
|
83
|
+
*/
|
|
84
|
+
declare function estimateSlippage(amountIn: bigint, liquidity: bigint, currentTick: number, fee: number): number;
|
|
85
|
+
|
|
86
|
+
export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKPBCG4X2_js = require('../chunk-KPBCG4X2.js');
|
|
4
|
+
require('../chunk-XG7K4R56.js');
|
|
5
|
+
require('../chunk-KEXKKQVW.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "calculateFDV", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkKPBCG4X2_js.calculateFDV; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "calculateGamma", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkKPBCG4X2_js.calculateGamma; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "calculateMarketCap", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkKPBCG4X2_js.calculateMarketCap; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "calculateTickRange", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkKPBCG4X2_js.calculateTickRange; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "calculateTokensToSell", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkKPBCG4X2_js.calculateTokensToSell; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "estimatePriceAtEpoch", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkKPBCG4X2_js.estimatePriceAtEpoch; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "estimateSlippage", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkKPBCG4X2_js.estimateSlippage; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "formatTickAsPrice", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkKPBCG4X2_js.formatTickAsPrice; }
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=priceHelpers.js.map
|
|
42
|
+
//# sourceMappingURL=priceHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"priceHelpers.js"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { calculateFDV, calculateGamma, calculateMarketCap, calculateTickRange, calculateTokensToSell, estimatePriceAtEpoch, estimateSlippage, formatTickAsPrice } from '../chunk-AYPP5JEQ.mjs';
|
|
2
|
+
import '../chunk-4K5GBNQV.mjs';
|
|
3
|
+
import '../chunk-LOROXNH3.mjs';
|
|
4
|
+
//# sourceMappingURL=priceHelpers.mjs.map
|
|
5
|
+
//# sourceMappingURL=priceHelpers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"priceHelpers.mjs"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tick math utilities for Uniswap V3/V4 price calculations
|
|
3
|
+
*
|
|
4
|
+
* These utilities help convert between ticks, sqrtPriceX96 values, and human-readable prices
|
|
5
|
+
*/
|
|
6
|
+
declare const MIN_TICK = -887272;
|
|
7
|
+
declare const MAX_TICK = 887272;
|
|
8
|
+
declare const MIN_SQRT_RATIO = 4295128739n;
|
|
9
|
+
declare const MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342n;
|
|
10
|
+
declare const Q96: bigint;
|
|
11
|
+
/**
|
|
12
|
+
* Get the sqrt ratio at a given tick
|
|
13
|
+
* @param tick The tick value
|
|
14
|
+
* @returns The sqrt price as a Q64.96 fixed point number
|
|
15
|
+
*/
|
|
16
|
+
declare function getSqrtRatioAtTick(tick: number): bigint;
|
|
17
|
+
/**
|
|
18
|
+
* Get the tick at a given sqrt ratio
|
|
19
|
+
* @param sqrtRatioX96 The sqrt price as a Q64.96 fixed point number
|
|
20
|
+
* @returns The tick value
|
|
21
|
+
*/
|
|
22
|
+
declare function getTickAtSqrtRatio(sqrtRatioX96: bigint): number;
|
|
23
|
+
/**
|
|
24
|
+
* Convert sqrtPriceX96 to a human-readable price
|
|
25
|
+
* @param sqrtPriceX96 The sqrt price as a Q64.96 fixed point number
|
|
26
|
+
* @param decimals0 Decimals of token0
|
|
27
|
+
* @param decimals1 Decimals of token1
|
|
28
|
+
* @param token0IsBase Whether to return price in terms of token0 (true) or token1 (false)
|
|
29
|
+
* @returns The price as a number
|
|
30
|
+
*/
|
|
31
|
+
declare function sqrtPriceX96ToPrice(sqrtPriceX96: bigint, decimals0: number, decimals1: number, token0IsBase?: boolean): number;
|
|
32
|
+
/**
|
|
33
|
+
* Convert a human-readable price to sqrtPriceX96
|
|
34
|
+
* @param price The price (token1/token0)
|
|
35
|
+
* @param decimals0 Decimals of token0
|
|
36
|
+
* @param decimals1 Decimals of token1
|
|
37
|
+
* @returns The sqrt price as a Q64.96 fixed point number
|
|
38
|
+
*/
|
|
39
|
+
declare function priceToSqrtPriceX96(price: number, decimals0: number, decimals1: number): bigint;
|
|
40
|
+
/**
|
|
41
|
+
* Convert a tick to a human-readable price
|
|
42
|
+
* @param tick The tick value
|
|
43
|
+
* @param decimals0 Decimals of token0
|
|
44
|
+
* @param decimals1 Decimals of token1
|
|
45
|
+
* @param token0IsBase Whether to return price in terms of token0 (true) or token1 (false)
|
|
46
|
+
* @returns The price as a number
|
|
47
|
+
*/
|
|
48
|
+
declare function tickToPrice(tick: number, decimals0: number, decimals1: number, token0IsBase?: boolean): number;
|
|
49
|
+
/**
|
|
50
|
+
* Convert a human-readable price to a tick
|
|
51
|
+
* @param price The price (token1/token0)
|
|
52
|
+
* @param decimals0 Decimals of token0
|
|
53
|
+
* @param decimals1 Decimals of token1
|
|
54
|
+
* @returns The tick value
|
|
55
|
+
*/
|
|
56
|
+
declare function priceToTick(price: number, decimals0: number, decimals1: number): number;
|
|
57
|
+
/**
|
|
58
|
+
* Get the nearest usable tick for a given tick spacing
|
|
59
|
+
* @param tick The desired tick
|
|
60
|
+
* @param tickSpacing The tick spacing of the pool
|
|
61
|
+
* @returns The nearest valid tick
|
|
62
|
+
*/
|
|
63
|
+
declare function getNearestUsableTick(tick: number, tickSpacing: number): number;
|
|
64
|
+
|
|
65
|
+
export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tick math utilities for Uniswap V3/V4 price calculations
|
|
3
|
+
*
|
|
4
|
+
* These utilities help convert between ticks, sqrtPriceX96 values, and human-readable prices
|
|
5
|
+
*/
|
|
6
|
+
declare const MIN_TICK = -887272;
|
|
7
|
+
declare const MAX_TICK = 887272;
|
|
8
|
+
declare const MIN_SQRT_RATIO = 4295128739n;
|
|
9
|
+
declare const MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342n;
|
|
10
|
+
declare const Q96: bigint;
|
|
11
|
+
/**
|
|
12
|
+
* Get the sqrt ratio at a given tick
|
|
13
|
+
* @param tick The tick value
|
|
14
|
+
* @returns The sqrt price as a Q64.96 fixed point number
|
|
15
|
+
*/
|
|
16
|
+
declare function getSqrtRatioAtTick(tick: number): bigint;
|
|
17
|
+
/**
|
|
18
|
+
* Get the tick at a given sqrt ratio
|
|
19
|
+
* @param sqrtRatioX96 The sqrt price as a Q64.96 fixed point number
|
|
20
|
+
* @returns The tick value
|
|
21
|
+
*/
|
|
22
|
+
declare function getTickAtSqrtRatio(sqrtRatioX96: bigint): number;
|
|
23
|
+
/**
|
|
24
|
+
* Convert sqrtPriceX96 to a human-readable price
|
|
25
|
+
* @param sqrtPriceX96 The sqrt price as a Q64.96 fixed point number
|
|
26
|
+
* @param decimals0 Decimals of token0
|
|
27
|
+
* @param decimals1 Decimals of token1
|
|
28
|
+
* @param token0IsBase Whether to return price in terms of token0 (true) or token1 (false)
|
|
29
|
+
* @returns The price as a number
|
|
30
|
+
*/
|
|
31
|
+
declare function sqrtPriceX96ToPrice(sqrtPriceX96: bigint, decimals0: number, decimals1: number, token0IsBase?: boolean): number;
|
|
32
|
+
/**
|
|
33
|
+
* Convert a human-readable price to sqrtPriceX96
|
|
34
|
+
* @param price The price (token1/token0)
|
|
35
|
+
* @param decimals0 Decimals of token0
|
|
36
|
+
* @param decimals1 Decimals of token1
|
|
37
|
+
* @returns The sqrt price as a Q64.96 fixed point number
|
|
38
|
+
*/
|
|
39
|
+
declare function priceToSqrtPriceX96(price: number, decimals0: number, decimals1: number): bigint;
|
|
40
|
+
/**
|
|
41
|
+
* Convert a tick to a human-readable price
|
|
42
|
+
* @param tick The tick value
|
|
43
|
+
* @param decimals0 Decimals of token0
|
|
44
|
+
* @param decimals1 Decimals of token1
|
|
45
|
+
* @param token0IsBase Whether to return price in terms of token0 (true) or token1 (false)
|
|
46
|
+
* @returns The price as a number
|
|
47
|
+
*/
|
|
48
|
+
declare function tickToPrice(tick: number, decimals0: number, decimals1: number, token0IsBase?: boolean): number;
|
|
49
|
+
/**
|
|
50
|
+
* Convert a human-readable price to a tick
|
|
51
|
+
* @param price The price (token1/token0)
|
|
52
|
+
* @param decimals0 Decimals of token0
|
|
53
|
+
* @param decimals1 Decimals of token1
|
|
54
|
+
* @returns The tick value
|
|
55
|
+
*/
|
|
56
|
+
declare function priceToTick(price: number, decimals0: number, decimals1: number): number;
|
|
57
|
+
/**
|
|
58
|
+
* Get the nearest usable tick for a given tick spacing
|
|
59
|
+
* @param tick The desired tick
|
|
60
|
+
* @param tickSpacing The tick spacing of the pool
|
|
61
|
+
* @returns The nearest valid tick
|
|
62
|
+
*/
|
|
63
|
+
declare function getNearestUsableTick(tick: number, tickSpacing: number): number;
|
|
64
|
+
|
|
65
|
+
export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkXG7K4R56_js = require('../chunk-XG7K4R56.js');
|
|
4
|
+
require('../chunk-KEXKKQVW.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "MAX_SQRT_RATIO", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkXG7K4R56_js.MAX_SQRT_RATIO; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "MAX_TICK", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkXG7K4R56_js.MAX_TICK; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "MIN_SQRT_RATIO", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkXG7K4R56_js.MIN_SQRT_RATIO; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "MIN_TICK", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkXG7K4R56_js.MIN_TICK; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "Q96", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkXG7K4R56_js.Q96; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "getNearestUsableTick", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkXG7K4R56_js.getNearestUsableTick; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "getSqrtRatioAtTick", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkXG7K4R56_js.getSqrtRatioAtTick; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "getTickAtSqrtRatio", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkXG7K4R56_js.getTickAtSqrtRatio; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "priceToSqrtPriceX96", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkXG7K4R56_js.priceToSqrtPriceX96; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "priceToTick", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkXG7K4R56_js.priceToTick; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "sqrtPriceX96ToPrice", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkXG7K4R56_js.sqrtPriceX96ToPrice; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "tickToPrice", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkXG7K4R56_js.tickToPrice; }
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=tickMath.js.map
|
|
57
|
+
//# sourceMappingURL=tickMath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"tickMath.js"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { MAX_SQRT_RATIO, MAX_TICK, MIN_SQRT_RATIO, MIN_TICK, Q96, getNearestUsableTick, getSqrtRatioAtTick, getTickAtSqrtRatio, priceToSqrtPriceX96, priceToTick, sqrtPriceX96ToPrice, tickToPrice } from '../chunk-4K5GBNQV.mjs';
|
|
2
|
+
import '../chunk-LOROXNH3.mjs';
|
|
3
|
+
//# sourceMappingURL=tickMath.mjs.map
|
|
4
|
+
//# sourceMappingURL=tickMath.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"tickMath.mjs"}
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@whetstone-research/doppler-sdk",
|
|
3
|
+
"author": "Whetstone Research",
|
|
4
|
+
"version": "0.0.1-alpha.1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"typings": "dist/index.d.ts",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"directories": {
|
|
18
|
+
"lib": "src"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"start": "tsc watch ./src/**",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"build": "tsup",
|
|
27
|
+
"build:watch": "tsup --watch",
|
|
28
|
+
"test:watch": "vitest watch",
|
|
29
|
+
"test:coverage": "vitest run --coverage",
|
|
30
|
+
"lint": "tsc --noEmit",
|
|
31
|
+
"prepublishOnly": "npm run build",
|
|
32
|
+
"size": "size-limit",
|
|
33
|
+
"analyze": "size-limit --why"
|
|
34
|
+
},
|
|
35
|
+
"prettier": {
|
|
36
|
+
"printWidth": 80,
|
|
37
|
+
"semi": true,
|
|
38
|
+
"singleQuote": true,
|
|
39
|
+
"trailingComma": "es5"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@size-limit/preset-small-lib": "^11.2.0",
|
|
43
|
+
"@vitest/coverage-c8": "^0.33.0",
|
|
44
|
+
"glob": "^10.4.5",
|
|
45
|
+
"size-limit": "^11.2.0",
|
|
46
|
+
"tslib": "^2.8.1",
|
|
47
|
+
"typescript": "^5.8.3",
|
|
48
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
49
|
+
"vitest": "^2.1.9"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@delvtech/drift": "^0.10.1",
|
|
53
|
+
"@uniswap/sdk-core": "^5.9.0",
|
|
54
|
+
"@uniswap/v3-sdk": "^3.19.0",
|
|
55
|
+
"@uniswap/v4-sdk": "^1.21.4",
|
|
56
|
+
"tsup": "^8.4.0",
|
|
57
|
+
"viem": "^2.21.44"
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=18.0.0"
|
|
61
|
+
}
|
|
62
|
+
}
|