@panoptic-eng/sdk 1.0.55 → 1.0.57

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.
Files changed (33) hide show
  1. package/dist/chainDeployments-D_bvyWEm.js +408 -0
  2. package/dist/{cow-BahYFov0.js → cow-45nsAaEr.js} +1 -1
  3. package/dist/deployments.js +2 -2
  4. package/dist/deployments.js.map +1 -1
  5. package/dist/index.d.ts +83 -41
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +323 -78
  8. package/dist/index.js.map +1 -1
  9. package/dist/{irm-BsRdsXMS.js → irm-DsM35dGO.js} +2 -409
  10. package/dist/panoptic/v2/index.d.ts +147 -1
  11. package/dist/panoptic/v2/index.d.ts.map +1 -1
  12. package/dist/panoptic/v2/index.js +266 -22
  13. package/dist/panoptic/v2/index.js.map +1 -1
  14. package/dist/panoptic/v2/react-public.d.ts +147 -1
  15. package/dist/panoptic/v2/react-public.d.ts.map +1 -1
  16. package/dist/panoptic/v2/react-public.js +266 -22
  17. package/dist/panoptic/v2/react-public.js.map +1 -1
  18. package/dist/{rates-B0uPUed1.js → rates-CEJz8fjw.js} +1 -1
  19. package/dist/{router-BhJqStSJ.js → router-DOUAKfn6.js} +2 -2
  20. package/dist/{router-kAllFA4i.js → router-DUOHNdYZ.js} +21 -12
  21. package/dist/{transactionFees-DE-Whxab.js → transactionFees-qweht4Rd.js} +54 -28
  22. package/dist/uniswap/index.d.ts +6 -1
  23. package/dist/uniswap/index.d.ts.map +1 -1
  24. package/dist/uniswap/index.js +19 -10
  25. package/dist/uniswap/index.js.map +1 -1
  26. package/dist/{v2-bpvC_P3W.js → v2-B3MqHVHt.js} +247 -12
  27. package/dist/vault-transaction-fees.d.ts +5 -3
  28. package/dist/vault-transaction-fees.d.ts.map +1 -1
  29. package/dist/vault-transaction-fees.js +443 -28
  30. package/dist/vault-transaction-fees.js.map +1 -1
  31. package/dist/{writes-B4nGIi6h.js → writes-CQrevcCu.js} +2 -2
  32. package/dist/zodiac/index.d.ts.map +1 -1
  33. package/package.json +1 -1
@@ -11285,13 +11285,10 @@ function getLpDepositBreakdown(ranges, sqrtPriceX96) {
11285
11285
  }
11286
11286
  };
11287
11287
  }
