@metamask-previews/perps-controller 0.0.0-preview-b0148922a → 0.0.0-preview-ee1fa5d01

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.
Files changed (482) hide show
  1. package/CHANGELOG.md +0 -25
  2. package/dist/PerpsController.cjs +65 -3077
  3. package/dist/PerpsController.cjs.map +1 -1
  4. package/dist/PerpsController.d.cts +82 -969
  5. package/dist/PerpsController.d.cts.map +1 -1
  6. package/dist/PerpsController.d.mts +82 -969
  7. package/dist/PerpsController.d.mts.map +1 -1
  8. package/dist/PerpsController.mjs +62 -3073
  9. package/dist/PerpsController.mjs.map +1 -1
  10. package/dist/index.cjs +1 -63
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.d.cts +2 -38
  13. package/dist/index.d.cts.map +1 -1
  14. package/dist/index.d.mts +2 -38
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +1 -46
  17. package/dist/index.mjs.map +1 -1
  18. package/package.json +2 -16
  19. package/dist/aggregation/SubscriptionMultiplexer.cjs +0 -441
  20. package/dist/aggregation/SubscriptionMultiplexer.cjs.map +0 -1
  21. package/dist/aggregation/SubscriptionMultiplexer.d.cts +0 -171
  22. package/dist/aggregation/SubscriptionMultiplexer.d.cts.map +0 -1
  23. package/dist/aggregation/SubscriptionMultiplexer.d.mts +0 -171
  24. package/dist/aggregation/SubscriptionMultiplexer.d.mts.map +0 -1
  25. package/dist/aggregation/SubscriptionMultiplexer.mjs +0 -437
  26. package/dist/aggregation/SubscriptionMultiplexer.mjs.map +0 -1
  27. package/dist/aggregation/index.cjs +0 -9
  28. package/dist/aggregation/index.cjs.map +0 -1
  29. package/dist/aggregation/index.d.cts +0 -6
  30. package/dist/aggregation/index.d.cts.map +0 -1
  31. package/dist/aggregation/index.d.mts +0 -6
  32. package/dist/aggregation/index.d.mts.map +0 -1
  33. package/dist/aggregation/index.mjs +0 -5
  34. package/dist/aggregation/index.mjs.map +0 -1
  35. package/dist/constants/chartConfig.cjs +0 -227
  36. package/dist/constants/chartConfig.cjs.map +0 -1
  37. package/dist/constants/chartConfig.d.cts +0 -216
  38. package/dist/constants/chartConfig.d.cts.map +0 -1
  39. package/dist/constants/chartConfig.d.mts +0 -216
  40. package/dist/constants/chartConfig.d.mts.map +0 -1
  41. package/dist/constants/chartConfig.mjs +0 -221
  42. package/dist/constants/chartConfig.mjs.map +0 -1
  43. package/dist/constants/eventNames.cjs +0 -436
  44. package/dist/constants/eventNames.cjs.map +0 -1
  45. package/dist/constants/eventNames.d.cts +0 -387
  46. package/dist/constants/eventNames.d.cts.map +0 -1
  47. package/dist/constants/eventNames.d.mts +0 -387
  48. package/dist/constants/eventNames.d.mts.map +0 -1
  49. package/dist/constants/eventNames.mjs +0 -433
  50. package/dist/constants/eventNames.mjs.map +0 -1
  51. package/dist/constants/hyperLiquidConfig.cjs +0 -380
  52. package/dist/constants/hyperLiquidConfig.cjs.map +0 -1
  53. package/dist/constants/hyperLiquidConfig.d.cts +0 -236
  54. package/dist/constants/hyperLiquidConfig.d.cts.map +0 -1
  55. package/dist/constants/hyperLiquidConfig.d.mts +0 -236
  56. package/dist/constants/hyperLiquidConfig.d.mts.map +0 -1
  57. package/dist/constants/hyperLiquidConfig.mjs +0 -371
  58. package/dist/constants/hyperLiquidConfig.mjs.map +0 -1
  59. package/dist/constants/index.cjs +0 -28
  60. package/dist/constants/index.cjs.map +0 -1
  61. package/dist/constants/index.d.cts +0 -12
  62. package/dist/constants/index.d.cts.map +0 -1
  63. package/dist/constants/index.d.mts +0 -12
  64. package/dist/constants/index.d.mts.map +0 -1
  65. package/dist/constants/index.mjs +0 -12
  66. package/dist/constants/index.mjs.map +0 -1
  67. package/dist/constants/myxConfig.cjs +0 -229
  68. package/dist/constants/myxConfig.cjs.map +0 -1
  69. package/dist/constants/myxConfig.d.cts +0 -106
  70. package/dist/constants/myxConfig.d.cts.map +0 -1
  71. package/dist/constants/myxConfig.d.mts +0 -106
  72. package/dist/constants/myxConfig.d.mts.map +0 -1
  73. package/dist/constants/myxConfig.mjs +0 -219
  74. package/dist/constants/myxConfig.mjs.map +0 -1
  75. package/dist/constants/orderTypes.cjs +0 -31
  76. package/dist/constants/orderTypes.cjs.map +0 -1
  77. package/dist/constants/orderTypes.d.cts +0 -19
  78. package/dist/constants/orderTypes.d.cts.map +0 -1
  79. package/dist/constants/orderTypes.d.mts +0 -19
  80. package/dist/constants/orderTypes.d.mts.map +0 -1
  81. package/dist/constants/orderTypes.mjs +0 -27
  82. package/dist/constants/orderTypes.mjs.map +0 -1
  83. package/dist/constants/performanceMetrics.cjs +0 -63
  84. package/dist/constants/performanceMetrics.cjs.map +0 -1
  85. package/dist/constants/performanceMetrics.d.cts +0 -46
  86. package/dist/constants/performanceMetrics.d.cts.map +0 -1
  87. package/dist/constants/performanceMetrics.d.mts +0 -46
  88. package/dist/constants/performanceMetrics.d.mts.map +0 -1
  89. package/dist/constants/performanceMetrics.mjs +0 -60
  90. package/dist/constants/performanceMetrics.mjs.map +0 -1
  91. package/dist/constants/perpsConfig.cjs +0 -295
  92. package/dist/constants/perpsConfig.cjs.map +0 -1
  93. package/dist/constants/perpsConfig.d.cts +0 -221
  94. package/dist/constants/perpsConfig.d.cts.map +0 -1
  95. package/dist/constants/perpsConfig.d.mts +0 -221
  96. package/dist/constants/perpsConfig.d.mts.map +0 -1
  97. package/dist/constants/perpsConfig.mjs +0 -292
  98. package/dist/constants/perpsConfig.mjs.map +0 -1
  99. package/dist/constants/transactionsHistoryConfig.cjs +0 -19
  100. package/dist/constants/transactionsHistoryConfig.cjs.map +0 -1
  101. package/dist/constants/transactionsHistoryConfig.d.cts +0 -16
  102. package/dist/constants/transactionsHistoryConfig.d.cts.map +0 -1
  103. package/dist/constants/transactionsHistoryConfig.d.mts +0 -16
  104. package/dist/constants/transactionsHistoryConfig.d.mts.map +0 -1
  105. package/dist/constants/transactionsHistoryConfig.mjs +0 -16
  106. package/dist/constants/transactionsHistoryConfig.mjs.map +0 -1
  107. package/dist/perpsErrorCodes.cjs +0 -80
  108. package/dist/perpsErrorCodes.cjs.map +0 -1
  109. package/dist/perpsErrorCodes.d.cts +0 -65
  110. package/dist/perpsErrorCodes.d.cts.map +0 -1
  111. package/dist/perpsErrorCodes.d.mts +0 -65
  112. package/dist/perpsErrorCodes.d.mts.map +0 -1
  113. package/dist/perpsErrorCodes.mjs +0 -77
  114. package/dist/perpsErrorCodes.mjs.map +0 -1
  115. package/dist/providers/AggregatedPerpsProvider.cjs +0 -508
  116. package/dist/providers/AggregatedPerpsProvider.cjs.map +0 -1
  117. package/dist/providers/AggregatedPerpsProvider.d.cts +0 -171
  118. package/dist/providers/AggregatedPerpsProvider.d.cts.map +0 -1
  119. package/dist/providers/AggregatedPerpsProvider.d.mts +0 -171
  120. package/dist/providers/AggregatedPerpsProvider.d.mts.map +0 -1
  121. package/dist/providers/AggregatedPerpsProvider.mjs +0 -504
  122. package/dist/providers/AggregatedPerpsProvider.mjs.map +0 -1
  123. package/dist/providers/HyperLiquidProvider.cjs +0 -5679
  124. package/dist/providers/HyperLiquidProvider.cjs.map +0 -1
  125. package/dist/providers/HyperLiquidProvider.d.cts +0 -516
  126. package/dist/providers/HyperLiquidProvider.d.cts.map +0 -1
  127. package/dist/providers/HyperLiquidProvider.d.mts +0 -516
  128. package/dist/providers/HyperLiquidProvider.d.mts.map +0 -1
  129. package/dist/providers/HyperLiquidProvider.mjs +0 -5675
  130. package/dist/providers/HyperLiquidProvider.mjs.map +0 -1
  131. package/dist/providers/MYXProvider.cjs +0 -514
  132. package/dist/providers/MYXProvider.cjs.map +0 -1
  133. package/dist/providers/MYXProvider.d.cts +0 -105
  134. package/dist/providers/MYXProvider.d.cts.map +0 -1
  135. package/dist/providers/MYXProvider.d.mts +0 -105
  136. package/dist/providers/MYXProvider.d.mts.map +0 -1
  137. package/dist/providers/MYXProvider.mjs +0 -510
  138. package/dist/providers/MYXProvider.mjs.map +0 -1
  139. package/dist/routing/ProviderRouter.cjs +0 -154
  140. package/dist/routing/ProviderRouter.cjs.map +0 -1
  141. package/dist/routing/ProviderRouter.d.cts +0 -112
  142. package/dist/routing/ProviderRouter.d.cts.map +0 -1
  143. package/dist/routing/ProviderRouter.d.mts +0 -112
  144. package/dist/routing/ProviderRouter.d.mts.map +0 -1
  145. package/dist/routing/ProviderRouter.mjs +0 -150
  146. package/dist/routing/ProviderRouter.mjs.map +0 -1
  147. package/dist/routing/index.cjs +0 -9
  148. package/dist/routing/index.cjs.map +0 -1
  149. package/dist/routing/index.d.cts +0 -6
  150. package/dist/routing/index.d.cts.map +0 -1
  151. package/dist/routing/index.d.mts +0 -6
  152. package/dist/routing/index.d.mts.map +0 -1
  153. package/dist/routing/index.mjs +0 -5
  154. package/dist/routing/index.mjs.map +0 -1
  155. package/dist/selectors.cjs +0 -166
  156. package/dist/selectors.cjs.map +0 -1
  157. package/dist/selectors.d.cts +0 -362
  158. package/dist/selectors.d.cts.map +0 -1
  159. package/dist/selectors.d.mts +0 -362
  160. package/dist/selectors.d.mts.map +0 -1
  161. package/dist/selectors.mjs +0 -158
  162. package/dist/selectors.mjs.map +0 -1
  163. package/dist/services/AccountService.cjs +0 -324
  164. package/dist/services/AccountService.cjs.map +0 -1
  165. package/dist/services/AccountService.d.cts +0 -56
  166. package/dist/services/AccountService.d.cts.map +0 -1
  167. package/dist/services/AccountService.d.mts +0 -56
  168. package/dist/services/AccountService.d.mts.map +0 -1
  169. package/dist/services/AccountService.mjs +0 -320
  170. package/dist/services/AccountService.mjs.map +0 -1
  171. package/dist/services/DataLakeService.cjs +0 -233
  172. package/dist/services/DataLakeService.cjs.map +0 -1
  173. package/dist/services/DataLakeService.d.cts +0 -51
  174. package/dist/services/DataLakeService.d.cts.map +0 -1
  175. package/dist/services/DataLakeService.d.mts +0 -51
  176. package/dist/services/DataLakeService.d.mts.map +0 -1
  177. package/dist/services/DataLakeService.mjs +0 -229
  178. package/dist/services/DataLakeService.mjs.map +0 -1
  179. package/dist/services/DepositService.cjs +0 -98
  180. package/dist/services/DepositService.cjs.map +0 -1
  181. package/dist/services/DepositService.d.cts +0 -39
  182. package/dist/services/DepositService.d.cts.map +0 -1
  183. package/dist/services/DepositService.d.mts +0 -39
  184. package/dist/services/DepositService.d.mts.map +0 -1
  185. package/dist/services/DepositService.mjs +0 -94
  186. package/dist/services/DepositService.mjs.map +0 -1
  187. package/dist/services/EligibilityService.cjs +0 -173
  188. package/dist/services/EligibilityService.cjs.map +0 -1
  189. package/dist/services/EligibilityService.d.cts +0 -39
  190. package/dist/services/EligibilityService.d.cts.map +0 -1
  191. package/dist/services/EligibilityService.d.mts +0 -39
  192. package/dist/services/EligibilityService.d.mts.map +0 -1
  193. package/dist/services/EligibilityService.mjs +0 -169
  194. package/dist/services/EligibilityService.mjs.map +0 -1
  195. package/dist/services/FeatureFlagConfigurationService.cjs +0 -257
  196. package/dist/services/FeatureFlagConfigurationService.cjs.map +0 -1
  197. package/dist/services/FeatureFlagConfigurationService.d.cts +0 -73
  198. package/dist/services/FeatureFlagConfigurationService.d.cts.map +0 -1
  199. package/dist/services/FeatureFlagConfigurationService.d.mts +0 -73
  200. package/dist/services/FeatureFlagConfigurationService.d.mts.map +0 -1
  201. package/dist/services/FeatureFlagConfigurationService.mjs +0 -253
  202. package/dist/services/FeatureFlagConfigurationService.mjs.map +0 -1
  203. package/dist/services/HyperLiquidClientService.cjs +0 -867
  204. package/dist/services/HyperLiquidClientService.cjs.map +0 -1
  205. package/dist/services/HyperLiquidClientService.d.cts +0 -214
  206. package/dist/services/HyperLiquidClientService.d.cts.map +0 -1
  207. package/dist/services/HyperLiquidClientService.d.mts +0 -214
  208. package/dist/services/HyperLiquidClientService.d.mts.map +0 -1
  209. package/dist/services/HyperLiquidClientService.mjs +0 -862
  210. package/dist/services/HyperLiquidClientService.mjs.map +0 -1
  211. package/dist/services/HyperLiquidSubscriptionService.cjs +0 -2199
  212. package/dist/services/HyperLiquidSubscriptionService.cjs.map +0 -1
  213. package/dist/services/HyperLiquidSubscriptionService.d.cts +0 -187
  214. package/dist/services/HyperLiquidSubscriptionService.d.cts.map +0 -1
  215. package/dist/services/HyperLiquidSubscriptionService.d.mts +0 -187
  216. package/dist/services/HyperLiquidSubscriptionService.d.mts.map +0 -1
  217. package/dist/services/HyperLiquidSubscriptionService.mjs +0 -2195
  218. package/dist/services/HyperLiquidSubscriptionService.mjs.map +0 -1
  219. package/dist/services/HyperLiquidWalletService.cjs +0 -163
  220. package/dist/services/HyperLiquidWalletService.cjs.map +0 -1
  221. package/dist/services/HyperLiquidWalletService.d.cts +0 -78
  222. package/dist/services/HyperLiquidWalletService.d.cts.map +0 -1
  223. package/dist/services/HyperLiquidWalletService.d.mts +0 -78
  224. package/dist/services/HyperLiquidWalletService.d.mts.map +0 -1
  225. package/dist/services/HyperLiquidWalletService.mjs +0 -159
  226. package/dist/services/HyperLiquidWalletService.mjs.map +0 -1
  227. package/dist/services/MYXClientService.cjs +0 -304
  228. package/dist/services/MYXClientService.cjs.map +0 -1
  229. package/dist/services/MYXClientService.d.cts +0 -81
  230. package/dist/services/MYXClientService.d.cts.map +0 -1
  231. package/dist/services/MYXClientService.d.mts +0 -81
  232. package/dist/services/MYXClientService.d.mts.map +0 -1
  233. package/dist/services/MYXClientService.mjs +0 -300
  234. package/dist/services/MYXClientService.mjs.map +0 -1
  235. package/dist/services/MarketDataService.cjs +0 -848
  236. package/dist/services/MarketDataService.cjs.map +0 -1
  237. package/dist/services/MarketDataService.d.cts +0 -291
  238. package/dist/services/MarketDataService.d.cts.map +0 -1
  239. package/dist/services/MarketDataService.d.mts +0 -291
  240. package/dist/services/MarketDataService.d.mts.map +0 -1
  241. package/dist/services/MarketDataService.mjs +0 -844
  242. package/dist/services/MarketDataService.mjs.map +0 -1
  243. package/dist/services/RewardsIntegrationService.cjs +0 -120
  244. package/dist/services/RewardsIntegrationService.cjs.map +0 -1
  245. package/dist/services/RewardsIntegrationService.d.cts +0 -28
  246. package/dist/services/RewardsIntegrationService.d.cts.map +0 -1
  247. package/dist/services/RewardsIntegrationService.d.mts +0 -28
  248. package/dist/services/RewardsIntegrationService.d.mts.map +0 -1
  249. package/dist/services/RewardsIntegrationService.mjs +0 -116
  250. package/dist/services/RewardsIntegrationService.mjs.map +0 -1
  251. package/dist/services/ServiceContext.cjs +0 -3
  252. package/dist/services/ServiceContext.cjs.map +0 -1
  253. package/dist/services/ServiceContext.d.cts +0 -86
  254. package/dist/services/ServiceContext.d.cts.map +0 -1
  255. package/dist/services/ServiceContext.d.mts +0 -86
  256. package/dist/services/ServiceContext.d.mts.map +0 -1
  257. package/dist/services/ServiceContext.mjs +0 -2
  258. package/dist/services/ServiceContext.mjs.map +0 -1
  259. package/dist/services/TradingReadinessCache.cjs +0 -288
  260. package/dist/services/TradingReadinessCache.cjs.map +0 -1
  261. package/dist/services/TradingReadinessCache.d.cts +0 -174
  262. package/dist/services/TradingReadinessCache.d.cts.map +0 -1
  263. package/dist/services/TradingReadinessCache.d.mts +0 -174
  264. package/dist/services/TradingReadinessCache.d.mts.map +0 -1
  265. package/dist/services/TradingReadinessCache.mjs +0 -285
  266. package/dist/services/TradingReadinessCache.mjs.map +0 -1
  267. package/dist/services/TradingService.cjs +0 -1457
  268. package/dist/services/TradingService.cjs.map +0 -1
  269. package/dist/services/TradingService.d.cts +0 -195
  270. package/dist/services/TradingService.d.cts.map +0 -1
  271. package/dist/services/TradingService.d.mts +0 -195
  272. package/dist/services/TradingService.d.mts.map +0 -1
  273. package/dist/services/TradingService.mjs +0 -1453
  274. package/dist/services/TradingService.mjs.map +0 -1
  275. package/dist/types/config.cjs +0 -3
  276. package/dist/types/config.cjs.map +0 -1
  277. package/dist/types/config.d.cts +0 -49
  278. package/dist/types/config.d.cts.map +0 -1
  279. package/dist/types/config.d.mts +0 -49
  280. package/dist/types/config.d.mts.map +0 -1
  281. package/dist/types/config.mjs +0 -2
  282. package/dist/types/config.mjs.map +0 -1
  283. package/dist/types/hyperliquid-types.cjs +0 -3
  284. package/dist/types/hyperliquid-types.cjs.map +0 -1
  285. package/dist/types/hyperliquid-types.d.cts +0 -20
  286. package/dist/types/hyperliquid-types.d.cts.map +0 -1
  287. package/dist/types/hyperliquid-types.d.mts +0 -20
  288. package/dist/types/hyperliquid-types.d.mts.map +0 -1
  289. package/dist/types/hyperliquid-types.mjs +0 -2
  290. package/dist/types/hyperliquid-types.mjs.map +0 -1
  291. package/dist/types/index.cjs +0 -115
  292. package/dist/types/index.cjs.map +0 -1
  293. package/dist/types/index.d.cts +0 -1262
  294. package/dist/types/index.d.cts.map +0 -1
  295. package/dist/types/index.d.mts +0 -1262
  296. package/dist/types/index.d.mts.map +0 -1
  297. package/dist/types/index.mjs +0 -97
  298. package/dist/types/index.mjs.map +0 -1
  299. package/dist/types/messenger.cjs +0 -3
  300. package/dist/types/messenger.cjs.map +0 -1
  301. package/dist/types/messenger.d.cts +0 -27
  302. package/dist/types/messenger.d.cts.map +0 -1
  303. package/dist/types/messenger.d.mts +0 -27
  304. package/dist/types/messenger.d.mts.map +0 -1
  305. package/dist/types/messenger.mjs +0 -2
  306. package/dist/types/messenger.mjs.map +0 -1
  307. package/dist/types/myx-types.cjs +0 -25
  308. package/dist/types/myx-types.cjs.map +0 -1
  309. package/dist/types/myx-types.d.cts +0 -63
  310. package/dist/types/myx-types.d.cts.map +0 -1
  311. package/dist/types/myx-types.d.mts +0 -63
  312. package/dist/types/myx-types.d.mts.map +0 -1
  313. package/dist/types/myx-types.mjs +0 -22
  314. package/dist/types/myx-types.mjs.map +0 -1
  315. package/dist/types/perps-types.cjs +0 -4
  316. package/dist/types/perps-types.cjs.map +0 -1
  317. package/dist/types/perps-types.d.cts +0 -105
  318. package/dist/types/perps-types.d.cts.map +0 -1
  319. package/dist/types/perps-types.d.mts +0 -105
  320. package/dist/types/perps-types.d.mts.map +0 -1
  321. package/dist/types/perps-types.mjs +0 -2
  322. package/dist/types/perps-types.mjs.map +0 -1
  323. package/dist/types/token.cjs +0 -3
  324. package/dist/types/token.cjs.map +0 -1
  325. package/dist/types/token.d.cts +0 -25
  326. package/dist/types/token.d.cts.map +0 -1
  327. package/dist/types/token.d.mts +0 -25
  328. package/dist/types/token.d.mts.map +0 -1
  329. package/dist/types/token.mjs +0 -2
  330. package/dist/types/token.mjs.map +0 -1
  331. package/dist/types/transactionTypes.cjs +0 -28
  332. package/dist/types/transactionTypes.cjs.map +0 -1
  333. package/dist/types/transactionTypes.d.cts +0 -64
  334. package/dist/types/transactionTypes.d.cts.map +0 -1
  335. package/dist/types/transactionTypes.d.mts +0 -64
  336. package/dist/types/transactionTypes.d.mts.map +0 -1
  337. package/dist/types/transactionTypes.mjs +0 -23
  338. package/dist/types/transactionTypes.mjs.map +0 -1
  339. package/dist/utils/accountUtils.cjs +0 -100
  340. package/dist/utils/accountUtils.cjs.map +0 -1
  341. package/dist/utils/accountUtils.d.cts +0 -30
  342. package/dist/utils/accountUtils.d.cts.map +0 -1
  343. package/dist/utils/accountUtils.d.mts +0 -30
  344. package/dist/utils/accountUtils.d.mts.map +0 -1
  345. package/dist/utils/accountUtils.mjs +0 -92
  346. package/dist/utils/accountUtils.mjs.map +0 -1
  347. package/dist/utils/errorUtils.cjs +0 -35
  348. package/dist/utils/errorUtils.cjs.map +0 -1
  349. package/dist/utils/errorUtils.d.cts +0 -15
  350. package/dist/utils/errorUtils.d.cts.map +0 -1
  351. package/dist/utils/errorUtils.d.mts +0 -15
  352. package/dist/utils/errorUtils.d.mts.map +0 -1
  353. package/dist/utils/errorUtils.mjs +0 -31
  354. package/dist/utils/errorUtils.mjs.map +0 -1
  355. package/dist/utils/hyperLiquidAdapter.cjs +0 -331
  356. package/dist/utils/hyperLiquidAdapter.cjs.map +0 -1
  357. package/dist/utils/hyperLiquidAdapter.d.cts +0 -42
  358. package/dist/utils/hyperLiquidAdapter.d.cts.map +0 -1
  359. package/dist/utils/hyperLiquidAdapter.d.mts +0 -42
  360. package/dist/utils/hyperLiquidAdapter.d.mts.map +0 -1
  361. package/dist/utils/hyperLiquidAdapter.mjs +0 -316
  362. package/dist/utils/hyperLiquidAdapter.mjs.map +0 -1
  363. package/dist/utils/hyperLiquidOrderBookProcessor.cjs +0 -83
  364. package/dist/utils/hyperLiquidOrderBookProcessor.cjs.map +0 -1
  365. package/dist/utils/hyperLiquidOrderBookProcessor.d.cts +0 -55
  366. package/dist/utils/hyperLiquidOrderBookProcessor.d.cts.map +0 -1
  367. package/dist/utils/hyperLiquidOrderBookProcessor.d.mts +0 -55
  368. package/dist/utils/hyperLiquidOrderBookProcessor.d.mts.map +0 -1
  369. package/dist/utils/hyperLiquidOrderBookProcessor.mjs +0 -78
  370. package/dist/utils/hyperLiquidOrderBookProcessor.mjs.map +0 -1
  371. package/dist/utils/hyperLiquidValidation.cjs +0 -426
  372. package/dist/utils/hyperLiquidValidation.cjs.map +0 -1
  373. package/dist/utils/hyperLiquidValidation.d.cts +0 -143
  374. package/dist/utils/hyperLiquidValidation.d.cts.map +0 -1
  375. package/dist/utils/hyperLiquidValidation.d.mts +0 -143
  376. package/dist/utils/hyperLiquidValidation.d.mts.map +0 -1
  377. package/dist/utils/hyperLiquidValidation.mjs +0 -413
  378. package/dist/utils/hyperLiquidValidation.mjs.map +0 -1
  379. package/dist/utils/idUtils.cjs +0 -18
  380. package/dist/utils/idUtils.cjs.map +0 -1
  381. package/dist/utils/idUtils.d.cts +0 -6
  382. package/dist/utils/idUtils.d.cts.map +0 -1
  383. package/dist/utils/idUtils.d.mts +0 -6
  384. package/dist/utils/idUtils.d.mts.map +0 -1
  385. package/dist/utils/idUtils.mjs +0 -10
  386. package/dist/utils/idUtils.mjs.map +0 -1
  387. package/dist/utils/index.cjs +0 -59
  388. package/dist/utils/index.cjs.map +0 -1
  389. package/dist/utils/index.d.cts +0 -25
  390. package/dist/utils/index.d.cts.map +0 -1
  391. package/dist/utils/index.d.mts +0 -25
  392. package/dist/utils/index.d.mts.map +0 -1
  393. package/dist/utils/index.mjs +0 -30
  394. package/dist/utils/index.mjs.map +0 -1
  395. package/dist/utils/marketDataTransform.cjs +0 -211
  396. package/dist/utils/marketDataTransform.cjs.map +0 -1
  397. package/dist/utils/marketDataTransform.d.cts +0 -40
  398. package/dist/utils/marketDataTransform.d.cts.map +0 -1
  399. package/dist/utils/marketDataTransform.d.mts +0 -40
  400. package/dist/utils/marketDataTransform.d.mts.map +0 -1
  401. package/dist/utils/marketDataTransform.mjs +0 -205
  402. package/dist/utils/marketDataTransform.mjs.map +0 -1
  403. package/dist/utils/marketUtils.cjs +0 -151
  404. package/dist/utils/marketUtils.cjs.map +0 -1
  405. package/dist/utils/marketUtils.d.cts +0 -30
  406. package/dist/utils/marketUtils.d.cts.map +0 -1
  407. package/dist/utils/marketUtils.d.mts +0 -30
  408. package/dist/utils/marketUtils.d.mts.map +0 -1
  409. package/dist/utils/marketUtils.mjs +0 -138
  410. package/dist/utils/marketUtils.mjs.map +0 -1
  411. package/dist/utils/myxAdapter.cjs +0 -224
  412. package/dist/utils/myxAdapter.cjs.map +0 -1
  413. package/dist/utils/myxAdapter.d.cts +0 -81
  414. package/dist/utils/myxAdapter.d.cts.map +0 -1
  415. package/dist/utils/myxAdapter.d.mts +0 -81
  416. package/dist/utils/myxAdapter.d.mts.map +0 -1
  417. package/dist/utils/myxAdapter.mjs +0 -213
  418. package/dist/utils/myxAdapter.mjs.map +0 -1
  419. package/dist/utils/orderCalculations.cjs +0 -283
  420. package/dist/utils/orderCalculations.cjs.map +0 -1
  421. package/dist/utils/orderCalculations.d.cts +0 -107
  422. package/dist/utils/orderCalculations.d.cts.map +0 -1
  423. package/dist/utils/orderCalculations.d.mts +0 -107
  424. package/dist/utils/orderCalculations.d.mts.map +0 -1
  425. package/dist/utils/orderCalculations.mjs +0 -274
  426. package/dist/utils/orderCalculations.mjs.map +0 -1
  427. package/dist/utils/rewardsUtils.cjs +0 -98
  428. package/dist/utils/rewardsUtils.cjs.map +0 -1
  429. package/dist/utils/rewardsUtils.d.cts +0 -33
  430. package/dist/utils/rewardsUtils.d.cts.map +0 -1
  431. package/dist/utils/rewardsUtils.d.mts +0 -33
  432. package/dist/utils/rewardsUtils.d.mts.map +0 -1
  433. package/dist/utils/rewardsUtils.mjs +0 -92
  434. package/dist/utils/rewardsUtils.mjs.map +0 -1
  435. package/dist/utils/significantFigures.cjs +0 -88
  436. package/dist/utils/significantFigures.cjs.map +0 -1
  437. package/dist/utils/significantFigures.d.cts +0 -25
  438. package/dist/utils/significantFigures.d.cts.map +0 -1
  439. package/dist/utils/significantFigures.d.mts +0 -25
  440. package/dist/utils/significantFigures.d.mts.map +0 -1
  441. package/dist/utils/significantFigures.mjs +0 -82
  442. package/dist/utils/significantFigures.mjs.map +0 -1
  443. package/dist/utils/sortMarkets.cjs +0 -93
  444. package/dist/utils/sortMarkets.cjs.map +0 -1
  445. package/dist/utils/sortMarkets.d.cts +0 -27
  446. package/dist/utils/sortMarkets.d.cts.map +0 -1
  447. package/dist/utils/sortMarkets.d.mts +0 -27
  448. package/dist/utils/sortMarkets.d.mts.map +0 -1
  449. package/dist/utils/sortMarkets.mjs +0 -88
  450. package/dist/utils/sortMarkets.mjs.map +0 -1
  451. package/dist/utils/standaloneInfoClient.cjs +0 -70
  452. package/dist/utils/standaloneInfoClient.cjs.map +0 -1
  453. package/dist/utils/standaloneInfoClient.d.cts +0 -37
  454. package/dist/utils/standaloneInfoClient.d.cts.map +0 -1
  455. package/dist/utils/standaloneInfoClient.d.mts +0 -37
  456. package/dist/utils/standaloneInfoClient.d.mts.map +0 -1
  457. package/dist/utils/standaloneInfoClient.mjs +0 -64
  458. package/dist/utils/standaloneInfoClient.mjs.map +0 -1
  459. package/dist/utils/stringParseUtils.cjs +0 -18
  460. package/dist/utils/stringParseUtils.cjs.map +0 -1
  461. package/dist/utils/stringParseUtils.d.cts +0 -3
  462. package/dist/utils/stringParseUtils.d.cts.map +0 -1
  463. package/dist/utils/stringParseUtils.d.mts +0 -3
  464. package/dist/utils/stringParseUtils.d.mts.map +0 -1
  465. package/dist/utils/stringParseUtils.mjs +0 -13
  466. package/dist/utils/stringParseUtils.mjs.map +0 -1
  467. package/dist/utils/transferData.cjs +0 -33
  468. package/dist/utils/transferData.cjs.map +0 -1
  469. package/dist/utils/transferData.d.cts +0 -9
  470. package/dist/utils/transferData.d.cts.map +0 -1
  471. package/dist/utils/transferData.d.mts +0 -9
  472. package/dist/utils/transferData.d.mts.map +0 -1
  473. package/dist/utils/transferData.mjs +0 -29
  474. package/dist/utils/transferData.mjs.map +0 -1
  475. package/dist/utils/wait.cjs +0 -6
  476. package/dist/utils/wait.cjs.map +0 -1
  477. package/dist/utils/wait.d.cts +0 -2
  478. package/dist/utils/wait.d.cts.map +0 -1
  479. package/dist/utils/wait.d.mts +0 -2
  480. package/dist/utils/wait.d.mts.map +0 -1
  481. package/dist/utils/wait.mjs +0 -2
  482. package/dist/utils/wait.mjs.map +0 -1
