@panoptic-eng/sdk 1.0.62 → 1.0.63
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.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/panoptic/v2/index.d.ts +2 -0
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +2 -1
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +2 -0
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +2 -1
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/providers-1WdiaRbY.js +54 -0
- package/dist/{router-Y1OxL9Nt.js → router-Dejb6MWu.js} +136 -9
- package/dist/{router-jMP7fVno.js → router-pm9PDlyH.js} +1 -1
- package/dist/rpc/index.d.ts +112 -0
- package/dist/rpc/index.d.ts.map +1 -0
- package/dist/rpc/index.js +242 -0
- package/dist/rpc/index.js.map +1 -0
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +1 -14
- package/dist/test/index.js.map +1 -1
- package/dist/uniswap/index.d.ts +310 -215
- package/dist/uniswap/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +253 -20
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-B27ILZl4.js → v2-ccGPXWvq.js} +6 -131
- package/package.json +5 -1
- /package/dist/{cow-DTi3GjQz.js → cow-BsSaoahK.js} +0 -0
- /package/dist/{writes-B8NGXzUG.js → writes--fM_8ggw.js} +0 -0
|
@@ -31997,7 +31997,8 @@ function valuePositionAccrual({ snapshots, quoteIsToken0, quoteDecimals }) {
|
|
|
31997
31997
|
for (const snapshot of snapshots) {
|
|
31998
31998
|
const amount0 = new Precision((snapshot.token0 - previous0).toString());
|
|
31999
31999
|
const amount1 = new Precision((snapshot.token1 - previous1).toString());
|
|
32000
|
-
|
|
32000
|
+
if (snapshot.sqrtPriceX96 !== void 0 && snapshot.sqrtPriceX96 <= 0n) throw new RangeError("Invalid sqrt price");
|
|
32001
|
+
const price = snapshot.sqrtPriceX96 === void 0 ? new Precision("1.0001").pow(snapshot.tick.toString()) : new Precision(snapshot.sqrtPriceX96.toString()).div(Q96.toString()).pow(2);
|
|
32001
32002
|
total = total.plus(quoteIsToken0 ? amount0.plus(amount1.div(price)) : amount1.plus(amount0.mul(price)));
|
|
32002
32003
|
previous0 = snapshot.token0;
|
|
32003
32004
|
previous1 = snapshot.token1;
|