@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hyperLiquidConfig.mjs","sourceRoot":"","sources":["../../src/constants/hyperLiquidConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,2BAA0B;AAenD,OAAO,EAAE,oBAAoB,EAAE,gCAA+B;AAC9D,OAAO,EAAE,eAAe,EAAE,0BAAyB;AAEnD,oBAAoB;AACpB,MAAM,CAAC,MAAM,6BAA6B,GAAG,QAAiB,CAAC;AAC/D,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AACjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,QAAQ,CAAC;AAClD,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,yBAAyB,EAAE,CAAC;AACpF,MAAM,CAAC,MAAM,8BAA8B,GAAG,UAAU,yBAAyB,EAAE,CAAC;AAEpF,8BAA8B;AAC9B,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC,CAAC,iBAAiB;AACtE,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC,CAAC,2BAA2B;AAChF,MAAM,CAAC,MAAM,iCAAiC,GAAG,YAA2B,CAAC;AAC7E,MAAM,CAAC,MAAM,iCAAiC,GAAG,YAA2B,CAAC;AAC7E,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAAuB;IAEvB,MAAM,eAAe,GAAG,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SAAS,EAAE,cAAc;IACzB,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAc,EACd,QAAgC,uBAAuB;IAEvD,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,WAAW,EAAE,CAAC,KAAK,CAAa;IAEhC;;;OAGG;IACH,eAAe,EAAE,KAAK;CACd,CAAC;AAEX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,eAAe,EAAE,KAAK;CACd,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;;;OAGG;IACH,gBAAgB,EAAE,KAAK;IAEvB;;;OAGG;IACH,sBAAsB,EAAE,GAAG;IAE3B;;;OAGG;IACH,qBAAqB,EAAE,GAAG;CAClB,CAAC;AAEX,yBAAyB;AACzB,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;CACvC,CAAC;AACF,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC","sourcesContent":["import type { CaipAssetId, CaipChainId, Hex } from '@metamask/utils';\n\nimport { MarketCategory } from '../types/index.js';\nimport type {\n DirectProviderOrderCapabilities,\n MarketType,\n} from '../types/index.js';\nimport type {\n HyperLiquidNetwork,\n HyperLiquidEndpoints,\n HyperLiquidAssetConfigs,\n BridgeContractConfig,\n HyperLiquidBridgeContracts,\n HyperLiquidTransportConfig,\n TradingDefaultsConfig,\n FeeRatesConfig,\n} from '../types/perps-types.js';\nimport { STRATEGY_ORDER_TYPES } from '../utils/orderTypes.js';\nimport { PROVIDER_CONFIG } from './perpsConfig.js';\n\n// Network constants\nexport const ARBITRUM_MAINNET_CHAIN_ID_HEX = '0xa4b1' as const;\nexport const ARBITRUM_MAINNET_CHAIN_ID = '42161';\nexport const ARBITRUM_TESTNET_CHAIN_ID = '421614';\nexport const ARBITRUM_MAINNET_CAIP_CHAIN_ID = `eip155:${ARBITRUM_MAINNET_CHAIN_ID}`;\nexport const ARBITRUM_TESTNET_CAIP_CHAIN_ID = `eip155:${ARBITRUM_TESTNET_CHAIN_ID}`;\n\n// Hyperliquid chain constants\nexport const HYPERLIQUID_MAINNET_CHAIN_ID = '0x3e7'; // 999 in decimal\nexport const HYPERLIQUID_TESTNET_CHAIN_ID = '0x3e6'; // 998 in decimal (assumed)\nexport const HYPERLIQUID_MAINNET_CAIP_CHAIN_ID = 'eip155:999' as CaipChainId;\nexport const HYPERLIQUID_TESTNET_CAIP_CHAIN_ID = 'eip155:998' as CaipChainId;\nexport const HYPERLIQUID_NETWORK_NAME = 'Hyperliquid';\n\n/**\n * Return the canonical snapshot identity: main first, then unique DEX ids.\n *\n * @param dexes - DEX identifiers to canonicalize.\n * @returns The canonical DEX identifiers.\n */\nexport function canonicalizeHyperLiquidDexes(\n dexes: Iterable<string>,\n): string[] {\n const additionalDexes = new Set(dexes);\n additionalDexes.delete('main');\n return ['main', ...Array.from(additionalDexes).sort()];\n}\n\n// Token constants\nexport const USDC_SYMBOL = 'USDC';\nexport const USDC_NAME = 'USD Coin';\nexport const USDC_DECIMALS = 6;\nexport const TOKEN_DECIMALS = 18;\n\n// Network constants\nexport const ARBITRUM_SEPOLIA_CHAIN_ID = '0x66eee'; // 421614 in decimal\n\n// USDC token addresses\nexport const USDC_ETHEREUM_MAINNET_ADDRESS =\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48';\nexport const USDC_ARBITRUM_MAINNET_ADDRESS =\n '0xaf88d065e77c8cC2239327C5EDb3A432268e5831';\nexport const USDC_ARBITRUM_TESTNET_ADDRESS =\n '0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d';\n\n// USDC token icon URL using MetaMask's official Token Icons API\n// Format: https://static.cx.metamask.io/api/v1/tokenIcons/{chainId}/{contractAddress}.png\n// This URL follows the same pattern used throughout MetaMask (bridges, swaps, etc.)\nexport const USDC_TOKEN_ICON_URL = `https://static.cx.metamask.io/api/v1/tokenIcons/1/${USDC_ETHEREUM_MAINNET_ADDRESS}.png`;\n\n// WebSocket endpoints\nexport const HYPERLIQUID_ENDPOINTS: HyperLiquidEndpoints = {\n mainnet: 'wss://api.hyperliquid.xyz/ws',\n testnet: 'wss://api.hyperliquid-testnet.xyz/ws',\n};\n\n// Asset icons base URL (HyperLiquid CDN - fallback source)\nexport const HYPERLIQUID_ASSET_ICONS_BASE_URL =\n 'https://app.hyperliquid.xyz/coins/';\n\n// MetaMask-hosted Perps asset icons (primary source)\n// Assets uploaded to: https://github.com/MetaMask/contract-metadata/tree/master/icons/eip155:999\n// HIP-3 assets use format: hip3:dex_SYMBOL.svg (e.g., hip3:xyz_AAPL.svg)\n// Regular assets use format: SYMBOL.svg (e.g., BTC.svg)\nexport const METAMASK_PERPS_ICONS_BASE_URL =\n 'https://raw.githubusercontent.com/MetaMask/contract-metadata/master/icons/eip155:999/';\n\n// Asset configurations for multichain abstraction\nexport const HYPERLIQUID_ASSET_CONFIGS: HyperLiquidAssetConfigs = {\n usdc: {\n mainnet: `${ARBITRUM_MAINNET_CAIP_CHAIN_ID}/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831/default`,\n testnet: `${ARBITRUM_TESTNET_CAIP_CHAIN_ID}/erc20:0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d/default`,\n },\n};\n\n// HyperLiquid bridge contract addresses for direct USDC deposits\n// These are the official bridge contracts where USDC must be sent to credit user's HyperLiquid account\nexport const HYPERLIQUID_BRIDGE_CONTRACTS: HyperLiquidBridgeContracts = {\n mainnet: {\n chainId: ARBITRUM_MAINNET_CAIP_CHAIN_ID,\n contractAddress: '0x2df1c51e09aecf9cacb7bc98cb1742757f163df7',\n },\n testnet: {\n chainId: ARBITRUM_TESTNET_CAIP_CHAIN_ID,\n contractAddress: '0x08cfc1B6b2dCF36A1480b99353A354AA8AC56f89',\n },\n};\n\n// SDK transport configuration\nexport const HYPERLIQUID_TRANSPORT_CONFIG: HyperLiquidTransportConfig = {\n timeout: 10_000,\n keepAlive: { interval: 30_000 },\n reconnect: {\n maxRetries: 5,\n connectionTimeout: 10_000,\n },\n};\n\n// Trading configuration constants\nexport const TRADING_DEFAULTS: TradingDefaultsConfig = {\n leverage: 3, // 3x default leverage\n marginPercent: 10, // 10% fixed margin default\n takeProfitPercent: 0.3, // 30% take profit\n stopLossPercent: 0.1, // 10% stop loss\n amount: {\n mainnet: 10, // $10 minimum order size\n testnet: 10, // $10 minimum order size\n },\n};\n\n// Fee configuration\n// Note: These are base rates (Tier 0, no discounts)\n// Actual fees will be calculated based on user's volume tier and staking\nexport const FEE_RATES: FeeRatesConfig = {\n taker: 0.00045, // 0.045% - Market orders and aggressive limit orders\n maker: 0.00015, // 0.015% - Limit orders that add liquidity\n};\n\n/**\n * HIP-3 dynamic fee calculation configuration\n *\n * HIP-3 (builder-deployed) perpetual markets have variable fees based on:\n * 1. deployerFeeScale - Per-DEX fee multiplier (fetched from perpDexs API)\n * 2. growthMode - Per-asset 90% fee reduction (fetched from meta API)\n *\n * Fee Formula (from HyperLiquid docs):\n * - scaleIfHip3 = deployerFeeScale < 1 ? deployerFeeScale + 1 : deployerFeeScale * 2\n * - growthModeScale = growthMode ? 0.1 : 1\n * - finalRate = baseRate * scaleIfHip3 * growthModeScale\n *\n * Example: For xyz:TSLA with deployerFeeScale=1.0 and growthMode=\"enabled\":\n * - scaleIfHip3 = 1.0 * 2 = 2.0\n * - growthModeScale = 0.1 (90% reduction)\n * - Final multiplier = 2.0 * 0.1 = 0.2 (effectively 80% off standard 2x HIP-3 fees)\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers\n * @see parseAssetName() in HyperLiquidProvider for HIP-3 asset detection\n */\nexport const HIP3_FEE_CONFIG = {\n /**\n * Growth Mode multiplier - 90% fee reduction for assets in growth phase\n * This is a protocol constant from HyperLiquid's fee formula\n */\n GrowthModeScale: 0.1,\n\n /**\n * Default deployerFeeScale when API is unavailable\n * Most HIP-3 DEXs use 1.0, which results in 2x base fees\n */\n DefaultDeployerFeeScale: 1.0,\n\n /**\n * Cache TTL for perpDexs data (5 minutes)\n * Fee scales rarely change, so longer cache is acceptable\n */\n PerpDexsCacheTtlMs: 5 * 60 * 1000,\n\n /**\n * @deprecated Use dynamic calculation via calculateHip3FeeMultiplier()\n * Kept for backwards compatibility during migration\n */\n FeeMultiplier: 2,\n} as const;\n\nconst BUILDER_FEE_MAX_FEE_DECIMAL = 0.001;\n\n// Builder fee configuration\nexport const BUILDER_FEE_CONFIG = {\n // Test builder wallet\n TestnetBuilder: '0x724e57771ba749650875bd8adb2e29a85d0cacfa' as Hex,\n // Production builder wallet\n MainnetBuilder: '0xe95a5e31904e005066614247d309e00d8ad753aa' as Hex,\n // Fee in decimal (10 bp = 0.1%)\n MaxFeeDecimal: BUILDER_FEE_MAX_FEE_DECIMAL,\n MaxFeeTenthsBps: BUILDER_FEE_MAX_FEE_DECIMAL * 100000,\n MaxFeeRate: `${(BUILDER_FEE_MAX_FEE_DECIMAL * 100)\n .toFixed(4)\n .replace(/\\.?0+$/u, '')}%`,\n};\n\n/**\n * Strategies that HyperLiquid can execute for its routed perp markets.\n * Providers own this declaration so clients never infer support from a\n * provider name.\n */\nexport const HYPERLIQUID_ORDER_CAPABILITIES = Object.freeze({\n status: 'ready',\n providerId: PROVIDER_CONFIG.DefaultProvider,\n supportedStrategies: Object.freeze([...STRATEGY_ORDER_TYPES]),\n}) satisfies DirectProviderOrderCapabilities;\n\n// Referral code configuration\nexport const REFERRAL_CONFIG = {\n // Production referral code\n MainnetCode: 'MMCSI',\n // Development/testnet referral code\n TestnetCode: 'MMCSITEST',\n};\n\n// Deposit constants\nexport const DEPOSIT_CONFIG = {\n EstimatedGasLimit: 100000, // Estimated gas limit for bridge deposit\n DefaultSlippage: 1, // 1% default slippage for bridge quotes\n BridgeQuoteTimeout: 1000, // 1 second timeout for bridge quotes\n RefreshRate: 30000, // 30 seconds quote refresh rate\n EstimatedTime: {\n DirectDeposit: '3-5 seconds', // Direct USDC deposit on Arbitrum\n SameChainSwap: '30-60 seconds', // Swap on same chain before deposit\n },\n};\n\n// Withdrawal constants (HyperLiquid-specific)\nexport const HYPERLIQUID_WITHDRAWAL_MINUTES = 5; // HyperLiquid withdrawal processing time in minutes\n\n// Type helpers\nexport type SupportedAsset = keyof typeof HYPERLIQUID_ASSET_CONFIGS;\n\n// Configuration helpers\nexport function getWebSocketEndpoint(isTestnet: boolean): string {\n return isTestnet\n ? HYPERLIQUID_ENDPOINTS.testnet\n : HYPERLIQUID_ENDPOINTS.mainnet;\n}\n\nexport function getChainId(isTestnet: boolean): string {\n return isTestnet ? ARBITRUM_TESTNET_CHAIN_ID : ARBITRUM_MAINNET_CHAIN_ID;\n}\n\nexport function getCaipChainId(isTestnet: boolean): CaipChainId {\n const network: HyperLiquidNetwork = isTestnet ? 'testnet' : 'mainnet';\n return HYPERLIQUID_BRIDGE_CONTRACTS[network].chainId;\n}\n\nexport function getBridgeInfo(isTestnet: boolean): BridgeContractConfig {\n const network: HyperLiquidNetwork = isTestnet ? 'testnet' : 'mainnet';\n return HYPERLIQUID_BRIDGE_CONTRACTS[network];\n}\n\nexport function getSupportedAssets(isTestnet?: boolean): CaipAssetId[] {\n const network = isTestnet ? 'testnet' : 'mainnet';\n return Object.values(HYPERLIQUID_ASSET_CONFIGS).map(\n (config) => config[network],\n );\n}\n\n// CAIP asset namespace constants\nexport const CAIP_ASSET_NAMESPACES = {\n Erc20: 'erc20',\n} as const;\n\n/**\n * HyperLiquid protocol-specific configuration\n * Contains constants specific to HyperLiquid's perps exchange\n */\nexport const HYPERLIQUID_CONFIG = {\n // Exchange name used in predicted funding data\n // HyperLiquid uses 'HlPerp' as their perps exchange identifier\n ExchangeName: 'HlPerp',\n // Maximum allowed deviation of the market (mid) price from the oracle (reference)\n // price before HyperLiquid rejects orders. HyperLiquid enforces \"Order price cannot\n // be more than 95% away from the reference price\", which makes markets — most often\n // HIP-3 builder-deployed ones — temporarily untradable when the mid price drifts past\n // this limit. Expressed as a decimal fraction (0.95 = 95%).\n // Protocol rule, not a UI warning threshold (see VALIDATION_THRESHOLDS.PriceDeviation).\n OraclePriceDeviationLimit: 0.95,\n} as const;\n\n/**\n * HIP-3 multi-DEX asset ID calculation constants\n * Per HIP-3-IMPLEMENTATION.md:\n * - Main DEX: assetId = index (0, 1, 2, ...)\n * - HIP-3 DEX: assetId = BASE_ASSET_ID + (perpDexIndex × DEX_MULTIPLIER) + index\n *\n * This formula enables proper order routing across multiple DEXs:\n * - Main DEX (perpDexIndex=0): Uses index directly (BTC=0, ETH=1, SOL=2, etc.)\n * - xyz DEX (perpDexIndex=1): 100000 + (1 × 10000) + index = 110000-110999\n * - abc DEX (perpDexIndex=2): 100000 + (2 × 10000) + index = 120000-120999\n *\n * Supports up to 10 HIP-3 DEXs with 10000 assets each.\n */\nexport const HIP3_ASSET_ID_CONFIG = {\n // Base offset for HIP-3 asset IDs (100000)\n // Ensures HIP-3 asset IDs don't conflict with main DEX indices\n BaseAssetId: 100000,\n\n // Multiplier for DEX index in asset ID calculation (10000)\n // Allocates 10000 asset ID slots per DEX (0-9999)\n DexMultiplier: 10000,\n} as const;\n\n/**\n * Basis points conversion constant\n * 1 basis point (bp) = 0.01% = 0.0001 as decimal\n * Used for fee discount calculations (e.g., 6500 bps = 65%)\n */\nexport const BASIS_POINTS_DIVISOR = 10000;\n\n/**\n * Offset added to spot market pair index to derive the spot asset ID\n * used in HyperLiquid order routing.\n * Per HyperLiquid protocol: spotAssetId = SPOT_ASSET_ID_OFFSET + pairIndex\n */\nexport const SPOT_ASSET_ID_OFFSET = 10000;\n\n/**\n * HIP-3 asset market type classifications (PRODUCTION DEFAULT)\n *\n * This is the production default configuration, can be overridden via feature flag\n * (remoteFeatureFlags.perpsAssetMarketTypes) for dynamic control.\n *\n * Maps asset symbols (e.g., \"xyz:TSLA\") to their market type for badge display.\n *\n * Market type determines the badge shown in the UI:\n * - 'stock': Individual stocks (TSLA, NVDA, AAPL, etc.)\n * - 'pre-ipo': Pre-IPO assets not yet publicly listed\n * - 'index': Market indices (SP500, JP225, VIX, etc.)\n * - 'etf': Exchange-traded funds (EWY, EWJ, USAR, etc.)\n * - 'commodity': Commodities (GOLD, SILVER, CL, etc.)\n * - 'forex': Forex pairs (EUR, JPY, DXY)\n * - 'crypto': Explicitly categorized crypto assets\n * - undefined: No badge for unmapped assets\n *\n * Format: 'dex:SYMBOL' → MarketType\n * This allows flexible per-asset classification.\n * Assets not listed here will have no market type (undefined).\n */\nexport const HIP3_ASSET_MARKET_TYPES: Record<string, MarketType> = {\n // xyz DEX - Stocks (US)\n 'xyz:TSLA': MarketCategory.Stock,\n 'xyz:NVDA': MarketCategory.Stock,\n 'xyz:INTC': MarketCategory.Stock,\n 'xyz:MU': MarketCategory.Stock,\n 'xyz:CRCL': MarketCategory.Stock,\n 'xyz:HOOD': MarketCategory.Stock,\n 'xyz:SNDK': MarketCategory.Stock,\n 'xyz:GOOGL': MarketCategory.Stock,\n 'xyz:COIN': MarketCategory.Stock,\n 'xyz:ORCL': MarketCategory.Stock,\n 'xyz:AMZN': MarketCategory.Stock,\n 'xyz:PLTR': MarketCategory.Stock,\n 'xyz:AAPL': MarketCategory.Stock,\n 'xyz:META': MarketCategory.Stock,\n 'xyz:AMD': MarketCategory.Stock,\n 'xyz:MSFT': MarketCategory.Stock,\n 'xyz:BABA': MarketCategory.Stock,\n 'xyz:RIVN': MarketCategory.Stock,\n 'xyz:NFLX': MarketCategory.Stock,\n 'xyz:COST': MarketCategory.Stock,\n 'xyz:LLY': MarketCategory.Stock,\n 'xyz:TSM': MarketCategory.Stock,\n 'xyz:MSTR': MarketCategory.Stock,\n 'xyz:CRWV': MarketCategory.Stock,\n 'xyz:GME': MarketCategory.Stock,\n 'xyz:HIMS': MarketCategory.Stock,\n 'xyz:USAR': MarketCategory.Stock,\n 'xyz:DKNG': MarketCategory.Stock,\n 'xyz:BIRD': MarketCategory.Stock,\n 'xyz:RKLB': MarketCategory.Stock,\n 'xyz:MRVL': MarketCategory.Stock,\n 'xyz:ZM': MarketCategory.Stock,\n 'xyz:EBAY': MarketCategory.Stock,\n 'xyz:PURRDAT': MarketCategory.Stock,\n 'xyz:ARM': MarketCategory.Stock,\n 'xyz:BX': MarketCategory.Stock,\n 'xyz:LITE': MarketCategory.Stock,\n 'xyz:CBRS': MarketCategory.Stock,\n 'xyz:SPCX': MarketCategory.Stock,\n\n // xyz DEX - Stocks (Korea)\n 'xyz:SKHX': MarketCategory.Stock,\n 'xyz:SMSN': MarketCategory.Stock,\n 'xyz:HYUNDAI': MarketCategory.Stock,\n\n // xyz DEX - Stocks (Japan)\n 'xyz:SOFTBANK': MarketCategory.Stock,\n 'xyz:KIOXIA': MarketCategory.Stock,\n\n // xyz DEX - Pre-IPO\n 'xyz:IPOP': MarketCategory.PreIpo,\n\n // xyz DEX - Indices\n 'xyz:SP500': MarketCategory.Index,\n 'xyz:XYZ100': MarketCategory.Index,\n 'xyz:JP225': MarketCategory.Index,\n 'xyz:KR200': MarketCategory.Index,\n 'xyz:VIX': MarketCategory.Index,\n\n // xyz DEX - ETFs\n 'xyz:EWY': MarketCategory.Etf,\n 'xyz:EWJ': MarketCategory.Etf,\n 'xyz:EWT': MarketCategory.Etf,\n 'xyz:EWZ': MarketCategory.Etf,\n 'xyz:URNM': MarketCategory.Etf,\n 'xyz:DRAM': MarketCategory.Etf,\n 'xyz:XLE': MarketCategory.Etf,\n\n // xyz DEX - Commodities\n 'xyz:GOLD': MarketCategory.Commodity,\n 'xyz:SILVER': MarketCategory.Commodity,\n 'xyz:CL': MarketCategory.Commodity,\n 'xyz:WTIOIL': MarketCategory.Commodity,\n 'xyz:COPPER': MarketCategory.Commodity,\n 'xyz:ALUMINIUM': MarketCategory.Commodity,\n 'xyz:URANIUM': MarketCategory.Commodity,\n 'xyz:NATGAS': MarketCategory.Commodity,\n 'xyz:PLATINUM': MarketCategory.Commodity,\n 'xyz:PALLADIUM': MarketCategory.Commodity,\n 'xyz:BRENTOIL': MarketCategory.Commodity,\n\n // xyz DEX - Forex\n 'xyz:EUR': MarketCategory.Forex,\n 'xyz:JPY': MarketCategory.Forex,\n 'xyz:GBP': MarketCategory.Forex,\n 'xyz:DXY': MarketCategory.Forex,\n};\n\n/**\n * Human-readable market names keyed by HyperLiquid asset symbol.\n *\n * HyperLiquid does NOT expose a human-readable name per market: the `meta`\n * universe only returns the ticker (`BTC`, `xyz:TSLA`), and `perpDexs` only\n * exposes a `fullName` for the DEX/venue, not the individual asset. This map is\n * therefore maintained client-side so that clients (mobile, extension) can:\n * - match markets by full name in search (\"Bitcoin\", \"Apple\", \"Gold\"), and\n * - display the full name alongside / instead of the ticker.\n *\n * Keys follow the same convention as {@link HIP3_ASSET_MARKET_TYPES}: bare\n * `SYMBOL` for main-DEX crypto and `dex:SYMBOL` for HIP-3 markets. Use\n * {@link getHyperLiquidAssetName} to resolve a name with a safe fallback to the\n * ticker for unmapped assets.\n *\n * This list is intentionally curated (not exhaustive): unmapped assets simply\n * fall back to their ticker, which matches prior behavior. Add entries as needed.\n */\nexport const HYPERLIQUID_ASSET_NAMES: Record<string, string> = {\n // Main DEX - Crypto majors\n BTC: 'Bitcoin',\n ETH: 'Ethereum',\n SOL: 'Solana',\n XRP: 'XRP',\n BNB: 'BNB',\n DOGE: 'Dogecoin',\n ADA: 'Cardano',\n AVAX: 'Avalanche',\n LINK: 'Chainlink',\n LTC: 'Litecoin',\n DOT: 'Polkadot',\n BCH: 'Bitcoin Cash',\n TRX: 'TRON',\n MATIC: 'Polygon',\n ARB: 'Arbitrum',\n OP: 'Optimism',\n SUI: 'Sui',\n APT: 'Aptos',\n ATOM: 'Cosmos',\n NEAR: 'NEAR Protocol',\n INJ: 'Injective',\n TIA: 'Celestia',\n SEI: 'Sei',\n UNI: 'Uniswap',\n AAVE: 'Aave',\n MKR: 'Maker',\n CRV: 'Curve DAO',\n LDO: 'Lido DAO',\n PEPE: 'Pepe',\n WIF: 'dogwifhat',\n BONK: 'Bonk',\n SHIB: 'Shiba Inu',\n ETC: 'Ethereum Classic',\n FIL: 'Filecoin',\n HBAR: 'Hedera',\n ICP: 'Internet Computer',\n STX: 'Stacks',\n RUNE: 'THORChain',\n TON: 'Toncoin',\n KAS: 'Kaspa',\n FET: 'Fetch.ai',\n ENA: 'Ethena',\n JUP: 'Jupiter',\n PYTH: 'Pyth Network',\n JTO: 'Jito',\n STRK: 'Starknet',\n BLUR: 'Blur',\n GMX: 'GMX',\n DYDX: 'dYdX',\n HYPE: 'Hyperliquid',\n\n // xyz DEX - Stocks (US)\n 'xyz:TSLA': 'Tesla',\n 'xyz:NVDA': 'NVIDIA',\n 'xyz:INTC': 'Intel',\n 'xyz:MU': 'Micron Technology',\n 'xyz:CRCL': 'Circle',\n 'xyz:HOOD': 'Robinhood',\n 'xyz:SNDK': 'SanDisk',\n 'xyz:GOOGL': 'Alphabet (Google)',\n 'xyz:COIN': 'Coinbase',\n 'xyz:ORCL': 'Oracle',\n 'xyz:AMZN': 'Amazon',\n 'xyz:PLTR': 'Palantir',\n 'xyz:AAPL': 'Apple',\n 'xyz:META': 'Meta Platforms',\n 'xyz:AMD': 'AMD',\n 'xyz:MSFT': 'Microsoft',\n 'xyz:BABA': 'Alibaba',\n 'xyz:RIVN': 'Rivian',\n 'xyz:NFLX': 'Netflix',\n 'xyz:COST': 'Costco',\n 'xyz:LLY': 'Eli Lilly',\n 'xyz:TSM': 'Taiwan Semiconductor',\n 'xyz:MSTR': 'Strategy (MicroStrategy)',\n 'xyz:CRWV': 'CoreWeave',\n 'xyz:GME': 'GameStop',\n 'xyz:HIMS': 'Hims & Hers',\n 'xyz:USAR': 'USA Rare Earth',\n 'xyz:DKNG': 'DraftKings',\n 'xyz:RKLB': 'Rocket Lab',\n 'xyz:MRVL': 'Marvell',\n 'xyz:ZM': 'Zoom',\n 'xyz:EBAY': 'eBay',\n 'xyz:ARM': 'Arm Holdings',\n 'xyz:BX': 'Blackstone',\n 'xyz:LITE': 'Lumentum',\n\n // xyz DEX - Stocks (Korea)\n 'xyz:SKHX': 'SK Hynix',\n 'xyz:SMSN': 'Samsung Electronics',\n 'xyz:HYUNDAI': 'Hyundai Motor',\n\n // xyz DEX - Stocks (Japan)\n 'xyz:SOFTBANK': 'SoftBank Group',\n 'xyz:KIOXIA': 'Kioxia',\n\n // xyz DEX - Pre-IPO\n 'xyz:SPCX': 'SpaceX',\n 'xyz:CBRS': 'Cerebras',\n 'xyz:IPOP': 'Quantinuum',\n\n // xyz DEX - Indices\n 'xyz:SP500': 'S&P 500',\n 'xyz:JP225': 'Nikkei 225',\n 'xyz:KR200': 'KOSPI 200',\n 'xyz:VIX': 'CBOE Volatility Index',\n\n // xyz DEX - ETFs\n 'xyz:EWY': 'iShares MSCI South Korea ETF',\n 'xyz:EWJ': 'iShares MSCI Japan ETF',\n 'xyz:EWT': 'iShares MSCI Taiwan ETF',\n 'xyz:EWZ': 'iShares MSCI Brazil ETF',\n 'xyz:URNM': 'Sprott Uranium Miners ETF',\n 'xyz:XLE': 'Energy Select Sector SPDR Fund',\n\n // xyz DEX - Commodities\n 'xyz:GOLD': 'Gold',\n 'xyz:SILVER': 'Silver',\n 'xyz:CL': 'Crude Oil',\n 'xyz:WTIOIL': 'WTI Crude Oil',\n 'xyz:COPPER': 'Copper',\n 'xyz:ALUMINIUM': 'Aluminium',\n 'xyz:URANIUM': 'Uranium',\n 'xyz:NATGAS': 'Natural Gas',\n 'xyz:PLATINUM': 'Platinum',\n 'xyz:PALLADIUM': 'Palladium',\n 'xyz:BRENTOIL': 'Brent Crude Oil',\n\n // xyz DEX - Forex\n 'xyz:EUR': 'Euro',\n 'xyz:JPY': 'Japanese Yen',\n 'xyz:GBP': 'British Pound',\n 'xyz:DXY': 'US Dollar Index',\n};\n\n/**\n * Resolve the human-readable name for a HyperLiquid market.\n *\n * Falls back to the ticker symbol when the asset is not present in\n * {@link HYPERLIQUID_ASSET_NAMES}, so callers always receive a displayable\n * string and unmapped assets keep their prior behavior.\n *\n * @param symbol - HyperLiquid asset symbol (bare `SYMBOL` for main-DEX crypto,\n * `dex:SYMBOL` for HIP-3 markets).\n * @param names - Name map to look up against (defaults to the bundled\n * {@link HYPERLIQUID_ASSET_NAMES}); injectable for testing/overrides.\n * @returns The human-readable name, or the symbol itself when unmapped.\n */\nexport function getHyperLiquidAssetName(\n symbol: string,\n names: Record<string, string> = HYPERLIQUID_ASSET_NAMES,\n): string {\n return names[symbol] ?? symbol;\n}\n\n/**\n * Testnet-specific HIP-3 DEX configuration\n *\n * On testnet, there are many HIP-3 DEXs (test deployments from various builders).\n * Subscribing to all of them causes connection/subscription overload and instability.\n * This configuration limits which DEXs are discovered and subscribed to on testnet.\n */\nexport const TESTNET_HIP3_CONFIG = {\n /**\n * Allowed DEX names for testnet\n * Empty array = main DEX only (no HIP-3 DEXs)\n * Add specific DEX names to test with particular HIP-3 DEXs: ['testdex1', 'testdex2']\n */\n EnabledDexs: ['xyz'] as string[],\n\n /**\n * Set to true to enable full HIP-3 discovery on testnet (not recommended)\n * When false, only DEXs in ENABLED_DEXS are used\n */\n AutoDiscoverAll: false,\n} as const;\n\n/**\n * Mainnet-specific HIP-3 DEX configuration\n *\n * On mainnet, DEX filtering is dynamically determined from the allowlist markets\n * feature flag. This avoids hardcoding DEX names and ensures consistency with\n * the market filtering logic.\n *\n * When AutoDiscoverAll is false and no allowlist is provided, only the main DEX is used.\n * When an allowlist is provided, DEXs are extracted from the allowlist patterns.\n */\nexport const MAINNET_HIP3_CONFIG = {\n /**\n * Set to true to enable full HIP-3 discovery on mainnet\n * When false, DEXs are filtered based on the allowlist markets feature flag\n * (recommended for production to reduce subscription overhead)\n */\n AutoDiscoverAll: false,\n} as const;\n\n/**\n * HIP-3 margin management configuration\n * Controls margin buffers and auto-rebalance behavior for HIP-3 DEXes with isolated margin\n *\n * Background: HyperLiquid validates spendableBalance >= totalRequiredMargin BEFORE reallocating\n * existing locked margin. This requires temporary over-funding when increasing positions,\n * followed by automatic cleanup to minimize locked capital.\n */\nexport const HIP3_MARGIN_CONFIG = {\n /**\n * Margin buffer multiplier for fees and slippage (0.3% = multiply by 1.003)\n * Covers HyperLiquid's max taker fee (0.035%) with comfortable margin\n */\n BufferMultiplier: 1.003,\n\n /**\n * Desired buffer to keep on HIP-3 DEX after auto-rebalance (USDC amount)\n * Small buffer allows quick follow-up orders without transfers\n */\n RebalanceDesiredBuffer: 0.1,\n\n /**\n * Minimum excess threshold to trigger auto-rebalance (USDC amount)\n * Prevents unnecessary transfers for tiny amounts\n */\n RebalanceMinThreshold: 0.1,\n} as const;\n\n// Progress bar constants\nexport const INITIAL_AMOUNT_UI_PROGRESS = 10;\nexport const WITHDRAWAL_PROGRESS_STAGES = [\n 25, 35, 45, 55, 65, 75, 85, 90, 95, 98,\n];\nexport const PROGRESS_BAR_COMPLETION_DELAY_MS = 500;\n"]}
|
package/dist/constants/index.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/**
|
|
18
|
-
* Barrel re-export for all portable constants in controllers/
|
|
19
|
-
*/
|
|
20
|
-
__exportStar(require("./chartConfig.cjs"), exports);
|
|
21
|
-
__exportStar(require("./eventNames.cjs"), exports);
|
|
22
|
-
__exportStar(require("./hyperLiquidConfig.cjs"), exports);
|
|
23
|
-
__exportStar(require("./orderTypes.cjs"), exports);
|
|
24
|
-
__exportStar(require("./perpsConfig.cjs"), exports);
|
|
25
|
-
__exportStar(require("./transactionsHistoryConfig.cjs"), exports);
|
|
26
|
-
__exportStar(require("./performanceMetrics.cjs"), exports);
|
|
27
|
-
__exportStar(require("./lighterConfig.cjs"), exports);
|
|
28
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,oDAAiC;AACjC,mDAAgC;AAChC,0DAAuC;AACvC,mDAAgC;AAChC,oDAAiC;AACjC,kEAA+C;AAC/C,2DAAwC;AACxC,sDAAmC","sourcesContent":["/**\n * Barrel re-export for all portable constants in controllers/\n */\nexport * from './chartConfig.js';\nexport * from './eventNames.js';\nexport * from './hyperLiquidConfig.js';\nexport * from './orderTypes.js';\nexport * from './perpsConfig.js';\nexport * from './transactionsHistoryConfig.js';\nexport * from './performanceMetrics.js';\nexport * from './lighterConfig.js';\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Barrel re-export for all portable constants in controllers/
|
|
3
|
-
*/
|
|
4
|
-
export * from "./chartConfig.cjs";
|
|
5
|
-
export * from "./eventNames.cjs";
|
|
6
|
-
export * from "./hyperLiquidConfig.cjs";
|
|
7
|
-
export * from "./orderTypes.cjs";
|
|
8
|
-
export * from "./perpsConfig.cjs";
|
|
9
|
-
export * from "./transactionsHistoryConfig.cjs";
|
|
10
|
-
export * from "./performanceMetrics.cjs";
|
|
11
|
-
export * from "./lighterConfig.cjs";
|
|
12
|
-
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,kCAAiC;AACjC,iCAAgC;AAChC,wCAAuC;AACvC,iCAAgC;AAChC,kCAAiC;AACjC,gDAA+C;AAC/C,yCAAwC;AACxC,oCAAmC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Barrel re-export for all portable constants in controllers/
|
|
3
|
-
*/
|
|
4
|
-
export * from "./chartConfig.mjs";
|
|
5
|
-
export * from "./eventNames.mjs";
|
|
6
|
-
export * from "./hyperLiquidConfig.mjs";
|
|
7
|
-
export * from "./orderTypes.mjs";
|
|
8
|
-
export * from "./perpsConfig.mjs";
|
|
9
|
-
export * from "./transactionsHistoryConfig.mjs";
|
|
10
|
-
export * from "./performanceMetrics.mjs";
|
|
11
|
-
export * from "./lighterConfig.mjs";
|
|
12
|
-
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,kCAAiC;AACjC,iCAAgC;AAChC,wCAAuC;AACvC,iCAAgC;AAChC,kCAAiC;AACjC,gDAA+C;AAC/C,yCAAwC;AACxC,oCAAmC"}
|
package/dist/constants/index.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Barrel re-export for all portable constants in controllers/
|
|
3
|
-
*/
|
|
4
|
-
export * from "./chartConfig.mjs";
|
|
5
|
-
export * from "./eventNames.mjs";
|
|
6
|
-
export * from "./hyperLiquidConfig.mjs";
|
|
7
|
-
export * from "./orderTypes.mjs";
|
|
8
|
-
export * from "./perpsConfig.mjs";
|
|
9
|
-
export * from "./transactionsHistoryConfig.mjs";
|
|
10
|
-
export * from "./performanceMetrics.mjs";
|
|
11
|
-
export * from "./lighterConfig.mjs";
|
|
12
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,kCAAiC;AACjC,iCAAgC;AAChC,wCAAuC;AACvC,iCAAgC;AAChC,kCAAiC;AACjC,gDAA+C;AAC/C,yCAAwC;AACxC,oCAAmC","sourcesContent":["/**\n * Barrel re-export for all portable constants in controllers/\n */\nexport * from './chartConfig.js';\nexport * from './eventNames.js';\nexport * from './hyperLiquidConfig.js';\nexport * from './orderTypes.js';\nexport * from './perpsConfig.js';\nexport * from './transactionsHistoryConfig.js';\nexport * from './performanceMetrics.js';\nexport * from './lighterConfig.js';\n"]}
|
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Lighter Protocol Configuration Constants
|
|
4
|
-
*
|
|
5
|
-
* Endpoints, chain ids, transaction type codes and signer defaults for the
|
|
6
|
-
* zkLighter integration. Values verified against the public API
|
|
7
|
-
* (https://apidocs.lighter.xyz) and lighter-python `endpoint_profiles.py`.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.LIGHTER_UNSUPPORTED_CAPABILITY_PREFIX = exports.LIGHTER_MARGIN_MODE_ISOLATED = exports.LIGHTER_MARGIN_MODE_CROSS = exports.LIGHTER_BRIDGE_CONFIG = exports.computeLighterMinOrderSize = exports.fromLighterInteger = exports.toLighterInteger = exports.parseLighterStrictDecimal = exports.LIGHTER_DATA_INTEGRITY_PREFIX = exports.LIGHTER_MARGIN_METADATA_TTL_MS = exports.LIGHTER_MAX_LEVERAGE = exports.LIGHTER_PRICE_POLLING_INTERVAL_MS = exports.LIGHTER_HTTP_TIMEOUT_MS = exports.LIGHTER_DEFAULT_API_KEY_INDEX = exports.LIGHTER_NO_TRIGGER_PRICE = exports.LIGHTER_ORDER_EXPIRY_NONE = exports.LIGHTER_TIME_IN_FORCE_POST_ONLY = exports.LIGHTER_TIME_IN_FORCE_GOOD_TILL_TIME = exports.LIGHTER_TIME_IN_FORCE_IMMEDIATE_OR_CANCEL = exports.LIGHTER_TX_TYPE_UPDATE_LEVERAGE = exports.LIGHTER_TX_TYPE_UPDATE_MARGIN = exports.LIGHTER_TX_TYPE_CREATE_GROUPED_ORDERS = exports.LIGHTER_GROUPING_ONE_CANCELS_THE_OTHER = exports.LIGHTER_ORDER_TYPE_TAKE_PROFIT = exports.LIGHTER_ORDER_TYPE_STOP_LOSS = exports.LIGHTER_ORDER_TYPE_MARKET = exports.LIGHTER_ORDER_TYPE_LIMIT = exports.getLighterTransactionOutcome = exports.LIGHTER_TRANSACTION_STATUS = exports.LIGHTER_TX_TYPE_CANCEL_ALL_ORDERS = exports.LIGHTER_TX_TYPE_CANCEL_ORDER = exports.LIGHTER_TX_TYPE_CREATE_ORDER = exports.LIGHTER_TX_TYPE_CHANGE_PUB_KEY = exports.LIGHTER_RESOLUTION_MS = exports.LIGHTER_SUPPORTED_RESOLUTIONS = exports.LIGHTER_USDC_ASSET_INDEX = exports.LIGHTER_TX_TYPE_MODIFY_ORDER = exports.LIGHTER_TX_TYPE_WITHDRAW = exports.getLighterWsEndpoint = exports.getLighterHttpEndpoint = exports.LIGHTER_ENDPOINTS = exports.getLighterChainId = exports.LIGHTER_TESTNET_CHAIN_ID = exports.LIGHTER_MAINNET_CHAIN_ID = void 0;
|
|
11
|
-
// ============================================================================
|
|
12
|
-
// Network Constants
|
|
13
|
-
// ============================================================================
|
|
14
|
-
/**
|
|
15
|
-
* zkLighter L2 chain ids (protocol-level, not EVM chain ids).
|
|
16
|
-
*/
|
|
17
|
-
exports.LIGHTER_MAINNET_CHAIN_ID = 304;
|
|
18
|
-
exports.LIGHTER_TESTNET_CHAIN_ID = 300;
|
|
19
|
-
/**
|
|
20
|
-
* Get the zkLighter chain id for a network.
|
|
21
|
-
*
|
|
22
|
-
* @param network - The Lighter network environment (mainnet or testnet).
|
|
23
|
-
* @returns The zkLighter chain id for the specified network.
|
|
24
|
-
*/
|
|
25
|
-
function getLighterChainId(network) {
|
|
26
|
-
return network === 'testnet'
|
|
27
|
-
? exports.LIGHTER_TESTNET_CHAIN_ID
|
|
28
|
-
: exports.LIGHTER_MAINNET_CHAIN_ID;
|
|
29
|
-
}
|
|
30
|
-
exports.getLighterChainId = getLighterChainId;
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// API Endpoints
|
|
33
|
-
// ============================================================================
|
|
34
|
-
/**
|
|
35
|
-
* Lighter REST and WebSocket endpoints
|
|
36
|
-
*/
|
|
37
|
-
exports.LIGHTER_ENDPOINTS = {
|
|
38
|
-
mainnet: {
|
|
39
|
-
http: 'https://mainnet.zklighter.elliot.ai',
|
|
40
|
-
ws: 'wss://mainnet.zklighter.elliot.ai/stream',
|
|
41
|
-
},
|
|
42
|
-
testnet: {
|
|
43
|
-
http: 'https://testnet.zklighter.elliot.ai',
|
|
44
|
-
ws: 'wss://testnet.zklighter.elliot.ai/stream',
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Get HTTP endpoint for a network.
|
|
49
|
-
*
|
|
50
|
-
* @param network - The Lighter network environment (mainnet or testnet).
|
|
51
|
-
* @returns The HTTP API base URL for the specified network.
|
|
52
|
-
*/
|
|
53
|
-
function getLighterHttpEndpoint(network) {
|
|
54
|
-
return exports.LIGHTER_ENDPOINTS[network].http;
|
|
55
|
-
}
|
|
56
|
-
exports.getLighterHttpEndpoint = getLighterHttpEndpoint;
|
|
57
|
-
/**
|
|
58
|
-
* Get the WebSocket stream endpoint for a network.
|
|
59
|
-
*
|
|
60
|
-
* @param network - The Lighter network environment (mainnet or testnet).
|
|
61
|
-
* @returns The WebSocket stream URL for the specified network.
|
|
62
|
-
*/
|
|
63
|
-
function getLighterWsEndpoint(network) {
|
|
64
|
-
return exports.LIGHTER_ENDPOINTS[network].ws;
|
|
65
|
-
}
|
|
66
|
-
exports.getLighterWsEndpoint = getLighterWsEndpoint;
|
|
67
|
-
/** L2 transaction type: Withdraw (funds exit to L1). */
|
|
68
|
-
exports.LIGHTER_TX_TYPE_WITHDRAW = 13;
|
|
69
|
-
/** L2 transaction type: ModifyOrder (reprice/resize a resting order). */
|
|
70
|
-
exports.LIGHTER_TX_TYPE_MODIFY_ORDER = 17;
|
|
71
|
-
/** USDC collateral asset index on zkLighter (asset indexing starts at 1). */
|
|
72
|
-
exports.LIGHTER_USDC_ASSET_INDEX = 1;
|
|
73
|
-
/**
|
|
74
|
-
* Candle resolutions Lighter serves natively (subset of CandlePeriod values).
|
|
75
|
-
*/
|
|
76
|
-
exports.LIGHTER_SUPPORTED_RESOLUTIONS = new Set([
|
|
77
|
-
'1m',
|
|
78
|
-
'5m',
|
|
79
|
-
'15m',
|
|
80
|
-
'30m',
|
|
81
|
-
'1h',
|
|
82
|
-
'4h',
|
|
83
|
-
'12h',
|
|
84
|
-
'1d',
|
|
85
|
-
]);
|
|
86
|
-
/**
|
|
87
|
-
* Millisecond span per supported resolution (range computation for candles).
|
|
88
|
-
*/
|
|
89
|
-
exports.LIGHTER_RESOLUTION_MS = {
|
|
90
|
-
'1m': 60000,
|
|
91
|
-
'5m': 300000,
|
|
92
|
-
'15m': 900000,
|
|
93
|
-
'30m': 1800000,
|
|
94
|
-
'1h': 3600000,
|
|
95
|
-
'4h': 14400000,
|
|
96
|
-
'12h': 43200000,
|
|
97
|
-
'1d': 86400000,
|
|
98
|
-
};
|
|
99
|
-
// ============================================================================
|
|
100
|
-
// L2 Transaction Types (types/txtypes/constants.go)
|
|
101
|
-
// ============================================================================
|
|
102
|
-
exports.LIGHTER_TX_TYPE_CHANGE_PUB_KEY = 8;
|
|
103
|
-
exports.LIGHTER_TX_TYPE_CREATE_ORDER = 14;
|
|
104
|
-
exports.LIGHTER_TX_TYPE_CANCEL_ORDER = 15;
|
|
105
|
-
exports.LIGHTER_TX_TYPE_CANCEL_ALL_ORDERS = 16;
|
|
106
|
-
/** Documented Lighter transaction status values. */
|
|
107
|
-
exports.LIGHTER_TRANSACTION_STATUS = {
|
|
108
|
-
Failed: 0,
|
|
109
|
-
Pending: 1,
|
|
110
|
-
Executed: 2,
|
|
111
|
-
PendingFinal: 3,
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Decode the venue transaction status without treating undocumented values
|
|
115
|
-
* as terminal.
|
|
116
|
-
*
|
|
117
|
-
* @param status - Raw status from the transaction endpoint.
|
|
118
|
-
* @returns The documented outcome, or null for an unknown value.
|
|
119
|
-
*/
|
|
120
|
-
function getLighterTransactionOutcome(status) {
|
|
121
|
-
switch (status) {
|
|
122
|
-
case exports.LIGHTER_TRANSACTION_STATUS.Failed:
|
|
123
|
-
return 'failed';
|
|
124
|
-
case exports.LIGHTER_TRANSACTION_STATUS.Pending:
|
|
125
|
-
return 'pending';
|
|
126
|
-
case exports.LIGHTER_TRANSACTION_STATUS.Executed:
|
|
127
|
-
return 'executed';
|
|
128
|
-
case exports.LIGHTER_TRANSACTION_STATUS.PendingFinal:
|
|
129
|
-
return 'pending-final';
|
|
130
|
-
default:
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
exports.getLighterTransactionOutcome = getLighterTransactionOutcome;
|
|
135
|
-
// ============================================================================
|
|
136
|
-
// Order enums (wire values expected by `_signCreateOrder`)
|
|
137
|
-
// ============================================================================
|
|
138
|
-
exports.LIGHTER_ORDER_TYPE_LIMIT = 0;
|
|
139
|
-
exports.LIGHTER_ORDER_TYPE_MARKET = 1;
|
|
140
|
-
exports.LIGHTER_ORDER_TYPE_STOP_LOSS = 2;
|
|
141
|
-
exports.LIGHTER_ORDER_TYPE_TAKE_PROFIT = 4;
|
|
142
|
-
/** Grouped-orders grouping type: one-cancels-the-other (OCO). */
|
|
143
|
-
exports.LIGHTER_GROUPING_ONE_CANCELS_THE_OTHER = 2;
|
|
144
|
-
/** L2 transaction type: CreateGroupedOrders (e.g. OCO TP/SL pairs). */
|
|
145
|
-
exports.LIGHTER_TX_TYPE_CREATE_GROUPED_ORDERS = 28;
|
|
146
|
-
/** L2 transaction type: UpdateMargin (isolated margin add/remove). */
|
|
147
|
-
exports.LIGHTER_TX_TYPE_UPDATE_MARGIN = 29;
|
|
148
|
-
/** L2 transaction type: UpdateLeverage (per-market IMF + margin mode). */
|
|
149
|
-
exports.LIGHTER_TX_TYPE_UPDATE_LEVERAGE = 20;
|
|
150
|
-
exports.LIGHTER_TIME_IN_FORCE_IMMEDIATE_OR_CANCEL = 0;
|
|
151
|
-
exports.LIGHTER_TIME_IN_FORCE_GOOD_TILL_TIME = 1;
|
|
152
|
-
exports.LIGHTER_TIME_IN_FORCE_POST_ONLY = 2;
|
|
153
|
-
/** Sentinel for "no expiry" on GTT orders (per lighter SDKs). */
|
|
154
|
-
exports.LIGHTER_ORDER_EXPIRY_NONE = -1;
|
|
155
|
-
/** Sentinel for "no trigger price". */
|
|
156
|
-
exports.LIGHTER_NO_TRIGGER_PRICE = 0;
|
|
157
|
-
// ============================================================================
|
|
158
|
-
// Signer / key derivation
|
|
159
|
-
// ============================================================================
|
|
160
|
-
/**
|
|
161
|
-
* Default API key slot used by the MetaMask integration.
|
|
162
|
-
* Slots 0-2 are commonly used by Lighter's own frontends; a dedicated
|
|
163
|
-
* slot avoids clobbering keys registered by other clients.
|
|
164
|
-
*/
|
|
165
|
-
exports.LIGHTER_DEFAULT_API_KEY_INDEX = 7;
|
|
166
|
-
// ============================================================================
|
|
167
|
-
// REST API Configuration
|
|
168
|
-
// ============================================================================
|
|
169
|
-
/**
|
|
170
|
-
* HTTP request timeout in milliseconds
|
|
171
|
-
*/
|
|
172
|
-
exports.LIGHTER_HTTP_TIMEOUT_MS = 10000;
|
|
173
|
-
/**
|
|
174
|
-
* Interval for polling REST prices (no WS subscription in the POC)
|
|
175
|
-
*/
|
|
176
|
-
exports.LIGHTER_PRICE_POLLING_INTERVAL_MS = 5000;
|
|
177
|
-
/**
|
|
178
|
-
* Maximum leverage placeholder until per-market margin fractions are wired.
|
|
179
|
-
*/
|
|
180
|
-
exports.LIGHTER_MAX_LEVERAGE = 50;
|
|
181
|
-
/**
|
|
182
|
-
* TTL for the authoritative per-market margin-metadata cache used by
|
|
183
|
-
* explicit leverage validation. Without expiry, metadata fetched once
|
|
184
|
-
* (e.g. an older, higher max) would keep validating later-overlimit
|
|
185
|
-
* leverage for the whole session; the venue cap remains the final
|
|
186
|
-
* enforcement either way.
|
|
187
|
-
*/
|
|
188
|
-
exports.LIGHTER_MARGIN_METADATA_TTL_MS = 60000;
|
|
189
|
-
/**
|
|
190
|
-
* Prefix marking venue-data integrity failures (malformed numeric fields
|
|
191
|
-
* in venue payloads). These must fail closed and surface — never degrade
|
|
192
|
-
* into silently-coerced values or empty reads.
|
|
193
|
-
*/
|
|
194
|
-
exports.LIGHTER_DATA_INTEGRITY_PREFIX = 'Invalid Lighter venue data:';
|
|
195
|
-
/** Full-string decimal/scientific literal (optional sign and exponent). */
|
|
196
|
-
const LIGHTER_STRICT_DECIMAL_PATTERN = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/u;
|
|
197
|
-
/**
|
|
198
|
-
* Parse a numeric string STRICTLY: the entire trimmed string must be a
|
|
199
|
-
* decimal/scientific literal. parseFloat prefix-parses, so '0.1oops'
|
|
200
|
-
* would silently become 0.1.
|
|
201
|
-
*
|
|
202
|
-
* Accepts unknown because venue REST payloads are type-cast without
|
|
203
|
-
* runtime validation: a missing/null/numeric field must yield null (for
|
|
204
|
-
* the caller's explicit error path), never a TypeError that generic
|
|
205
|
-
* catches misclassify as an ordinary read failure.
|
|
206
|
-
*
|
|
207
|
-
* Note: '1e999' matches the literal pattern and parses to Infinity —
|
|
208
|
-
* callers own the finiteness check.
|
|
209
|
-
*
|
|
210
|
-
* @param value - Raw value from params or a venue payload.
|
|
211
|
-
* @returns The parsed number, or null when the value is not a string
|
|
212
|
-
* containing a pure numeric literal.
|
|
213
|
-
*/
|
|
214
|
-
function parseLighterStrictDecimal(value) {
|
|
215
|
-
if (typeof value !== 'string') {
|
|
216
|
-
return null;
|
|
217
|
-
}
|
|
218
|
-
const trimmed = value.trim();
|
|
219
|
-
return LIGHTER_STRICT_DECIMAL_PATTERN.test(trimmed)
|
|
220
|
-
? parseFloat(trimmed)
|
|
221
|
-
: null;
|
|
222
|
-
}
|
|
223
|
-
exports.parseLighterStrictDecimal = parseLighterStrictDecimal;
|
|
224
|
-
// ============================================================================
|
|
225
|
-
// Size / price integerization
|
|
226
|
-
// ============================================================================
|
|
227
|
-
/**
|
|
228
|
-
* Convert a human-readable amount to the integer representation expected by
|
|
229
|
-
* the Lighter signer for a given number of supported decimals.
|
|
230
|
-
*
|
|
231
|
-
* @param value - Human-readable amount (e.g. 0.05 SOL, 187.25 USDC).
|
|
232
|
-
* @param decimals - `supportedSizeDecimals` / `supportedPriceDecimals`
|
|
233
|
-
* from the market metadata.
|
|
234
|
-
* @returns Integer wire value (e.g. 0.05 @ 5 decimals -> 5000).
|
|
235
|
-
*/
|
|
236
|
-
function toLighterInteger(value, decimals) {
|
|
237
|
-
const scaled = Math.round(value * 10 ** decimals);
|
|
238
|
-
// Fail closed on wire-format overflow: a huge-but-finite value scales to
|
|
239
|
-
// an unsafe integer (or Infinity) and would stringify as '1e+305' inside
|
|
240
|
-
// signer params.
|
|
241
|
-
if (!Number.isSafeInteger(scaled)) {
|
|
242
|
-
throw new Error(`Value ${value} is outside Lighter's integer range at ${decimals} decimals`);
|
|
243
|
-
}
|
|
244
|
-
// NOTE: this is a generic converter — zero and negative results are
|
|
245
|
-
// valid here. Positive-intent policy for signer-bound values lives in
|
|
246
|
-
// the provider's internal wire wrapper.
|
|
247
|
-
return scaled;
|
|
248
|
-
}
|
|
249
|
-
exports.toLighterInteger = toLighterInteger;
|
|
250
|
-
/**
|
|
251
|
-
* Convert an integer wire value back to a human-readable amount.
|
|
252
|
-
*
|
|
253
|
-
* @param value - Integer wire value.
|
|
254
|
-
* @param decimals - Supported decimals from the market metadata.
|
|
255
|
-
* @returns Human-readable amount.
|
|
256
|
-
*/
|
|
257
|
-
function fromLighterInteger(value, decimals) {
|
|
258
|
-
return value / 10 ** decimals;
|
|
259
|
-
}
|
|
260
|
-
exports.fromLighterInteger = fromLighterInteger;
|
|
261
|
-
/**
|
|
262
|
-
* Compute the minimum order base size for a market that satisfies both
|
|
263
|
-
* `minBaseAmount` and `minQuoteAmount` at a given price.
|
|
264
|
-
*
|
|
265
|
-
* @param market - Market metadata from `orderBooks`.
|
|
266
|
-
* @param price - Order price (human units).
|
|
267
|
-
* @returns Base size in human units, rounded up to the market's size step.
|
|
268
|
-
*/
|
|
269
|
-
function computeLighterMinOrderSize(market, price) {
|
|
270
|
-
const minBase = parseLighterStrictDecimal(market.minBaseAmount);
|
|
271
|
-
const minQuote = parseLighterStrictDecimal(market.minQuoteAmount);
|
|
272
|
-
if (minBase === null ||
|
|
273
|
-
!Number.isFinite(minBase) ||
|
|
274
|
-
minBase <= 0 ||
|
|
275
|
-
minQuote === null ||
|
|
276
|
-
!Number.isFinite(minQuote) ||
|
|
277
|
-
minQuote <= 0 ||
|
|
278
|
-
!Number.isFinite(price) ||
|
|
279
|
-
price <= 0 ||
|
|
280
|
-
!Number.isSafeInteger(market.supportedSizeDecimals) ||
|
|
281
|
-
market.supportedSizeDecimals < 0) {
|
|
282
|
-
throw new Error(`${exports.LIGHTER_DATA_INTEGRITY_PREFIX} invalid market minimum-size metadata`);
|
|
283
|
-
}
|
|
284
|
-
const step = 10 ** -market.supportedSizeDecimals;
|
|
285
|
-
const byQuote = minQuote / price;
|
|
286
|
-
const raw = Math.max(minBase, byQuote);
|
|
287
|
-
// Small epsilon guards against float artifacts (0.1 / 1e-5 = 10000.0000002)
|
|
288
|
-
// pushing the ceil one step too high.
|
|
289
|
-
const units = Math.ceil(raw / step - 1e-9);
|
|
290
|
-
return Number((units * step).toFixed(market.supportedSizeDecimals));
|
|
291
|
-
}
|
|
292
|
-
exports.computeLighterMinOrderSize = computeLighterMinOrderSize;
|
|
293
|
-
/**
|
|
294
|
-
* L1 bridge facts per network, as reported live by
|
|
295
|
-
* `GET /api/v1/layer1BasicInfo` (contract addresses) and the venue docs
|
|
296
|
-
* (minimums). Mainnet settles against Ethereum L1; testnet runs on a
|
|
297
|
-
* venue-hosted devnet L1 (chain id 123456), so its route is informational.
|
|
298
|
-
*/
|
|
299
|
-
exports.LIGHTER_BRIDGE_CONFIG = {
|
|
300
|
-
mainnet: {
|
|
301
|
-
/** CAIP-2 chain the bridge contract lives on (Ethereum mainnet). */
|
|
302
|
-
chainId: 'eip155:1',
|
|
303
|
-
/** ZkLighter L1 contract (deposits via `deposit`, selector 0x8a857083). */
|
|
304
|
-
bridgeContract: '0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7',
|
|
305
|
-
/** Canonical Ethereum USDC. */
|
|
306
|
-
usdcContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
307
|
-
/** Venue-documented USDC minimums. */
|
|
308
|
-
minDepositUsdc: '1',
|
|
309
|
-
minWithdrawUsdc: '1',
|
|
310
|
-
},
|
|
311
|
-
testnet: {
|
|
312
|
-
chainId: 'eip155:123456',
|
|
313
|
-
bridgeContract: '0xe034801BC49cCDC79FB683022dA0591C86077261',
|
|
314
|
-
usdcContract: '0x57382a12EC72eBb1e717b7BB76c78CdDAfE3A396',
|
|
315
|
-
minDepositUsdc: '1',
|
|
316
|
-
minWithdrawUsdc: '1',
|
|
317
|
-
},
|
|
318
|
-
};
|
|
319
|
-
/** UpdateLeverage margin-mode codes (types/txtypes constants). */
|
|
320
|
-
exports.LIGHTER_MARGIN_MODE_CROSS = 0;
|
|
321
|
-
exports.LIGHTER_MARGIN_MODE_ISOLATED = 1;
|
|
322
|
-
/**
|
|
323
|
-
* Marker prefix for capability-gate errors (unsupported account tier /
|
|
324
|
-
* unverified fee semantics). Callers use it to surface these explicitly
|
|
325
|
-
* instead of degrading them into empty state.
|
|
326
|
-
*/
|
|
327
|
-
exports.LIGHTER_UNSUPPORTED_CAPABILITY_PREFIX = 'Unsupported Lighter capability:';
|
|
328
|
-
//# sourceMappingURL=lighterConfig.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lighterConfig.cjs","sourceRoot":"","sources":["../../src/constants/lighterConfig.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAQH,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACU,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAC/B,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAE5C;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,OAAuB;IACvD,OAAO,OAAO,KAAK,SAAS;QAC1B,CAAC,CAAC,gCAAwB;QAC1B,CAAC,CAAC,gCAAwB,CAAC;AAC/B,CAAC;AAJD,8CAIC;AAED,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E;;GAEG;AACU,QAAA,iBAAiB,GAAqB;IACjD,OAAO,EAAE;QACP,IAAI,EAAE,qCAAqC;QAC3C,EAAE,EAAE,0CAA0C;KAC/C;IACD,OAAO,EAAE;QACP,IAAI,EAAE,qCAAqC;QAC3C,EAAE,EAAE,0CAA0C;KAC/C;CACF,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,OAAuB;IAC5D,OAAO,yBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;AACzC,CAAC;AAFD,wDAEC;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E,eAAe;QACxB,cAAc,EAAE,4CAA4C;QAC5D,YAAY,EAAE,4CAA4C;QAC1D,cAAc,EAAE,GAAG;QACnB,eAAe,EAAE,GAAG;KACrB;CACO,CAAC;AAEX,kEAAkE;AACrD,QAAA,yBAAyB,GAAG,CAAC,CAAC;AAC9B,QAAA,4BAA4B,GAAG,CAAC,CAAC;AAE9C;;;;GAIG;AACU,QAAA,qCAAqC,GAChD,iCAAiC,CAAC","sourcesContent":["/**\n * Lighter Protocol Configuration Constants\n *\n * Endpoints, chain ids, transaction type codes and signer defaults for the\n * zkLighter integration. Values verified against the public API\n * (https://apidocs.lighter.xyz) and lighter-python `endpoint_profiles.py`.\n */\n\nimport type {\n LighterEndpoints,\n LighterNetwork,\n LighterOrderBookMeta,\n} from '../types/lighter-types.js';\n\n// ============================================================================\n// Network Constants\n// ============================================================================\n\n/**\n * zkLighter L2 chain ids (protocol-level, not EVM chain ids).\n */\nexport const LIGHTER_MAINNET_CHAIN_ID = 304;\nexport const LIGHTER_TESTNET_CHAIN_ID = 300;\n\n/**\n * Get the zkLighter chain id for a network.\n *\n * @param network - The Lighter network environment (mainnet or testnet).\n * @returns The zkLighter chain id for the specified network.\n */\nexport function getLighterChainId(network: LighterNetwork): number {\n return network === 'testnet'\n ? LIGHTER_TESTNET_CHAIN_ID\n : LIGHTER_MAINNET_CHAIN_ID;\n}\n\n// ============================================================================\n// API Endpoints\n// ============================================================================\n\n/**\n * Lighter REST and WebSocket endpoints\n */\nexport const LIGHTER_ENDPOINTS: LighterEndpoints = {\n mainnet: {\n http: 'https://mainnet.zklighter.elliot.ai',\n ws: 'wss://mainnet.zklighter.elliot.ai/stream',\n },\n testnet: {\n http: 'https://testnet.zklighter.elliot.ai',\n ws: 'wss://testnet.zklighter.elliot.ai/stream',\n },\n};\n\n/**\n * Get HTTP endpoint for a network.\n *\n * @param network - The Lighter network environment (mainnet or testnet).\n * @returns The HTTP API base URL for the specified network.\n */\nexport function getLighterHttpEndpoint(network: LighterNetwork): string {\n return LIGHTER_ENDPOINTS[network].http;\n}\n\n/**\n * Get the WebSocket stream endpoint for a network.\n *\n * @param network - The Lighter network environment (mainnet or testnet).\n * @returns The WebSocket stream URL for the specified network.\n */\nexport function getLighterWsEndpoint(network: LighterNetwork): string {\n return LIGHTER_ENDPOINTS[network].ws;\n}\n\n/** L2 transaction type: Withdraw (funds exit to L1). */\nexport const LIGHTER_TX_TYPE_WITHDRAW = 13;\n\n/** L2 transaction type: ModifyOrder (reprice/resize a resting order). */\nexport const LIGHTER_TX_TYPE_MODIFY_ORDER = 17;\n\n/** USDC collateral asset index on zkLighter (asset indexing starts at 1). */\nexport const LIGHTER_USDC_ASSET_INDEX = 1;\n\n/**\n * Candle resolutions Lighter serves natively (subset of CandlePeriod values).\n */\nexport const LIGHTER_SUPPORTED_RESOLUTIONS: ReadonlySet<string> = new Set([\n '1m',\n '5m',\n '15m',\n '30m',\n '1h',\n '4h',\n '12h',\n '1d',\n]);\n\n/**\n * Millisecond span per supported resolution (range computation for candles).\n */\nexport const LIGHTER_RESOLUTION_MS: Record<string, number> = {\n '1m': 60_000,\n '5m': 300_000,\n '15m': 900_000,\n '30m': 1_800_000,\n '1h': 3_600_000,\n '4h': 14_400_000,\n '12h': 43_200_000,\n '1d': 86_400_000,\n};\n\n// ============================================================================\n// L2 Transaction Types (types/txtypes/constants.go)\n// ============================================================================\n\nexport const LIGHTER_TX_TYPE_CHANGE_PUB_KEY = 8;\nexport const LIGHTER_TX_TYPE_CREATE_ORDER = 14;\nexport const LIGHTER_TX_TYPE_CANCEL_ORDER = 15;\nexport const LIGHTER_TX_TYPE_CANCEL_ALL_ORDERS = 16;\n\n/** Documented Lighter transaction status values. */\nexport const LIGHTER_TRANSACTION_STATUS = {\n Failed: 0,\n Pending: 1,\n Executed: 2,\n PendingFinal: 3,\n} as const;\n\nexport type LighterTransactionOutcome =\n | 'failed'\n | 'pending'\n | 'executed'\n | 'pending-final';\n\n/**\n * Decode the venue transaction status without treating undocumented values\n * as terminal.\n *\n * @param status - Raw status from the transaction endpoint.\n * @returns The documented outcome, or null for an unknown value.\n */\nexport function getLighterTransactionOutcome(\n status: unknown,\n): LighterTransactionOutcome | null {\n switch (status) {\n case LIGHTER_TRANSACTION_STATUS.Failed:\n return 'failed';\n case LIGHTER_TRANSACTION_STATUS.Pending:\n return 'pending';\n case LIGHTER_TRANSACTION_STATUS.Executed:\n return 'executed';\n case LIGHTER_TRANSACTION_STATUS.PendingFinal:\n return 'pending-final';\n default:\n return null;\n }\n}\n\n// ============================================================================\n// Order enums (wire values expected by `_signCreateOrder`)\n// ============================================================================\n\nexport const LIGHTER_ORDER_TYPE_LIMIT = 0;\nexport const LIGHTER_ORDER_TYPE_MARKET = 1;\nexport const LIGHTER_ORDER_TYPE_STOP_LOSS = 2;\nexport const LIGHTER_ORDER_TYPE_TAKE_PROFIT = 4;\n\n/** Grouped-orders grouping type: one-cancels-the-other (OCO). */\nexport const LIGHTER_GROUPING_ONE_CANCELS_THE_OTHER = 2;\n\n/** L2 transaction type: CreateGroupedOrders (e.g. OCO TP/SL pairs). */\nexport const LIGHTER_TX_TYPE_CREATE_GROUPED_ORDERS = 28;\n\n/** L2 transaction type: UpdateMargin (isolated margin add/remove). */\nexport const LIGHTER_TX_TYPE_UPDATE_MARGIN = 29;\n\n/** L2 transaction type: UpdateLeverage (per-market IMF + margin mode). */\nexport const LIGHTER_TX_TYPE_UPDATE_LEVERAGE = 20;\n\nexport const LIGHTER_TIME_IN_FORCE_IMMEDIATE_OR_CANCEL = 0;\nexport const LIGHTER_TIME_IN_FORCE_GOOD_TILL_TIME = 1;\nexport const LIGHTER_TIME_IN_FORCE_POST_ONLY = 2;\n\n/** Sentinel for \"no expiry\" on GTT orders (per lighter SDKs). */\nexport const LIGHTER_ORDER_EXPIRY_NONE = -1;\n/** Sentinel for \"no trigger price\". */\nexport const LIGHTER_NO_TRIGGER_PRICE = 0;\n\n// ============================================================================\n// Signer / key derivation\n// ============================================================================\n\n/**\n * Default API key slot used by the MetaMask integration.\n * Slots 0-2 are commonly used by Lighter's own frontends; a dedicated\n * slot avoids clobbering keys registered by other clients.\n */\nexport const LIGHTER_DEFAULT_API_KEY_INDEX = 7;\n\n// ============================================================================\n// REST API Configuration\n// ============================================================================\n\n/**\n * HTTP request timeout in milliseconds\n */\nexport const LIGHTER_HTTP_TIMEOUT_MS = 10000;\n\n/**\n * Interval for polling REST prices (no WS subscription in the POC)\n */\nexport const LIGHTER_PRICE_POLLING_INTERVAL_MS = 5000;\n\n/**\n * Maximum leverage placeholder until per-market margin fractions are wired.\n */\nexport const LIGHTER_MAX_LEVERAGE = 50;\n\n/**\n * TTL for the authoritative per-market margin-metadata cache used by\n * explicit leverage validation. Without expiry, metadata fetched once\n * (e.g. an older, higher max) would keep validating later-overlimit\n * leverage for the whole session; the venue cap remains the final\n * enforcement either way.\n */\nexport const LIGHTER_MARGIN_METADATA_TTL_MS = 60_000;\n\n/**\n * Prefix marking venue-data integrity failures (malformed numeric fields\n * in venue payloads). These must fail closed and surface — never degrade\n * into silently-coerced values or empty reads.\n */\nexport const LIGHTER_DATA_INTEGRITY_PREFIX = 'Invalid Lighter venue data:';\n\n/** Full-string decimal/scientific literal (optional sign and exponent). */\nconst LIGHTER_STRICT_DECIMAL_PATTERN =\n /^[+-]?(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+)?$/u;\n\n/**\n * Parse a numeric string STRICTLY: the entire trimmed string must be a\n * decimal/scientific literal. parseFloat prefix-parses, so '0.1oops'\n * would silently become 0.1.\n *\n * Accepts unknown because venue REST payloads are type-cast without\n * runtime validation: a missing/null/numeric field must yield null (for\n * the caller's explicit error path), never a TypeError that generic\n * catches misclassify as an ordinary read failure.\n *\n * Note: '1e999' matches the literal pattern and parses to Infinity —\n * callers own the finiteness check.\n *\n * @param value - Raw value from params or a venue payload.\n * @returns The parsed number, or null when the value is not a string\n * containing a pure numeric literal.\n */\nexport function parseLighterStrictDecimal(value: unknown): number | null {\n if (typeof value !== 'string') {\n return null;\n }\n const trimmed = value.trim();\n return LIGHTER_STRICT_DECIMAL_PATTERN.test(trimmed)\n ? parseFloat(trimmed)\n : null;\n}\n\n// ============================================================================\n// Size / price integerization\n// ============================================================================\n\n/**\n * Convert a human-readable amount to the integer representation expected by\n * the Lighter signer for a given number of supported decimals.\n *\n * @param value - Human-readable amount (e.g. 0.05 SOL, 187.25 USDC).\n * @param decimals - `supportedSizeDecimals` / `supportedPriceDecimals`\n * from the market metadata.\n * @returns Integer wire value (e.g. 0.05 @ 5 decimals -> 5000).\n */\nexport function toLighterInteger(value: number, decimals: number): number {\n const scaled = Math.round(value * 10 ** decimals);\n // Fail closed on wire-format overflow: a huge-but-finite value scales to\n // an unsafe integer (or Infinity) and would stringify as '1e+305' inside\n // signer params.\n if (!Number.isSafeInteger(scaled)) {\n throw new Error(\n `Value ${value} is outside Lighter's integer range at ${decimals} decimals`,\n );\n }\n // NOTE: this is a generic converter — zero and negative results are\n // valid here. Positive-intent policy for signer-bound values lives in\n // the provider's internal wire wrapper.\n return scaled;\n}\n\n/**\n * Convert an integer wire value back to a human-readable amount.\n *\n * @param value - Integer wire value.\n * @param decimals - Supported decimals from the market metadata.\n * @returns Human-readable amount.\n */\nexport function fromLighterInteger(value: number, decimals: number): number {\n return value / 10 ** decimals;\n}\n\n/**\n * Compute the minimum order base size for a market that satisfies both\n * `minBaseAmount` and `minQuoteAmount` at a given price.\n *\n * @param market - Market metadata from `orderBooks`.\n * @param price - Order price (human units).\n * @returns Base size in human units, rounded up to the market's size step.\n */\nexport function computeLighterMinOrderSize(\n market: Pick<\n LighterOrderBookMeta,\n 'minBaseAmount' | 'minQuoteAmount' | 'supportedSizeDecimals'\n >,\n price: number,\n): number {\n const minBase = parseLighterStrictDecimal(market.minBaseAmount);\n const minQuote = parseLighterStrictDecimal(market.minQuoteAmount);\n if (\n minBase === null ||\n !Number.isFinite(minBase) ||\n minBase <= 0 ||\n minQuote === null ||\n !Number.isFinite(minQuote) ||\n minQuote <= 0 ||\n !Number.isFinite(price) ||\n price <= 0 ||\n !Number.isSafeInteger(market.supportedSizeDecimals) ||\n market.supportedSizeDecimals < 0\n ) {\n throw new Error(\n `${LIGHTER_DATA_INTEGRITY_PREFIX} invalid market minimum-size metadata`,\n );\n }\n const step = 10 ** -market.supportedSizeDecimals;\n const byQuote = minQuote / price;\n const raw = Math.max(minBase, byQuote);\n // Small epsilon guards against float artifacts (0.1 / 1e-5 = 10000.0000002)\n // pushing the ceil one step too high.\n const units = Math.ceil(raw / step - 1e-9);\n return Number((units * step).toFixed(market.supportedSizeDecimals));\n}\n\n/**\n * L1 bridge facts per network, as reported live by\n * `GET /api/v1/layer1BasicInfo` (contract addresses) and the venue docs\n * (minimums). Mainnet settles against Ethereum L1; testnet runs on a\n * venue-hosted devnet L1 (chain id 123456), so its route is informational.\n */\nexport const LIGHTER_BRIDGE_CONFIG = {\n mainnet: {\n /** CAIP-2 chain the bridge contract lives on (Ethereum mainnet). */\n chainId: 'eip155:1',\n /** ZkLighter L1 contract (deposits via `deposit`, selector 0x8a857083). */\n bridgeContract: '0x3B4D794a66304F130a4Db8F2551B0070dfCf5ca7',\n /** Canonical Ethereum USDC. */\n usdcContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n /** Venue-documented USDC minimums. */\n minDepositUsdc: '1',\n minWithdrawUsdc: '1',\n },\n testnet: {\n chainId: 'eip155:123456',\n bridgeContract: '0xe034801BC49cCDC79FB683022dA0591C86077261',\n usdcContract: '0x57382a12EC72eBb1e717b7BB76c78CdDAfE3A396',\n minDepositUsdc: '1',\n minWithdrawUsdc: '1',\n },\n} as const;\n\n/** UpdateLeverage margin-mode codes (types/txtypes constants). */\nexport const LIGHTER_MARGIN_MODE_CROSS = 0;\nexport const LIGHTER_MARGIN_MODE_ISOLATED = 1;\n\n/**\n * Marker prefix for capability-gate errors (unsupported account tier /\n * unverified fee semantics). Callers use it to surface these explicitly\n * instead of degrading them into empty state.\n */\nexport const LIGHTER_UNSUPPORTED_CAPABILITY_PREFIX =\n 'Unsupported Lighter capability:';\n"]}
|