@metamask-previews/perps-controller 16.1.0-preview-abca9bcea → 17.0.0-preview-0a30e47
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/CHANGELOG.md +35 -1
- package/README.md +17 -0
- package/dist/PerpsController-method-action-types.d.ts +1235 -0
- package/dist/PerpsController-method-action-types.d.ts.map +1 -0
- package/dist/PerpsController-method-action-types.js +6 -0
- package/dist/PerpsController-method-action-types.js.map +1 -0
- package/dist/PerpsController.d.ts +1313 -0
- package/dist/PerpsController.d.ts.map +1 -0
- package/dist/PerpsController.js +5331 -0
- package/dist/PerpsController.js.map +1 -0
- package/dist/aggregation/SubscriptionMultiplexer.d.ts +171 -0
- package/dist/aggregation/SubscriptionMultiplexer.d.ts.map +1 -0
- package/dist/aggregation/SubscriptionMultiplexer.js +451 -0
- package/dist/aggregation/SubscriptionMultiplexer.js.map +1 -0
- package/dist/aggregation/index.d.ts +6 -0
- package/dist/aggregation/index.d.ts.map +1 -0
- package/dist/aggregation/index.js +5 -0
- package/dist/aggregation/index.js.map +1 -0
- package/dist/constants/chartConfig.d.ts +228 -0
- package/dist/constants/chartConfig.d.ts.map +1 -0
- package/dist/constants/chartConfig.js +233 -0
- package/dist/constants/chartConfig.js.map +1 -0
- package/dist/constants/eventNames.d.ts +565 -0
- package/dist/constants/eventNames.d.ts.map +1 -0
- package/dist/constants/eventNames.js +657 -0
- package/dist/constants/eventNames.js.map +1 -0
- package/dist/constants/hyperLiquidConfig.d.ts +280 -0
- package/dist/constants/hyperLiquidConfig.d.ts.map +1 -0
- package/dist/constants/hyperLiquidConfig.js +596 -0
- package/dist/constants/hyperLiquidConfig.js.map +1 -0
- package/dist/constants/index.d.ts +12 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +12 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/lighterConfig.d.ts +204 -0
- package/dist/constants/lighterConfig.d.ts.map +1 -0
- package/dist/constants/lighterConfig.js +317 -0
- package/dist/constants/lighterConfig.js.map +1 -0
- package/dist/constants/orderTypes.d.ts +19 -0
- package/dist/constants/orderTypes.d.ts.map +1 -0
- package/dist/constants/orderTypes.js +27 -0
- package/dist/constants/orderTypes.js.map +1 -0
- package/dist/constants/performanceMetrics.d.ts +46 -0
- package/dist/constants/performanceMetrics.d.ts.map +1 -0
- package/dist/constants/performanceMetrics.js +60 -0
- package/dist/constants/performanceMetrics.js.map +1 -0
- package/dist/constants/perpsConfig.d.ts +480 -0
- package/dist/constants/perpsConfig.d.ts.map +1 -0
- package/dist/constants/perpsConfig.js +555 -0
- package/dist/constants/perpsConfig.js.map +1 -0
- package/dist/constants/transactionsHistoryConfig.d.ts +35 -0
- package/dist/constants/transactionsHistoryConfig.d.ts.map +1 -0
- package/dist/constants/transactionsHistoryConfig.js +35 -0
- package/dist/constants/transactionsHistoryConfig.js.map +1 -0
- package/dist/index.d.ts +95 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/perpsErrorCodes.d.ts +113 -0
- package/dist/perpsErrorCodes.d.ts.map +1 -0
- package/dist/perpsErrorCodes.js +133 -0
- package/dist/perpsErrorCodes.js.map +1 -0
- package/dist/providers/AggregatedPerpsProvider.d.ts +277 -0
- package/dist/providers/AggregatedPerpsProvider.d.ts.map +1 -0
- package/dist/providers/AggregatedPerpsProvider.js +827 -0
- package/dist/providers/AggregatedPerpsProvider.js.map +1 -0
- package/dist/providers/HyperLiquidProvider.d.ts +656 -0
- package/dist/providers/HyperLiquidProvider.d.ts.map +1 -0
- package/dist/providers/HyperLiquidProvider.js +11308 -0
- package/dist/providers/HyperLiquidProvider.js.map +1 -0
- package/dist/providers/LighterProvider.d.ts +179 -0
- package/dist/providers/LighterProvider.d.ts.map +1 -0
- package/dist/providers/LighterProvider.js +6599 -0
- package/dist/providers/LighterProvider.js.map +1 -0
- package/dist/routing/ProviderRouter.d.ts +112 -0
- package/dist/routing/ProviderRouter.d.ts.map +1 -0
- package/dist/routing/ProviderRouter.js +137 -0
- package/dist/routing/ProviderRouter.js.map +1 -0
- package/dist/routing/index.d.ts +6 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +5 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/selectors.d.ts +336 -0
- package/dist/selectors.d.ts.map +1 -0
- package/dist/selectors.js +249 -0
- package/dist/selectors.js.map +1 -0
- package/dist/services/AccountService.d.ts +56 -0
- package/dist/services/AccountService.d.ts.map +1 -0
- package/dist/services/AccountService.js +307 -0
- package/dist/services/AccountService.js.map +1 -0
- package/dist/services/AggregatedOrderBookConnection.d.ts +106 -0
- package/dist/services/AggregatedOrderBookConnection.d.ts.map +1 -0
- package/dist/services/AggregatedOrderBookConnection.js +388 -0
- package/dist/services/AggregatedOrderBookConnection.js.map +1 -0
- package/dist/services/DataLakeService.d.ts +51 -0
- package/dist/services/DataLakeService.d.ts.map +1 -0
- package/dist/services/DataLakeService.js +215 -0
- package/dist/services/DataLakeService.js.map +1 -0
- package/dist/services/DepositService.d.ts +39 -0
- package/dist/services/DepositService.d.ts.map +1 -0
- package/dist/services/DepositService.js +88 -0
- package/dist/services/DepositService.js.map +1 -0
- package/dist/services/DexDiscoveryCacheManager.d.ts +52 -0
- package/dist/services/DexDiscoveryCacheManager.d.ts.map +1 -0
- package/dist/services/DexDiscoveryCacheManager.js +130 -0
- package/dist/services/DexDiscoveryCacheManager.js.map +1 -0
- package/dist/services/EligibilityService.d.ts +28 -0
- package/dist/services/EligibilityService.d.ts.map +1 -0
- package/dist/services/EligibilityService.js +61 -0
- package/dist/services/EligibilityService.js.map +1 -0
- package/dist/services/FeatureFlagConfigurationService.d.ts +73 -0
- package/dist/services/FeatureFlagConfigurationService.d.ts.map +1 -0
- package/dist/services/FeatureFlagConfigurationService.js +266 -0
- package/dist/services/FeatureFlagConfigurationService.js.map +1 -0
- package/dist/services/HyperLiquidClientService.d.ts +252 -0
- package/dist/services/HyperLiquidClientService.d.ts.map +1 -0
- package/dist/services/HyperLiquidClientService.js +1152 -0
- package/dist/services/HyperLiquidClientService.js.map +1 -0
- package/dist/services/HyperLiquidSubscriptionService.d.ts +265 -0
- package/dist/services/HyperLiquidSubscriptionService.d.ts.map +1 -0
- package/dist/services/HyperLiquidSubscriptionService.js +3874 -0
- package/dist/services/HyperLiquidSubscriptionService.js.map +1 -0
- package/dist/services/HyperLiquidWalletService.d.ts +84 -0
- package/dist/services/HyperLiquidWalletService.d.ts.map +1 -0
- package/dist/services/HyperLiquidWalletService.js +168 -0
- package/dist/services/HyperLiquidWalletService.js.map +1 -0
- package/dist/services/LighterClientService.d.ts +200 -0
- package/dist/services/LighterClientService.d.ts.map +1 -0
- package/dist/services/LighterClientService.js +634 -0
- package/dist/services/LighterClientService.js.map +1 -0
- package/dist/services/LighterWalletService.d.ts +51 -0
- package/dist/services/LighterWalletService.d.ts.map +1 -0
- package/dist/services/LighterWalletService.js +92 -0
- package/dist/services/LighterWalletService.js.map +1 -0
- package/dist/services/MarketDataService.d.ts +350 -0
- package/dist/services/MarketDataService.d.ts.map +1 -0
- package/dist/services/MarketDataService.js +1165 -0
- package/dist/services/MarketDataService.js.map +1 -0
- package/dist/services/RewardsIntegrationService.d.ts +84 -0
- package/dist/services/RewardsIntegrationService.d.ts.map +1 -0
- package/dist/services/RewardsIntegrationService.js +380 -0
- package/dist/services/RewardsIntegrationService.js.map +1 -0
- package/dist/services/ServiceContext.d.ts +102 -0
- package/dist/services/ServiceContext.d.ts.map +1 -0
- package/dist/services/ServiceContext.js +2 -0
- package/dist/services/ServiceContext.js.map +1 -0
- package/dist/services/TerminalMarketService.d.ts +45 -0
- package/dist/services/TerminalMarketService.d.ts.map +1 -0
- package/dist/services/TerminalMarketService.js +640 -0
- package/dist/services/TerminalMarketService.js.map +1 -0
- package/dist/services/TradingReadinessCache.d.ts +204 -0
- package/dist/services/TradingReadinessCache.d.ts.map +1 -0
- package/dist/services/TradingReadinessCache.js +313 -0
- package/dist/services/TradingReadinessCache.js.map +1 -0
- package/dist/services/TradingService.d.ts +201 -0
- package/dist/services/TradingService.d.ts.map +1 -0
- package/dist/services/TradingService.js +1967 -0
- package/dist/services/TradingService.js.map +1 -0
- package/dist/types/config.d.ts +49 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/hyperliquid-types.d.ts +67 -0
- package/dist/types/hyperliquid-types.d.ts.map +1 -0
- package/dist/types/hyperliquid-types.js +41 -0
- package/dist/types/hyperliquid-types.js.map +1 -0
- package/dist/types/index.d.ts +2192 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +133 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/lighter-types.d.ts +772 -0
- package/dist/types/lighter-types.d.ts.map +1 -0
- package/dist/types/lighter-types.js +10 -0
- package/dist/types/lighter-types.js.map +1 -0
- package/dist/types/messenger.d.ts +30 -0
- package/dist/types/messenger.d.ts.map +1 -0
- package/dist/types/messenger.js +2 -0
- package/dist/types/messenger.js.map +1 -0
- package/dist/types/perps-types.d.ts +184 -0
- package/dist/types/perps-types.d.ts.map +1 -0
- package/dist/types/perps-types.js +2 -0
- package/dist/types/perps-types.js.map +1 -0
- package/dist/types/token.d.ts +25 -0
- package/dist/types/token.d.ts.map +1 -0
- package/dist/types/token.js +2 -0
- package/dist/types/token.js.map +1 -0
- package/dist/types/transactionTypes.d.ts +60 -0
- package/dist/types/transactionTypes.d.ts.map +1 -0
- package/dist/types/transactionTypes.js +24 -0
- package/dist/types/transactionTypes.js.map +1 -0
- package/dist/utils/accountUtils.d.ts +72 -0
- package/dist/utils/accountUtils.d.ts.map +1 -0
- package/dist/utils/accountUtils.js +223 -0
- package/dist/utils/accountUtils.js.map +1 -0
- package/dist/utils/capabilitySymbols.d.ts +15 -0
- package/dist/utils/capabilitySymbols.d.ts.map +1 -0
- package/dist/utils/capabilitySymbols.js +21 -0
- package/dist/utils/capabilitySymbols.js.map +1 -0
- package/dist/utils/coalescePerpsRestRequest.d.ts +32 -0
- package/dist/utils/coalescePerpsRestRequest.d.ts.map +1 -0
- package/dist/utils/coalescePerpsRestRequest.js +66 -0
- package/dist/utils/coalescePerpsRestRequest.js.map +1 -0
- package/dist/utils/errorUtils.d.ts +50 -0
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/errorUtils.js +96 -0
- package/dist/utils/errorUtils.js.map +1 -0
- package/dist/utils/hyperLiquidAbstraction.d.ts +11 -0
- package/dist/utils/hyperLiquidAbstraction.d.ts.map +1 -0
- package/dist/utils/hyperLiquidAbstraction.js +19 -0
- package/dist/utils/hyperLiquidAbstraction.js.map +1 -0
- package/dist/utils/hyperLiquidAdapter.d.ts +77 -0
- package/dist/utils/hyperLiquidAdapter.d.ts.map +1 -0
- package/dist/utils/hyperLiquidAdapter.js +495 -0
- package/dist/utils/hyperLiquidAdapter.js.map +1 -0
- package/dist/utils/hyperLiquidOrderBookProcessor.d.ts +55 -0
- package/dist/utils/hyperLiquidOrderBookProcessor.d.ts.map +1 -0
- package/dist/utils/hyperLiquidOrderBookProcessor.js +78 -0
- package/dist/utils/hyperLiquidOrderBookProcessor.js.map +1 -0
- package/dist/utils/hyperLiquidPositionPreview.d.ts +124 -0
- package/dist/utils/hyperLiquidPositionPreview.d.ts.map +1 -0
- package/dist/utils/hyperLiquidPositionPreview.js +347 -0
- package/dist/utils/hyperLiquidPositionPreview.js.map +1 -0
- package/dist/utils/hyperLiquidValidation.d.ts +192 -0
- package/dist/utils/hyperLiquidValidation.d.ts.map +1 -0
- package/dist/utils/hyperLiquidValidation.js +786 -0
- package/dist/utils/hyperLiquidValidation.js.map +1 -0
- package/dist/utils/idUtils.d.ts +6 -0
- package/dist/utils/idUtils.d.ts.map +1 -0
- package/dist/utils/idUtils.js +10 -0
- package/dist/utils/idUtils.js.map +1 -0
- package/dist/utils/index.d.ts +29 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +34 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/lighterAdapter.d.ts +117 -0
- package/dist/utils/lighterAdapter.d.ts.map +1 -0
- package/dist/utils/lighterAdapter.js +562 -0
- package/dist/utils/lighterAdapter.js.map +1 -0
- package/dist/utils/marketDataTransform.d.ts +71 -0
- package/dist/utils/marketDataTransform.d.ts.map +1 -0
- package/dist/utils/marketDataTransform.js +243 -0
- package/dist/utils/marketDataTransform.js.map +1 -0
- package/dist/utils/marketSearch.d.ts +48 -0
- package/dist/utils/marketSearch.d.ts.map +1 -0
- package/dist/utils/marketSearch.js +106 -0
- package/dist/utils/marketSearch.js.map +1 -0
- package/dist/utils/marketUtils.d.ts +73 -0
- package/dist/utils/marketUtils.d.ts.map +1 -0
- package/dist/utils/marketUtils.js +248 -0
- package/dist/utils/marketUtils.js.map +1 -0
- package/dist/utils/orderCalculations.d.ts +306 -0
- package/dist/utils/orderCalculations.d.ts.map +1 -0
- package/dist/utils/orderCalculations.js +833 -0
- package/dist/utils/orderCalculations.js.map +1 -0
- package/dist/utils/orderTypes.d.ts +166 -0
- package/dist/utils/orderTypes.d.ts.map +1 -0
- package/dist/utils/orderTypes.js +287 -0
- package/dist/utils/orderTypes.js.map +1 -0
- package/dist/utils/perpsConnectionAttemptContext.d.ts +7 -0
- package/dist/utils/perpsConnectionAttemptContext.d.ts.map +1 -0
- package/dist/utils/perpsConnectionAttemptContext.js +15 -0
- package/dist/utils/perpsConnectionAttemptContext.js.map +1 -0
- package/dist/utils/perpsDiskPersistence.d.ts +112 -0
- package/dist/utils/perpsDiskPersistence.d.ts.map +1 -0
- package/dist/utils/perpsDiskPersistence.js +251 -0
- package/dist/utils/perpsDiskPersistence.js.map +1 -0
- package/dist/utils/perpsFormatters.d.ts +204 -0
- package/dist/utils/perpsFormatters.d.ts.map +1 -0
- package/dist/utils/perpsFormatters.js +500 -0
- package/dist/utils/perpsFormatters.js.map +1 -0
- package/dist/utils/rewardsUtils.d.ts +33 -0
- package/dist/utils/rewardsUtils.d.ts.map +1 -0
- package/dist/utils/rewardsUtils.js +92 -0
- package/dist/utils/rewardsUtils.js.map +1 -0
- package/dist/utils/significantFigures.d.ts +25 -0
- package/dist/utils/significantFigures.d.ts.map +1 -0
- package/dist/utils/significantFigures.js +82 -0
- package/dist/utils/significantFigures.js.map +1 -0
- package/dist/utils/sortMarkets.d.ts +25 -0
- package/dist/utils/sortMarkets.d.ts.map +1 -0
- package/dist/utils/sortMarkets.js +88 -0
- package/dist/utils/sortMarkets.js.map +1 -0
- package/dist/utils/standaloneInfoClient.d.ts +37 -0
- package/dist/utils/standaloneInfoClient.d.ts.map +1 -0
- package/dist/utils/standaloneInfoClient.js +64 -0
- package/dist/utils/standaloneInfoClient.js.map +1 -0
- package/dist/utils/stringParseUtils.d.ts +11 -0
- package/dist/utils/stringParseUtils.d.ts.map +1 -0
- package/dist/utils/stringParseUtils.js +28 -0
- package/dist/utils/stringParseUtils.js.map +1 -0
- package/dist/utils/transferData.d.ts +9 -0
- package/dist/utils/transferData.d.ts.map +1 -0
- package/dist/utils/transferData.js +29 -0
- package/dist/utils/transferData.js.map +1 -0
- package/dist/utils/wait.d.ts +2 -0
- package/dist/utils/wait.d.ts.map +1 -0
- package/dist/utils/wait.js +2 -0
- package/dist/utils/wait.js.map +1 -0
- package/package.json +33 -61
- package/dist/PerpsController-method-action-types.cjs +0 -7
- package/dist/PerpsController-method-action-types.cjs.map +0 -1
- package/dist/PerpsController-method-action-types.d.cts +0 -1235
- package/dist/PerpsController-method-action-types.d.cts.map +0 -1
- package/dist/PerpsController-method-action-types.d.mts +0 -1235
- package/dist/PerpsController-method-action-types.d.mts.map +0 -1
- package/dist/PerpsController-method-action-types.mjs +0 -6
- package/dist/PerpsController-method-action-types.mjs.map +0 -1
- package/dist/PerpsController.cjs +0 -5154
- package/dist/PerpsController.cjs.map +0 -1
- package/dist/PerpsController.d.cts +0 -1313
- package/dist/PerpsController.d.cts.map +0 -1
- package/dist/PerpsController.d.mts +0 -1313
- package/dist/PerpsController.d.mts.map +0 -1
- package/dist/PerpsController.mjs +0 -5142
- package/dist/PerpsController.mjs.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.cjs +0 -441
- package/dist/aggregation/SubscriptionMultiplexer.cjs.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.d.cts +0 -171
- package/dist/aggregation/SubscriptionMultiplexer.d.cts.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.d.mts +0 -171
- package/dist/aggregation/SubscriptionMultiplexer.d.mts.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.mjs +0 -437
- package/dist/aggregation/SubscriptionMultiplexer.mjs.map +0 -1
- package/dist/aggregation/index.cjs +0 -9
- package/dist/aggregation/index.cjs.map +0 -1
- package/dist/aggregation/index.d.cts +0 -6
- package/dist/aggregation/index.d.cts.map +0 -1
- package/dist/aggregation/index.d.mts +0 -6
- package/dist/aggregation/index.d.mts.map +0 -1
- package/dist/aggregation/index.mjs +0 -5
- package/dist/aggregation/index.mjs.map +0 -1
- package/dist/constants/chartConfig.cjs +0 -239
- package/dist/constants/chartConfig.cjs.map +0 -1
- package/dist/constants/chartConfig.d.cts +0 -228
- package/dist/constants/chartConfig.d.cts.map +0 -1
- package/dist/constants/chartConfig.d.mts +0 -228
- package/dist/constants/chartConfig.d.mts.map +0 -1
- package/dist/constants/chartConfig.mjs +0 -233
- package/dist/constants/chartConfig.mjs.map +0 -1
- package/dist/constants/eventNames.cjs +0 -660
- package/dist/constants/eventNames.cjs.map +0 -1
- package/dist/constants/eventNames.d.cts +0 -565
- package/dist/constants/eventNames.d.cts.map +0 -1
- package/dist/constants/eventNames.d.mts +0 -565
- package/dist/constants/eventNames.d.mts.map +0 -1
- package/dist/constants/eventNames.mjs +0 -657
- package/dist/constants/eventNames.mjs.map +0 -1
- package/dist/constants/hyperLiquidConfig.cjs +0 -607
- package/dist/constants/hyperLiquidConfig.cjs.map +0 -1
- package/dist/constants/hyperLiquidConfig.d.cts +0 -280
- package/dist/constants/hyperLiquidConfig.d.cts.map +0 -1
- package/dist/constants/hyperLiquidConfig.d.mts +0 -280
- package/dist/constants/hyperLiquidConfig.d.mts.map +0 -1
- package/dist/constants/hyperLiquidConfig.mjs +0 -596
- package/dist/constants/hyperLiquidConfig.mjs.map +0 -1
- package/dist/constants/index.cjs +0 -28
- package/dist/constants/index.cjs.map +0 -1
- package/dist/constants/index.d.cts +0 -12
- package/dist/constants/index.d.cts.map +0 -1
- package/dist/constants/index.d.mts +0 -12
- package/dist/constants/index.d.mts.map +0 -1
- package/dist/constants/index.mjs +0 -12
- package/dist/constants/index.mjs.map +0 -1
- package/dist/constants/lighterConfig.cjs +0 -328
- package/dist/constants/lighterConfig.cjs.map +0 -1
- package/dist/constants/lighterConfig.d.cts +0 -204
- package/dist/constants/lighterConfig.d.cts.map +0 -1
- package/dist/constants/lighterConfig.d.mts +0 -204
- package/dist/constants/lighterConfig.d.mts.map +0 -1
- package/dist/constants/lighterConfig.mjs +0 -317
- package/dist/constants/lighterConfig.mjs.map +0 -1
- package/dist/constants/orderTypes.cjs +0 -31
- package/dist/constants/orderTypes.cjs.map +0 -1
- package/dist/constants/orderTypes.d.cts +0 -19
- package/dist/constants/orderTypes.d.cts.map +0 -1
- package/dist/constants/orderTypes.d.mts +0 -19
- package/dist/constants/orderTypes.d.mts.map +0 -1
- package/dist/constants/orderTypes.mjs +0 -27
- package/dist/constants/orderTypes.mjs.map +0 -1
- package/dist/constants/performanceMetrics.cjs +0 -63
- package/dist/constants/performanceMetrics.cjs.map +0 -1
- package/dist/constants/performanceMetrics.d.cts +0 -46
- package/dist/constants/performanceMetrics.d.cts.map +0 -1
- package/dist/constants/performanceMetrics.d.mts +0 -46
- package/dist/constants/performanceMetrics.d.mts.map +0 -1
- package/dist/constants/performanceMetrics.mjs +0 -60
- package/dist/constants/performanceMetrics.mjs.map +0 -1
- package/dist/constants/perpsConfig.cjs +0 -560
- package/dist/constants/perpsConfig.cjs.map +0 -1
- package/dist/constants/perpsConfig.d.cts +0 -480
- package/dist/constants/perpsConfig.d.cts.map +0 -1
- package/dist/constants/perpsConfig.d.mts +0 -480
- package/dist/constants/perpsConfig.d.mts.map +0 -1
- package/dist/constants/perpsConfig.mjs +0 -555
- package/dist/constants/perpsConfig.mjs.map +0 -1
- package/dist/constants/transactionsHistoryConfig.cjs +0 -38
- package/dist/constants/transactionsHistoryConfig.cjs.map +0 -1
- package/dist/constants/transactionsHistoryConfig.d.cts +0 -35
- package/dist/constants/transactionsHistoryConfig.d.cts.map +0 -1
- package/dist/constants/transactionsHistoryConfig.d.mts +0 -35
- package/dist/constants/transactionsHistoryConfig.d.mts.map +0 -1
- package/dist/constants/transactionsHistoryConfig.mjs +0 -35
- package/dist/constants/transactionsHistoryConfig.mjs.map +0 -1
- package/dist/index.cjs +0 -334
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -95
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -95
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -80
- package/dist/index.mjs.map +0 -1
- package/dist/perpsErrorCodes.cjs +0 -128
- package/dist/perpsErrorCodes.cjs.map +0 -1
- package/dist/perpsErrorCodes.d.cts +0 -105
- package/dist/perpsErrorCodes.d.cts.map +0 -1
- package/dist/perpsErrorCodes.d.mts +0 -105
- package/dist/perpsErrorCodes.d.mts.map +0 -1
- package/dist/perpsErrorCodes.mjs +0 -125
- package/dist/perpsErrorCodes.mjs.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.cjs +0 -810
- package/dist/providers/AggregatedPerpsProvider.cjs.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.d.cts +0 -277
- package/dist/providers/AggregatedPerpsProvider.d.cts.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.d.mts +0 -277
- package/dist/providers/AggregatedPerpsProvider.d.mts.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.mjs +0 -805
- package/dist/providers/AggregatedPerpsProvider.mjs.map +0 -1
- package/dist/providers/HyperLiquidProvider.cjs +0 -10963
- package/dist/providers/HyperLiquidProvider.cjs.map +0 -1
- package/dist/providers/HyperLiquidProvider.d.cts +0 -656
- package/dist/providers/HyperLiquidProvider.d.cts.map +0 -1
- package/dist/providers/HyperLiquidProvider.d.mts +0 -656
- package/dist/providers/HyperLiquidProvider.d.mts.map +0 -1
- package/dist/providers/HyperLiquidProvider.mjs +0 -10959
- package/dist/providers/HyperLiquidProvider.mjs.map +0 -1
- package/dist/providers/LighterProvider.cjs +0 -6575
- package/dist/providers/LighterProvider.cjs.map +0 -1
- package/dist/providers/LighterProvider.d.cts +0 -179
- package/dist/providers/LighterProvider.d.cts.map +0 -1
- package/dist/providers/LighterProvider.d.mts +0 -179
- package/dist/providers/LighterProvider.d.mts.map +0 -1
- package/dist/providers/LighterProvider.mjs +0 -6571
- package/dist/providers/LighterProvider.mjs.map +0 -1
- package/dist/routing/ProviderRouter.cjs +0 -154
- package/dist/routing/ProviderRouter.cjs.map +0 -1
- package/dist/routing/ProviderRouter.d.cts +0 -112
- package/dist/routing/ProviderRouter.d.cts.map +0 -1
- package/dist/routing/ProviderRouter.d.mts +0 -112
- package/dist/routing/ProviderRouter.d.mts.map +0 -1
- package/dist/routing/ProviderRouter.mjs +0 -150
- package/dist/routing/ProviderRouter.mjs.map +0 -1
- package/dist/routing/index.cjs +0 -9
- package/dist/routing/index.cjs.map +0 -1
- package/dist/routing/index.d.cts +0 -6
- package/dist/routing/index.d.cts.map +0 -1
- package/dist/routing/index.d.mts +0 -6
- package/dist/routing/index.d.mts.map +0 -1
- package/dist/routing/index.mjs +0 -5
- package/dist/routing/index.mjs.map +0 -1
- package/dist/selectors.cjs +0 -264
- package/dist/selectors.cjs.map +0 -1
- package/dist/selectors.d.cts +0 -336
- package/dist/selectors.d.cts.map +0 -1
- package/dist/selectors.d.mts +0 -336
- package/dist/selectors.d.mts.map +0 -1
- package/dist/selectors.mjs +0 -249
- package/dist/selectors.mjs.map +0 -1
- package/dist/services/AccountService.cjs +0 -324
- package/dist/services/AccountService.cjs.map +0 -1
- package/dist/services/AccountService.d.cts +0 -56
- package/dist/services/AccountService.d.cts.map +0 -1
- package/dist/services/AccountService.d.mts +0 -56
- package/dist/services/AccountService.d.mts.map +0 -1
- package/dist/services/AccountService.mjs +0 -320
- package/dist/services/AccountService.mjs.map +0 -1
- package/dist/services/AggregatedOrderBookConnection.cjs +0 -405
- package/dist/services/AggregatedOrderBookConnection.cjs.map +0 -1
- package/dist/services/AggregatedOrderBookConnection.d.cts +0 -106
- package/dist/services/AggregatedOrderBookConnection.d.cts.map +0 -1
- package/dist/services/AggregatedOrderBookConnection.d.mts +0 -106
- package/dist/services/AggregatedOrderBookConnection.d.mts.map +0 -1
- package/dist/services/AggregatedOrderBookConnection.mjs +0 -400
- package/dist/services/AggregatedOrderBookConnection.mjs.map +0 -1
- package/dist/services/DataLakeService.cjs +0 -233
- package/dist/services/DataLakeService.cjs.map +0 -1
- package/dist/services/DataLakeService.d.cts +0 -51
- package/dist/services/DataLakeService.d.cts.map +0 -1
- package/dist/services/DataLakeService.d.mts +0 -51
- package/dist/services/DataLakeService.d.mts.map +0 -1
- package/dist/services/DataLakeService.mjs +0 -229
- package/dist/services/DataLakeService.mjs.map +0 -1
- package/dist/services/DepositService.cjs +0 -105
- package/dist/services/DepositService.cjs.map +0 -1
- package/dist/services/DepositService.d.cts +0 -39
- package/dist/services/DepositService.d.cts.map +0 -1
- package/dist/services/DepositService.d.mts +0 -39
- package/dist/services/DepositService.d.mts.map +0 -1
- package/dist/services/DepositService.mjs +0 -101
- package/dist/services/DepositService.mjs.map +0 -1
- package/dist/services/DexDiscoveryCacheManager.cjs +0 -147
- package/dist/services/DexDiscoveryCacheManager.cjs.map +0 -1
- package/dist/services/DexDiscoveryCacheManager.d.cts +0 -52
- package/dist/services/DexDiscoveryCacheManager.d.cts.map +0 -1
- package/dist/services/DexDiscoveryCacheManager.d.mts +0 -52
- package/dist/services/DexDiscoveryCacheManager.d.mts.map +0 -1
- package/dist/services/DexDiscoveryCacheManager.mjs +0 -143
- package/dist/services/DexDiscoveryCacheManager.mjs.map +0 -1
- package/dist/services/EligibilityService.cjs +0 -78
- package/dist/services/EligibilityService.cjs.map +0 -1
- package/dist/services/EligibilityService.d.cts +0 -28
- package/dist/services/EligibilityService.d.cts.map +0 -1
- package/dist/services/EligibilityService.d.mts +0 -28
- package/dist/services/EligibilityService.d.mts.map +0 -1
- package/dist/services/EligibilityService.mjs +0 -74
- package/dist/services/EligibilityService.mjs.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.cjs +0 -257
- package/dist/services/FeatureFlagConfigurationService.cjs.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.d.cts +0 -73
- package/dist/services/FeatureFlagConfigurationService.d.cts.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.d.mts +0 -73
- package/dist/services/FeatureFlagConfigurationService.d.mts.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.mjs +0 -253
- package/dist/services/FeatureFlagConfigurationService.mjs.map +0 -1
- package/dist/services/HyperLiquidClientService.cjs +0 -1114
- package/dist/services/HyperLiquidClientService.cjs.map +0 -1
- package/dist/services/HyperLiquidClientService.d.cts +0 -252
- package/dist/services/HyperLiquidClientService.d.cts.map +0 -1
- package/dist/services/HyperLiquidClientService.d.mts +0 -252
- package/dist/services/HyperLiquidClientService.d.mts.map +0 -1
- package/dist/services/HyperLiquidClientService.mjs +0 -1109
- package/dist/services/HyperLiquidClientService.mjs.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.cjs +0 -3594
- package/dist/services/HyperLiquidSubscriptionService.cjs.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.d.cts +0 -265
- package/dist/services/HyperLiquidSubscriptionService.d.cts.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.d.mts +0 -265
- package/dist/services/HyperLiquidSubscriptionService.d.mts.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.mjs +0 -3590
- package/dist/services/HyperLiquidSubscriptionService.mjs.map +0 -1
- package/dist/services/HyperLiquidWalletService.cjs +0 -186
- package/dist/services/HyperLiquidWalletService.cjs.map +0 -1
- package/dist/services/HyperLiquidWalletService.d.cts +0 -84
- package/dist/services/HyperLiquidWalletService.d.cts.map +0 -1
- package/dist/services/HyperLiquidWalletService.d.mts +0 -84
- package/dist/services/HyperLiquidWalletService.d.mts.map +0 -1
- package/dist/services/HyperLiquidWalletService.mjs +0 -182
- package/dist/services/HyperLiquidWalletService.mjs.map +0 -1
- package/dist/services/LighterClientService.cjs +0 -643
- package/dist/services/LighterClientService.cjs.map +0 -1
- package/dist/services/LighterClientService.d.cts +0 -200
- package/dist/services/LighterClientService.d.cts.map +0 -1
- package/dist/services/LighterClientService.d.mts +0 -200
- package/dist/services/LighterClientService.d.mts.map +0 -1
- package/dist/services/LighterClientService.mjs +0 -637
- package/dist/services/LighterClientService.mjs.map +0 -1
- package/dist/services/LighterWalletService.cjs +0 -109
- package/dist/services/LighterWalletService.cjs.map +0 -1
- package/dist/services/LighterWalletService.d.cts +0 -51
- package/dist/services/LighterWalletService.d.cts.map +0 -1
- package/dist/services/LighterWalletService.d.mts +0 -51
- package/dist/services/LighterWalletService.d.mts.map +0 -1
- package/dist/services/LighterWalletService.mjs +0 -105
- package/dist/services/LighterWalletService.mjs.map +0 -1
- package/dist/services/MarketDataService.cjs +0 -1171
- package/dist/services/MarketDataService.cjs.map +0 -1
- package/dist/services/MarketDataService.d.cts +0 -350
- package/dist/services/MarketDataService.d.cts.map +0 -1
- package/dist/services/MarketDataService.d.mts +0 -350
- package/dist/services/MarketDataService.d.mts.map +0 -1
- package/dist/services/MarketDataService.mjs +0 -1167
- package/dist/services/MarketDataService.mjs.map +0 -1
- package/dist/services/RewardsIntegrationService.cjs +0 -391
- package/dist/services/RewardsIntegrationService.cjs.map +0 -1
- package/dist/services/RewardsIntegrationService.d.cts +0 -84
- package/dist/services/RewardsIntegrationService.d.cts.map +0 -1
- package/dist/services/RewardsIntegrationService.d.mts +0 -84
- package/dist/services/RewardsIntegrationService.d.mts.map +0 -1
- package/dist/services/RewardsIntegrationService.mjs +0 -387
- package/dist/services/RewardsIntegrationService.mjs.map +0 -1
- package/dist/services/ServiceContext.cjs +0 -3
- package/dist/services/ServiceContext.cjs.map +0 -1
- package/dist/services/ServiceContext.d.cts +0 -102
- package/dist/services/ServiceContext.d.cts.map +0 -1
- package/dist/services/ServiceContext.d.mts +0 -102
- package/dist/services/ServiceContext.d.mts.map +0 -1
- package/dist/services/ServiceContext.mjs +0 -2
- package/dist/services/ServiceContext.mjs.map +0 -1
- package/dist/services/TerminalMarketService.cjs +0 -623
- package/dist/services/TerminalMarketService.cjs.map +0 -1
- package/dist/services/TerminalMarketService.d.cts +0 -45
- package/dist/services/TerminalMarketService.d.cts.map +0 -1
- package/dist/services/TerminalMarketService.d.mts +0 -45
- package/dist/services/TerminalMarketService.d.mts.map +0 -1
- package/dist/services/TerminalMarketService.mjs +0 -619
- package/dist/services/TerminalMarketService.mjs.map +0 -1
- package/dist/services/TradingReadinessCache.cjs +0 -329
- package/dist/services/TradingReadinessCache.cjs.map +0 -1
- package/dist/services/TradingReadinessCache.d.cts +0 -204
- package/dist/services/TradingReadinessCache.d.cts.map +0 -1
- package/dist/services/TradingReadinessCache.d.mts +0 -204
- package/dist/services/TradingReadinessCache.d.mts.map +0 -1
- package/dist/services/TradingReadinessCache.mjs +0 -326
- package/dist/services/TradingReadinessCache.mjs.map +0 -1
- package/dist/services/TradingService.cjs +0 -1895
- package/dist/services/TradingService.cjs.map +0 -1
- package/dist/services/TradingService.d.cts +0 -201
- package/dist/services/TradingService.d.cts.map +0 -1
- package/dist/services/TradingService.d.mts +0 -201
- package/dist/services/TradingService.d.mts.map +0 -1
- package/dist/services/TradingService.mjs +0 -1891
- package/dist/services/TradingService.mjs.map +0 -1
- package/dist/types/config.cjs +0 -3
- package/dist/types/config.cjs.map +0 -1
- package/dist/types/config.d.cts +0 -49
- package/dist/types/config.d.cts.map +0 -1
- package/dist/types/config.d.mts +0 -49
- package/dist/types/config.d.mts.map +0 -1
- package/dist/types/config.mjs +0 -2
- package/dist/types/config.mjs.map +0 -1
- package/dist/types/hyperliquid-types.cjs +0 -45
- package/dist/types/hyperliquid-types.cjs.map +0 -1
- package/dist/types/hyperliquid-types.d.cts +0 -67
- package/dist/types/hyperliquid-types.d.cts.map +0 -1
- package/dist/types/hyperliquid-types.d.mts +0 -67
- package/dist/types/hyperliquid-types.d.mts.map +0 -1
- package/dist/types/hyperliquid-types.mjs +0 -41
- package/dist/types/hyperliquid-types.mjs.map +0 -1
- package/dist/types/index.cjs +0 -151
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -2183
- package/dist/types/index.d.cts.map +0 -1
- package/dist/types/index.d.mts +0 -2183
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.mjs +0 -133
- package/dist/types/index.mjs.map +0 -1
- package/dist/types/lighter-types.cjs +0 -11
- package/dist/types/lighter-types.cjs.map +0 -1
- package/dist/types/lighter-types.d.cts +0 -763
- package/dist/types/lighter-types.d.cts.map +0 -1
- package/dist/types/lighter-types.d.mts +0 -763
- package/dist/types/lighter-types.d.mts.map +0 -1
- package/dist/types/lighter-types.mjs +0 -10
- package/dist/types/lighter-types.mjs.map +0 -1
- package/dist/types/messenger.cjs +0 -3
- package/dist/types/messenger.cjs.map +0 -1
- package/dist/types/messenger.d.cts +0 -30
- package/dist/types/messenger.d.cts.map +0 -1
- package/dist/types/messenger.d.mts +0 -30
- package/dist/types/messenger.d.mts.map +0 -1
- package/dist/types/messenger.mjs +0 -2
- package/dist/types/messenger.mjs.map +0 -1
- package/dist/types/perps-types.cjs +0 -7
- package/dist/types/perps-types.cjs.map +0 -1
- package/dist/types/perps-types.d.cts +0 -184
- package/dist/types/perps-types.d.cts.map +0 -1
- package/dist/types/perps-types.d.mts +0 -184
- package/dist/types/perps-types.d.mts.map +0 -1
- package/dist/types/perps-types.mjs +0 -5
- package/dist/types/perps-types.mjs.map +0 -1
- package/dist/types/token.cjs +0 -3
- package/dist/types/token.cjs.map +0 -1
- package/dist/types/token.d.cts +0 -25
- package/dist/types/token.d.cts.map +0 -1
- package/dist/types/token.d.mts +0 -25
- package/dist/types/token.d.mts.map +0 -1
- package/dist/types/token.mjs +0 -2
- package/dist/types/token.mjs.map +0 -1
- package/dist/types/transactionTypes.cjs +0 -29
- package/dist/types/transactionTypes.cjs.map +0 -1
- package/dist/types/transactionTypes.d.cts +0 -60
- package/dist/types/transactionTypes.d.cts.map +0 -1
- package/dist/types/transactionTypes.d.mts +0 -60
- package/dist/types/transactionTypes.d.mts.map +0 -1
- package/dist/types/transactionTypes.mjs +0 -24
- package/dist/types/transactionTypes.mjs.map +0 -1
- package/dist/utils/accountUtils.cjs +0 -236
- package/dist/utils/accountUtils.cjs.map +0 -1
- package/dist/utils/accountUtils.d.cts +0 -72
- package/dist/utils/accountUtils.d.cts.map +0 -1
- package/dist/utils/accountUtils.d.mts +0 -72
- package/dist/utils/accountUtils.d.mts.map +0 -1
- package/dist/utils/accountUtils.mjs +0 -223
- package/dist/utils/accountUtils.mjs.map +0 -1
- package/dist/utils/capabilitySymbols.cjs +0 -25
- package/dist/utils/capabilitySymbols.cjs.map +0 -1
- package/dist/utils/capabilitySymbols.d.cts +0 -15
- package/dist/utils/capabilitySymbols.d.cts.map +0 -1
- package/dist/utils/capabilitySymbols.d.mts +0 -15
- package/dist/utils/capabilitySymbols.d.mts.map +0 -1
- package/dist/utils/capabilitySymbols.mjs +0 -21
- package/dist/utils/capabilitySymbols.mjs.map +0 -1
- package/dist/utils/coalescePerpsRestRequest.cjs +0 -71
- package/dist/utils/coalescePerpsRestRequest.cjs.map +0 -1
- package/dist/utils/coalescePerpsRestRequest.d.cts +0 -32
- package/dist/utils/coalescePerpsRestRequest.d.cts.map +0 -1
- package/dist/utils/coalescePerpsRestRequest.d.mts +0 -32
- package/dist/utils/coalescePerpsRestRequest.d.mts.map +0 -1
- package/dist/utils/coalescePerpsRestRequest.mjs +0 -66
- package/dist/utils/coalescePerpsRestRequest.mjs.map +0 -1
- package/dist/utils/errorUtils.cjs +0 -104
- package/dist/utils/errorUtils.cjs.map +0 -1
- package/dist/utils/errorUtils.d.cts +0 -50
- package/dist/utils/errorUtils.d.cts.map +0 -1
- package/dist/utils/errorUtils.d.mts +0 -50
- package/dist/utils/errorUtils.d.mts.map +0 -1
- package/dist/utils/errorUtils.mjs +0 -96
- package/dist/utils/errorUtils.mjs.map +0 -1
- package/dist/utils/hyperLiquidAbstraction.cjs +0 -23
- package/dist/utils/hyperLiquidAbstraction.cjs.map +0 -1
- package/dist/utils/hyperLiquidAbstraction.d.cts +0 -11
- package/dist/utils/hyperLiquidAbstraction.d.cts.map +0 -1
- package/dist/utils/hyperLiquidAbstraction.d.mts +0 -11
- package/dist/utils/hyperLiquidAbstraction.d.mts.map +0 -1
- package/dist/utils/hyperLiquidAbstraction.mjs +0 -19
- package/dist/utils/hyperLiquidAbstraction.mjs.map +0 -1
- package/dist/utils/hyperLiquidAdapter.cjs +0 -512
- package/dist/utils/hyperLiquidAdapter.cjs.map +0 -1
- package/dist/utils/hyperLiquidAdapter.d.cts +0 -77
- package/dist/utils/hyperLiquidAdapter.d.cts.map +0 -1
- package/dist/utils/hyperLiquidAdapter.d.mts +0 -77
- package/dist/utils/hyperLiquidAdapter.d.mts.map +0 -1
- package/dist/utils/hyperLiquidAdapter.mjs +0 -494
- package/dist/utils/hyperLiquidAdapter.mjs.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.cjs +0 -83
- package/dist/utils/hyperLiquidOrderBookProcessor.cjs.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.d.cts +0 -55
- package/dist/utils/hyperLiquidOrderBookProcessor.d.cts.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.d.mts +0 -55
- package/dist/utils/hyperLiquidOrderBookProcessor.d.mts.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.mjs +0 -78
- package/dist/utils/hyperLiquidOrderBookProcessor.mjs.map +0 -1
- package/dist/utils/hyperLiquidPositionPreview.cjs +0 -355
- package/dist/utils/hyperLiquidPositionPreview.cjs.map +0 -1
- package/dist/utils/hyperLiquidPositionPreview.d.cts +0 -124
- package/dist/utils/hyperLiquidPositionPreview.d.cts.map +0 -1
- package/dist/utils/hyperLiquidPositionPreview.d.mts +0 -124
- package/dist/utils/hyperLiquidPositionPreview.d.mts.map +0 -1
- package/dist/utils/hyperLiquidPositionPreview.mjs +0 -347
- package/dist/utils/hyperLiquidPositionPreview.mjs.map +0 -1
- package/dist/utils/hyperLiquidValidation.cjs +0 -799
- package/dist/utils/hyperLiquidValidation.cjs.map +0 -1
- package/dist/utils/hyperLiquidValidation.d.cts +0 -192
- package/dist/utils/hyperLiquidValidation.d.cts.map +0 -1
- package/dist/utils/hyperLiquidValidation.d.mts +0 -192
- package/dist/utils/hyperLiquidValidation.d.mts.map +0 -1
- package/dist/utils/hyperLiquidValidation.mjs +0 -786
- package/dist/utils/hyperLiquidValidation.mjs.map +0 -1
- package/dist/utils/idUtils.cjs +0 -18
- package/dist/utils/idUtils.cjs.map +0 -1
- package/dist/utils/idUtils.d.cts +0 -6
- package/dist/utils/idUtils.d.cts.map +0 -1
- package/dist/utils/idUtils.d.mts +0 -6
- package/dist/utils/idUtils.d.mts.map +0 -1
- package/dist/utils/idUtils.mjs +0 -10
- package/dist/utils/idUtils.mjs.map +0 -1
- package/dist/utils/index.cjs +0 -66
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -29
- package/dist/utils/index.d.cts.map +0 -1
- package/dist/utils/index.d.mts +0 -29
- package/dist/utils/index.d.mts.map +0 -1
- package/dist/utils/index.mjs +0 -34
- package/dist/utils/index.mjs.map +0 -1
- package/dist/utils/lighterAdapter.cjs +0 -575
- package/dist/utils/lighterAdapter.cjs.map +0 -1
- package/dist/utils/lighterAdapter.d.cts +0 -117
- package/dist/utils/lighterAdapter.d.cts.map +0 -1
- package/dist/utils/lighterAdapter.d.mts +0 -117
- package/dist/utils/lighterAdapter.d.mts.map +0 -1
- package/dist/utils/lighterAdapter.mjs +0 -562
- package/dist/utils/lighterAdapter.mjs.map +0 -1
- package/dist/utils/marketDataTransform.cjs +0 -250
- package/dist/utils/marketDataTransform.cjs.map +0 -1
- package/dist/utils/marketDataTransform.d.cts +0 -71
- package/dist/utils/marketDataTransform.d.cts.map +0 -1
- package/dist/utils/marketDataTransform.d.mts +0 -71
- package/dist/utils/marketDataTransform.d.mts.map +0 -1
- package/dist/utils/marketDataTransform.mjs +0 -243
- package/dist/utils/marketDataTransform.mjs.map +0 -1
- package/dist/utils/marketSearch.cjs +0 -111
- package/dist/utils/marketSearch.cjs.map +0 -1
- package/dist/utils/marketSearch.d.cts +0 -48
- package/dist/utils/marketSearch.d.cts.map +0 -1
- package/dist/utils/marketSearch.d.mts +0 -48
- package/dist/utils/marketSearch.d.mts.map +0 -1
- package/dist/utils/marketSearch.mjs +0 -106
- package/dist/utils/marketSearch.mjs.map +0 -1
- package/dist/utils/marketUtils.cjs +0 -266
- package/dist/utils/marketUtils.cjs.map +0 -1
- package/dist/utils/marketUtils.d.cts +0 -73
- package/dist/utils/marketUtils.d.cts.map +0 -1
- package/dist/utils/marketUtils.d.mts +0 -73
- package/dist/utils/marketUtils.d.mts.map +0 -1
- package/dist/utils/marketUtils.mjs +0 -248
- package/dist/utils/marketUtils.mjs.map +0 -1
- package/dist/utils/orderCalculations.cjs +0 -849
- package/dist/utils/orderCalculations.cjs.map +0 -1
- package/dist/utils/orderCalculations.d.cts +0 -306
- package/dist/utils/orderCalculations.d.cts.map +0 -1
- package/dist/utils/orderCalculations.d.mts +0 -306
- package/dist/utils/orderCalculations.d.mts.map +0 -1
- package/dist/utils/orderCalculations.mjs +0 -833
- package/dist/utils/orderCalculations.mjs.map +0 -1
- package/dist/utils/orderTypes.cjs +0 -301
- package/dist/utils/orderTypes.cjs.map +0 -1
- package/dist/utils/orderTypes.d.cts +0 -166
- package/dist/utils/orderTypes.d.cts.map +0 -1
- package/dist/utils/orderTypes.d.mts +0 -166
- package/dist/utils/orderTypes.d.mts.map +0 -1
- package/dist/utils/orderTypes.mjs +0 -287
- package/dist/utils/orderTypes.mjs.map +0 -1
- package/dist/utils/perpsConnectionAttemptContext.cjs +0 -20
- package/dist/utils/perpsConnectionAttemptContext.cjs.map +0 -1
- package/dist/utils/perpsConnectionAttemptContext.d.cts +0 -7
- package/dist/utils/perpsConnectionAttemptContext.d.cts.map +0 -1
- package/dist/utils/perpsConnectionAttemptContext.d.mts +0 -7
- package/dist/utils/perpsConnectionAttemptContext.d.mts.map +0 -1
- package/dist/utils/perpsConnectionAttemptContext.mjs +0 -15
- package/dist/utils/perpsConnectionAttemptContext.mjs.map +0 -1
- package/dist/utils/perpsDiskPersistence.cjs +0 -259
- package/dist/utils/perpsDiskPersistence.cjs.map +0 -1
- package/dist/utils/perpsDiskPersistence.d.cts +0 -112
- package/dist/utils/perpsDiskPersistence.d.cts.map +0 -1
- package/dist/utils/perpsDiskPersistence.d.mts +0 -112
- package/dist/utils/perpsDiskPersistence.d.mts.map +0 -1
- package/dist/utils/perpsDiskPersistence.mjs +0 -251
- package/dist/utils/perpsDiskPersistence.mjs.map +0 -1
- package/dist/utils/perpsFormatters.cjs +0 -509
- package/dist/utils/perpsFormatters.cjs.map +0 -1
- package/dist/utils/perpsFormatters.d.cts +0 -204
- package/dist/utils/perpsFormatters.d.cts.map +0 -1
- package/dist/utils/perpsFormatters.d.mts +0 -204
- package/dist/utils/perpsFormatters.d.mts.map +0 -1
- package/dist/utils/perpsFormatters.mjs +0 -500
- package/dist/utils/perpsFormatters.mjs.map +0 -1
- package/dist/utils/rewardsUtils.cjs +0 -98
- package/dist/utils/rewardsUtils.cjs.map +0 -1
- package/dist/utils/rewardsUtils.d.cts +0 -33
- package/dist/utils/rewardsUtils.d.cts.map +0 -1
- package/dist/utils/rewardsUtils.d.mts +0 -33
- package/dist/utils/rewardsUtils.d.mts.map +0 -1
- package/dist/utils/rewardsUtils.mjs +0 -92
- package/dist/utils/rewardsUtils.mjs.map +0 -1
- package/dist/utils/significantFigures.cjs +0 -88
- package/dist/utils/significantFigures.cjs.map +0 -1
- package/dist/utils/significantFigures.d.cts +0 -25
- package/dist/utils/significantFigures.d.cts.map +0 -1
- package/dist/utils/significantFigures.d.mts +0 -25
- package/dist/utils/significantFigures.d.mts.map +0 -1
- package/dist/utils/significantFigures.mjs +0 -82
- package/dist/utils/significantFigures.mjs.map +0 -1
- package/dist/utils/sortMarkets.cjs +0 -93
- package/dist/utils/sortMarkets.cjs.map +0 -1
- package/dist/utils/sortMarkets.d.cts +0 -25
- package/dist/utils/sortMarkets.d.cts.map +0 -1
- package/dist/utils/sortMarkets.d.mts +0 -25
- package/dist/utils/sortMarkets.d.mts.map +0 -1
- package/dist/utils/sortMarkets.mjs +0 -88
- package/dist/utils/sortMarkets.mjs.map +0 -1
- package/dist/utils/standaloneInfoClient.cjs +0 -70
- package/dist/utils/standaloneInfoClient.cjs.map +0 -1
- package/dist/utils/standaloneInfoClient.d.cts +0 -37
- package/dist/utils/standaloneInfoClient.d.cts.map +0 -1
- package/dist/utils/standaloneInfoClient.d.mts +0 -37
- package/dist/utils/standaloneInfoClient.d.mts.map +0 -1
- package/dist/utils/standaloneInfoClient.mjs +0 -64
- package/dist/utils/standaloneInfoClient.mjs.map +0 -1
- package/dist/utils/stringParseUtils.cjs +0 -34
- package/dist/utils/stringParseUtils.cjs.map +0 -1
- package/dist/utils/stringParseUtils.d.cts +0 -11
- package/dist/utils/stringParseUtils.d.cts.map +0 -1
- package/dist/utils/stringParseUtils.d.mts +0 -11
- package/dist/utils/stringParseUtils.d.mts.map +0 -1
- package/dist/utils/stringParseUtils.mjs +0 -28
- package/dist/utils/stringParseUtils.mjs.map +0 -1
- package/dist/utils/transferData.cjs +0 -33
- package/dist/utils/transferData.cjs.map +0 -1
- package/dist/utils/transferData.d.cts +0 -9
- package/dist/utils/transferData.d.cts.map +0 -1
- package/dist/utils/transferData.d.mts +0 -9
- package/dist/utils/transferData.d.mts.map +0 -1
- package/dist/utils/transferData.mjs +0 -29
- package/dist/utils/transferData.mjs.map +0 -1
- package/dist/utils/wait.cjs +0 -6
- package/dist/utils/wait.cjs.map +0 -1
- package/dist/utils/wait.d.cts +0 -2
- package/dist/utils/wait.d.cts.map +0 -1
- package/dist/utils/wait.d.mts +0 -2
- package/dist/utils/wait.d.mts.map +0 -1
- package/dist/utils/wait.mjs +0 -2
- package/dist/utils/wait.mjs.map +0 -1
|
@@ -0,0 +1,1235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated.
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import type { PerpsController } from './PerpsController.js';
|
|
6
|
+
/**
|
|
7
|
+
* Read cached market data for the currently active provider (or aggregated).
|
|
8
|
+
* Returns null when no valid cache exists or when cache has expired.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Optional settings.
|
|
11
|
+
* @param options.skipTTL - When true, bypass the 5-minute TTL check.
|
|
12
|
+
* Used during initial render so disk-hydrated structural data (with
|
|
13
|
+
* placeholder prices) is returned regardless of age.
|
|
14
|
+
* @returns The cached market data array, or null if no valid cache.
|
|
15
|
+
*/
|
|
16
|
+
export type PerpsControllerGetCachedMarketDataForActiveProviderAction = {
|
|
17
|
+
type: `PerpsController:getCachedMarketDataForActiveProvider`;
|
|
18
|
+
handler: PerpsController['getCachedMarketDataForActiveProvider'];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Read cached user data for the currently active provider (or aggregated).
|
|
22
|
+
* Returns null when no valid cache exists, cache has expired, or address
|
|
23
|
+
* does not match the currently selected EVM account.
|
|
24
|
+
*
|
|
25
|
+
* @param options - Optional settings.
|
|
26
|
+
* @param options.skipTTL - When true, bypass the 60s staleness check.
|
|
27
|
+
* Used during initial render so disk-hydrated user data (positions/orders)
|
|
28
|
+
* is returned regardless of age, avoiding a skeleton flash.
|
|
29
|
+
* @returns The cached user data, or null if no valid cache.
|
|
30
|
+
*/
|
|
31
|
+
export type PerpsControllerGetCachedUserDataForActiveProviderAction = {
|
|
32
|
+
type: `PerpsController:getCachedUserDataForActiveProvider`;
|
|
33
|
+
handler: PerpsController['getCachedUserDataForActiveProvider'];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Fetch, validate, and atomically cache a complete user-data snapshot.
|
|
37
|
+
* This remains callable after mount so consumers can seed their live channel
|
|
38
|
+
* from one coherent positions/orders/account result.
|
|
39
|
+
*
|
|
40
|
+
* @returns The accepted user-data snapshot.
|
|
41
|
+
*/
|
|
42
|
+
export type PerpsControllerGetUserDataSnapshotAction = {
|
|
43
|
+
type: `PerpsController:getUserDataSnapshot`;
|
|
44
|
+
handler: PerpsController['getUserDataSnapshot'];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Initialize the PerpsController providers
|
|
48
|
+
* Must be called before using any other methods
|
|
49
|
+
* Prevents double initialization with promise caching
|
|
50
|
+
*
|
|
51
|
+
* @returns A promise that resolves when the operation completes.
|
|
52
|
+
*/
|
|
53
|
+
export type PerpsControllerInitAction = {
|
|
54
|
+
type: `PerpsController:init`;
|
|
55
|
+
handler: PerpsController['init'];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Get the currently active provider.
|
|
59
|
+
* In aggregated mode, returns AggregatedPerpsProvider which routes to underlying providers.
|
|
60
|
+
* In single provider mode, returns HyperLiquidProvider directly.
|
|
61
|
+
*
|
|
62
|
+
* @returns The active provider (aggregated wrapper or direct provider based on mode)
|
|
63
|
+
* @throws Error if provider is not initialized or reinitializing
|
|
64
|
+
*/
|
|
65
|
+
export type PerpsControllerGetActiveProviderAction = {
|
|
66
|
+
type: `PerpsController:getActiveProvider`;
|
|
67
|
+
handler: PerpsController['getActiveProvider'];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Get the currently active provider, returning null if not available
|
|
71
|
+
* Use this method when the caller can gracefully handle a missing provider
|
|
72
|
+
* (e.g., UI components during initialization or reconnection)
|
|
73
|
+
*
|
|
74
|
+
* @returns The active provider, or null if not initialized/reinitializing
|
|
75
|
+
*/
|
|
76
|
+
export type PerpsControllerGetActiveProviderOrNullAction = {
|
|
77
|
+
type: `PerpsController:getActiveProviderOrNull`;
|
|
78
|
+
handler: PerpsController['getActiveProviderOrNull'];
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Get strategy capabilities through the active provider route used by order
|
|
82
|
+
* placement. The query waits for in-flight initialization and reports an
|
|
83
|
+
* explicit unavailable status when no provider route can answer reliably.
|
|
84
|
+
*
|
|
85
|
+
* @param params - Market and optional provider route.
|
|
86
|
+
* @returns Provider-owned order capabilities.
|
|
87
|
+
*/
|
|
88
|
+
export type PerpsControllerGetOrderCapabilitiesAction = {
|
|
89
|
+
type: `PerpsController:getOrderCapabilities`;
|
|
90
|
+
handler: PerpsController['getOrderCapabilities'];
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Build a Scale price ladder using the active provider's venue rules.
|
|
94
|
+
*
|
|
95
|
+
* @param params - Market, ladder bounds, count, and optional explicit route.
|
|
96
|
+
* @returns Provider-normalized prices or a typed unavailable result.
|
|
97
|
+
* @throws When the provider cannot normalize the requested ladder.
|
|
98
|
+
*/
|
|
99
|
+
export type PerpsControllerGetScalePriceLadderAction = {
|
|
100
|
+
type: `PerpsController:getScalePriceLadder`;
|
|
101
|
+
handler: PerpsController['getScalePriceLadder'];
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Place a new order
|
|
105
|
+
* Thin delegation to TradingService
|
|
106
|
+
*
|
|
107
|
+
* @param params - The operation parameters.
|
|
108
|
+
* @returns The order result with order ID and status.
|
|
109
|
+
*/
|
|
110
|
+
export type PerpsControllerPlaceOrderAction = {
|
|
111
|
+
type: `PerpsController:placeOrder`;
|
|
112
|
+
handler: PerpsController['placeOrder'];
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Edit an existing order
|
|
116
|
+
* Thin delegation to TradingService
|
|
117
|
+
*
|
|
118
|
+
* @param params - The operation parameters.
|
|
119
|
+
* @returns The updated order result with order ID and status.
|
|
120
|
+
*/
|
|
121
|
+
export type PerpsControllerEditOrderAction = {
|
|
122
|
+
type: `PerpsController:editOrder`;
|
|
123
|
+
handler: PerpsController['editOrder'];
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Cancel an existing order
|
|
127
|
+
*
|
|
128
|
+
* @param params - The operation parameters.
|
|
129
|
+
* @returns The cancellation result with status.
|
|
130
|
+
*/
|
|
131
|
+
export type PerpsControllerCancelOrderAction = {
|
|
132
|
+
type: `PerpsController:cancelOrder`;
|
|
133
|
+
handler: PerpsController['cancelOrder'];
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Read venue-backed TWAP lifecycle records through the active provider.
|
|
137
|
+
* Providers without native TWAP history return an empty list.
|
|
138
|
+
*
|
|
139
|
+
* @returns Current and terminal TWAP schedules with slice fills.
|
|
140
|
+
*/
|
|
141
|
+
export type PerpsControllerGetTwapOrdersAction = {
|
|
142
|
+
type: `PerpsController:getTwapOrders`;
|
|
143
|
+
handler: PerpsController['getTwapOrders'];
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Read the active provider's retained Chase lifecycle snapshots.
|
|
147
|
+
* Providers without an emulated Chase implementation return an empty list.
|
|
148
|
+
*
|
|
149
|
+
* @returns Current Chase session snapshots.
|
|
150
|
+
*/
|
|
151
|
+
export type PerpsControllerGetChaseOrdersAction = {
|
|
152
|
+
type: `PerpsController:getChaseOrders`;
|
|
153
|
+
handler: PerpsController['getChaseOrders'];
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Stop Chase repricing for app backgrounding without cancelling the current
|
|
157
|
+
* resting children.
|
|
158
|
+
*
|
|
159
|
+
* @returns Chase snapshots after suspension.
|
|
160
|
+
* @throws If an aggregated provider cannot suspend every active venue. Other
|
|
161
|
+
* providers may already be suspended; callers can retry to reconcile them.
|
|
162
|
+
*/
|
|
163
|
+
export type PerpsControllerSuspendChaseOrdersAction = {
|
|
164
|
+
type: `PerpsController:suspendChaseOrders`;
|
|
165
|
+
handler: PerpsController['suspendChaseOrders'];
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Cancel multiple orders in parallel
|
|
169
|
+
* Batch version of cancelOrder() that cancels multiple orders simultaneously
|
|
170
|
+
*
|
|
171
|
+
* @param params - The operation parameters.
|
|
172
|
+
* @returns The batch cancellation results for each order.
|
|
173
|
+
*/
|
|
174
|
+
export type PerpsControllerCancelOrdersAction = {
|
|
175
|
+
type: `PerpsController:cancelOrders`;
|
|
176
|
+
handler: PerpsController['cancelOrders'];
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Close a position (partial or full)
|
|
180
|
+
* Thin delegation to TradingService
|
|
181
|
+
*
|
|
182
|
+
* @param params - The operation parameters.
|
|
183
|
+
* @returns The order result from the close position request.
|
|
184
|
+
*/
|
|
185
|
+
export type PerpsControllerClosePositionAction = {
|
|
186
|
+
type: `PerpsController:closePosition`;
|
|
187
|
+
handler: PerpsController['closePosition'];
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Close multiple positions in parallel
|
|
191
|
+
* Batch version of closePosition() that closes multiple positions simultaneously
|
|
192
|
+
*
|
|
193
|
+
* @param params - The operation parameters.
|
|
194
|
+
* @returns The batch close results for each position.
|
|
195
|
+
*/
|
|
196
|
+
export type PerpsControllerClosePositionsAction = {
|
|
197
|
+
type: `PerpsController:closePositions`;
|
|
198
|
+
handler: PerpsController['closePositions'];
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Update TP/SL for an existing position
|
|
202
|
+
*
|
|
203
|
+
* @param params - The operation parameters.
|
|
204
|
+
* @returns The order result from the TP/SL update.
|
|
205
|
+
*/
|
|
206
|
+
export type PerpsControllerUpdatePositionTPSLAction = {
|
|
207
|
+
type: `PerpsController:updatePositionTPSL`;
|
|
208
|
+
handler: PerpsController['updatePositionTPSL'];
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Update margin for an existing position (add or remove)
|
|
212
|
+
*
|
|
213
|
+
* @param params - The operation parameters.
|
|
214
|
+
* @returns The margin update result.
|
|
215
|
+
*/
|
|
216
|
+
export type PerpsControllerUpdateMarginAction = {
|
|
217
|
+
type: `PerpsController:updateMargin`;
|
|
218
|
+
handler: PerpsController['updateMargin'];
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Flip position (reverse direction while keeping size and leverage)
|
|
222
|
+
*
|
|
223
|
+
* @param params - The operation parameters.
|
|
224
|
+
* @returns The order result from the position flip.
|
|
225
|
+
*/
|
|
226
|
+
export type PerpsControllerFlipPositionAction = {
|
|
227
|
+
type: `PerpsController:flipPosition`;
|
|
228
|
+
handler: PerpsController['flipPosition'];
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Simplified deposit method that prepares transaction for confirmation screen
|
|
232
|
+
* No complex state tracking - just sets a loading flag
|
|
233
|
+
*
|
|
234
|
+
* @param params - Parameters for the deposit flow
|
|
235
|
+
* @param params.amount - Optional deposit amount
|
|
236
|
+
* @param params.placeOrder - If true, uses addTransaction instead of submit to avoid navigation
|
|
237
|
+
* @returns An object containing a promise that resolves to the transaction hash.
|
|
238
|
+
*/
|
|
239
|
+
export type PerpsControllerDepositWithConfirmationAction = {
|
|
240
|
+
type: `PerpsController:depositWithConfirmation`;
|
|
241
|
+
handler: PerpsController['depositWithConfirmation'];
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Same as depositWithConfirmation - prepares transaction for confirmation screen.
|
|
245
|
+
*
|
|
246
|
+
* @returns A promise that resolves to the string result.
|
|
247
|
+
*/
|
|
248
|
+
export type PerpsControllerDepositWithOrderAction = {
|
|
249
|
+
type: `PerpsController:depositWithOrder`;
|
|
250
|
+
handler: PerpsController['depositWithOrder'];
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Clear the last deposit result after it has been shown to the user
|
|
254
|
+
*/
|
|
255
|
+
export type PerpsControllerClearDepositResultAction = {
|
|
256
|
+
type: `PerpsController:clearDepositResult`;
|
|
257
|
+
handler: PerpsController['clearDepositResult'];
|
|
258
|
+
};
|
|
259
|
+
export type PerpsControllerClearWithdrawResultAction = {
|
|
260
|
+
type: `PerpsController:clearWithdrawResult`;
|
|
261
|
+
handler: PerpsController['clearWithdrawResult'];
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Update withdrawal request status when it completes, or remove it on failure.
|
|
265
|
+
* This is called when a withdrawal is matched with a completed withdrawal from the API.
|
|
266
|
+
* When status is `failed`, the request is removed from the queue (not retained).
|
|
267
|
+
*
|
|
268
|
+
* @param withdrawalId - The withdrawal transaction ID.
|
|
269
|
+
* @param status - The current status.
|
|
270
|
+
* @param txHash - The transaction hash.
|
|
271
|
+
*/
|
|
272
|
+
export type PerpsControllerUpdateWithdrawalStatusAction = {
|
|
273
|
+
type: `PerpsController:updateWithdrawalStatus`;
|
|
274
|
+
handler: PerpsController['updateWithdrawalStatus'];
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Complete a specific withdrawal detected via transaction history polling (FIFO queue).
|
|
278
|
+
* Called when a completed withdrawal appears in the transaction history matching a pending request.
|
|
279
|
+
*
|
|
280
|
+
* Uses FIFO matching: oldest pending withdrawal is matched with first completed withdrawal
|
|
281
|
+
* in history that happened after its submission time.
|
|
282
|
+
*
|
|
283
|
+
* @param withdrawalRequestId - The ID of the pending withdrawal request to mark as complete.
|
|
284
|
+
* @param completedWithdrawal - The completed withdrawal data from the history API.
|
|
285
|
+
* @param completedWithdrawal.txHash - The on-chain transaction hash.
|
|
286
|
+
* @param completedWithdrawal.amount - The withdrawal amount.
|
|
287
|
+
* @param completedWithdrawal.timestamp - The completion timestamp from the history API.
|
|
288
|
+
* @param completedWithdrawal.asset - The asset symbol (e.g. USDC).
|
|
289
|
+
*/
|
|
290
|
+
export type PerpsControllerCompleteWithdrawalFromHistoryAction = {
|
|
291
|
+
type: `PerpsController:completeWithdrawalFromHistory`;
|
|
292
|
+
handler: PerpsController['completeWithdrawalFromHistory'];
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Update withdrawal progress (persistent across navigation)
|
|
296
|
+
*
|
|
297
|
+
* @param progress - The progress indicator.
|
|
298
|
+
* @param activeWithdrawalId - The active withdrawal ID.
|
|
299
|
+
*/
|
|
300
|
+
export type PerpsControllerUpdateWithdrawalProgressAction = {
|
|
301
|
+
type: `PerpsController:updateWithdrawalProgress`;
|
|
302
|
+
handler: PerpsController['updateWithdrawalProgress'];
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* Get current withdrawal progress
|
|
306
|
+
*
|
|
307
|
+
* @returns The withdrawal progress, last update timestamp, and active withdrawal ID.
|
|
308
|
+
*/
|
|
309
|
+
export type PerpsControllerGetWithdrawalProgressAction = {
|
|
310
|
+
type: `PerpsController:getWithdrawalProgress`;
|
|
311
|
+
handler: PerpsController['getWithdrawalProgress'];
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Withdraw funds from trading account
|
|
315
|
+
*
|
|
316
|
+
* The withdrawal process varies by provider and may involve:
|
|
317
|
+
* - Direct on-chain transfers
|
|
318
|
+
* - Bridge operations
|
|
319
|
+
* - Multi-step validation processes
|
|
320
|
+
*
|
|
321
|
+
* Check the specific provider documentation for detailed withdrawal flows.
|
|
322
|
+
*
|
|
323
|
+
* @param params Withdrawal parameters
|
|
324
|
+
* @returns WithdrawResult with withdrawal ID and tracking info
|
|
325
|
+
*/
|
|
326
|
+
export type PerpsControllerWithdrawAction = {
|
|
327
|
+
type: `PerpsController:withdraw`;
|
|
328
|
+
handler: PerpsController['withdraw'];
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Get current positions
|
|
332
|
+
* Thin delegation to MarketDataService
|
|
333
|
+
*
|
|
334
|
+
* For standalone mode, bypasses getActiveProvider() to allow position queries
|
|
335
|
+
* without full perps initialization (e.g., for showing positions on token details page)
|
|
336
|
+
*
|
|
337
|
+
* @param params - The operation parameters.
|
|
338
|
+
* @returns Array of open positions for the active provider.
|
|
339
|
+
*/
|
|
340
|
+
export type PerpsControllerGetPositionsAction = {
|
|
341
|
+
type: `PerpsController:getPositions`;
|
|
342
|
+
handler: PerpsController['getPositions'];
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* Get historical user fills (trade executions)
|
|
346
|
+
* Thin delegation to MarketDataService
|
|
347
|
+
*
|
|
348
|
+
* @param params - The operation parameters.
|
|
349
|
+
* @param options - Optional call modifiers.
|
|
350
|
+
* @param options.forceRefresh - Bypass the request-coalesce cache
|
|
351
|
+
* end-to-end (user-initiated refresh).
|
|
352
|
+
* @returns Array of historical trade executions (fills).
|
|
353
|
+
*/
|
|
354
|
+
export type PerpsControllerGetOrderFillsAction = {
|
|
355
|
+
type: `PerpsController:getOrderFills`;
|
|
356
|
+
handler: PerpsController['getOrderFills'];
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* List TP/SL protection changes the active provider parked for
|
|
360
|
+
* explicit manual re-establishment. Providers without durable
|
|
361
|
+
* settlement state return an empty list.
|
|
362
|
+
*
|
|
363
|
+
* @returns Pending manual-recovery entries.
|
|
364
|
+
*/
|
|
365
|
+
export type PerpsControllerGetPendingManualRecoveriesAction = {
|
|
366
|
+
type: `PerpsController:getPendingManualRecoveries`;
|
|
367
|
+
handler: PerpsController['getPendingManualRecoveries'];
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* READ-ONLY list of the active provider's recovered-dispatch outcomes
|
|
371
|
+
* (previously ambiguous submissions later resolved). Providers without
|
|
372
|
+
* durable dispatch state return an empty list.
|
|
373
|
+
*
|
|
374
|
+
* @returns Pending recovered-dispatch outcomes.
|
|
375
|
+
*/
|
|
376
|
+
export type PerpsControllerGetRecoveredDispatchesAction = {
|
|
377
|
+
type: `PerpsController:getRecoveredDispatches`;
|
|
378
|
+
handler: PerpsController['getRecoveredDispatches'];
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Acknowledge ONE recovered-dispatch outcome by its stable id, after
|
|
382
|
+
* refreshing venue state. Throws when the active provider has no
|
|
383
|
+
* durable dispatch state or the id no longer matches.
|
|
384
|
+
*
|
|
385
|
+
* @param recoveryId - Stable id from {@link getRecoveredDispatches}.
|
|
386
|
+
* @returns Resolves when the outcome is acknowledged.
|
|
387
|
+
*/
|
|
388
|
+
export type PerpsControllerAcknowledgeRecoveredDispatchAction = {
|
|
389
|
+
type: `PerpsController:acknowledgeRecoveredDispatch`;
|
|
390
|
+
handler: PerpsController['acknowledgeRecoveredDispatch'];
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* Get historical user orders (order lifecycle)
|
|
394
|
+
* Thin delegation to MarketDataService
|
|
395
|
+
*
|
|
396
|
+
* @param params - The operation parameters.
|
|
397
|
+
* @param options - Optional call modifiers.
|
|
398
|
+
* @param options.forceRefresh - Bypass the request-coalesce cache
|
|
399
|
+
* end-to-end (user-initiated refresh).
|
|
400
|
+
* @returns Array of historical orders.
|
|
401
|
+
*/
|
|
402
|
+
export type PerpsControllerGetOrdersAction = {
|
|
403
|
+
type: `PerpsController:getOrders`;
|
|
404
|
+
handler: PerpsController['getOrders'];
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* Get currently open orders (real-time status)
|
|
408
|
+
* Thin delegation to MarketDataService
|
|
409
|
+
*
|
|
410
|
+
* For standalone mode, bypasses getActiveProvider() to allow open order queries
|
|
411
|
+
* without full perps initialization (e.g., for background preloading)
|
|
412
|
+
*
|
|
413
|
+
* @param params - The operation parameters.
|
|
414
|
+
* @returns A promise that resolves to the result.
|
|
415
|
+
*/
|
|
416
|
+
export type PerpsControllerGetOpenOrdersAction = {
|
|
417
|
+
type: `PerpsController:getOpenOrders`;
|
|
418
|
+
handler: PerpsController['getOpenOrders'];
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* Get historical user funding history (funding payments)
|
|
422
|
+
* Thin delegation to MarketDataService
|
|
423
|
+
*
|
|
424
|
+
* @param params - The operation parameters.
|
|
425
|
+
* @param options - Optional call modifiers.
|
|
426
|
+
* @param options.forceRefresh - Bypass the request-coalesce cache
|
|
427
|
+
* end-to-end (user-initiated refresh).
|
|
428
|
+
* @returns Array of historical funding payments.
|
|
429
|
+
*/
|
|
430
|
+
export type PerpsControllerGetFundingAction = {
|
|
431
|
+
type: `PerpsController:getFunding`;
|
|
432
|
+
handler: PerpsController['getFunding'];
|
|
433
|
+
};
|
|
434
|
+
/**
|
|
435
|
+
* Get account state (balances, etc.)
|
|
436
|
+
* Thin delegation to MarketDataService
|
|
437
|
+
*
|
|
438
|
+
* For standalone mode, bypasses getActiveProvider() to allow account state queries
|
|
439
|
+
* without full perps initialization (e.g., for checking if user has perps funds)
|
|
440
|
+
*
|
|
441
|
+
* @param params - The operation parameters.
|
|
442
|
+
* @returns A promise that resolves to the result.
|
|
443
|
+
*/
|
|
444
|
+
export type PerpsControllerGetAccountStateAction = {
|
|
445
|
+
type: `PerpsController:getAccountState`;
|
|
446
|
+
handler: PerpsController['getAccountState'];
|
|
447
|
+
};
|
|
448
|
+
/**
|
|
449
|
+
* Get historical portfolio data
|
|
450
|
+
* Thin delegation to MarketDataService
|
|
451
|
+
*
|
|
452
|
+
* @param params - The operation parameters.
|
|
453
|
+
* @returns The historical portfolio data points.
|
|
454
|
+
*/
|
|
455
|
+
export type PerpsControllerGetHistoricalPortfolioAction = {
|
|
456
|
+
type: `PerpsController:getHistoricalPortfolio`;
|
|
457
|
+
handler: PerpsController['getHistoricalPortfolio'];
|
|
458
|
+
};
|
|
459
|
+
/**
|
|
460
|
+
* Get available markets with optional filtering
|
|
461
|
+
* Thin delegation to MarketDataService
|
|
462
|
+
*
|
|
463
|
+
* For standalone mode, bypasses getActiveProvider() to allow market discovery
|
|
464
|
+
* without full perps initialization (e.g., for discovery banners on spot screens)
|
|
465
|
+
*
|
|
466
|
+
* @param params - The operation parameters.
|
|
467
|
+
* @returns Array of available markets matching the filter criteria.
|
|
468
|
+
*/
|
|
469
|
+
export type PerpsControllerGetMarketsAction = {
|
|
470
|
+
type: `PerpsController:getMarkets`;
|
|
471
|
+
handler: PerpsController['getMarkets'];
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Get market data with prices (includes price, volume, 24h change).
|
|
475
|
+
* Optionally filter by category, sort, and limit the results.
|
|
476
|
+
*
|
|
477
|
+
* For standalone mode, bypasses getActiveProvider() to allow market data queries
|
|
478
|
+
* without full perps initialization (e.g., for background preloading on app start)
|
|
479
|
+
*
|
|
480
|
+
* @param params - The operation parameters.
|
|
481
|
+
* @param params.standalone - Whether to use standalone mode.
|
|
482
|
+
* @param params.categories - Filter to markets matching any of these categories.
|
|
483
|
+
* @param params.sortBy - Sort results by this field.
|
|
484
|
+
* @param params.direction - Sort direction (default: desc).
|
|
485
|
+
* @param params.limit - Maximum number of results to return.
|
|
486
|
+
* @returns A promise that resolves to the market data.
|
|
487
|
+
*/
|
|
488
|
+
export type PerpsControllerGetMarketDataWithPricesAction = {
|
|
489
|
+
type: `PerpsController:getMarketDataWithPrices`;
|
|
490
|
+
handler: PerpsController['getMarketDataWithPrices'];
|
|
491
|
+
};
|
|
492
|
+
/**
|
|
493
|
+
* Start background market data preloading.
|
|
494
|
+
* Fetches market data immediately and refreshes every 5 minutes.
|
|
495
|
+
* Watches for isTestnet and hip3ConfigVersion changes to re-preload.
|
|
496
|
+
*/
|
|
497
|
+
export type PerpsControllerStartMarketDataPreloadAction = {
|
|
498
|
+
type: `PerpsController:startMarketDataPreload`;
|
|
499
|
+
handler: PerpsController['startMarketDataPreload'];
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Stop background market data preloading.
|
|
503
|
+
*/
|
|
504
|
+
export type PerpsControllerStopMarketDataPreloadAction = {
|
|
505
|
+
type: `PerpsController:stopMarketDataPreload`;
|
|
506
|
+
handler: PerpsController['stopMarketDataPreload'];
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* Get list of available HIP-3 builder-deployed DEXs
|
|
510
|
+
*
|
|
511
|
+
* @param params - Optional parameters for filtering
|
|
512
|
+
* @returns Array of DEX names
|
|
513
|
+
*/
|
|
514
|
+
export type PerpsControllerGetAvailableDexsAction = {
|
|
515
|
+
type: `PerpsController:getAvailableDexs`;
|
|
516
|
+
handler: PerpsController['getAvailableDexs'];
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Fetch historical candle data
|
|
520
|
+
* Thin delegation to MarketDataService
|
|
521
|
+
*
|
|
522
|
+
* @param options - The configuration options.
|
|
523
|
+
* @param options.symbol - The trading pair symbol.
|
|
524
|
+
* @param options.interval - The candle interval period.
|
|
525
|
+
* @param options.limit - Maximum number of items to fetch.
|
|
526
|
+
* @param options.endTime - End timestamp in milliseconds.
|
|
527
|
+
* @returns The historical candle data for the requested symbol and interval.
|
|
528
|
+
*/
|
|
529
|
+
export type PerpsControllerFetchHistoricalCandlesAction = {
|
|
530
|
+
type: `PerpsController:fetchHistoricalCandles`;
|
|
531
|
+
handler: PerpsController['fetchHistoricalCandles'];
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* Calculate liquidation price for a position
|
|
535
|
+
* Uses provider-specific formulas based on protocol rules
|
|
536
|
+
*
|
|
537
|
+
* @param params - The operation parameters.
|
|
538
|
+
* @returns A promise that resolves to the string result.
|
|
539
|
+
*/
|
|
540
|
+
export type PerpsControllerCalculateLiquidationPriceAction = {
|
|
541
|
+
type: `PerpsController:calculateLiquidationPrice`;
|
|
542
|
+
handler: PerpsController['calculateLiquidationPrice'];
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* Project the isolated position that would remain after a proposed order.
|
|
546
|
+
* Margin and liquidation availability are independent: a missing liquidation
|
|
547
|
+
* does not hide a valid margin projection. Cross-margin returns unsupported.
|
|
548
|
+
*
|
|
549
|
+
* @param params - Live position plus the proposed order.
|
|
550
|
+
* @returns Discriminated preview of the resulting position.
|
|
551
|
+
*/
|
|
552
|
+
export type PerpsControllerPreviewPositionModifyAction = {
|
|
553
|
+
type: `PerpsController:previewPositionModify`;
|
|
554
|
+
handler: PerpsController['previewPositionModify'];
|
|
555
|
+
};
|
|
556
|
+
/**
|
|
557
|
+
* Calculate maintenance margin for a specific asset
|
|
558
|
+
* Returns a percentage (e.g., 0.0125 for 1.25%)
|
|
559
|
+
*
|
|
560
|
+
* @param params - The operation parameters.
|
|
561
|
+
* @returns A promise that resolves to the numeric result.
|
|
562
|
+
*/
|
|
563
|
+
export type PerpsControllerCalculateMaintenanceMarginAction = {
|
|
564
|
+
type: `PerpsController:calculateMaintenanceMargin`;
|
|
565
|
+
handler: PerpsController['calculateMaintenanceMargin'];
|
|
566
|
+
};
|
|
567
|
+
/**
|
|
568
|
+
* Get maximum leverage allowed for an asset
|
|
569
|
+
*
|
|
570
|
+
* @param asset - The asset identifier.
|
|
571
|
+
* @param providerId - Optional provider route for aggregated markets.
|
|
572
|
+
* @returns A promise that resolves to the numeric result.
|
|
573
|
+
*/
|
|
574
|
+
export type PerpsControllerGetMaxLeverageAction = {
|
|
575
|
+
type: `PerpsController:getMaxLeverage`;
|
|
576
|
+
handler: PerpsController['getMaxLeverage'];
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* Validate order parameters according to protocol-specific rules
|
|
580
|
+
*
|
|
581
|
+
* @param params - The operation parameters.
|
|
582
|
+
* @returns True if the condition is met.
|
|
583
|
+
*/
|
|
584
|
+
export type PerpsControllerValidateOrderAction = {
|
|
585
|
+
type: `PerpsController:validateOrder`;
|
|
586
|
+
handler: PerpsController['validateOrder'];
|
|
587
|
+
};
|
|
588
|
+
/**
|
|
589
|
+
* Validate close position parameters according to protocol-specific rules
|
|
590
|
+
*
|
|
591
|
+
* @param params - The operation parameters.
|
|
592
|
+
* @returns A promise that resolves to the result.
|
|
593
|
+
*/
|
|
594
|
+
export type PerpsControllerValidateClosePositionAction = {
|
|
595
|
+
type: `PerpsController:validateClosePosition`;
|
|
596
|
+
handler: PerpsController['validateClosePosition'];
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* Validate withdrawal parameters according to protocol-specific rules
|
|
600
|
+
*
|
|
601
|
+
* @param params - The operation parameters.
|
|
602
|
+
* @returns True if the condition is met.
|
|
603
|
+
*/
|
|
604
|
+
export type PerpsControllerValidateWithdrawalAction = {
|
|
605
|
+
type: `PerpsController:validateWithdrawal`;
|
|
606
|
+
handler: PerpsController['validateWithdrawal'];
|
|
607
|
+
};
|
|
608
|
+
/**
|
|
609
|
+
* Get supported withdrawal routes - returns complete asset and routing information
|
|
610
|
+
*
|
|
611
|
+
* @returns Array of supported asset routes for withdrawals.
|
|
612
|
+
*/
|
|
613
|
+
export type PerpsControllerGetWithdrawalRoutesAction = {
|
|
614
|
+
type: `PerpsController:getWithdrawalRoutes`;
|
|
615
|
+
handler: PerpsController['getWithdrawalRoutes'];
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* Set the transient UTM / discovery attribution context.
|
|
619
|
+
* Replaces any previously set context. Held in-memory only — not persisted.
|
|
620
|
+
*
|
|
621
|
+
* @param context - The attribution context (UTM fields) to store.
|
|
622
|
+
*/
|
|
623
|
+
export type PerpsControllerSetAttributionContextAction = {
|
|
624
|
+
type: `PerpsController:setAttributionContext`;
|
|
625
|
+
handler: PerpsController['setAttributionContext'];
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* Get a copy of the current attribution context.
|
|
629
|
+
*
|
|
630
|
+
* @returns A shallow copy of the stored attribution context.
|
|
631
|
+
*/
|
|
632
|
+
export type PerpsControllerGetAttributionContextAction = {
|
|
633
|
+
type: `PerpsController:getAttributionContext`;
|
|
634
|
+
handler: PerpsController['getAttributionContext'];
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Clear the stored attribution context.
|
|
638
|
+
*/
|
|
639
|
+
export type PerpsControllerClearAttributionContextAction = {
|
|
640
|
+
type: `PerpsController:clearAttributionContext`;
|
|
641
|
+
handler: PerpsController['clearAttributionContext'];
|
|
642
|
+
};
|
|
643
|
+
/**
|
|
644
|
+
* Toggle between testnet and mainnet
|
|
645
|
+
*
|
|
646
|
+
* @returns The toggle result with success status and current network mode.
|
|
647
|
+
*/
|
|
648
|
+
export type PerpsControllerToggleTestnetAction = {
|
|
649
|
+
type: `PerpsController:toggleTestnet`;
|
|
650
|
+
handler: PerpsController['toggleTestnet'];
|
|
651
|
+
};
|
|
652
|
+
/**
|
|
653
|
+
* Switch to a different provider
|
|
654
|
+
* Uses a full reinit approach: disconnect() → update state → init()
|
|
655
|
+
* This ensures complete state reset including WebSocket connections and caches.
|
|
656
|
+
*
|
|
657
|
+
* @param providerId - The provider identifier.
|
|
658
|
+
* @returns The switch result with success status and active provider.
|
|
659
|
+
*/
|
|
660
|
+
export type PerpsControllerSwitchProviderAction = {
|
|
661
|
+
type: `PerpsController:switchProvider`;
|
|
662
|
+
handler: PerpsController['switchProvider'];
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* Get current network (mainnet/testnet)
|
|
666
|
+
*
|
|
667
|
+
* @returns Either 'mainnet' or 'testnet' based on the current configuration.
|
|
668
|
+
*/
|
|
669
|
+
export type PerpsControllerGetCurrentNetworkAction = {
|
|
670
|
+
type: `PerpsController:getCurrentNetwork`;
|
|
671
|
+
handler: PerpsController['getCurrentNetwork'];
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* Get the ordered list of all market categories for HIP-3 markets.
|
|
675
|
+
* Returns a stable, explicitly ordered array so the UI can render
|
|
676
|
+
* category filter tabs without deriving order from config insertion.
|
|
677
|
+
*
|
|
678
|
+
* @returns Ordered array of {@link MarketTypeFilter} values. Does not include the 'all' or 'new' sentinels — those are separate UI controls.
|
|
679
|
+
*/
|
|
680
|
+
export type PerpsControllerGetMarketCategoriesAction = {
|
|
681
|
+
type: `PerpsController:getMarketCategories`;
|
|
682
|
+
handler: PerpsController['getMarketCategories'];
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Get the current WebSocket connection state from the active provider.
|
|
686
|
+
* Used by the UI to monitor connection health and show notifications.
|
|
687
|
+
*
|
|
688
|
+
* @returns The current WebSocket connection state, or DISCONNECTED if not supported
|
|
689
|
+
*/
|
|
690
|
+
export type PerpsControllerGetWebSocketConnectionStateAction = {
|
|
691
|
+
type: `PerpsController:getWebSocketConnectionState`;
|
|
692
|
+
handler: PerpsController['getWebSocketConnectionState'];
|
|
693
|
+
};
|
|
694
|
+
/**
|
|
695
|
+
* Subscribe to WebSocket connection state changes from the active provider.
|
|
696
|
+
* The listener will be called immediately with the current state and whenever the state changes.
|
|
697
|
+
*
|
|
698
|
+
* @param listener - Callback function that receives the new connection state and reconnection attempt
|
|
699
|
+
* @returns Unsubscribe function to remove the listener, or no-op if not supported
|
|
700
|
+
*/
|
|
701
|
+
export type PerpsControllerSubscribeToConnectionStateAction = {
|
|
702
|
+
type: `PerpsController:subscribeToConnectionState`;
|
|
703
|
+
handler: PerpsController['subscribeToConnectionState'];
|
|
704
|
+
};
|
|
705
|
+
/**
|
|
706
|
+
* Manually trigger a WebSocket reconnection attempt.
|
|
707
|
+
* Used by the UI retry button when connection is lost.
|
|
708
|
+
*/
|
|
709
|
+
export type PerpsControllerReconnectAction = {
|
|
710
|
+
type: `PerpsController:reconnect`;
|
|
711
|
+
handler: PerpsController['reconnect'];
|
|
712
|
+
};
|
|
713
|
+
/**
|
|
714
|
+
* Subscribe to live price updates
|
|
715
|
+
*
|
|
716
|
+
* @param params - The operation parameters.
|
|
717
|
+
* @returns A cleanup function to remove the subscription.
|
|
718
|
+
*/
|
|
719
|
+
export type PerpsControllerSubscribeToPricesAction = {
|
|
720
|
+
type: `PerpsController:subscribeToPrices`;
|
|
721
|
+
handler: PerpsController['subscribeToPrices'];
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Subscribe to live position updates
|
|
725
|
+
*
|
|
726
|
+
* @param params - The operation parameters.
|
|
727
|
+
* @returns A cleanup function to remove the subscription.
|
|
728
|
+
*/
|
|
729
|
+
export type PerpsControllerSubscribeToPositionsAction = {
|
|
730
|
+
type: `PerpsController:subscribeToPositions`;
|
|
731
|
+
handler: PerpsController['subscribeToPositions'];
|
|
732
|
+
};
|
|
733
|
+
/**
|
|
734
|
+
* Subscribe to live order fill updates
|
|
735
|
+
*
|
|
736
|
+
* @param params - The operation parameters.
|
|
737
|
+
* @returns A cleanup function to remove the subscription.
|
|
738
|
+
*/
|
|
739
|
+
export type PerpsControllerSubscribeToOrderFillsAction = {
|
|
740
|
+
type: `PerpsController:subscribeToOrderFills`;
|
|
741
|
+
handler: PerpsController['subscribeToOrderFills'];
|
|
742
|
+
};
|
|
743
|
+
/**
|
|
744
|
+
* Stream TWAP lifecycle updates through the active provider.
|
|
745
|
+
*
|
|
746
|
+
* Providers without a native TWAP push channel do not implement this; the
|
|
747
|
+
* returned no-op cleanup lets a client fall back to polling `getTwapOrders`
|
|
748
|
+
* without branching on provider identity.
|
|
749
|
+
*
|
|
750
|
+
* @param params - Subscription parameters including callback and account ID.
|
|
751
|
+
* @returns A cleanup function to remove the subscription.
|
|
752
|
+
*/
|
|
753
|
+
export type PerpsControllerSubscribeToTwapOrdersAction = {
|
|
754
|
+
type: `PerpsController:subscribeToTwapOrders`;
|
|
755
|
+
handler: PerpsController['subscribeToTwapOrders'];
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* Subscribe to live order updates
|
|
759
|
+
*
|
|
760
|
+
* @param params - The operation parameters.
|
|
761
|
+
* @returns A cleanup function to remove the subscription.
|
|
762
|
+
*/
|
|
763
|
+
export type PerpsControllerSubscribeToOrdersAction = {
|
|
764
|
+
type: `PerpsController:subscribeToOrders`;
|
|
765
|
+
handler: PerpsController['subscribeToOrders'];
|
|
766
|
+
};
|
|
767
|
+
/**
|
|
768
|
+
* Subscribe to live account updates.
|
|
769
|
+
* Updates controller state (Redux) when new account data arrives so consumers
|
|
770
|
+
* like usePerpsBalanceTokenFilter (PayWithModal) see the latest balance.
|
|
771
|
+
*
|
|
772
|
+
* @param params - The operation parameters.
|
|
773
|
+
* @returns A cleanup function to remove the subscription.
|
|
774
|
+
*/
|
|
775
|
+
export type PerpsControllerSubscribeToAccountAction = {
|
|
776
|
+
type: `PerpsController:subscribeToAccount`;
|
|
777
|
+
handler: PerpsController['subscribeToAccount'];
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* Subscribe to full order book updates with multiple depth levels
|
|
781
|
+
* Creates a dedicated L2Book subscription for real-time order book data
|
|
782
|
+
*
|
|
783
|
+
* @param params - The operation parameters.
|
|
784
|
+
* @returns A cleanup function to remove the subscription.
|
|
785
|
+
*/
|
|
786
|
+
export type PerpsControllerSubscribeToOrderBookAction = {
|
|
787
|
+
type: `PerpsController:subscribeToOrderBook`;
|
|
788
|
+
handler: PerpsController['subscribeToOrderBook'];
|
|
789
|
+
};
|
|
790
|
+
/**
|
|
791
|
+
* Subscribe to live candle updates
|
|
792
|
+
*
|
|
793
|
+
* @param params - The operation parameters.
|
|
794
|
+
* @returns A cleanup function to remove the subscription.
|
|
795
|
+
*/
|
|
796
|
+
export type PerpsControllerSubscribeToCandlesAction = {
|
|
797
|
+
type: `PerpsController:subscribeToCandles`;
|
|
798
|
+
handler: PerpsController['subscribeToCandles'];
|
|
799
|
+
};
|
|
800
|
+
/**
|
|
801
|
+
* Subscribe to open interest cap updates
|
|
802
|
+
* Zero additional network overhead - data comes from existing webData3 subscription
|
|
803
|
+
*
|
|
804
|
+
* @param params - The operation parameters.
|
|
805
|
+
* @returns A cleanup function to remove the subscription.
|
|
806
|
+
*/
|
|
807
|
+
export type PerpsControllerSubscribeToOICapsAction = {
|
|
808
|
+
type: `PerpsController:subscribeToOICaps`;
|
|
809
|
+
handler: PerpsController['subscribeToOICaps'];
|
|
810
|
+
};
|
|
811
|
+
/**
|
|
812
|
+
* Configure live data throttling
|
|
813
|
+
*
|
|
814
|
+
* @param config - The configuration object.
|
|
815
|
+
*/
|
|
816
|
+
export type PerpsControllerSetLiveDataConfigAction = {
|
|
817
|
+
type: `PerpsController:setLiveDataConfig`;
|
|
818
|
+
handler: PerpsController['setLiveDataConfig'];
|
|
819
|
+
};
|
|
820
|
+
/**
|
|
821
|
+
* Calculate trading fees through the active provider route.
|
|
822
|
+
* Each provider owns its fee policy. An explicit provider route overrides
|
|
823
|
+
* the active/default provider used by placement.
|
|
824
|
+
*
|
|
825
|
+
* @param params - The operation parameters.
|
|
826
|
+
* @returns The fee calculation result for the trade.
|
|
827
|
+
*/
|
|
828
|
+
export type PerpsControllerCalculateFeesAction = {
|
|
829
|
+
type: `PerpsController:calculateFees`;
|
|
830
|
+
handler: PerpsController['calculateFees'];
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* Approve the dedicated subscription builder outside order submission.
|
|
834
|
+
* Until this succeeds, subscription waivers fall back to the ordinary
|
|
835
|
+
* builder at the standard fee.
|
|
836
|
+
*
|
|
837
|
+
* @returns Whether the subscription builder is approved.
|
|
838
|
+
*/
|
|
839
|
+
export type PerpsControllerApproveSubscriptionBuilderFeeAction = {
|
|
840
|
+
type: `PerpsController:approveSubscriptionBuilderFee`;
|
|
841
|
+
handler: PerpsController['approveSubscriptionBuilderFee'];
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* Drop the cached subscription benefits snapshot.
|
|
845
|
+
*
|
|
846
|
+
* Call this when the identity behind the benefits changes — sign-out, or a
|
|
847
|
+
* profile switch. The snapshot carries no profile identity of its own, so
|
|
848
|
+
* without this it keeps answering for the previous profile until the next
|
|
849
|
+
* successful refresh. The next fee resolution reports the waiver as
|
|
850
|
+
* unavailable, so it is withheld until preview or lifecycle hydration.
|
|
851
|
+
*/
|
|
852
|
+
export type PerpsControllerInvalidateSubscriptionBenefitsAction = {
|
|
853
|
+
type: `PerpsController:invalidateSubscriptionBenefits`;
|
|
854
|
+
handler: PerpsController['invalidateSubscriptionBenefits'];
|
|
855
|
+
};
|
|
856
|
+
/**
|
|
857
|
+
* Disconnect provider and cleanup subscriptions
|
|
858
|
+
* Call this when navigating away from Perps screens to prevent battery drain
|
|
859
|
+
*/
|
|
860
|
+
export type PerpsControllerDisconnectAction = {
|
|
861
|
+
type: `PerpsController:disconnect`;
|
|
862
|
+
handler: PerpsController['disconnect'];
|
|
863
|
+
};
|
|
864
|
+
/**
|
|
865
|
+
* Resume eligibility monitoring after onboarding completes.
|
|
866
|
+
* Clears the deferred flag and triggers an immediate eligibility check
|
|
867
|
+
* using the current remote feature flag state.
|
|
868
|
+
*/
|
|
869
|
+
export type PerpsControllerStartEligibilityMonitoringAction = {
|
|
870
|
+
type: `PerpsController:startEligibilityMonitoring`;
|
|
871
|
+
handler: PerpsController['startEligibilityMonitoring'];
|
|
872
|
+
};
|
|
873
|
+
/**
|
|
874
|
+
* Stops geo-blocking eligibility monitoring.
|
|
875
|
+
* Call this when the user disables basic functionality (e.g. useExternalServices becomes false).
|
|
876
|
+
* Prevents geolocation calls until startEligibilityMonitoring() is called again.
|
|
877
|
+
* Safe to call multiple times.
|
|
878
|
+
*/
|
|
879
|
+
export type PerpsControllerStopEligibilityMonitoringAction = {
|
|
880
|
+
type: `PerpsController:stopEligibilityMonitoring`;
|
|
881
|
+
handler: PerpsController['stopEligibilityMonitoring'];
|
|
882
|
+
};
|
|
883
|
+
export type PerpsControllerRefreshEligibilityAction = {
|
|
884
|
+
type: `PerpsController:refreshEligibility`;
|
|
885
|
+
handler: PerpsController['refreshEligibility'];
|
|
886
|
+
};
|
|
887
|
+
/**
|
|
888
|
+
* Get block explorer URL for an address or just the base URL
|
|
889
|
+
*
|
|
890
|
+
* @param address - Optional address to append to the base URL
|
|
891
|
+
* @returns Block explorer URL
|
|
892
|
+
*/
|
|
893
|
+
export type PerpsControllerGetBlockExplorerUrlAction = {
|
|
894
|
+
type: `PerpsController:getBlockExplorerUrl`;
|
|
895
|
+
handler: PerpsController['getBlockExplorerUrl'];
|
|
896
|
+
};
|
|
897
|
+
/**
|
|
898
|
+
* Check if user is first-time for the current network
|
|
899
|
+
*
|
|
900
|
+
* @returns True if the condition is met.
|
|
901
|
+
*/
|
|
902
|
+
export type PerpsControllerIsFirstTimeUserOnCurrentNetworkAction = {
|
|
903
|
+
type: `PerpsController:isFirstTimeUserOnCurrentNetwork`;
|
|
904
|
+
handler: PerpsController['isFirstTimeUserOnCurrentNetwork'];
|
|
905
|
+
};
|
|
906
|
+
/**
|
|
907
|
+
* Mark that the user has completed the tutorial/onboarding
|
|
908
|
+
* This prevents the tutorial from showing again
|
|
909
|
+
*/
|
|
910
|
+
export type PerpsControllerMarkTutorialCompletedAction = {
|
|
911
|
+
type: `PerpsController:markTutorialCompleted`;
|
|
912
|
+
handler: PerpsController['markTutorialCompleted'];
|
|
913
|
+
};
|
|
914
|
+
export type PerpsControllerMarkFirstOrderCompletedAction = {
|
|
915
|
+
type: `PerpsController:markFirstOrderCompleted`;
|
|
916
|
+
handler: PerpsController['markFirstOrderCompleted'];
|
|
917
|
+
};
|
|
918
|
+
/**
|
|
919
|
+
* Reset first-time user state for both networks
|
|
920
|
+
* This is useful for testing the tutorial flow
|
|
921
|
+
* Called by Reset Account feature in settings
|
|
922
|
+
*/
|
|
923
|
+
export type PerpsControllerResetFirstTimeUserStateAction = {
|
|
924
|
+
type: `PerpsController:resetFirstTimeUserState`;
|
|
925
|
+
handler: PerpsController['resetFirstTimeUserState'];
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* Clear pending/bridging withdrawal and deposit requests
|
|
929
|
+
* This is useful when users want to clear stuck pending indicators
|
|
930
|
+
* Called by Reset Account feature in settings
|
|
931
|
+
*/
|
|
932
|
+
export type PerpsControllerClearPendingTransactionRequestsAction = {
|
|
933
|
+
type: `PerpsController:clearPendingTransactionRequests`;
|
|
934
|
+
handler: PerpsController['clearPendingTransactionRequests'];
|
|
935
|
+
};
|
|
936
|
+
/**
|
|
937
|
+
* Get saved trade configuration for a market
|
|
938
|
+
*
|
|
939
|
+
* @param symbol - The trading pair symbol.
|
|
940
|
+
* @returns The resulting string value.
|
|
941
|
+
*/
|
|
942
|
+
export type PerpsControllerGetTradeConfigurationAction = {
|
|
943
|
+
type: `PerpsController:getTradeConfiguration`;
|
|
944
|
+
handler: PerpsController['getTradeConfiguration'];
|
|
945
|
+
};
|
|
946
|
+
/**
|
|
947
|
+
* Save trade configuration for a market
|
|
948
|
+
*
|
|
949
|
+
* @param symbol - Market symbol
|
|
950
|
+
* @param leverage - Leverage value
|
|
951
|
+
*/
|
|
952
|
+
export type PerpsControllerSaveTradeConfigurationAction = {
|
|
953
|
+
type: `PerpsController:saveTradeConfiguration`;
|
|
954
|
+
handler: PerpsController['saveTradeConfiguration'];
|
|
955
|
+
};
|
|
956
|
+
/**
|
|
957
|
+
* Save pending trade configuration for a market
|
|
958
|
+
* This is a temporary configuration that expires after 30 seconds.
|
|
959
|
+
*
|
|
960
|
+
* @param symbol - Market symbol
|
|
961
|
+
* @param config - Pending trade configuration (includes optional selected payment token from Pay row)
|
|
962
|
+
* @param config.amount - The amount value.
|
|
963
|
+
* @param config.leverage - The leverage multiplier.
|
|
964
|
+
* @param config.takeProfitPrice - The take profit price.
|
|
965
|
+
* @param config.stopLossPrice - The stop loss price.
|
|
966
|
+
* @param config.limitPrice - The limit price.
|
|
967
|
+
* @param config.orderType - The order type.
|
|
968
|
+
* @param config.reduceOnly - Whether the order may only reduce a position.
|
|
969
|
+
* @param config.direction - Long or short.
|
|
970
|
+
* @param config.selectedPaymentToken - The selected payment token.
|
|
971
|
+
*/
|
|
972
|
+
export type PerpsControllerSavePendingTradeConfigurationAction = {
|
|
973
|
+
type: `PerpsController:savePendingTradeConfiguration`;
|
|
974
|
+
handler: PerpsController['savePendingTradeConfiguration'];
|
|
975
|
+
};
|
|
976
|
+
/**
|
|
977
|
+
* Get pending trade configuration for a market
|
|
978
|
+
* Returns undefined if config doesn't exist or has expired.
|
|
979
|
+
*
|
|
980
|
+
* @param symbol - Market symbol
|
|
981
|
+
* @returns Pending trade configuration or undefined
|
|
982
|
+
*/
|
|
983
|
+
export type PerpsControllerGetPendingTradeConfigurationAction = {
|
|
984
|
+
type: `PerpsController:getPendingTradeConfiguration`;
|
|
985
|
+
handler: PerpsController['getPendingTradeConfiguration'];
|
|
986
|
+
};
|
|
987
|
+
/**
|
|
988
|
+
* Clear pending trade configuration for a market
|
|
989
|
+
*
|
|
990
|
+
* @param symbol - Market symbol
|
|
991
|
+
*/
|
|
992
|
+
export type PerpsControllerClearPendingTradeConfigurationAction = {
|
|
993
|
+
type: `PerpsController:clearPendingTradeConfiguration`;
|
|
994
|
+
handler: PerpsController['clearPendingTradeConfiguration'];
|
|
995
|
+
};
|
|
996
|
+
/**
|
|
997
|
+
* Get saved market filter preferences
|
|
998
|
+
* Handles backward compatibility with legacy string format
|
|
999
|
+
*
|
|
1000
|
+
* @returns The saved sort option ID and direction.
|
|
1001
|
+
*/
|
|
1002
|
+
export type PerpsControllerGetMarketFilterPreferencesAction = {
|
|
1003
|
+
type: `PerpsController:getMarketFilterPreferences`;
|
|
1004
|
+
handler: PerpsController['getMarketFilterPreferences'];
|
|
1005
|
+
};
|
|
1006
|
+
/**
|
|
1007
|
+
* Save market filter preferences
|
|
1008
|
+
*
|
|
1009
|
+
* @param optionId - Sort/filter option ID
|
|
1010
|
+
* @param direction - Sort direction ('asc' or 'desc')
|
|
1011
|
+
*/
|
|
1012
|
+
export type PerpsControllerSaveMarketFilterPreferencesAction = {
|
|
1013
|
+
type: `PerpsController:saveMarketFilterPreferences`;
|
|
1014
|
+
handler: PerpsController['saveMarketFilterPreferences'];
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* Get the user's max slippage tolerance in basis points.
|
|
1018
|
+
*
|
|
1019
|
+
* @returns The configured max slippage bps, or undefined if never set (callers should default to 300 bps / 3%).
|
|
1020
|
+
*/
|
|
1021
|
+
export type PerpsControllerGetMaxSlippageAction = {
|
|
1022
|
+
type: `PerpsController:getMaxSlippage`;
|
|
1023
|
+
handler: PerpsController['getMaxSlippage'];
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* Set the user's max slippage tolerance in basis points.
|
|
1027
|
+
*
|
|
1028
|
+
* @param bps - Max slippage in basis points (e.g. 300 = 3%). Clamped to 10–1000, snapped to step of 10.
|
|
1029
|
+
*/
|
|
1030
|
+
export type PerpsControllerSetMaxSlippageAction = {
|
|
1031
|
+
type: `PerpsController:setMaxSlippage`;
|
|
1032
|
+
handler: PerpsController['setMaxSlippage'];
|
|
1033
|
+
};
|
|
1034
|
+
/**
|
|
1035
|
+
* Get market-agnostic Pro order-book display preferences.
|
|
1036
|
+
*
|
|
1037
|
+
* @returns The current order-book display preferences.
|
|
1038
|
+
*/
|
|
1039
|
+
export type PerpsControllerGetOrderBookPreferencesAction = {
|
|
1040
|
+
type: `PerpsController:getOrderBookPreferences`;
|
|
1041
|
+
handler: PerpsController['getOrderBookPreferences'];
|
|
1042
|
+
};
|
|
1043
|
+
/**
|
|
1044
|
+
* Update market-agnostic Pro order-book display preferences.
|
|
1045
|
+
*
|
|
1046
|
+
* @param patch - Partial order-book preferences to update.
|
|
1047
|
+
*/
|
|
1048
|
+
export type PerpsControllerSetOrderBookPreferencesAction = {
|
|
1049
|
+
type: `PerpsController:setOrderBookPreferences`;
|
|
1050
|
+
handler: PerpsController['setOrderBookPreferences'];
|
|
1051
|
+
};
|
|
1052
|
+
/**
|
|
1053
|
+
* Get the selected order type shared by every market.
|
|
1054
|
+
*
|
|
1055
|
+
* @returns The selected order type.
|
|
1056
|
+
*/
|
|
1057
|
+
export type PerpsControllerGetSelectedOrderTypeAction = {
|
|
1058
|
+
type: `PerpsController:getSelectedOrderType`;
|
|
1059
|
+
handler: PerpsController['getSelectedOrderType'];
|
|
1060
|
+
};
|
|
1061
|
+
/**
|
|
1062
|
+
* Set the selected order type shared by every market.
|
|
1063
|
+
*
|
|
1064
|
+
* @param orderType - The selected order type.
|
|
1065
|
+
*/
|
|
1066
|
+
export type PerpsControllerSetSelectedOrderTypeAction = {
|
|
1067
|
+
type: `PerpsController:setSelectedOrderType`;
|
|
1068
|
+
handler: PerpsController['setSelectedOrderType'];
|
|
1069
|
+
};
|
|
1070
|
+
/**
|
|
1071
|
+
* Get the number of candles shown in Lite and Pro chart viewports.
|
|
1072
|
+
*
|
|
1073
|
+
* @returns The visible candle count.
|
|
1074
|
+
*/
|
|
1075
|
+
export type PerpsControllerGetVisibleCandleCountAction = {
|
|
1076
|
+
type: `PerpsController:getVisibleCandleCount`;
|
|
1077
|
+
handler: PerpsController['getVisibleCandleCount'];
|
|
1078
|
+
};
|
|
1079
|
+
/**
|
|
1080
|
+
* Set the number of candles shown in Lite and Pro chart viewports.
|
|
1081
|
+
*
|
|
1082
|
+
* @param count - Requested visible candle count.
|
|
1083
|
+
*/
|
|
1084
|
+
export type PerpsControllerSetVisibleCandleCountAction = {
|
|
1085
|
+
type: `PerpsController:setVisibleCandleCount`;
|
|
1086
|
+
handler: PerpsController['setVisibleCandleCount'];
|
|
1087
|
+
};
|
|
1088
|
+
/**
|
|
1089
|
+
* Get the user's pro-mode layout preferences (network-independent).
|
|
1090
|
+
*
|
|
1091
|
+
* @returns The current pro-mode layout preferences.
|
|
1092
|
+
*/
|
|
1093
|
+
export type PerpsControllerGetProLayoutPreferencesAction = {
|
|
1094
|
+
type: `PerpsController:getProLayoutPreferences`;
|
|
1095
|
+
handler: PerpsController['getProLayoutPreferences'];
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Update the user's pro-mode layout preferences.
|
|
1099
|
+
*
|
|
1100
|
+
* Patch-style setter: only the provided fields are updated, the rest are
|
|
1101
|
+
* preserved. This keeps the signature stable as new layout fields are added.
|
|
1102
|
+
*
|
|
1103
|
+
* @param patch - Partial set of pro-mode layout preferences to update.
|
|
1104
|
+
*/
|
|
1105
|
+
export type PerpsControllerSetProLayoutPreferencesAction = {
|
|
1106
|
+
type: `PerpsController:setProLayoutPreferences`;
|
|
1107
|
+
handler: PerpsController['setProLayoutPreferences'];
|
|
1108
|
+
};
|
|
1109
|
+
/**
|
|
1110
|
+
* Set the Perps interface mode (lite/pro).
|
|
1111
|
+
*
|
|
1112
|
+
* @param mode - The mode to switch to.
|
|
1113
|
+
*/
|
|
1114
|
+
export type PerpsControllerSetPerpsModeAction = {
|
|
1115
|
+
type: `PerpsController:setPerpsMode`;
|
|
1116
|
+
handler: PerpsController['setPerpsMode'];
|
|
1117
|
+
};
|
|
1118
|
+
/**
|
|
1119
|
+
* Set the selected payment token for the Perps order/deposit flow.
|
|
1120
|
+
* Pass null or a token with description PERPS_CONSTANTS.PerpsBalanceTokenDescription to select Perps balance.
|
|
1121
|
+
* Only required fields (address, chainId) are stored in state; description and symbol are optional.
|
|
1122
|
+
*
|
|
1123
|
+
* @param token - The token identifier.
|
|
1124
|
+
*/
|
|
1125
|
+
export type PerpsControllerSetSelectedPaymentTokenAction = {
|
|
1126
|
+
type: `PerpsController:setSelectedPaymentToken`;
|
|
1127
|
+
handler: PerpsController['setSelectedPaymentToken'];
|
|
1128
|
+
};
|
|
1129
|
+
/**
|
|
1130
|
+
* Reset the selected payment token to Perps balance (null).
|
|
1131
|
+
* Call when leaving the Perps order view so the next visit defaults to Perps balance.
|
|
1132
|
+
*/
|
|
1133
|
+
export type PerpsControllerResetSelectedPaymentTokenAction = {
|
|
1134
|
+
type: `PerpsController:resetSelectedPaymentToken`;
|
|
1135
|
+
handler: PerpsController['resetSelectedPaymentToken'];
|
|
1136
|
+
};
|
|
1137
|
+
/**
|
|
1138
|
+
* Get saved order book grouping for a market
|
|
1139
|
+
*
|
|
1140
|
+
* @param symbol - Market symbol
|
|
1141
|
+
* @returns The saved grouping value or undefined if not set
|
|
1142
|
+
*/
|
|
1143
|
+
export type PerpsControllerGetOrderBookGroupingAction = {
|
|
1144
|
+
type: `PerpsController:getOrderBookGrouping`;
|
|
1145
|
+
handler: PerpsController['getOrderBookGrouping'];
|
|
1146
|
+
};
|
|
1147
|
+
/**
|
|
1148
|
+
* Save order book grouping for a market
|
|
1149
|
+
*
|
|
1150
|
+
* @param symbol - Market symbol
|
|
1151
|
+
* @param grouping - Price grouping value
|
|
1152
|
+
*/
|
|
1153
|
+
export type PerpsControllerSaveOrderBookGroupingAction = {
|
|
1154
|
+
type: `PerpsController:saveOrderBookGrouping`;
|
|
1155
|
+
handler: PerpsController['saveOrderBookGrouping'];
|
|
1156
|
+
};
|
|
1157
|
+
/**
|
|
1158
|
+
* Toggle watchlist status for a market.
|
|
1159
|
+
*
|
|
1160
|
+
* Updates local state immediately (optimistic UI) and then syncs the new
|
|
1161
|
+
* watchlist to AuthenticatedUserStorageService. If the remote write fails,
|
|
1162
|
+
* the local state is reverted so it stays consistent with AUS.
|
|
1163
|
+
*
|
|
1164
|
+
* When the user is unauthenticated, or the active provider is not yet
|
|
1165
|
+
* supported by the AUS schema, the controller continues operating with
|
|
1166
|
+
* local-persisted state only — no error is surfaced to the caller.
|
|
1167
|
+
*
|
|
1168
|
+
* Watchlist markets are stored per network (testnet/mainnet).
|
|
1169
|
+
*
|
|
1170
|
+
* @param symbol - The trading pair symbol.
|
|
1171
|
+
*/
|
|
1172
|
+
export type PerpsControllerToggleWatchlistMarketAction = {
|
|
1173
|
+
type: `PerpsController:toggleWatchlistMarket`;
|
|
1174
|
+
handler: PerpsController['toggleWatchlistMarket'];
|
|
1175
|
+
};
|
|
1176
|
+
/**
|
|
1177
|
+
* Check if a market is in the watchlist on the current network
|
|
1178
|
+
*
|
|
1179
|
+
* @param symbol - The trading pair symbol.
|
|
1180
|
+
* @returns True if the condition is met.
|
|
1181
|
+
*/
|
|
1182
|
+
export type PerpsControllerIsWatchlistMarketAction = {
|
|
1183
|
+
type: `PerpsController:isWatchlistMarket`;
|
|
1184
|
+
handler: PerpsController['isWatchlistMarket'];
|
|
1185
|
+
};
|
|
1186
|
+
/**
|
|
1187
|
+
* Get all watchlist markets for the current network
|
|
1188
|
+
*
|
|
1189
|
+
* @returns The resulting string value.
|
|
1190
|
+
*/
|
|
1191
|
+
export type PerpsControllerGetWatchlistMarketsAction = {
|
|
1192
|
+
type: `PerpsController:getWatchlistMarkets`;
|
|
1193
|
+
handler: PerpsController['getWatchlistMarkets'];
|
|
1194
|
+
};
|
|
1195
|
+
/**
|
|
1196
|
+
* Record that the user viewed a market.
|
|
1197
|
+
*
|
|
1198
|
+
* The symbol is prepended to the per-network recently-viewed list (newest-first).
|
|
1199
|
+
* Any existing entry for the same symbol is removed first so there are no
|
|
1200
|
+
* duplicates. The list is then capped at PERPS_CONSTANTS.RecentlyViewedMarketsLimit.
|
|
1201
|
+
*
|
|
1202
|
+
* @param symbol - The trading pair symbol (e.g. 'BTC', 'ETH', 'xyz:TSLA').
|
|
1203
|
+
*/
|
|
1204
|
+
export type PerpsControllerRecordMarketViewedAction = {
|
|
1205
|
+
type: `PerpsController:recordMarketViewed`;
|
|
1206
|
+
handler: PerpsController['recordMarketViewed'];
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* Get recently viewed markets for the current network.
|
|
1210
|
+
*
|
|
1211
|
+
* Returns up to PERPS_CONSTANTS.RecentlyViewedMarketsLimit symbols, ordered
|
|
1212
|
+
* newest-first, filtered to entries within the last
|
|
1213
|
+
* PERPS_CONSTANTS.RecentlyViewedMarketsTtlMs (24 hours). Returns an empty
|
|
1214
|
+
* array when no qualifying entries exist.
|
|
1215
|
+
*
|
|
1216
|
+
* @returns Ordered array of market symbols.
|
|
1217
|
+
*/
|
|
1218
|
+
export type PerpsControllerGetRecentlyViewedMarketsAction = {
|
|
1219
|
+
type: `PerpsController:getRecentlyViewedMarkets`;
|
|
1220
|
+
handler: PerpsController['getRecentlyViewedMarkets'];
|
|
1221
|
+
};
|
|
1222
|
+
/**
|
|
1223
|
+
* Check if the controller is currently reinitializing
|
|
1224
|
+
*
|
|
1225
|
+
* @returns true if providers are being reinitialized
|
|
1226
|
+
*/
|
|
1227
|
+
export type PerpsControllerIsCurrentlyReinitializingAction = {
|
|
1228
|
+
type: `PerpsController:isCurrentlyReinitializing`;
|
|
1229
|
+
handler: PerpsController['isCurrentlyReinitializing'];
|
|
1230
|
+
};
|
|
1231
|
+
/**
|
|
1232
|
+
* Union of all PerpsController action types.
|
|
1233
|
+
*/
|
|
1234
|
+
export type PerpsControllerMethodActions = PerpsControllerGetCachedMarketDataForActiveProviderAction | PerpsControllerGetCachedUserDataForActiveProviderAction | PerpsControllerGetUserDataSnapshotAction | PerpsControllerInitAction | PerpsControllerGetActiveProviderAction | PerpsControllerGetActiveProviderOrNullAction | PerpsControllerGetOrderCapabilitiesAction | PerpsControllerGetScalePriceLadderAction | PerpsControllerPlaceOrderAction | PerpsControllerEditOrderAction | PerpsControllerCancelOrderAction | PerpsControllerGetTwapOrdersAction | PerpsControllerGetChaseOrdersAction | PerpsControllerSuspendChaseOrdersAction | PerpsControllerCancelOrdersAction | PerpsControllerClosePositionAction | PerpsControllerClosePositionsAction | PerpsControllerUpdatePositionTPSLAction | PerpsControllerUpdateMarginAction | PerpsControllerFlipPositionAction | PerpsControllerDepositWithConfirmationAction | PerpsControllerDepositWithOrderAction | PerpsControllerClearDepositResultAction | PerpsControllerClearWithdrawResultAction | PerpsControllerUpdateWithdrawalStatusAction | PerpsControllerCompleteWithdrawalFromHistoryAction | PerpsControllerUpdateWithdrawalProgressAction | PerpsControllerGetWithdrawalProgressAction | PerpsControllerWithdrawAction | PerpsControllerGetPositionsAction | PerpsControllerGetOrderFillsAction | PerpsControllerGetPendingManualRecoveriesAction | PerpsControllerGetRecoveredDispatchesAction | PerpsControllerAcknowledgeRecoveredDispatchAction | PerpsControllerGetOrdersAction | PerpsControllerGetOpenOrdersAction | PerpsControllerGetFundingAction | PerpsControllerGetAccountStateAction | PerpsControllerGetHistoricalPortfolioAction | PerpsControllerGetMarketsAction | PerpsControllerGetMarketDataWithPricesAction | PerpsControllerStartMarketDataPreloadAction | PerpsControllerStopMarketDataPreloadAction | PerpsControllerGetAvailableDexsAction | PerpsControllerFetchHistoricalCandlesAction | PerpsControllerCalculateLiquidationPriceAction | PerpsControllerPreviewPositionModifyAction | PerpsControllerCalculateMaintenanceMarginAction | PerpsControllerGetMaxLeverageAction | PerpsControllerValidateOrderAction | PerpsControllerValidateClosePositionAction | PerpsControllerValidateWithdrawalAction | PerpsControllerGetWithdrawalRoutesAction | PerpsControllerSetAttributionContextAction | PerpsControllerGetAttributionContextAction | PerpsControllerClearAttributionContextAction | PerpsControllerToggleTestnetAction | PerpsControllerSwitchProviderAction | PerpsControllerGetCurrentNetworkAction | PerpsControllerGetMarketCategoriesAction | PerpsControllerGetWebSocketConnectionStateAction | PerpsControllerSubscribeToConnectionStateAction | PerpsControllerReconnectAction | PerpsControllerSubscribeToPricesAction | PerpsControllerSubscribeToPositionsAction | PerpsControllerSubscribeToOrderFillsAction | PerpsControllerSubscribeToTwapOrdersAction | PerpsControllerSubscribeToOrdersAction | PerpsControllerSubscribeToAccountAction | PerpsControllerSubscribeToOrderBookAction | PerpsControllerSubscribeToCandlesAction | PerpsControllerSubscribeToOICapsAction | PerpsControllerSetLiveDataConfigAction | PerpsControllerCalculateFeesAction | PerpsControllerApproveSubscriptionBuilderFeeAction | PerpsControllerInvalidateSubscriptionBenefitsAction | PerpsControllerDisconnectAction | PerpsControllerStartEligibilityMonitoringAction | PerpsControllerStopEligibilityMonitoringAction | PerpsControllerRefreshEligibilityAction | PerpsControllerGetBlockExplorerUrlAction | PerpsControllerIsFirstTimeUserOnCurrentNetworkAction | PerpsControllerMarkTutorialCompletedAction | PerpsControllerMarkFirstOrderCompletedAction | PerpsControllerResetFirstTimeUserStateAction | PerpsControllerClearPendingTransactionRequestsAction | PerpsControllerGetTradeConfigurationAction | PerpsControllerSaveTradeConfigurationAction | PerpsControllerSavePendingTradeConfigurationAction | PerpsControllerGetPendingTradeConfigurationAction | PerpsControllerClearPendingTradeConfigurationAction | PerpsControllerGetMarketFilterPreferencesAction | PerpsControllerSaveMarketFilterPreferencesAction | PerpsControllerGetMaxSlippageAction | PerpsControllerSetMaxSlippageAction | PerpsControllerGetOrderBookPreferencesAction | PerpsControllerSetOrderBookPreferencesAction | PerpsControllerGetSelectedOrderTypeAction | PerpsControllerSetSelectedOrderTypeAction | PerpsControllerGetVisibleCandleCountAction | PerpsControllerSetVisibleCandleCountAction | PerpsControllerGetProLayoutPreferencesAction | PerpsControllerSetProLayoutPreferencesAction | PerpsControllerSetPerpsModeAction | PerpsControllerSetSelectedPaymentTokenAction | PerpsControllerResetSelectedPaymentTokenAction | PerpsControllerGetOrderBookGroupingAction | PerpsControllerSaveOrderBookGroupingAction | PerpsControllerToggleWatchlistMarketAction | PerpsControllerIsWatchlistMarketAction | PerpsControllerGetWatchlistMarketsAction | PerpsControllerRecordMarketViewedAction | PerpsControllerGetRecentlyViewedMarketsAction | PerpsControllerIsCurrentlyReinitializingAction;
|
|
1235
|
+
//# sourceMappingURL=PerpsController-method-action-types.d.ts.map
|