@panoptic-eng/sdk 1.0.41 → 1.0.42

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.
@@ -1,7 +1,7 @@
1
1
  import { StateViewAbi, formatTokenAmount, getAccountCollateral, panopticQueryAbi$1 as panopticQueryAbi, parseTokenAmount, readBlockAndAggregate, requireReturnData } from "./irm-SPC2KxLA.js";
2
2
  import { AccountInsolventError, ChunkLimitError, DEFAULT_VEGOID, InvalidHistoryRangeError, LEG_LIMITS, NotEnoughTokensError, PanopticError, PanopticValidationError, SafeModeError, StaleDataError, StorageDataNotFoundError, TOKEN_ID_BITS, UnhealthyPoolError, WrongUniswapPoolError, collateralTrackerV2Abi, decodeLeftRightSigned, decodeLeftRightUnsigned, decodePosition, decodePositionBalance, decodeTickSpacing, getBlockMeta, getClosedPositionsKey, getPendingPositionsKey, getPool, getPoolMetaKey, getPositionMetaKey, getPositionsKey, getTrackedChunksKey, getTrackedPositionIds, jsonSerializer, mintableAfterBuffer, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticGuardianAbi, panopticPoolV2Abi, panopticQueryAbi as panopticQueryAbi$1, parsePanopticError, riskEngineAbi, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi, stateViewAbi, uniswapV3PoolAbi } from "./getTrackedPositionIds-ms3W9dYB.js";
3
3
  import { MAX_TICK, MAX_TRACKED_CHUNKS, MIN_TICK, WAD, calculatePositionDelta, calculatePositionGamma, calculatePositionValue, priceToTick, sqrtPriceX96ToTick, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96 } from "./greeks-GysWXct-.js";
4
- import { addLegToTokenId, buildBatchDispatchArgs, buildUniqueCredit, countLegs, createTokenIdBuilder, decodeAllLegs, decodeTokenId, getCurrentPositionSizes, getPoolTokensForSimulation, loadCheckpoint, resolveTokenIndex, simulateOpenPosition, simulateWithTokenFlow } from "./writes-_gfkBizf.js";
4
+ import { addLegToTokenId, buildBatchDispatchArgs, buildUniqueCredit, buildUniqueLoan, countLegs, createTokenIdBuilder, decodeAllLegs, decodeTokenId, getCurrentPositionSizes, getPoolTokensForSimulation, loadCheckpoint, resolveTokenIndex, simulateOpenPosition, simulateWithTokenFlow } from "./writes-_gfkBizf.js";
5
5
  import { BaseError, ContractFunctionExecutionError, ContractFunctionRevertedError, ExecutionRevertedError, decodeFunctionResult, encodeAbiParameters, encodeFunctionData, getAddress, keccak256, toHex, zeroAddress } from "viem";
6
6
  import { multicall } from "viem/actions";
7
7
 