@@ -1,187 +0,0 @@
1
- import type { AssetCtxsWsEvent } from "@nktkas/hyperliquid";
2
- import type { HyperLiquidClientService } from "./HyperLiquidClientService.cjs";
3
- import type { HyperLiquidWalletService } from "./HyperLiquidWalletService.cjs";
4
- import type { Position, OrderFill, Order, SubscribePricesParams, SubscribePositionsParams, SubscribeOrderFillsParams, SubscribeOrdersParams, SubscribeAccountParams, SubscribeOICapsParams, SubscribeOrderBookParams, PerpsPlatformDependencies } from "../types/index.cjs";
5
- /**
6
- * Service for managing HyperLiquid WebSocket subscriptions
7
- * Implements singleton subscription architecture with reference counting
8
- */
9
- export declare class HyperLiquidSubscriptionService {
10
- #private;
11
- constructor(clientService: HyperLiquidClientService, walletService: HyperLiquidWalletService, platformDependencies: PerpsPlatformDependencies, hip3Enabled?: boolean, enabledDexs?: string[], allowlistMarkets?: string[], blocklistMarkets?: string[]);
12
- /**
13
- * Populate DEX meta cache with pre-fetched meta data
14
- * Called by Provider after buildAssetMapping to share cached meta,
15
- * avoiding redundant metaAndAssetCtxs/meta API calls during subscription setup
16
- *
17
- * @param dex - DEX key ('' for main DEX, 'xyz'/'flx'/etc for HIP-3)
18
- * @param meta - Meta response containing universe data
19
- * @param meta.universe - The array of asset universe entries from the meta response.
20
- */
21
- setDexMetaCache(dex: string, meta: {
22
- universe: {
23
- name: string;
24
- szDecimals: number;
25
- maxLeverage: number;
26
- }[];
27
- }): void;
28
- /**
29
- * Cache asset contexts for a specific DEX from API response
30
- * This allows buildAssetMapping() to populate cache for getMarketDataWithPrices() to use
31
- *
32
- * @param dex - DEX name ('' for main perps)
33
- * @param assetCtxs - Asset contexts from metaAndAssetCtxs response
34
- */
35
- setDexAssetCtxsCache(dex: string, assetCtxs: AssetCtxsWsEvent['ctxs']): void;
36
- /**
37
- * Get cached assetCtxs for a DEX
38
- * Returns the cached asset contexts from WebSocket subscription if available
39
- *
40
- * @param dex - DEX key ('' for main DEX, 'xyz'/'flx'/etc for HIP-3)
41
- * @returns Array of asset contexts or undefined if not cached
42
- */
43
- getDexAssetCtxsCache(dex: string): AssetCtxsWsEvent['ctxs'] | undefined;
44
- /**
45
- * Update feature flags for HIP-3 support
46
- * Called when provider configuration changes at runtime
47
- * Note: Market filtering is NOT applied in subscription service - only in Provider
48
- *
49
- * @param hip3Enabled - Whether HIP-3 multi-DEX support is enabled.
50
- * @param enabledDexs - The array of enabled DEX identifiers.
51
- * @param allowlistMarkets - The array of allowed market patterns.
52
- * @param blocklistMarkets - The array of blocked market patterns.
53
- */
54
- updateFeatureFlags(hip3Enabled: boolean, enabledDexs: string[], allowlistMarkets: string[], blocklistMarkets: string[]): Promise<void>;
55
- /**
56
- * Subscribe to live price updates with singleton subscription architecture
57
- * Uses allMids for fast price updates and predictedFundings for accurate funding rates
58
- *
59
- * @param params - The subscription parameters including symbols and callbacks.
60
- * @returns A cleanup function to unsubscribe from price updates.
61
- */
62
- subscribeToPrices(params: SubscribePricesParams): Promise<() => void>;
63
- /**
64
- * Subscribe to live position updates with TP/SL data
65
- *
66
- * @param params - The subscription parameters including callback and account ID.
67
- * @returns A cleanup function to unsubscribe from position updates.
68
- */
69
- subscribeToPositions(params: SubscribePositionsParams): () => void;
70
- /**
71
- * Subscribe to open interest cap updates
72
- * OI caps are extracted from webData2 subscription (zero additional overhead)
73
- *
74
- * @param params - The subscription parameters including callback and account ID.
75
- * @returns A cleanup function to unsubscribe from OI cap updates.
76
- */
77
- subscribeToOICaps(params: SubscribeOICapsParams): () => void;
78
- /**
79
- * Check if OI caps cache has been initialized
80
- * Useful for preventing UI flashing before first data arrives
81
- *
82
- * @returns True if the condition is met.
83
- */
84
- isOICapsCacheInitialized(): boolean;
85
- /**
86
- * Subscribe to live order fill updates
87
- * Shares subscriptions per accountId to avoid duplicate WebSocket connections
88
- *
89
- * @param params - The subscription parameters including callback and account ID.
90
- * @returns A cleanup function to unsubscribe from order fill updates.
91
- */
92
- subscribeToOrderFills(params: SubscribeOrderFillsParams): () => void;
93
- /**
94
- * Subscribe to live order updates
95
- * Uses the shared webData2 subscription to avoid duplicate connections
96
- *
97
- * @param params - The subscription parameters including callback and account ID.
98
- * @returns A cleanup function to unsubscribe from order updates.
99
- */
100
- subscribeToOrders(params: SubscribeOrdersParams): () => void;
101
- /**
102
- * Subscribe to live account updates
103
- * Uses the shared webData2 subscription to avoid duplicate connections
104
- *
105
- * @param params - The subscription parameters including callback and account ID.
106
- * @returns A cleanup function to unsubscribe from account updates.
107
- */
108
- subscribeToAccount(params: SubscribeAccountParams): () => void;
109
- /**
110
- * Check if orders cache has been initialized from WebSocket
111
- *
112
- * @returns true if WebSocket has sent at least one update, false otherwise
113
- */
114
- isOrdersCacheInitialized(): boolean;
115
- /**
116
- * Check if positions cache has been initialized from WebSocket
117
- *
118
- * @returns true if WebSocket has sent at least one update, false otherwise
119
- */
120
- isPositionsCacheInitialized(): boolean;
121
- /**
122
- * Get cached positions from WebSocket subscription
123
- *
124
- * @returns Cached positions array, or null if not initialized
125
- */
126
- getCachedPositions(): Position[] | null;
127
- /**
128
- * Get cached orders from WebSocket subscription
129
- *
130
- * @returns Cached orders array, or null if not initialized
131
- */
132
- getCachedOrders(): Order[] | null;
133
- /**
134
- * Atomically get cached orders if initialized
135
- * Prevents race condition between checking initialization and getting data
136
- *
137
- * @returns Cached orders array if initialized, null otherwise
138
- */
139
- getOrdersCacheIfInitialized(): Order[] | null;
140
- /**
141
- * Get cached price for a symbol from WebSocket allMids subscription
142
- * OPTIMIZATION: Use this instead of REST infoClient.allMids() to avoid rate limiting
143
- *
144
- * @param symbol - Asset symbol (e.g., 'BTC', 'ETH', 'xyz:TSLA')
145
- * @returns Price string, or undefined if not cached
146
- */
147
- getCachedPrice(symbol: string): string | undefined;
148
- /**
149
- * Get cached fills from WebSocket userFills subscription
150
- * OPTIMIZATION: Use this instead of REST userFills() to avoid rate limiting
151
- *
152
- * @returns Copy of cached fills array, or null if not cached
153
- */
154
- getCachedFills(): OrderFill[] | null;
155
- /**
156
- * Get cached fills only if the cache has been initialized from WebSocket
157
- * OPTIMIZATION: Distinguishes between "not initialized" (null) and "initialized but empty" ([])
158
- * - Returns null if cache hasn't received WebSocket snapshot yet (caller should use REST)
159
- * - Returns empty array [] if cache is initialized but user has no fills (caller can skip REST)
160
- * - Returns fills array if cache has data
161
- *
162
- * @returns Fills array or empty array if initialized, null if not yet initialized
163
- */
164
- getFillsCacheIfInitialized(): OrderFill[] | null;
165
- /**
166
- * Subscribe to full order book updates with multiple depth levels
167
- * Creates a dedicated L2Book subscription for the requested symbol
168
- * and processes data into OrderBookData format for UI consumption
169
- *
170
- * @param params - Subscription parameters
171
- * @returns Cleanup function to unsubscribe
172
- */
173
- subscribeToOrderBook(params: SubscribeOrderBookParams): () => void;
174
- /**
175
- * Restore all active subscriptions after WebSocket reconnection
176
- * Re-establishes WebSocket subscriptions for all active subscribers
177
- *
178
- * IMPORTANT: This method verifies transport readiness before attempting
179
- * any subscriptions to prevent "subscribe error: undefined" errors.
180
- */
181
- restoreSubscriptions(): Promise<void>;
182
- /**
183
- * Clear all subscriptions and cached data (multi-DEX support)
184
- */
185
- clearAll(): void;
186
- }
187
- //# sourceMappingURL=HyperLiquidSubscriptionService.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HyperLiquidSubscriptionService.d.cts","sourceRoot":"","sources":["../../src/services/HyperLiquidSubscriptionService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAUV,gBAAgB,EAIjB,4BAA4B;AAE7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAE3E,OAAO,KAAK,EAEV,QAAQ,EACR,SAAS,EACT,KAAK,EAEL,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EAGxB,yBAAyB,EAE1B,2BAAiB;AAYlB;;;GAGG;AACH,qBAAa,8BAA8B;;gBA2LvC,aAAa,EAAE,wBAAwB,EACvC,aAAa,EAAE,wBAAwB,EACvC,oBAAoB,EAAE,yBAAyB,EAC/C,WAAW,CAAC,EAAE,OAAO,EACrB,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE;IAgF7B;;;;;;;;OAQG;IACI,eAAe,CACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;QACJ,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM,CAAC;YACb,UAAU,EAAE,MAAM,CAAC;YACnB,WAAW,EAAE,MAAM,CAAC;SACrB,EAAE,CAAC;KACL,GACA,IAAI;IAWP;;;;;;OAMG;IACI,oBAAoB,CACzB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAClC,IAAI;IAWP;;;;;;OAMG;IACI,oBAAoB,CACzB,GAAG,EAAE,MAAM,GACV,gBAAgB,CAAC,MAAM,CAAC,GAAG,SAAS;IA8CvC;;;;;;;;;OASG;IACU,kBAAkB,CAC7B,WAAW,EAAE,OAAO,EACpB,WAAW,EAAE,MAAM,EAAE,EACrB,gBAAgB,EAAE,MAAM,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I,QAAQ,IAAI,IAAI;CA2GxB"}
@@ -1,187 +0,0 @@
1
- import type { AssetCtxsWsEvent } from "@nktkas/hyperliquid";
2
- import type { HyperLiquidClientService } from "./HyperLiquidClientService.mjs";
3
- import type { HyperLiquidWalletService } from "./HyperLiquidWalletService.mjs";
4
- import type { Position, OrderFill, Order, SubscribePricesParams, SubscribePositionsParams, SubscribeOrderFillsParams, SubscribeOrdersParams, SubscribeAccountParams, SubscribeOICapsParams, SubscribeOrderBookParams, PerpsPlatformDependencies } from "../types/index.mjs";
5
- /**
6
- * Service for managing HyperLiquid WebSocket subscriptions
7
- * Implements singleton subscription architecture with reference counting
8
- */
9
- export declare class HyperLiquidSubscriptionService {
10
- #private;
11
- constructor(clientService: HyperLiquidClientService, walletService: HyperLiquidWalletService, platformDependencies: PerpsPlatformDependencies, hip3Enabled?: boolean, enabledDexs?: string[], allowlistMarkets?: string[], blocklistMarkets?: string[]);
12
- /**
13
- * Populate DEX meta cache with pre-fetched meta data
14
- * Called by Provider after buildAssetMapping to share cached meta,
15
- * avoiding redundant metaAndAssetCtxs/meta API calls during subscription setup
16
- *
17
- * @param dex - DEX key ('' for main DEX, 'xyz'/'flx'/etc for HIP-3)
18
- * @param meta - Meta response containing universe data
19
- * @param meta.universe - The array of asset universe entries from the meta response.
20
- */
21
- setDexMetaCache(dex: string, meta: {
22
- universe: {
23
- name: string;
24
- szDecimals: number;
25
- maxLeverage: number;
26
- }[];
27
- }): void;
28
- /**
29
- * Cache asset contexts for a specific DEX from API response
30
- * This allows buildAssetMapping() to populate cache for getMarketDataWithPrices() to use
31
- *
32
- * @param dex - DEX name ('' for main perps)
33
- * @param assetCtxs - Asset contexts from metaAndAssetCtxs response
34
- */
35
- setDexAssetCtxsCache(dex: string, assetCtxs: AssetCtxsWsEvent['ctxs']): void;
36
- /**
37
- * Get cached assetCtxs for a DEX
38
- * Returns the cached asset contexts from WebSocket subscription if available
39
- *
40
- * @param dex - DEX key ('' for main DEX, 'xyz'/'flx'/etc for HIP-3)
41
- * @returns Array of asset contexts or undefined if not cached
42
- */
43
- getDexAssetCtxsCache(dex: string): AssetCtxsWsEvent['ctxs'] | undefined;
44
- /**
45
- * Update feature flags for HIP-3 support
46
- * Called when provider configuration changes at runtime
47
- * Note: Market filtering is NOT applied in subscription service - only in Provider
48
- *
49
- * @param hip3Enabled - Whether HIP-3 multi-DEX support is enabled.
50
- * @param enabledDexs - The array of enabled DEX identifiers.
51
- * @param allowlistMarkets - The array of allowed market patterns.
52
- * @param blocklistMarkets - The array of blocked market patterns.
53
- */
54
- updateFeatureFlags(hip3Enabled: boolean, enabledDexs: string[], allowlistMarkets: string[], blocklistMarkets: string[]): Promise<void>;
55
- /**
56
- * Subscribe to live price updates with singleton subscription architecture
57
- * Uses allMids for fast price updates and predictedFundings for accurate funding rates
58
- *
59
- * @param params - The subscription parameters including symbols and callbacks.
60
- * @returns A cleanup function to unsubscribe from price updates.
61
- */
62
- subscribeToPrices(params: SubscribePricesParams): Promise<() => void>;
63
- /**
64
- * Subscribe to live position updates with TP/SL data
65
- *
66
- * @param params - The subscription parameters including callback and account ID.
67
- * @returns A cleanup function to unsubscribe from position updates.
68
- */
69
- subscribeToPositions(params: SubscribePositionsParams): () => void;
70
- /**
71
- * Subscribe to open interest cap updates
72
- * OI caps are extracted from webData2 subscription (zero additional overhead)
73
- *
74
- * @param params - The subscription parameters including callback and account ID.
75
- * @returns A cleanup function to unsubscribe from OI cap updates.
76
- */
77
- subscribeToOICaps(params: SubscribeOICapsParams): () => void;
78
- /**
79
- * Check if OI caps cache has been initialized
80
- * Useful for preventing UI flashing before first data arrives
81
- *
82
- * @returns True if the condition is met.
83
- */
84
- isOICapsCacheInitialized(): boolean;
85
- /**
86
- * Subscribe to live order fill updates
87
- * Shares subscriptions per accountId to avoid duplicate WebSocket connections
88
- *
89
- * @param params - The subscription parameters including callback and account ID.
90
- * @returns A cleanup function to unsubscribe from order fill updates.
91
- */
92
- subscribeToOrderFills(params: SubscribeOrderFillsParams): () => void;
93
- /**
94
- * Subscribe to live order updates
95
- * Uses the shared webData2 subscription to avoid duplicate connections
96
- *
97
- * @param params - The subscription parameters including callback and account ID.
98
- * @returns A cleanup function to unsubscribe from order updates.
99
- */
100
- subscribeToOrders(params: SubscribeOrdersParams): () => void;
101
- /**
102
- * Subscribe to live account updates
103
- * Uses the shared webData2 subscription to avoid duplicate connections
104
- *
105
- * @param params - The subscription parameters including callback and account ID.
106
- * @returns A cleanup function to unsubscribe from account updates.
107
- */
108
- subscribeToAccount(params: SubscribeAccountParams): () => void;
109
- /**
110
- * Check if orders cache has been initialized from WebSocket
111
- *
112
- * @returns true if WebSocket has sent at least one update, false otherwise
113
- */
114
- isOrdersCacheInitialized(): boolean;
115
- /**
116
- * Check if positions cache has been initialized from WebSocket
117
- *
118
- * @returns true if WebSocket has sent at least one update, false otherwise
119
- */
120
- isPositionsCacheInitialized(): boolean;
121
- /**
122
- * Get cached positions from WebSocket subscription
123
- *
124
- * @returns Cached positions array, or null if not initialized
125
- */
126
- getCachedPositions(): Position[] | null;
127
- /**
128
- * Get cached orders from WebSocket subscription
129
- *
130
- * @returns Cached orders array, or null if not initialized
131
- */
132
- getCachedOrders(): Order[] | null;
133
- /**
134
- * Atomically get cached orders if initialized
135
- * Prevents race condition between checking initialization and getting data
136
- *
137
- * @returns Cached orders array if initialized, null otherwise
138
- */
139
- getOrdersCacheIfInitialized(): Order[] | null;
140
- /**
141
- * Get cached price for a symbol from WebSocket allMids subscription
142
- * OPTIMIZATION: Use this instead of REST infoClient.allMids() to avoid rate limiting
143
- *
144
- * @param symbol - Asset symbol (e.g., 'BTC', 'ETH', 'xyz:TSLA')
145
- * @returns Price string, or undefined if not cached
146
- */
147
- getCachedPrice(symbol: string): string | undefined;
148
- /**
149
- * Get cached fills from WebSocket userFills subscription
150
- * OPTIMIZATION: Use this instead of REST userFills() to avoid rate limiting
151
- *
152
- * @returns Copy of cached fills array, or null if not cached
153
- */
154
- getCachedFills(): OrderFill[] | null;
155
- /**
156
- * Get cached fills only if the cache has been initialized from WebSocket
157
- * OPTIMIZATION: Distinguishes between "not initialized" (null) and "initialized but empty" ([])
158
- * - Returns null if cache hasn't received WebSocket snapshot yet (caller should use REST)
159
- * - Returns empty array [] if cache is initialized but user has no fills (caller can skip REST)
160
- * - Returns fills array if cache has data
161
- *
162
- * @returns Fills array or empty array if initialized, null if not yet initialized
163
- */
164
- getFillsCacheIfInitialized(): OrderFill[] | null;
165
- /**
166
- * Subscribe to full order book updates with multiple depth levels
167
- * Creates a dedicated L2Book subscription for the requested symbol
168
- * and processes data into OrderBookData format for UI consumption
169
- *
170
- * @param params - Subscription parameters
171
- * @returns Cleanup function to unsubscribe
172
- */
173
- subscribeToOrderBook(params: SubscribeOrderBookParams): () => void;
174
- /**
175
- * Restore all active subscriptions after WebSocket reconnection
176
- * Re-establishes WebSocket subscriptions for all active subscribers
177
- *
178
- * IMPORTANT: This method verifies transport readiness before attempting
179
- * any subscriptions to prevent "subscribe error: undefined" errors.
180
- */
181
- restoreSubscriptions(): Promise<void>;
182
- /**
183
- * Clear all subscriptions and cached data (multi-DEX support)
184
- */
185
- clearAll(): void;
186
- }
187
- //# sourceMappingURL=HyperLiquidSubscriptionService.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HyperLiquidSubscriptionService.d.mts","sourceRoot":"","sources":["../../src/services/HyperLiquidSubscriptionService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAUV,gBAAgB,EAIjB,4BAA4B;AAE7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAE3E,OAAO,KAAK,EAEV,QAAQ,EACR,SAAS,EACT,KAAK,EAEL,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EAGxB,yBAAyB,EAE1B,2BAAiB;AAYlB;;;GAGG;AACH,qBAAa,8BAA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