@metamask-previews/perps-controller 0.0.0-preview-e4aa1532 → 0.0.0-preview-6dfa4aeba
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 +1 -11
- package/dist/PerpsController.cjs +66 -2224
- package/dist/PerpsController.cjs.map +1 -1
- package/dist/PerpsController.d.cts +79 -933
- package/dist/PerpsController.d.cts.map +1 -1
- package/dist/PerpsController.d.mts +79 -933
- package/dist/PerpsController.d.mts.map +1 -1
- package/dist/PerpsController.mjs +64 -2221
- package/dist/PerpsController.mjs.map +1 -1
- package/dist/index.cjs +1 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -6
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -6
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -19
- package/dist/__mocks__/hyperliquidMock.cjs +0 -68
- package/dist/__mocks__/hyperliquidMock.cjs.map +0 -1
- package/dist/__mocks__/hyperliquidMock.d.cts +0 -15
- package/dist/__mocks__/hyperliquidMock.d.cts.map +0 -1
- package/dist/__mocks__/hyperliquidMock.d.mts +0 -15
- package/dist/__mocks__/hyperliquidMock.d.mts.map +0 -1
- package/dist/__mocks__/hyperliquidMock.mjs +0 -65
- package/dist/__mocks__/hyperliquidMock.mjs.map +0 -1
- package/dist/__mocks__/providerMocks.cjs +0 -144
- package/dist/__mocks__/providerMocks.cjs.map +0 -1
- package/dist/__mocks__/providerMocks.d.cts +0 -44
- package/dist/__mocks__/providerMocks.d.cts.map +0 -1
- package/dist/__mocks__/providerMocks.d.mts +0 -44
- package/dist/__mocks__/providerMocks.d.mts.map +0 -1
- package/dist/__mocks__/providerMocks.mjs +0 -136
- package/dist/__mocks__/providerMocks.mjs.map +0 -1
- package/dist/__mocks__/serviceMocks.cjs +0 -187
- package/dist/__mocks__/serviceMocks.cjs.map +0 -1
- package/dist/__mocks__/serviceMocks.d.cts +0 -58
- package/dist/__mocks__/serviceMocks.d.cts.map +0 -1
- package/dist/__mocks__/serviceMocks.d.mts +0 -58
- package/dist/__mocks__/serviceMocks.d.mts.map +0 -1
- package/dist/__mocks__/serviceMocks.mjs +0 -180
- package/dist/__mocks__/serviceMocks.mjs.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.cjs +0 -459
- package/dist/aggregation/SubscriptionMultiplexer.cjs.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.d.cts +0 -222
- package/dist/aggregation/SubscriptionMultiplexer.d.cts.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.d.mts +0 -222
- package/dist/aggregation/SubscriptionMultiplexer.d.mts.map +0 -1
- package/dist/aggregation/SubscriptionMultiplexer.mjs +0 -455
- 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/eventNames.cjs +0 -117
- package/dist/constants/eventNames.cjs.map +0 -1
- package/dist/constants/eventNames.d.cts +0 -106
- package/dist/constants/eventNames.d.cts.map +0 -1
- package/dist/constants/eventNames.d.mts +0 -106
- package/dist/constants/eventNames.d.mts.map +0 -1
- package/dist/constants/eventNames.mjs +0 -114
- package/dist/constants/eventNames.mjs.map +0 -1
- package/dist/constants/hyperLiquidConfig.cjs +0 -366
- package/dist/constants/hyperLiquidConfig.cjs.map +0 -1
- package/dist/constants/hyperLiquidConfig.d.cts +0 -276
- package/dist/constants/hyperLiquidConfig.d.cts.map +0 -1
- package/dist/constants/hyperLiquidConfig.d.mts +0 -276
- package/dist/constants/hyperLiquidConfig.d.mts.map +0 -1
- package/dist/constants/hyperLiquidConfig.mjs +0 -357
- package/dist/constants/hyperLiquidConfig.mjs.map +0 -1
- package/dist/constants/index.cjs +0 -23
- package/dist/constants/index.cjs.map +0 -1
- package/dist/constants/index.d.cts +0 -7
- package/dist/constants/index.d.cts.map +0 -1
- package/dist/constants/index.d.mts +0 -7
- package/dist/constants/index.d.mts.map +0 -1
- package/dist/constants/index.mjs +0 -7
- package/dist/constants/index.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 -61
- package/dist/constants/performanceMetrics.cjs.map +0 -1
- package/dist/constants/performanceMetrics.d.cts +0 -44
- package/dist/constants/performanceMetrics.d.cts.map +0 -1
- package/dist/constants/performanceMetrics.d.mts +0 -44
- package/dist/constants/performanceMetrics.d.mts.map +0 -1
- package/dist/constants/performanceMetrics.mjs +0 -58
- package/dist/constants/performanceMetrics.mjs.map +0 -1
- package/dist/constants/perpsConfig.cjs +0 -461
- package/dist/constants/perpsConfig.cjs.map +0 -1
- package/dist/constants/perpsConfig.d.cts +0 -343
- package/dist/constants/perpsConfig.d.cts.map +0 -1
- package/dist/constants/perpsConfig.d.mts +0 -343
- package/dist/constants/perpsConfig.d.mts.map +0 -1
- package/dist/constants/perpsConfig.mjs +0 -458
- package/dist/constants/perpsConfig.mjs.map +0 -1
- package/dist/constants/perpsErrorCodes.cjs +0 -79
- package/dist/constants/perpsErrorCodes.cjs.map +0 -1
- package/dist/constants/perpsErrorCodes.d.cts +0 -64
- package/dist/constants/perpsErrorCodes.d.cts.map +0 -1
- package/dist/constants/perpsErrorCodes.d.mts +0 -64
- package/dist/constants/perpsErrorCodes.d.mts.map +0 -1
- package/dist/constants/perpsErrorCodes.mjs +0 -76
- package/dist/constants/perpsErrorCodes.mjs.map +0 -1
- package/dist/platform-services/HyperLiquidClientService.cjs +0 -857
- package/dist/platform-services/HyperLiquidClientService.cjs.map +0 -1
- package/dist/platform-services/HyperLiquidClientService.d.cts +0 -263
- package/dist/platform-services/HyperLiquidClientService.d.cts.map +0 -1
- package/dist/platform-services/HyperLiquidClientService.d.mts +0 -263
- package/dist/platform-services/HyperLiquidClientService.d.mts.map +0 -1
- package/dist/platform-services/HyperLiquidClientService.mjs +0 -853
- package/dist/platform-services/HyperLiquidClientService.mjs.map +0 -1
- package/dist/platform-services/HyperLiquidSubscriptionService.cjs +0 -2170
- package/dist/platform-services/HyperLiquidSubscriptionService.cjs.map +0 -1
- package/dist/platform-services/HyperLiquidSubscriptionService.d.cts +0 -424
- package/dist/platform-services/HyperLiquidSubscriptionService.d.cts.map +0 -1
- package/dist/platform-services/HyperLiquidSubscriptionService.d.mts +0 -424
- package/dist/platform-services/HyperLiquidSubscriptionService.d.mts.map +0 -1
- package/dist/platform-services/HyperLiquidSubscriptionService.mjs +0 -2166
- package/dist/platform-services/HyperLiquidSubscriptionService.mjs.map +0 -1
- package/dist/platform-services/HyperLiquidWalletService.cjs +0 -140
- package/dist/platform-services/HyperLiquidWalletService.cjs.map +0 -1
- package/dist/platform-services/HyperLiquidWalletService.d.cts +0 -78
- package/dist/platform-services/HyperLiquidWalletService.d.cts.map +0 -1
- package/dist/platform-services/HyperLiquidWalletService.d.mts +0 -78
- package/dist/platform-services/HyperLiquidWalletService.d.mts.map +0 -1
- package/dist/platform-services/HyperLiquidWalletService.mjs +0 -136
- package/dist/platform-services/HyperLiquidWalletService.mjs.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.cjs +0 -777
- package/dist/providers/AggregatedPerpsProvider.cjs.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.d.cts +0 -466
- package/dist/providers/AggregatedPerpsProvider.d.cts.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.d.mts +0 -466
- package/dist/providers/AggregatedPerpsProvider.d.mts.map +0 -1
- package/dist/providers/AggregatedPerpsProvider.mjs +0 -773
- package/dist/providers/AggregatedPerpsProvider.mjs.map +0 -1
- package/dist/providers/HyperLiquidProvider.cjs +0 -5172
- package/dist/providers/HyperLiquidProvider.cjs.map +0 -1
- package/dist/providers/HyperLiquidProvider.d.cts +0 -881
- package/dist/providers/HyperLiquidProvider.d.cts.map +0 -1
- package/dist/providers/HyperLiquidProvider.d.mts +0 -881
- package/dist/providers/HyperLiquidProvider.d.mts.map +0 -1
- package/dist/providers/HyperLiquidProvider.mjs +0 -5168
- package/dist/providers/HyperLiquidProvider.mjs.map +0 -1
- package/dist/providers/index.cjs +0 -11
- package/dist/providers/index.cjs.map +0 -1
- package/dist/providers/index.d.cts +0 -6
- package/dist/providers/index.d.cts.map +0 -1
- package/dist/providers/index.d.mts +0 -6
- package/dist/providers/index.d.mts.map +0 -1
- package/dist/providers/index.mjs +0 -6
- package/dist/providers/index.mjs.map +0 -1
- package/dist/routing/ProviderRouter.cjs +0 -148
- package/dist/routing/ProviderRouter.cjs.map +0 -1
- package/dist/routing/ProviderRouter.d.cts +0 -124
- package/dist/routing/ProviderRouter.d.cts.map +0 -1
- package/dist/routing/ProviderRouter.d.mts +0 -124
- package/dist/routing/ProviderRouter.d.mts.map +0 -1
- package/dist/routing/ProviderRouter.mjs +0 -144
- 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 -161
- package/dist/selectors.cjs.map +0 -1
- package/dist/selectors.d.cts +0 -345
- package/dist/selectors.d.cts.map +0 -1
- package/dist/selectors.d.mts +0 -345
- package/dist/selectors.d.mts.map +0 -1
- package/dist/selectors.mjs +0 -153
- package/dist/selectors.mjs.map +0 -1
- package/dist/services/AccountService.cjs +0 -313
- package/dist/services/AccountService.cjs.map +0 -1
- package/dist/services/AccountService.d.cts +0 -53
- package/dist/services/AccountService.d.cts.map +0 -1
- package/dist/services/AccountService.d.mts +0 -53
- package/dist/services/AccountService.d.mts.map +0 -1
- package/dist/services/AccountService.mjs +0 -309
- package/dist/services/AccountService.mjs.map +0 -1
- package/dist/services/DataLakeService.cjs +0 -219
- package/dist/services/DataLakeService.cjs.map +0 -1
- package/dist/services/DataLakeService.d.cts +0 -49
- package/dist/services/DataLakeService.d.cts.map +0 -1
- package/dist/services/DataLakeService.d.mts +0 -49
- package/dist/services/DataLakeService.d.mts.map +0 -1
- package/dist/services/DataLakeService.mjs +0 -215
- package/dist/services/DataLakeService.mjs.map +0 -1
- package/dist/services/DepositService.cjs +0 -96
- package/dist/services/DepositService.cjs.map +0 -1
- package/dist/services/DepositService.d.cts +0 -37
- package/dist/services/DepositService.d.cts.map +0 -1
- package/dist/services/DepositService.d.mts +0 -37
- package/dist/services/DepositService.d.mts.map +0 -1
- package/dist/services/DepositService.mjs +0 -92
- package/dist/services/DepositService.mjs.map +0 -1
- package/dist/services/EligibilityService.cjs +0 -156
- package/dist/services/EligibilityService.cjs.map +0 -1
- package/dist/services/EligibilityService.d.cts +0 -48
- package/dist/services/EligibilityService.d.cts.map +0 -1
- package/dist/services/EligibilityService.d.mts +0 -48
- package/dist/services/EligibilityService.d.mts.map +0 -1
- package/dist/services/EligibilityService.mjs +0 -152
- package/dist/services/EligibilityService.mjs.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.cjs +0 -258
- package/dist/services/FeatureFlagConfigurationService.cjs.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.d.cts +0 -100
- package/dist/services/FeatureFlagConfigurationService.d.cts.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.d.mts +0 -100
- package/dist/services/FeatureFlagConfigurationService.d.mts.map +0 -1
- package/dist/services/FeatureFlagConfigurationService.mjs +0 -254
- package/dist/services/FeatureFlagConfigurationService.mjs.map +0 -1
- package/dist/services/MarketDataService.cjs +0 -875
- package/dist/services/MarketDataService.cjs.map +0 -1
- package/dist/services/MarketDataService.d.cts +0 -289
- package/dist/services/MarketDataService.d.cts.map +0 -1
- package/dist/services/MarketDataService.d.mts +0 -289
- package/dist/services/MarketDataService.d.mts.map +0 -1
- package/dist/services/MarketDataService.mjs +0 -871
- package/dist/services/MarketDataService.mjs.map +0 -1
- package/dist/services/RewardsIntegrationService.cjs +0 -94
- package/dist/services/RewardsIntegrationService.cjs.map +0 -1
- package/dist/services/RewardsIntegrationService.d.cts +0 -30
- package/dist/services/RewardsIntegrationService.d.cts.map +0 -1
- package/dist/services/RewardsIntegrationService.d.mts +0 -30
- package/dist/services/RewardsIntegrationService.d.mts.map +0 -1
- package/dist/services/RewardsIntegrationService.mjs +0 -90
- 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 -110
- package/dist/services/ServiceContext.d.cts.map +0 -1
- package/dist/services/ServiceContext.d.mts +0 -110
- 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/TradingService.cjs +0 -1481
- package/dist/services/TradingService.cjs.map +0 -1
- package/dist/services/TradingService.d.cts +0 -308
- package/dist/services/TradingService.d.cts.map +0 -1
- package/dist/services/TradingService.d.mts +0 -308
- package/dist/services/TradingService.d.mts.map +0 -1
- package/dist/services/TradingService.mjs +0 -1477
- package/dist/services/TradingService.mjs.map +0 -1
- package/dist/services/index.cjs +0 -26
- package/dist/services/index.cjs.map +0 -1
- package/dist/services/index.d.cts +0 -11
- package/dist/services/index.d.cts.map +0 -1
- package/dist/services/index.d.mts +0 -11
- package/dist/services/index.d.mts.map +0 -1
- package/dist/services/index.mjs +0 -10
- package/dist/services/index.mjs.map +0 -1
- package/dist/services/utils.cjs +0 -16
- package/dist/services/utils.cjs.map +0 -1
- package/dist/services/utils.d.cts +0 -8
- package/dist/services/utils.d.cts.map +0 -1
- package/dist/services/utils.d.mts +0 -8
- package/dist/services/utils.d.mts.map +0 -1
- package/dist/services/utils.mjs +0 -12
- package/dist/services/utils.mjs.map +0 -1
- package/dist/types/chart.cjs +0 -42
- package/dist/types/chart.cjs.map +0 -1
- package/dist/types/chart.d.cts +0 -62
- package/dist/types/chart.d.cts.map +0 -1
- package/dist/types/chart.d.mts +0 -62
- package/dist/types/chart.d.mts.map +0 -1
- package/dist/types/chart.mjs +0 -39
- package/dist/types/chart.mjs.map +0 -1
- package/dist/types/hyperliquid-types.cjs +0 -3
- package/dist/types/hyperliquid-types.cjs.map +0 -1
- package/dist/types/hyperliquid-types.d.cts +0 -52
- package/dist/types/hyperliquid-types.d.cts.map +0 -1
- package/dist/types/hyperliquid-types.d.mts +0 -52
- package/dist/types/hyperliquid-types.d.mts.map +0 -1
- package/dist/types/hyperliquid-types.mjs +0 -2
- package/dist/types/hyperliquid-types.mjs.map +0 -1
- package/dist/types/index.cjs +0 -96
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -1153
- package/dist/types/index.d.cts.map +0 -1
- package/dist/types/index.d.mts +0 -1153
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.mjs +0 -79
- package/dist/types/index.mjs.map +0 -1
- package/dist/types/transactionTypes.cjs +0 -28
- package/dist/types/transactionTypes.cjs.map +0 -1
- package/dist/types/transactionTypes.d.cts +0 -64
- package/dist/types/transactionTypes.d.cts.map +0 -1
- package/dist/types/transactionTypes.d.mts +0 -64
- package/dist/types/transactionTypes.d.mts.map +0 -1
- package/dist/types/transactionTypes.mjs +0 -23
- package/dist/types/transactionTypes.mjs.map +0 -1
- package/dist/utils/accountUtils.cjs +0 -65
- package/dist/utils/accountUtils.cjs.map +0 -1
- package/dist/utils/accountUtils.d.cts +0 -26
- package/dist/utils/accountUtils.d.cts.map +0 -1
- package/dist/utils/accountUtils.d.mts +0 -26
- package/dist/utils/accountUtils.d.mts.map +0 -1
- package/dist/utils/accountUtils.mjs +0 -61
- package/dist/utils/accountUtils.mjs.map +0 -1
- package/dist/utils/amountConversion.cjs +0 -61
- package/dist/utils/amountConversion.cjs.map +0 -1
- package/dist/utils/amountConversion.d.cts +0 -16
- package/dist/utils/amountConversion.d.cts.map +0 -1
- package/dist/utils/amountConversion.d.mts +0 -16
- package/dist/utils/amountConversion.d.mts.map +0 -1
- package/dist/utils/amountConversion.mjs +0 -54
- package/dist/utils/amountConversion.mjs.map +0 -1
- package/dist/utils/chartUtils.cjs +0 -98
- package/dist/utils/chartUtils.cjs.map +0 -1
- package/dist/utils/chartUtils.d.cts +0 -14
- package/dist/utils/chartUtils.d.cts.map +0 -1
- package/dist/utils/chartUtils.d.mts +0 -14
- package/dist/utils/chartUtils.d.mts.map +0 -1
- package/dist/utils/chartUtils.mjs +0 -94
- package/dist/utils/chartUtils.mjs.map +0 -1
- package/dist/utils/errorUtils.cjs +0 -22
- package/dist/utils/errorUtils.cjs.map +0 -1
- package/dist/utils/errorUtils.d.cts +0 -13
- package/dist/utils/errorUtils.d.cts.map +0 -1
- package/dist/utils/errorUtils.d.mts +0 -13
- package/dist/utils/errorUtils.d.mts.map +0 -1
- package/dist/utils/errorUtils.mjs +0 -18
- package/dist/utils/errorUtils.mjs.map +0 -1
- package/dist/utils/formatUtils.cjs +0 -987
- package/dist/utils/formatUtils.cjs.map +0 -1
- package/dist/utils/formatUtils.d.cts +0 -387
- package/dist/utils/formatUtils.d.cts.map +0 -1
- package/dist/utils/formatUtils.d.mts +0 -387
- package/dist/utils/formatUtils.d.mts.map +0 -1
- package/dist/utils/formatUtils.mjs +0 -966
- package/dist/utils/formatUtils.mjs.map +0 -1
- package/dist/utils/hyperLiquidAdapter.cjs +0 -454
- package/dist/utils/hyperLiquidAdapter.cjs.map +0 -1
- package/dist/utils/hyperLiquidAdapter.d.cts +0 -158
- package/dist/utils/hyperLiquidAdapter.d.cts.map +0 -1
- package/dist/utils/hyperLiquidAdapter.d.mts +0 -158
- package/dist/utils/hyperLiquidAdapter.d.mts.map +0 -1
- package/dist/utils/hyperLiquidAdapter.mjs +0 -439
- package/dist/utils/hyperLiquidAdapter.mjs.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.cjs +0 -89
- package/dist/utils/hyperLiquidOrderBookProcessor.cjs.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.d.cts +0 -58
- package/dist/utils/hyperLiquidOrderBookProcessor.d.cts.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.d.mts +0 -58
- package/dist/utils/hyperLiquidOrderBookProcessor.d.mts.map +0 -1
- package/dist/utils/hyperLiquidOrderBookProcessor.mjs +0 -84
- package/dist/utils/hyperLiquidOrderBookProcessor.mjs.map +0 -1
- package/dist/utils/hyperLiquidValidation.cjs +0 -426
- package/dist/utils/hyperLiquidValidation.cjs.map +0 -1
- package/dist/utils/hyperLiquidValidation.d.cts +0 -143
- package/dist/utils/hyperLiquidValidation.d.cts.map +0 -1
- package/dist/utils/hyperLiquidValidation.d.mts +0 -143
- package/dist/utils/hyperLiquidValidation.d.mts.map +0 -1
- package/dist/utils/hyperLiquidValidation.mjs +0 -413
- package/dist/utils/hyperLiquidValidation.mjs.map +0 -1
- package/dist/utils/idUtils.cjs +0 -50
- package/dist/utils/idUtils.cjs.map +0 -1
- package/dist/utils/idUtils.d.cts +0 -38
- package/dist/utils/idUtils.d.cts.map +0 -1
- package/dist/utils/idUtils.d.mts +0 -38
- package/dist/utils/idUtils.d.mts.map +0 -1
- package/dist/utils/idUtils.mjs +0 -42
- package/dist/utils/idUtils.mjs.map +0 -1
- package/dist/utils/marginUtils.cjs +0 -137
- package/dist/utils/marginUtils.cjs.map +0 -1
- package/dist/utils/marginUtils.d.cts +0 -64
- package/dist/utils/marginUtils.d.cts.map +0 -1
- package/dist/utils/marginUtils.d.mts +0 -64
- package/dist/utils/marginUtils.d.mts.map +0 -1
- package/dist/utils/marginUtils.mjs +0 -131
- package/dist/utils/marginUtils.mjs.map +0 -1
- package/dist/utils/marketDataTransform.cjs +0 -227
- package/dist/utils/marketDataTransform.cjs.map +0 -1
- package/dist/utils/marketDataTransform.d.cts +0 -45
- package/dist/utils/marketDataTransform.d.cts.map +0 -1
- package/dist/utils/marketDataTransform.d.mts +0 -45
- package/dist/utils/marketDataTransform.d.mts.map +0 -1
- package/dist/utils/marketDataTransform.mjs +0 -220
- package/dist/utils/marketDataTransform.mjs.map +0 -1
- package/dist/utils/marketUtils.cjs +0 -420
- package/dist/utils/marketUtils.cjs.map +0 -1
- package/dist/utils/marketUtils.d.cts +0 -227
- package/dist/utils/marketUtils.d.cts.map +0 -1
- package/dist/utils/marketUtils.d.mts +0 -227
- package/dist/utils/marketUtils.d.mts.map +0 -1
- package/dist/utils/marketUtils.mjs +0 -404
- package/dist/utils/marketUtils.mjs.map +0 -1
- package/dist/utils/orderBookGrouping.cjs +0 -151
- package/dist/utils/orderBookGrouping.cjs.map +0 -1
- package/dist/utils/orderBookGrouping.d.cts +0 -76
- package/dist/utils/orderBookGrouping.d.cts.map +0 -1
- package/dist/utils/orderBookGrouping.d.mts +0 -76
- package/dist/utils/orderBookGrouping.d.mts.map +0 -1
- package/dist/utils/orderBookGrouping.mjs +0 -143
- package/dist/utils/orderBookGrouping.mjs.map +0 -1
- package/dist/utils/orderCalculations.cjs +0 -283
- package/dist/utils/orderCalculations.cjs.map +0 -1
- package/dist/utils/orderCalculations.d.cts +0 -107
- package/dist/utils/orderCalculations.d.cts.map +0 -1
- package/dist/utils/orderCalculations.d.mts +0 -107
- package/dist/utils/orderCalculations.d.mts.map +0 -1
- package/dist/utils/orderCalculations.mjs +0 -274
- package/dist/utils/orderCalculations.mjs.map +0 -1
- package/dist/utils/orderUtils.cjs +0 -159
- package/dist/utils/orderUtils.cjs.map +0 -1
- package/dist/utils/orderUtils.d.cts +0 -66
- package/dist/utils/orderUtils.d.cts.map +0 -1
- package/dist/utils/orderUtils.d.mts +0 -66
- package/dist/utils/orderUtils.d.mts.map +0 -1
- package/dist/utils/orderUtils.mjs +0 -151
- package/dist/utils/orderUtils.mjs.map +0 -1
- package/dist/utils/pnlCalculations.cjs +0 -107
- package/dist/utils/pnlCalculations.cjs.map +0 -1
- package/dist/utils/pnlCalculations.d.cts +0 -79
- package/dist/utils/pnlCalculations.d.cts.map +0 -1
- package/dist/utils/pnlCalculations.d.mts +0 -79
- package/dist/utils/pnlCalculations.d.mts.map +0 -1
- package/dist/utils/pnlCalculations.mjs +0 -97
- package/dist/utils/pnlCalculations.mjs.map +0 -1
- package/dist/utils/positionCalculations.cjs +0 -176
- package/dist/utils/positionCalculations.cjs.map +0 -1
- package/dist/utils/positionCalculations.d.cts +0 -85
- package/dist/utils/positionCalculations.d.cts.map +0 -1
- package/dist/utils/positionCalculations.d.mts +0 -85
- package/dist/utils/positionCalculations.d.mts.map +0 -1
- package/dist/utils/positionCalculations.mjs +0 -165
- package/dist/utils/positionCalculations.mjs.map +0 -1
- package/dist/utils/sortMarkets.cjs +0 -88
- package/dist/utils/sortMarkets.cjs.map +0 -1
- package/dist/utils/sortMarkets.d.cts +0 -21
- package/dist/utils/sortMarkets.d.cts.map +0 -1
- package/dist/utils/sortMarkets.d.mts +0 -21
- package/dist/utils/sortMarkets.d.mts.map +0 -1
- package/dist/utils/sortMarkets.mjs +0 -84
- package/dist/utils/sortMarkets.mjs.map +0 -1
- package/dist/utils/standaloneInfoClient.cjs +0 -34
- package/dist/utils/standaloneInfoClient.cjs.map +0 -1
- package/dist/utils/standaloneInfoClient.d.cts +0 -31
- package/dist/utils/standaloneInfoClient.d.cts.map +0 -1
- package/dist/utils/standaloneInfoClient.d.mts +0 -31
- package/dist/utils/standaloneInfoClient.d.mts.map +0 -1
- package/dist/utils/standaloneInfoClient.mjs +0 -30
- package/dist/utils/standaloneInfoClient.mjs.map +0 -1
- package/dist/utils/stringParseUtils.cjs +0 -49
- package/dist/utils/stringParseUtils.cjs.map +0 -1
- package/dist/utils/stringParseUtils.d.cts +0 -35
- package/dist/utils/stringParseUtils.d.cts.map +0 -1
- package/dist/utils/stringParseUtils.d.mts +0 -35
- package/dist/utils/stringParseUtils.d.mts.map +0 -1
- package/dist/utils/stringParseUtils.mjs +0 -44
- package/dist/utils/stringParseUtils.mjs.map +0 -1
- package/dist/utils/time.cjs +0 -37
- package/dist/utils/time.cjs.map +0 -1
- package/dist/utils/time.d.cts +0 -17
- package/dist/utils/time.d.cts.map +0 -1
- package/dist/utils/time.d.mts +0 -17
- package/dist/utils/time.d.mts.map +0 -1
- package/dist/utils/time.mjs +0 -33
- package/dist/utils/time.mjs.map +0 -1
- package/dist/utils/tpslValidation.cjs +0 -505
- package/dist/utils/tpslValidation.cjs.map +0 -1
- package/dist/utils/tpslValidation.d.cts +0 -182
- package/dist/utils/tpslValidation.d.cts.map +0 -1
- package/dist/utils/tpslValidation.d.mts +0 -182
- package/dist/utils/tpslValidation.d.mts.map +0 -1
- package/dist/utils/tpslValidation.mjs +0 -482
- package/dist/utils/tpslValidation.mjs.map +0 -1
- package/dist/utils/transactionUtils.cjs +0 -36
- package/dist/utils/transactionUtils.cjs.map +0 -1
- package/dist/utils/transactionUtils.d.cts +0 -17
- package/dist/utils/transactionUtils.d.cts.map +0 -1
- package/dist/utils/transactionUtils.d.mts +0 -17
- package/dist/utils/transactionUtils.d.mts.map +0 -1
- package/dist/utils/transactionUtils.mjs +0 -32
- package/dist/utils/transactionUtils.mjs.map +0 -1
- package/dist/utils/wait.cjs +0 -12
- package/dist/utils/wait.cjs.map +0 -1
- package/dist/utils/wait.d.cts +0 -8
- package/dist/utils/wait.d.cts.map +0 -1
- package/dist/utils/wait.d.mts +0 -8
- package/dist/utils/wait.d.mts.map +0 -1
- package/dist/utils/wait.mjs +0 -8
- package/dist/utils/wait.mjs.map +0 -1
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Perps feature constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const PERPS_CONSTANTS: {
|
|
5
|
-
readonly FeatureFlagKey: "perpsEnabled";
|
|
6
|
-
readonly FeatureName: "perps";
|
|
7
|
-
readonly WebsocketTimeout: 5000;
|
|
8
|
-
readonly WebsocketCleanupDelay: 1000;
|
|
9
|
-
readonly BackgroundDisconnectDelay: 20000;
|
|
10
|
-
readonly ConnectionTimeoutMs: 10000;
|
|
11
|
-
readonly DefaultMonitoringTimeoutMs: 10000;
|
|
12
|
-
readonly ConnectionGracePeriodMs: 20000;
|
|
13
|
-
readonly ConnectionAttemptTimeoutMs: 30000;
|
|
14
|
-
readonly WebsocketPingTimeoutMs: 5000;
|
|
15
|
-
readonly ReconnectionCleanupDelayMs: 500;
|
|
16
|
-
readonly ReconnectionDelayAndroidMs: 300;
|
|
17
|
-
readonly ReconnectionDelayIosMs: 100;
|
|
18
|
-
readonly ReconnectionRetryDelayMs: 5000;
|
|
19
|
-
readonly BalanceUpdateThrottleMs: 15000;
|
|
20
|
-
readonly InitialDataDelayMs: 100;
|
|
21
|
-
readonly DefaultAssetPreviewLimit: 5;
|
|
22
|
-
readonly DefaultMaxLeverage: number;
|
|
23
|
-
readonly FallbackPriceDisplay: "$---";
|
|
24
|
-
readonly FallbackPercentageDisplay: "--%";
|
|
25
|
-
readonly FallbackDataDisplay: "--";
|
|
26
|
-
readonly ZeroAmountDisplay: "$0";
|
|
27
|
-
readonly ZeroAmountDetailedDisplay: "$0.00";
|
|
28
|
-
readonly RecentActivityLimit: 3;
|
|
29
|
-
readonly FillsLookbackMs: number;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Withdrawal-specific constants (protocol-agnostic)
|
|
33
|
-
* Note: Protocol-specific values like estimated time should be defined in each protocol's config
|
|
34
|
-
*/
|
|
35
|
-
export declare const WITHDRAWAL_CONSTANTS: {
|
|
36
|
-
readonly DefaultMinAmount: "1.01";
|
|
37
|
-
readonly DefaultFeeAmount: 1;
|
|
38
|
-
readonly DefaultFeeToken: "USDC";
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* MetaMask fee configuration for Perps trading
|
|
42
|
-
* These fees are protocol-agnostic and apply on top of protocol fees
|
|
43
|
-
*/
|
|
44
|
-
export declare const METAMASK_FEE_CONFIG: {
|
|
45
|
-
readonly DepositFee: 0;
|
|
46
|
-
readonly WithdrawalFee: 0;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Minimum number of aggregators (exchanges) a token must be listed on
|
|
50
|
-
* to be considered trustworthy for showing the Perps Discovery Banner.
|
|
51
|
-
* Native tokens (ETH, BNB, etc.) bypass this check.
|
|
52
|
-
*/
|
|
53
|
-
export declare const PERPS_MIN_AGGREGATORS_FOR_TRUST = 2;
|
|
54
|
-
/**
|
|
55
|
-
* Validation thresholds for UI warnings and checks
|
|
56
|
-
* These values control when warnings are shown to users
|
|
57
|
-
*/
|
|
58
|
-
export declare const VALIDATION_THRESHOLDS: {
|
|
59
|
-
readonly HighLeverageWarning: 20;
|
|
60
|
-
readonly LimitPriceDifferenceWarning: 0.1;
|
|
61
|
-
readonly PriceDeviation: 0.1;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Order slippage configuration
|
|
65
|
-
* Controls default slippage tolerance for different order types
|
|
66
|
-
* Conservative defaults based on HyperLiquid platform interface
|
|
67
|
-
* See: docs/perps/hyperliquid/ORDER-MATCHING-ERRORS.md
|
|
68
|
-
*/
|
|
69
|
-
export declare const ORDER_SLIPPAGE_CONFIG: {
|
|
70
|
-
readonly DefaultMarketSlippageBps: 300;
|
|
71
|
-
readonly DefaultTpslSlippageBps: 1000;
|
|
72
|
-
readonly DefaultLimitSlippageBps: 100;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Performance optimization constants
|
|
76
|
-
* These values control debouncing and throttling for better performance
|
|
77
|
-
*/
|
|
78
|
-
export declare const PERFORMANCE_CONFIG: {
|
|
79
|
-
readonly PriceUpdateDebounceMs: 1000;
|
|
80
|
-
readonly ValidationDebounceMs: 300;
|
|
81
|
-
readonly LiquidationPriceDebounceMs: 500;
|
|
82
|
-
readonly NavigationParamsDelayMs: 200;
|
|
83
|
-
readonly TabControlResetDelayMs: 500;
|
|
84
|
-
readonly MarketDataCacheDurationMs: number;
|
|
85
|
-
readonly AssetMetadataCacheDurationMs: number;
|
|
86
|
-
readonly MaxLeverageCacheDurationMs: number;
|
|
87
|
-
readonly FeeDiscountCacheDurationMs: number;
|
|
88
|
-
readonly PointsCalculationCacheDurationMs: number;
|
|
89
|
-
/**
|
|
90
|
-
* Performance logging markers for filtering logs during development and debugging
|
|
91
|
-
* These markers help isolate performance-related logs from general application logs
|
|
92
|
-
* Usage: Use in DevLogger calls to easily filter specific performance areas
|
|
93
|
-
* Impact: Development only (uses DevLogger) - zero production performance cost
|
|
94
|
-
*
|
|
95
|
-
* Examples:
|
|
96
|
-
* - Filter Sentry performance logs: `adb logcat | grep PERPSMARK_SENTRY`
|
|
97
|
-
* - Filter MetaMetrics events: `adb logcat | grep PERPSMARK_METRICS`
|
|
98
|
-
* - Filter WebSocket performance: `adb logcat | grep PERPSMARK_WS`
|
|
99
|
-
* - Filter all Perps performance: `adb logcat | grep PERPSMARK_`
|
|
100
|
-
*/
|
|
101
|
-
readonly LoggingMarkers: {
|
|
102
|
-
readonly SentryPerformance: "PERPSMARK_SENTRY";
|
|
103
|
-
readonly MetametricsEvents: "PERPSMARK_METRICS";
|
|
104
|
-
readonly WebsocketPerformance: "PERPSMARK_SENTRY_WS";
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Leverage slider UI configuration
|
|
109
|
-
* Controls the visual and interactive aspects of the leverage slider
|
|
110
|
-
*/
|
|
111
|
-
export declare const LEVERAGE_SLIDER_CONFIG: {
|
|
112
|
-
readonly TickStepLow: 5;
|
|
113
|
-
readonly TickStepMedium: 10;
|
|
114
|
-
readonly TickStepHigh: 20;
|
|
115
|
-
readonly MaxLeverageLowThreshold: 20;
|
|
116
|
-
readonly MaxLeverageMediumThreshold: 50;
|
|
117
|
-
};
|
|
118
|
-
export declare const TP_SL_CONFIG: {
|
|
119
|
-
readonly UsePositionBoundTpsl: true;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* TP/SL View UI configuration
|
|
123
|
-
* Controls the Take Profit / Stop Loss screen behavior and display options
|
|
124
|
-
*/
|
|
125
|
-
export declare const TP_SL_VIEW_CONFIG: {
|
|
126
|
-
readonly TakeProfitRoePresets: readonly [10, 25, 50, 100];
|
|
127
|
-
readonly StopLossRoePresets: readonly [-5, -10, -25, -50];
|
|
128
|
-
readonly PriceThrottleMs: 1000;
|
|
129
|
-
readonly MaxInputDigits: 9;
|
|
130
|
-
readonly KeypadCurrencyCode: "USD_PERPS";
|
|
131
|
-
readonly KeypadDecimals: 5;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* Limit price configuration
|
|
135
|
-
* Controls preset percentages and behavior for limit orders
|
|
136
|
-
*/
|
|
137
|
-
export declare const LIMIT_PRICE_CONFIG: {
|
|
138
|
-
readonly PresetPercentages: readonly [1, 2];
|
|
139
|
-
readonly ModalOpenDelay: 300;
|
|
140
|
-
readonly LongPresets: readonly [-1, -2];
|
|
141
|
-
readonly ShortPresets: readonly [1, 2];
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* HyperLiquid order limits based on leverage
|
|
145
|
-
* From: https://hyperliquid.gitbook.io/hyperliquid-docs/trading/contract-specifications
|
|
146
|
-
*/
|
|
147
|
-
export declare const HYPERLIQUID_ORDER_LIMITS: {
|
|
148
|
-
readonly MarketOrderLimits: {
|
|
149
|
-
readonly HighLeverage: 15000000;
|
|
150
|
-
readonly MediumHighLeverage: 5000000;
|
|
151
|
-
readonly MediumLeverage: 2000000;
|
|
152
|
-
readonly LowLeverage: 500000;
|
|
153
|
-
};
|
|
154
|
-
readonly LimitOrderMultiplier: 10;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Close position configuration
|
|
158
|
-
* Controls behavior and constants specific to position closing
|
|
159
|
-
*/
|
|
160
|
-
export declare const CLOSE_POSITION_CONFIG: {
|
|
161
|
-
readonly UsdDecimalPlaces: 2;
|
|
162
|
-
readonly DefaultClosePercentage: 100;
|
|
163
|
-
readonly AmountCalculationPrecision: 6;
|
|
164
|
-
readonly PriceThrottleMs: 3000;
|
|
165
|
-
readonly FallbackTokenDecimals: 18;
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Margin adjustment configuration
|
|
169
|
-
* Controls behavior for adding/removing margin from positions
|
|
170
|
-
*/
|
|
171
|
-
export declare const MARGIN_ADJUSTMENT_CONFIG: {
|
|
172
|
-
readonly LiquidationRiskThreshold: 1.2;
|
|
173
|
-
readonly LiquidationWarningThreshold: 1.5;
|
|
174
|
-
readonly MinAdjustmentAmount: 1;
|
|
175
|
-
readonly CalculationPrecision: 6;
|
|
176
|
-
readonly MarginRemovalSafetyBuffer: 0.1;
|
|
177
|
-
readonly FallbackMaxLeverage: 50;
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Data Lake API configuration
|
|
181
|
-
* Endpoints for reporting perps trading activity for notifications
|
|
182
|
-
*/
|
|
183
|
-
export declare const DATA_LAKE_API_CONFIG: {
|
|
184
|
-
readonly OrdersEndpoint: "https://perps.api.cx.metamask.io/api/v1/orders";
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* Funding rate display configuration
|
|
188
|
-
* Controls how funding rates are formatted and displayed across the app
|
|
189
|
-
*/
|
|
190
|
-
export declare const FUNDING_RATE_CONFIG: {
|
|
191
|
-
readonly Decimals: 4;
|
|
192
|
-
readonly ZeroDisplay: "0.0000%";
|
|
193
|
-
readonly PercentageMultiplier: 100;
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Decimal precision configuration
|
|
197
|
-
* Controls maximum decimal places for price and input validation
|
|
198
|
-
*/
|
|
199
|
-
export declare const DECIMAL_PRECISION_CONFIG: {
|
|
200
|
-
readonly MaxPriceDecimals: 6;
|
|
201
|
-
readonly MaxSignificantFigures: 5;
|
|
202
|
-
readonly FallbackSizeDecimals: 6;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* Development-only configuration for testing and debugging
|
|
206
|
-
* These constants are only active when __DEV__ is true
|
|
207
|
-
*/
|
|
208
|
-
export declare const DEVELOPMENT_CONFIG: {
|
|
209
|
-
readonly SimulateFeeDiscountAmount: 41;
|
|
210
|
-
readonly SimulateRewardsErrorAmount: 42;
|
|
211
|
-
readonly SimulateRewardsLoadingAmount: 43;
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* Home screen configuration
|
|
215
|
-
* Controls carousel limits and display settings for the main Perps home screen
|
|
216
|
-
*/
|
|
217
|
-
export declare const HOME_SCREEN_CONFIG: {
|
|
218
|
-
readonly ShowHeaderActionButtons: true;
|
|
219
|
-
readonly PositionsCarouselLimit: 10;
|
|
220
|
-
readonly OrdersCarouselLimit: 10;
|
|
221
|
-
readonly TrendingMarketsLimit: 5;
|
|
222
|
-
readonly RecentActivityLimit: 3;
|
|
223
|
-
readonly CarouselSnapAlignment: "start";
|
|
224
|
-
readonly CarouselVisibleItems: 1.2;
|
|
225
|
-
readonly DefaultIconSize: 40;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* Market sorting configuration
|
|
229
|
-
* Controls sorting behavior and presets for the trending markets view
|
|
230
|
-
*/
|
|
231
|
-
export declare const MARKET_SORTING_CONFIG: {
|
|
232
|
-
readonly DefaultSortOptionId: "volume";
|
|
233
|
-
readonly DefaultDirection: "desc";
|
|
234
|
-
readonly SortFields: {
|
|
235
|
-
readonly Volume: "volume";
|
|
236
|
-
readonly PriceChange: "priceChange";
|
|
237
|
-
readonly OpenInterest: "openInterest";
|
|
238
|
-
readonly FundingRate: "fundingRate";
|
|
239
|
-
};
|
|
240
|
-
readonly SortButtonPresets: readonly [{
|
|
241
|
-
readonly field: "volume";
|
|
242
|
-
readonly labelKey: "perps.sort.volume";
|
|
243
|
-
}, {
|
|
244
|
-
readonly field: "priceChange";
|
|
245
|
-
readonly labelKey: "perps.sort.price_change";
|
|
246
|
-
}, {
|
|
247
|
-
readonly field: "fundingRate";
|
|
248
|
-
readonly labelKey: "perps.sort.funding_rate";
|
|
249
|
-
}];
|
|
250
|
-
readonly SortOptions: readonly [{
|
|
251
|
-
readonly id: "volume";
|
|
252
|
-
readonly labelKey: "perps.sort.volume";
|
|
253
|
-
readonly field: "volume";
|
|
254
|
-
readonly direction: "desc";
|
|
255
|
-
}, {
|
|
256
|
-
readonly id: "priceChange";
|
|
257
|
-
readonly labelKey: "perps.sort.price_change";
|
|
258
|
-
readonly field: "priceChange";
|
|
259
|
-
readonly direction: "desc";
|
|
260
|
-
}, {
|
|
261
|
-
readonly id: "openInterest";
|
|
262
|
-
readonly labelKey: "perps.sort.open_interest";
|
|
263
|
-
readonly field: "openInterest";
|
|
264
|
-
readonly direction: "desc";
|
|
265
|
-
}, {
|
|
266
|
-
readonly id: "fundingRate";
|
|
267
|
-
readonly labelKey: "perps.sort.funding_rate";
|
|
268
|
-
readonly field: "fundingRate";
|
|
269
|
-
readonly direction: "desc";
|
|
270
|
-
}];
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Type for valid sort option IDs
|
|
274
|
-
* Derived from SORT_OPTIONS to ensure type safety
|
|
275
|
-
* Valid values: 'volume' | 'priceChange' | 'openInterest' | 'fundingRate'
|
|
276
|
-
*/
|
|
277
|
-
export type SortOptionId = (typeof MARKET_SORTING_CONFIG.SortOptions)[number]['id'];
|
|
278
|
-
/**
|
|
279
|
-
* Type for sort button presets (filter chips)
|
|
280
|
-
* Derived from SORT_BUTTON_PRESETS to ensure type safety
|
|
281
|
-
*/
|
|
282
|
-
export type SortButtonPreset = (typeof MARKET_SORTING_CONFIG.SortButtonPresets)[number];
|
|
283
|
-
/**
|
|
284
|
-
* Learn more card configuration
|
|
285
|
-
* External resources and content for Perps education
|
|
286
|
-
*/
|
|
287
|
-
export declare const LEARN_MORE_CONFIG: {
|
|
288
|
-
readonly ExternalUrl: "https://metamask.io/perps";
|
|
289
|
-
readonly TitleKey: "perps.tutorial.card.title";
|
|
290
|
-
readonly DescriptionKey: "perps.learn_more.description";
|
|
291
|
-
readonly CtaKey: "perps.learn_more.cta";
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* Support configuration
|
|
295
|
-
* Contact support button configuration (matches Settings behavior)
|
|
296
|
-
*/
|
|
297
|
-
export declare const SUPPORT_CONFIG: {
|
|
298
|
-
readonly Url: "https://support.metamask.io";
|
|
299
|
-
readonly TitleKey: "perps.support.title";
|
|
300
|
-
readonly DescriptionKey: "perps.support.description";
|
|
301
|
-
};
|
|
302
|
-
/**
|
|
303
|
-
* Feedback survey configuration
|
|
304
|
-
* External survey for collecting user feedback on Perps trading experience
|
|
305
|
-
*/
|
|
306
|
-
export declare const FEEDBACK_CONFIG: {
|
|
307
|
-
readonly Url: "https://survey.alchemer.com/s3/8649911/MetaMask-Perps-Trading-Feedback";
|
|
308
|
-
readonly TitleKey: "perps.feedback.title";
|
|
309
|
-
};
|
|
310
|
-
/**
|
|
311
|
-
* Support article URLs
|
|
312
|
-
* Links to specific MetaMask support articles for Perps features
|
|
313
|
-
*/
|
|
314
|
-
export declare const PERPS_SUPPORT_ARTICLES_URLS: {
|
|
315
|
-
readonly AdlUrl: "https://support.metamask.io/manage-crypto/trade/perps/leverage-and-liquidation/#what-is-auto-deleveraging-adl";
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* Stop loss prompt banner configuration
|
|
319
|
-
* Controls when and how the stop loss prompt banner is displayed
|
|
320
|
-
* Based on TAT-1693 specifications
|
|
321
|
-
*/
|
|
322
|
-
export declare const STOP_LOSS_PROMPT_CONFIG: {
|
|
323
|
-
readonly LiquidationDistanceThreshold: 3;
|
|
324
|
-
readonly RoeThreshold: -10;
|
|
325
|
-
readonly MinLossThreshold: -10;
|
|
326
|
-
readonly RoeDebounceMs: 60000;
|
|
327
|
-
readonly PositionMinAgeMs: 60000;
|
|
328
|
-
readonly SuggestedStopLossRoe: -50;
|
|
329
|
-
};
|
|
330
|
-
/**
|
|
331
|
-
* Transactions history configuration
|
|
332
|
-
* Controls history display and data fetching parameters
|
|
333
|
-
*/
|
|
334
|
-
export declare const PERPS_TRANSACTIONS_HISTORY_CONSTANTS: {
|
|
335
|
-
/**
|
|
336
|
-
* Default number of days to look back for funding history.
|
|
337
|
-
* HyperLiquid API requires a startTime and returns max 500 records.
|
|
338
|
-
* Using 365 days ensures most users see their complete recent history.
|
|
339
|
-
* Can be increased if users need older funding data.
|
|
340
|
-
*/
|
|
341
|
-
readonly DefaultFundingHistoryDays: 365;
|
|
342
|
-
};
|
|
343
|
-
//# sourceMappingURL=perpsConfig.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"perpsConfig.d.cts","sourceRoot":"","sources":["../../src/constants/perpsConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;CAYtB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;CASxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;CAexB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;IAwC7B;;;;;;;;;;;OAWG;;;;;;CAWK,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;CASzB,CAAC;AAEX,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAqBpB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAWrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;CAc3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAexB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAwB3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAGvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;CAOtB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;CAY3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;CAWrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;CAiBrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACtB,CAAC,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,qBAAqB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;CAG9B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;CAyB1B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oCAAoC;IAC/C;;;;;OAKG;;CAEK,CAAC"}
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Perps feature constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const PERPS_CONSTANTS: {
|
|
5
|
-
readonly FeatureFlagKey: "perpsEnabled";
|
|
6
|
-
readonly FeatureName: "perps";
|
|
7
|
-
readonly WebsocketTimeout: 5000;
|
|
8
|
-
readonly WebsocketCleanupDelay: 1000;
|
|
9
|
-
readonly BackgroundDisconnectDelay: 20000;
|
|
10
|
-
readonly ConnectionTimeoutMs: 10000;
|
|
11
|
-
readonly DefaultMonitoringTimeoutMs: 10000;
|
|
12
|
-
readonly ConnectionGracePeriodMs: 20000;
|
|
13
|
-
readonly ConnectionAttemptTimeoutMs: 30000;
|
|
14
|
-
readonly WebsocketPingTimeoutMs: 5000;
|
|
15
|
-
readonly ReconnectionCleanupDelayMs: 500;
|
|
16
|
-
readonly ReconnectionDelayAndroidMs: 300;
|
|
17
|
-
readonly ReconnectionDelayIosMs: 100;
|
|
18
|
-
readonly ReconnectionRetryDelayMs: 5000;
|
|
19
|
-
readonly BalanceUpdateThrottleMs: 15000;
|
|
20
|
-
readonly InitialDataDelayMs: 100;
|
|
21
|
-
readonly DefaultAssetPreviewLimit: 5;
|
|
22
|
-
readonly DefaultMaxLeverage: number;
|
|
23
|
-
readonly FallbackPriceDisplay: "$---";
|
|
24
|
-
readonly FallbackPercentageDisplay: "--%";
|
|
25
|
-
readonly FallbackDataDisplay: "--";
|
|
26
|
-
readonly ZeroAmountDisplay: "$0";
|
|
27
|
-
readonly ZeroAmountDetailedDisplay: "$0.00";
|
|
28
|
-
readonly RecentActivityLimit: 3;
|
|
29
|
-
readonly FillsLookbackMs: number;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Withdrawal-specific constants (protocol-agnostic)
|
|
33
|
-
* Note: Protocol-specific values like estimated time should be defined in each protocol's config
|
|
34
|
-
*/
|
|
35
|
-
export declare const WITHDRAWAL_CONSTANTS: {
|
|
36
|
-
readonly DefaultMinAmount: "1.01";
|
|
37
|
-
readonly DefaultFeeAmount: 1;
|
|
38
|
-
readonly DefaultFeeToken: "USDC";
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* MetaMask fee configuration for Perps trading
|
|
42
|
-
* These fees are protocol-agnostic and apply on top of protocol fees
|
|
43
|
-
*/
|
|
44
|
-
export declare const METAMASK_FEE_CONFIG: {
|
|
45
|
-
readonly DepositFee: 0;
|
|
46
|
-
readonly WithdrawalFee: 0;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Minimum number of aggregators (exchanges) a token must be listed on
|
|
50
|
-
* to be considered trustworthy for showing the Perps Discovery Banner.
|
|
51
|
-
* Native tokens (ETH, BNB, etc.) bypass this check.
|
|
52
|
-
*/
|
|
53
|
-
export declare const PERPS_MIN_AGGREGATORS_FOR_TRUST = 2;
|
|
54
|
-
/**
|
|
55
|
-
* Validation thresholds for UI warnings and checks
|
|
56
|
-
* These values control when warnings are shown to users
|
|
57
|
-
*/
|
|
58
|
-
export declare const VALIDATION_THRESHOLDS: {
|
|
59
|
-
readonly HighLeverageWarning: 20;
|
|
60
|
-
readonly LimitPriceDifferenceWarning: 0.1;
|
|
61
|
-
readonly PriceDeviation: 0.1;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Order slippage configuration
|
|
65
|
-
* Controls default slippage tolerance for different order types
|
|
66
|
-
* Conservative defaults based on HyperLiquid platform interface
|
|
67
|
-
* See: docs/perps/hyperliquid/ORDER-MATCHING-ERRORS.md
|
|
68
|
-
*/
|
|
69
|
-
export declare const ORDER_SLIPPAGE_CONFIG: {
|
|
70
|
-
readonly DefaultMarketSlippageBps: 300;
|
|
71
|
-
readonly DefaultTpslSlippageBps: 1000;
|
|
72
|
-
readonly DefaultLimitSlippageBps: 100;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Performance optimization constants
|
|
76
|
-
* These values control debouncing and throttling for better performance
|
|
77
|
-
*/
|
|
78
|
-
export declare const PERFORMANCE_CONFIG: {
|
|
79
|
-
readonly PriceUpdateDebounceMs: 1000;
|
|
80
|
-
readonly ValidationDebounceMs: 300;
|
|
81
|
-
readonly LiquidationPriceDebounceMs: 500;
|
|
82
|
-
readonly NavigationParamsDelayMs: 200;
|
|
83
|
-
readonly TabControlResetDelayMs: 500;
|
|
84
|
-
readonly MarketDataCacheDurationMs: number;
|
|
85
|
-
readonly AssetMetadataCacheDurationMs: number;
|
|
86
|
-
readonly MaxLeverageCacheDurationMs: number;
|
|
87
|
-
readonly FeeDiscountCacheDurationMs: number;
|
|
88
|
-
readonly PointsCalculationCacheDurationMs: number;
|
|
89
|
-
/**
|
|
90
|
-
* Performance logging markers for filtering logs during development and debugging
|
|
91
|
-
* These markers help isolate performance-related logs from general application logs
|
|
92
|
-
* Usage: Use in DevLogger calls to easily filter specific performance areas
|
|
93
|
-
* Impact: Development only (uses DevLogger) - zero production performance cost
|
|
94
|
-
*
|
|
95
|
-
* Examples:
|
|
96
|
-
* - Filter Sentry performance logs: `adb logcat | grep PERPSMARK_SENTRY`
|
|
97
|
-
* - Filter MetaMetrics events: `adb logcat | grep PERPSMARK_METRICS`
|
|
98
|
-
* - Filter WebSocket performance: `adb logcat | grep PERPSMARK_WS`
|
|
99
|
-
* - Filter all Perps performance: `adb logcat | grep PERPSMARK_`
|
|
100
|
-
*/
|
|
101
|
-
readonly LoggingMarkers: {
|
|
102
|
-
readonly SentryPerformance: "PERPSMARK_SENTRY";
|
|
103
|
-
readonly MetametricsEvents: "PERPSMARK_METRICS";
|
|
104
|
-
readonly WebsocketPerformance: "PERPSMARK_SENTRY_WS";
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Leverage slider UI configuration
|
|
109
|
-
* Controls the visual and interactive aspects of the leverage slider
|
|
110
|
-
*/
|
|
111
|
-
export declare const LEVERAGE_SLIDER_CONFIG: {
|
|
112
|
-
readonly TickStepLow: 5;
|
|
113
|
-
readonly TickStepMedium: 10;
|
|
114
|
-
readonly TickStepHigh: 20;
|
|
115
|
-
readonly MaxLeverageLowThreshold: 20;
|
|
116
|
-
readonly MaxLeverageMediumThreshold: 50;
|
|
117
|
-
};
|
|
118
|
-
export declare const TP_SL_CONFIG: {
|
|
119
|
-
readonly UsePositionBoundTpsl: true;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* TP/SL View UI configuration
|
|
123
|
-
* Controls the Take Profit / Stop Loss screen behavior and display options
|
|
124
|
-
*/
|
|
125
|
-
export declare const TP_SL_VIEW_CONFIG: {
|
|
126
|
-
readonly TakeProfitRoePresets: readonly [10, 25, 50, 100];
|
|
127
|
-
readonly StopLossRoePresets: readonly [-5, -10, -25, -50];
|
|
128
|
-
readonly PriceThrottleMs: 1000;
|
|
129
|
-
readonly MaxInputDigits: 9;
|
|
130
|
-
readonly KeypadCurrencyCode: "USD_PERPS";
|
|
131
|
-
readonly KeypadDecimals: 5;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* Limit price configuration
|
|
135
|
-
* Controls preset percentages and behavior for limit orders
|
|
136
|
-
*/
|
|
137
|
-
export declare const LIMIT_PRICE_CONFIG: {
|
|
138
|
-
readonly PresetPercentages: readonly [1, 2];
|
|
139
|
-
readonly ModalOpenDelay: 300;
|
|
140
|
-
readonly LongPresets: readonly [-1, -2];
|
|
141
|
-
readonly ShortPresets: readonly [1, 2];
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* HyperLiquid order limits based on leverage
|
|
145
|
-
* From: https://hyperliquid.gitbook.io/hyperliquid-docs/trading/contract-specifications
|
|
146
|
-
*/
|
|
147
|
-
export declare const HYPERLIQUID_ORDER_LIMITS: {
|
|
148
|
-
readonly MarketOrderLimits: {
|
|
149
|
-
readonly HighLeverage: 15000000;
|
|
150
|
-
readonly MediumHighLeverage: 5000000;
|
|
151
|
-
readonly MediumLeverage: 2000000;
|
|
152
|
-
readonly LowLeverage: 500000;
|
|
153
|
-
};
|
|
154
|
-
readonly LimitOrderMultiplier: 10;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Close position configuration
|
|
158
|
-
* Controls behavior and constants specific to position closing
|
|
159
|
-
*/
|
|
160
|
-
export declare const CLOSE_POSITION_CONFIG: {
|
|
161
|
-
readonly UsdDecimalPlaces: 2;
|
|
162
|
-
readonly DefaultClosePercentage: 100;
|
|
163
|
-
readonly AmountCalculationPrecision: 6;
|
|
164
|
-
readonly PriceThrottleMs: 3000;
|
|
165
|
-
readonly FallbackTokenDecimals: 18;
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Margin adjustment configuration
|
|
169
|
-
* Controls behavior for adding/removing margin from positions
|
|
170
|
-
*/
|
|
171
|
-
export declare const MARGIN_ADJUSTMENT_CONFIG: {
|
|
172
|
-
readonly LiquidationRiskThreshold: 1.2;
|
|
173
|
-
readonly LiquidationWarningThreshold: 1.5;
|
|
174
|
-
readonly MinAdjustmentAmount: 1;
|
|
175
|
-
readonly CalculationPrecision: 6;
|
|
176
|
-
readonly MarginRemovalSafetyBuffer: 0.1;
|
|
177
|
-
readonly FallbackMaxLeverage: 50;
|
|
178
|
-
};
|
|
179
|
-
/**
|
|
180
|
-
* Data Lake API configuration
|
|
181
|
-
* Endpoints for reporting perps trading activity for notifications
|
|
182
|
-
*/
|
|
183
|
-
export declare const DATA_LAKE_API_CONFIG: {
|
|
184
|
-
readonly OrdersEndpoint: "https://perps.api.cx.metamask.io/api/v1/orders";
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* Funding rate display configuration
|
|
188
|
-
* Controls how funding rates are formatted and displayed across the app
|
|
189
|
-
*/
|
|
190
|
-
export declare const FUNDING_RATE_CONFIG: {
|
|
191
|
-
readonly Decimals: 4;
|
|
192
|
-
readonly ZeroDisplay: "0.0000%";
|
|
193
|
-
readonly PercentageMultiplier: 100;
|
|
194
|
-
};
|
|
195
|
-
/**
|
|
196
|
-
* Decimal precision configuration
|
|
197
|
-
* Controls maximum decimal places for price and input validation
|
|
198
|
-
*/
|
|
199
|
-
export declare const DECIMAL_PRECISION_CONFIG: {
|
|
200
|
-
readonly MaxPriceDecimals: 6;
|
|
201
|
-
readonly MaxSignificantFigures: 5;
|
|
202
|
-
readonly FallbackSizeDecimals: 6;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* Development-only configuration for testing and debugging
|
|
206
|
-
* These constants are only active when __DEV__ is true
|
|
207
|
-
*/
|
|
208
|
-
export declare const DEVELOPMENT_CONFIG: {
|
|
209
|
-
readonly SimulateFeeDiscountAmount: 41;
|
|
210
|
-
readonly SimulateRewardsErrorAmount: 42;
|
|
211
|
-
readonly SimulateRewardsLoadingAmount: 43;
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* Home screen configuration
|
|
215
|
-
* Controls carousel limits and display settings for the main Perps home screen
|
|
216
|
-
*/
|
|
217
|
-
export declare const HOME_SCREEN_CONFIG: {
|
|
218
|
-
readonly ShowHeaderActionButtons: true;
|
|
219
|
-
readonly PositionsCarouselLimit: 10;
|
|
220
|
-
readonly OrdersCarouselLimit: 10;
|
|
221
|
-
readonly TrendingMarketsLimit: 5;
|
|
222
|
-
readonly RecentActivityLimit: 3;
|
|
223
|
-
readonly CarouselSnapAlignment: "start";
|
|
224
|
-
readonly CarouselVisibleItems: 1.2;
|
|
225
|
-
readonly DefaultIconSize: 40;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* Market sorting configuration
|
|
229
|
-
* Controls sorting behavior and presets for the trending markets view
|
|
230
|
-
*/
|
|
231
|
-
export declare const MARKET_SORTING_CONFIG: {
|
|
232
|
-
readonly DefaultSortOptionId: "volume";
|
|
233
|
-
readonly DefaultDirection: "desc";
|
|
234
|
-
readonly SortFields: {
|
|
235
|
-
readonly Volume: "volume";
|
|
236
|
-
readonly PriceChange: "priceChange";
|
|
237
|
-
readonly OpenInterest: "openInterest";
|
|
238
|
-
readonly FundingRate: "fundingRate";
|
|
239
|
-
};
|
|
240
|
-
readonly SortButtonPresets: readonly [{
|
|
241
|
-
readonly field: "volume";
|
|
242
|
-
readonly labelKey: "perps.sort.volume";
|
|
243
|
-
}, {
|
|
244
|
-
readonly field: "priceChange";
|
|
245
|
-
readonly labelKey: "perps.sort.price_change";
|
|
246
|
-
}, {
|
|
247
|
-
readonly field: "fundingRate";
|
|
248
|
-
readonly labelKey: "perps.sort.funding_rate";
|
|
249
|
-
}];
|
|
250
|
-
readonly SortOptions: readonly [{
|
|
251
|
-
readonly id: "volume";
|
|
252
|
-
readonly labelKey: "perps.sort.volume";
|
|
253
|
-
readonly field: "volume";
|
|
254
|
-
readonly direction: "desc";
|
|
255
|
-
}, {
|
|
256
|
-
readonly id: "priceChange";
|
|
257
|
-
readonly labelKey: "perps.sort.price_change";
|
|
258
|
-
readonly field: "priceChange";
|
|
259
|
-
readonly direction: "desc";
|
|
260
|
-
}, {
|
|
261
|
-
readonly id: "openInterest";
|
|
262
|
-
readonly labelKey: "perps.sort.open_interest";
|
|
263
|
-
readonly field: "openInterest";
|
|
264
|
-
readonly direction: "desc";
|
|
265
|
-
}, {
|
|
266
|
-
readonly id: "fundingRate";
|
|
267
|
-
readonly labelKey: "perps.sort.funding_rate";
|
|
268
|
-
readonly field: "fundingRate";
|
|
269
|
-
readonly direction: "desc";
|
|
270
|
-
}];
|
|
271
|
-
};
|
|
272
|
-
/**
|
|
273
|
-
* Type for valid sort option IDs
|
|
274
|
-
* Derived from SORT_OPTIONS to ensure type safety
|
|
275
|
-
* Valid values: 'volume' | 'priceChange' | 'openInterest' | 'fundingRate'
|
|
276
|
-
*/
|
|
277
|
-
export type SortOptionId = (typeof MARKET_SORTING_CONFIG.SortOptions)[number]['id'];
|
|
278
|
-
/**
|
|
279
|
-
* Type for sort button presets (filter chips)
|
|
280
|
-
* Derived from SORT_BUTTON_PRESETS to ensure type safety
|
|
281
|
-
*/
|
|
282
|
-
export type SortButtonPreset = (typeof MARKET_SORTING_CONFIG.SortButtonPresets)[number];
|
|
283
|
-
/**
|
|
284
|
-
* Learn more card configuration
|
|
285
|
-
* External resources and content for Perps education
|
|
286
|
-
*/
|
|
287
|
-
export declare const LEARN_MORE_CONFIG: {
|
|
288
|
-
readonly ExternalUrl: "https://metamask.io/perps";
|
|
289
|
-
readonly TitleKey: "perps.tutorial.card.title";
|
|
290
|
-
readonly DescriptionKey: "perps.learn_more.description";
|
|
291
|
-
readonly CtaKey: "perps.learn_more.cta";
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* Support configuration
|
|
295
|
-
* Contact support button configuration (matches Settings behavior)
|
|
296
|
-
*/
|
|
297
|
-
export declare const SUPPORT_CONFIG: {
|
|
298
|
-
readonly Url: "https://support.metamask.io";
|
|
299
|
-
readonly TitleKey: "perps.support.title";
|
|
300
|
-
readonly DescriptionKey: "perps.support.description";
|
|
301
|
-
};
|
|
302
|
-
/**
|
|
303
|
-
* Feedback survey configuration
|
|
304
|
-
* External survey for collecting user feedback on Perps trading experience
|
|
305
|
-
*/
|
|
306
|
-
export declare const FEEDBACK_CONFIG: {
|
|
307
|
-
readonly Url: "https://survey.alchemer.com/s3/8649911/MetaMask-Perps-Trading-Feedback";
|
|
308
|
-
readonly TitleKey: "perps.feedback.title";
|
|
309
|
-
};
|
|
310
|
-
/**
|
|
311
|
-
* Support article URLs
|
|
312
|
-
* Links to specific MetaMask support articles for Perps features
|
|
313
|
-
*/
|
|
314
|
-
export declare const PERPS_SUPPORT_ARTICLES_URLS: {
|
|
315
|
-
readonly AdlUrl: "https://support.metamask.io/manage-crypto/trade/perps/leverage-and-liquidation/#what-is-auto-deleveraging-adl";
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* Stop loss prompt banner configuration
|
|
319
|
-
* Controls when and how the stop loss prompt banner is displayed
|
|
320
|
-
* Based on TAT-1693 specifications
|
|
321
|
-
*/
|
|
322
|
-
export declare const STOP_LOSS_PROMPT_CONFIG: {
|
|
323
|
-
readonly LiquidationDistanceThreshold: 3;
|
|
324
|
-
readonly RoeThreshold: -10;
|
|
325
|
-
readonly MinLossThreshold: -10;
|
|
326
|
-
readonly RoeDebounceMs: 60000;
|
|
327
|
-
readonly PositionMinAgeMs: 60000;
|
|
328
|
-
readonly SuggestedStopLossRoe: -50;
|
|
329
|
-
};
|
|
330
|
-
/**
|
|
331
|
-
* Transactions history configuration
|
|
332
|
-
* Controls history display and data fetching parameters
|
|
333
|
-
*/
|
|
334
|
-
export declare const PERPS_TRANSACTIONS_HISTORY_CONSTANTS: {
|
|
335
|
-
/**
|
|
336
|
-
* Default number of days to look back for funding history.
|
|
337
|
-
* HyperLiquid API requires a startTime and returns max 500 records.
|
|
338
|
-
* Using 365 days ensures most users see their complete recent history.
|
|
339
|
-
* Can be increased if users need older funding data.
|
|
340
|
-
*/
|
|
341
|
-
readonly DefaultFundingHistoryDays: 365;
|
|
342
|
-
};
|
|
343
|
-
//# sourceMappingURL=perpsConfig.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"perpsConfig.d.mts","sourceRoot":"","sources":["../../src/constants/perpsConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CAkClB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;CAYtB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;CASxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;CAexB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;IAwC7B;;;;;;;;;;;OAWG;;;;;;CAWK,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;CASzB,CAAC;AAEX,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;CAqBpB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;CAWrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;CAc3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAexB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;CAwB3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAGvB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;CAOtB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;CAY3B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;CAWrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;CAiBrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDxB,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACtB,CAAC,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE3D;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,qBAAqB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;CAG9B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;CAyB1B,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,oCAAoC;IAC/C;;;;;OAKG;;CAEK,CAAC"}
|