@panoptic-eng/sdk 1.0.60 → 1.0.61

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.
@@ -9400,6 +9400,10 @@ function extractErrorData(error) {
9400
9400
  error.walk((e) => {
9401
9401
  if (foundData) return false;
9402
9402
  const node = e;
9403
+ if (typeof node.raw === "string" && node.raw.startsWith("0x") && node.raw.length > 10) {
9404
+ foundData = node.raw;
9405
+ return true;
9406
+ }
9403
9407
  if (node.data && typeof node.data === "string" && node.data.startsWith("0x")) {
9404
9408
  foundData = node.data;
9405
9409
  return true;
@@ -9428,6 +9432,7 @@ function extractErrorData(error) {
9428
9432
  let current = error;
9429
9433
  const maxDepth = 10;
9430
9434
  for (let i = 0; i < maxDepth && current; i++) {
9435
+ if (typeof current.raw === "string" && current.raw.startsWith("0x") && current.raw.length > 10) return current.raw;
9431
9436
  if (current.data && typeof current.data === "string" && current.data.startsWith("0x")) return current.data;
9432
9437
  if (current.data && typeof current.data === "object") {
9433
9438
  const nested = current.data;
@@ -9441,7 +9446,7 @@ function extractErrorData(error) {
9441
9446
  }
9442
9447
  const obj = error;
9443
9448
  if (obj.message && typeof obj.message === "string") {
9444
- const signatureMatch = obj.message.match(/signature:\s*(0x[a-fA-F0-9]{8,})/i);
9449
+ const signatureMatch = obj.message.match(/signature:?\s*["']?(0x[a-fA-F0-9]{8,})/i);
9445
9450
  if (signatureMatch) return signatureMatch[1];
9446
9451
  }
9447
9452
  return null;
@@ -11112,12 +11117,12 @@ function generateOverlappingTokenIds(params) {
11112
11117
  //#region src/panoptic/v2/tokenId/split.ts
11113
11118
  const POOL_ID_MASK$3 = (1n << TOKEN_ID_BITS.POOL_ID_SIZE) - 1n;
11114
11119
  const MAX_UINT128$3 = (1n << 128n) - 1n;
11115
- const MAX_UINT256$1 = (1n << 256n) - 1n;
11120
+ const MAX_UINT256$2 = (1n << 256n) - 1n;
11116
11121
  function invalid(message) {
11117
11122
  throw new PanopticValidationError(`splitTokenIdByTimescale: ${message}`);
11118
11123
  }
11119
11124
  function validateInput(tokenId, positionSize) {
11120
- if (tokenId < 0n || tokenId > MAX_UINT256$1) invalid("tokenId must fit in uint256");
11125
+ if (tokenId < 0n || tokenId > MAX_UINT256$2) invalid("tokenId must fit in uint256");
11121
11126
  if (positionSize <= 0n || positionSize > MAX_UINT128$3) invalid("positionSize must be between 1 and uint128.max");
11122
11127
  const legs = decodeAllLegs(tokenId);
11123
11128
  if (legs.length === 0) invalid("tokenId must contain at least one active leg");
@@ -12740,6 +12745,17 @@ function createTxResult(client, hash) {
12740
12745
  * @returns TxResult
12741
12746
  */
12742
12747
  async function submitWrite(params) {
12748
+ try {
12749
+ return await submitWriteRequest({
12750
+ ...params,
12751
+ abi: [...params.abi, ...panopticErrorsAbi]
12752
+ });
12753
+ } catch (error) {
12754
+ if (error instanceof PanopticError) throw error;
12755
+ throw parsePanopticError(error)?.error ?? error;
12756
+ }
12757
+ }
12758
+ async function submitWriteRequest(params) {
12743
12759
  const { client, walletClient, account, address, abi: abi$1, functionName, args, value, txOverrides } = params;
12744
12760
  const broadcaster = txOverrides?.broadcaster;
12745
12761
  if (broadcaster) {
@@ -22321,6 +22337,73 @@ async function optimizeTokenIdRiskPartners(params) {
22321
22337
  return optimizedTokenId;
22322
22338
  }
22323
22339
 
22340
+ //#endregion
22341
+ //#region src/panoptic/v2/reads/tickNetWindows.ts
22342
+ /**
22343
+ * Wide liquidity distributions from several adjacent `getTickNets*` windows.
22344
+ *
22345
+ * @module v2/reads/tickNetWindows
22346
+ */
22347
+ /** Absolute Uniswap V3/V4 tick bounds. */
22348
+ const TICK_MIN$1 = -887272;
22349
+ const TICK_MAX$1 = 887272;
22350
+ /**
22351
+ * Join ascending, edge-sharing windows into one distribution anchored to `windows[mainIndex]`.
22352
+ *
22353
+ * Each `getTickNets*` window is a running sum of liquidityNet from its own first tick (only the
22354
+ * window holding the current tick is rescaled to the pool's liquidity), so a neighbour's values
22355
+ * are off by a constant. Adjacent windows share their edge tick; the offset that makes that tick
22356
+ * agree is applied to the whole neighbour. Stitching stops at the first window that does not share
22357
+ * an edge with the one before it.
22358
+ */
22359
+ function stitchTickNetWindows(windows, mainIndex) {
22360
+ const main = windows[mainIndex];
22361
+ if (!main) return {
22362
+ ticks: [],
22363
+ liquidityNets: []
22364
+ };
22365
+ const ticks = [...main.ticks];
22366
+ const nets = [...main.liquidityNets];
22367
+ for (let i = mainIndex + 1; i < windows.length; i++) {
22368
+ const window = windows[i];
22369
+ const edge = ticks.length - 1;
22370
+ if (!window.ticks.length || window.ticks[0] !== ticks[edge]) break;
22371
+ const offset = nets[edge] - window.liquidityNets[0];
22372
+ ticks.push(...window.ticks.slice(1));
22373
+ nets.push(...window.liquidityNets.slice(1).map((value) => value + offset));
22374
+ }
22375
+ for (let i = mainIndex - 1; i >= 0; i--) {
22376
+ const window = windows[i];
22377
+ const last = window.ticks.length - 1;
22378
+ if (last < 0 || window.ticks[last] !== ticks[0]) break;
22379
+ const offset = nets[0] - window.liquidityNets[last];
22380
+ ticks.unshift(...window.ticks.slice(0, last));
22381
+ nets.unshift(...window.liquidityNets.slice(0, last).map((value) => value + offset));
22382
+ }
22383
+ return {
22384
+ ticks,
22385
+ liquidityNets: nets
22386
+ };
22387
+ }
22388
+ /**
22389
+ * Read the main window around `startTick` plus up to `windowsPerSide` windows of `nTicks` on each
22390
+ * side, in parallel, and stitch them. Side windows that would cross the tick bounds are skipped.
22391
+ */
22392
+ async function readTickNetWindows({ startTick, mainNTicks, nTicks, tickSpacing, windowsPerSide, read }) {
22393
+ const center = Math.trunc(startTick / tickSpacing) * tickSpacing;
22394
+ const half = Number(nTicks) * tickSpacing;
22395
+ const mainHalf = Number(mainNTicks) * tickSpacing;
22396
+ const sideCenters = (direction) => Array.from({ length: windowsPerSide }, (_, k) => center + direction * (mainHalf + half + 2 * half * k)).filter((side) => side - half >= TICK_MIN$1 && side + half <= TICK_MAX$1);
22397
+ const below = sideCenters(-1).reverse();
22398
+ const above = sideCenters(1);
22399
+ const windows = await Promise.all([
22400
+ ...below.map((side) => read(side, nTicks)),
22401
+ read(startTick, mainNTicks),
22402
+ ...above.map((side) => read(side, nTicks))
22403
+ ]);
22404
+ return stitchTickNetWindows(windows, below.length);
22405
+ }
22406
+
22324
22407
  //#endregion
22325
22408
  //#region src/panoptic/v2/reads/liquidity.ts
22326
22409
  /**
@@ -22338,24 +22421,35 @@ async function optimizeTokenIdRiskPartners(params) {
22338
22421
  async function getPoolLiquidities(params) {
22339
22422
  const { client, poolAddress, queryAddress, startTick, nTicks, blockNumber } = params;
22340
22423
  const targetBlockNumber = blockNumber ?? params._meta?.blockNumber ?? await client.getBlockNumber();
22341
- const [result, _meta] = await Promise.all([client.readContract({
22342
- address: queryAddress,
22343
- abi: panopticQueryAbi$1,
22344
- functionName: "getTickNets",
22345
- args: [
22346
- poolAddress,
22347
- Number(startTick),
22348
- nTicks
22349
- ],
22350
- blockNumber: targetBlockNumber
22424
+ const windowsPerSide = params.windowsPerSide ?? 0;
22425
+ if (windowsPerSide > 0 && params.tickSpacing === void 0) throw new PanopticValidationError("getPoolLiquidities: tickSpacing is required with windowsPerSide");
22426
+ const [{ ticks, liquidityNets }, _meta] = await Promise.all([readTickNetWindows({
22427
+ startTick: Number(startTick),
22428
+ mainNTicks: nTicks,
22429
+ nTicks,
22430
+ tickSpacing: params.tickSpacing ?? 1,
22431
+ windowsPerSide,
22432
+ read: (centerTick, windowTicks) => client.readContract({
22433
+ address: queryAddress,
22434
+ abi: panopticQueryAbi$1,
22435
+ functionName: "getTickNets",
22436
+ args: [
22437
+ poolAddress,
22438
+ centerTick,
22439
+ windowTicks
22440
+ ],
22441
+ blockNumber: targetBlockNumber
22442
+ }).then(([tickData, nets]) => ({
22443
+ ticks: tickData,
22444
+ liquidityNets: nets
22445
+ }))
22351
22446
  }), params._meta ?? getBlockMeta({
22352
22447
  client,
22353
22448
  blockNumber: targetBlockNumber
22354
22449
  })]);
22355
- const [tickData, liquidityNets] = result;
22356
22450
  return {
22357
- ticks: [...tickData],
22358
- liquidityNets: [...liquidityNets],
22451
+ ticks,
22452
+ liquidityNets,
22359
22453
  _meta
22360
22454
  };
22361
22455
  }
@@ -23434,6 +23528,32 @@ function computeUniswapFeesForBlock(blockData, legs) {
23434
23528
  total1
23435
23529
  };
23436
23530
  }
23531
+ const MAX_UINT256$1 = 2n ** 256n - 1n;
23532
+ /**
23533
+ * Fee growth per unit of liquidity inside `[lowerTick, upperTick)` at one block,
23534
+ * wrapped to uint256 as the pool computes it. Diff two snapshots with
23535
+ * `feesFromFeeGrowthDelta` to get the fees a constant liquidity earned between them.
23536
+ */
23537
+ function feeGrowthInsideX128(blockData, lowerTick, upperTick) {
23538
+ const lower = blockData.tickData.get(lowerTick);
23539
+ const upper = blockData.tickData.get(upperTick);
23540
+ if (!lower || !upper) return null;
23541
+ const { currentTick } = blockData;
23542
+ const inside = (global, lowerOutside, upperOutside) => {
23543
+ const below = currentTick >= lowerTick ? lowerOutside : global - lowerOutside;
23544
+ const above = currentTick < upperTick ? upperOutside : global - upperOutside;
23545
+ return global - below - above & MAX_UINT256$1;
23546
+ };
23547
+ return {
23548
+ feeGrowthInside0X128: inside(blockData.feeGrowthGlobal0, lower.feeGrowthOutside0, upper.feeGrowthOutside0),
23549
+ feeGrowthInside1X128: inside(blockData.feeGrowthGlobal1, lower.feeGrowthOutside1, upper.feeGrowthOutside1)
23550
+ };
23551
+ }
23552
+ /** Blocks before the chain's Multicall3 deployment need viem's deployless multicall. */
23553
+ function predatesMulticall3(client, blockNumber) {
23554
+ const deployedAt = client.chain?.contracts?.multicall3?.blockCreated;
23555
+ return blockNumber != null && deployedAt != null && blockNumber < BigInt(deployedAt);
23556
+ }
23437
23557
  async function fetchUniswapBlockSnapshot(client, blockNumber, uniqueTicks, poolConfig) {
23438
23558
  if (poolConfig.version === "v3") return fetchV3BlockSnapshot(client, poolConfig.poolAddress, blockNumber, uniqueTicks);
23439
23559
  else return fetchV4BlockSnapshot(client, poolConfig.stateViewAddress, poolConfig.poolId, blockNumber, uniqueTicks);
@@ -23465,7 +23585,8 @@ async function fetchV3BlockSnapshot(client, poolAddress, blockNumber, uniqueTick
23465
23585
  const results = await client.multicall({
23466
23586
  contracts,
23467
23587
  blockNumber,
23468
- allowFailure: false
23588
+ allowFailure: false,
23589
+ deployless: predatesMulticall3(client, blockNumber)
23469
23590
  });
23470
23591
  const slot0Result = results[0];
23471
23592
  const feeGrowthGlobal0 = results[1];
@@ -23510,7 +23631,8 @@ async function fetchV4BlockSnapshot(client, stateViewAddress, poolId, blockNumbe
23510
23631
  const results = await client.multicall({
23511
23632
  contracts,
23512
23633
  blockNumber,
23513
- allowFailure: false
23634
+ allowFailure: false,
23635
+ deployless: predatesMulticall3(client, blockNumber)
23514
23636
  });
23515
23637
  const slot0Result = results[0];
23516
23638
  const feeGrowthResult = results[1];
@@ -23820,23 +23942,34 @@ function clampNTicks(startTick, tickSpacing, nTicks) {
23820
23942
  * for the pool — only a deployed PanopticQuery on the chain.
23821
23943
  */
23822
23944
  async function getUniswapV3PoolLiquidities(params) {
23823
- const { client, poolAddress, queryAddress, startTick, nTicks } = params;
23824
- const safeN = clampNTicks(startTick, 1, nTicks);
23945
+ const { client, poolAddress, queryAddress, startTick, nTicks, windowsPerSide = 0 } = params;
23946
+ if (windowsPerSide > 0 && params.tickSpacing === void 0) throw new PanopticValidationError("getUniswapV3PoolLiquidities: tickSpacing is required with windowsPerSide");
23947
+ const safeN = clampNTicks(startTick, params.tickSpacing ?? 1, nTicks);
23825
23948
  const _meta = await getBlockMeta({ client });
23826
- const [ticks, liquidityNets] = await client.readContract({
23827
- address: queryAddress,
23828
- abi: panopticQueryAbi$1,
23829
- functionName: "getTickNetsV3",
23830
- args: [
23831
- poolAddress,
23832
- startTick,
23833
- safeN
23834
- ],
23835
- blockNumber: _meta.blockNumber
23949
+ const { ticks, liquidityNets } = await readTickNetWindows({
23950
+ startTick,
23951
+ mainNTicks: safeN,
23952
+ nTicks,
23953
+ tickSpacing: params.tickSpacing ?? 1,
23954
+ windowsPerSide,
23955
+ read: (centerTick, windowTicks) => client.readContract({
23956
+ address: queryAddress,
23957
+ abi: panopticQueryAbi$1,
23958
+ functionName: "getTickNetsV3",
23959
+ args: [
23960
+ poolAddress,
23961
+ centerTick,
23962
+ windowTicks
23963
+ ],
23964
+ blockNumber: _meta.blockNumber
23965
+ }).then(([windowTickData, windowNets]) => ({
23966
+ ticks: windowTickData,
23967
+ liquidityNets: windowNets
23968
+ }))
23836
23969
  });
23837
23970
  return {
23838
- ticks: [...ticks],
23839
- liquidityNets: [...liquidityNets],
23971
+ ticks,
23972
+ liquidityNets,
23840
23973
  _meta
23841
23974
  };
23842
23975
  }
@@ -24009,22 +24142,32 @@ async function getUniswapV4PoolLiquidities(params) {
24009
24142
  const { client, queryAddress, poolManager, poolId, tickSpacing, startTick, nTicks } = params;
24010
24143
  const safeN = clampNTicks(startTick, tickSpacing, nTicks);
24011
24144
  const _meta = await getBlockMeta({ client });
24012
- const [ticks, liquidityNets] = await client.readContract({
24013
- address: queryAddress,
24014
- abi: panopticQueryAbi$1,
24015
- functionName: "getTickNetsV4",
24016
- args: [
24017
- poolManager,
24018
- poolId,
24019
- tickSpacing,
24020
- startTick,
24021
- safeN
24022
- ],
24023
- blockNumber: _meta.blockNumber
24145
+ const { ticks, liquidityNets } = await readTickNetWindows({
24146
+ startTick,
24147
+ mainNTicks: safeN,
24148
+ nTicks,
24149
+ tickSpacing,
24150
+ windowsPerSide: params.windowsPerSide ?? 0,
24151
+ read: (centerTick, windowTicks) => client.readContract({
24152
+ address: queryAddress,
24153
+ abi: panopticQueryAbi$1,
24154
+ functionName: "getTickNetsV4",
24155
+ args: [
24156
+ poolManager,
24157
+ poolId,
24158
+ tickSpacing,
24159
+ centerTick,
24160
+ windowTicks
24161
+ ],
24162
+ blockNumber: _meta.blockNumber
24163
+ }).then(([windowTickData, windowNets]) => ({
24164
+ ticks: windowTickData,
24165
+ liquidityNets: windowNets
24166
+ }))
24024
24167
  });
24025
24168
  return {
24026
- ticks: [...ticks],
24027
- liquidityNets: [...liquidityNets],
24169
+ ticks,
24170
+ liquidityNets,
24028
24171
  _meta
24029
24172
  };
24030
24173
  }
@@ -28547,6 +28690,62 @@ async function getLoanPositionsForToken(client, poolAddress, account, existingPo
28547
28690
  };
28548
28691
  });
28549
28692
  }
28693
+ async function buildRepayDispatch(params) {
28694
+ const { client, account, poolAddress, chainId, token, amount, slippageBps, existingPositionIds, builderCode = 0n } = params;
28695
+ if (amount <= 0n) throw new Error("Repayment amount must be positive");
28696
+ const pool = await getPool({
28697
+ client,
28698
+ poolAddress,
28699
+ chainId
28700
+ });
28701
+ const tokenIndex = resolveTokenIndex(token, pool.collateralTracker0.token, pool.collateralTracker1.token);
28702
+ const loans = await getLoanPositionsForToken(client, poolAddress, account, existingPositionIds, tokenIndex);
28703
+ if (loans.length === 0) throw new NoLoanPositionsError(token);
28704
+ const totalDebt = loans.reduce((sum$1, l) => sum$1 + l.tokenAmount, 0n);
28705
+ const loanIds = loans.map((l) => l.tokenId);
28706
+ const remainder = totalDebt > amount ? totalDebt - amount : 0n;
28707
+ const { low: tickLimitLow, high: tickLimitHigh } = tickLimits(pool.currentTick, slippageBps);
28708
+ const ascendingLimits = [
28709
+ tickLimitLow,
28710
+ tickLimitHigh,
28711
+ 0n
28712
+ ];
28713
+ const nonLoanIds = existingPositionIds.filter((id) => !loanIds.includes(id));
28714
+ const opsPositionIds = [...loanIds];
28715
+ const opsSizes = loanIds.map(() => 0n);
28716
+ const opsLimits = loanIds.map(() => ascendingLimits);
28717
+ let finalPositionIdList;
28718
+ if (remainder > 0n) {
28719
+ const { tokenId: newLoanId, adjustedSize } = buildUniqueLoan(pool.poolId, tokenIndex, tokenIndex, pool.currentTick, pool.tickSpacing, nonLoanIds, remainder);
28720
+ opsPositionIds.push(newLoanId);
28721
+ opsSizes.push(adjustedSize);
28722
+ opsLimits.push(ascendingLimits);
28723
+ finalPositionIdList = [...nonLoanIds, newLoanId];
28724
+ } else finalPositionIdList = nonLoanIds;
28725
+ return {
28726
+ positionIdList: opsPositionIds,
28727
+ finalPositionIdList,
28728
+ positionSizes: opsSizes,
28729
+ tickAndSpreadLimits: opsLimits,
28730
+ usePremiaAsCollateral: false,
28731
+ builderCode
28732
+ };
28733
+ }
28734
+ /** Preview the same full or partial repayment dispatch used by smartRepay. */
28735
+ async function previewRepay(params) {
28736
+ const dispatch$1 = await buildRepayDispatch(params);
28737
+ const simulation = await simulateDispatch({
28738
+ client: params.client,
28739
+ account: params.account,
28740
+ poolAddress: params.poolAddress,
28741
+ existingPositionIdList: params.existingPositionIds,
28742
+ ...dispatch$1
28743
+ });
28744
+ return {
28745
+ dispatch: dispatch$1,
28746
+ simulation
28747
+ };
28748
+ }
28550
28749
  /**
28551
28750
  * Smart repay: burns all loan positions for a token and optionally re-opens a smaller one.
28552
28751
  *
@@ -28560,37 +28759,9 @@ async function getLoanPositionsForToken(client, poolAddress, account, existingPo
28560
28759
  * @returns TxResult
28561
28760
  */
28562
28761
  async function smartRepay(params) {
28563
- const { client, walletClient, account, poolAddress, chainId, token, amount, slippageBps, existingPositionIds, builderCode = 0n, txOverrides } = params;
28762
+ const { client, walletClient, account, poolAddress, txOverrides } = params;
28564
28763
  for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
28565
- const pool = await getPool({
28566
- client,
28567
- poolAddress,
28568
- chainId
28569
- });
28570
- const tokenIndex = resolveTokenIndex(token, pool.collateralTracker0.token, pool.collateralTracker1.token);
28571
- const loans = await getLoanPositionsForToken(client, poolAddress, account, existingPositionIds, tokenIndex);
28572
- if (loans.length === 0) throw new NoLoanPositionsError(token);
28573
- const totalDebt = loans.reduce((sum$1, l) => sum$1 + l.tokenAmount, 0n);
28574
- const loanIds = loans.map((l) => l.tokenId);
28575
- const remainder = totalDebt > amount ? totalDebt - amount : 0n;
28576
- const { low: tickLimitLow, high: tickLimitHigh } = tickLimits(pool.currentTick, slippageBps);
28577
- const ascendingLimits = [
28578
- Number(tickLimitLow),
28579
- Number(tickLimitHigh),
28580
- 0
28581
- ];
28582
- const nonLoanIds = existingPositionIds.filter((id) => !loanIds.includes(id));
28583
- const opsPositionIds = [...loanIds];
28584
- const opsSizes = loanIds.map(() => 0n);
28585
- const opsLimits = loanIds.map(() => ascendingLimits);
28586
- let finalPositionIdList;
28587
- if (remainder > 0n) {
28588
- const { tokenId: newLoanId, adjustedSize } = buildUniqueLoan(pool.poolId, tokenIndex, tokenIndex, pool.currentTick, pool.tickSpacing, nonLoanIds, remainder);
28589
- opsPositionIds.push(newLoanId);
28590
- opsSizes.push(adjustedSize);
28591
- opsLimits.push(ascendingLimits);
28592
- finalPositionIdList = [...nonLoanIds, newLoanId];
28593
- } else finalPositionIdList = nonLoanIds;
28764
+ const intent = await buildRepayDispatch(params);
28594
28765
  try {
28595
28766
  return await submitWrite({
28596
28767
  client,
@@ -28600,12 +28771,12 @@ async function smartRepay(params) {
28600
28771
  abi: panopticPoolV2Abi,
28601
28772
  functionName: "dispatch",
28602
28773
  args: [
28603
- opsPositionIds,
28604
- finalPositionIdList,
28605
- opsSizes,
28606
- opsLimits,
28607
- false,
28608
- builderCode
28774
+ intent.positionIdList,
28775
+ intent.finalPositionIdList,
28776
+ intent.positionSizes,
28777
+ intent.tickAndSpreadLimits.map((limits) => limits.map(Number)),
28778
+ intent.usePremiaAsCollateral,
28779
+ intent.builderCode
28609
28780
  ],
28610
28781
  txOverrides
28611
28782
  });
@@ -33094,14 +33265,18 @@ function usePoolLiquidities(poolAddress, params, options) {
33094
33265
  getClientCacheScopeKey(publicClient, clientScope),
33095
33266
  params.queryAddress,
33096
33267
  params.startTick,
33097
- params.nTicks
33268
+ params.nTicks,
33269
+ params.windowsPerSide ?? 0,
33270
+ params.tickSpacing
33098
33271
  ],
33099
33272
  queryFn: () => getPoolLiquidities({
33100
33273
  client: publicClient,
33101
33274
  poolAddress,
33102
33275
  queryAddress: params.queryAddress,
33103
33276
  startTick: params.startTick,
33104
- nTicks: params.nTicks
33277
+ nTicks: params.nTicks,
33278
+ windowsPerSide: params.windowsPerSide,
33279
+ tickSpacing: params.tickSpacing
33105
33280
  }),
33106
33281
  enabled: options?.enabled,
33107
33282
  refetchInterval: options?.refetchInterval,
@@ -34352,17 +34527,21 @@ function useUniswapV3PoolLiquidities(poolAddress, queryAddress, args, options) {
34352
34527
  queryAddress,
34353
34528
  args?.startTick,
34354
34529
  args?.nTicks,
34530
+ args?.windowsPerSide ?? 0,
34531
+ args?.tickSpacing,
34355
34532
  getClientCacheScopeKey(publicClient, clientScope)
34356
34533
  ],
34357
34534
  queryFn: () => {
34358
34535
  if (!poolAddress || !queryAddress || queryAddress === zeroAddress || !args) throw new PanopticValidationError("useUniswapV3PoolLiquidities: missing required args");
34359
- const { startTick, nTicks } = args;
34536
+ const { startTick, nTicks, windowsPerSide, tickSpacing } = args;
34360
34537
  return getUniswapV3PoolLiquidities({
34361
34538
  client: publicClient,
34362
34539
  poolAddress,
34363
34540
  queryAddress,
34364
34541
  startTick,
34365
- nTicks
34542
+ nTicks,
34543
+ windowsPerSide,
34544
+ tickSpacing
34366
34545
  });
34367
34546
  },
34368
34547
  enabled: (options?.enabled ?? true) && !!poolAddress && !!queryAddress && queryAddress !== zeroAddress && !!args,
@@ -34490,11 +34669,12 @@ function useUniswapV4PoolLiquidities(queryAddress, poolManager, poolId, args, op
34490
34669
  args?.tickSpacing,
34491
34670
  args?.startTick,
34492
34671
  args?.nTicks,
34672
+ args?.windowsPerSide ?? 0,
34493
34673
  getClientCacheScopeKey(publicClient, clientScope)
34494
34674
  ],
34495
34675
  queryFn: () => {
34496
34676
  if (!queryAddress || !poolManager || !poolId || !args) throw new PanopticValidationError("useUniswapV4PoolLiquidities: missing required args");
34497
- const { tickSpacing, startTick, nTicks } = args;
34677
+ const { tickSpacing, startTick, nTicks, windowsPerSide } = args;
34498
34678
  return getUniswapV4PoolLiquidities({
34499
34679
  client: publicClient,
34500
34680
  queryAddress,
@@ -34502,7 +34682,8 @@ function useUniswapV4PoolLiquidities(queryAddress, poolManager, poolId, args, op
34502
34682
  poolId,
34503
34683
  tickSpacing,
34504
34684
  startTick,
34505
- nTicks
34685
+ nTicks,
34686
+ windowsPerSide
34506
34687
  });
34507
34688
  },
34508
34689
  enabled: (options?.enabled ?? true) && !!queryAddress && !!poolManager && !!poolId && !!args,
@@ -38015,5 +38196,5 @@ function useTxEventConfirmation({ txHash, poolAddress = zeroAddress, collateralT
38015
38196
  }
38016
38197
 
38017
38198
  //#endregion
38018
- 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, feesFromFeeGrowthDelta, fetchPoolId, fetchSfpmV3PoolId, 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, 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 };
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 };
38019
38200
  //# sourceMappingURL=react-public.js.map