@panoptic-eng/sdk 1.0.73 → 1.0.75

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.
@@ -10133,7 +10133,7 @@ function computeTinyCreditSignedStrike(positionSize, tickSpacing) {
10133
10133
  * `asset === 0 ? signedStrike : -signedStrike` (mirrors
10134
10134
  * {@link buildNeutralLeg} in reads/collateralEstimate.ts).
10135
10135
  */
10136
- function pickUniqueTinyCreditLeg(baseTokenId, legIndex, positionSize, tickSpacing) {
10136
+ function pickUniqueTinyCreditLeg(baseTokenId, legIndex, positionSize, tickSpacing, isAvailable = () => true) {
10137
10137
  const asset = 1n;
10138
10138
  const tokenType = 0n;
10139
10139
  const existingLegs = decodeAllLegs(baseTokenId);
@@ -10146,15 +10146,17 @@ function pickUniqueTinyCreditLeg(baseTokenId, legIndex, positionSize, tickSpacin
10146
10146
  collides = true;
10147
10147
  break;
10148
10148
  }
10149
- if (!collides) break;
10149
+ if (!collides && isAvailable(addLegToTokenId(baseTokenId, tinyCreditLeg(legIndex, candidate)))) break;
10150
10150
  signedStrike += 1n;
10151
10151
  }
10152
10152
  if (signedStrike > maxSafe) throw new PanopticError("deriveUniqueTokenId: exhausted strike space picking a unique tiny credit leg");
10153
- const encodedStrike = asset === 0n ? signedStrike : -signedStrike;
10153
+ return tinyCreditLeg(legIndex, asset === 0n ? signedStrike : -signedStrike);
10154
+ }
10155
+ function tinyCreditLeg(legIndex, encodedStrike) {
10154
10156
  return {
10155
10157
  index: legIndex,
10156
- asset,
10157
- tokenType,
10158
+ asset: 1n,
10159
+ tokenType: 0n,
10158
10160
  optionRatio: 1n,
10159
10161
  isLong: 1n,
10160
10162
  riskPartner: legIndex,
@@ -10221,6 +10223,24 @@ function deriveUniqueTokenId(params) {
10221
10223
  function planDeriveStrategy(baseTokenId) {
10222
10224
  return countLegs(baseTokenId) < MAX_LEGS ? "tiny-credit" : "ratio-scale";
10223
10225
  }
10226
+ /**
10227
+ * Make `tokenId` mintable next to `existingPositionIds`: dispatch treats a held tokenId as
10228
+ * a settle/resize, so a held one gets the tiny credit leg appended (size unchanged).
10229
+ * Returns `tokenId` itself when it is not held, and `undefined` when it is held with all
10230
+ * 4 leg slots used.
10231
+ */
10232
+ function ensureUniqueTokenId(tokenId, existingPositionIds, positionSize, tickSpacing = DEFAULT_TICK_SPACING) {
10233
+ const held = new Set(existingPositionIds);
10234
+ if (!held.has(tokenId)) return tokenId;
10235
+ const legCount = countLegs(tokenId);
10236
+ if (legCount === 0n || legCount >= MAX_LEGS || positionSize <= 0n) return void 0;
10237
+ try {
10238
+ const leg = pickUniqueTinyCreditLeg(tokenId, legCount, positionSize, tickSpacing, (candidate) => !held.has(candidate));
10239
+ return addLegToTokenId(tokenId, leg);
10240
+ } catch {
10241
+ return void 0;
10242
+ }
10243
+ }
10224
10244
 
10225
10245
  //#endregion
10226
10246
  //#region src/panoptic/v2/formatters/amount.ts
@@ -17306,6 +17326,55 @@ const multicallAbi$1 = [{
17306
17326
  }],
17307
17327
  stateMutability: "nonpayable"
17308
17328
  }, ...panopticErrorsAbi];
17329
+ const collateralTrackersByClient = new WeakMap();
17330
+ const readCollateralTrackers = (client, poolAddress) => {
17331
+ const collateralTrackersByPool = collateralTrackersByClient.get(client) ?? new Map();
17332
+ collateralTrackersByClient.set(client, collateralTrackersByPool);
17333
+ const cached = collateralTrackersByPool.get(poolAddress);
17334
+ if (cached) return cached;
17335
+ const trackers = client.multicall({
17336
+ contracts: [{
17337
+ address: poolAddress,
17338
+ abi: panopticPoolV2Abi,
17339
+ functionName: "collateralToken0"
17340
+ }, {
17341
+ address: poolAddress,
17342
+ abi: panopticPoolV2Abi,
17343
+ functionName: "collateralToken1"
17344
+ }],
17345
+ allowFailure: false
17346
+ });
17347
+ collateralTrackersByPool.set(poolAddress, trackers);
17348
+ trackers.catch(() => collateralTrackersByPool.delete(poolAddress));
17349
+ return trackers;
17350
+ };
17351
+ const readInterestOwed = async (client, poolAddress, user, blockNumber) => {
17352
+ try {
17353
+ const [tracker0, tracker1] = await readCollateralTrackers(client, poolAddress);
17354
+ const read = {
17355
+ abi: collateralTrackerV2Abi,
17356
+ functionName: "owedInterest",
17357
+ args: [user]
17358
+ };
17359
+ const [interestOwed0, interestOwed1] = await client.multicall({
17360
+ contracts: [{
17361
+ ...read,
17362
+ address: tracker0
17363
+ }, {
17364
+ ...read,
17365
+ address: tracker1
17366
+ }],
17367
+ allowFailure: false,
17368
+ blockNumber
17369
+ });
17370
+ return {
17371
+ interestOwed0,
17372
+ interestOwed1
17373
+ };
17374
+ } catch {
17375
+ return void 0;
17376
+ }
17377
+ };
17309
17378
  /**
17310
17379
  * Simulate a contract call and measure token flow using PanopticPool.multicall.
17311
17380
  *
@@ -17371,14 +17440,14 @@ async function simulateWithTokenFlow(params) {
17371
17440
  ...postCallData ?? []
17372
17441
  ];
17373
17442
  try {
17374
- const { result } = await client.simulateContract({
17443
+ const [{ result }, interestOwed] = await Promise.all([client.simulateContract({
17375
17444
  address: poolAddress,
17376
17445
  abi: multicallAbi$1,
17377
17446
  functionName: "multicall",
17378
17447
  args: [multicallData],
17379
17448
  account: user,
17380
17449
  blockNumber
17381
- });
17450
+ }), readInterestOwed(client, poolAddress, user, blockNumber)]);
17382
17451
  const decodeAssets = (data) => {
17383
17452
  const decoded = decodeFunctionResult({
17384
17453
  abi: getAssetsOfAbi,
@@ -17424,7 +17493,8 @@ async function simulateWithTokenFlow(params) {
17424
17493
  balanceAfter0: assetsAfter.assets0,
17425
17494
  balanceAfter1: assetsAfter.assets1,
17426
17495
  tickBefore,
17427
- tickAfter
17496
+ tickAfter,
17497
+ ...interestOwed
17428
17498
  },
17429
17499
  gasEstimate,
17430
17500
  postCallResults,
@@ -21238,14 +21308,21 @@ function assembleNeutralTokenId(poolId, baseTokenId, neutralLegs, prepend) {
21238
21308
  * is unavailable, or a neutralizing strike falls outside the valid tick range.
21239
21309
  */
21240
21310
  async function createFlowNeutralTokenId(params) {
21241
- const { client, poolAddress, account, tokenId, positionSize, existingPositionIds, swapAtMint = true, referenceSize, queryAddress, blockNumber } = params;
21311
+ const { client, poolAddress, account, tokenId: requestedTokenId, positionSize, existingPositionIds, swapAtMint = true, referenceSize, queryAddress, blockNumber } = params;
21242
21312
  if (positionSize <= 0n) throw new PanopticError("positionSize must be positive to create flow-neutral position");
21243
21313
  const measureSize = referenceSize !== void 0 && referenceSize > 0n && referenceSize < positionSize ? referenceSize : positionSize;
21244
- const legCount = countLegs(tokenId);
21314
+ const legCount = countLegs(requestedTokenId);
21245
21315
  if (legCount >= 4n) throw new PanopticError("Cannot append neutralizing leg: tokenId already has 4 legs");
21246
- const poolId = tokenId & POOL_ID_MASK$2;
21247
- const baseLegs = decodeAllLegs(tokenId);
21316
+ const poolId = requestedTokenId & POOL_ID_MASK$2;
21317
+ const ensureUnmintedOrThrow = (candidate) => {
21318
+ const unique = ensureUniqueTokenId(candidate, existingPositionIds ?? [], measureSize);
21319
+ if (unique === void 0) throw new PanopticError("Cannot create flow-neutral position: this position is already held");
21320
+ return unique;
21321
+ };
21322
+ const tokenId = ensureUnmintedOrThrow(requestedTokenId);
21323
+ const baseLegs = decodeAllLegs(requestedTokenId);
21248
21324
  const prependNeutral = baseLegs.length === 1 && baseLegs[0].tokenType === baseLegs[0].asset;
21325
+ const assembleUnique = (neutralLegs$1) => ensureUnmintedOrThrow(assembleNeutralTokenId(poolId, requestedTokenId, neutralLegs$1, prependNeutral));
21249
21326
  let credit;
21250
21327
  try {
21251
21328
  credit = await getRequiredCreditForITM({
@@ -21305,7 +21382,7 @@ async function createFlowNeutralTokenId(params) {
21305
21382
  const activeIndices = [0n, 1n].filter((index) => targets[Number(index)] !== 0n);
21306
21383
  if (legCount + BigInt(activeIndices.length) > 4n) throw new PanopticError(`Cannot add ${activeIndices.length} neutralizing leg(s): tokenId would exceed 4 legs`);
21307
21384
  const neutralLegs$1 = activeIndices.map((index) => buildNeutralLeg(index, targets[Number(index)], measureSize));
21308
- const combined$1 = assembleNeutralTokenId(poolId, tokenId, neutralLegs$1, prependNeutral);
21385
+ const combined$1 = assembleUnique(neutralLegs$1);
21309
21386
  if (combined$1 === previousTokenId) break;
21310
21387
  previousTokenId = combined$1;
21311
21388
  let residual$1;
@@ -21409,7 +21486,7 @@ async function createFlowNeutralTokenId(params) {
21409
21486
  const indices = swapAtMint ? [valueAbs(0n, credit.creditAmount0) >= valueAbs(1n, credit.creditAmount1) ? 0n : 1n] : [0n, 1n].filter((i) => valueAbs(i, flowFor(i)) > FLOW_NEUTRAL_DUST_THRESHOLD);
21410
21487
  if (legCount + BigInt(indices.length) > 4n) throw new PanopticError(`Cannot add ${indices.length} neutralizing leg(s): tokenId would exceed 4 legs`);
21411
21488
  const neutralLegs = indices.map((i) => buildNeutralLeg(i, flowFor(i), measureSize));
21412
- const combined = assembleNeutralTokenId(poolId, tokenId, neutralLegs, prependNeutral);
21489
+ const combined = assembleUnique(neutralLegs);
21413
21490
  const pinnedBlock = blockNumber ?? credit._meta.blockNumber;
21414
21491
  let residual;
21415
21492
  try {
@@ -34100,37 +34177,37 @@ const robinhoodUsdgVault = robinhoodDeployment.hypovault.vaults.usdgPlpVault;
34100
34177
  if (robinhoodUsdgVault === void 0) throw new Error("Missing Robinhood USDG PLP vault address");
34101
34178
  const VAULT_DISPLAY_NAMES_PER_CHAIN = {
34102
34179
  [MAINNET_CHAIN_ID]: {
34103
- [mainnetVaults.wethPlpVault.toLowerCase()]: "PLP Vault",
34104
- [mainnetVaults.usdcPlpVault.toLowerCase()]: "Unicorn Vault",
34105
- [legacyMainnetVaults.wethPlpVault.toLowerCase()]: "PLP Vault",
34106
- [legacyMainnetVaults.usdcPlpVault.toLowerCase()]: "Unicorn Vault"
34180
+ [mainnetVaults.wethPlpVault.toLowerCase()]: "ETH Yield Vault",
34181
+ [mainnetVaults.usdcPlpVault.toLowerCase()]: "volUSDC Vault",
34182
+ [legacyMainnetVaults.wethPlpVault.toLowerCase()]: "ETH Yield Vault",
34183
+ [legacyMainnetVaults.usdcPlpVault.toLowerCase()]: "volUSDC Vault"
34107
34184
  },
34108
34185
  [BASE_CHAIN_ID]: {
34109
- [baseVaults.wethPlpVault.toLowerCase()]: "PLP Vault",
34110
- [baseVaults.usdcPlpVault.toLowerCase()]: "Unicorn Vault"
34186
+ [baseVaults.wethPlpVault.toLowerCase()]: "ETH Yield Vault",
34187
+ [baseVaults.usdcPlpVault.toLowerCase()]: "volUSDC Vault"
34111
34188
  },
34112
34189
  [SEPOLIA_CHAIN_ID]: {
34113
- [sepoliaVaults.wethPlpVault.toLowerCase()]: "PLP Vault",
34114
- [sepoliaVaults.usdcPlpVault.toLowerCase()]: "Unicorn Vault"
34190
+ [sepoliaVaults.wethPlpVault.toLowerCase()]: "ETH Yield Vault",
34191
+ [sepoliaVaults.usdcPlpVault.toLowerCase()]: "volUSDC Vault"
34115
34192
  },
34116
- [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: "0DTE +67∆ Vault" }
34193
+ [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: "0DTE +67∆ Covered Call Vault" }
34117
34194
  };
34118
34195
  const VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN = {
34119
34196
  [MAINNET_CHAIN_ID]: {
34120
- [mainnetVaults.wethPlpVault.toLowerCase()]: () => "PLP Vault",
34121
- [mainnetVaults.usdcPlpVault.toLowerCase()]: () => "Unicorn Vault",
34122
- [legacyMainnetVaults.wethPlpVault.toLowerCase()]: () => "PLP Vault",
34123
- [legacyMainnetVaults.usdcPlpVault.toLowerCase()]: () => "Unicorn Vault"
34197
+ [mainnetVaults.wethPlpVault.toLowerCase()]: () => "ETH Yield Vault",
34198
+ [mainnetVaults.usdcPlpVault.toLowerCase()]: () => "volUSDC Vault",
34199
+ [legacyMainnetVaults.wethPlpVault.toLowerCase()]: () => "ETH Yield Vault",
34200
+ [legacyMainnetVaults.usdcPlpVault.toLowerCase()]: () => "volUSDC Vault"
34124
34201
  },
34125
34202
  [BASE_CHAIN_ID]: {
34126
- [baseVaults.wethPlpVault.toLowerCase()]: () => "PLP Vault",
34127
- [baseVaults.usdcPlpVault.toLowerCase()]: () => "Unicorn Vault"
34203
+ [baseVaults.wethPlpVault.toLowerCase()]: () => "ETH Yield Vault",
34204
+ [baseVaults.usdcPlpVault.toLowerCase()]: () => "volUSDC Vault"
34128
34205
  },
34129
34206
  [SEPOLIA_CHAIN_ID]: {
34130
- [sepoliaVaults.wethPlpVault.toLowerCase()]: () => "PLP Vault",
34131
- [sepoliaVaults.usdcPlpVault.toLowerCase()]: () => "Unicorn Vault"
34207
+ [sepoliaVaults.wethPlpVault.toLowerCase()]: () => "ETH Yield Vault",
34208
+ [sepoliaVaults.usdcPlpVault.toLowerCase()]: () => "volUSDC Vault"
34132
34209
  },
34133
- [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: () => "0DTE +67∆ Vault" }
34210
+ [ROBINHOOD_CHAIN_ID]: { [robinhoodUsdgVault.toLowerCase()]: () => "0DTE +67∆ Covered Call Vault" }
34134
34211
  };
34135
34212
 
34136
34213
  //#endregion
@@ -34709,5 +34786,5 @@ async function getPositionVolatilityHistory({ client, poolAddress, account, toke
34709
34786
  }
34710
34787
 
34711
34788
  //#endregion
34712
- 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, calculatePositionVolatilityMetrics, calculateResyncBlock, calculateSpreadWad, calculateVarianceProfile, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, classifyStrike, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralCurveTicks, collateralRuleKindFor, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, deriveUniqueTokenId, detectReorg, diagnoseOracleSafeMode, dispatch, dispatchAndWait, emptyLiquidateParams, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCloseZapSwap, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, executeSettleSequence, executeSettleSequenceAndWait, failPendingPosition, feeGrowthInsideX128, feesFromFeeGrowthDelta, fetchPoolId, fetchPoolSwaps, 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, getClosePositionTransferEstimate, 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, getLegLiquidityRange, getLegNetValueWidth0, getLegTokenInventory, 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, getPositionMintFunding, getPositionValueCurve, getPositionVolatilityHistory, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getSimpleLoanTokenIndex, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenIdValidationError, 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, parseStreamedKey, parseStreamedSwap, parseSwapLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, positionValueKey, positionValueTicks, prepareIndicatorCandles, prepareLiquidityGamma, preparePositionGamma, preparePositionValue, preparePositionValueCurve, previewBorrow, previewDeposit, previewMint, previewRedeem, previewRepay, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, quoteLiquidation, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteTokenShortfallSwap, 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, simulateClosePremiumProtection, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSettlePremiumBatch, simulateSettlePremiumFrom, simulateSettleSequence, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, splitTokenIdByTimescale, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, streamPoolSwaps, subscribePoolSwaps, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, valuePositionAccrual, verifyBlockContinuity, watchEvents, watchPoolSwaps, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
34789
+ 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, calculatePositionVolatilityMetrics, calculateResyncBlock, calculateSpreadWad, calculateVarianceProfile, cancelTransaction, checkApproval, checkCollateralAcrossTicks, classifyStrategyGroups, classifyStrike, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralCurveTicks, collateralRuleKindFor, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodeOraclePack, decodeOracleRiskParameters, decodeOracleTiming, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, deriveUniqueTokenId, detectReorg, diagnoseOracleSafeMode, dispatch, dispatchAndWait, emptyLiquidateParams, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, ensureSfpmV3PoolInitialized, ensureUniqueTokenId, estimateBlockNumbers, estimateCloseZapSwap, estimateCollateralBreakdown, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, executeSettleSequence, executeSettleSequenceAndWait, failPendingPosition, feeGrowthInsideX128, feesFromFeeGrowthDelta, fetchPoolId, fetchPoolSwaps, 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, getClosePositionTransferEstimate, 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, getLegLiquidityRange, getLegNetValueWidth0, getLegTokenInventory, 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, getPositionMintFunding, getPositionValueCurve, getPositionVolatilityHistory, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getSimpleLoanTokenIndex, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenIdValidationError, 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, parseStreamedKey, parseStreamedSwap, parseSwapLog, parseTokenAmount, parseTokenListId, parseWad, planDeriveStrategy, pokeOracle, pokeOracleAndWait, positionValueKey, positionValueTicks, prepareIndicatorCandles, prepareLiquidityGamma, preparePositionGamma, preparePositionValue, preparePositionValueCurve, previewBorrow, previewDeposit, previewMint, previewRedeem, previewRepay, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, quoteLiquidation, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, quoteTokenShortfallSwap, 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, simulateClosePremiumProtection, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSettlePremiumBatch, simulateSettlePremiumFrom, simulateSettleSequence, simulateSwapExactIn, simulateSwapExactOut, simulateWithTokenFlow, simulateWithdraw, slippageBpsToTickDistance, smartRepay, smartRepayAndWait, speedUpTransaction, splitTokenIdByTimescale, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, streamPoolSwaps, subscribePoolSwaps, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, valuePositionAccrual, verifyBlockContinuity, watchEvents, watchPoolSwaps, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
34713
34790
  //# sourceMappingURL=index.js.map