@metamask-previews/perps-controller 13.1.0-preview-8c2a2eeb2 → 13.1.0-preview-4f4c98e
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 +4 -1
- package/dist/{PerpsController-method-action-types.d.mts → PerpsController-method-action-types.d.ts} +2 -2
- package/dist/PerpsController-method-action-types.d.ts.map +1 -0
- package/dist/{PerpsController-method-action-types.mjs → PerpsController-method-action-types.js} +1 -1
- package/dist/PerpsController-method-action-types.js.map +1 -0
- package/dist/{PerpsController.d.mts → PerpsController.d.ts} +17 -17
- package/dist/PerpsController.d.ts.map +1 -0
- package/dist/{PerpsController.mjs → PerpsController.js} +33 -31
- package/dist/PerpsController.js.map +1 -0
- package/dist/aggregation/{SubscriptionMultiplexer.d.cts → SubscriptionMultiplexer.d.ts} +2 -2
- package/dist/aggregation/SubscriptionMultiplexer.d.ts.map +1 -0
- package/dist/aggregation/{SubscriptionMultiplexer.mjs → SubscriptionMultiplexer.js} +3 -3
- 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.mts → chartConfig.d.ts} +34 -34
- package/dist/constants/chartConfig.d.ts.map +1 -0
- package/dist/constants/{chartConfig.mjs → chartConfig.js} +1 -1
- package/dist/constants/chartConfig.js.map +1 -0
- package/dist/constants/eventNames.d.ts +555 -0
- package/dist/constants/eventNames.d.ts.map +1 -0
- package/dist/constants/{eventNames.mjs → eventNames.js} +1 -1
- package/dist/constants/eventNames.js.map +1 -0
- package/dist/constants/{hyperLiquidConfig.d.cts → hyperLiquidConfig.d.ts} +12 -12
- package/dist/constants/hyperLiquidConfig.d.ts.map +1 -0
- package/dist/constants/{hyperLiquidConfig.mjs → hyperLiquidConfig.js} +4 -4
- 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/{myxConfig.d.mts → myxConfig.d.ts} +9 -8
- package/dist/constants/myxConfig.d.ts.map +1 -0
- package/dist/constants/{myxConfig.mjs → myxConfig.js} +2 -2
- package/dist/constants/myxConfig.js.map +1 -0
- package/dist/constants/{orderTypes.d.cts → orderTypes.d.ts} +7 -7
- package/dist/constants/orderTypes.d.ts.map +1 -0
- package/dist/constants/{orderTypes.mjs → orderTypes.js} +1 -1
- package/dist/constants/orderTypes.js.map +1 -0
- package/dist/constants/{performanceMetrics.d.cts → performanceMetrics.d.ts} +1 -1
- package/dist/constants/performanceMetrics.d.ts.map +1 -0
- package/dist/constants/{performanceMetrics.mjs → performanceMetrics.js} +1 -1
- package/dist/constants/performanceMetrics.js.map +1 -0
- package/dist/constants/{perpsConfig.d.mts → perpsConfig.d.ts} +56 -56
- package/dist/constants/perpsConfig.d.ts.map +1 -0
- package/dist/constants/{perpsConfig.mjs → perpsConfig.js} +1 -1
- package/dist/constants/perpsConfig.js.map +1 -0
- package/dist/constants/{transactionsHistoryConfig.d.cts → transactionsHistoryConfig.d.ts} +1 -1
- package/dist/constants/transactionsHistoryConfig.d.ts.map +1 -0
- package/dist/constants/{transactionsHistoryConfig.mjs → transactionsHistoryConfig.js} +1 -1
- package/dist/constants/transactionsHistoryConfig.js.map +1 -0
- package/dist/{index.d.mts → index.d.ts} +64 -64
- package/dist/index.d.ts.map +1 -0
- package/dist/{index.mjs → index.js} +41 -41
- package/dist/index.js.map +1 -0
- package/dist/perpsErrorCodes.d.ts +104 -0
- package/dist/perpsErrorCodes.d.ts.map +1 -0
- package/dist/{perpsErrorCodes.mjs → perpsErrorCodes.js} +1 -1
- package/dist/perpsErrorCodes.js.map +1 -0
- package/dist/providers/{AggregatedPerpsProvider.d.cts → AggregatedPerpsProvider.d.ts} +5 -5
- package/dist/providers/AggregatedPerpsProvider.d.ts.map +1 -0
- package/dist/providers/{AggregatedPerpsProvider.mjs → AggregatedPerpsProvider.js} +5 -5
- package/dist/providers/AggregatedPerpsProvider.js.map +1 -0
- package/dist/providers/{HyperLiquidProvider.d.mts → HyperLiquidProvider.d.ts} +7 -7
- package/dist/providers/HyperLiquidProvider.d.ts.map +1 -0
- package/dist/providers/{HyperLiquidProvider.mjs → HyperLiquidProvider.js} +48 -50
- package/dist/providers/HyperLiquidProvider.js.map +1 -0
- package/dist/routing/{ProviderRouter.d.mts → ProviderRouter.d.ts} +2 -2
- package/dist/routing/ProviderRouter.d.ts.map +1 -0
- package/dist/routing/{ProviderRouter.mjs → ProviderRouter.js} +1 -1
- 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.mts → selectors.d.ts} +97 -97
- package/dist/selectors.d.ts.map +1 -0
- package/dist/{selectors.mjs → selectors.js} +4 -4
- package/dist/selectors.js.map +1 -0
- package/dist/services/{AccountService.d.cts → AccountService.d.ts} +4 -4
- package/dist/services/AccountService.d.ts.map +1 -0
- package/dist/services/{AccountService.mjs → AccountService.js} +9 -9
- package/dist/services/AccountService.js.map +1 -0
- package/dist/services/{AggregatedOrderBookConnection.d.cts → AggregatedOrderBookConnection.d.ts} +2 -2
- package/dist/services/AggregatedOrderBookConnection.d.ts.map +1 -0
- package/dist/services/{AggregatedOrderBookConnection.mjs → AggregatedOrderBookConnection.js} +3 -3
- package/dist/services/AggregatedOrderBookConnection.js.map +1 -0
- package/dist/services/{DataLakeService.d.cts → DataLakeService.d.ts} +4 -4
- package/dist/services/DataLakeService.d.ts.map +1 -0
- package/dist/services/{DataLakeService.mjs → DataLakeService.js} +7 -7
- package/dist/services/DataLakeService.js.map +1 -0
- package/dist/services/{DepositService.d.cts → DepositService.d.ts} +4 -4
- package/dist/services/DepositService.d.ts.map +1 -0
- package/dist/services/{DepositService.mjs → DepositService.js} +7 -7
- package/dist/services/DepositService.js.map +1 -0
- package/dist/services/{DexDiscoveryCacheManager.d.cts → DexDiscoveryCacheManager.d.ts} +2 -2
- package/dist/services/DexDiscoveryCacheManager.d.ts.map +1 -0
- package/dist/services/{DexDiscoveryCacheManager.mjs → DexDiscoveryCacheManager.js} +2 -2
- package/dist/services/DexDiscoveryCacheManager.js.map +1 -0
- package/dist/services/{EligibilityService.d.cts → EligibilityService.d.ts} +2 -2
- package/dist/services/EligibilityService.d.ts.map +1 -0
- package/dist/services/{EligibilityService.mjs → EligibilityService.js} +3 -3
- package/dist/services/EligibilityService.js.map +1 -0
- package/dist/services/{FeatureFlagConfigurationService.d.cts → FeatureFlagConfigurationService.d.ts} +3 -3
- package/dist/services/FeatureFlagConfigurationService.d.ts.map +1 -0
- package/dist/services/{FeatureFlagConfigurationService.mjs → FeatureFlagConfigurationService.js} +7 -7
- package/dist/services/FeatureFlagConfigurationService.js.map +1 -0
- package/dist/services/{HyperLiquidClientService.d.cts → HyperLiquidClientService.d.ts} +10 -10
- package/dist/services/HyperLiquidClientService.d.ts.map +1 -0
- package/dist/services/{HyperLiquidClientService.mjs → HyperLiquidClientService.js} +11 -11
- package/dist/services/HyperLiquidClientService.js.map +1 -0
- package/dist/services/{HyperLiquidSubscriptionService.d.cts → HyperLiquidSubscriptionService.d.ts} +6 -6
- package/dist/services/HyperLiquidSubscriptionService.d.ts.map +1 -0
- package/dist/services/{HyperLiquidSubscriptionService.mjs → HyperLiquidSubscriptionService.js} +12 -12
- package/dist/services/HyperLiquidSubscriptionService.js.map +1 -0
- package/dist/services/{HyperLiquidWalletService.d.cts → HyperLiquidWalletService.d.ts} +4 -4
- package/dist/services/HyperLiquidWalletService.d.ts.map +1 -0
- package/dist/services/{HyperLiquidWalletService.mjs → HyperLiquidWalletService.js} +5 -5
- package/dist/services/HyperLiquidWalletService.js.map +1 -0
- package/dist/services/{MarketDataService.d.cts → MarketDataService.d.ts} +5 -5
- package/dist/services/MarketDataService.d.ts.map +1 -0
- package/dist/services/{MarketDataService.mjs → MarketDataService.js} +9 -9
- package/dist/services/MarketDataService.js.map +1 -0
- package/dist/services/{RewardsIntegrationService.d.cts → RewardsIntegrationService.d.ts} +3 -3
- package/dist/services/RewardsIntegrationService.d.ts.map +1 -0
- package/dist/services/{RewardsIntegrationService.mjs → RewardsIntegrationService.js} +6 -6
- package/dist/services/RewardsIntegrationService.js.map +1 -0
- package/dist/services/{ServiceContext.d.cts → ServiceContext.d.ts} +3 -3
- 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.cts → TerminalMarketService.d.ts} +2 -2
- package/dist/services/TerminalMarketService.d.ts.map +1 -0
- package/dist/services/{TerminalMarketService.mjs → TerminalMarketService.js} +9 -9
- package/dist/services/TerminalMarketService.js.map +1 -0
- package/dist/services/{TradingReadinessCache.d.mts → TradingReadinessCache.d.ts} +1 -1
- package/dist/services/TradingReadinessCache.d.ts.map +1 -0
- package/dist/services/{TradingReadinessCache.mjs → TradingReadinessCache.js} +1 -1
- package/dist/services/TradingReadinessCache.js.map +1 -0
- package/dist/services/{TradingService.d.cts → TradingService.d.ts} +4 -4
- package/dist/services/TradingService.d.ts.map +1 -0
- package/dist/services/{TradingService.mjs → TradingService.js} +10 -10
- package/dist/services/TradingService.js.map +1 -0
- package/dist/types/{config.d.cts → config.d.ts} +2 -2
- 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.cts → hyperliquid-types.d.ts} +6 -6
- package/dist/types/hyperliquid-types.d.ts.map +1 -0
- package/dist/types/{hyperliquid-types.mjs → hyperliquid-types.js} +1 -1
- package/dist/types/hyperliquid-types.js.map +1 -0
- package/dist/types/{index.d.cts → index.d.ts} +41 -41
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/{index.mjs → index.js} +3 -3
- package/dist/types/index.js.map +1 -0
- package/dist/types/{messenger.d.mts → messenger.d.ts} +11 -11
- 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/{myx-types.d.mts → myx-types.d.ts} +16 -16
- package/dist/types/myx-types.d.ts.map +1 -0
- package/dist/types/{myx-types.mjs → myx-types.js} +3 -3
- package/dist/types/myx-types.js.map +1 -0
- package/dist/types/{perps-types.d.cts → perps-types.d.ts} +4 -4
- 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.cts → token.d.ts} +2 -2
- 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.cts → transactionTypes.d.ts} +1 -1
- package/dist/types/transactionTypes.d.ts.map +1 -0
- package/dist/types/{transactionTypes.mjs → transactionTypes.js} +2 -2
- package/dist/types/transactionTypes.js.map +1 -0
- package/dist/utils/{accountUtils.d.cts → accountUtils.d.ts} +4 -4
- package/dist/utils/accountUtils.d.ts.map +1 -0
- package/dist/utils/{accountUtils.mjs → accountUtils.js} +2 -2
- package/dist/utils/accountUtils.js.map +1 -0
- package/dist/utils/{capabilitySymbols.d.mts → capabilitySymbols.d.ts} +1 -1
- package/dist/utils/capabilitySymbols.d.ts.map +1 -0
- package/dist/utils/{capabilitySymbols.mjs → capabilitySymbols.js} +1 -1
- package/dist/utils/capabilitySymbols.js.map +1 -0
- package/dist/utils/{coalescePerpsRestRequest.d.cts → coalescePerpsRestRequest.d.ts} +1 -1
- package/dist/utils/coalescePerpsRestRequest.d.ts.map +1 -0
- package/dist/utils/{coalescePerpsRestRequest.mjs → coalescePerpsRestRequest.js} +2 -2
- package/dist/utils/coalescePerpsRestRequest.js.map +1 -0
- package/dist/utils/{errorUtils.d.mts → errorUtils.d.ts} +1 -1
- package/dist/utils/errorUtils.d.ts.map +1 -0
- package/dist/utils/{errorUtils.mjs → errorUtils.js} +3 -3
- package/dist/utils/errorUtils.js.map +1 -0
- package/dist/utils/{hyperLiquidAbstraction.d.cts → hyperLiquidAbstraction.d.ts} +2 -2
- package/dist/utils/hyperLiquidAbstraction.d.ts.map +1 -0
- package/dist/utils/{hyperLiquidAbstraction.mjs → hyperLiquidAbstraction.js} +1 -1
- package/dist/utils/hyperLiquidAbstraction.js.map +1 -0
- package/dist/utils/{hyperLiquidAdapter.d.cts → hyperLiquidAdapter.d.ts} +4 -4
- package/dist/utils/hyperLiquidAdapter.d.ts.map +1 -0
- package/dist/utils/{hyperLiquidAdapter.mjs → hyperLiquidAdapter.js} +9 -9
- package/dist/utils/hyperLiquidAdapter.js.map +1 -0
- package/dist/utils/{hyperLiquidOrderBookProcessor.d.mts → hyperLiquidOrderBookProcessor.d.ts} +3 -3
- package/dist/utils/hyperLiquidOrderBookProcessor.d.ts.map +1 -0
- package/dist/utils/{hyperLiquidOrderBookProcessor.mjs → hyperLiquidOrderBookProcessor.js} +1 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.js.map +1 -0
- package/dist/utils/{hyperLiquidValidation.d.cts → hyperLiquidValidation.d.ts} +4 -4
- package/dist/utils/hyperLiquidValidation.d.ts.map +1 -0
- package/dist/utils/{hyperLiquidValidation.mjs → hyperLiquidValidation.js} +6 -6
- package/dist/utils/hyperLiquidValidation.js.map +1 -0
- package/dist/utils/{idUtils.d.cts → idUtils.d.ts} +1 -1
- package/dist/utils/idUtils.d.ts.map +1 -0
- package/dist/utils/{idUtils.mjs → idUtils.js} +2 -2
- package/dist/utils/idUtils.js.map +1 -0
- package/dist/utils/index.d.ts +28 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/{index.mjs → index.js} +21 -21
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/{marketDataTransform.d.cts → marketDataTransform.d.ts} +3 -3
- package/dist/utils/marketDataTransform.d.ts.map +1 -0
- package/dist/utils/{marketDataTransform.mjs → marketDataTransform.js} +5 -5
- package/dist/utils/marketDataTransform.js.map +1 -0
- package/dist/utils/{marketSearch.d.cts → marketSearch.d.ts} +2 -2
- package/dist/utils/marketSearch.d.ts.map +1 -0
- package/dist/utils/{marketSearch.mjs → marketSearch.js} +1 -1
- package/dist/utils/marketSearch.js.map +1 -0
- package/dist/utils/{marketUtils.d.cts → marketUtils.d.ts} +3 -3
- package/dist/utils/marketUtils.d.ts.map +1 -0
- package/dist/utils/{marketUtils.mjs → marketUtils.js} +2 -2
- package/dist/utils/marketUtils.js.map +1 -0
- package/dist/utils/{myxAdapter.d.cts → myxAdapter.d.ts} +3 -3
- package/dist/utils/myxAdapter.d.ts.map +1 -0
- package/dist/utils/{myxAdapter.mjs → myxAdapter.js} +3 -3
- package/dist/utils/myxAdapter.js.map +1 -0
- package/dist/utils/{orderCalculations.d.cts → orderCalculations.d.ts} +4 -4
- package/dist/utils/orderCalculations.d.ts.map +1 -0
- package/dist/utils/{orderCalculations.mjs → orderCalculations.js} +6 -6
- package/dist/utils/orderCalculations.js.map +1 -0
- package/dist/utils/{orderTypes.d.mts → orderTypes.d.ts} +3 -3
- package/dist/utils/orderTypes.d.ts.map +1 -0
- package/dist/utils/{orderTypes.mjs → orderTypes.js} +1 -1
- package/dist/utils/orderTypes.js.map +1 -0
- package/dist/utils/{perpsConnectionAttemptContext.d.mts → perpsConnectionAttemptContext.d.ts} +1 -1
- package/dist/utils/perpsConnectionAttemptContext.d.ts.map +1 -0
- package/dist/utils/{perpsConnectionAttemptContext.mjs → perpsConnectionAttemptContext.js} +1 -1
- package/dist/utils/perpsConnectionAttemptContext.js.map +1 -0
- package/dist/utils/{perpsDiskPersistence.d.cts → perpsDiskPersistence.d.ts} +2 -2
- package/dist/utils/perpsDiskPersistence.d.ts.map +1 -0
- package/dist/utils/{perpsDiskPersistence.mjs → perpsDiskPersistence.js} +2 -2
- package/dist/utils/perpsDiskPersistence.js.map +1 -0
- package/dist/utils/{perpsFormatters.d.cts → perpsFormatters.d.ts} +1 -1
- package/dist/utils/perpsFormatters.d.ts.map +1 -0
- package/dist/utils/{perpsFormatters.mjs → perpsFormatters.js} +2 -2
- package/dist/utils/perpsFormatters.js.map +1 -0
- package/dist/utils/{rewardsUtils.d.cts → rewardsUtils.d.ts} +4 -4
- package/dist/utils/rewardsUtils.d.ts.map +1 -0
- package/dist/utils/{rewardsUtils.mjs → rewardsUtils.js} +4 -4
- package/dist/utils/rewardsUtils.js.map +1 -0
- package/dist/utils/{significantFigures.d.cts → significantFigures.d.ts} +1 -1
- package/dist/utils/significantFigures.d.ts.map +1 -0
- package/dist/utils/{significantFigures.mjs → significantFigures.js} +2 -2
- package/dist/utils/significantFigures.js.map +1 -0
- package/dist/utils/{sortMarkets.d.cts → sortMarkets.d.ts} +2 -2
- package/dist/utils/sortMarkets.d.ts.map +1 -0
- package/dist/utils/{sortMarkets.mjs → sortMarkets.js} +2 -2
- package/dist/utils/sortMarkets.js.map +1 -0
- package/dist/utils/{standaloneInfoClient.d.cts → standaloneInfoClient.d.ts} +3 -3
- package/dist/utils/standaloneInfoClient.d.ts.map +1 -0
- package/dist/utils/{standaloneInfoClient.mjs → standaloneInfoClient.js} +3 -3
- package/dist/utils/standaloneInfoClient.js.map +1 -0
- package/dist/utils/{stringParseUtils.d.cts → stringParseUtils.d.ts} +1 -1
- package/dist/utils/stringParseUtils.d.ts.map +1 -0
- package/dist/utils/{stringParseUtils.mjs → stringParseUtils.js} +1 -1
- package/dist/utils/stringParseUtils.js.map +1 -0
- package/dist/utils/{transferData.d.cts → transferData.d.ts} +1 -1
- package/dist/utils/transferData.d.ts.map +1 -0
- package/dist/utils/{transferData.mjs → transferData.js} +3 -3
- package/dist/utils/transferData.js.map +1 -0
- package/dist/utils/{wait.d.cts → wait.d.ts} +1 -1
- package/dist/utils/wait.d.ts.map +1 -0
- package/dist/utils/{wait.mjs → wait.js} +1 -1
- package/dist/utils/wait.js.map +1 -0
- package/package.json +20 -48
- 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 -1163
- package/dist/PerpsController-method-action-types.d.cts.map +0 -1
- package/dist/PerpsController-method-action-types.d.mts.map +0 -1
- package/dist/PerpsController-method-action-types.mjs.map +0 -1
- package/dist/PerpsController.cjs +0 -5063
- package/dist/PerpsController.cjs.map +0 -1
- package/dist/PerpsController.d.cts +0 -1274
- package/dist/PerpsController.d.cts.map +0 -1
- package/dist/PerpsController.d.mts.map +0 -1
- 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.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.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.map +0 -1
- package/dist/constants/chartConfig.mjs.map +0 -1
- package/dist/constants/eventNames.cjs +0 -650
- package/dist/constants/eventNames.cjs.map +0 -1
- package/dist/constants/eventNames.d.cts +0 -555
- package/dist/constants/eventNames.d.cts.map +0 -1
- package/dist/constants/eventNames.d.mts +0 -555
- package/dist/constants/eventNames.d.mts.map +0 -1
- 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.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.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/myxConfig.cjs +0 -253
- package/dist/constants/myxConfig.cjs.map +0 -1
- package/dist/constants/myxConfig.d.cts +0 -145
- package/dist/constants/myxConfig.d.cts.map +0 -1
- package/dist/constants/myxConfig.d.mts.map +0 -1
- package/dist/constants/myxConfig.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.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.map +0 -1
- package/dist/constants/performanceMetrics.cjs +0 -63
- package/dist/constants/performanceMetrics.cjs.map +0 -1
- 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.map +0 -1
- package/dist/constants/perpsConfig.cjs +0 -553
- package/dist/constants/perpsConfig.cjs.map +0 -1
- package/dist/constants/perpsConfig.d.cts +0 -474
- package/dist/constants/perpsConfig.d.cts.map +0 -1
- package/dist/constants/perpsConfig.d.mts.map +0 -1
- 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.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.map +0 -1
- package/dist/index.cjs +0 -344
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -92
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/perpsErrorCodes.cjs +0 -127
- package/dist/perpsErrorCodes.cjs.map +0 -1
- package/dist/perpsErrorCodes.d.cts +0 -104
- package/dist/perpsErrorCodes.d.cts.map +0 -1
- package/dist/perpsErrorCodes.d.mts +0 -104
- package/dist/perpsErrorCodes.d.mts.map +0 -1
- package/dist/perpsErrorCodes.mjs.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.cjs +0 -689
- package/dist/providers/AggregatedPerpsProvider.cjs.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.d.cts.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.d.mts +0 -232
- package/dist/providers/AggregatedPerpsProvider.d.mts.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.mjs.map +0 -1
- package/dist/providers/HyperLiquidProvider.cjs +0 -10416
- package/dist/providers/HyperLiquidProvider.cjs.map +0 -1
- package/dist/providers/HyperLiquidProvider.d.cts +0 -625
- package/dist/providers/HyperLiquidProvider.d.cts.map +0 -1
- package/dist/providers/HyperLiquidProvider.d.mts.map +0 -1
- package/dist/providers/HyperLiquidProvider.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.map +0 -1
- 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.map +0 -1
- 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.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.map +0 -1
- package/dist/services/AggregatedOrderBookConnection.cjs +0 -405
- package/dist/services/AggregatedOrderBookConnection.cjs.map +0 -1
- 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.map +0 -1
- package/dist/services/DataLakeService.cjs +0 -233
- package/dist/services/DataLakeService.cjs.map +0 -1
- 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.map +0 -1
- package/dist/services/DepositService.cjs +0 -99
- package/dist/services/DepositService.cjs.map +0 -1
- 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.map +0 -1
- package/dist/services/DexDiscoveryCacheManager.cjs +0 -147
- package/dist/services/DexDiscoveryCacheManager.cjs.map +0 -1
- 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.map +0 -1
- package/dist/services/EligibilityService.cjs +0 -78
- package/dist/services/EligibilityService.cjs.map +0 -1
- 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.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.cjs +0 -257
- package/dist/services/FeatureFlagConfigurationService.cjs.map +0 -1
- 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.map +0 -1
- package/dist/services/HyperLiquidClientService.cjs +0 -1045
- package/dist/services/HyperLiquidClientService.cjs.map +0 -1
- package/dist/services/HyperLiquidClientService.d.cts.map +0 -1
- package/dist/services/HyperLiquidClientService.d.mts +0 -239
- package/dist/services/HyperLiquidClientService.d.mts.map +0 -1
- package/dist/services/HyperLiquidClientService.mjs.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.cjs +0 -3196
- package/dist/services/HyperLiquidSubscriptionService.cjs.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.d.cts.map +0 -1
- package/dist/services/HyperLiquidSubscriptionService.d.mts +0 -227
- package/dist/services/HyperLiquidSubscriptionService.d.mts.map +0 -1
- 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.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.map +0 -1
- package/dist/services/MarketDataService.cjs +0 -1138
- package/dist/services/MarketDataService.cjs.map +0 -1
- package/dist/services/MarketDataService.d.cts.map +0 -1
- package/dist/services/MarketDataService.d.mts +0 -334
- package/dist/services/MarketDataService.d.mts.map +0 -1
- 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.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.map +0 -1
- package/dist/services/ServiceContext.cjs +0 -3
- package/dist/services/ServiceContext.cjs.map +0 -1
- 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.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.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.map +0 -1
- package/dist/services/TradingReadinessCache.mjs.map +0 -1
- package/dist/services/TradingService.cjs +0 -1865
- package/dist/services/TradingService.cjs.map +0 -1
- 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.map +0 -1
- package/dist/types/config.cjs +0 -3
- package/dist/types/config.cjs.map +0 -1
- 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.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.map +0 -1
- package/dist/types/index.cjs +0 -151
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts.map +0 -1
- package/dist/types/index.d.mts +0 -1951
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.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.map +0 -1
- package/dist/types/messenger.mjs +0 -2
- package/dist/types/messenger.mjs.map +0 -1
- package/dist/types/myx-types.cjs +0 -41
- package/dist/types/myx-types.cjs.map +0 -1
- package/dist/types/myx-types.d.cts +0 -94
- package/dist/types/myx-types.d.cts.map +0 -1
- package/dist/types/myx-types.d.mts.map +0 -1
- package/dist/types/myx-types.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.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.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.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.map +0 -1
- package/dist/utils/accountUtils.cjs +0 -236
- package/dist/utils/accountUtils.cjs.map +0 -1
- 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.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.map +0 -1
- 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.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.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.map +0 -1
- 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.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.map +0 -1
- package/dist/utils/hyperLiquidAdapter.cjs +0 -512
- package/dist/utils/hyperLiquidAdapter.cjs.map +0 -1
- 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.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.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.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.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.map +0 -1
- package/dist/utils/idUtils.cjs +0 -18
- package/dist/utils/idUtils.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/index.cjs +0 -65
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -28
- package/dist/utils/index.d.cts.map +0 -1
- package/dist/utils/index.d.mts +0 -28
- package/dist/utils/index.d.mts.map +0 -1
- package/dist/utils/index.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.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.map +0 -1
- package/dist/utils/marketSearch.cjs +0 -111
- package/dist/utils/marketSearch.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/marketUtils.cjs +0 -266
- package/dist/utils/marketUtils.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/myxAdapter.cjs +0 -569
- package/dist/utils/myxAdapter.cjs.map +0 -1
- package/dist/utils/myxAdapter.d.cts.map +0 -1
- package/dist/utils/myxAdapter.d.mts +0 -168
- package/dist/utils/myxAdapter.d.mts.map +0 -1
- package/dist/utils/myxAdapter.mjs.map +0 -1
- package/dist/utils/orderCalculations.cjs +0 -823
- package/dist/utils/orderCalculations.cjs.map +0 -1
- package/dist/utils/orderCalculations.d.cts.map +0 -1
- package/dist/utils/orderCalculations.d.mts +0 -298
- package/dist/utils/orderCalculations.d.mts.map +0 -1
- 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.map +0 -1
- 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.map +0 -1
- 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.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.map +0 -1
- package/dist/utils/perpsFormatters.cjs +0 -509
- package/dist/utils/perpsFormatters.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/rewardsUtils.cjs +0 -98
- package/dist/utils/rewardsUtils.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/significantFigures.cjs +0 -88
- package/dist/utils/significantFigures.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/sortMarkets.cjs +0 -93
- package/dist/utils/sortMarkets.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/standaloneInfoClient.cjs +0 -70
- package/dist/utils/standaloneInfoClient.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/stringParseUtils.cjs +0 -34
- package/dist/utils/stringParseUtils.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/transferData.cjs +0 -33
- package/dist/utils/transferData.cjs.map +0 -1
- 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.map +0 -1
- package/dist/utils/wait.cjs +0 -6
- package/dist/utils/wait.cjs.map +0 -1
- 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.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"myx-types.mjs","sourceRoot":"","sources":["../../src/types/myx-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiCH,0EAA0E;AAC1E,OAAO,EACL,SAAS,IAAI,YAAY,EACzB,SAAS,IAAI,YAAY,EACzB,aAAa,IAAI,gBAAgB,EACjC,WAAW,IAAI,cAAc,EAC7B,WAAW,IAAI,cAAc,EAC7B,WAAW,IAAI,cAAc,EAC9B,uBAAuB;AAExB,gBAAgB;AAChB,OAAO,EACL,aAAa,IAAI,gBAAgB,EACjC,aAAa,IAAI,gBAAgB,EACjC,aAAa,IAAI,gBAAgB,EACjC,eAAe,IAAI,kBAAkB,EACrC,YAAY,IAAI,eAAe,EAC/B,iBAAiB,IAAI,oBAAoB,EAC1C,uBAAuB;AAoDxB,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;CACE,CAAC","sourcesContent":["/**\n * MYX Protocol Type Definitions\n *\n * SDK types re-exported with MYX prefix for consistency.\n * Includes types for market display, positions, orders, and trading.\n */\n\nimport type { CaipChainId } from '@metamask/utils';\n\n// ============================================================================\n// Re-export SDK Types with MYX prefix for consistency\n// ============================================================================\n\nexport type { PoolSymbolAllResponse as MYXPoolSymbol } from '@myx-trade/sdk';\nexport type { TickerDataItem as MYXTicker } from '@myx-trade/sdk';\n\n// Position & order types from SDK\nexport type { PositionType as MYXPositionType } from '@myx-trade/sdk';\nexport type { HistoryOrderItem as MYXHistoryOrderItem } from '@myx-trade/sdk';\nexport type { PositionHistoryItem as MYXPositionHistoryItem } from '@myx-trade/sdk';\nexport type { TradeFlowItem as MYXTradeFlowItem } from '@myx-trade/sdk';\nexport type { KlineDataItemType as MYXKlineData } from '@myx-trade/sdk';\n// KlineData is declared but not exported by @myx-trade/sdk — define locally.\n// Property names match the SDK's wire format (single-char keys).\nexport type MYXKlineWsData = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n E: number; // Timestamp\n // eslint-disable-next-line @typescript-eslint/naming-convention\n T: string; // Turnover\n c: string; // Close price\n h: string; // High price\n l: string; // Low price\n o: string; // Open price\n t: number; // Timestamp\n v: string; // Volume\n};\nexport type { KlineDataResponse as MYXKlineDataResponse } from '@myx-trade/sdk';\n\n// SDK enums (re-exported as types since they're const objects in the SDK)\nexport {\n Direction as MYXDirection,\n OrderType as MYXOrderType,\n OperationType as MYXOperationType,\n TriggerType as MYXTriggerType,\n OrderStatus as MYXOrderStatus,\n TimeInForce as MYXTimeInForce,\n} from '@myx-trade/sdk';\n\n// History enums\nexport {\n DirectionEnum as MYXDirectionEnum,\n OrderTypeEnum as MYXOrderTypeEnum,\n OperationEnum as MYXOperationEnum,\n OrderStatusEnum as MYXOrderStatusEnum,\n ExecTypeEnum as MYXExecTypeEnum,\n TradeFlowTypeEnum as MYXTradeFlowTypeEnum,\n} from '@myx-trade/sdk';\n\n// Trading params types\nexport type { PlaceOrderParams as MYXPlaceOrderParams } from '@myx-trade/sdk';\nexport type { PositionTpSlOrderParams as MYXPositionTpSlOrderParams } from '@myx-trade/sdk';\nexport type { GetHistoryOrdersParams as MYXGetHistoryOrdersParams } from '@myx-trade/sdk';\n\n// ============================================================================\n// Network Configuration Types\n// ============================================================================\n\n/**\n * MYX Network type - mainnet or testnet\n */\nexport type MYXNetwork = 'mainnet' | 'testnet';\n\n/**\n * MYX Endpoint configuration for a single network\n */\nexport type MYXEndpointConfig = {\n http: string;\n ws: string;\n};\n\n/**\n * MYX Endpoints for all networks\n */\nexport type MYXEndpoints = {\n mainnet: MYXEndpointConfig;\n testnet: MYXEndpointConfig;\n};\n\n/**\n * MYX Asset network configuration (token addresses per network)\n */\nexport type MYXAssetNetworkConfig = {\n chainId: CaipChainId;\n tokenAddress: string;\n};\n\n/**\n * MYX Asset configurations by network\n */\nexport type MYXAssetConfigs = {\n // USDT is the token symbol used as API key - not a variable name\n // eslint-disable-next-line @typescript-eslint/naming-convention\n USDT: {\n mainnet: MYXAssetNetworkConfig;\n testnet: MYXAssetNetworkConfig;\n };\n};\n\n// ============================================================================\n// Market Overlap Configuration\n// ============================================================================\n\n/**\n * Markets that overlap with HyperLiquid\n * These are excluded from MYX display in v1.0 to avoid confusion\n * In Stage 7, we'll implement market collision handling\n */\nexport const MYX_HL_OVERLAPPING_MARKETS = [\n 'BTC',\n 'ETH',\n 'BNB',\n 'PUMP',\n 'WLFI',\n] as const;\n\nexport type MYXOverlappingMarket = (typeof MYX_HL_OVERLAPPING_MARKETS)[number];\n\n// ============================================================================\n// Auth Configuration (passed from init file via babel-transformed env vars)\n// ============================================================================\n\n/**\n * MYX auth credentials passed at construction time.\n * Eliminates runtime `process.env` lookups — values come from the init file\n * where `process.env.X` is babel-transformed at build time.\n */\nexport type MYXAuthConfig = {\n appId: string;\n apiSecret: string;\n brokerAddress: string;\n};\n\n// ============================================================================\n// Client Service Types\n// ============================================================================\n\n/**\n * Price callback for REST polling\n */\nexport type MYXPriceCallback = (\n tickers: { symbol: string; price: string; change24h: number }[],\n) => void;\n\n/**\n * Error callback for client operations\n */\nexport type MYXErrorCallback = (error: Error) => void;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"perps-types.cjs","sourceRoot":"","sources":["../../src/types/perps-types.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,iEAA2D","sourcesContent":["/**\n * Test result states for SDK validation\n */\nimport { CandlePeriod } from '../constants/chartConfig.js';\n\n/**\n * Order type enumeration (placement type).\n *\n * - `market` / `limit`: immediate placement.\n * - `stop_*` / `take_profit_*`: trigger placement — the order rests off-book until\n * `OrderParams.triggerPrice` is reached, then executes as a market or limit order\n * according to the suffix.\n * - `twap` / `scale` / `chase`: strategy placement — one request expands into an\n * execution schedule rather than a single resting order. See `StrategyOrderType`.\n *\n * Provider-agnostic by design: no protocol vocabulary (HyperLiquid's `tpsl`,\n * `triggerPx`, `isMarket`) appears in the params model.\n */\nexport type OrderType =\n | 'market'\n | 'limit'\n | 'stop_market'\n | 'stop_limit'\n | 'take_profit_market'\n | 'take_profit_limit'\n | 'twap'\n | 'scale'\n | 'chase';\n\n/**\n * The subset of `OrderType` values that require a trigger price.\n *\n * Spelled out rather than derived with `Exclude`: every order type added to\n * `OrderType` that is neither `market` nor `limit` would otherwise be pulled in\n * here automatically and start demanding a trigger price it has no concept of.\n */\nexport type TriggerOrderType =\n | 'stop_market'\n | 'stop_limit'\n | 'take_profit_market'\n | 'take_profit_limit';\n\n/**\n * The subset of `OrderType` values that describe an execution *strategy* rather\n * than a single order.\n *\n * - `twap`: slice the size over `OrderParams.twapDuration` minutes. Placed and\n * cancelled through the venue's own TWAP endpoints, not the order book.\n * - `scale`: fan out `OrderParams.scaleNumOrders` limit orders between\n * `OrderParams.scaleMinPrice` and `OrderParams.scaleMaxPrice`, evenly sized\n * unless `OrderParams.scaleSkew` weights them along the ladder.\n * - `chase`: rest a post-only order at the near touch and re-price it as the\n * touch moves, until it fills or the chase window closes.\n *\n * A strategy placement returns a *handle* in `OrderResult.orderId` — a venue\n * TWAP id, or a client-generated group/session id — which is what\n * `CancelOrderParams` takes together with the matching `orderType`.\n */\nexport type StrategyOrderType = 'twap' | 'scale' | 'chase';\n\n/**\n * Every `OrderType` that resolves to a single order the exchange can be handed\n * directly — market, limit, and the four trigger placements.\n *\n * Derived with `Exclude` on purpose, the safe direction: it *shrinks* as\n * `StrategyOrderType` grows, so a strategy added later is kept out of the\n * single-order helpers automatically rather than silently falling through them.\n */\nexport type OrdinaryOrderType = Exclude<OrderType, StrategyOrderType>;\n\n/**\n * Whether a triggered order executes as a market or a limit order.\n */\nexport type OrderExecution = 'market' | 'limit';\n\n/**\n * How an attached TP/SL relates to what it protects.\n *\n * - `none`: the order carries no attached TP/SL.\n * - `order`: the TP/SL belongs to this order and is cancelled with it.\n * - `position`: the TP/SL belongs to the resulting position and covers all of it.\n *\n * Provider-agnostic replacement for the HyperLiquid-shaped `OrderParams.grouping`.\n */\nexport type TpslLinkage = 'none' | 'order' | 'position';\n\n/**\n * Which side of the mark price a trigger order fires on.\n * `stop` protects against adverse moves, `take_profit` realizes gains.\n */\nexport type TriggerDirection = 'stop' | 'take_profit';\n\nexport type TestResultStatus =\n | 'idle'\n | 'loading'\n | 'success'\n | 'warning'\n | 'error';\n\n/**\n * Test result data structure\n */\nexport type TestResult = {\n status: TestResultStatus;\n message: string;\n data?: Record<string, unknown>;\n};\n\n/**\n * SDK test types\n */\nexport type SDKTestType = 'connection' | 'asset-listing' | 'websocket';\n\n/**\n * Hyperliquid asset interface (basic structure)\n */\nexport type HyperliquidAsset = {\n name: string;\n [key: string]: unknown;\n};\n\n/**\n * Represents a single candlestick data point\n */\nexport type CandleStick = {\n time: number;\n open: string;\n high: string;\n low: string;\n close: string;\n volume: string;\n};\n\n/**\n * Represents historical candlestick data for a specific symbol and interval\n */\nexport type CandleData = {\n /** Asset identifier (e.g., 'BTC', 'ETH'). Protocol-agnostic terminology for multi-provider support. */\n symbol: string;\n interval: CandlePeriod;\n candles: CandleStick[];\n};\n\n// Configuration types\nexport type {\n HyperLiquidEndpoints,\n AssetNetworkConfig,\n HyperLiquidAssetConfigs,\n BridgeContractConfig,\n HyperLiquidBridgeContracts,\n TransportReconnectConfig,\n TransportKeepAliveConfig,\n HyperLiquidTransportConfig,\n TradingAmountConfig,\n TradingDefaultsConfig,\n FeeRatesConfig,\n HyperLiquidNetwork,\n} from './config.js';\n\n// Token types\nexport type { PerpsToken } from './token.js';\n\n/**\n * Order form state for the Perps order view\n */\nexport type OrderFormState = {\n asset: string;\n direction: 'long' | 'short';\n amount: string;\n leverage: number;\n balancePercent: number;\n takeProfitPrice?: string;\n stopLossPrice?: string;\n limitPrice?: string;\n type: OrderType;\n};\n\nexport type OrderDirection = 'long' | 'short';\n\n/**\n * Options for reconnecting the Perps connection\n */\nexport type ReconnectOptions = {\n /**\n * If true, forces immediate disconnect and cancels all pending operations.\n * Use for user-initiated retry actions.\n * If false (default), waits for pending operations to complete.\n * Use for automatic reconnections like account switches.\n */\n force?: boolean;\n};\n\n/**\n * Extended asset metadata including Growth Mode fields not in SDK types.\n * The HyperLiquid API returns these fields but the SDK doesn't type them.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers\n */\nexport type ExtendedAssetMeta = {\n name: string;\n szDecimals: number;\n maxLeverage: number;\n /** Per-asset Growth Mode status - \"enabled\" means 90% fee reduction */\n growthMode?: 'enabled' | null;\n /** ISO timestamp of last Growth Mode change */\n lastGrowthModeChangeTime?: string;\n};\n\n/**\n * Extended perp DEX info including fee scale fields not in SDK types.\n * The HyperLiquid API returns these fields but the SDK doesn't type them.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers\n */\nexport type ExtendedPerpDex = {\n name: string;\n fullName?: string;\n deployer?: string;\n /** DEX-level fee scale (e.g., \"1.0\" for xyz DEX) - determines HIP-3 multiplier */\n deployerFeeScale?: string;\n /** ISO timestamp of last fee scale change */\n lastDeployerFeeScaleChangeTime?: string;\n};\n\n/**\n * Unified DEX discovery state — single source of truth for all perpDexs() derivatives.\n * Replaces three separate caches (#cachedAllPerpDexs, #cachedValidatedDexs, #perpDexsCache)\n * to eliminate desync bugs by construction.\n */\nexport type DexDiscoveryState = {\n /** perpDexs() API response (raw objects with deployerFeeScale etc.) */\n raw: (ExtendedPerpDex | null)[];\n /** Feature-flag-filtered DEX names (null = main DEX, strings = HIP-3 DEXs) */\n validated: (string | null)[];\n /** When raw was fetched — used for fee-scale TTL checks */\n timestamp: number;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"perps-types.d.cts","sourceRoot":"","sources":["../../src/types/perps-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,qCAAoC;AAE3D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,GACnB,MAAM,GACN,OAAO,GACP,OAAO,CAAC;AAEZ;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GA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-1,184 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test result states for SDK validation
|
|
3
|
-
*/
|
|
4
|
-
import { CandlePeriod } from "../constants/chartConfig.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Order type enumeration (placement type).
|
|
7
|
-
*
|
|
8
|
-
* - `market` / `limit`: immediate placement.
|
|
9
|
-
* - `stop_*` / `take_profit_*`: trigger placement — the order rests off-book until
|
|
10
|
-
* `OrderParams.triggerPrice` is reached, then executes as a market or limit order
|
|
11
|
-
* according to the suffix.
|
|
12
|
-
* - `twap` / `scale` / `chase`: strategy placement — one request expands into an
|
|
13
|
-
* execution schedule rather than a single resting order. See `StrategyOrderType`.
|
|
14
|
-
*
|
|
15
|
-
* Provider-agnostic by design: no protocol vocabulary (HyperLiquid's `tpsl`,
|
|
16
|
-
* `triggerPx`, `isMarket`) appears in the params model.
|
|
17
|
-
*/
|
|
18
|
-
export type OrderType = 'market' | 'limit' | 'stop_market' | 'stop_limit' | 'take_profit_market' | 'take_profit_limit' | 'twap' | 'scale' | 'chase';
|
|
19
|
-
/**
|
|
20
|
-
* The subset of `OrderType` values that require a trigger price.
|
|
21
|
-
*
|
|
22
|
-
* Spelled out rather than derived with `Exclude`: every order type added to
|
|
23
|
-
* `OrderType` that is neither `market` nor `limit` would otherwise be pulled in
|
|
24
|
-
* here automatically and start demanding a trigger price it has no concept of.
|
|
25
|
-
*/
|
|
26
|
-
export type TriggerOrderType = 'stop_market' | 'stop_limit' | 'take_profit_market' | 'take_profit_limit';
|
|
27
|
-
/**
|
|
28
|
-
* The subset of `OrderType` values that describe an execution *strategy* rather
|
|
29
|
-
* than a single order.
|
|
30
|
-
*
|
|
31
|
-
* - `twap`: slice the size over `OrderParams.twapDuration` minutes. Placed and
|
|
32
|
-
* cancelled through the venue's own TWAP endpoints, not the order book.
|
|
33
|
-
* - `scale`: fan out `OrderParams.scaleNumOrders` limit orders between
|
|
34
|
-
* `OrderParams.scaleMinPrice` and `OrderParams.scaleMaxPrice`, evenly sized
|
|
35
|
-
* unless `OrderParams.scaleSkew` weights them along the ladder.
|
|
36
|
-
* - `chase`: rest a post-only order at the near touch and re-price it as the
|
|
37
|
-
* touch moves, until it fills or the chase window closes.
|
|
38
|
-
*
|
|
39
|
-
* A strategy placement returns a *handle* in `OrderResult.orderId` — a venue
|
|
40
|
-
* TWAP id, or a client-generated group/session id — which is what
|
|
41
|
-
* `CancelOrderParams` takes together with the matching `orderType`.
|
|
42
|
-
*/
|
|
43
|
-
export type StrategyOrderType = 'twap' | 'scale' | 'chase';
|
|
44
|
-
/**
|
|
45
|
-
* Every `OrderType` that resolves to a single order the exchange can be handed
|
|
46
|
-
* directly — market, limit, and the four trigger placements.
|
|
47
|
-
*
|
|
48
|
-
* Derived with `Exclude` on purpose, the safe direction: it *shrinks* as
|
|
49
|
-
* `StrategyOrderType` grows, so a strategy added later is kept out of the
|
|
50
|
-
* single-order helpers automatically rather than silently falling through them.
|
|
51
|
-
*/
|
|
52
|
-
export type OrdinaryOrderType = Exclude<OrderType, StrategyOrderType>;
|
|
53
|
-
/**
|
|
54
|
-
* Whether a triggered order executes as a market or a limit order.
|
|
55
|
-
*/
|
|
56
|
-
export type OrderExecution = 'market' | 'limit';
|
|
57
|
-
/**
|
|
58
|
-
* How an attached TP/SL relates to what it protects.
|
|
59
|
-
*
|
|
60
|
-
* - `none`: the order carries no attached TP/SL.
|
|
61
|
-
* - `order`: the TP/SL belongs to this order and is cancelled with it.
|
|
62
|
-
* - `position`: the TP/SL belongs to the resulting position and covers all of it.
|
|
63
|
-
*
|
|
64
|
-
* Provider-agnostic replacement for the HyperLiquid-shaped `OrderParams.grouping`.
|
|
65
|
-
*/
|
|
66
|
-
export type TpslLinkage = 'none' | 'order' | 'position';
|
|
67
|
-
/**
|
|
68
|
-
* Which side of the mark price a trigger order fires on.
|
|
69
|
-
* `stop` protects against adverse moves, `take_profit` realizes gains.
|
|
70
|
-
*/
|
|
71
|
-
export type TriggerDirection = 'stop' | 'take_profit';
|
|
72
|
-
export type TestResultStatus = 'idle' | 'loading' | 'success' | 'warning' | 'error';
|
|
73
|
-
/**
|
|
74
|
-
* Test result data structure
|
|
75
|
-
*/
|
|
76
|
-
export type TestResult = {
|
|
77
|
-
status: TestResultStatus;
|
|
78
|
-
message: string;
|
|
79
|
-
data?: Record<string, unknown>;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* SDK test types
|
|
83
|
-
*/
|
|
84
|
-
export type SDKTestType = 'connection' | 'asset-listing' | 'websocket';
|
|
85
|
-
/**
|
|
86
|
-
* Hyperliquid asset interface (basic structure)
|
|
87
|
-
*/
|
|
88
|
-
export type HyperliquidAsset = {
|
|
89
|
-
name: string;
|
|
90
|
-
[key: string]: unknown;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Represents a single candlestick data point
|
|
94
|
-
*/
|
|
95
|
-
export type CandleStick = {
|
|
96
|
-
time: number;
|
|
97
|
-
open: string;
|
|
98
|
-
high: string;
|
|
99
|
-
low: string;
|
|
100
|
-
close: string;
|
|
101
|
-
volume: string;
|
|
102
|
-
};
|
|
103
|
-
/**
|
|
104
|
-
* Represents historical candlestick data for a specific symbol and interval
|
|
105
|
-
*/
|
|
106
|
-
export type CandleData = {
|
|
107
|
-
/** Asset identifier (e.g., 'BTC', 'ETH'). Protocol-agnostic terminology for multi-provider support. */
|
|
108
|
-
symbol: string;
|
|
109
|
-
interval: CandlePeriod;
|
|
110
|
-
candles: CandleStick[];
|
|
111
|
-
};
|
|
112
|
-
export type { HyperLiquidEndpoints, AssetNetworkConfig, HyperLiquidAssetConfigs, BridgeContractConfig, HyperLiquidBridgeContracts, TransportReconnectConfig, TransportKeepAliveConfig, HyperLiquidTransportConfig, TradingAmountConfig, TradingDefaultsConfig, FeeRatesConfig, HyperLiquidNetwork, } from "./config.mjs";
|
|
113
|
-
export type { PerpsToken } from "./token.mjs";
|
|
114
|
-
/**
|
|
115
|
-
* Order form state for the Perps order view
|
|
116
|
-
*/
|
|
117
|
-
export type OrderFormState = {
|
|
118
|
-
asset: string;
|
|
119
|
-
direction: 'long' | 'short';
|
|
120
|
-
amount: string;
|
|
121
|
-
leverage: number;
|
|
122
|
-
balancePercent: number;
|
|
123
|
-
takeProfitPrice?: string;
|
|
124
|
-
stopLossPrice?: string;
|
|
125
|
-
limitPrice?: string;
|
|
126
|
-
type: OrderType;
|
|
127
|
-
};
|
|
128
|
-
export type OrderDirection = 'long' | 'short';
|
|
129
|
-
/**
|
|
130
|
-
* Options for reconnecting the Perps connection
|
|
131
|
-
*/
|
|
132
|
-
export type ReconnectOptions = {
|
|
133
|
-
/**
|
|
134
|
-
* If true, forces immediate disconnect and cancels all pending operations.
|
|
135
|
-
* Use for user-initiated retry actions.
|
|
136
|
-
* If false (default), waits for pending operations to complete.
|
|
137
|
-
* Use for automatic reconnections like account switches.
|
|
138
|
-
*/
|
|
139
|
-
force?: boolean;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Extended asset metadata including Growth Mode fields not in SDK types.
|
|
143
|
-
* The HyperLiquid API returns these fields but the SDK doesn't type them.
|
|
144
|
-
*
|
|
145
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers
|
|
146
|
-
*/
|
|
147
|
-
export type ExtendedAssetMeta = {
|
|
148
|
-
name: string;
|
|
149
|
-
szDecimals: number;
|
|
150
|
-
maxLeverage: number;
|
|
151
|
-
/** Per-asset Growth Mode status - "enabled" means 90% fee reduction */
|
|
152
|
-
growthMode?: 'enabled' | null;
|
|
153
|
-
/** ISO timestamp of last Growth Mode change */
|
|
154
|
-
lastGrowthModeChangeTime?: string;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Extended perp DEX info including fee scale fields not in SDK types.
|
|
158
|
-
* The HyperLiquid API returns these fields but the SDK doesn't type them.
|
|
159
|
-
*
|
|
160
|
-
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers
|
|
161
|
-
*/
|
|
162
|
-
export type ExtendedPerpDex = {
|
|
163
|
-
name: string;
|
|
164
|
-
fullName?: string;
|
|
165
|
-
deployer?: string;
|
|
166
|
-
/** DEX-level fee scale (e.g., "1.0" for xyz DEX) - determines HIP-3 multiplier */
|
|
167
|
-
deployerFeeScale?: string;
|
|
168
|
-
/** ISO timestamp of last fee scale change */
|
|
169
|
-
lastDeployerFeeScaleChangeTime?: string;
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Unified DEX discovery state — single source of truth for all perpDexs() derivatives.
|
|
173
|
-
* Replaces three separate caches (#cachedAllPerpDexs, #cachedValidatedDexs, #perpDexsCache)
|
|
174
|
-
* to eliminate desync bugs by construction.
|
|
175
|
-
*/
|
|
176
|
-
export type DexDiscoveryState = {
|
|
177
|
-
/** perpDexs() API response (raw objects with deployerFeeScale etc.) */
|
|
178
|
-
raw: (ExtendedPerpDex | null)[];
|
|
179
|
-
/** Feature-flag-filtered DEX names (null = main DEX, strings = HIP-3 DEXs) */
|
|
180
|
-
validated: (string | null)[];
|
|
181
|
-
/** When raw was fetched — used for fee-scale TTL checks */
|
|
182
|
-
timestamp: number;
|
|
183
|
-
};
|
|
184
|
-
//# sourceMappingURL=perps-types.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"perps-types.d.mts","sourceRoot":"","sources":["../../src/types/perps-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,qCAAoC;AAE3D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,OAAO,GACP,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,GACnB,MAAM,GACN,OAAO,GACP,OAAO,CAAC;AAEZ;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,mBAAmB,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AAC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F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,8BAA8B,CAAC,EAAE,MAAM,CAAC;CACzC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,uEAAuE;IACvE,GAAG,EAAE,CAAC,eAAe,GAAG,IAAI,CAAC,EAAE,CAAC;IAChC,8EAA8E;IAC9E,SAAS,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC7B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"perps-types.mjs","sourceRoot":"","sources":["../../src/types/perps-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,qCAAoC","sourcesContent":["/**\n * Test result states for SDK validation\n */\nimport { CandlePeriod } from '../constants/chartConfig.js';\n\n/**\n * Order type enumeration (placement type).\n *\n * - `market` / `limit`: immediate placement.\n * - `stop_*` / `take_profit_*`: trigger placement — the order rests off-book until\n * `OrderParams.triggerPrice` is reached, then executes as a market or limit order\n * according to the suffix.\n * - `twap` / `scale` / `chase`: strategy placement — one request expands into an\n * execution schedule rather than a single resting order. See `StrategyOrderType`.\n *\n * Provider-agnostic by design: no protocol vocabulary (HyperLiquid's `tpsl`,\n * `triggerPx`, `isMarket`) appears in the params model.\n */\nexport type OrderType =\n | 'market'\n | 'limit'\n | 'stop_market'\n | 'stop_limit'\n | 'take_profit_market'\n | 'take_profit_limit'\n | 'twap'\n | 'scale'\n | 'chase';\n\n/**\n * The subset of `OrderType` values that require a trigger price.\n *\n * Spelled out rather than derived with `Exclude`: every order type added to\n * `OrderType` that is neither `market` nor `limit` would otherwise be pulled in\n * here automatically and start demanding a trigger price it has no concept of.\n */\nexport type TriggerOrderType =\n | 'stop_market'\n | 'stop_limit'\n | 'take_profit_market'\n | 'take_profit_limit';\n\n/**\n * The subset of `OrderType` values that describe an execution *strategy* rather\n * than a single order.\n *\n * - `twap`: slice the size over `OrderParams.twapDuration` minutes. Placed and\n * cancelled through the venue's own TWAP endpoints, not the order book.\n * - `scale`: fan out `OrderParams.scaleNumOrders` limit orders between\n * `OrderParams.scaleMinPrice` and `OrderParams.scaleMaxPrice`, evenly sized\n * unless `OrderParams.scaleSkew` weights them along the ladder.\n * - `chase`: rest a post-only order at the near touch and re-price it as the\n * touch moves, until it fills or the chase window closes.\n *\n * A strategy placement returns a *handle* in `OrderResult.orderId` — a venue\n * TWAP id, or a client-generated group/session id — which is what\n * `CancelOrderParams` takes together with the matching `orderType`.\n */\nexport type StrategyOrderType = 'twap' | 'scale' | 'chase';\n\n/**\n * Every `OrderType` that resolves to a single order the exchange can be handed\n * directly — market, limit, and the four trigger placements.\n *\n * Derived with `Exclude` on purpose, the safe direction: it *shrinks* as\n * `StrategyOrderType` grows, so a strategy added later is kept out of the\n * single-order helpers automatically rather than silently falling through them.\n */\nexport type OrdinaryOrderType = Exclude<OrderType, StrategyOrderType>;\n\n/**\n * Whether a triggered order executes as a market or a limit order.\n */\nexport type OrderExecution = 'market' | 'limit';\n\n/**\n * How an attached TP/SL relates to what it protects.\n *\n * - `none`: the order carries no attached TP/SL.\n * - `order`: the TP/SL belongs to this order and is cancelled with it.\n * - `position`: the TP/SL belongs to the resulting position and covers all of it.\n *\n * Provider-agnostic replacement for the HyperLiquid-shaped `OrderParams.grouping`.\n */\nexport type TpslLinkage = 'none' | 'order' | 'position';\n\n/**\n * Which side of the mark price a trigger order fires on.\n * `stop` protects against adverse moves, `take_profit` realizes gains.\n */\nexport type TriggerDirection = 'stop' | 'take_profit';\n\nexport type TestResultStatus =\n | 'idle'\n | 'loading'\n | 'success'\n | 'warning'\n | 'error';\n\n/**\n * Test result data structure\n */\nexport type TestResult = {\n status: TestResultStatus;\n message: string;\n data?: Record<string, unknown>;\n};\n\n/**\n * SDK test types\n */\nexport type SDKTestType = 'connection' | 'asset-listing' | 'websocket';\n\n/**\n * Hyperliquid asset interface (basic structure)\n */\nexport type HyperliquidAsset = {\n name: string;\n [key: string]: unknown;\n};\n\n/**\n * Represents a single candlestick data point\n */\nexport type CandleStick = {\n time: number;\n open: string;\n high: string;\n low: string;\n close: string;\n volume: string;\n};\n\n/**\n * Represents historical candlestick data for a specific symbol and interval\n */\nexport type CandleData = {\n /** Asset identifier (e.g., 'BTC', 'ETH'). Protocol-agnostic terminology for multi-provider support. */\n symbol: string;\n interval: CandlePeriod;\n candles: CandleStick[];\n};\n\n// Configuration types\nexport type {\n HyperLiquidEndpoints,\n AssetNetworkConfig,\n HyperLiquidAssetConfigs,\n BridgeContractConfig,\n HyperLiquidBridgeContracts,\n TransportReconnectConfig,\n TransportKeepAliveConfig,\n HyperLiquidTransportConfig,\n TradingAmountConfig,\n TradingDefaultsConfig,\n FeeRatesConfig,\n HyperLiquidNetwork,\n} from './config.js';\n\n// Token types\nexport type { PerpsToken } from './token.js';\n\n/**\n * Order form state for the Perps order view\n */\nexport type OrderFormState = {\n asset: string;\n direction: 'long' | 'short';\n amount: string;\n leverage: number;\n balancePercent: number;\n takeProfitPrice?: string;\n stopLossPrice?: string;\n limitPrice?: string;\n type: OrderType;\n};\n\nexport type OrderDirection = 'long' | 'short';\n\n/**\n * Options for reconnecting the Perps connection\n */\nexport type ReconnectOptions = {\n /**\n * If true, forces immediate disconnect and cancels all pending operations.\n * Use for user-initiated retry actions.\n * If false (default), waits for pending operations to complete.\n * Use for automatic reconnections like account switches.\n */\n force?: boolean;\n};\n\n/**\n * Extended asset metadata including Growth Mode fields not in SDK types.\n * The HyperLiquid API returns these fields but the SDK doesn't type them.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers\n */\nexport type ExtendedAssetMeta = {\n name: string;\n szDecimals: number;\n maxLeverage: number;\n /** Per-asset Growth Mode status - \"enabled\" means 90% fee reduction */\n growthMode?: 'enabled' | null;\n /** ISO timestamp of last Growth Mode change */\n lastGrowthModeChangeTime?: string;\n};\n\n/**\n * Extended perp DEX info including fee scale fields not in SDK types.\n * The HyperLiquid API returns these fields but the SDK doesn't type them.\n *\n * @see https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees#fee-formula-for-developers\n */\nexport type ExtendedPerpDex = {\n name: string;\n fullName?: string;\n deployer?: string;\n /** DEX-level fee scale (e.g., \"1.0\" for xyz DEX) - determines HIP-3 multiplier */\n deployerFeeScale?: string;\n /** ISO timestamp of last fee scale change */\n lastDeployerFeeScaleChangeTime?: string;\n};\n\n/**\n * Unified DEX discovery state — single source of truth for all perpDexs() derivatives.\n * Replaces three separate caches (#cachedAllPerpDexs, #cachedValidatedDexs, #perpDexsCache)\n * to eliminate desync bugs by construction.\n */\nexport type DexDiscoveryState = {\n /** perpDexs() API response (raw objects with deployerFeeScale etc.) */\n raw: (ExtendedPerpDex | null)[];\n /** Feature-flag-filtered DEX names (null = main DEX, strings = HIP-3 DEXs) */\n validated: (string | null)[];\n /** When raw was fetched — used for fee-scale TTL checks */\n timestamp: number;\n};\n"]}
|
package/dist/types/token.cjs
DELETED
package/dist/types/token.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.cjs","sourceRoot":"","sources":["../../src/types/token.ts"],"names":[],"mappings":"","sourcesContent":["import type { Hex, CaipChainId } from '@metamask/utils';\n\n/**\n * Token interface for Perps trading.\n * Independent from BridgeToken to avoid Mobile-only dependencies.\n * Shape matches BridgeToken for backward compatibility.\n */\nexport type PerpsToken = {\n address: string;\n name?: string;\n symbol: string;\n image?: string;\n decimals: number;\n chainId: Hex | CaipChainId;\n balance?: string;\n balanceFiat?: string;\n tokenFiatAmount?: number;\n currencyExchangeRate?: number;\n noFee?: { isSource: boolean; isDestination: boolean };\n aggregators?: string[];\n metadata?: Record<string, unknown>;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.cts","sourceRoot":"","sources":["../../src/types/token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,wBAAwB;AAExD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,GAAG,GAAG,WAAW,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC"}
|
package/dist/types/token.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Hex, CaipChainId } from "@metamask/utils";
|
|
2
|
-
/**
|
|
3
|
-
* Token interface for Perps trading.
|
|
4
|
-
* Independent from BridgeToken to avoid Mobile-only dependencies.
|
|
5
|
-
* Shape matches BridgeToken for backward compatibility.
|
|
6
|
-
*/
|
|
7
|
-
export type PerpsToken = {
|
|
8
|
-
address: string;
|
|
9
|
-
name?: string;
|
|
10
|
-
symbol: string;
|
|
11
|
-
image?: string;
|
|
12
|
-
decimals: number;
|
|
13
|
-
chainId: Hex | CaipChainId;
|
|
14
|
-
balance?: string;
|
|
15
|
-
balanceFiat?: string;
|
|
16
|
-
tokenFiatAmount?: number;
|
|
17
|
-
currencyExchangeRate?: number;
|
|
18
|
-
noFee?: {
|
|
19
|
-
isSource: boolean;
|
|
20
|
-
isDestination: boolean;
|
|
21
|
-
};
|
|
22
|
-
aggregators?: string[];
|
|
23
|
-
metadata?: Record<string, unknown>;
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=token.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.d.mts","sourceRoot":"","sources":["../../src/types/token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,wBAAwB;AAExD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,GAAG,GAAG,WAAW,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC"}
|
package/dist/types/token.mjs
DELETED
package/dist/types/token.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token.mjs","sourceRoot":"","sources":["../../src/types/token.ts"],"names":[],"mappings":"","sourcesContent":["import type { Hex, CaipChainId } from '@metamask/utils';\n\n/**\n * Token interface for Perps trading.\n * Independent from BridgeToken to avoid Mobile-only dependencies.\n * Shape matches BridgeToken for backward compatibility.\n */\nexport type PerpsToken = {\n address: string;\n name?: string;\n symbol: string;\n image?: string;\n decimals: number;\n chainId: Hex | CaipChainId;\n balance?: string;\n balanceFiat?: string;\n tokenFiatAmount?: number;\n currencyExchangeRate?: number;\n noFee?: { isSource: boolean; isDestination: boolean };\n aggregators?: string[];\n metadata?: Record<string, unknown>;\n};\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLastTransactionResult = exports.isTransactionRecord = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Shared transaction types for Perps deposits and withdrawals
|
|
6
|
-
* Provides a unified structure while maintaining separate use cases
|
|
7
|
-
*/
|
|
8
|
-
const utils_1 = require("@metamask/utils");
|
|
9
|
-
/**
|
|
10
|
-
* Type guard to check if a transaction result is a TransactionRecord
|
|
11
|
-
*
|
|
12
|
-
* @param result - The transaction result to check.
|
|
13
|
-
* @returns True if the result is a TransactionRecord with id and status fields.
|
|
14
|
-
*/
|
|
15
|
-
function isTransactionRecord(result) {
|
|
16
|
-
return (0, utils_1.hasProperty)(result, 'id') && (0, utils_1.hasProperty)(result, 'status');
|
|
17
|
-
}
|
|
18
|
-
exports.isTransactionRecord = isTransactionRecord;
|
|
19
|
-
/**
|
|
20
|
-
* Type guard to check if a transaction result is a LastTransactionResult
|
|
21
|
-
*
|
|
22
|
-
* @param result - The transaction result to check.
|
|
23
|
-
* @returns True if the result is a LastTransactionResult without id or status fields.
|
|
24
|
-
*/
|
|
25
|
-
function isLastTransactionResult(result) {
|
|
26
|
-
return !(0, utils_1.hasProperty)(result, 'id') || !(0, utils_1.hasProperty)(result, 'status');
|
|
27
|
-
}
|
|
28
|
-
exports.isLastTransactionResult = isLastTransactionResult;
|
|
29
|
-
//# sourceMappingURL=transactionTypes.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactionTypes.cjs","sourceRoot":"","sources":["../../src/types/transactionTypes.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,2CAA8C;AAoD9C;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,MAAiD;IAEjD,OAAO,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAA,mBAAW,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACpE,CAAC;AAJD,kDAIC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CACrC,MAAiD;IAEjD,OAAO,CAAC,IAAA,mBAAW,EAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAA,mBAAW,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACtE,CAAC;AAJD,0DAIC","sourcesContent":["/**\n * Shared transaction types for Perps deposits and withdrawals\n * Provides a unified structure while maintaining separate use cases\n */\nimport { hasProperty } from '@metamask/utils';\n\n/**\n * Base type with core properties shared between all transaction results\n * All properties are JSON serializable for controller state compatibility\n */\nexport type BaseTransactionResult = {\n amount: string;\n asset: string;\n txHash?: string;\n timestamp: number;\n success: boolean; // explicit to avoid regressions\n};\n\n/**\n * For transient UI feedback (toasts, progress indicators)\n * Used for immediate success/failure notifications\n * JSON serializable for controller state\n */\nexport type LastTransactionResult = {\n amount: string;\n asset: string;\n txHash: string;\n timestamp: number;\n success: boolean;\n error: string;\n [key: string]: string | number | boolean;\n};\n\n/**\n * For persistent transaction history tracking\n * Used for transaction history display and detailed status tracking\n * JSON serializable for controller state\n */\nexport type TransactionStatus = 'pending' | 'bridging' | 'completed' | 'failed';\n\nexport type TransactionRecord = {\n id: string;\n amount: string;\n asset: string;\n txHash?: string;\n timestamp: number;\n success: boolean;\n status: TransactionStatus;\n destination?: string; // mainly for withdrawals\n source?: string; // mainly for deposits\n transactionId?: string; // generic - could be withdrawalId or depositId\n // Legacy fields for backward compatibility\n withdrawalId?: string; // for withdrawals\n depositId?: string; // for deposits\n};\n\n/**\n * Type guard to check if a transaction result is a TransactionRecord\n *\n * @param result - The transaction result to check.\n * @returns True if the result is a TransactionRecord with id and status fields.\n */\nexport function isTransactionRecord(\n result: LastTransactionResult | TransactionRecord,\n): result is TransactionRecord {\n return hasProperty(result, 'id') && hasProperty(result, 'status');\n}\n\n/**\n * Type guard to check if a transaction result is a LastTransactionResult\n *\n * @param result - The transaction result to check.\n * @returns True if the result is a LastTransactionResult without id or status fields.\n */\nexport function isLastTransactionResult(\n result: LastTransactionResult | TransactionRecord,\n): result is LastTransactionResult {\n return !hasProperty(result, 'id') || !hasProperty(result, 'status');\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactionTypes.d.cts","sourceRoot":"","sources":["../../src/types/transactionTypes.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAC1C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,qBAAqB,GAAG,iBAAiB,GAChD,MAAM,IAAI,iBAAiB,CAE7B;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,qBAAqB,GAAG,iBAAiB,GAChD,MAAM,IAAI,qBAAqB,CAEjC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base type with core properties shared between all transaction results
|
|
3
|
-
* All properties are JSON serializable for controller state compatibility
|
|
4
|
-
*/
|
|
5
|
-
export type BaseTransactionResult = {
|
|
6
|
-
amount: string;
|
|
7
|
-
asset: string;
|
|
8
|
-
txHash?: string;
|
|
9
|
-
timestamp: number;
|
|
10
|
-
success: boolean;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* For transient UI feedback (toasts, progress indicators)
|
|
14
|
-
* Used for immediate success/failure notifications
|
|
15
|
-
* JSON serializable for controller state
|
|
16
|
-
*/
|
|
17
|
-
export type LastTransactionResult = {
|
|
18
|
-
amount: string;
|
|
19
|
-
asset: string;
|
|
20
|
-
txHash: string;
|
|
21
|
-
timestamp: number;
|
|
22
|
-
success: boolean;
|
|
23
|
-
error: string;
|
|
24
|
-
[key: string]: string | number | boolean;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* For persistent transaction history tracking
|
|
28
|
-
* Used for transaction history display and detailed status tracking
|
|
29
|
-
* JSON serializable for controller state
|
|
30
|
-
*/
|
|
31
|
-
export type TransactionStatus = 'pending' | 'bridging' | 'completed' | 'failed';
|
|
32
|
-
export type TransactionRecord = {
|
|
33
|
-
id: string;
|
|
34
|
-
amount: string;
|
|
35
|
-
asset: string;
|
|
36
|
-
txHash?: string;
|
|
37
|
-
timestamp: number;
|
|
38
|
-
success: boolean;
|
|
39
|
-
status: TransactionStatus;
|
|
40
|
-
destination?: string;
|
|
41
|
-
source?: string;
|
|
42
|
-
transactionId?: string;
|
|
43
|
-
withdrawalId?: string;
|
|
44
|
-
depositId?: string;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Type guard to check if a transaction result is a TransactionRecord
|
|
48
|
-
*
|
|
49
|
-
* @param result - The transaction result to check.
|
|
50
|
-
* @returns True if the result is a TransactionRecord with id and status fields.
|
|
51
|
-
*/
|
|
52
|
-
export declare function isTransactionRecord(result: LastTransactionResult | TransactionRecord): result is TransactionRecord;
|
|
53
|
-
/**
|
|
54
|
-
* Type guard to check if a transaction result is a LastTransactionResult
|
|
55
|
-
*
|
|
56
|
-
* @param result - The transaction result to check.
|
|
57
|
-
* @returns True if the result is a LastTransactionResult without id or status fields.
|
|
58
|
-
*/
|
|
59
|
-
export declare function isLastTransactionResult(result: LastTransactionResult | TransactionRecord): result is LastTransactionResult;
|
|
60
|
-
//# sourceMappingURL=transactionTypes.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactionTypes.d.mts","sourceRoot":"","sources":["../../src/types/transactionTypes.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,M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AAC,CAAC;AACpE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAiD;IAEjD,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACtE,CAAC","sourcesContent":["/**\n * Shared transaction types for Perps deposits and withdrawals\n * Provides a unified structure while maintaining separate use cases\n */\nimport { hasProperty } from '@metamask/utils';\n\n/**\n * Base type with core properties shared between all transaction results\n * All properties are JSON serializable for controller state compatibility\n */\nexport type BaseTransactionResult = {\n amount: string;\n asset: string;\n txHash?: string;\n timestamp: number;\n success: boolean; // explicit to avoid regressions\n};\n\n/**\n * For transient UI feedback (toasts, progress indicators)\n * Used for immediate success/failure notifications\n * JSON serializable for controller state\n */\nexport type LastTransactionResult = {\n amount: string;\n asset: string;\n txHash: string;\n timestamp: number;\n success: boolean;\n error: string;\n [key: string]: string | number | boolean;\n};\n\n/**\n * For persistent transaction history tracking\n * Used for transaction history display and detailed status tracking\n * JSON serializable for controller state\n */\nexport type TransactionStatus = 'pending' | 'bridging' | 'completed' | 'failed';\n\nexport type TransactionRecord = {\n id: string;\n amount: string;\n asset: string;\n txHash?: string;\n timestamp: number;\n success: boolean;\n status: TransactionStatus;\n destination?: string; // mainly for withdrawals\n source?: string; // mainly for deposits\n transactionId?: string; // generic - could be withdrawalId or depositId\n // Legacy fields for backward compatibility\n withdrawalId?: string; // for withdrawals\n depositId?: string; // for deposits\n};\n\n/**\n * Type guard to check if a transaction result is a TransactionRecord\n *\n * @param result - The transaction result to check.\n * @returns True if the result is a TransactionRecord with id and status fields.\n */\nexport function isTransactionRecord(\n result: LastTransactionResult | TransactionRecord,\n): result is TransactionRecord {\n return hasProperty(result, 'id') && hasProperty(result, 'status');\n}\n\n/**\n * Type guard to check if a transaction result is a LastTransactionResult\n *\n * @param result - The transaction result to check.\n * @returns True if the result is a LastTransactionResult without id or status fields.\n */\nexport function isLastTransactionResult(\n result: LastTransactionResult | TransactionRecord,\n): result is LastTransactionResult {\n return !hasProperty(result, 'id') || !hasProperty(result, 'status');\n}\n"]}
|