@@ -1633,7 +1633,7 @@ async function simulateDispatch(params) {
1633
1633
 
1634
1634
  //#endregion
1635
1635
  //#region src/panoptic/v2/simulations/tokenShortfallRecovery.ts
1636
- const BPS_DENOMINATOR$1 = 10000n;
1636
+ const BPS_DENOMINATOR$2 = 10000n;
1637
1637
  const MAX_RECOVERY_QUOTE_ATTEMPTS = 8;
1638
1638
  /**
1639
1639
  * Wrap a dispatch with a temporary credit leg that sources the shortfall.
@@ -1683,7 +1683,7 @@ function getNotEnoughTokensError(error) {
1683
1683
  }
1684
1684
  function maximumAmountIn(estimatedAmountIn, slippageBps) {
1685
1685
  if (slippageBps < 0n) throw new PanopticError("slippageBps must be non-negative");
1686
- return (estimatedAmountIn * (BPS_DENOMINATOR$1 + slippageBps) + BPS_DENOMINATOR$1 - 1n) / BPS_DENOMINATOR$1;
1686
+ return (estimatedAmountIn * (BPS_DENOMINATOR$2 + slippageBps) + BPS_DENOMINATOR$2 - 1n) / BPS_DENOMINATOR$2;
1687
1687
  }
1688
1688
  function ceilDiv(numerator, denominator) {
1689
1689
  return (numerator + denominator - 1n) / denominator;
@@ -1711,10 +1711,10 @@ async function quoteTokenShortfallRecovery(params) {
1711
1711
  reason: "invalid-shortfall",
1712
1712
  detail: `requested=${shortfallError.assetsRequested} <= balance=${shortfallError.assetBalance}`
1713
1713
  };
1714
- if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$1) return {
1714
+ if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$2) return {
1715
1715
  available: false,
1716
1716
  reason: "invalid-slippage",
1717
- detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$1}]`
1717
+ detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$2}]`
1718
1718
  };
1719
1719
  const targetBlockNumber = params.blockNumber ?? await params.client.getBlockNumber();
1720
1720
  const pool = await getPool({
@@ -5796,7 +5796,7 @@ const nfpmAbi = [{
5796
5796
  }],
5797
5797
  stateMutability: "payable"
5798
5798
  }];
5799
- const MAX_UINT128 = 2n ** 128n - 1n;
5799
+ const MAX_UINT128$1 = 2n ** 128n - 1n;
5800
5800
  const MAX_UINT256 = 2n ** 256n - 1n;
5801
5801
  const Q128 = 2n ** 128n;
5802
5802
  /**
@@ -5838,8 +5838,8 @@ async function getUniswapV3LpPositionState(params) {
5838
5838
  args: [{
5839
5839
  tokenId,
5840
5840
  recipient: owner,
5841
- amount0Max: MAX_UINT128,
5842
- amount1Max: MAX_UINT128
5841
+ amount0Max: MAX_UINT128$1,
5842
+ amount1Max: MAX_UINT128$1
5843
5843
  }],
5844
5844
  account: owner,
5845
5845
  blockNumber: _meta.blockNumber
@@ -7686,7 +7686,7 @@ async function simulateSwapExactIn(params) {
7686
7686
 
7687
7687
  //#endregion
7688
7688
  //#region src/panoptic/v2/simulations/oneTokenFlow.ts
7689
- const BPS_DENOMINATOR = 10000n;
7689
+ const BPS_DENOMINATOR$1 = 10000n;
7690
7690
  /**
7691
7691
  * Default {@link OneTokenFlowQuoteParams.minSwapRatioBps}: 0.5%.
7692
7692
  *
@@ -7706,7 +7706,7 @@ function abs(value) {
7706
7706
  return value < 0n ? -value : value;
7707
7707
  }
7708
7708
  function padForSlippage(amount, slippageBps) {
7709
- return (amount * (BPS_DENOMINATOR + slippageBps) + BPS_DENOMINATOR - 1n) / BPS_DENOMINATOR;
7709
+ return (amount * (BPS_DENOMINATOR$1 + slippageBps) + BPS_DENOMINATOR$1 - 1n) / BPS_DENOMINATOR$1;
7710
7710
  }
7711
7711
  /**
7712
7712
  * Quote a dispatch wrapped so its net flow lands in `targetTokenIndex` only.
@@ -7726,10 +7726,10 @@ async function quoteOneTokenFlow(params) {
7726
7726
  reason: "invalid-target-token",
7727
7727
  detail: `targetTokenIndex=${targetTokenIndex} is neither 0 nor 1`
7728
7728
  };
7729
- if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR) return {
7729
+ if (params.slippageBps < 0n || params.slippageBps > BPS_DENOMINATOR$1) return {
7730
7730
  available: false,
7731
7731
  reason: "invalid-slippage",
7732
- detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR}]`
7732
+ detail: `slippageBps=${params.slippageBps} is outside [0, ${BPS_DENOMINATOR$1}]`
7733
7733
  };
7734
7734
  const tickLimitLow = params.tickLimitLow ?? MIN_TICK;
7735
7735
  const tickLimitHigh = params.tickLimitHigh ?? MAX_TICK;
@@ -7837,7 +7837,7 @@ async function quoteOneTokenFlow(params) {
7837
7837
  }
7838
7838
  if (baseTargetDelta !== null && minSwapRatioBps > 0n) {
7839
7839
  const swapInTargetTerms = convertToTokenIndex(swapAmount, otherTokenIndex, targetTokenIndex, pool.sqrtPriceX96);
7840
- if (swapInTargetTerms * BPS_DENOMINATOR < minSwapRatioBps * abs(baseTargetDelta)) return {
7840
+ if (swapInTargetTerms * BPS_DENOMINATOR$1 < minSwapRatioBps * abs(baseTargetDelta)) return {
7841
7841
  available: false,
7842
7842
  reason: "below-threshold",
7843
7843
  detail: `non-target flow ${swapInTargetTerms} (in target token terms) is below ${minSwapRatioBps}bps of the target flow ${abs(baseTargetDelta)}`
@@ -7929,6 +7929,200 @@ async function quoteOneTokenFlow(params) {
7929
7929
  };
7930
7930
  }
7931
7931
 
7932
+ //#endregion
7933
+ //#region src/panoptic/v2/simulations/temporaryLoanRecovery.ts
7934
+ const BPS_DENOMINATOR = 10000n;
7935
+ const MAX_RECOVERY_ATTEMPTS = 8n;
7936
+ const MAX_UINT128 = (1n << 128n) - 1n;
7937
+ const LOAN_GROWTH_DENOMINATOR = 20n;
7938
+ /**
7939
+ * Wrap a dispatch with `loan mint -> user operations -> swapped loan burn`.
7940
+ * The repeated tokenId is intentional: the first occurrence mints it and the
7941
+ * last occurrence burns it after the user's operations have settled.
7942
+ */
7943
+ function buildTemporaryLoanRecoveryDispatch(params) {
7944
+ const low = params.tickLimitLow <= params.tickLimitHigh ? params.tickLimitLow : params.tickLimitHigh;
7945
+ const high = params.tickLimitLow <= params.tickLimitHigh ? params.tickLimitHigh : params.tickLimitLow;
7946
+ return {
7947
+ positionIdList: [
7948
+ params.loanTokenId,
7949
+ ...params.dispatch.positionIdList,
7950
+ params.loanTokenId
7951
+ ],
7952
+ finalPositionIdList: [...params.dispatch.finalPositionIdList],
7953
+ positionSizes: [
7954
+ params.loanPositionSize,
7955
+ ...params.dispatch.positionSizes,
7956
+ 0n
7957
+ ],
7958
+ tickAndSpreadLimits: [
7959
+ [
7960
+ low,
7961
+ high,
7962
+ 0n
7963
+ ],
7964
+ ...params.dispatch.tickAndSpreadLimits,
7965
+ [
7966
+ high,
7967
+ low,
7968
+ 0n
7969
+ ]
7970
+ ],
7971
+ usePremiaAsCollateral: params.dispatch.usePremiaAsCollateral,
7972
+ builderCode: params.dispatch.builderCode
7973
+ };
7974
+ }
7975
+ /**
7976
+ * Quotes and simulates an atomic temporary loan around a full-close dispatch.
7977
+ *
7978
+ * @param params - Chain client, account, failed dispatch, shortfall error, and quote limits.
7979
+ * @returns An executable quote when recovery succeeds, otherwise a categorized unavailable result.
7980
+ * @throws {PanopticError} When the dispatch is not a full close or required RPC reads fail.
7981
+ */
7982
+ async function quoteTemporaryLoanRecovery(params) {
7983
+ const initialShortfall = getNotEnoughTokensError(params.error);
7984
+ if (initialShortfall === null) return {
7985
+ available: false,
7986
+ reason: "not-token-shortfall"
7987
+ };
7988
+ let loanAmount = initialShortfall.assetsRequested - initialShortfall.assetBalance;
7989
+ if (loanAmount <= 0n) return {
7990
+ available: false,
7991
+ reason: "invalid-shortfall",
7992
+ detail: `requested=${initialShortfall.assetsRequested} <= balance=${initialShortfall.assetBalance}`
7993
+ };
7994
+ if (params.slippageBps <= 0n || params.slippageBps > BPS_DENOMINATOR) return {
7995
+ available: false,
7996
+ reason: "invalid-slippage",
7997
+ detail: `slippageBps=${params.slippageBps} is outside (0, ${BPS_DENOMINATOR}]`
7998
+ };
7999
+ if (params.dispatch.finalPositionIdList.length !== 0) throw new PanopticError("Temporary-loan recovery requires a full-close dispatch with an empty finalPositionIdList");
8000
+ let targetBlockNumber;
8001
+ try {
8002
+ targetBlockNumber = params.blockNumber ?? await params.client.getBlockNumber();
8003
+ } catch (error) {
8004
+ if (error instanceof PanopticError) throw error;
8005
+ throw new PanopticError("Failed to resolve the block for temporary-loan recovery", error instanceof Error ? error : new Error(String(error)));
8006
+ }
8007
+ let pool;
8008
+ try {
8009
+ pool = await getPool({
8010
+ client: params.client,
8011
+ poolAddress: params.poolAddress,
8012
+ chainId: params.chainId,
8013
+ blockNumber: targetBlockNumber
8014
+ });
8015
+ } catch (error) {
8016
+ if (error instanceof PanopticError) throw error;
8017
+ throw new PanopticError("Failed to load the pool for temporary-loan recovery", error instanceof Error ? error : new Error(String(error)));
8018
+ }
8019
+ const defaultLimits = tickLimits(pool.currentTick, params.slippageBps);
8020
+ const tickLimitLow = params.tickLimitLow ?? defaultLimits.low;
8021
+ const tickLimitHigh = params.tickLimitHigh ?? defaultLimits.high;
8022
+ if (tickLimitLow >= tickLimitHigh) return {
8023
+ available: false,
8024
+ reason: "invalid-tick-limits",
8025
+ detail: `tickLimitLow=${tickLimitLow} >= tickLimitHigh=${tickLimitHigh}`
8026
+ };
8027
+ const token0 = pool.collateralTracker0.token;
8028
+ const token1 = pool.collateralTracker1.token;
8029
+ const tokenIndexFor = (address) => {
8030
+ const normalized = address.toLowerCase();
8031
+ if (normalized === token0.toLowerCase() || normalized === pool.collateralTracker0.address.toLowerCase()) return 0n;
8032
+ if (normalized === token1.toLowerCase() || normalized === pool.collateralTracker1.address.toLowerCase()) return 1n;
8033
+ return null;
8034
+ };
8035
+ const loanTokenIndex = tokenIndexFor(initialShortfall.tokenAddress);
8036
+ if (loanTokenIndex === null) return {
8037
+ available: false,
8038
+ reason: "unsupported-token",
8039
+ detail: `${initialShortfall.tokenAddress} is neither collateral token of ${params.poolAddress}`
8040
+ };
8041
+ const repaymentTokenIndex = loanTokenIndex === 0n ? 1n : 0n;
8042
+ const loanToken = loanTokenIndex === 0n ? token0 : token1;
8043
+ const repaymentToken = repaymentTokenIndex === 0n ? token0 : token1;
8044
+ const collisionIds = Array.from(new Set([
8045
+ ...params.existingPositionIds,
8046
+ ...params.dispatch.positionIdList,
8047
+ ...params.dispatch.finalPositionIdList
8048
+ ]));
8049
+ for (let attempt = 0n; attempt < MAX_RECOVERY_ATTEMPTS; attempt += 1n) {
8050
+ if (loanAmount > MAX_UINT128) return {
8051
+ available: false,
8052
+ reason: "recovery-unavailable",
8053
+ detail: `required loan amount ${loanAmount} exceeds uint128`
8054
+ };
8055
+ const loan = buildUniqueLoan(pool.poolId, loanTokenIndex, loanTokenIndex, pool.currentTick, pool.tickSpacing, collisionIds, loanAmount);
8056
+ const recoveredDispatch = buildTemporaryLoanRecoveryDispatch({
8057
+ dispatch: params.dispatch,
8058
+ loanTokenId: loan.tokenId,
8059
+ loanPositionSize: loan.adjustedSize,
8060
+ tickLimitLow,
8061
+ tickLimitHigh
8062
+ });
8063
+ const simulation = await simulateDispatch({
8064
+ client: params.client,
8065
+ poolAddress: params.poolAddress,
8066
+ account: params.account,
8067
+ existingPositionIdList: params.existingPositionIds,
8068
+ ...recoveredDispatch,
8069
+ blockNumber: targetBlockNumber
8070
+ });
8071
+ if (simulation.success && simulation.tokenFlow !== void 0) {
8072
+ const tokenFlow = simulation.tokenFlow;
8073
+ return {
8074
+ available: true,
8075
+ quote: {
8076
+ loanToken,
8077
+ repaymentToken,
8078
+ loanTokenIndex,
8079
+ loanAmount,
8080
+ loanPositionSize: loan.adjustedSize,
8081
+ loanTokenId: loan.tokenId,
8082
+ slippageBps: params.slippageBps,
8083
+ netLoanTokenChange: loanTokenIndex === 0n ? tokenFlow.delta0 : tokenFlow.delta1,
8084
+ netRepaymentTokenChange: repaymentTokenIndex === 0n ? tokenFlow.delta0 : tokenFlow.delta1,
8085
+ dispatch: recoveredDispatch,
8086
+ simulation: {
8087
+ ...simulation,
8088
+ tokenFlow
8089
+ },
8090
+ tokenFlow,
8091
+ _meta: simulation._meta
8092
+ }
8093
+ };
8094
+ }
8095
+ if (simulation.success) return {
8096
+ available: false,
8097
+ reason: "recovery-unavailable",
8098
+ detail: "temporary-loan simulation returned no token flow"
8099
+ };
8100
+ const shortfall = getNotEnoughTokensError(simulation.error);
8101
+ if (shortfall === null) return {
8102
+ available: false,
8103
+ reason: "recovery-unavailable",
8104
+ detail: `temporary-loan dispatch reverted: ${simulation.error.message}`,
8105
+ error: simulation.error
8106
+ };
8107
+ const shortfallIndex = tokenIndexFor(shortfall.tokenAddress);
8108
+ if (shortfallIndex !== loanTokenIndex) return {
8109
+ available: false,
8110
+ reason: "repayment-token-shortfall",
8111
+ detail: `repayment token ${shortfall.tokenAddress} requested ${shortfall.assetsRequested}, balance ${shortfall.assetBalance}`,
8112
+ error: simulation.error
8113
+ };
8114
+ const residual = shortfall.assetsRequested - shortfall.assetBalance;
8115
+ const geometricGrowth = (loanAmount + LOAN_GROWTH_DENOMINATOR - 1n) / LOAN_GROWTH_DENOMINATOR;
8116
+ loanAmount += residual > geometricGrowth ? residual : geometricGrowth;
8117
+ }
8118
+ return {
8119
+ available: false,
8120
+ reason: "recovery-unavailable",
8121
+ detail: `temporary-loan recovery remained short after ${MAX_RECOVERY_ATTEMPTS} attempts`,
8122
+ error: new PanopticError("Could not size the temporary loan within the quote attempt limit")
8123
+ };
8124
+ }
8125
+
7932
8126
  //#endregion
7933
8127
  //#region src/panoptic/v2/abis/poolManager.ts
7934
8128
  /**
@@ -9291,4 +9485,4 @@ function isGasError(error) {
9291
9485
  }
9292
9486
 
9293
9487
  //#endregion
9294
- export { DEFAULT_MIN_SWAP_RATIO_BPS, DEFAULT_RECONNECT_CONFIG, REQUIRED_BASE_ERROR_SENTINEL, addPendingPosition, addTrackedChunks, apportion, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, buildCreditWrappedDispatch, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTokenShortfallRecoveryDispatch, calculateAccountGreeksPure, calculateSpreadWad, checkCollateralAcrossTicks, classifyStrategyGroups, cleanupStalePendingPositions, clearPendingPositions, clearTrackedChunks, clearTradeHistory, collateralRuleKindFor, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, createEventPoller, createEventSubscription, createFlowNeutralTokenId, createPoolFormatters, decodePanopticTokenURI, deriveUniqueTokenId, encodePoolKeyBytes, encodeV3PoolKeyBytes, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, failPendingPosition, feesFromFeeGrowthDelta, fetchSfpmV3PoolId, formatBlockNumber, formatBps, formatCompact, formatDatetime, formatDuration, formatDurationSeconds, formatFeeTier, formatGas, formatGwei, formatPoolIdHex, formatRatioPercent, formatTimestamp, formatTimestampLocale, formatTokenIdHex, formatTokenIdShort, formatTxHash, formatUtilization, formatWei, getAccountBuyingPower, getAccountGreeks, getAccountHistory, getAccountPremia, getChunkLiquidities, getChunkSpreads, getClosedPositions, getCollateralSharePrices, getCollateralTotalAssetsBatch, getDeltaHedgeParams, getEnforcedTickLimits, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getGuardianUnlockState, getItmAmounts, getMarginBuffer, getMaxPositionSize, getMaxRedeem, getMaxWithdrawable, getNativeTokenPrice, getNotEnoughTokensError, getOpenPositionPreview, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPoolDisplayId, getPoolLiquidities, getPortfolioValue, getPositionChunkData, getPositionEnrichmentData, getPositionsWithPremia, getPriceHistory, getRealizedPnL, getRequiredCreditForITM, getSafeMode, getStreamiaHistory, getSyncStatus, getTokenListId, getTrackedChunks, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, interpolateBlocks, isGasError, isNonceError, isRetryableRpcError, isolateGroupTokenId, minePoolAddress, minePoolAddressLocalAsync, multicallRead, optimizeTokenIdRiskPartners, parseBps, parseCollateralLog, parsePoolLog, parseTokenListId, planDeriveStrategy, previewDeposit, previewMint, previewRedeem, previewWithdraw, quoteOneTokenFlow, quoteSfpmSwap, quoteTokenShortfallRecovery, removeTrackedChunks, resolveBlockNumbers, resolvePanopticPoolFromPoolId, resolveUniswapV4PoolKey, saveClosedPosition, scanChunks, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSwapExactIn, simulateSwapExactOut, simulateWithdraw, slippageBpsToTickDistance, truncateAddress, watchEvents };
9488
+ export { DEFAULT_MIN_SWAP_RATIO_BPS, DEFAULT_RECONNECT_CONFIG, REQUIRED_BASE_ERROR_SENTINEL, addPendingPosition, addTrackedChunks, apportion, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, buildCreditWrappedDispatch, buildSfpmSwapCalldata, buildSfpmSwapPlan, buildTemporaryLoanRecoveryDispatch, buildTokenShortfallRecoveryDispatch, calculateAccountGreeksPure, calculateSpreadWad, checkCollateralAcrossTicks, classifyStrategyGroups, cleanupStalePendingPositions, clearPendingPositions, clearTrackedChunks, clearTradeHistory, collateralRuleKindFor, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, createEventPoller, createEventSubscription, createFlowNeutralTokenId, createPoolFormatters, decodePanopticTokenURI, deriveUniqueTokenId, encodePoolKeyBytes, encodeV3PoolKeyBytes, ensureSfpmV3PoolInitialized, estimateBlockNumbers, estimateCollateralBreakdown, estimateCollateralRequired, failPendingPosition, feesFromFeeGrowthDelta, fetchSfpmV3PoolId, formatBlockNumber, formatBps, formatCompact, formatDatetime, formatDuration, formatDurationSeconds, formatFeeTier, formatGas, formatGwei, formatPoolIdHex, formatRatioPercent, formatTimestamp, formatTimestampLocale, formatTokenIdHex, formatTokenIdShort, formatTxHash, formatUtilization, formatWei, getAccountBuyingPower, getAccountGreeks, getAccountHistory, getAccountPremia, getChunkLiquidities, getChunkSpreads, getClosedPositions, getCollateralSharePrices, getCollateralTotalAssetsBatch, getDeltaHedgeParams, getEnforcedTickLimits, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getGuardianUnlockState, getItmAmounts, getMarginBuffer, getMaxPositionSize, getMaxRedeem, getMaxWithdrawable, getNativeTokenPrice, getNotEnoughTokensError, getOpenPositionPreview, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPoolDisplayId, getPoolLiquidities, getPortfolioValue, getPositionChunkData, getPositionEnrichmentData, getPositionsWithPremia, getPriceHistory, getRealizedPnL, getRequiredCreditForITM, getSafeMode, getStreamiaHistory, getSyncStatus, getTokenListId, getTrackedChunks, getTradeHistory, getUniswapFeeHistory, getUniswapV3LpPositionState, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4LpPositionState, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, interpolateBlocks, isGasError, isNonceError, isRetryableRpcError, isolateGroupTokenId, minePoolAddress, minePoolAddressLocalAsync, multicallRead, optimizeTokenIdRiskPartners, parseBps, parseCollateralLog, parsePoolLog, parseTokenListId, planDeriveStrategy, previewDeposit, previewMint, previewRedeem, previewWithdraw, quoteOneTokenFlow, quoteSfpmSwap, quoteTemporaryLoanRecovery, quoteTokenShortfallRecovery, removeTrackedChunks, resolveBlockNumbers, resolvePanopticPoolFromPoolId, resolveUniswapV4PoolKey, saveClosedPosition, scanChunks, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSwapExactIn, simulateSwapExactOut, simulateWithdraw, slippageBpsToTickDistance, truncateAddress, watchEvents };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoptic-eng/sdk",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/panoptic-labs/panoptic-sdk.git"