11288
- /** Full deployed liquidity value; never a leveraged protocol margin estimate. */
11289
- function getLpPositionFunding(params) {
11290
- const { tokenId, positionSize, tickSpacing, sqrtPriceX96, valuationSqrtPriceX96, quoteTokenIndex } = params;
11291
- if (positionSize < 0n || tickSpacing <= 0n || valuationSqrtPriceX96 <= 0n) throw new Error("Invalid LP funding input");
11292
- const legs = decodeAllLegs(tokenId);
11293
- if (legs.length === 0 || legs.some((leg) => leg.isLong || leg.width === 0n)) throw new Error("AMM Liquidity requires short liquidity legs without loans or credits");
11294
- const ranges = legs.map((leg) => {
11288
+ function getUnhedgedLpRanges({ tokenId, positionSize, tickSpacing }) {
11289
+ if (positionSize < 0n || tickSpacing <= 0n) throw new Error("Invalid LP range input");
11290
+ return decodeAllLegs(tokenId).flatMap((leg) => {
11291
+ if (leg.isLong || leg.width === 0n) return [];
11295
11292
  const width = leg.width * tickSpacing;
11296
11293
  const tickLower = leg.strike - width / 2n;
11297
11294
  const tickUpper = leg.strike + (width + 1n) / 2n;
@@ -11299,11 +11296,23 @@ function getLpPositionFunding(params) {
11299
11296
  const upper = tickToSqrtPriceX96(tickUpper);
11300
11297
  const amount = positionSize * leg.optionRatio;
11301
11298
  const liquidity = leg.asset === 0n ? amount * (lower * upper / Q96$2) / (upper - lower) : amount * Q96$2 / (upper - lower);
11302
- return {
11299
+ return liquidity <= 0n ? [] : [{
11303
11300
  tickLower: Number(tickLower),
11304
11301
  tickUpper: Number(tickUpper),
11305
11302
  liquidity
11306
- };
11303
+ }];
11304
+ });
11305
+ }
11306
+ /** Full deployed liquidity value; never a leveraged protocol margin estimate. */
11307
+ function getLpPositionFunding(params) {
11308
+ const { tokenId, positionSize, tickSpacing, sqrtPriceX96, valuationSqrtPriceX96, quoteTokenIndex } = params;
11309
+ if (positionSize < 0n || tickSpacing <= 0n || valuationSqrtPriceX96 <= 0n) throw new Error("Invalid LP funding input");
11310
+ const legs = decodeAllLegs(tokenId);
11311
+ if (legs.length === 0 || legs.some((leg) => leg.isLong || leg.width === 0n)) throw new Error("AMM Liquidity requires short liquidity legs without loans or credits");
11312
+ const ranges = getUnhedgedLpRanges({
11313
+ tokenId,
11314
+ positionSize,
11315
+ tickSpacing
11307
11316
  });
11308
11317
  const breakdown = getLpDepositBreakdown(ranges, sqrtPriceX96);
11309
11318
  const priceSquared = valuationSqrtPriceX96 * valuationSqrtPriceX96;
@@ -12713,11 +12722,11 @@ function createTxResult(client, hash) {
12713
12722
  * @returns TxResult
12714
12723
  */
12715
12724
  async function submitWrite(params) {
12716
- const { client, walletClient, account, address, abi, functionName, args, value, txOverrides } = params;
12725
+ const { client, walletClient, account, address, abi: abi$1, functionName, args, value, txOverrides } = params;
12717
12726
  const broadcaster = txOverrides?.broadcaster;
12718
12727
  if (broadcaster) {
12719
12728
  const data = encodeFunctionData({
12720
- abi,
12729
+ abi: abi$1,
12721
12730
  functionName,
12722
12731
  args
12723
12732
  });
@@ -12749,7 +12758,7 @@ async function submitWrite(params) {
12749
12758
  else {
12750
12759
  const estimated = await client.estimateContractGas({
12751
12760
  address,
12752
- abi,
12761
+ abi: abi$1,
12753
12762
  functionName,
12754
12763
  args,
12755
12764
  account: resolvedAccount,
@@ -12759,7 +12768,7 @@ async function submitWrite(params) {
12759
12768
  }
12760
12769
  const hash = await walletClient.writeContract({
12761
12770
  address,
12762
- abi,
12771
+ abi: abi$1,
12763
12772
  functionName,
12764
12773
  args,
12765
12774
  account: resolvedAccount,
@@ -18566,10 +18575,10 @@ async function getChunkLiquidities(params) {
18566
18575
  */
18567
18576
  async function getFactoryTokenURI(params) {
18568
18577
  const { client, factoryAddress, version, tokenId } = params;
18569
- const abi = version === "v3" ? panopticFactoryV3Abi : panopticFactoryV4Abi;
18578
+ const abi$1 = version === "v3" ? panopticFactoryV3Abi : panopticFactoryV4Abi;
18570
18579
  return client.readContract({
18571
18580
  address: factoryAddress,
18572
- abi,
18581
+ abi: abi$1,
18573
18582
  functionName: "tokenURI",
18574
18583
  args: [tokenId]
18575
18584
  });
@@ -18579,10 +18588,10 @@ async function getFactoryTokenURI(params) {
18579
18588
  */
18580
18589
  async function getFactoryOwnerOf(params) {
18581
18590
  const { client, factoryAddress, version, tokenId } = params;
18582
- const abi = version === "v3" ? panopticFactoryV3Abi : panopticFactoryV4Abi;
18591
+ const abi$1 = version === "v3" ? panopticFactoryV3Abi : panopticFactoryV4Abi;
18583
18592
  return client.readContract({
18584
18593
  address: factoryAddress,
18585
- abi,
18594
+ abi: abi$1,
18586
18595
  functionName: "ownerOf",
18587
18596
  args: [tokenId]
18588
18597
  });
@@ -18592,10 +18601,10 @@ async function getFactoryOwnerOf(params) {
18592
18601
  */
18593
18602
  async function getFactoryConstructMetadata(params) {
18594
18603
  const { client, factoryAddress, version, panopticPoolAddress, symbol0, symbol1, fee } = params;
18595
- const abi = version === "v3" ? panopticFactoryV3Abi : panopticFactoryV4Abi;
18604
+ const abi$1 = version === "v3" ? panopticFactoryV3Abi : panopticFactoryV4Abi;
18596
18605
  return client.readContract({
18597
18606
  address: factoryAddress,
18598
- abi,
18607
+ abi: abi$1,
18599
18608
  functionName: "constructMetadata",
18600
18609
  args: [
18601
18610
  panopticPoolAddress,
@@ -22674,6 +22683,8 @@ async function getUniswapFeeHistory(params) {
22674
22683
  return {
22675
22684
  blockNumber: blockMetadata[i].blockNumber,
22676
22685
  blockTimestamp: blockMetadata[i].blockTimestamp,
22686
+ currentTick: bd.currentTick,
22687
+ sqrtPriceX96: bd.sqrtPriceX96,
22677
22688
  fees: {
22678
22689
  token0: total0 - initialFees0,
22679
22690
  token1: total1 - initialFees1
@@ -22773,6 +22784,7 @@ async function fetchV3BlockSnapshot(client, poolAddress, blockNumber, uniqueTick
22773
22784
  }
22774
22785
  return {
22775
22786
  currentTick: slot0Result[1],
22787
+ sqrtPriceX96: slot0Result[0],
22776
22788
  feeGrowthGlobal0,
22777
22789
  feeGrowthGlobal1,
22778
22790
  tickData
@@ -22816,6 +22828,7 @@ async function fetchV4BlockSnapshot(client, stateViewAddress, poolId, blockNumbe
22816
22828
  }
22817
22829
  return {
22818
22830
  currentTick: slot0Result[1],
22831
+ sqrtPriceX96: slot0Result[0],
22819
22832
  feeGrowthGlobal0: feeGrowthResult[0],
22820
22833
  feeGrowthGlobal1: feeGrowthResult[1],
22821
22834
  tickData
@@ -31540,7 +31553,7 @@ const VAULT_DISPLAY_NAMES_PER_CHAIN = {
31540
31553
  [sepoliaVaults.wethPlpVault.toLowerCase()]: "PLP Vault",
31541
31554
  [sepoliaVaults.usdcPlpVault.toLowerCase()]: "Unicorn Vault"
31542
31555
  },
31543
- [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: "USDG PLP Vault" }
31556
+ [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: "0DTE +67∆ Vault" }
31544
31557
  };
31545
31558
  const VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN = {
31546
31559
  [MAINNET_CHAIN_ID]: {
@@ -31557,9 +31570,240 @@ const VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN = {
31557
31570
  [sepoliaVaults.wethPlpVault.toLowerCase()]: () => "PLP Vault",
31558
31571
  [sepoliaVaults.usdcPlpVault.toLowerCase()]: () => "Unicorn Vault"
31559
31572
  },
31560
- [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: () => "USDG PLP Vault" }
31573
+ [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: () => "0DTE +67∆ Vault" }
31561
31574
  };
31562
31575
 
31563
31576
  //#endregion
31564
- 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, 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, 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, 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, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, isCredit, isCreditLeg, isDefinedRisk, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, isSupportedChain, isolateGroupTokenId, jsonSerializer, ladderStrikeSequence, liquidate, liquidateAndWait, loadCheckpoint, logReturns, minePoolAddress, mint, mintAndWait, mintableAfterBuffer, multicallRead, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, oracleEpochAt, orderListForSettle, packMarketState, panopticLiquidatorAbi, panopticPoolV2Abi, panopticQueryAbi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, prepareIndicatorCandles, preparePositionValue, previewBorrow, previewDeposit, previewMint, previewRedeem, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, 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, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
31577
+ //#region src/panoptic/v2/greeks/marketPnl.ts
31578
+ /** Values and prices use raw token units, matching the net-liquidation-value read. */
31579
+ function netLiquidationValueInQuote(value0, value1, tick, isAssetToken0) {
31580
+ const price = new Decimal("1.0001").pow(tick.toString());
31581
+ return isAssetToken0 ? new Decimal(value1.toString()).plus(new Decimal(value0.toString()).mul(price)) : new Decimal(value0.toString()).plus(new Decimal(value1.toString()).div(price));
31582
+ }
31583
+ /** Apply the accrued-premium offset and optional asset collateral to a relative NLV curve. */
31584
+ function marketPnlInQuote({ relativeValue, premium, assetBalance = 0n, price, baselinePrice }) {
31585
+ return new Decimal(relativeValue).plus(premium).plus(new Decimal(assetBalance.toString()).mul(new Decimal(price).minus(baselinePrice)));
31586
+ }
31587
+ /** Map a common reference-asset shock into a pool tick and quote-token USD multiplier. */
31588
+ function marketScenario({ currentTick, isAssetToken0, assetBeta, quoteBeta, shock }) {
31589
+ const assetFactor = new Decimal(assetBeta).mul(shock).plus(1);
31590
+ const quoteFactor = new Decimal(quoteBeta).mul(shock).plus(1);
31591
+ if (!assetFactor.isFinite() || !quoteFactor.isFinite() || assetFactor.lte(0) || quoteFactor.lte(0)) return null;
31592
+ const shift = assetFactor.div(quoteFactor).ln().div(new Decimal("1.0001").ln());
31593
+ const tick = currentTick + BigInt(shift.mul(isAssetToken0 ? 1 : -1).round().toFixed(0));
31594
+ return tick < -887272n || tick > 887272n ? null : {
31595
+ tick,
31596
+ quoteFactor
31597
+ };
31598
+ }
31599
+ /** Finite-difference risk in raw asset/quote units from three ordered quote prices. */
31600
+ function marketRiskFromValues({ lower, current, upper }) {
31601
+ const left = new Decimal(current.price).minus(lower.price);
31602
+ const right = new Decimal(upper.price).minus(current.price);
31603
+ if (left.lte(0) || right.lte(0)) return null;
31604
+ const leftSlope = new Decimal(current.value).minus(lower.value).div(left);
31605
+ const rightSlope = new Decimal(upper.value).minus(current.value).div(right);
31606
+ const delta = leftSlope.mul(right).plus(rightSlope.mul(left)).div(left.plus(right));
31607
+ const gamma = rightSlope.minus(leftSlope).mul(2).div(left.plus(right)).mul(new Decimal(current.price).pow(2));
31608
+ return {
31609
+ asset: delta,
31610
+ quote: new Decimal(current.value).minus(delta.mul(current.price)),
31611
+ gamma
31612
+ };
31613
+ }
31614
+
31615
+ //#endregion
31616
+ //#region src/panoptic/v2/reads/collateralCurve.ts
31617
+ /** Native-token margin inputs, independent of the tick used to display the curve. */
31618
+ async function getCollateralCurveInputs({ client, poolAddress, account, tokenIds, collateral0, collateral1, blockNumber }) {
31619
+ const ids = [...tokenIds].sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
31620
+ const [tracker0, tracker1] = await Promise.all([collateral0 ?? client.readContract({
31621
+ address: poolAddress,
31622
+ abi: panopticPoolV2Abi,
31623
+ functionName: "collateralToken0",
31624
+ blockNumber
31625
+ }), collateral1 ?? client.readContract({
31626
+ address: poolAddress,
31627
+ abi: panopticPoolV2Abi,
31628
+ functionName: "collateralToken1",
31629
+ blockNumber
31630
+ })]);
31631
+ const [positions, balances0, balances1] = await Promise.all([
31632
+ client.readContract({
31633
+ address: poolAddress,
31634
+ abi: panopticPoolV2Abi,
31635
+ functionName: "getFullPositionsData",
31636
+ args: [
31637
+ account,
31638
+ false,
31639
+ ids
31640
+ ],
31641
+ blockNumber
31642
+ }),
31643
+ client.readContract({
31644
+ address: tracker0,
31645
+ abi: collateralTrackerV2Abi,
31646
+ functionName: "assetsAndInterest",
31647
+ args: [account],
31648
+ blockNumber
31649
+ }),
31650
+ client.readContract({
31651
+ address: tracker1,
31652
+ abi: collateralTrackerV2Abi,
31653
+ functionName: "assetsAndInterest",
31654
+ args: [account],
31655
+ blockNumber
31656
+ })
31657
+ ]);
31658
+ return [
31659
+ positions[0],
31660
+ positions[1],
31661
+ ...positions[2],
31662
+ ...balances0,
31663
+ ...balances1
31664
+ ];
31665
+ }
31666
+ /** A spot-independent sampling grid, including exact liquidation boundaries and their neighbours. */
31667
+ function collateralCurveTicks(tokenIds, liquidationTicks) {
31668
+ const strikes = tokenIds.flatMap((id) => decodeTokenId(id).legs.map((leg) => leg.strike));
31669
+ const center = strikes.length === 0 ? 0n : strikes.reduce((a, b) => a + b, 0n) / BigInt(strikes.length);
31670
+ const ticks = new Set([-887272n, 887272n]);
31671
+ for (let i = 0n; i < 250n; i++) {
31672
+ ticks.add(center - 25000n + 50000n * i / 249n);
31673
+ ticks.add(-887272n + 1774544n * i / 249n);
31674
+ }
31675
+ for (const tick of liquidationTicks) {
31676
+ ticks.add(tick - 1n);
31677
+ ticks.add(tick);
31678
+ ticks.add(tick + 1n);
31679
+ }
31680
+ return [...ticks].filter((tick) => tick >= -887272n && tick <= 887272n).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
31681
+ }
31682
+ /** Collateral requirements and liquidation boundaries evaluated at one block. */
31683
+ async function getCollateralCurve({ client, poolAddress, account, queryAddress, tokenIds, blockNumber: requestedBlockNumber }) {
31684
+ const blockNumber = requestedBlockNumber ?? await client.getBlockNumber();
31685
+ const boundaries = await client.readContract({
31686
+ address: queryAddress,
31687
+ abi: panopticQueryAbi$1,
31688
+ functionName: "getLiquidationPrices",
31689
+ args: [
31690
+ poolAddress,
31691
+ account,
31692
+ tokenIds
31693
+ ],
31694
+ blockNumber
31695
+ });
31696
+ const liquidationTicks = boundaries.map(BigInt).filter((tick) => tick >= -887272n && tick <= 887272n);
31697
+ const ticks = collateralCurveTicks(tokenIds, liquidationTicks);
31698
+ const contracts = ticks.map((tick) => ({
31699
+ address: queryAddress,
31700
+ abi: panopticQueryAbi$1,
31701
+ functionName: "checkCollateral",
31702
+ args: [
31703
+ poolAddress,
31704
+ account,
31705
+ tokenIds,
31706
+ Number(tick)
31707
+ ]
31708
+ }));
31709
+ const chunks = [];
31710
+ for (let i = 0; i < contracts.length; i += 100) chunks.push(contracts.slice(i, i + 100));
31711
+ const results = (await Promise.all(chunks.map((batch) => multicall(client, {
31712
+ contracts: batch,
31713
+ blockNumber,
31714
+ allowFailure: false
31715
+ })))).flat();
31716
+ return {
31717
+ blockNumber,
31718
+ liquidationTicks,
31719
+ points: results.map(([collateral0, required0, collateral1, required1], i) => ({
31720
+ tick: ticks[i],
31721
+ collateral0,
31722
+ required0,
31723
+ collateral1,
31724
+ required1
31725
+ }))
31726
+ };
31727
+ }
31728
+
31729
+ //#endregion
31730
+ //#region src/panoptic/v2/reads/positionValueCurve.ts
31731
+ const abi = parseAbi(["function computeNetLiquidationValue(uint256[] positionIdList, uint256 shortPremium, uint256 longPremium, uint256[] positionBalanceArray, int24[] atTicks) pure returns (int256[] value0, int256[] value1)"]);
31732
+ /** Stable identity for a position-dependent curve; premiums and spot are separate inputs. */
31733
+ function positionValueKey(positions) {
31734
+ return [...positions].sort((a, b) => a.tokenId < b.tokenId ? -1 : a.tokenId > b.tokenId ? 1 : 0).map(({ tokenId, positionSize }) => `${tokenId}:${positionSize}`).join(",");
31735
+ }
31736
+ /** All changes in the curve's active liquidity, independent of the current market tick. */
31737
+ function positionValueTicks(positions) {
31738
+ const ticks = new Set([-887272n, 887272n]);
31739
+ for (const { tokenId, positionSize } of positions) {
31740
+ if (tokenId < 0n || tokenId >= 1n << 256n || positionSize <= 0n || positionSize >= 1n << 128n) throw new RangeError("Invalid position id or size");
31741
+ const { legs, tickSpacing } = decodeTokenId(tokenId);
31742
+ for (const leg of legs) {
31743
+ if (leg.width === 0n) continue;
31744
+ const width = leg.width * tickSpacing;
31745
+ const lower = leg.strike - width / 2n;
31746
+ const upper = leg.strike + (width + 1n) / 2n;
31747
+ if (lower < -887272n || upper > 887272n || lower >= upper) throw new RangeError("Invalid position range");
31748
+ ticks.add(lower);
31749
+ ticks.add(upper);
31750
+ }
31751
+ }
31752
+ return [...ticks].sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
31753
+ }
31754
+ /** Read the immutable, premium-free part of NLV from the deployed pure calculation. */
31755
+ async function getPositionValueCurve({ client, queryAddress, positions }) {
31756
+ const ticks = positionValueTicks(positions);
31757
+ const [values0, values1] = await client.readContract({
31758
+ address: queryAddress,
31759
+ abi,
31760
+ functionName: "computeNetLiquidationValue",
31761
+ args: [
31762
+ positions.map((p) => p.tokenId),
31763
+ 0n,
31764
+ 0n,
31765
+ positions.map((p) => p.positionSize),
31766
+ ticks.map(Number)
31767
+ ]
31768
+ });
31769
+ return ticks.map((tick, i) => ({
31770
+ tick,
31771
+ value0: values0[i],
31772
+ value1: values1[i]
31773
+ }));
31774
+ }
31775
+ /**
31776
+ * Between leg boundaries, token0 is affine in inverse sqrt price and token1 in sqrt price.
31777
+ * Endpoint interpolation differs from contract integer rounding by at most a few wei per leg.
31778
+ */
31779
+ function preparePositionValueCurve(curve) {
31780
+ if (curve.length < 2) throw new RangeError("Incomplete position value curve");
31781
+ for (let i = 0; i < curve.length; i++) if (curve[i].tick < -887272n || curve[i].tick > 887272n || i > 0 && curve[i].tick <= curve[i - 1].tick) throw new RangeError("Invalid position value curve ticks");
31782
+ const points = curve.map((point) => ({
31783
+ ...point,
31784
+ sqrt: tickToSqrtPriceX96(point.tick)
31785
+ }));
31786
+ return (tick) => {
31787
+ if (tick < points[0].tick || tick > points[points.length - 1].tick) throw new RangeError("Tick outside position value curve");
31788
+ let lo = 0;
31789
+ let hi = points.length - 1;
31790
+ while (hi - lo > 1) {
31791
+ const mid = Math.floor((lo + hi) / 2);
31792
+ if (points[mid].tick <= tick) lo = mid;
31793
+ else hi = mid;
31794
+ }
31795
+ const left = points[lo];
31796
+ const right = points[hi];
31797
+ const sqrt = tickToSqrtPriceX96(tick);
31798
+ const numerator = sqrt - left.sqrt;
31799
+ const denominator = right.sqrt - left.sqrt;
31800
+ return {
31801
+ value0: left.value0 + (right.value0 - left.value0) * numerator * right.sqrt / (denominator * sqrt),
31802
+ value1: left.value1 + (right.value1 - left.value1) * numerator / denominator
31803
+ };
31804
+ };
31805
+ }
31806
+
31807
+ //#endregion
31808
+ 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, 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, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, 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, 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, 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, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
31565
31809
  //# sourceMappingURL=index.js.map