@panoptic-eng/sdk 1.0.61 → 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/{chainDeployments-CmDzAmZ3.js → chainDeployments-BhXMBZ4B.js} +50 -12
- package/dist/{cow-BItQK2Bi.js → cow-BsSaoahK.js} +1 -1
- package/dist/deployments.d.ts +9 -1
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +50 -12
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +541 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +551 -353
- package/dist/index.js.map +1 -1
- package/dist/{irm-BEug2-TH.js → irm-BDlcUNgJ.js} +1 -1
- package/dist/panoptic/v2/index.d.ts +122 -1
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +406 -25
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +122 -1
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +406 -25
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/providers-1WdiaRbY.js +54 -0
- package/dist/{rates-CPHxWqpT.js → rates-BwZnK0tG.js} +1 -1
- package/dist/{router-BZGHjEcU.js → router-Dejb6MWu.js} +137 -10
- package/dist/{router-kTiatP_R.js → router-pm9PDlyH.js} +2 -2
- 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/{transactionFees-MocbcAyR.js → transactionFees-aXQlx-lq.js} +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-odOz_0wM.js → v2-ccGPXWvq.js} +226 -9
- package/dist/vault-transaction-fees.js +49 -11
- package/dist/vault-transaction-fees.js.map +1 -1
- package/dist/{writes-gs0k0uoN.js → writes--fM_8ggw.js} +2 -2
- package/dist/zodiac/index.d.ts.map +1 -1
- package/package.json +5 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseError, ContractFunctionExecutionError, ContractFunctionRevertedError, ExecutionRevertedError, decodeAbiParameters, decodeErrorResult, decodeEventLog, decodeFunctionData, decodeFunctionResult, encodeAbiParameters, encodeFunctionData, encodePacked, erc20Abi, getAbiItem, getAddress, hexToString, isAddressEqual, keccak256, maxUint256, parseAbi, stringToHex, toFunctionSelector, toHex, trim, zeroAddress } from "viem";
|
|
1
|
+
import { BaseError, ContractFunctionExecutionError, ContractFunctionRevertedError, ExecutionRevertedError, decodeAbiParameters, decodeErrorResult, decodeEventLog, decodeFunctionData, decodeFunctionResult, encodeAbiParameters, encodeFunctionData, encodePacked, erc20Abi, getAbiItem, getAddress, hexToString, isAddressEqual, keccak256, maxUint256, parseAbi, parseEventLogs, stringToHex, toFunctionSelector, toHex, trim, zeroAddress } from "viem";
|
|
2
2
|
import { call, multicall } from "viem/actions";
|
|
3
3
|
import Decimal from "decimal.js";
|
|
4
4
|
import { keepPreviousData, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
@@ -11277,7 +11277,7 @@ function splitTokenIdByTimescale(tokenId, positionSize, targetTimescale) {
|
|
|
11277
11277
|
|
|
11278
11278
|
//#endregion
|
|
11279
11279
|
//#region src/uniswap/lpDeposit.ts
|
|
11280
|
-
const Q96$
|
|
11280
|
+
const Q96$3 = 1n << 96n;
|
|
11281
11281
|
const ceilDiv$4 = (n, d) => (n + d - 1n) / d;
|
|
11282
11282
|
/** Principal and separately identified funding headroom, in native token units. */
|
|
11283
11283
|
function getLpDepositBreakdown(ranges, sqrtPriceX96) {
|
|
@@ -11289,8 +11289,8 @@ function getLpDepositBreakdown(ranges, sqrtPriceX96) {
|
|
|
11289
11289
|
const lower = tickToSqrtPriceX96(BigInt(tickLower));
|
|
11290
11290
|
const upper = tickToSqrtPriceX96(BigInt(tickUpper));
|
|
11291
11291
|
const price = sqrtPriceX96 < lower ? lower : sqrtPriceX96 > upper ? upper : sqrtPriceX96;
|
|
11292
|
-
amount0 += ceilDiv$4(liquidity * Q96$
|
|
11293
|
-
amount1 += ceilDiv$4(liquidity * (price - lower), Q96$
|
|
11292
|
+
amount0 += ceilDiv$4(liquidity * Q96$3 * (upper - price), upper * price);
|
|
11293
|
+
amount1 += ceilDiv$4(liquidity * (price - lower), Q96$3);
|
|
11294
11294
|
}
|
|
11295
11295
|
const buffer = {
|
|
11296
11296
|
amount0: ceilDiv$4(amount0 * 5n, 100n),
|
|
@@ -11318,7 +11318,7 @@ function getUnhedgedLpRanges({ tokenId, positionSize, tickSpacing }) {
|
|
|
11318
11318
|
const lower = tickToSqrtPriceX96(tickLower);
|
|
11319
11319
|
const upper = tickToSqrtPriceX96(tickUpper);
|
|
11320
11320
|
const amount = positionSize * leg.optionRatio;
|
|
11321
|
-
const liquidity = leg.asset === 0n ? amount * (lower * upper / Q96$
|
|
11321
|
+
const liquidity = leg.asset === 0n ? amount * (lower * upper / Q96$3) / (upper - lower) : amount * Q96$3 / (upper - lower);
|
|
11322
11322
|
return liquidity <= 0n ? [] : [{
|
|
11323
11323
|
tickLower: Number(tickLower),
|
|
11324
11324
|
tickUpper: Number(tickUpper),
|
|
@@ -11339,7 +11339,7 @@ function getLpPositionFunding(params) {
|
|
|
11339
11339
|
});
|
|
11340
11340
|
const breakdown = getLpDepositBreakdown(ranges, sqrtPriceX96);
|
|
11341
11341
|
const priceSquared = valuationSqrtPriceX96 * valuationSqrtPriceX96;
|
|
11342
|
-
const value = ({ amount0, amount1 }) => quoteTokenIndex === 0 ? amount0 + ceilDiv$4(amount1 * Q96$
|
|
11342
|
+
const value = ({ amount0, amount1 }) => quoteTokenIndex === 0 ? amount0 + ceilDiv$4(amount1 * Q96$3 * Q96$3, priceSquared) : amount1 + ceilDiv$4(amount0 * priceSquared, Q96$3 * Q96$3);
|
|
11343
11343
|
const principalInQuote = value(breakdown.principal);
|
|
11344
11344
|
const totalInQuote = value(breakdown.total);
|
|
11345
11345
|
return {
|
|
@@ -14483,7 +14483,7 @@ async function assertLpPositionFunded(params) {
|
|
|
14483
14483
|
//#endregion
|
|
14484
14484
|
//#region src/panoptic/v2/greeks/index.ts
|
|
14485
14485
|
/** Fixed-point scale constants for sqrtPriceX96 arithmetic */
|
|
14486
|
-
const Q96$
|
|
14486
|
+
const Q96$2 = 1n << 96n;
|
|
14487
14487
|
const Q192$3 = 1n << 192n;
|
|
14488
14488
|
/**
|
|
14489
14489
|
* Convert tick to quote-denominated tick based on asset direction.
|
|
@@ -14631,7 +14631,7 @@ function computeOptionItm(m, qStrikeTick, qMintTick, halfWidthTick, isPut) {
|
|
|
14631
14631
|
const sqrtK = tickToSqrtPriceX96(qStrikeTick);
|
|
14632
14632
|
const sqrtPm = tickToSqrtPriceX96(qMintTick);
|
|
14633
14633
|
const rX192 = sqrtR * sqrtR;
|
|
14634
|
-
const sqrtKPmX96 = divTrunc(sqrtK * Q96$
|
|
14634
|
+
const sqrtKPmX96 = divTrunc(sqrtK * Q96$2, sqrtPm);
|
|
14635
14635
|
const diff = sqrtR - sqrtKPmX96;
|
|
14636
14636
|
const diffSqX192 = diff * diff;
|
|
14637
14637
|
return divTrunc(m * diffSqX192, rX192 - Q192$3);
|
|
@@ -14703,7 +14703,7 @@ function getLegValue(leg, currentTick, mintTick, positionSize, poolTickSpacing,
|
|
|
14703
14703
|
const PX192 = sqrtP * sqrtP;
|
|
14704
14704
|
const KX192 = sqrtK * sqrtK;
|
|
14705
14705
|
const rX192 = sqrtR * sqrtR;
|
|
14706
|
-
const numerator = m * (2n * sqrtPKR * Q96$
|
|
14706
|
+
const numerator = m * (2n * sqrtPKR * Q96$2 - PX192 - KX192);
|
|
14707
14707
|
const denominator = rX192 - Q192$3;
|
|
14708
14708
|
v = divTrunc(numerator, denominator);
|
|
14709
14709
|
}
|
|
@@ -14811,7 +14811,7 @@ function getLegDelta(leg, currentTick, positionSize, poolTickSpacing, mintTick,
|
|
|
14811
14811
|
const sqrtK = tickToSqrtPriceX96(qStrikeTick);
|
|
14812
14812
|
const sqrtPm = tickToSqrtPriceX96(qMintTick);
|
|
14813
14813
|
const rX192 = sqrtR * sqrtR;
|
|
14814
|
-
const sqrtKPmX96 = sqrtK * Q96$
|
|
14814
|
+
const sqrtKPmX96 = sqrtK * Q96$2 / sqrtPm;
|
|
14815
14815
|
const diff = sqrtR - sqrtKPmX96;
|
|
14816
14816
|
const diffSqX192 = diff * diff;
|
|
14817
14817
|
return divTrunc(m * diffSqX192, rX192 - Q192$3);
|
|
@@ -14870,7 +14870,7 @@ function getLegGamma(leg, currentTick, positionSize, poolTickSpacing, assetIndex
|
|
|
14870
14870
|
const sqrtKPR = tickToSqrtPriceX96(qStrikeTick + qCurrentTick + halfWidthTick);
|
|
14871
14871
|
const sqrtR = tickToSqrtPriceX96(halfWidthTick);
|
|
14872
14872
|
const rX192 = sqrtR * sqrtR;
|
|
14873
|
-
const numerator = m * sqrtKPR * Q96$
|
|
14873
|
+
const numerator = m * sqrtKPR * Q96$2;
|
|
14874
14874
|
const denominator = 2n * (rX192 - Q192$3);
|
|
14875
14875
|
return divTrunc(numerator, denominator);
|
|
14876
14876
|
}
|
|
@@ -23595,6 +23595,7 @@ async function fetchV3BlockSnapshot(client, poolAddress, blockNumber, uniqueTick
|
|
|
23595
23595
|
for (let i = 0; i < uniqueTicks.length; i++) {
|
|
23596
23596
|
const tickResult = results[3 + i];
|
|
23597
23597
|
tickData.set(uniqueTicks[i], {
|
|
23598
|
+
liquidityGross: tickResult[0],
|
|
23598
23599
|
feeGrowthOutside0: tickResult[2],
|
|
23599
23600
|
feeGrowthOutside1: tickResult[3]
|
|
23600
23601
|
});
|
|
@@ -23640,6 +23641,7 @@ async function fetchV4BlockSnapshot(client, stateViewAddress, poolId, blockNumbe
|
|
|
23640
23641
|
for (let i = 0; i < uniqueTicks.length; i++) {
|
|
23641
23642
|
const tickResult = results[2 + i];
|
|
23642
23643
|
tickData.set(uniqueTicks[i], {
|
|
23644
|
+
liquidityGross: tickResult[0],
|
|
23643
23645
|
feeGrowthOutside0: tickResult[2],
|
|
23644
23646
|
feeGrowthOutside1: tickResult[3]
|
|
23645
23647
|
});
|
|
@@ -26894,7 +26896,7 @@ async function forceExerciseAndWait(params) {
|
|
|
26894
26896
|
//#endregion
|
|
26895
26897
|
//#region src/panoptic/v2/writes/protectedSettle.ts
|
|
26896
26898
|
const POOL_ID_MASK = (1n << 64n) - 1n;
|
|
26897
|
-
const Q96 = 1n << 96n;
|
|
26899
|
+
const Q96$1 = 1n << 96n;
|
|
26898
26900
|
const MAX_UINT128$1 = (1n << 128n) - 1n;
|
|
26899
26901
|
const SETTLE_LIMITS = [
|
|
26900
26902
|
-887272n,
|
|
@@ -26914,7 +26916,7 @@ function minimumPokeSize(legs, tickSpacing) {
|
|
|
26914
26916
|
const sqrtLower = tickToSqrtPriceX96(lowerTick);
|
|
26915
26917
|
const sqrtUpper = tickToSqrtPriceX96(upperTick);
|
|
26916
26918
|
const delta = sqrtUpper - sqrtLower;
|
|
26917
|
-
const liquidityFactor = leg.asset === 0n ? sqrtLower * sqrtUpper / Q96 : Q96;
|
|
26919
|
+
const liquidityFactor = leg.asset === 0n ? sqrtLower * sqrtUpper / Q96$1 : Q96$1;
|
|
26918
26920
|
if (liquidityFactor === 0n) return void 0;
|
|
26919
26921
|
const requiredAmount = ceilDiv$1(delta, liquidityFactor);
|
|
26920
26922
|
const legSize = ceilDiv$1(requiredAmount, leg.optionRatio);
|
|
@@ -32202,15 +32204,29 @@ var _4663 = {
|
|
|
32202
32204
|
"panoptic": {
|
|
32203
32205
|
"pool": {
|
|
32204
32206
|
"version": "v4",
|
|
32205
|
-
"panopticPool": "
|
|
32206
|
-
"collateralTracker0": "
|
|
32207
|
-
"collateralTracker1": "
|
|
32207
|
+
"panopticPool": "0x000000000c21b38c54AcA7c7145Df01ff09d69Bb",
|
|
32208
|
+
"collateralTracker0": "0xDc508622CD7e3850c8240e88c10361Cf493465b6",
|
|
32209
|
+
"collateralTracker1": "0x9212d804953bAf89C24ceFa6545aA293bA08a876"
|
|
32210
|
+
},
|
|
32211
|
+
"additionalPools": {
|
|
32212
|
+
"spyUsdg30bpsV4": {
|
|
32213
|
+
"version": "v4",
|
|
32214
|
+
"panopticPool": "0x00000000989bcb6f24af4a1Ab2A6d6a31c98A58E",
|
|
32215
|
+
"collateralTracker0": "0x49eaAC32A7CD4B8fB2209a12859a95E0b20aB0e5",
|
|
32216
|
+
"collateralTracker1": "0x670C44a0FC35dbC410498e47A6290a1C3196d191"
|
|
32217
|
+
},
|
|
32218
|
+
"spyUsdg5bpsV4": {
|
|
32219
|
+
"version": "v4",
|
|
32220
|
+
"panopticPool": "0x000000000c21b38c54AcA7c7145Df01ff09d69Bb",
|
|
32221
|
+
"collateralTracker0": "0xDc508622CD7e3850c8240e88c10361Cf493465b6",
|
|
32222
|
+
"collateralTracker1": "0x9212d804953bAf89C24ceFa6545aA293bA08a876"
|
|
32223
|
+
}
|
|
32208
32224
|
},
|
|
32209
32225
|
"v2": {
|
|
32210
32226
|
"semiFungiblePositionManagerV4": "0x00000000000005C3287f136Ef5AF56c68Ea6849f",
|
|
32211
32227
|
"semiFungiblePositionManagerV3": "0x00000000000005E4693aDc8Ec0f12D686f728198",
|
|
32212
32228
|
"builderFactory": "0x0000000000000a3D22E158417AA639D7F71b0FF7",
|
|
32213
|
-
"riskEngine": "
|
|
32229
|
+
"riskEngine": "0x0000000000000fE1E261f66ce2F44def4F5Ae0CB",
|
|
32214
32230
|
"panopticPoolImplementation": "0x000000000000135429F0DaCaB61639Bf6a63EbbC",
|
|
32215
32231
|
"collateralTrackerImplementation": "0x0000000000001d9c38CA405A2e04420865A08A33",
|
|
32216
32232
|
"panopticFactoryV4": "0x0000000000000c51d0f8cf4bd9adE7191372a625",
|
|
@@ -32226,13 +32242,29 @@ var _4663 = {
|
|
|
32226
32242
|
"0x0000000000000fe1e261f66ce2f44def4f5ae0cb",
|
|
32227
32243
|
"0x0000000000000f3fb82469581A74776178E76Ca4"
|
|
32228
32244
|
],
|
|
32229
|
-
"markets": {
|
|
32230
|
-
"
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32245
|
+
"markets": {
|
|
32246
|
+
"spyUsdg": {
|
|
32247
|
+
"currency0": "0x117cc2133c37B721F49dE2A7a74833232B3B4C0C",
|
|
32248
|
+
"currency1": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
|
|
32249
|
+
"fee": 500,
|
|
32250
|
+
"tickSpacing": 5,
|
|
32251
|
+
"poolId": "0xe5923c8a8be481ec89a2ca784a2bbfa4235de6d88f92260fd66b660c4babf907"
|
|
32252
|
+
},
|
|
32253
|
+
"spyUsdg30bps": {
|
|
32254
|
+
"currency0": "0x117cc2133c37B721F49dE2A7a74833232B3B4C0C",
|
|
32255
|
+
"currency1": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
|
|
32256
|
+
"fee": 3e3,
|
|
32257
|
+
"tickSpacing": 60,
|
|
32258
|
+
"poolId": "0xfe2a80bb5618fd14984b92ca6d45bf5ba67443ddb1435e28b2e48df2fc1526cd"
|
|
32259
|
+
},
|
|
32260
|
+
"spyUsdg5bps": {
|
|
32261
|
+
"currency0": "0x117cc2133c37B721F49dE2A7a74833232B3B4C0C",
|
|
32262
|
+
"currency1": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
|
|
32263
|
+
"fee": 500,
|
|
32264
|
+
"tickSpacing": 5,
|
|
32265
|
+
"poolId": "0xe5923c8a8be481ec89a2ca784a2bbfa4235de6d88f92260fd66b660c4babf907"
|
|
32266
|
+
}
|
|
32267
|
+
},
|
|
32236
32268
|
"subgraphs": {
|
|
32237
32269
|
"hypovault": "https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/hypovault-subgraph-robinhood/prod/gn",
|
|
32238
32270
|
"panoptic": "https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/panoptic-subgraph-robinhood/v2_prod/gn"
|
|
@@ -32400,6 +32432,10 @@ function getSpyUsdgMarket(deployment) {
|
|
|
32400
32432
|
if (market === void 0) throw new Error(`Missing SPY/USDG market for chainId ${deployment.chainId}`);
|
|
32401
32433
|
return market;
|
|
32402
32434
|
}
|
|
32435
|
+
function requireDeploymentValue(value, label) {
|
|
32436
|
+
if (value === void 0) throw new Error(`Missing deployment value: ${label}`);
|
|
32437
|
+
return value;
|
|
32438
|
+
}
|
|
32403
32439
|
const MAINNET_DEPLOYMENT = CHAIN_DEPLOYMENTS[MAINNET_CHAIN_ID];
|
|
32404
32440
|
const MAINNET_ETH_USDC_5BPS_V3_PANOPTIC_POOL_ADDRESSES = MAINNET_DEPLOYMENT.panoptic.additionalPools?.ethUsdc5bpsV3;
|
|
32405
32441
|
const MAINNET_PANOPTIC_V2_ADDRESSES = MAINNET_DEPLOYMENT.panoptic.v2;
|
|
@@ -32428,9 +32464,13 @@ const ROBINHOOD_HYPOVAULT_ADDRESSES = ROBINHOOD_DEPLOYMENT.hypovault.vaults;
|
|
|
32428
32464
|
const ROBINHOOD_HYPOVAULT_MANAGER_ADDRESSES = ROBINHOOD_DEPLOYMENT.hypovault.managers;
|
|
32429
32465
|
const ROBINHOOD_HYPOVAULT_MANAGER_TURNKEY_SIGNERS = ROBINHOOD_DEPLOYMENT.hypovault.turnkeySigners;
|
|
32430
32466
|
const ROBINHOOD_PANOPTIC_POOL_ADDRESSES = ROBINHOOD_DEPLOYMENT.panoptic.pool;
|
|
32467
|
+
const ROBINHOOD_SPY_USDG_30BPS_PANOPTIC_POOL_ADDRESSES = requireDeploymentValue(ROBINHOOD_DEPLOYMENT.panoptic.additionalPools?.spyUsdg30bpsV4, "Robinhood SPY/USDG 30bps Panoptic pool");
|
|
32468
|
+
const ROBINHOOD_SPY_USDG_5BPS_PANOPTIC_POOL_ADDRESSES = requireDeploymentValue(ROBINHOOD_DEPLOYMENT.panoptic.additionalPools?.spyUsdg5bpsV4, "Robinhood SPY/USDG 5bps Panoptic pool");
|
|
32431
32469
|
const ROBINHOOD_PANOPTIC_V2_ADDRESSES = ROBINHOOD_DEPLOYMENT.panoptic.v2;
|
|
32432
32470
|
const ROBINHOOD_RISK_ENGINES = ROBINHOOD_DEPLOYMENT.riskEngines;
|
|
32433
32471
|
const ROBINHOOD_SPY_USDG_MARKET = getSpyUsdgMarket(ROBINHOOD_DEPLOYMENT);
|
|
32472
|
+
const ROBINHOOD_SPY_USDG_30BPS_MARKET = requireDeploymentValue(ROBINHOOD_DEPLOYMENT.markets.spyUsdg30bps, "Robinhood SPY/USDG 30bps market");
|
|
32473
|
+
const ROBINHOOD_SPY_USDG_5BPS_MARKET = requireDeploymentValue(ROBINHOOD_DEPLOYMENT.markets.spyUsdg5bps, "Robinhood SPY/USDG 5bps market");
|
|
32434
32474
|
|
|
32435
32475
|
//#endregion
|
|
32436
32476
|
//#region ../deployments/src/vaultDisplayNames.js
|
|
@@ -32521,6 +32561,132 @@ function marketRiskFromValues({ lower, current, upper }) {
|
|
|
32521
32561
|
};
|
|
32522
32562
|
}
|
|
32523
32563
|
|
|
32564
|
+
//#endregion
|
|
32565
|
+
//#region src/panoptic/v2/greeks/positionVolatility.ts
|
|
32566
|
+
const Precision = Decimal.clone({ precision: 80 });
|
|
32567
|
+
const Q96 = 1n << 96n;
|
|
32568
|
+
const YEAR_SECONDS = new Precision(31536e3);
|
|
32569
|
+
/** The premium-free position curve, expressed in one quote token's human units. */
|
|
32570
|
+
function preparePositionGamma({ tokenId, positionSize, quoteIsToken0, quoteDecimals }) {
|
|
32571
|
+
if (positionSize <= 0n || positionSize >= 1n << 128n) throw new RangeError("Invalid position size");
|
|
32572
|
+
if (!Number.isInteger(quoteDecimals) || quoteDecimals < 0 || quoteDecimals > 255) throw new RangeError("Invalid quote decimals");
|
|
32573
|
+
const decoded = decodeTokenId(tokenId);
|
|
32574
|
+
const chunks = decoded.legs.flatMap((leg) => {
|
|
32575
|
+
if (leg.width === 0n) return [];
|
|
32576
|
+
const width = leg.width * decoded.tickSpacing;
|
|
32577
|
+
const lowerTick = leg.strike - width / 2n;
|
|
32578
|
+
const upperTick = leg.strike + (width + 1n) / 2n;
|
|
32579
|
+
if (lowerTick < -887272n || upperTick > 887272n || lowerTick >= upperTick) throw new RangeError("Invalid position range");
|
|
32580
|
+
const lower = tickToSqrtPriceX96(lowerTick);
|
|
32581
|
+
const upper = tickToSqrtPriceX96(upperTick);
|
|
32582
|
+
const amount = positionSize * leg.optionRatio;
|
|
32583
|
+
const liquidity = leg.asset === 0n ? amount * (lower * upper / Q96) / (upper - lower) : amount * Q96 / (upper - lower);
|
|
32584
|
+
if (liquidity >= 1n << 128n) throw new RangeError("Liquidity exceeds uint128");
|
|
32585
|
+
return [{
|
|
32586
|
+
lowerTick: Number(lowerTick),
|
|
32587
|
+
upperTick: Number(upperTick),
|
|
32588
|
+
liquidity,
|
|
32589
|
+
isLong: leg.isLong
|
|
32590
|
+
}];
|
|
32591
|
+
});
|
|
32592
|
+
const scale = new Precision(10).pow(quoteDecimals);
|
|
32593
|
+
const atTick = (tick) => {
|
|
32594
|
+
const netLiquidity = chunks.reduce((sum$1, chunk) => tick >= BigInt(chunk.lowerTick) && tick < BigInt(chunk.upperTick) ? sum$1 + (chunk.isLong ? -chunk.liquidity : chunk.liquidity) : sum$1, 0n);
|
|
32595
|
+
const sqrt = new Precision(tickToSqrtPriceX96(tick).toString()).div(Q96.toString());
|
|
32596
|
+
const gamma = new Precision(netLiquidity.toString()).neg().div(2).div(scale);
|
|
32597
|
+
return quoteIsToken0 ? gamma.div(sqrt) : gamma.mul(sqrt);
|
|
32598
|
+
};
|
|
32599
|
+
const inRange = (low, high) => {
|
|
32600
|
+
if (low > high) throw new RangeError("Invalid candle range");
|
|
32601
|
+
const ticks = new Set([low, high]);
|
|
32602
|
+
for (const chunk of chunks) for (const boundary of [BigInt(chunk.lowerTick), BigInt(chunk.upperTick)]) {
|
|
32603
|
+
if (boundary >= low && boundary <= high) ticks.add(boundary);
|
|
32604
|
+
if (boundary - 1n >= low && boundary - 1n <= high) ticks.add(boundary - 1n);
|
|
32605
|
+
}
|
|
32606
|
+
return [...ticks].map(atTick);
|
|
32607
|
+
};
|
|
32608
|
+
return {
|
|
32609
|
+
chunks,
|
|
32610
|
+
atTick,
|
|
32611
|
+
inRange
|
|
32612
|
+
};
|
|
32613
|
+
}
|
|
32614
|
+
/** Historical whole-position diagnostics, with signs retained independently of eligibility. */
|
|
32615
|
+
function calculatePositionVolatilityMetrics({ observations, netPremium, baseFees, quoteDecimals }) {
|
|
32616
|
+
if (observations.length < 2) throw new RangeError("At least two price observations are required");
|
|
32617
|
+
if (!Number.isInteger(quoteDecimals) || quoteDecimals < 0 || quoteDecimals > 255) throw new RangeError("Invalid quote decimals");
|
|
32618
|
+
const points = observations.map((point) => ({
|
|
32619
|
+
...point,
|
|
32620
|
+
price: new Precision(point.price),
|
|
32621
|
+
gamma: new Precision(point.gamma),
|
|
32622
|
+
rangeGammas: (point.rangeGammas ?? []).map((gamma) => new Precision(gamma))
|
|
32623
|
+
}));
|
|
32624
|
+
for (const point of points) if (!point.price.isFinite() || point.price.lte(0) || !point.gamma.isFinite() || point.rangeGammas.some((gamma) => !gamma.isFinite())) throw new RangeError("Invalid price or gamma observation");
|
|
32625
|
+
const quantum = new Precision(10).pow(-quoteDecimals);
|
|
32626
|
+
const gammas = points.flatMap((point) => [point.gamma, ...point.rangeGammas]);
|
|
32627
|
+
const peak = gammas.reduce((max, gamma) => Precision.max(max, gamma.abs()), new Precision(0));
|
|
32628
|
+
const tolerance = Precision.max(quantum, peak.mul("1e-12"));
|
|
32629
|
+
const positive = gammas.some((gamma) => gamma.gt(tolerance));
|
|
32630
|
+
const negative = gammas.some((gamma) => gamma.lt(tolerance.neg()));
|
|
32631
|
+
const gammaSign = positive && negative ? "changing" : positive ? "positive" : negative ? "negative" : "zero";
|
|
32632
|
+
let exposure = new Precision(0);
|
|
32633
|
+
let signedConvexity = new Precision(0);
|
|
32634
|
+
let absoluteConvexity = new Precision(0);
|
|
32635
|
+
let years = new Precision(0);
|
|
32636
|
+
for (let i = 1; i < points.length; i++) {
|
|
32637
|
+
const previous = points[i - 1];
|
|
32638
|
+
const point = points[i];
|
|
32639
|
+
const seconds = point.timestamp - previous.timestamp;
|
|
32640
|
+
if (seconds <= 0n) throw new RangeError("Observations must have increasing timestamps");
|
|
32641
|
+
const elapsed = new Precision(seconds.toString()).div(YEAR_SECONDS);
|
|
32642
|
+
const squaredReturn = point.price.div(previous.price).ln().pow(2);
|
|
32643
|
+
exposure = exposure.plus(previous.gamma.abs().mul(elapsed));
|
|
32644
|
+
signedConvexity = signedConvexity.plus(previous.gamma.mul(squaredReturn).div(2));
|
|
32645
|
+
absoluteConvexity = absoluteConvexity.plus(previous.gamma.abs().mul(squaredReturn).div(2));
|
|
32646
|
+
years = years.plus(elapsed);
|
|
32647
|
+
}
|
|
32648
|
+
const sufficientExposure = exposure.gt(tolerance.mul(years).mul(100));
|
|
32649
|
+
const premium = netPremium === null ? null : new Precision(netPremium);
|
|
32650
|
+
const fees = baseFees == null ? null : new Precision(baseFees);
|
|
32651
|
+
if (premium !== null && !premium.isFinite() || fees !== null && !fees.isFinite()) throw new RangeError("Invalid accounting amount");
|
|
32652
|
+
const consistent = (amount) => gammaSign === "positive" ? amount.lte(quantum) : gammaSign === "negative" && amount.gte(quantum.neg());
|
|
32653
|
+
const reason = !sufficientExposure ? "insufficient-exposure" : gammaSign === "changing" ? "changing-sign" : premium === null ? "premium-unavailable" : !consistent(premium) ? "inconsistent-premium-direction" : null;
|
|
32654
|
+
const equivalent = (amount) => amount.abs().mul(2).div(exposure).sqrt().toString();
|
|
32655
|
+
const coverage = (amount) => absoluteConvexity.gt(quantum) ? amount.abs().div(absoluteConvexity).toString() : null;
|
|
32656
|
+
const eligibleFees = sufficientExposure && fees !== null && consistent(fees);
|
|
32657
|
+
return {
|
|
32658
|
+
gammaSign,
|
|
32659
|
+
exposure: exposure.toString(),
|
|
32660
|
+
signedConvexity: signedConvexity.toString(),
|
|
32661
|
+
absoluteConvexity: absoluteConvexity.toString(),
|
|
32662
|
+
netPremium: premium?.toString() ?? null,
|
|
32663
|
+
estimatedHedgedResult: premium?.plus(signedConvexity).toString() ?? null,
|
|
32664
|
+
weightedRealizedVolatility: sufficientExposure ? equivalent(absoluteConvexity) : null,
|
|
32665
|
+
premiumEquivalentVolatility: reason === null && premium !== null ? equivalent(premium) : null,
|
|
32666
|
+
premiumToConvexity: reason === null && premium !== null ? coverage(premium) : null,
|
|
32667
|
+
baseFees: fees?.toString() ?? null,
|
|
32668
|
+
feeEquivalentVolatility: eligibleFees ? equivalent(fees) : null,
|
|
32669
|
+
feeToConvexity: eligibleFees ? coverage(fees) : null,
|
|
32670
|
+
comparisonReason: reason
|
|
32671
|
+
};
|
|
32672
|
+
}
|
|
32673
|
+
/** Quote-value signed cumulative token increments, excluding revaluation of previous accrual. */
|
|
32674
|
+
function valuePositionAccrual({ snapshots, quoteIsToken0, quoteDecimals }) {
|
|
32675
|
+
let previous0 = 0n;
|
|
32676
|
+
let previous1 = 0n;
|
|
32677
|
+
let total = new Precision(0);
|
|
32678
|
+
for (const snapshot of snapshots) {
|
|
32679
|
+
const amount0 = new Precision((snapshot.token0 - previous0).toString());
|
|
32680
|
+
const amount1 = new Precision((snapshot.token1 - previous1).toString());
|
|
32681
|
+
if (snapshot.sqrtPriceX96 !== void 0 && snapshot.sqrtPriceX96 <= 0n) throw new RangeError("Invalid sqrt price");
|
|
32682
|
+
const price = snapshot.sqrtPriceX96 === void 0 ? new Precision("1.0001").pow(snapshot.tick.toString()) : new Precision(snapshot.sqrtPriceX96.toString()).div(Q96.toString()).pow(2);
|
|
32683
|
+
total = total.plus(quoteIsToken0 ? amount0.plus(amount1.div(price)) : amount1.plus(amount0.mul(price)));
|
|
32684
|
+
previous0 = snapshot.token0;
|
|
32685
|
+
previous1 = snapshot.token1;
|
|
32686
|
+
}
|
|
32687
|
+
return total.div(new Precision(10).pow(quoteDecimals));
|
|
32688
|
+
}
|
|
32689
|
+
|
|
32524
32690
|
//#endregion
|
|
32525
32691
|
//#region src/panoptic/v2/reads/collateralCurve.ts
|
|
32526
32692
|
/** Native-token margin inputs, independent of the tick used to display the curve. */
|
|
@@ -32713,6 +32879,221 @@ function preparePositionValueCurve(curve) {
|
|
|
32713
32879
|
};
|
|
32714
32880
|
}
|
|
32715
32881
|
|
|
32882
|
+
//#endregion
|
|
32883
|
+
//#region src/panoptic/v2/reads/positionVolatilityHistory.ts
|
|
32884
|
+
const signedSlot = (value) => BigInt.asIntN(128, value);
|
|
32885
|
+
const unpack = (value) => ({
|
|
32886
|
+
token0: signedSlot(value),
|
|
32887
|
+
token1: signedSlot(value >> 128n)
|
|
32888
|
+
});
|
|
32889
|
+
/** RPC accounting for exactly one mint lifecycle; candle prices are supplied by the application. */
|
|
32890
|
+
async function getPositionVolatilityHistory({ client, poolAddress, account, tokenId, mintBlock, endBlock, poolConfig, includeBaseFees = false }) {
|
|
32891
|
+
if (mintBlock <= 0n || endBlock <= mintBlock) throw new RangeError("Insufficient lifecycle history");
|
|
32892
|
+
const [mints, burns] = await Promise.all([client.getContractEvents({
|
|
32893
|
+
address: poolAddress,
|
|
32894
|
+
abi: panopticPoolV2Abi,
|
|
32895
|
+
eventName: "OptionMinted",
|
|
32896
|
+
args: {
|
|
32897
|
+
recipient: account,
|
|
32898
|
+
tokenId
|
|
32899
|
+
},
|
|
32900
|
+
fromBlock: mintBlock,
|
|
32901
|
+
toBlock: mintBlock,
|
|
32902
|
+
strict: true
|
|
32903
|
+
}), client.getContractEvents({
|
|
32904
|
+
address: poolAddress,
|
|
32905
|
+
abi: panopticPoolV2Abi,
|
|
32906
|
+
eventName: "OptionBurnt",
|
|
32907
|
+
args: {
|
|
32908
|
+
recipient: account,
|
|
32909
|
+
tokenId
|
|
32910
|
+
},
|
|
32911
|
+
fromBlock: mintBlock,
|
|
32912
|
+
toBlock: endBlock,
|
|
32913
|
+
strict: true
|
|
32914
|
+
})]);
|
|
32915
|
+
const mint$1 = mints[0];
|
|
32916
|
+
if (mints.length !== 1 || !mint$1) throw new Error("Opening event is missing or ambiguous");
|
|
32917
|
+
const balance = decodePositionBalance$1(mint$1.args.balanceData);
|
|
32918
|
+
const close = burns.filter((burn) => burn.blockNumber > mintBlock || burn.logIndex > mint$1.logIndex).sort((a, b) => a.blockNumber === b.blockNumber ? a.logIndex - b.logIndex : a.blockNumber < b.blockNumber ? -1 : 1)[0];
|
|
32919
|
+
const finalBlock = close?.blockNumber ?? endBlock;
|
|
32920
|
+
if (finalBlock <= mintBlock) throw new Error("Intrablock lifecycle cannot be reconstructed");
|
|
32921
|
+
if (close && close.args.positionSize !== balance.positionSize) throw new Error("Position size changed");
|
|
32922
|
+
const [start, end, boundaryPrices] = await Promise.all([
|
|
32923
|
+
getBlockMeta({
|
|
32924
|
+
client,
|
|
32925
|
+
blockNumber: mintBlock
|
|
32926
|
+
}),
|
|
32927
|
+
getBlockMeta({
|
|
32928
|
+
client,
|
|
32929
|
+
blockNumber: finalBlock
|
|
32930
|
+
}),
|
|
32931
|
+
getPriceHistory({
|
|
32932
|
+
client,
|
|
32933
|
+
poolConfig,
|
|
32934
|
+
blockNumbers: [mintBlock, finalBlock]
|
|
32935
|
+
})
|
|
32936
|
+
]);
|
|
32937
|
+
const openingPrice = boundaryPrices.snapshots[0];
|
|
32938
|
+
const endingPrice = boundaryPrices.snapshots[1];
|
|
32939
|
+
if (!openingPrice || !endingPrice) throw new Error("Boundary prices unavailable");
|
|
32940
|
+
const pointCount = Math.min(200, Math.max(2, Number((end.blockTimestamp - start.blockTimestamp) / 900n) + 2));
|
|
32941
|
+
const blockNumbers = [...new Set(interpolateBlocks(mintBlock, finalBlock, pointCount))];
|
|
32942
|
+
const metadata = [];
|
|
32943
|
+
for (let i = 0; i < blockNumbers.length; i += 16) metadata.push(...await Promise.all(blockNumbers.slice(i, i + 16).map((blockNumber) => getBlockMeta({
|
|
32944
|
+
client,
|
|
32945
|
+
blockNumber
|
|
32946
|
+
}))));
|
|
32947
|
+
const timestamps = new Map(metadata.map((meta) => [meta.blockNumber, meta.blockTimestamp]));
|
|
32948
|
+
const chunks = preparePositionGamma({
|
|
32949
|
+
tokenId,
|
|
32950
|
+
positionSize: balance.positionSize,
|
|
32951
|
+
quoteIsToken0: false,
|
|
32952
|
+
quoteDecimals: 0
|
|
32953
|
+
}).chunks.filter((chunk) => chunk.liquidity > 0n);
|
|
32954
|
+
let premiumError = null;
|
|
32955
|
+
let feeError = includeBaseFees ? null : "Base fee history was not requested";
|
|
32956
|
+
let premium = null;
|
|
32957
|
+
let fees = null;
|
|
32958
|
+
try {
|
|
32959
|
+
const settlementLogs = await client.getContractEvents({
|
|
32960
|
+
address: poolAddress,
|
|
32961
|
+
abi: panopticPoolV2Abi,
|
|
32962
|
+
eventName: "PremiumSettled",
|
|
32963
|
+
args: {
|
|
32964
|
+
user: account,
|
|
32965
|
+
tokenId
|
|
32966
|
+
},
|
|
32967
|
+
fromBlock: mintBlock,
|
|
32968
|
+
toBlock: finalBlock,
|
|
32969
|
+
strict: true
|
|
32970
|
+
});
|
|
32971
|
+
const settled = [];
|
|
32972
|
+
const seen = new Set();
|
|
32973
|
+
for (const log of settlementLogs) {
|
|
32974
|
+
if (log.blockNumber === mintBlock && log.logIndex <= mint$1.logIndex) continue;
|
|
32975
|
+
if (close && log.blockNumber === finalBlock && log.logIndex >= close.logIndex) continue;
|
|
32976
|
+
const key = `${log.transactionHash}:${log.logIndex}`;
|
|
32977
|
+
if (seen.has(key)) continue;
|
|
32978
|
+
seen.add(key);
|
|
32979
|
+
const amounts = unpack(log.args.settledAmounts);
|
|
32980
|
+
settled.push({
|
|
32981
|
+
blockNumber: log.blockNumber,
|
|
32982
|
+
settled0: amounts.token0,
|
|
32983
|
+
settled1: amounts.token1
|
|
32984
|
+
});
|
|
32985
|
+
}
|
|
32986
|
+
if (close) {
|
|
32987
|
+
const receipt = await client.getTransactionReceipt({ hash: close.transactionHash });
|
|
32988
|
+
const liquidations = parseEventLogs({
|
|
32989
|
+
abi: panopticPoolV2Abi,
|
|
32990
|
+
logs: receipt.logs.filter((log) => log.address.toLowerCase() === poolAddress.toLowerCase()),
|
|
32991
|
+
eventName: "AccountLiquidated"
|
|
32992
|
+
});
|
|
32993
|
+
if (liquidations.some((event) => event.args.liquidatee.toLowerCase() === account.toLowerCase())) throw new Error("Liquidation premium requires haircut reconciliation");
|
|
32994
|
+
for (const packed of close.args.premiaByLeg) {
|
|
32995
|
+
const amounts = unpack(packed);
|
|
32996
|
+
settled.push({
|
|
32997
|
+
blockNumber: finalBlock,
|
|
32998
|
+
settled0: amounts.token0,
|
|
32999
|
+
settled1: amounts.token1
|
|
33000
|
+
});
|
|
33001
|
+
}
|
|
33002
|
+
}
|
|
33003
|
+
const readableBlocks = close ? blockNumbers.filter((block) => block < finalBlock) : blockNumbers;
|
|
33004
|
+
premium = [];
|
|
33005
|
+
for (let i = 0; i < readableBlocks.length; i += 16) {
|
|
33006
|
+
const history = await getStreamiaHistory({
|
|
33007
|
+
client,
|
|
33008
|
+
panopticPoolAddress: poolAddress,
|
|
33009
|
+
account,
|
|
33010
|
+
tokenId,
|
|
33011
|
+
blockNumbers: readableBlocks.slice(i, i + 16),
|
|
33012
|
+
legs: [],
|
|
33013
|
+
poolConfig,
|
|
33014
|
+
includeUniswapFees: false,
|
|
33015
|
+
settledEvents: settled,
|
|
33016
|
+
_meta: end
|
|
33017
|
+
});
|
|
33018
|
+
for (const snapshot of history.snapshots) {
|
|
33019
|
+
const timestamp = snapshot.blockNumber === void 0 ? void 0 : timestamps.get(snapshot.blockNumber);
|
|
33020
|
+
if (timestamp === void 0) throw new Error("Accounting timestamp missing");
|
|
33021
|
+
premium.push({
|
|
33022
|
+
timestamp,
|
|
33023
|
+
...snapshot.cumulativePanopticPremia
|
|
33024
|
+
});
|
|
33025
|
+
}
|
|
33026
|
+
}
|
|
33027
|
+
if (close) premium.push({
|
|
33028
|
+
timestamp: end.blockTimestamp,
|
|
33029
|
+
...settled.reduce((sum$1, event) => ({
|
|
33030
|
+
token0: sum$1.token0 + event.settled0,
|
|
33031
|
+
token1: sum$1.token1 + event.settled1
|
|
33032
|
+
}), {
|
|
33033
|
+
token0: 0n,
|
|
33034
|
+
token1: 0n
|
|
33035
|
+
})
|
|
33036
|
+
});
|
|
33037
|
+
const openingAccrual = premium[0];
|
|
33038
|
+
if (!openingAccrual || openingAccrual.timestamp !== start.blockTimestamp) throw new Error("Opening premium snapshot missing");
|
|
33039
|
+
premium = premium.map((snapshot) => ({
|
|
33040
|
+
timestamp: snapshot.timestamp,
|
|
33041
|
+
token0: snapshot.token0 - openingAccrual.token0,
|
|
33042
|
+
token1: snapshot.token1 - openingAccrual.token1
|
|
33043
|
+
}));
|
|
33044
|
+
} catch (error) {
|
|
33045
|
+
premium = null;
|
|
33046
|
+
premiumError = error instanceof Error ? error.message : "Premium history unavailable";
|
|
33047
|
+
}
|
|
33048
|
+
if (includeBaseFees) try {
|
|
33049
|
+
const feeBlocks = close ? blockNumbers.filter((block) => block < finalBlock) : blockNumbers;
|
|
33050
|
+
const data = [];
|
|
33051
|
+
for (let i = 0; i < feeBlocks.length; i += 16) data.push(...await fetchUniswapFeeData(client, feeBlocks.slice(i, i + 16), chunks, poolConfig));
|
|
33052
|
+
let total0 = 0n;
|
|
33053
|
+
let total1 = 0n;
|
|
33054
|
+
fees = [];
|
|
33055
|
+
for (let i = 0; i < data.length; i++) {
|
|
33056
|
+
const current = data[i];
|
|
33057
|
+
for (const chunk of chunks) {
|
|
33058
|
+
if ((current.tickData.get(chunk.lowerTick)?.liquidityGross ?? 0n) === 0n || (current.tickData.get(chunk.upperTick)?.liquidityGross ?? 0n) === 0n) throw new Error("LP range was uninitialized; complete base fee history is unavailable");
|
|
33059
|
+
if (i === 0) continue;
|
|
33060
|
+
const previous = feeGrowthInsideX128(data[i - 1], chunk.lowerTick, chunk.upperTick);
|
|
33061
|
+
const next = feeGrowthInsideX128(current, chunk.lowerTick, chunk.upperTick);
|
|
33062
|
+
if (!previous || !next) throw new Error("Range fee growth missing");
|
|
33063
|
+
if (BigInt.asUintN(256, next.feeGrowthInside0X128 - previous.feeGrowthInside0X128) > BigInt.asUintN(256, current.feeGrowthGlobal0 - data[i - 1].feeGrowthGlobal0) || BigInt.asUintN(256, next.feeGrowthInside1X128 - previous.feeGrowthInside1X128) > BigInt.asUintN(256, current.feeGrowthGlobal1 - data[i - 1].feeGrowthGlobal1)) throw new Error("Range fee growth is inconsistent with pool fee growth");
|
|
33064
|
+
const sign = chunk.isLong ? -1n : 1n;
|
|
33065
|
+
total0 += sign * feesFromFeeGrowthDelta(next.feeGrowthInside0X128, previous.feeGrowthInside0X128, chunk.liquidity);
|
|
33066
|
+
total1 += sign * feesFromFeeGrowthDelta(next.feeGrowthInside1X128, previous.feeGrowthInside1X128, chunk.liquidity);
|
|
33067
|
+
}
|
|
33068
|
+
fees.push({
|
|
33069
|
+
timestamp: metadata[i].blockTimestamp,
|
|
33070
|
+
token0: total0,
|
|
33071
|
+
token1: total1
|
|
33072
|
+
});
|
|
33073
|
+
}
|
|
33074
|
+
} catch (error) {
|
|
33075
|
+
fees = null;
|
|
33076
|
+
feeError = error instanceof Error ? error.message : "Base fee history unavailable";
|
|
33077
|
+
}
|
|
33078
|
+
return {
|
|
33079
|
+
start,
|
|
33080
|
+
end,
|
|
33081
|
+
positionSize: balance.positionSize,
|
|
33082
|
+
closed: close !== void 0,
|
|
33083
|
+
openingTick: BigInt(openingPrice.tick),
|
|
33084
|
+
endingTick: BigInt(endingPrice.tick),
|
|
33085
|
+
premium,
|
|
33086
|
+
fees,
|
|
33087
|
+
premiumError,
|
|
33088
|
+
feeError,
|
|
33089
|
+
accountingSamples: blockNumbers.length,
|
|
33090
|
+
maxAccountingIntervalSeconds: metadata.slice(1).reduce((maximum, meta, index) => {
|
|
33091
|
+
const interval = meta.blockTimestamp - metadata[index].blockTimestamp;
|
|
33092
|
+
return interval > maximum ? interval : maximum;
|
|
33093
|
+
}, 0n)
|
|
33094
|
+
};
|
|
33095
|
+
}
|
|
33096
|
+
|
|
32716
33097
|
//#endregion
|
|
32717
33098
|
//#region src/panoptic/v2/react/cacheScopes.ts
|
|
32718
33099
|
/**
|
|
@@ -38196,5 +38577,5 @@ function useTxEventConfirmation({ txHash, poolAddress = zeroAddress, collateralT
|
|
|
38196
38577
|
}
|
|
38197
38578
|
|
|
38198
38579
|
//#endregion
|
|
38199
|
-
export { AccountInsolventError, AlreadyInitializedError, BORROW_INDEX_BITS, BPS_DENOMINATOR, BPS_SCALE, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_MINT_BUFFER, DEFAULT_MIN_SWAP_RATIO_BPS, DEFAULT_RECONNECT_CONFIG, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MARKET_INDICATOR_PERIODS, MAX_TICK, MAX_TRACKED_CHUNKS, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NO_LOWER_LIQUIDATION_TICK, NO_UPPER_LIQUIDATION_TICK, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS, OracleRateLimitedError, PanopticError, PanopticHelperNotDeployedError, PanopticProvider, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, RATE_AT_TARGET_BITS, REORG_DEPTH, REQUIRED_BASE_ERROR_SENTINEL, ReentrancyError, RpcError, RpcResponseError, SCHEMA_VERSION, SECONDS_PER_YEAR, STANDARD_TICK_WIDTHS, STORAGE_PREFIX, STRIKE_LADDER_TARGET_STRIKES, SafeModeError, StaleDataError, StaleOracleError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UnsafePremiumSettlementError, VARIANCE_RATIO_LAG, WAD, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL, ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, addLegToTokenId, addPendingPosition, addTrackedChunks, annualizePerSecondRateWad, applyMintBuffer, applyMintBufferPerToken, apportion, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertLpPositionFunded, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildCreditSwapCall, buildCreditWrappedDispatch, buildOpenPositionCalldata, buildProtectedSettleDispatch, buildProtectedSettlePlan, buildSettleSequenceCalls, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTemporaryLoanRecoveryDispatch, buildTokenShortfallRecoveryDispatch, buildUniqueCredit, buildUniqueLoan, buildUniqueWidthZeroLeg, calculateAccountGreeksPure, calculateMarketIndicator, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculatePositionValues, calculateResyncBlock, calculateSpreadWad, calculateVarianceProfile, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, classifyStrike, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralCurveTicks, collateralRuleKindFor, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, deriveUniqueTokenId, detectReorg, diagnoseOracleSafeMode, dispatch, dispatchAndWait, emptyLiquidateParams, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, executeSettleSequence, executeSettleSequenceAndWait, failPendingPosition, feeGrowthInsideX128, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, fetchUniswapFeeData, forceExercise, forceExerciseAndWait, formatBlockNumber, formatBps, formatCompact, formatDatetime, formatDuration, formatDurationSeconds, formatFeeTier, formatGas, formatGwei, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatPoolIdHex, formatPriceRange, formatRateWad, formatRatioPercent, formatTick, formatTickRange, formatTimestamp, formatTimestampLocale, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatTokenIdHex, formatTokenIdShort, formatTxHash, formatUtilization, formatWad, formatWadPercent, formatWadSigned, formatWei, generateOverlappingTokenIds, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralCurve, getCollateralCurveInputs, getCollateralData, getCollateralRequiredBase, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getExecutableLpMaxSize, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getForfeitablePremium, getGuardianUnlockState, getHedgeLimits, getInterestState, getIrmCurrent, getIrmCurve, getItmAmounts, getLegDelta, getLegDeltaInVaultFrame, getLegGamma, getLegNetValueWidth0, getLegValue, getLiquidationPrices, getMarginBuffer, getMaxPositionSize, getMaxRedeem, getMaxWithdrawable, getNativeTokenPrice, getNetLiquidationValue, getNetLiquidationValues, getNotEnoughTokensError, getOpenPositionIds, getOpenPositionPreview, getOracleRiskParameters, getOracleState, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPendingPositionsKey, getPool, getPoolCurrentTick, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionDeltaMetrics, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositionValueCurve, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getSimpleLoanTokenIndex, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, isCowSupportedChain, isCredit, isCreditLeg, isDefinedRisk, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, isSupportedChain, isolateGroupTokenId, jsonSerializer, ladderStrikeSequence, liquidate, liquidateAndWait, loadCheckpoint, logReturns, marketPnlInQuote, marketRiskFromValues, marketScenario, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, mutationEffects, netLiquidationValueInQuote, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, orderListForSettle, packMarketState, panopticLiquidatorAbi, panopticPoolV2Abi, panopticQueryAbi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, positionValueKey, positionValueTicks, prepareIndicatorCandles, preparePositionValue, preparePositionValueCurve, previewBorrow, previewDeposit, previewMint, previewRedeem, previewRepay, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, queryKeys, quoteLiquidation, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteV3ExactIn, ratePerSecWadToAprPct, realizedBeta, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolveLadderStrike, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, riskEngineAbi, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scaleCollateralRequired, scanChunks, screenAccountExact, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, settlePremiumFrom, settlePremiumFromAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSettlePremiumBatch, simulateSettlePremiumFrom, simulateSettleSequence, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, splitTokenIdByTimescale, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, useAccountCollateral, useAccountGreeks, useAccountPremia, useAccountSummaryBasic, useAccountSummaryRisk, useAddPendingPosition, useApprove, useApproveErc20ForCow, useApproveErc20ForPermit2, useApprovePool, useApproveRouterViaPermit2, useBatchDispatch as useBatchDispatchHook, useBorrow as useBorrowHook, useCancelCowOrder, useCheckCowApproval, useCheckRouterApproval, useChunkSpreads, useClearTrackedPositions, useClosePosition as useClosePositionHook, useClosedPositions, useCollateralBreakdown, useCollateralData, useConfirmPendingPosition, useCowOrderStatus, useCurrentRates, useDeployNewPool as useDeployNewPoolHook, useDeposit as useDepositHook, useDispatch as useDispatchHook, useEstimateCollateralRequired, useEventPoller, useEventSubscription, useExecuteSettleSequence, useFactoryConstructMetadata, useFactoryOwnerOf, useFactoryTokenURI, useFailPendingPosition, useFlowNeutralTokenId, useForceExercise as useForceExerciseHook, useForfeitablePremium, useGuardianUnlockState, useInterestState, useIsLiquidatable, useLiquidate as useLiquidateHook, useLiquidationPrices, useMarginBuffer, useMaxPositionSize, useMaxRedeem, useMaxWithdrawable, useMinePoolAddress as useMinePoolAddressHook, useMintShares, useNativeTokenPrice, useNetLiquidationValue, useNetLiquidationValues, useOpenPosition as useOpenPositionHook, useOpenPositionPreview, useOptimizeRiskPartners, useOracleState, usePanopticContext, usePanopticPoolAddress, usePokeOracle as usePokeOracleHook, usePool, usePoolLiquidities, usePoolVersion, usePosition, usePositionGreeks, usePositions, usePositionsWithPremia, usePreviewBorrow, usePreviewDeposit, usePreviewMint, usePreviewRedeem, usePreviewWithdraw, usePriceHistory, useQuoteCowSwap, useQuoteSwapExactInViaRouter, useQuoteSwapExactOutViaRouter, useRealizedPnL, useRedeem as useRedeemHook, useRepay as useRepayHook, useResolveUniswapV4PoolKey, useRiskParameters, useRollPosition as useRollPositionHook, useSafeMode, useSettleAccumulatedPremia as useSettleAccumulatedPremiaHook, useSettlePremiumFrom as useSettlePremiumFromHook, useSimulateBatchDispatch, useSimulateClosePosition, useSimulateDeployNewPool, useSimulateDeposit, useSimulateDispatch, useSimulateForceExercise, useSimulateLiquidate, useSimulateOpenPosition, useSimulateSFPMBurn, useSimulateSFPMMint, useSimulateSettle, useSimulateSettlePremiumBatch, useSimulateSettlePremiumFrom, useSimulateSettleSequence, useSimulateSwapExactIn, useSimulateSwapExactOut, useSimulateWithdraw, useSmartRepay as useSmartRepayHook, useStreamiaHistory, useSubmitCowOrder, useSupply as useSupplyHook, useSwapExactIn, useSwapExactInViaRouter, useSwapExactOut, useSwapExactOutViaRouter, useSyncPositions, useSyncStatus, useTrackedPositionIds, useTradeHistory, useTxEventConfirmation, useUniswapFeeHistory, useUniswapV3PoolInfo, useUniswapV3PoolLiquidities, useUniswapV4PoolBasicState, useUniswapV4PoolInfo, useUniswapV4PoolLiquidities, useUnsupply as useUnsupplyHook, useUnwrapWeth, useUnwrapXstock, useUtilization, useValidateBuilderCode, useWatchEvents, useWithdraw as useWithdrawHook, useWithdrawWithPositions as useWithdrawWithPositionsHook, useWrapEth, useWrapXstock, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
38580
|
+
export { AccountInsolventError, AlreadyInitializedError, BORROW_INDEX_BITS, BPS_DENOMINATOR, BPS_SCALE, BatchValidationError, BelowMinimumRedemptionError, CastingError, ChunkHasZeroLiquidityError, ChunkLimitError, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_MINT_BUFFER, DEFAULT_MIN_SWAP_RATIO_BPS, DEFAULT_RECONNECT_CONFIG, DEFAULT_VEGOID, DepositTooLargeError, DuplicateTokenIdError, EffectiveLiquidityAboveThresholdError, ExceedsMaximumRedemptionError, InputListFailError, InsufficientCreditLiquidityError, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, LEG_BITS, LEG_LIMITS, LEG_MASKS, LengthMismatchError, LiquidityTooHighError, LoanSlotExhaustedError, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MARKET_INDICATOR_PERIODS, MAX_TICK, MAX_TRACKED_CHUNKS, MINT_BUFFER, MINT_BUFFER_DENOMINATOR, MIN_TICK, MaxRetriesExceededError, MissingPositionIdsError, NO_LOWER_LIQUIDATION_TICK, NO_UPPER_LIQUIDATION_TICK, NetLiquidityZeroError, NetworkMismatchError, NoLegsExercisableError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS, OracleRateLimitedError, PanopticError, PanopticHelperNotDeployedError, PanopticProvider, PanopticValidationError, PoolNotInitializedError, PositionCountNotZeroError, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionTooLargeError, PriceBoundFailError, PriceImpactTooLargeError, ProviderLagError, RATE_AT_TARGET_BITS, REORG_DEPTH, REQUIRED_BASE_ERROR_SENTINEL, ReentrancyError, RpcError, RpcResponseError, SCHEMA_VERSION, SECONDS_PER_YEAR, STANDARD_TICK_WIDTHS, STORAGE_PREFIX, STRIKE_LADDER_TARGET_STRIKES, SafeModeError, StaleDataError, StaleOracleError, SwapTokenMismatchError, SyncTimeoutError, TOKEN_ID_BITS, TokenIdHasZeroLegsError, TooManyLegsOpenError, TransferFailedError, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UnsafePremiumSettlementError, VARIANCE_RATIO_LAG, WAD, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL, ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, addLegToTokenId, addPendingPosition, addTrackedChunks, annualizePerSecondRateWad, applyMintBuffer, applyMintBufferPerToken, apportion, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertLpPositionFunded, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildCreditSwapCall, buildCreditWrappedDispatch, buildOpenPositionCalldata, buildProtectedSettleDispatch, buildProtectedSettlePlan, buildSettleSequenceCalls, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTemporaryLoanRecoveryDispatch, buildTokenShortfallRecoveryDispatch, buildUniqueCredit, buildUniqueLoan, buildUniqueWidthZeroLeg, calculateAccountGreeksPure, calculateMarketIndicator, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculatePositionValues, calculatePositionVolatilityMetrics, calculateResyncBlock, calculateSpreadWad, calculateVarianceProfile, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, classifyStrike, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralCurveTicks, collateralRuleKindFor, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, deriveUniqueTokenId, detectReorg, diagnoseOracleSafeMode, dispatch, dispatchAndWait, emptyLiquidateParams, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, executeSettleSequence, executeSettleSequenceAndWait, failPendingPosition, feeGrowthInsideX128, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, fetchUniswapFeeData, forceExercise, forceExerciseAndWait, formatBlockNumber, formatBps, formatCompact, formatDatetime, formatDuration, formatDurationSeconds, formatFeeTier, formatGas, formatGwei, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, formatPoolIdHex, formatPriceRange, formatRateWad, formatRatioPercent, formatTick, formatTickRange, formatTimestamp, formatTimestampLocale, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatTokenIdHex, formatTokenIdShort, formatTxHash, formatUtilization, formatWad, formatWadPercent, formatWadSigned, formatWei, generateOverlappingTokenIds, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralCurve, getCollateralCurveInputs, getCollateralData, getCollateralRequiredBase, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getExecutableLpMaxSize, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getForfeitablePremium, getGuardianUnlockState, getHedgeLimits, getInterestState, getIrmCurrent, getIrmCurve, getItmAmounts, getLegDelta, getLegDeltaInVaultFrame, getLegGamma, getLegNetValueWidth0, getLegValue, getLiquidationPrices, getMarginBuffer, getMaxPositionSize, getMaxRedeem, getMaxWithdrawable, getNativeTokenPrice, getNetLiquidationValue, getNetLiquidationValues, getNotEnoughTokensError, getOpenPositionIds, getOpenPositionPreview, getOracleRiskParameters, getOracleState, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPendingPositionsKey, getPool, getPoolCurrentTick, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionDeltaMetrics, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositionValueCurve, getPositionVolatilityHistory, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getSimpleLoanTokenIndex, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, isCowSupportedChain, isCredit, isCreditLeg, isDefinedRisk, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, isSupportedChain, isolateGroupTokenId, jsonSerializer, ladderStrikeSequence, liquidate, liquidateAndWait, loadCheckpoint, logReturns, marketPnlInQuote, marketRiskFromValues, marketScenario, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, mutationEffects, netLiquidationValueInQuote, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, orderListForSettle, packMarketState, panopticLiquidatorAbi, panopticPoolV2Abi, panopticQueryAbi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, positionValueKey, positionValueTicks, prepareIndicatorCandles, preparePositionGamma, preparePositionValue, preparePositionValueCurve, previewBorrow, previewDeposit, previewMint, previewRedeem, previewRepay, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, queryKeys, quoteLiquidation, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteV3ExactIn, ratePerSecWadToAprPct, realizedBeta, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolveLadderStrike, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, riskEngineAbi, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scaleCollateralRequired, scanChunks, screenAccountExact, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, settlePremiumFrom, settlePremiumFromAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSettlePremiumBatch, simulateSettlePremiumFrom, simulateSettleSequence, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, splitTokenIdByTimescale, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, useAccountCollateral, useAccountGreeks, useAccountPremia, useAccountSummaryBasic, useAccountSummaryRisk, useAddPendingPosition, useApprove, useApproveErc20ForCow, useApproveErc20ForPermit2, useApprovePool, useApproveRouterViaPermit2, useBatchDispatch as useBatchDispatchHook, useBorrow as useBorrowHook, useCancelCowOrder, useCheckCowApproval, useCheckRouterApproval, useChunkSpreads, useClearTrackedPositions, useClosePosition as useClosePositionHook, useClosedPositions, useCollateralBreakdown, useCollateralData, useConfirmPendingPosition, useCowOrderStatus, useCurrentRates, useDeployNewPool as useDeployNewPoolHook, useDeposit as useDepositHook, useDispatch as useDispatchHook, useEstimateCollateralRequired, useEventPoller, useEventSubscription, useExecuteSettleSequence, useFactoryConstructMetadata, useFactoryOwnerOf, useFactoryTokenURI, useFailPendingPosition, useFlowNeutralTokenId, useForceExercise as useForceExerciseHook, useForfeitablePremium, useGuardianUnlockState, useInterestState, useIsLiquidatable, useLiquidate as useLiquidateHook, useLiquidationPrices, useMarginBuffer, useMaxPositionSize, useMaxRedeem, useMaxWithdrawable, useMinePoolAddress as useMinePoolAddressHook, useMintShares, useNativeTokenPrice, useNetLiquidationValue, useNetLiquidationValues, useOpenPosition as useOpenPositionHook, useOpenPositionPreview, useOptimizeRiskPartners, useOracleState, usePanopticContext, usePanopticPoolAddress, usePokeOracle as usePokeOracleHook, usePool, usePoolLiquidities, usePoolVersion, usePosition, usePositionGreeks, usePositions, usePositionsWithPremia, usePreviewBorrow, usePreviewDeposit, usePreviewMint, usePreviewRedeem, usePreviewWithdraw, usePriceHistory, useQuoteCowSwap, useQuoteSwapExactInViaRouter, useQuoteSwapExactOutViaRouter, useRealizedPnL, useRedeem as useRedeemHook, useRepay as useRepayHook, useResolveUniswapV4PoolKey, useRiskParameters, useRollPosition as useRollPositionHook, useSafeMode, useSettleAccumulatedPremia as useSettleAccumulatedPremiaHook, useSettlePremiumFrom as useSettlePremiumFromHook, useSimulateBatchDispatch, useSimulateClosePosition, useSimulateDeployNewPool, useSimulateDeposit, useSimulateDispatch, useSimulateForceExercise, useSimulateLiquidate, useSimulateOpenPosition, useSimulateSFPMBurn, useSimulateSFPMMint, useSimulateSettle, useSimulateSettlePremiumBatch, useSimulateSettlePremiumFrom, useSimulateSettleSequence, useSimulateSwapExactIn, useSimulateSwapExactOut, useSimulateWithdraw, useSmartRepay as useSmartRepayHook, useStreamiaHistory, useSubmitCowOrder, useSupply as useSupplyHook, useSwapExactIn, useSwapExactInViaRouter, useSwapExactOut, useSwapExactOutViaRouter, useSyncPositions, useSyncStatus, useTrackedPositionIds, useTradeHistory, useTxEventConfirmation, useUniswapFeeHistory, useUniswapV3PoolInfo, useUniswapV3PoolLiquidities, useUniswapV4PoolBasicState, useUniswapV4PoolInfo, useUniswapV4PoolLiquidities, useUnsupply as useUnsupplyHook, useUnwrapWeth, useUnwrapXstock, useUtilization, useValidateBuilderCode, useWatchEvents, useWithdraw as useWithdrawHook, useWithdrawWithPositions as useWithdrawWithPositionsHook, useWrapEth, useWrapXstock, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, valuePositionAccrual, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
38200
38581
|
//# sourceMappingURL=react-public.js.map
|