@panoptic-eng/sdk 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cow/index.d.ts +5 -4
- package/dist/cow/index.js +4 -3
- package/dist/cow/types.d.ts +2 -2
- package/dist/{cow-UR3yv8Wz.js → cow-Boc-39-Y.js} +2 -2
- package/dist/{cow-UR3yv8Wz.js.map → cow-Boc-39-Y.js.map} +1 -1
- package/dist/greeks-GysWXct-.js +1072 -0
- package/dist/greeks-GysWXct-.js.map +1 -0
- package/dist/index-B3JZRUNo.d.ts +9084 -0
- package/dist/index-B3JZRUNo.d.ts.map +1 -0
- package/dist/index-CDCAju5o.d.ts +261 -0
- package/dist/index-CDCAju5o.d.ts.map +1 -0
- package/dist/{index-CIlr4SNh.d.ts → index-DQS8Luef.d.ts} +4 -4
- package/dist/{index-CIlr4SNh.d.ts.map → index-DQS8Luef.d.ts.map} +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{irm-Dw6fa-DV.js → irm-B0Bgj0z8.js} +4 -3
- package/dist/{irm-Dw6fa-DV.js.map → irm-B0Bgj0z8.js.map} +1 -1
- package/dist/{irm-CSJX9BsU.d.ts → irm-BNtE1Dmg.d.ts} +2 -2
- package/dist/{irm-CSJX9BsU.d.ts.map → irm-BNtE1Dmg.d.ts.map} +1 -1
- package/dist/{types-CspUPolV.d.ts → oracle-BnpPVG8V.d.ts} +4 -244
- package/dist/oracle-BnpPVG8V.d.ts.map +1 -0
- package/dist/panoptic/v2/greeks/index.d.ts +3 -0
- package/dist/panoptic/v2/greeks/index.js +3 -0
- package/dist/panoptic/v2/index.d.ts +8 -10180
- package/dist/panoptic/v2/index.js +6 -11281
- package/dist/panoptic/v2/react-public.d.ts +886 -0
- package/dist/panoptic/v2/react-public.d.ts.map +1 -0
- package/dist/panoptic/v2/react-public.js +3854 -0
- package/dist/panoptic/v2/react-public.js.map +1 -0
- package/dist/position-Bmd_3nzI.d.ts +199 -0
- package/dist/position-Bmd_3nzI.d.ts.map +1 -0
- package/dist/{position-GYsTTl71.js → position-R0IGLpQS.js} +3 -1056
- package/dist/position-R0IGLpQS.js.map +1 -0
- package/dist/{router-DGUQo-8h.js → router-NPhQUNh4.js} +2 -2
- package/dist/{router-DGUQo-8h.js.map → router-NPhQUNh4.js.map} +1 -1
- package/dist/{simulation-4SzTI-xf.d.ts → simulation-CUqERC5Y.d.ts} +21 -198
- package/dist/simulation-CUqERC5Y.d.ts.map +1 -0
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.d.ts.map +1 -1
- package/dist/{tx-Banz1S18.d.ts → tx-BXXqhBHn.d.ts} +1 -1
- package/dist/{tx-Banz1S18.d.ts.map → tx-BXXqhBHn.d.ts.map} +1 -1
- package/dist/{types-Bzw_7NJv.d.ts → types-DgWfno7q.d.ts} +2 -2
- package/dist/{types-Bzw_7NJv.d.ts.map → types-DgWfno7q.d.ts.map} +1 -1
- package/dist/types-VeWdNN0j.d.ts +247 -0
- package/dist/types-VeWdNN0j.d.ts.map +1 -0
- package/dist/uniswap/index.d.ts +5 -3
- package/dist/uniswap/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +4 -3
- package/dist/uniswap/index.js.map +1 -1
- package/dist/v2-CkOo7vW2.js +7438 -0
- package/dist/v2-CkOo7vW2.js.map +1 -0
- package/dist/{writes-h-IX3XQq.js → writes-Dhzpw0dq.js} +4 -3
- package/dist/{writes-h-IX3XQq.js.map → writes-Dhzpw0dq.js.map} +1 -1
- package/package.json +9 -1
- package/dist/panoptic/v2/index.d.ts.map +0 -1
- package/dist/panoptic/v2/index.js.map +0 -1
- package/dist/position-GYsTTl71.js.map +0 -1
- package/dist/simulation-4SzTI-xf.d.ts.map +0 -1
- package/dist/types-CspUPolV.d.ts.map +0 -1
|
@@ -0,0 +1,886 @@
|
|
|
1
|
+
import { isCowSupportedChain$1 as isCowSupportedChain } from "../../index-DQS8Luef.js";
|
|
2
|
+
import { BlockMeta, ClosedPosition, LegGreeksParams, Position, PositionGreeks, RealizedPnL, TokenIdLeg } from "../../position-Bmd_3nzI.js";
|
|
3
|
+
import { CollateralTracker, CurrentRates, FetchPoolIdParams, FetchPoolIdResult, GetOracleStateParams, GetPoolMetadataParams, GetPoolParams, GetRiskParametersParams, GetUtilizationParams, OracleState, Pool, PoolHealthStatus, PoolKey, PoolMetadata, RiskEngine, RiskParameters, SafeMode, SafeModeState, TickLimitsResult, Utilization, fetchPoolId$1 as fetchPoolId, formatPriceRange$1 as formatPriceRange, formatTick$1 as formatTick, formatTickRange$1 as formatTickRange, getOracleState$1 as getOracleState, getPool$1 as getPool, getPoolMetadata$1 as getPoolMetadata, getPricesAtTick$1 as getPricesAtTick, getRiskParameters$1 as getRiskParameters, getTickSpacing$1 as getTickSpacing, getUtilization$1 as getUtilization, priceToTick$1 as priceToTick, roundToTickSpacing$1 as roundToTickSpacing, sqrtPriceX96ToPriceDecimalScaled$1 as sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick$1 as sqrtPriceX96ToTick, tickLimits$1 as tickLimits, tickToPrice$1 as tickToPrice, tickToPriceDecimalScaled$1 as tickToPriceDecimalScaled, tickToSqrtPriceX96$1 as tickToSqrtPriceX96, validateBuilderCode$1 as validateBuilderCode } from "../../oracle-BnpPVG8V.js";
|
|
4
|
+
import { AccountBuyingPower, AccountCollateral, AccountGreeksCurveResult, AccountGreeksResult, AccountInsolventError, AccountPremia, AccountSummaryBasic, AccountSummaryRisk, AddPendingPositionParams, AddTrackedChunksParams, AlreadyInitializedError, ApprovalStatus, ApproveParams, ApprovePoolParams, BPS_DENOMINATOR$1 as BPS_DENOMINATOR, BatchDiagnostic, BatchDiagnosticCode, BatchDispatchArgs, BatchOp, BatchOpBurn, BatchOpKind, BatchOpMint, BatchValidationError, BelowMinimumRedemptionError, BorrowParams, BuildBatchDispatchArgsParams, BuildBatchDispatchArgsResult, CalculateAccountGreeksPureParams, CancelParams, CastingError, CheckApprovalParams, CheckCollateralAcrossTicksParams, ChunkData, ChunkHasZeroLiquidityError, ChunkInput, ChunkKey, ChunkLimitError, ChunkLiquidityResult, ChunkMetadata, ChunkSpread, ChunkStats, ClosePositionParams, CollateralAcrossTicks, CollateralDataPoint, CollateralEstimate, CollateralSharePriceData, ConfirmPendingPositionParams, CreateEventPollerParams, CreateEventSubscriptionParams, CreateFlowNeutralTokenIdParams, CrossPoolError, DEFAULT_MAX_SPREAD, DEFAULT_RECONNECT_CONFIG$1 as DEFAULT_RECONNECT_CONFIG, DEFAULT_VEGOID, DataWithMeta, DecodedLeg, DecodedTokenId, DeltaHedgeResult, DeployNewPoolParams, DepositParams, DepositTooLargeError, DetectReorgParams, DispatchCalldata, DispatchParams, DuplicateTokenIdError, ERC4626PreviewParams, ERC4626PreviewResult, EffectiveLiquidityAboveThresholdError, EncodeLegParams, EnforcedTickLimits, EstimateBlockNumbersParams, EstimateCollateralRequiredParams, EventPoller, EventReconstructionParams, EventReconstructionResult, EventSubscriptionHandle, ExceedsMaximumRedemptionError, ExecuteBatchDispatchParams, FailPendingPositionParams, FlowNeutralTokenId, ForceExerciseParams, GetAccountBuyingPowerParams, GetAccountCollateralParams, GetAccountGreeksParams, GetAccountPremiaParams, GetAccountSummaryBasicParams, GetAccountSummaryRiskParams, GetBlockMetaParams, GetChunkLiquiditiesParams, GetChunkLiquiditiesResult, GetChunkSpreadsParams, GetCollateralDataParams, GetCurrentRatesParams, GetDeltaHedgeParamsInput, GetEnforcedTickLimitsParams, GetFactoryConstructMetadataParams, GetFactoryOwnerOfParams, GetFactoryTokenURIParams, GetGuardianUnlockStateParams, GetInterestStateParams, GetItmAmountsParams, GetLiquidationPricesParams, GetMarginBufferParams, GetMaxPositionSizeParams, GetMaxWithdrawableParams, GetNativeTokenPriceParams, GetNetLiquidationValueParams, GetNetLiquidationValuesParams, GetOpenPositionIdsParams, GetOpenPositionPreviewParams, GetPanopticPoolAddressParams, GetPanopticPoolFromPoolIdParams, GetPendingPositionsParams, GetPoolLiquiditiesParams, GetPortfolioValueParams, GetPositionChunkDataParams, GetPositionChunkDataResult, GetPositionEnrichmentDataParams, GetPositionEnrichmentDataResult, GetPositionGreeksParams, GetPositionParams, GetPositionsParams, GetPositionsWithPremiaParams, GetPriceHistoryParams, GetRealizedPnLParams, GetRequiredCreditForITMParams, GetSafeModeParams, GetStreamiaHistoryParams, GetSyncStatusParams, GetTrackedChunksParams, GetTrackedPositionIdsParams, GetTradeHistoryParams, GetUniswapFeeHistoryParams, GetUniswapV3PoolFromIdParams, GetUniswapV3PoolInfoParams, GetUniswapV3PoolLiquiditiesParams, GetUniswapV4PoolBasicStateParams, GetUniswapV4PoolInfoParams, GetUniswapV4PoolKeyFromIdParams, GetUniswapV4PoolLiquiditiesParams, GuardianUnlockState, InputListFailError, InsufficientCreditLiquidityError, InterestState, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, IsLiquidatableParams, ItmAmounts, LEG_BITS, LEG_LIMITS, LEG_MASKS, LegChunkData, LegConfig, LengthMismatchError, LiquidateParams, LiquidationCheck, LiquidationPrices, LiquidityChunkKey, LiquidityChunkSpread, LiquidityTooHighError, LoanSlotExhaustedError, MAX_TICK$1 as MAX_TICK, MAX_TRACKED_CHUNKS$1 as MAX_TRACKED_CHUNKS, MIN_TICK$1 as MIN_TICK, MarginBuffer, MaxPositionSize, MaxRetriesExceededError, MinePoolAddressParams, MinePoolAddressResult, MintParams, MissingPositionIdsError, MulticallContract, MulticallReadParams, NetLiquidationValue, NetLiquidationValues, NetLiquidityZeroError, NetworkMismatchError, NeutralLeg, NoLegsExercisableError, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS$1 as ORACLE_EPOCH_SECONDS, OpenPositionParams, OpenPositionPreview, OptimizeTokenIdRiskPartnersParams, OracleRateLimitedError, PanopticHelperNotDeployedError, PanopticNFTMetadata, PanopticValidationError, ParsedError, PendingPosition, PokeOracleParams, PoolFormatterConfig, PoolFormatters, PoolLiquidities, PoolNotInitializedError, PoolVersionConfig, PortfolioValue, PositionChunkData, PositionCountNotZeroError, PositionEnrichmentResult, PositionInput, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionStorageParams, PositionTooLargeError, PositionWithPremia, PositionsWithPremiaResult, PreviewBorrowParams, PreviewBorrowResult, PreviewWrapParams, PriceBoundFailError, PriceHistoryResult, PriceImpactTooLargeError, PriceSnapshot, ProviderLagError, REORG_DEPTH$1 as REORG_DEPTH, REQUIRED_BASE_ERROR_SENTINEL$1 as REQUIRED_BASE_ERROR_SENTINEL, ReconnectConfig, RecoverSnapshotFromTxParams, RecoverSnapshotParams, RedeemParams, ReentrancyError, RemoveTrackedChunksParams, ReorgDetection, RepayParams, RequiredCreditForITM, ResolveBlockNumbersParams, ResolvePanopticPoolFromPoolIdParams, ResolvePanopticPoolFromPoolIdResult, ResolveUniswapV4PoolKeyParams, RollPositionParams, RpcError, RpcResponseError, SCHEMA_VERSION$1 as SCHEMA_VERSION, SFPMSimulationResult, STANDARD_TICK_WIDTHS, STORAGE_PREFIX$1 as STORAGE_PREFIX, SafeModeError, SaveCheckpointParams, SaveClosedPositionParams, ScanChunksParams, ScanChunksResult, ScannedChunk, SettleParams, SettledEvent, SimulateBatchDispatchParams, SimulateBatchDispatchResult, SimulateClosePositionParams, SimulateDeployNewPoolParams, SimulateDepositParams, SimulateDispatchParams, SimulateForceExerciseParams, SimulateLiquidateParams, SimulateOpenPositionParams, SimulateSFPMParams, SimulateSettleParams, SimulateSwapExactInParams, SimulateSwapExactOutParams, SimulateWithdrawParams, SmartRepayParams, SnapshotRecoveryResult, SpeedUpParams, StaleDataError, StaleOracleError, StorageAdapter, StreamiaHistoryResult, StreamiaLeg, StreamiaSnapshot, SupplyParams, SwapExactInParams, SwapExactOutParams, SwapSimulation, SwapTokenMismatchError, SyncCheckpoint, SyncOptions, SyncPositionsParams, SyncPositionsResult, SyncProgressEvent, SyncResult, SyncState, SyncStatus, SyncStatusResult, SyncTimeoutError, TOKEN_ID_BITS, TickAndSpreadLimits, Timescale, TokenCollateral, TokenIdBuilder, TokenIdHasZeroLegsError, TokenInterestState, TooManyLegsOpenError, TransferFailedError, UTILIZATION_DENOMINATOR$1 as UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UniswapFeeHistoryResult, UniswapFeeSnapshot, UniswapV3Liquidities, UniswapV3PoolInfo, UniswapV3PoolToken, UniswapV4PoolBasicState, UniswapV4PoolInfo, UniswapV4PoolKey, UnsupplyParams, UnwrapWethParams, UnwrapXstockParams, V3PoolConfig, V4PoolConfig, ValidateBatchParams, WAD$1 as WAD, WatchEventsParams, WithdrawParams, WithdrawWithPositionsParams, WrapEthParams, WrapXstockParams, WriteConfig, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL$1 as ZERO_COLLATERAL, ZERO_VALUATION$1 as ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, addLegToTokenId, addPendingPosition$1 as addPendingPosition, addTrackedChunks$1 as addTrackedChunks, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildOpenPositionCalldata, buildUniqueLoan, calculateAccountGreeksPure$1 as calculateAccountGreeksPure, calculateResyncBlock, calculateSpreadWad$1 as calculateSpreadWad, cancelTransaction, checkApproval, checkCollateralAcrossTicks$1 as checkCollateralAcrossTicks, cleanupStalePendingPositions$1 as cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions$1 as clearPendingPositions, clearTrackedChunks$1 as clearTrackedChunks, clearTrackedPositions, clearTradeHistory$1 as clearTradeHistory, closePosition, closePositionAndWait, computeV4PoolId$1 as computeV4PoolId, confirmPendingPosition$1 as confirmPendingPosition, convertToAssets$1 as convertToAssets, convertToShares$1 as convertToShares, countLegs, createEventPoller$1 as createEventPoller, createEventSubscription$1 as createEventSubscription, createFileStorage, createFlowNeutralTokenId$1 as createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters$1 as createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodePanopticTokenURI$1 as decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, detectReorg, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodePoolKeyBytes$1 as encodePoolKeyBytes, encodeV3PoolKeyBytes$1 as encodeV3PoolKeyBytes, encodeV4PoolId, estimateBlockNumbers$1 as estimateBlockNumbers, estimateCollateralRequired$1 as estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, failPendingPosition$1 as failPendingPosition, forceExercise, forceExerciseAndWait, formatBlockNumber$1 as formatBlockNumber, formatBps$1 as formatBps, formatCompact$1 as formatCompact, formatDatetime$1 as formatDatetime, formatDuration$1 as formatDuration, formatDurationSeconds$1 as formatDurationSeconds, formatFeeTier$1 as formatFeeTier, formatGas$1 as formatGas, formatGwei$1 as formatGwei, formatPoolIdHex$1 as formatPoolIdHex, formatRateWad, formatRatioPercent$1 as formatRatioPercent, formatTimestamp$1 as formatTimestamp, formatTimestampLocale$1 as formatTimestampLocale, formatTokenAmount, formatTokenAmountSigned, formatTokenDelta, formatTokenFlow, formatTokenIdHex$1 as formatTokenIdHex, formatTokenIdShort$1 as formatTokenIdShort, formatTxHash$1 as formatTxHash, formatUtilization$1 as formatUtilization, formatWad, formatWadPercent, formatWadSigned, formatWei$1 as formatWei, getAccountBuyingPower$1 as getAccountBuyingPower, getAccountCollateral, getAccountGreeks$1 as getAccountGreeks, getAccountHistory$1 as getAccountHistory, getAccountPremia$1 as getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChunkLiquidities$1 as getChunkLiquidities, getChunkSpreads$1 as getChunkSpreads, getClosedPositions$1 as getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralData, getCollateralSharePrices$1 as getCollateralSharePrices, getCollateralTotalAssetsBatch$1 as getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams$1 as getDeltaHedgeParams, getEnforcedTickLimits$1 as getEnforcedTickLimits, getFactoryConstructMetadata$1 as getFactoryConstructMetadata, getFactoryOwnerOf$1 as getFactoryOwnerOf, getFactoryTokenURI$1 as getFactoryTokenURI, getGuardianUnlockState$1 as getGuardianUnlockState, getInterestState, getItmAmounts$1 as getItmAmounts, getLiquidationPrices, getMarginBuffer$1 as getMarginBuffer, getMaxPositionSize$1 as getMaxPositionSize, getMaxWithdrawable$1 as getMaxWithdrawable, getNativeTokenPrice$1 as getNativeTokenPrice, getNetLiquidationValue, getNetLiquidationValues, getOpenPositionIds, getOpenPositionPreview$1 as getOpenPositionPreview, getPanopticPoolAddress$1 as getPanopticPoolAddress, getPanopticPoolFromPoolId$1 as getPanopticPoolFromPoolId, getPendingPositions$1 as getPendingPositions, getPendingPositionsKey, getPoolDeploymentBlock$1 as getPoolDeploymentBlock, getPoolDisplayId$1 as getPoolDisplayId, getPoolLiquidities$1 as getPoolLiquidities, getPoolMetaKey, getPoolPrefix, getPortfolioValue$1 as getPortfolioValue, getPosition, getPositionChunkData$1 as getPositionChunkData, getPositionEnrichmentData$1 as getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositions, getPositionsKey, getPositionsWithPremia$1 as getPositionsWithPremia, getPriceHistory$1 as getPriceHistory, getRealizedPnL$1 as getRealizedPnL, getRequiredCreditForITM$1 as getRequiredCreditForITM, getSafeMode$1 as getSafeMode, getSchemaVersionKey, getStreamiaHistory$1 as getStreamiaHistory, getSyncCheckpointKey, getSyncStatus$1 as getSyncStatus, getTokenListId$1 as getTokenListId, getTrackedChunks$1 as getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory$1 as getTradeHistory, getUniswapFeeHistory$1 as getUniswapFeeHistory, getUniswapV3PoolFromId$1 as getUniswapV3PoolFromId, getUniswapV3PoolInfo$1 as getUniswapV3PoolInfo, getUniswapV3PoolLiquidities$1 as getUniswapV3PoolLiquidities, getUniswapV4PoolBasicState$1 as getUniswapV4PoolBasicState, getUniswapV4PoolInfo$1 as getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId$1 as getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities$1 as getUniswapV4PoolLiquidities, hasLoanOrCredit, hasLongLeg, interpolateBlocks$1 as interpolateBlocks, isCredit, isCreditLeg, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, minePoolAddress$1 as minePoolAddress, mint, mintAndWait, multicallRead$1 as multicallRead, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners$1 as optimizeTokenIdRiskPartners, parseBps$1 as parseBps, parseCollateralLog$1 as parseCollateralLog, parsePanopticError, parsePoolLog$1 as parsePoolLog, parseTokenAmount, parseTokenListId$1 as parseTokenListId, parseWad, pokeOracle, pokeOracleAndWait, previewBorrow, previewDeposit$1 as previewDeposit, previewMint$1 as previewMint, previewRedeem$1 as previewRedeem, previewUnwrap, previewWithdraw$1 as previewWithdraw, previewWrap, publicBroadcaster, reconstructFromEvents$1 as reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks$1 as removeTrackedChunks, repay, repayAndWait, resolveBlockNumbers$1 as resolveBlockNumbers, resolvePanopticPoolFromPoolId$1 as resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey$1 as resolveUniswapV4PoolKey, rollPosition, rollPositionAndWait, saveCheckpoint, saveClosedPosition$1 as saveClosedPosition, scanChunks$1 as scanChunks, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateBatchDispatch$1 as simulateBatchDispatch, simulateClosePosition$1 as simulateClosePosition, simulateDeployNewPool$1 as simulateDeployNewPool, simulateDeposit$1 as simulateDeposit, simulateDispatch$1 as simulateDispatch, simulateForceExercise$1 as simulateForceExercise, simulateLiquidate$1 as simulateLiquidate, simulateOpenPosition, simulateSFPMBurn$1 as simulateSFPMBurn, simulateSFPMMint$1 as simulateSFPMMint, simulateSettle$1 as simulateSettle, simulateSwapExactIn$1 as simulateSwapExactIn, simulateSwapExactOut$1 as simulateSwapExactOut, simulateWithdraw$1 as simulateWithdraw, smartRepay, smartRepayAndWait, speedUpTransaction, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, truncateAddress$1 as truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, validateBatch, validatePoolId, verifyBlockContinuity, watchEvents$1 as watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi } from "../../index-B3JZRUNo.js";
|
|
5
|
+
import { BORROW_INDEX_BITS$1 as BORROW_INDEX_BITS, BPS_SCALE$1 as BPS_SCALE, ChainDeployment, IrmCurrent, IrmMarketStateInputs, IrmPoint, MARKET_EPOCH_BITS$1 as MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT$1 as MARKET_EPOCH_SHIFT, RATE_AT_TARGET_BITS$1 as RATE_AT_TARGET_BITS, SECONDS_PER_YEAR$1 as SECONDS_PER_YEAR, UNREALIZED_INTEREST_BITS$1 as UNREALIZED_INTEREST_BITS, annualizePerSecondRateWad$1 as annualizePerSecondRateWad, collateralTrackerV2Abi$1 as collateralTrackerV2Abi, deriveSupplyRatePerSecWad$1 as deriveSupplyRatePerSecWad, formatPerSecondRateWadAsAprPct$1 as formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct$1 as formatPerSecondRateWadAsApyPct, getChainDeployment$1 as getChainDeployment, getIrmCurrent$1 as getIrmCurrent, getIrmCurve$1 as getIrmCurve, isSupportedChain$1 as isSupportedChain, packMarketState$1 as packMarketState, panopticPoolV2Abi$1 as panopticPoolV2Abi, ratePerSecWadToAprPct$1 as ratePerSecWadToAprPct, requireChainDeployment$1 as requireChainDeployment, utilizationBpsToWad$1 as utilizationBpsToWad, utilizationPctToWad$1 as utilizationPctToWad } from "../../irm-BNtE1Dmg.js";
|
|
6
|
+
import { AccountLiquidatedEvent, BaseEvent, DepositEvent, DispatchCall, EventSubscription, ForcedExercisedEvent, LegUpdate, NonceManager, OptionBurntEvent, OptionMintedEvent, PanopticEvent, PanopticEventType, PremiumSettledEvent, SyncEvent, TxBroadcaster, TxOverrides, TxReceipt, TxResult, TxResultWithReceipt, WithdrawEvent } from "../../tx-BXXqhBHn.js";
|
|
7
|
+
import { ClosePositionSimulation, DepositSimulation, DispatchSimulation, ForceExerciseSimulation, LiquidateSimulation, OpenPositionSimulation, PanopticError$1 as PanopticError, SettleSimulation, SimulationResult, TokenFlow, WithdrawSimulation } from "../../simulation-CUqERC5Y.js";
|
|
8
|
+
import { CheckCowApprovalParams, QuoteCowSwapParams } from "../../types-DgWfno7q.js";
|
|
9
|
+
import { PositionGreeksInput, PositionGreeksResult, calculatePortfolioDelta$1 as calculatePortfolioDelta, calculatePortfolioGamma$1 as calculatePortfolioGamma, calculatePortfolioGreeks$1 as calculatePortfolioGreeks, calculatePortfolioValue$1 as calculatePortfolioValue, calculatePositionDelta$1 as calculatePositionDelta, calculatePositionDeltaDebtOnly$1 as calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap$1 as calculatePositionDeltaWithSwap, calculatePositionGamma$1 as calculatePositionGamma, calculatePositionGreeks$1 as calculatePositionGreeks, calculatePositionValue$1 as calculatePositionValue, getLegDelta$1 as getLegDelta, getLegDeltaInVaultFrame$1 as getLegDeltaInVaultFrame, getLegGamma$1 as getLegGamma, getLegNetValueWidth0$1 as getLegNetValueWidth0, getLegValue$1 as getLegValue, isCall$1 as isCall, isDefinedRisk$1 as isDefinedRisk, toVaultFrameAtTick$1 as toVaultFrameAtTick } from "../../index-CDCAju5o.js";
|
|
10
|
+
import { CheckRouterApprovalParams, QuoteSwapExactInViaRouterParams, QuoteSwapExactOutViaRouterParams } from "../../types-VeWdNN0j.js";
|
|
11
|
+
import { Address as Address$1, Hash, Hex, PublicClient, WalletClient } from "viem";
|
|
12
|
+
import { ReactNode } from "react";
|
|
13
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
14
|
+
|
|
15
|
+
//#region src/panoptic/v2/react/hooks/reads.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Common query options exposed to consumers.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Common query options exposed to consumers.
|
|
21
|
+
*/
|
|
22
|
+
interface QueryOptions {
|
|
23
|
+
/** Whether the query is enabled */
|
|
24
|
+
enabled?: boolean;
|
|
25
|
+
/** Refetch interval in milliseconds */
|
|
26
|
+
refetchInterval?: number | false;
|
|
27
|
+
/** Time in milliseconds that data is considered fresh */
|
|
28
|
+
staleTime?: number;
|
|
29
|
+
/** Time in milliseconds that unused data is kept in cache */
|
|
30
|
+
gcTime?: number;
|
|
31
|
+
}
|
|
32
|
+
declare function usePool(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
33
|
+
declare function useUtilization(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
34
|
+
declare function useOracleState(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
35
|
+
declare function useRiskParameters(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
36
|
+
declare function useCurrentRates(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
37
|
+
declare function useSafeMode(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
38
|
+
/**
|
|
39
|
+
* React hook for the Guardian pending-unlock state of a pool.
|
|
40
|
+
*
|
|
41
|
+
* Reads `unlockEta` + `isPoolUnlockReady` from the PanopticGuardian so the UI
|
|
42
|
+
* can surface the unlock timelock while a pool is locked (close-only). Gate it
|
|
43
|
+
* via `options.enabled` so it only runs when the pool is actually locked.
|
|
44
|
+
*
|
|
45
|
+
* @param poolAddress - The PanopticPool address
|
|
46
|
+
* @param options - Optional react-query settings (enabled, refetchInterval, staleTime, gcTime)
|
|
47
|
+
* @returns A react-query result whose `data` is a `GuardianUnlockState`
|
|
48
|
+
*/
|
|
49
|
+
declare function useGuardianUnlockState(poolAddress: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
50
|
+
declare function useCollateralData(poolAddress: Address$1, tokenIndex: 0 | 1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
51
|
+
declare function usePoolLiquidities(poolAddress: Address$1, params: {
|
|
52
|
+
queryAddress: Address$1;
|
|
53
|
+
startTick: bigint;
|
|
54
|
+
nTicks: bigint;
|
|
55
|
+
}, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
56
|
+
declare function useChunkSpreads(poolAddress: Address$1, params: {
|
|
57
|
+
sfpmAddress: Address$1;
|
|
58
|
+
}, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
59
|
+
declare function usePosition(poolAddress: Address$1, owner: Address$1, tokenId: bigint, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
60
|
+
declare function usePositions(poolAddress: Address$1, tokenIds: bigint[], owner?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
61
|
+
declare function usePositionGreeks(poolAddress: Address$1, tokenId: bigint, owner: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
62
|
+
declare function useAccountCollateral(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
63
|
+
declare function useInterestState(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
64
|
+
declare function useAccountSummaryBasic(poolAddress: Address$1, tokenIds: bigint[], account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
65
|
+
declare function useAccountSummaryRisk(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, account?: Address$1, options?: QueryOptions & {
|
|
66
|
+
atTick?: bigint;
|
|
67
|
+
includePendingPremium?: boolean;
|
|
68
|
+
}): QueryObserverResult<TData, TError>;
|
|
69
|
+
declare function useNetLiquidationValue(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, account?: Address$1, options?: QueryOptions & {
|
|
70
|
+
atTick?: bigint;
|
|
71
|
+
}): QueryObserverResult<TData, TError>;
|
|
72
|
+
declare function useNetLiquidationValues(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, atTicks: bigint[], account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
73
|
+
declare function useLiquidationPrices(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
74
|
+
declare function useAccountGreeks(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
75
|
+
declare function useMarginBuffer(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
76
|
+
declare function useIsLiquidatable(poolAddress: Address$1, tokenIds: bigint[], queryAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
77
|
+
declare function useAccountPremia(poolAddress: Address$1, tokenIds: bigint[], account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
78
|
+
declare function usePositionsWithPremia(poolAddress: Address$1, tokenIds: bigint[], account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
79
|
+
declare function usePreviewDeposit(poolAddress: Address$1, tokenIndex: 0 | 1, amount: bigint, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
80
|
+
declare function usePreviewWithdraw(poolAddress: Address$1, tokenIndex: 0 | 1, amount: bigint, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
81
|
+
declare function usePreviewMint(poolAddress: Address$1, tokenIndex: 0 | 1, amount: bigint, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
82
|
+
declare function usePreviewRedeem(poolAddress: Address$1, tokenIndex: 0 | 1, amount: bigint, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
83
|
+
declare function useEstimateCollateralRequired(poolAddress: Address$1, tokenId: bigint, positionSize: bigint, queryAddress: Address$1, account?: Address$1, options?: QueryOptions & {
|
|
84
|
+
atTick?: bigint;
|
|
85
|
+
}): QueryObserverResult<TData, TError>;
|
|
86
|
+
declare function useFlowNeutralTokenId(poolAddress: Address$1, tokenId: bigint, positionSize: bigint, account?: Address$1, options?: QueryOptions & {
|
|
87
|
+
existingPositionIds?: bigint[];
|
|
88
|
+
neutralizeITM?: boolean;
|
|
89
|
+
swapAtMint?: boolean;
|
|
90
|
+
/** Size to measure the base flow at (defaults to positionSize). See SDK param. */
|
|
91
|
+
referenceSize?: bigint;
|
|
92
|
+
/** PanopticQuery address — gates OTM on true intrinsic. See SDK param. */
|
|
93
|
+
queryAddress?: Address$1;
|
|
94
|
+
}): QueryObserverResult<TData, TError>;
|
|
95
|
+
declare function useMaxPositionSize(poolAddress: Address$1, tokenId: bigint, queryAddress: Address$1, account?: Address$1, options?: QueryOptions & {
|
|
96
|
+
existingPositionIds?: bigint[];
|
|
97
|
+
swapAtMint?: boolean;
|
|
98
|
+
precisionPct?: number;
|
|
99
|
+
usePremiaAsCollateral?: boolean;
|
|
100
|
+
}): QueryObserverResult<TData, TError>;
|
|
101
|
+
declare function useOptimizeRiskPartners(poolAddress: Address$1, tokenId: bigint, queryAddress: Address$1, atTick?: bigint, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
102
|
+
declare function useMaxWithdrawable(collateralTrackerAddress: Address$1, positionIdList: bigint[], totalAssets: bigint, account?: Address$1, options?: QueryOptions & {
|
|
103
|
+
client?: PublicClient;
|
|
104
|
+
}): QueryObserverResult<TData, TError>;
|
|
105
|
+
declare function useOpenPositionPreview(poolAddress: Address$1, account: Address$1 | undefined, existingPositionIds: bigint[], tokenId: bigint, positionSize: bigint, queryAddress: Address$1, tickLimitLow: bigint, tickLimitHigh: bigint, options?: QueryOptions & {
|
|
106
|
+
spreadLimit?: bigint;
|
|
107
|
+
swapAtMint?: boolean;
|
|
108
|
+
usePremiaAsCollateral?: boolean;
|
|
109
|
+
blockNumber?: bigint;
|
|
110
|
+
}): QueryObserverResult<TData, TError>;
|
|
111
|
+
declare function useTrackedPositionIds(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
112
|
+
declare function useTradeHistory(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
113
|
+
declare function useRealizedPnL(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
114
|
+
declare function useClosedPositions(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
115
|
+
declare function useSyncStatus(poolAddress: Address$1, account?: Address$1, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
116
|
+
type OmitFactoryClient<T> = T extends unknown ? Omit<T, 'client'> : never;
|
|
117
|
+
declare function usePanopticPoolAddress(params?: OmitFactoryClient<GetPanopticPoolAddressParams>, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
118
|
+
declare function useFactoryTokenURI(params?: OmitFactoryClient<GetFactoryTokenURIParams>, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
119
|
+
declare function useFactoryOwnerOf(params?: OmitFactoryClient<GetFactoryOwnerOfParams>, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
120
|
+
declare function useMinePoolAddress(): any;
|
|
121
|
+
declare function useFactoryConstructMetadata(params?: OmitFactoryClient<GetFactoryConstructMetadataParams>, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
122
|
+
type OmitMineClient<T> = T extends unknown ? Omit<T, 'client'> : never;
|
|
123
|
+
declare function useSimulateDeployNewPool(params?: OmitMineClient<SimulateDeployNewPoolParams>, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
124
|
+
/** Timestamp-based time range. Start/end resolved to blocks via RPC binary search or estimation. */
|
|
125
|
+
interface TimestampTimeRange {
|
|
126
|
+
mode: 'timestamps';
|
|
127
|
+
/** Start of the range (Unix seconds) */
|
|
128
|
+
startTimestamp: number;
|
|
129
|
+
/** End of the range (Unix seconds). Defaults to now if omitted. */
|
|
130
|
+
endTimestamp?: number;
|
|
131
|
+
/** Number of evenly-spaced data points to fetch */
|
|
132
|
+
points: number;
|
|
133
|
+
/** Extra block numbers to include in the fetched set (e.g. blockAtMint) */
|
|
134
|
+
pinnedBlocks?: bigint[];
|
|
135
|
+
/**
|
|
136
|
+
* Block resolution strategy.
|
|
137
|
+
* - 'exact': RPC binary search (~25 sequential getBlock calls). Default.
|
|
138
|
+
* - 'estimate': 2-RPC linear extrapolation. Suitable for charts where
|
|
139
|
+
* ±N-block error is invisible. Saves ~23 RPCs per call.
|
|
140
|
+
*/
|
|
141
|
+
resolution?: 'exact' | 'estimate';
|
|
142
|
+
}
|
|
143
|
+
/** Block-based time range. No RPC resolution needed. */
|
|
144
|
+
interface BlockTimeRange {
|
|
145
|
+
mode: 'blocks';
|
|
146
|
+
/** Start block number */
|
|
147
|
+
startBlock: bigint;
|
|
148
|
+
/** End block number. Defaults to latest if omitted. */
|
|
149
|
+
endBlock?: bigint;
|
|
150
|
+
/** Number of evenly-spaced data points to fetch */
|
|
151
|
+
points: number;
|
|
152
|
+
/** Extra block numbers to include in the fetched set (e.g. blockAtMint) */
|
|
153
|
+
pinnedBlocks?: bigint[];
|
|
154
|
+
}
|
|
155
|
+
type PriceHistoryTimeRange = TimestampTimeRange | BlockTimeRange;
|
|
156
|
+
/**
|
|
157
|
+
* Hook to fetch historical price data (tick + sqrtPriceX96) for a pool.
|
|
158
|
+
*
|
|
159
|
+
* Supports two modes:
|
|
160
|
+
* - **timestamps**: Resolves start/end timestamps to blocks (2 RPC binary searches),
|
|
161
|
+
* then interpolates the blocks in between (pure math).
|
|
162
|
+
* - **blocks**: Uses start/end blocks directly, interpolates in between.
|
|
163
|
+
* Zero resolution overhead.
|
|
164
|
+
*
|
|
165
|
+
* In both cases, the actual price reads are O(points) slot0 calls.
|
|
166
|
+
* Reads at different historical blocks cannot be coalesced into one multicall.
|
|
167
|
+
*
|
|
168
|
+
* @param poolConfig - Pool version config (V3 pool address or V4 StateView + poolId)
|
|
169
|
+
* @param timeRange - Time range specification (timestamps or blocks)
|
|
170
|
+
* @param options - Query options (enabled, refetchInterval, staleTime, gcTime)
|
|
171
|
+
*/
|
|
172
|
+
declare function usePriceHistory(poolConfig: PoolVersionConfig, timeRange: PriceHistoryTimeRange, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
173
|
+
/**
|
|
174
|
+
* Hook to fetch historical streamia (streaming premia + Uniswap fee) data for a position.
|
|
175
|
+
*
|
|
176
|
+
* @param panopticPoolAddress - PanopticPool contract address
|
|
177
|
+
* @param account - Account whose position to query
|
|
178
|
+
* @param tokenId - The encoded tokenId
|
|
179
|
+
* @param legs - Decoded legs with pre-computed liquidity
|
|
180
|
+
* @param poolConfig - Pool version config (V3 pool address or V4 StateView + poolId)
|
|
181
|
+
* @param timeRange - Time range specification (timestamps or blocks)
|
|
182
|
+
* @param options - Query options + optional includeUniswapFees and settledEvents
|
|
183
|
+
*/
|
|
184
|
+
declare function useStreamiaHistory(panopticPoolAddress: Address$1, account: Address$1, tokenId: bigint, legs: StreamiaLeg[], poolConfig: PoolVersionConfig, timeRange: PriceHistoryTimeRange, options?: QueryOptions & {
|
|
185
|
+
includeUniswapFees?: boolean;
|
|
186
|
+
settledEvents?: Array<{
|
|
187
|
+
blockNumber: bigint;
|
|
188
|
+
settled0: bigint;
|
|
189
|
+
settled1: bigint;
|
|
190
|
+
}>;
|
|
191
|
+
}): QueryObserverResult<TData, TError>;
|
|
192
|
+
/**
|
|
193
|
+
* Hook to fetch historical Uniswap fee data for a set of liquidity legs.
|
|
194
|
+
*
|
|
195
|
+
* @param legs - Decoded legs with pre-computed liquidity
|
|
196
|
+
* @param poolConfig - Pool version config (V3 pool address or V4 StateView + poolId)
|
|
197
|
+
* @param timeRange - Time range specification (timestamps or blocks)
|
|
198
|
+
* @param options - Query options (enabled, refetchInterval, staleTime, gcTime)
|
|
199
|
+
*/
|
|
200
|
+
declare function useUniswapFeeHistory(legs: StreamiaLeg[], poolConfig: PoolVersionConfig, timeRange: PriceHistoryTimeRange, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
201
|
+
/**
|
|
202
|
+
* Reads basic on-chain info (token0, token1, fee, tickSpacing, slot0, liquidity) from a Uniswap V3 pool.
|
|
203
|
+
* @param poolAddress - The Uniswap V3 pool contract address.
|
|
204
|
+
* @param options - Optional React Query options (`enabled`, `staleTime`, `gcTime`, `refetchInterval`).
|
|
205
|
+
* @returns React Query result resolving to the pool info object.
|
|
206
|
+
*/
|
|
207
|
+
declare function useUniswapV3PoolInfo(poolAddress: Address$1 | undefined, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
208
|
+
/**
|
|
209
|
+
* Reads per-tick active liquidity from a Uniswap V3 pool via PanopticQuery's `getTickNetsV3`.
|
|
210
|
+
* @param poolAddress - The Uniswap V3 pool contract address.
|
|
211
|
+
* @param queryAddress - The PanopticQuery helper contract address.
|
|
212
|
+
* @param args - Tick window: `startTick` (inclusive) and `nTicks` count to scan.
|
|
213
|
+
* @param options - Optional React Query options (`enabled`, `staleTime`, `gcTime`, `refetchInterval`).
|
|
214
|
+
* @returns React Query result resolving to `{ ticks, liquidityNets }` parallel arrays.
|
|
215
|
+
*/
|
|
216
|
+
declare function useUniswapV3PoolLiquidities(poolAddress: Address$1 | undefined, queryAddress: Address$1 | undefined, args: {
|
|
217
|
+
startTick: number;
|
|
218
|
+
nTicks: bigint;
|
|
219
|
+
} | undefined, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
220
|
+
/**
|
|
221
|
+
* Resolves a Uniswap V4 PoolKey from a poolId hash by scanning `Initialize` event logs on the PoolManager.
|
|
222
|
+
* PoolKey is immutable, so results are cached indefinitely within the session by default.
|
|
223
|
+
* @param poolManager - The Uniswap V4 PoolManager contract address.
|
|
224
|
+
* @param poolId - The 32-byte poolId hash.
|
|
225
|
+
* @param args - Optional `fromBlock` and `chunkSize` for log paging.
|
|
226
|
+
* @param options - Optional React Query options (`enabled`, `staleTime`, `gcTime`, `refetchInterval`).
|
|
227
|
+
* @returns React Query result resolving to the resolved `UniswapV4PoolKey`.
|
|
228
|
+
*/
|
|
229
|
+
declare function useResolveUniswapV4PoolKey(poolManager: Address$1 | undefined, poolId: `0x${string}` | undefined, args?: {
|
|
230
|
+
fromBlock?: bigint;
|
|
231
|
+
chunkSize?: bigint;
|
|
232
|
+
}, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
233
|
+
/**
|
|
234
|
+
* Reads basic on-chain state (slot0, liquidity) for a Uniswap V4 pool via the StateView contract.
|
|
235
|
+
* @param stateViewAddress - The Uniswap V4 StateView contract address.
|
|
236
|
+
* @param poolId - The 32-byte poolId hash.
|
|
237
|
+
* @param options - Optional React Query options (`enabled`, `staleTime`, `gcTime`, `refetchInterval`).
|
|
238
|
+
* @returns React Query result resolving to the pool's basic state.
|
|
239
|
+
*/
|
|
240
|
+
declare function useUniswapV4PoolBasicState(stateViewAddress: Address$1 | undefined, poolId: `0x${string}` | undefined, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
241
|
+
/**
|
|
242
|
+
* Reads full pool info (slot0, liquidity, and PoolKey-derived metadata) for a Uniswap V4 pool via the StateView contract.
|
|
243
|
+
* @param stateViewAddress - The Uniswap V4 StateView contract address.
|
|
244
|
+
* @param poolKey - The pool's `UniswapV4PoolKey` (currency0, currency1, fee, tickSpacing, hooks).
|
|
245
|
+
* @param options - Optional React Query options (`enabled`, `staleTime`, `gcTime`, `refetchInterval`).
|
|
246
|
+
* @returns React Query result resolving to the full pool info object.
|
|
247
|
+
*/
|
|
248
|
+
declare function useUniswapV4PoolInfo(stateViewAddress: Address$1 | undefined, poolKey: UniswapV4PoolKey | undefined, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
249
|
+
/**
|
|
250
|
+
* Reads per-tick active liquidity from a Uniswap V4 pool via PanopticQuery's `getTickNetsV4`.
|
|
251
|
+
* @param queryAddress - The PanopticQuery helper contract address.
|
|
252
|
+
* @param poolManager - The Uniswap V4 PoolManager contract address.
|
|
253
|
+
* @param poolId - The 32-byte poolId hash.
|
|
254
|
+
* @param args - `tickSpacing`, `startTick` (inclusive), and `nTicks` count to scan.
|
|
255
|
+
* @param options - Optional React Query options (`enabled`, `staleTime`, `gcTime`, `refetchInterval`).
|
|
256
|
+
* @returns React Query result resolving to `{ ticks, liquidityNets }` parallel arrays.
|
|
257
|
+
*/
|
|
258
|
+
declare function useUniswapV4PoolLiquidities(queryAddress: Address$1 | undefined, poolManager: Address$1 | undefined, poolId: `0x${string}` | undefined, args: {
|
|
259
|
+
tickSpacing: number;
|
|
260
|
+
startTick: number;
|
|
261
|
+
nTicks: bigint;
|
|
262
|
+
} | undefined, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
263
|
+
declare function useNativeTokenPrice(panopticPoolAddress: Address$1 | undefined, token0Decimals: bigint, token1Decimals: bigint, nativeIsToken0: boolean, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
264
|
+
declare function usePreviewBorrow(poolAddress: Address$1, params?: {
|
|
265
|
+
account: Address$1;
|
|
266
|
+
token: Address$1;
|
|
267
|
+
amount: bigint;
|
|
268
|
+
slippageBps: bigint;
|
|
269
|
+
existingPositionIds: bigint[];
|
|
270
|
+
}, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
271
|
+
/**
|
|
272
|
+
* Validate whether a builder code maps to a deployed builder wallet.
|
|
273
|
+
*
|
|
274
|
+
* Returns `{ data: true }` for valid codes, `{ data: false }` for invalid.
|
|
275
|
+
* Disabled when `builderCode` is `undefined` or `0n`.
|
|
276
|
+
*/
|
|
277
|
+
declare function useValidateBuilderCode(poolAddress: Address$1, builderCode: bigint | undefined, options?: QueryOptions): QueryObserverResult<TData, TError>;
|
|
278
|
+
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region src/panoptic/v2/react/hooks/writes.d.ts
|
|
281
|
+
declare function useApprove(): any;
|
|
282
|
+
declare function useApprovePool(poolAddress: Address$1): any;
|
|
283
|
+
declare function useDeposit(poolAddress: Address$1): any;
|
|
284
|
+
declare function useWithdraw(poolAddress: Address$1): any;
|
|
285
|
+
/**
|
|
286
|
+
* Wrap an underlying xStock into its ERC4626 wrapper (`deposit`). Requires a
|
|
287
|
+
* prior approval of the underlying to the wrapper (use {@link useApprove}).
|
|
288
|
+
* Invalidates SDK queries so balances refetch.
|
|
289
|
+
*/
|
|
290
|
+
declare function useWrapXstock(): any;
|
|
291
|
+
/**
|
|
292
|
+
* Unwrap wrapper shares back into the underlying xStock (`redeem`). Burns the
|
|
293
|
+
* owner's own shares — no approval needed.
|
|
294
|
+
*/
|
|
295
|
+
declare function useUnwrapXstock(): any;
|
|
296
|
+
/**
|
|
297
|
+
* Wrap native ETH into WETH (`deposit` payable). No approval needed.
|
|
298
|
+
* Invalidates SDK queries so balances refetch.
|
|
299
|
+
*/
|
|
300
|
+
declare function useWrapEth(): any;
|
|
301
|
+
/**
|
|
302
|
+
* Unwrap WETH back into native ETH (`withdraw`). Burns the caller's own WETH —
|
|
303
|
+
* no approval needed. Invalidates SDK queries so balances refetch.
|
|
304
|
+
*/
|
|
305
|
+
declare function useUnwrapWeth(): any;
|
|
306
|
+
declare function useMintShares(poolAddress: Address$1): any;
|
|
307
|
+
declare function useRedeem(poolAddress: Address$1): any;
|
|
308
|
+
declare function useWithdrawWithPositions(poolAddress: Address$1): any;
|
|
309
|
+
declare function useOpenPosition(poolAddress: Address$1): any;
|
|
310
|
+
declare function useClosePosition(poolAddress: Address$1): any;
|
|
311
|
+
declare function useRollPosition(poolAddress: Address$1): any;
|
|
312
|
+
declare function useLiquidate(poolAddress: Address$1): any;
|
|
313
|
+
declare function useForceExercise(poolAddress: Address$1): any;
|
|
314
|
+
declare function useSettleAccumulatedPremia(poolAddress: Address$1): any;
|
|
315
|
+
declare function usePokeOracle(poolAddress: Address$1): any;
|
|
316
|
+
declare function useDispatch(poolAddress: Address$1): any;
|
|
317
|
+
declare function useBatchDispatch(poolAddress: Address$1): any;
|
|
318
|
+
declare function useDeployNewPool(): any;
|
|
319
|
+
declare function useSwapExactOut(poolAddress: Address$1): any;
|
|
320
|
+
declare function useSupply(poolAddress: Address$1): any;
|
|
321
|
+
declare function useUnsupply(poolAddress: Address$1): any;
|
|
322
|
+
declare function useBorrow(poolAddress: Address$1): any;
|
|
323
|
+
declare function useRepay(poolAddress: Address$1): any;
|
|
324
|
+
declare function useSmartRepay(poolAddress: Address$1): any;
|
|
325
|
+
declare function useSwapExactIn(poolAddress: Address$1): any;
|
|
326
|
+
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region src/panoptic/v2/react/hooks/simulations.d.ts
|
|
329
|
+
type OmitClient<T> = Omit<T, 'client'>;
|
|
330
|
+
type OmitClientAndPool<T> = Omit<T, 'client' | 'poolAddress'>;
|
|
331
|
+
declare function useSimulateOpenPosition(poolAddress: Address$1, params?: OmitClientAndPool<SimulateOpenPositionParams>): QueryObserverResult<TData, TError>;
|
|
332
|
+
declare function useSimulateClosePosition(poolAddress: Address$1, params?: OmitClientAndPool<SimulateClosePositionParams>): QueryObserverResult<TData, TError>;
|
|
333
|
+
declare function useSimulateDeposit(params?: OmitClient<SimulateDepositParams>): QueryObserverResult<TData, TError>;
|
|
334
|
+
declare function useSimulateWithdraw(params?: OmitClient<SimulateWithdrawParams>): QueryObserverResult<TData, TError>;
|
|
335
|
+
declare function useSimulateLiquidate(poolAddress: Address$1, params?: OmitClientAndPool<SimulateLiquidateParams>): QueryObserverResult<TData, TError>;
|
|
336
|
+
declare function useSimulateForceExercise(poolAddress: Address$1, params?: OmitClientAndPool<SimulateForceExerciseParams>): QueryObserverResult<TData, TError>;
|
|
337
|
+
declare function useSimulateSettle(poolAddress: Address$1, params?: OmitClientAndPool<SimulateSettleParams>): QueryObserverResult<TData, TError>;
|
|
338
|
+
declare function useSimulateBatchDispatch(poolAddress: Address$1, params?: OmitClientAndPool<SimulateBatchDispatchParams>): QueryObserverResult<TData, TError>;
|
|
339
|
+
declare function useSimulateDispatch(poolAddress: Address$1, params?: OmitClientAndPool<SimulateDispatchParams>): QueryObserverResult<TData, TError>;
|
|
340
|
+
declare function useSimulateSFPMMint(params?: OmitClient<SimulateSFPMParams>): QueryObserverResult<TData, TError>;
|
|
341
|
+
declare function useSimulateSFPMBurn(params?: OmitClient<SimulateSFPMParams>): QueryObserverResult<TData, TError>;
|
|
342
|
+
declare function useSimulateSwapExactOut(poolAddress: Address$1, params?: OmitClientAndPool<SimulateSwapExactOutParams>): QueryObserverResult<TData, TError>;
|
|
343
|
+
declare function useSimulateSwapExactIn(poolAddress: Address$1, params?: OmitClientAndPool<SimulateSwapExactInParams>): QueryObserverResult<TData, TError>;
|
|
344
|
+
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region src/panoptic/v2/react/hooks/uniswapRouter.d.ts
|
|
347
|
+
type OmitInjectedWithChain<T> = Omit<T, 'client' | 'walletClient' | 'account' | 'chainId'>;
|
|
348
|
+
type OmitClientPoolAndChain<T> = Omit<T, 'client' | 'poolAddress' | 'chainId'>;
|
|
349
|
+
/**
|
|
350
|
+
* Quote an exact-in spot swap via the Universal Router (V4Quoter-backed).
|
|
351
|
+
* Returns a `SimulationResult`, matching `useSimulateSwapExactIn`'s shape.
|
|
352
|
+
*/
|
|
353
|
+
declare function useQuoteSwapExactInViaRouter(poolAddress: Address$1, params?: OmitClientPoolAndChain<QuoteSwapExactInViaRouterParams>): QueryObserverResult<TData, TError>;
|
|
354
|
+
/**
|
|
355
|
+
* Quote an exact-out spot swap via the Universal Router (V4Quoter-backed).
|
|
356
|
+
* Returns a `SimulationResult` carrying the required input + `amountInMaximum`.
|
|
357
|
+
*/
|
|
358
|
+
declare function useQuoteSwapExactOutViaRouter(poolAddress: Address$1, params?: OmitClientPoolAndChain<QuoteSwapExactOutViaRouterParams>): QueryObserverResult<TData, TError>;
|
|
359
|
+
/**
|
|
360
|
+
* Check the ERC20 → Permit2 → Universal Router allowance chain.
|
|
361
|
+
*/
|
|
362
|
+
declare function useCheckRouterApproval(params?: OmitInjectedWithChain<CheckRouterApprovalParams>): QueryObserverResult<TData, TError>;
|
|
363
|
+
/**
|
|
364
|
+
* Execute an exact-in spot swap via the Universal Router.
|
|
365
|
+
*/
|
|
366
|
+
declare function useSwapExactInViaRouter(poolAddress: Address$1): any;
|
|
367
|
+
/**
|
|
368
|
+
* Execute an exact-out spot swap via the Universal Router.
|
|
369
|
+
*/
|
|
370
|
+
declare function useSwapExactOutViaRouter(poolAddress: Address$1): any;
|
|
371
|
+
/**
|
|
372
|
+
* Step 1 approval mutation: ERC20 → Permit2.
|
|
373
|
+
*/
|
|
374
|
+
declare function useApproveErc20ForPermit2(): any;
|
|
375
|
+
/**
|
|
376
|
+
* Step 2 approval mutation: Permit2 → Universal Router.
|
|
377
|
+
*/
|
|
378
|
+
declare function useApproveRouterViaPermit2(): any;
|
|
379
|
+
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region src/panoptic/v2/react/hooks/cowSwap.d.ts
|
|
382
|
+
type OmitChainAndFrom<T> = Omit<T, 'chainId' | 'from'>;
|
|
383
|
+
type OmitClientOnly<T> = Omit<T, 'client'>;
|
|
384
|
+
/**
|
|
385
|
+
* Quote a swap via the CoW order book. The connected account (or a stub when
|
|
386
|
+
* disconnected) is used as the order owner (`from`); disabled while the chain
|
|
387
|
+
* has no order book.
|
|
388
|
+
*/
|
|
389
|
+
declare function useQuoteCowSwap(params?: OmitChainAndFrom<QuoteCowSwapParams>): QueryObserverResult<TData, TError>;
|
|
390
|
+
/** Check the ERC20 → GPv2VaultRelayer allowance for the sell token. */
|
|
391
|
+
declare function useCheckCowApproval(params?: OmitClientOnly<CheckCowApprovalParams>): QueryObserverResult<TData, TError>;
|
|
392
|
+
/** Approval mutation: ERC20 → GPv2VaultRelayer (single step, no Permit2). */
|
|
393
|
+
declare function useApproveErc20ForCow(): any;
|
|
394
|
+
/**
|
|
395
|
+
* Sign an order (EIP-712) and post it to the order book. Resolves with the
|
|
396
|
+
* order UID — not a tx hash; settlement is asynchronous.
|
|
397
|
+
*/
|
|
398
|
+
declare function useSubmitCowOrder(): any;
|
|
399
|
+
/**
|
|
400
|
+
* Poll an order's lifecycle state every few seconds while it is open; polling
|
|
401
|
+
* stops automatically once the order reaches a terminal state.
|
|
402
|
+
*/
|
|
403
|
+
declare function useCowOrderStatus(orderUid?: Hex): QueryObserverResult<TData, TError>;
|
|
404
|
+
/** Off-chain (signed, free) order cancellation mutation. */
|
|
405
|
+
declare function useCancelCowOrder(): any;
|
|
406
|
+
|
|
407
|
+
//#endregion
|
|
408
|
+
//#region src/panoptic/v2/react/hooks/sync.d.ts
|
|
409
|
+
/**
|
|
410
|
+
* Hook for syncing positions with progress tracking.
|
|
411
|
+
*/
|
|
412
|
+
declare function useSyncPositions(poolAddress: Address$1): any;
|
|
413
|
+
/**
|
|
414
|
+
* Hook for adding a pending position (optimistic update).
|
|
415
|
+
*/
|
|
416
|
+
declare function useAddPendingPosition(poolAddress: Address$1): any;
|
|
417
|
+
/**
|
|
418
|
+
* Hook for confirming a pending position.
|
|
419
|
+
*/
|
|
420
|
+
declare function useConfirmPendingPosition(poolAddress: Address$1): any;
|
|
421
|
+
/**
|
|
422
|
+
* Hook for marking a pending position as failed.
|
|
423
|
+
*/
|
|
424
|
+
declare function useFailPendingPosition(poolAddress: Address$1): any;
|
|
425
|
+
/**
|
|
426
|
+
* Hook for clearing all tracked positions.
|
|
427
|
+
*/
|
|
428
|
+
declare function useClearTrackedPositions(poolAddress: Address$1): any;
|
|
429
|
+
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/panoptic/v2/react/hooks/events.d.ts
|
|
432
|
+
/**
|
|
433
|
+
* Watch events via WebSocket. Returns cleanup automatically on unmount.
|
|
434
|
+
*/
|
|
435
|
+
declare function useWatchEvents(poolAddress: Address$1, eventTypes: PanopticEventType[] | undefined, onEvent: (events: PanopticEvent[]) => void, options?: {
|
|
436
|
+
enabled?: boolean;
|
|
437
|
+
collateralTracker0?: Address$1;
|
|
438
|
+
collateralTracker1?: Address$1;
|
|
439
|
+
riskEngineAddress?: Address$1;
|
|
440
|
+
sfpmAddress?: Address$1;
|
|
441
|
+
poolManagerAddress?: Address$1;
|
|
442
|
+
onError?: (error: Error) => void;
|
|
443
|
+
}): void;
|
|
444
|
+
/**
|
|
445
|
+
* Create a resilient event subscription with auto-reconnect.
|
|
446
|
+
*/
|
|
447
|
+
declare function useEventSubscription(poolAddress: Address$1, eventTypes: PanopticEventType[] | undefined, onEvent: (events: PanopticEvent[]) => void, options?: {
|
|
448
|
+
enabled?: boolean;
|
|
449
|
+
collateralTracker0?: Address$1;
|
|
450
|
+
collateralTracker1?: Address$1;
|
|
451
|
+
riskEngineAddress?: Address$1;
|
|
452
|
+
sfpmAddress?: Address$1;
|
|
453
|
+
poolManagerAddress?: Address$1;
|
|
454
|
+
onError?: (error: Error) => void;
|
|
455
|
+
onReconnect?: (attempt: bigint, nextDelayMs: bigint) => void;
|
|
456
|
+
onConnected?: () => void;
|
|
457
|
+
}): void;
|
|
458
|
+
/**
|
|
459
|
+
* Create an HTTP polling event fetcher.
|
|
460
|
+
*/
|
|
461
|
+
declare function useEventPoller(poolAddress: Address$1, eventTypes: PanopticEventType[] | undefined, onEvent: (events: PanopticEvent[]) => void, options?: {
|
|
462
|
+
enabled?: boolean;
|
|
463
|
+
intervalMs?: bigint;
|
|
464
|
+
collateralTracker0?: Address$1;
|
|
465
|
+
collateralTracker1?: Address$1;
|
|
466
|
+
riskEngineAddress?: Address$1;
|
|
467
|
+
sfpmAddress?: Address$1;
|
|
468
|
+
poolManagerAddress?: Address$1;
|
|
469
|
+
onError?: (error: Error) => void;
|
|
470
|
+
}): void;
|
|
471
|
+
/**
|
|
472
|
+
* Confirms a transaction by watching for its corresponding on-chain event.
|
|
473
|
+
*
|
|
474
|
+
* An event log only exists in a confirmed (non-reverted) transaction, so
|
|
475
|
+
* matching on `transactionHash` is sufficient proof of 1-block inclusion.
|
|
476
|
+
* This bypasses the N-block confirmation wait of `useWaitForTransactionReceipt`,
|
|
477
|
+
* making it faster on chains with high confirmation counts (e.g. Base = 150 blocks).
|
|
478
|
+
*
|
|
479
|
+
* Use alongside `useWaitForTransactionReceipt` (confirmations: 1) for revert
|
|
480
|
+
* detection — reverted transactions emit no events.
|
|
481
|
+
*
|
|
482
|
+
* @example
|
|
483
|
+
* ```tsx
|
|
484
|
+
* const confirmation = useTxEventConfirmation({
|
|
485
|
+
* txHash: write.data,
|
|
486
|
+
* poolAddress,
|
|
487
|
+
* eventType: 'OptionMinted',
|
|
488
|
+
* enabled: write.data !== undefined,
|
|
489
|
+
* })
|
|
490
|
+
*
|
|
491
|
+
* useEffect(() => {
|
|
492
|
+
* if (confirmation.isSuccess) onSuccess?.()
|
|
493
|
+
* }, [confirmation.isSuccess])
|
|
494
|
+
* ```
|
|
495
|
+
*/
|
|
496
|
+
declare function useTxEventConfirmation({
|
|
497
|
+
txHash,
|
|
498
|
+
poolAddress,
|
|
499
|
+
collateralTrackerAddress,
|
|
500
|
+
eventType,
|
|
501
|
+
enabled,
|
|
502
|
+
intervalMs
|
|
503
|
+
}: {
|
|
504
|
+
/** Transaction hash to confirm. Polling starts when this is defined. */
|
|
505
|
+
txHash: Hash | undefined;
|
|
506
|
+
/** PanopticPool address to watch for the event. Optional when watching collateral events only. */
|
|
507
|
+
poolAddress?: Address$1;
|
|
508
|
+
/** CollateralTracker address to watch for Deposit/Withdraw events. */
|
|
509
|
+
collateralTrackerAddress?: Address$1;
|
|
510
|
+
/** The event type expected from this transaction. */
|
|
511
|
+
eventType: PanopticEventType;
|
|
512
|
+
/** Set to false to disable polling entirely. Default: true. */
|
|
513
|
+
enabled?: boolean;
|
|
514
|
+
/** Polling interval in ms. Default: 3000 (~1 block on L2s). */
|
|
515
|
+
intervalMs?: bigint;
|
|
516
|
+
}): {
|
|
517
|
+
/** The matched event, set once the tx is confirmed. */
|
|
518
|
+
data: PanopticEvent | undefined;
|
|
519
|
+
/** True while polling and not yet confirmed. */
|
|
520
|
+
isLoading: boolean;
|
|
521
|
+
/** True once the matching event has been observed. */
|
|
522
|
+
isSuccess: boolean;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
//#endregion
|
|
526
|
+
//#region src/panoptic/v2/react/mutationEffects.d.ts
|
|
527
|
+
/**
|
|
528
|
+
* Mutation type identifiers.
|
|
529
|
+
*/
|
|
530
|
+
type MutationType = 'openPosition' | 'closePosition' | 'forceExercise' | 'liquidate' | 'settleAccumulatedPremia' | 'deposit' | 'withdraw' | 'mint' | 'redeem' | 'approve' | 'pokeOracle';
|
|
531
|
+
/**
|
|
532
|
+
* Parameters for determining which queries to invalidate.
|
|
533
|
+
*/
|
|
534
|
+
interface MutationEffectParams {
|
|
535
|
+
chainId: bigint;
|
|
536
|
+
poolAddress: Address$1;
|
|
537
|
+
account: Address$1;
|
|
538
|
+
tokenId?: bigint;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Returns query keys that should be invalidated after a mutation.
|
|
542
|
+
*
|
|
543
|
+
* Use with TanStack Query's `queryClient.invalidateQueries()` or SWR's `mutate()`.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```typescript
|
|
547
|
+
* import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
548
|
+
* import { mutationEffects, openPosition } from 'panoptic-v2-sdk'
|
|
549
|
+
*
|
|
550
|
+
* function useOpenPosition(config: WriteConfig) {
|
|
551
|
+
* const queryClient = useQueryClient()
|
|
552
|
+
*
|
|
553
|
+
* return useMutation({
|
|
554
|
+
* mutationFn: (params) => openPosition(config, params),
|
|
555
|
+
* onSuccess: () => {
|
|
556
|
+
* const keysToInvalidate = mutationEffects.openPosition({
|
|
557
|
+
* chainId: config.chainId,
|
|
558
|
+
* poolAddress: config.poolAddress,
|
|
559
|
+
* account: config.walletClient.account.address,
|
|
560
|
+
* })
|
|
561
|
+
*
|
|
562
|
+
* for (const key of keysToInvalidate) {
|
|
563
|
+
* queryClient.invalidateQueries({ queryKey: key })
|
|
564
|
+
* }
|
|
565
|
+
* },
|
|
566
|
+
* })
|
|
567
|
+
* }
|
|
568
|
+
* ```
|
|
569
|
+
*/
|
|
570
|
+
declare const mutationEffects: {
|
|
571
|
+
/**
|
|
572
|
+
* Queries to invalidate after opening a position.
|
|
573
|
+
*/
|
|
574
|
+
readonly openPosition: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
575
|
+
/**
|
|
576
|
+
* Queries to invalidate after closing a position.
|
|
577
|
+
*/
|
|
578
|
+
readonly closePosition: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
579
|
+
/**
|
|
580
|
+
* Queries to invalidate after force exercising a position.
|
|
581
|
+
*/
|
|
582
|
+
readonly forceExercise: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
583
|
+
/**
|
|
584
|
+
* Queries to invalidate after liquidating an account.
|
|
585
|
+
*/
|
|
586
|
+
readonly liquidate: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
587
|
+
/**
|
|
588
|
+
* Queries to invalidate after settling accumulated premia.
|
|
589
|
+
*/
|
|
590
|
+
readonly settleAccumulatedPremia: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
591
|
+
/**
|
|
592
|
+
* Queries to invalidate after depositing to collateral tracker.
|
|
593
|
+
*/
|
|
594
|
+
readonly deposit: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
595
|
+
/**
|
|
596
|
+
* Queries to invalidate after withdrawing from collateral tracker.
|
|
597
|
+
*/
|
|
598
|
+
readonly withdraw: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
599
|
+
/**
|
|
600
|
+
* Queries to invalidate after minting collateral shares.
|
|
601
|
+
*/
|
|
602
|
+
readonly mint: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
603
|
+
/**
|
|
604
|
+
* Queries to invalidate after redeeming collateral shares.
|
|
605
|
+
*/
|
|
606
|
+
readonly redeem: (params: MutationEffectParams) => readonly (readonly string[])[];
|
|
607
|
+
/**
|
|
608
|
+
* Queries to invalidate after approving token spending.
|
|
609
|
+
*/
|
|
610
|
+
readonly approve: (chainId: bigint, token: Address$1, owner: Address$1, spender: Address$1) => readonly (readonly string[])[];
|
|
611
|
+
/**
|
|
612
|
+
* Queries to invalidate after poking the oracle.
|
|
613
|
+
*/
|
|
614
|
+
readonly pokeOracle: (params: Pick<MutationEffectParams, 'chainId' | 'poolAddress'>) => readonly (readonly string[])[];
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
//#endregion
|
|
618
|
+
//#region src/panoptic/v2/react/provider.d.ts
|
|
619
|
+
/**
|
|
620
|
+
* Panoptic SDK context value.
|
|
621
|
+
*/
|
|
622
|
+
interface PanopticContextValue {
|
|
623
|
+
/** viem PublicClient for reading chain state */
|
|
624
|
+
publicClient: PublicClient;
|
|
625
|
+
/**
|
|
626
|
+
* Optional cache scope for read/simulation query keys.
|
|
627
|
+
* Use this when multiple environments share the same QueryClient.
|
|
628
|
+
*/
|
|
629
|
+
clientScope?: string;
|
|
630
|
+
/** Optional viem WalletClient for write operations */
|
|
631
|
+
walletClient?: WalletClient;
|
|
632
|
+
/** Optional account address for write operations */
|
|
633
|
+
account?: Address$1;
|
|
634
|
+
/** Chain ID */
|
|
635
|
+
chainId: bigint;
|
|
636
|
+
/** Optional StateView address for V4 Uniswap pool reads (per-chain singleton) */
|
|
637
|
+
stateViewAddress?: Address$1;
|
|
638
|
+
/** Optional storage adapter for position tracking */
|
|
639
|
+
storage?: StorageAdapter;
|
|
640
|
+
/**
|
|
641
|
+
* Optional cache scope for storage-backed query keys.
|
|
642
|
+
* Set this when swapping storage adapters at runtime.
|
|
643
|
+
*/
|
|
644
|
+
storageScope?: string;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Props for PanopticProvider.
|
|
648
|
+
*/
|
|
649
|
+
interface PanopticProviderProps extends PanopticContextValue {
|
|
650
|
+
children: ReactNode;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Context provider for Panoptic v2 SDK hooks.
|
|
654
|
+
*
|
|
655
|
+
* Wraps children with shared publicClient, walletClient, account, chainId, and storage.
|
|
656
|
+
* Does NOT include QueryClientProvider — you must provide your own.
|
|
657
|
+
*
|
|
658
|
+
* @example
|
|
659
|
+
* ```tsx
|
|
660
|
+
* <QueryClientProvider client={queryClient}>
|
|
661
|
+
* <PanopticProvider
|
|
662
|
+
* publicClient={publicClient}
|
|
663
|
+
* walletClient={walletClient}
|
|
664
|
+
* account={address}
|
|
665
|
+
* chainId={1n}
|
|
666
|
+
* >
|
|
667
|
+
* <App />
|
|
668
|
+
* </PanopticProvider>
|
|
669
|
+
* </QueryClientProvider>
|
|
670
|
+
* ```
|
|
671
|
+
*/
|
|
672
|
+
declare function PanopticProvider({
|
|
673
|
+
children,
|
|
674
|
+
...value
|
|
675
|
+
}: PanopticProviderProps): react_jsx_runtime22.JSX.Element;
|
|
676
|
+
/**
|
|
677
|
+
* Access the Panoptic SDK context.
|
|
678
|
+
*
|
|
679
|
+
* @throws Error if used outside PanopticProvider
|
|
680
|
+
* @returns PanopticContextValue
|
|
681
|
+
*/
|
|
682
|
+
declare function usePanopticContext(): PanopticContextValue;
|
|
683
|
+
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region src/panoptic/v2/react/queryKeys.d.ts
|
|
686
|
+
/**
|
|
687
|
+
* Internal hook that requires walletClient and account.
|
|
688
|
+
*
|
|
689
|
+
* @throws Error if walletClient or account not provided in context
|
|
690
|
+
* @returns { walletClient, account } guaranteed non-undefined
|
|
691
|
+
*/
|
|
692
|
+
/**
|
|
693
|
+
* Query key factory for TanStack Query / SWR integration.
|
|
694
|
+
* @module v2/react/queryKeys
|
|
695
|
+
*/
|
|
696
|
+
/**
|
|
697
|
+
* Query key factory for Panoptic v2 SDK data.
|
|
698
|
+
*
|
|
699
|
+
* Use with TanStack Query or SWR for cache key consistency.
|
|
700
|
+
* All keys are arrays for proper cache matching and invalidation.
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* ```typescript
|
|
704
|
+
* import { useQuery } from '@tanstack/react-query'
|
|
705
|
+
* import { queryKeys, getPool } from 'panoptic-v2-sdk'
|
|
706
|
+
*
|
|
707
|
+
* function usePool(config: PanopticConfig) {
|
|
708
|
+
* return useQuery({
|
|
709
|
+
* queryKey: queryKeys.pool(config.chainId, config.poolAddress),
|
|
710
|
+
* queryFn: () => getPool(config),
|
|
711
|
+
* })
|
|
712
|
+
* }
|
|
713
|
+
* ```
|
|
714
|
+
*/
|
|
715
|
+
declare const queryKeys: {
|
|
716
|
+
/**
|
|
717
|
+
* Base key for all Panoptic v2 queries.
|
|
718
|
+
*/
|
|
719
|
+
readonly all: readonly ["panoptic-v2"];
|
|
720
|
+
/**
|
|
721
|
+
* Key for pool data.
|
|
722
|
+
*/
|
|
723
|
+
readonly pool: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "pool", string, Address];
|
|
724
|
+
/**
|
|
725
|
+
* Key for pool utilization.
|
|
726
|
+
*/
|
|
727
|
+
readonly utilization: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "utilization", string, Address];
|
|
728
|
+
/**
|
|
729
|
+
* Key for oracle state.
|
|
730
|
+
*/
|
|
731
|
+
readonly oracle: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "oracle", string, Address];
|
|
732
|
+
/**
|
|
733
|
+
* Key for safe mode state.
|
|
734
|
+
*/
|
|
735
|
+
readonly safeMode: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "safeMode", string, Address];
|
|
736
|
+
/**
|
|
737
|
+
* Key for Guardian pool-unlock state.
|
|
738
|
+
*/
|
|
739
|
+
readonly guardianUnlock: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "guardianUnlock", string, Address];
|
|
740
|
+
/**
|
|
741
|
+
* Key for risk parameters.
|
|
742
|
+
*/
|
|
743
|
+
readonly riskParameters: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "riskParameters", string, Address];
|
|
744
|
+
/**
|
|
745
|
+
* Key for current rates.
|
|
746
|
+
*/
|
|
747
|
+
readonly rates: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "rates", string, Address];
|
|
748
|
+
/**
|
|
749
|
+
* Key for a single position.
|
|
750
|
+
*/
|
|
751
|
+
readonly position: (chainId: bigint, poolAddress: Address, tokenId: bigint) => readonly ["panoptic-v2", "position", string, Address, string];
|
|
752
|
+
/**
|
|
753
|
+
* Key for all positions of an account.
|
|
754
|
+
*/
|
|
755
|
+
readonly positions: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "positions", string, Address, Address];
|
|
756
|
+
/**
|
|
757
|
+
* Key for tracked position IDs.
|
|
758
|
+
*/
|
|
759
|
+
readonly trackedPositionIds: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "trackedPositionIds", string, Address, Address];
|
|
760
|
+
/**
|
|
761
|
+
* Key for sync status.
|
|
762
|
+
*/
|
|
763
|
+
readonly syncStatus: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "syncStatus", string, Address, Address];
|
|
764
|
+
/**
|
|
765
|
+
* Key for account collateral.
|
|
766
|
+
*/
|
|
767
|
+
readonly accountCollateral: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "accountCollateral", string, Address, Address];
|
|
768
|
+
/**
|
|
769
|
+
* Key for base account summary (aggregate dashboard data).
|
|
770
|
+
*/
|
|
771
|
+
readonly accountSummaryBasic: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "accountSummaryBasic", string, Address, Address];
|
|
772
|
+
/**
|
|
773
|
+
* Key for risk-focused account summary.
|
|
774
|
+
*/
|
|
775
|
+
readonly accountSummaryRisk: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "accountSummaryRisk", string, Address, Address];
|
|
776
|
+
/**
|
|
777
|
+
* Key for liquidation check.
|
|
778
|
+
*/
|
|
779
|
+
readonly isLiquidatable: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "isLiquidatable", string, Address, Address];
|
|
780
|
+
/**
|
|
781
|
+
* Key for liquidation prices.
|
|
782
|
+
*/
|
|
783
|
+
readonly liquidationPrices: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "liquidationPrices", string, Address, Address];
|
|
784
|
+
/**
|
|
785
|
+
* Key for net liquidation value.
|
|
786
|
+
*/
|
|
787
|
+
readonly netLiquidationValue: (chainId: bigint, poolAddress: Address, account: Address, atTick: bigint) => readonly ["panoptic-v2", "netLiquidationValue", string, Address, Address, string];
|
|
788
|
+
/**
|
|
789
|
+
* Key for chunk spreads.
|
|
790
|
+
*/
|
|
791
|
+
readonly chunkSpreads: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "chunkSpreads", string, Address];
|
|
792
|
+
/**
|
|
793
|
+
* Key for closed positions.
|
|
794
|
+
*/
|
|
795
|
+
readonly closedPositions: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "closedPositions", string, Address, Address];
|
|
796
|
+
/**
|
|
797
|
+
* Key for trade history.
|
|
798
|
+
*/
|
|
799
|
+
readonly tradeHistory: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "tradeHistory", string, Address, Address];
|
|
800
|
+
/**
|
|
801
|
+
* Key for realized PnL.
|
|
802
|
+
*/
|
|
803
|
+
readonly realizedPnL: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "realizedPnL", string, Address, Address];
|
|
804
|
+
/**
|
|
805
|
+
* Key for position greeks.
|
|
806
|
+
*/
|
|
807
|
+
readonly positionGreeks: (chainId: bigint, poolAddress: Address, tokenId: bigint) => readonly ["panoptic-v2", "positionGreeks", string, Address, string];
|
|
808
|
+
/**
|
|
809
|
+
* Key for account greeks.
|
|
810
|
+
*/
|
|
811
|
+
readonly accountGreeks: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "accountGreeks", string, Address, Address];
|
|
812
|
+
/**
|
|
813
|
+
* Key for collateral estimate.
|
|
814
|
+
*/
|
|
815
|
+
readonly collateralEstimate: (chainId: bigint, poolAddress: Address, account: Address, tokenId: bigint) => readonly ["panoptic-v2", "collateralEstimate", string, Address, Address, string];
|
|
816
|
+
/**
|
|
817
|
+
* Key for max position size.
|
|
818
|
+
*/
|
|
819
|
+
readonly maxPositionSize: (chainId: bigint, poolAddress: Address, account: Address, tokenId: bigint) => readonly ["panoptic-v2", "maxPositionSize", string, Address, Address, string];
|
|
820
|
+
/**
|
|
821
|
+
* Key for max withdrawable assets from a collateral tracker.
|
|
822
|
+
*/
|
|
823
|
+
readonly maxWithdrawable: (chainId: bigint, collateralTrackerAddress: Address, positionIdList: bigint[], totalAssets: bigint, account: Address) => readonly ["panoptic-v2", string, "maxWithdrawable", Address, string, string, Address];
|
|
824
|
+
/**
|
|
825
|
+
* Key for approval check.
|
|
826
|
+
*/
|
|
827
|
+
readonly approval: (chainId: bigint, token: Address, owner: Address, spender: Address) => readonly ["panoptic-v2", "approval", string, Address, Address, Address];
|
|
828
|
+
/**
|
|
829
|
+
* Key for ERC4626 preview operations.
|
|
830
|
+
*/
|
|
831
|
+
readonly erc4626Preview: (chainId: bigint, tracker: Address, operation: string, amount: bigint) => readonly ["panoptic-v2", "erc4626Preview", string, Address, string, string];
|
|
832
|
+
/**
|
|
833
|
+
* Key for margin buffer.
|
|
834
|
+
*/
|
|
835
|
+
readonly marginBuffer: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "marginBuffer", string, Address, Address];
|
|
836
|
+
/**
|
|
837
|
+
* Key for account premia.
|
|
838
|
+
*/
|
|
839
|
+
readonly accountPremia: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "accountPremia", string, Address, Address];
|
|
840
|
+
/**
|
|
841
|
+
* Key for positions with premia.
|
|
842
|
+
*/
|
|
843
|
+
readonly positionsWithPremia: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "positionsWithPremia", string, Address, Address];
|
|
844
|
+
/**
|
|
845
|
+
* Key for collateral data.
|
|
846
|
+
*/
|
|
847
|
+
readonly collateralData: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "collateralData", string, Address];
|
|
848
|
+
/**
|
|
849
|
+
* Key for pool liquidities.
|
|
850
|
+
*/
|
|
851
|
+
readonly poolLiquidities: (chainId: bigint, poolAddress: Address) => readonly ["panoptic-v2", "poolLiquidities", string, Address];
|
|
852
|
+
/**
|
|
853
|
+
* Key for optimized risk partners.
|
|
854
|
+
*/
|
|
855
|
+
readonly optimizeRiskPartners: (chainId: bigint, poolAddress: Address, tokenId: bigint) => readonly ["panoptic-v2", "optimizeRiskPartners", string, Address, string];
|
|
856
|
+
/**
|
|
857
|
+
* Key for price history.
|
|
858
|
+
* Uses a hash of timestamps for cache busting when the time range changes.
|
|
859
|
+
*/
|
|
860
|
+
readonly priceHistory: (chainId: bigint, poolAddress: string, timestampsHash: string) => readonly ["panoptic-v2", "priceHistory", string, string, string];
|
|
861
|
+
/**
|
|
862
|
+
* Key for streamia history.
|
|
863
|
+
*/
|
|
864
|
+
readonly streamiaHistory: (chainId: bigint, poolAddress: string, rangeHash: string) => readonly ["panoptic-v2", "streamiaHistory", string, string, string];
|
|
865
|
+
/**
|
|
866
|
+
* Key for Uniswap fee history.
|
|
867
|
+
*/
|
|
868
|
+
readonly uniswapFeeHistory: (chainId: bigint, poolAddress: string, rangeHash: string) => readonly ["panoptic-v2", "uniswapFeeHistory", string, string, string];
|
|
869
|
+
/**
|
|
870
|
+
* Key for required credit for ITM position.
|
|
871
|
+
*/
|
|
872
|
+
readonly requiredCreditForITM: (chainId: bigint, poolAddress: Address, account: Address, tokenId: bigint) => readonly ["panoptic-v2", "requiredCreditForITM", string, Address, Address, string];
|
|
873
|
+
/**
|
|
874
|
+
* Key for flow-neutral tokenId (ITM-neutralizing legs). Account-independent —
|
|
875
|
+
* itmAmounts is a pure projection of the tokenId + size.
|
|
876
|
+
*/
|
|
877
|
+
readonly flowNeutralTokenId: (chainId: bigint, poolAddress: Address, tokenId: bigint) => readonly ["panoptic-v2", "flowNeutralTokenId", string, Address, string];
|
|
878
|
+
/**
|
|
879
|
+
* Key for interest state (per-user borrows).
|
|
880
|
+
*/
|
|
881
|
+
readonly interestState: (chainId: bigint, poolAddress: Address, account: Address) => readonly ["panoptic-v2", "interestState", string, Address, Address];
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
//#endregion
|
|
885
|
+
export { AccountBuyingPower, AccountCollateral, AccountGreeksCurveResult, AccountGreeksResult, AccountInsolventError, AccountLiquidatedEvent, AccountPremia, AccountSummaryBasic, AccountSummaryRisk, AddPendingPositionParams, AddTrackedChunksParams, AlreadyInitializedError, ApprovalStatus, ApproveParams, ApprovePoolParams, BORROW_INDEX_BITS, BPS_DENOMINATOR, BPS_SCALE, BaseEvent, BatchDiagnostic, BatchDiagnosticCode, BatchDispatchArgs, BatchOp, BatchOpBurn, BatchOpKind, BatchOpMint, BatchValidationError, BelowMinimumRedemptionError, BlockMeta, BorrowParams, BuildBatchDispatchArgsParams, BuildBatchDispatchArgsResult, CalculateAccountGreeksPureParams, CancelParams, CastingError, ChainDeployment, CheckApprovalParams, CheckCollateralAcrossTicksParams, ChunkData, ChunkHasZeroLiquidityError, ChunkInput, ChunkKey, ChunkLimitError, ChunkLiquidityResult, ChunkMetadata, ChunkSpread, ChunkStats, ClosePositionParams, ClosePositionSimulation, ClosedPosition, CollateralAcrossTicks, CollateralDataPoint, CollateralEstimate, CollateralSharePriceData, CollateralTracker, ConfirmPendingPositionParams, CreateEventPollerParams, CreateEventSubscriptionParams, CreateFlowNeutralTokenIdParams, CrossPoolError, CurrentRates, DEFAULT_MAX_SPREAD, DEFAULT_RECONNECT_CONFIG, DEFAULT_VEGOID, DataWithMeta, DecodedLeg, DecodedTokenId, DeltaHedgeResult, DeployNewPoolParams, DepositEvent, DepositParams, DepositSimulation, DepositTooLargeError, DetectReorgParams, DispatchCall, DispatchCalldata, DispatchParams, DispatchSimulation, DuplicateTokenIdError, ERC4626PreviewParams, ERC4626PreviewResult, EffectiveLiquidityAboveThresholdError, EncodeLegParams, EnforcedTickLimits, EstimateBlockNumbersParams, EstimateCollateralRequiredParams, EventPoller, EventReconstructionParams, EventReconstructionResult, EventSubscription, EventSubscriptionHandle, ExceedsMaximumRedemptionError, ExecuteBatchDispatchParams, FailPendingPositionParams, FetchPoolIdParams, FetchPoolIdResult, FlowNeutralTokenId, ForceExerciseParams, ForceExerciseSimulation, ForcedExercisedEvent, GetAccountBuyingPowerParams, GetAccountCollateralParams, GetAccountGreeksParams, GetAccountPremiaParams, GetAccountSummaryBasicParams, GetAccountSummaryRiskParams, GetBlockMetaParams, GetChunkLiquiditiesParams, GetChunkLiquiditiesResult, GetChunkSpreadsParams, GetCollateralDataParams, GetCurrentRatesParams, GetDeltaHedgeParamsInput, GetEnforcedTickLimitsParams, GetFactoryConstructMetadataParams, GetFactoryOwnerOfParams, GetFactoryTokenURIParams, GetGuardianUnlockStateParams, GetInterestStateParams, GetItmAmountsParams, GetLiquidationPricesParams, GetMarginBufferParams, GetMaxPositionSizeParams, GetMaxWithdrawableParams, GetNativeTokenPriceParams, GetNetLiquidationValueParams, GetNetLiquidationValuesParams, GetOpenPositionIdsParams, GetOpenPositionPreviewParams, GetOracleStateParams, GetPanopticPoolAddressParams, GetPanopticPoolFromPoolIdParams, GetPendingPositionsParams, GetPoolLiquiditiesParams, GetPoolMetadataParams, GetPoolParams, GetPortfolioValueParams, GetPositionChunkDataParams, GetPositionChunkDataResult, GetPositionEnrichmentDataParams, GetPositionEnrichmentDataResult, GetPositionGreeksParams, GetPositionParams, GetPositionsParams, GetPositionsWithPremiaParams, GetPriceHistoryParams, GetRealizedPnLParams, GetRequiredCreditForITMParams, GetRiskParametersParams, GetSafeModeParams, GetStreamiaHistoryParams, GetSyncStatusParams, GetTrackedChunksParams, GetTrackedPositionIdsParams, GetTradeHistoryParams, GetUniswapFeeHistoryParams, GetUniswapV3PoolFromIdParams, GetUniswapV3PoolInfoParams, GetUniswapV3PoolLiquiditiesParams, GetUniswapV4PoolBasicStateParams, GetUniswapV4PoolInfoParams, GetUniswapV4PoolKeyFromIdParams, GetUniswapV4PoolLiquiditiesParams, GetUtilizationParams, GuardianUnlockState, InputListFailError, InsufficientCreditLiquidityError, InterestState, InvalidBuilderCodeError, InvalidHistoryRangeError, InvalidTickBoundError, InvalidTickError, InvalidTokenIdParameterError, InvalidUniswapCallbackError, IrmCurrent, IrmMarketStateInputs, IrmPoint, IsLiquidatableParams, ItmAmounts, LEG_BITS, LEG_LIMITS, LEG_MASKS, LegChunkData, LegConfig, LegGreeksParams, LegUpdate, LengthMismatchError, LiquidateParams, LiquidateSimulation, LiquidationCheck, LiquidationPrices, LiquidityChunkKey, LiquidityChunkSpread, LiquidityTooHighError, LoanSlotExhaustedError, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MAX_TICK, MAX_TRACKED_CHUNKS, MIN_TICK, MarginBuffer, MaxPositionSize, MaxRetriesExceededError, MinePoolAddressParams, MinePoolAddressResult, MintParams, MissingPositionIdsError, MulticallContract, MulticallReadParams, MutationEffectParams, MutationType, NetLiquidationValue, NetLiquidationValues, NetLiquidityZeroError, NetworkMismatchError, NeutralLeg, NoLegsExercisableError, NonceManager, NotALongLegError, NotBuilderError, NotEnoughLiquidityInChunkError, NotEnoughTokensError, NotGuardianError, NotMarginCalledError, NotPanopticPoolError, ORACLE_EPOCH_SECONDS, OpenPositionParams, OpenPositionPreview, OpenPositionSimulation, OptimizeTokenIdRiskPartnersParams, OptionBurntEvent, OptionMintedEvent, OracleRateLimitedError, OracleState, PanopticContextValue, PanopticError, PanopticEvent, PanopticEventType, PanopticHelperNotDeployedError, PanopticNFTMetadata, PanopticProvider, PanopticProviderProps, PanopticValidationError, ParsedError, PendingPosition, PokeOracleParams, Pool, PoolFormatterConfig, PoolFormatters, PoolHealthStatus, PoolKey, PoolLiquidities, PoolMetadata, PoolNotInitializedError, PoolVersionConfig, PortfolioValue, Position, PositionChunkData, PositionCountNotZeroError, PositionEnrichmentResult, PositionGreeks, PositionGreeksInput, PositionGreeksResult, PositionInput, PositionNotOwnedError, PositionSnapshotNotFoundError, PositionStorageParams, PositionTooLargeError, PositionWithPremia, PositionsWithPremiaResult, PremiumSettledEvent, PreviewBorrowParams, PreviewBorrowResult, PreviewWrapParams, PriceBoundFailError, PriceHistoryResult, PriceHistoryTimeRange, PriceImpactTooLargeError, PriceSnapshot, ProviderLagError, QueryOptions, RATE_AT_TARGET_BITS, REORG_DEPTH, REQUIRED_BASE_ERROR_SENTINEL, RealizedPnL, ReconnectConfig, RecoverSnapshotFromTxParams, RecoverSnapshotParams, RedeemParams, ReentrancyError, RemoveTrackedChunksParams, ReorgDetection, RepayParams, RequiredCreditForITM, ResolveBlockNumbersParams, ResolvePanopticPoolFromPoolIdParams, ResolvePanopticPoolFromPoolIdResult, ResolveUniswapV4PoolKeyParams, RiskEngine, RiskParameters, RollPositionParams, RpcError, RpcResponseError, SCHEMA_VERSION, SECONDS_PER_YEAR, SFPMSimulationResult, STANDARD_TICK_WIDTHS, STORAGE_PREFIX, SafeMode, SafeModeError, SafeModeState, SaveCheckpointParams, SaveClosedPositionParams, ScanChunksParams, ScanChunksResult, ScannedChunk, SettleParams, SettleSimulation, SettledEvent, SimulateBatchDispatchParams, SimulateBatchDispatchResult, SimulateClosePositionParams, SimulateDeployNewPoolParams, SimulateDepositParams, SimulateDispatchParams, SimulateForceExerciseParams, SimulateLiquidateParams, SimulateOpenPositionParams, SimulateSFPMParams, SimulateSettleParams, SimulateSwapExactInParams, SimulateSwapExactOutParams, SimulateWithdrawParams, SimulationResult, SmartRepayParams, SnapshotRecoveryResult, SpeedUpParams, StaleDataError, StaleOracleError, StorageAdapter, StreamiaHistoryResult, StreamiaLeg, StreamiaSnapshot, SupplyParams, SwapExactInParams, SwapExactOutParams, SwapSimulation, SwapTokenMismatchError, SyncCheckpoint, SyncEvent, SyncOptions, SyncPositionsParams, SyncPositionsResult, SyncProgressEvent, SyncResult, SyncState, SyncStatus, SyncStatusResult, SyncTimeoutError, TOKEN_ID_BITS, TickAndSpreadLimits, TickLimitsResult, Timescale, TokenCollateral, TokenFlow, TokenIdBuilder, TokenIdHasZeroLegsError, TokenIdLeg, TokenInterestState, TooManyLegsOpenError, TransferFailedError, TxBroadcaster, TxOverrides, TxReceipt, TxResult, TxResultWithReceipt, UNREALIZED_INTEREST_BITS, UTILIZATION_DENOMINATOR, UnauthorizedUniswapCallbackError, UnderOverFlowError, UnhealthyPoolError, UniswapFeeHistoryResult, UniswapFeeSnapshot, UniswapV3Liquidities, UniswapV3PoolInfo, UniswapV3PoolToken, UniswapV4PoolBasicState, UniswapV4PoolInfo, UniswapV4PoolKey, UnsupplyParams, UnwrapWethParams, UnwrapXstockParams, Utilization, V3PoolConfig, V4PoolConfig, ValidateBatchParams, WAD, WatchEventsParams, WithdrawEvent, WithdrawParams, WithdrawSimulation, WithdrawWithPositionsParams, WrapEthParams, WrapXstockParams, WriteConfig, WrongPoolIdError, WrongUniswapPoolError, ZERO_COLLATERAL, ZERO_VALUATION, ZeroAddressError, ZeroCollateralRequirementError, addLegToTokenId, addPendingPosition, addTrackedChunks, annualizePerSecondRateWad, approve, approveAndWait, approvePool, assertCanBurn, assertCanForceExercise, assertCanLiquidate, assertCanMint, assertFresh, assertHealthy, assertTradeable, borrow, borrowAndWait, buildBatchDispatchArgs, buildOpenPositionCalldata, buildUniqueLoan, calculateAccountGreeksPure, calculatePortfolioDelta, calculatePortfolioGamma, calculatePortfolioGreeks, calculatePortfolioValue, calculatePositionDelta, calculatePositionDeltaDebtOnly, calculatePositionDeltaWithSwap, calculatePositionGamma, calculatePositionGreeks, calculatePositionValue, calculateResyncBlock, calculateSpreadWad, cancelTransaction, checkApproval, checkCollateralAcrossTicks, cleanupStalePendingPositions, clearCheckpoint, clearPendingPositions, clearTrackedChunks, clearTrackedPositions, clearTradeHistory, closePosition, closePositionAndWait, collateralTrackerV2Abi, computeV4PoolId, confirmPendingPosition, convertToAssets, convertToShares, countLegs, createEventPoller, createEventSubscription, createFileStorage, createFlowNeutralTokenId, createMemoryStorage, createNonceManager, createPoolFormatters, createTokenIdBuilder, decodeAllDispatchCalldata, decodeAllLegs, decodeDispatchCalldata, decodeLeftRightSigned, decodeLeftRightUnsigned, decodeLeg, decodePanopticTokenURI, decodePoolId, decodeTickSpacing, decodeTokenId, decodeVegoid, deployNewPool, deployNewPoolAndWait, deposit, depositAndWait, deriveSupplyRatePerSecWad, detectReorg, dispatch, dispatchAndWait, encodeLeg, encodePoolId, encodePoolKeyBytes, encodeV3PoolKeyBytes, encodeV4PoolId, estimateBlockNumbers, estimateCollateralRequired, executeBatchDispatch, executeBatchDispatchAndWait, failPendingPosition, fetchPoolId, 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, getAccountBuyingPower, getAccountCollateral, getAccountGreeks, getAccountHistory, getAccountPremia, getAccountSummaryBasic, getAccountSummaryRisk, getAssetIndex, getBlockMeta, getChainDeployment, getChunkLiquidities, getChunkSpreads, getClosedPositions, getClosedPositionsKey, getCollateralAddresses, getCollateralData, getCollateralSharePrices, getCollateralTotalAssetsBatch, getCurrentRates, getDeltaHedgeParams, getEnforcedTickLimits, getFactoryConstructMetadata, getFactoryOwnerOf, getFactoryTokenURI, getGuardianUnlockState, getInterestState, getIrmCurrent, getIrmCurve, getItmAmounts, getLegDelta, getLegDeltaInVaultFrame, getLegGamma, getLegNetValueWidth0, getLegValue, getLiquidationPrices, getMarginBuffer, getMaxPositionSize, getMaxWithdrawable, getNativeTokenPrice, getNetLiquidationValue, getNetLiquidationValues, getOpenPositionIds, getOpenPositionPreview, getOracleState, getPanopticPoolAddress, getPanopticPoolFromPoolId, getPendingPositions, getPendingPositionsKey, getPool, getPoolDeploymentBlock, getPoolDisplayId, getPoolLiquidities, getPoolMetaKey, getPoolMetadata, getPoolPrefix, getPortfolioValue, getPosition, getPositionChunkData, getPositionEnrichmentData, getPositionGreeks, getPositionMetaKey, getPositions, getPositionsKey, getPositionsWithPremia, getPriceHistory, getPricesAtTick, getRealizedPnL, getRequiredCreditForITM, getRiskParameters, getSafeMode, getSchemaVersionKey, getStreamiaHistory, getSyncCheckpointKey, getSyncStatus, getTickSpacing, getTokenListId, getTrackedChunks, getTrackedChunksKey, getTrackedPositionIds, getTradeHistory, getUniswapFeeHistory, getUniswapV3PoolFromId, getUniswapV3PoolInfo, getUniswapV3PoolLiquidities, getUniswapV4PoolBasicState, getUniswapV4PoolInfo, getUniswapV4PoolKeyFromId, getUniswapV4PoolLiquidities, getUtilization, hasLoanOrCredit, hasLongLeg, interpolateBlocks, isCall, isCowSupportedChain, isCredit, isCreditLeg, isDefinedRisk, isGasError, isInputListFailError, isLiquidatable, isLoan, isLoanLeg, isNonceError, isPanopticErrorType, isPositionTracked, isRetryableRpcError, isShortOnly, isSpread, isSupportedChain, jsonSerializer, liquidate, liquidateAndWait, loadCheckpoint, minePoolAddress, mint, mintAndWait, multicallRead, mutationEffects, openPosition, openPositionAndWait, optimizeTokenIdRiskPartners, packMarketState, panopticPoolV2Abi, parseBps, parseCollateralLog, parsePanopticError, parsePoolLog, parseTokenAmount, parseTokenListId, parseWad, pokeOracle, pokeOracleAndWait, previewBorrow, previewDeposit, previewMint, previewRedeem, previewUnwrap, previewWithdraw, previewWrap, priceToTick, publicBroadcaster, queryKeys, ratePerSecWadToAprPct, reconstructFromEvents, recoverSnapshot, recoverSnapshotFromTx, redeem, redeemAndWait, removeTrackedChunks, repay, repayAndWait, requireChainDeployment, resolveBlockNumbers, resolvePanopticPoolFromPoolId, resolveTokenIndex, resolveUniswapV4PoolKey, rollPosition, rollPositionAndWait, roundToTickSpacing, saveCheckpoint, saveClosedPosition, scanChunks, selectDispatchForAccount, settleAccumulatedPremia, settleAccumulatedPremiaAndWait, simulateBatchDispatch, simulateClosePosition, simulateDeployNewPool, simulateDeposit, simulateDispatch, simulateForceExercise, simulateLiquidate, simulateOpenPosition, simulateSFPMBurn, simulateSFPMMint, simulateSettle, simulateSwapExactIn, simulateSwapExactOut, simulateWithdraw, smartRepay, smartRepayAndWait, speedUpTransaction, sqrtPriceX96ToPriceDecimalScaled, sqrtPriceX96ToTick, supply, supplyAndWait, swapExactIn, swapExactInAndWait, swapExactOut, swapExactOutAndWait, syncPositions, tickLimits, tickToPrice, tickToPriceDecimalScaled, tickToSqrtPriceX96, toVaultFrameAtTick, truncateAddress, unsupply, unsupplyAndWait, unwrapWeth, unwrapWethAndWait, unwrapXstock, unwrapXstockAndWait, useAccountCollateral, useAccountGreeks, useAccountPremia, useAccountSummaryBasic, useAccountSummaryRisk, useAddPendingPosition, useApprove, useApproveErc20ForCow, useApproveErc20ForPermit2, useApprovePool, useApproveRouterViaPermit2, useBatchDispatch as useBatchDispatchHook, useBorrow as useBorrowHook, useCancelCowOrder, useCheckCowApproval, useCheckRouterApproval, useChunkSpreads, useClearTrackedPositions, useClosePosition as useClosePositionHook, useClosedPositions, useCollateralData, useConfirmPendingPosition, useCowOrderStatus, useCurrentRates, useDeployNewPool as useDeployNewPoolHook, useDeposit as useDepositHook, useDispatch as useDispatchHook, useEstimateCollateralRequired, useEventPoller, useEventSubscription, useFactoryConstructMetadata, useFactoryOwnerOf, useFactoryTokenURI, useFailPendingPosition, useFlowNeutralTokenId, useForceExercise as useForceExerciseHook, useGuardianUnlockState, useInterestState, useIsLiquidatable, useLiquidate as useLiquidateHook, useLiquidationPrices, useMarginBuffer, useMaxPositionSize, useMaxWithdrawable, useMinePoolAddress as useMinePoolAddressHook, useMintShares, useNativeTokenPrice, useNetLiquidationValue, useNetLiquidationValues, useOpenPosition as useOpenPositionHook, useOpenPositionPreview, useOptimizeRiskPartners, useOracleState, usePanopticContext, usePanopticPoolAddress, usePokeOracle as usePokeOracleHook, usePool, usePoolLiquidities, usePosition, usePositionGreeks, usePositions, usePositionsWithPremia, usePreviewBorrow, usePreviewDeposit, usePreviewMint, usePreviewRedeem, usePreviewWithdraw, usePriceHistory, useQuoteCowSwap, useQuoteSwapExactInViaRouter, useQuoteSwapExactOutViaRouter, useRealizedPnL, useRedeem as useRedeemHook, useRepay as useRepayHook, useResolveUniswapV4PoolKey, useRiskParameters, useRollPosition as useRollPositionHook, useSafeMode, useSettleAccumulatedPremia as useSettleAccumulatedPremiaHook, useSimulateBatchDispatch, useSimulateClosePosition, useSimulateDeployNewPool, useSimulateDeposit, useSimulateDispatch, useSimulateForceExercise, useSimulateLiquidate, useSimulateOpenPosition, useSimulateSFPMBurn, useSimulateSFPMMint, useSimulateSettle, useSimulateSwapExactIn, useSimulateSwapExactOut, useSimulateWithdraw, useSmartRepay as useSmartRepayHook, useStreamiaHistory, useSubmitCowOrder, useSupply as useSupplyHook, useSwapExactIn, useSwapExactInViaRouter, useSwapExactOut, useSwapExactOutViaRouter, useSyncPositions, useSyncStatus, useTrackedPositionIds, useTradeHistory, useTxEventConfirmation, useUniswapFeeHistory, useUniswapV3PoolInfo, useUniswapV3PoolLiquidities, useUniswapV4PoolBasicState, useUniswapV4PoolInfo, useUniswapV4PoolLiquidities, useUnsupply as useUnsupplyHook, useUnwrapWeth, useUnwrapXstock, useUtilization, useValidateBuilderCode, useWatchEvents, useWithdraw as useWithdrawHook, useWithdrawWithPositions as useWithdrawWithPositionsHook, useWrapEth, useWrapXstock, utilizationBpsToWad, utilizationPctToWad, validateBatch, validateBuilderCode, validatePoolId, verifyBlockContinuity, watchEvents, wethWrapAbi, withdraw, withdrawAndWait, withdrawWithPositions, withdrawWithPositionsAndWait, wrapEth, wrapEthAndWait, wrapXstock, wrapXstockAndWait, xstockWrapperAbi };
|
|
886
|
+
//# sourceMappingURL=react-public.d.ts.map
|