@metamask-previews/perps-controller 9.0.0-preview-9291f33a8 → 9.0.0-preview-e12e4a38f

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 (34) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/providers/HyperLiquidProvider.cjs +1 -2
  3. package/dist/providers/HyperLiquidProvider.cjs.map +1 -1
  4. package/dist/providers/HyperLiquidProvider.d.cts.map +1 -1
  5. package/dist/providers/HyperLiquidProvider.d.mts.map +1 -1
  6. package/dist/providers/HyperLiquidProvider.mjs +1 -2
  7. package/dist/providers/HyperLiquidProvider.mjs.map +1 -1
  8. package/dist/services/HyperLiquidClientService.cjs +5 -8
  9. package/dist/services/HyperLiquidClientService.cjs.map +1 -1
  10. package/dist/services/HyperLiquidClientService.d.cts.map +1 -1
  11. package/dist/services/HyperLiquidClientService.d.mts.map +1 -1
  12. package/dist/services/HyperLiquidClientService.mjs +4 -7
  13. package/dist/services/HyperLiquidClientService.mjs.map +1 -1
  14. package/dist/services/HyperLiquidSubscriptionService.cjs +101 -33
  15. package/dist/services/HyperLiquidSubscriptionService.cjs.map +1 -1
  16. package/dist/services/HyperLiquidSubscriptionService.d.cts.map +1 -1
  17. package/dist/services/HyperLiquidSubscriptionService.d.mts.map +1 -1
  18. package/dist/services/HyperLiquidSubscriptionService.mjs +101 -33
  19. package/dist/services/HyperLiquidSubscriptionService.mjs.map +1 -1
  20. package/dist/types/index.cjs.map +1 -1
  21. package/dist/types/index.d.cts +7 -0
  22. package/dist/types/index.d.cts.map +1 -1
  23. package/dist/types/index.d.mts +7 -0
  24. package/dist/types/index.d.mts.map +1 -1
  25. package/dist/types/index.mjs.map +1 -1
  26. package/dist/utils/hyperLiquidAdapter.cjs +1 -2
  27. package/dist/utils/hyperLiquidAdapter.cjs.map +1 -1
  28. package/dist/utils/hyperLiquidAdapter.d.cts.map +1 -1
  29. package/dist/utils/hyperLiquidAdapter.d.mts.map +1 -1
  30. package/dist/utils/hyperLiquidAdapter.mjs +1 -2
  31. package/dist/utils/hyperLiquidAdapter.mjs.map +1 -1
  32. package/dist/utils/standaloneInfoClient.cjs +1 -1
  33. package/dist/utils/standaloneInfoClient.cjs.map +1 -1
  34. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"HyperLiquidSubscriptionService.d.cts","sourceRoot":"","sources":["../../src/services/HyperLiquidSubscriptionService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EASV,gBAAgB,EAKjB,4BAA4B;AAS7B,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;AAClB,OAAO,KAAK,EAEV,0BAA0B,EAE3B,uCAAmC;AAmBpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAE3E;;;GAGG;AACH,qBAAa,8BAA8B;;gBA+PvC,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,EAC3B,mBAAmB,CAAC,EAAE,MAAM;IA+K9B;;;;;;;;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,MAA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GAAG,IAAI;IAOpD;;;;;;OAMG;IACI,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIlD,sBAAsB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAS1E;;;;;OAKG;IACI,cAAc,IAAI,SAAS,EAAE,GAAG,IAAI;IAI3C;;;;;;;;OAQG;IACI,0BAA0B,IAAI,SAAS,EAAE,GAAG,IAAI;IA40BvD;;;;;;;OAOG;IACI,oBAAoB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,IAAI;IAmNzE;;;;;;OAMG;IACU,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsMlD;;OAEG;IACI,QAAQ,IAAI,IAAI;CAiMxB"}
1
+ {"version":3,"file":"HyperLiquidSubscriptionService.d.cts","sourceRoot":"","sources":["../../src/services/HyperLiquidSubscriptionService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EASV,gBAAgB,EAKjB,4BAA4B;AAS7B,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;AAClB,OAAO,KAAK,EAEV,0BAA0B,EAE3B,uCAAmC;AAmBpC,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAmC;AAE3E;;;GAGG;AACH,qBAAa,8BAA8B;;gBA6QvC,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,C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;;;;;;OAMG;IACI,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,IAAI;IAgDrE;;;;OAIG;IACI,wBAAwB,IAAI,OAAO;IAI1C;;;;OAIG;IACI,2BAA2B,IAAI,OAAO;IAI7C;;;;OAIG;IACI,kBAAkB,IAAI,QAAQ,EAAE,GAAG,IAAI;IAI9C;;;;OAIG;IACI,eAAe,IAAI,KAAK,EAAE,GAAG,IAAI;IAIxC;;;;;OAKG;IACI,2BAA2B,IAAI,KAAK,EAAE,GAAG,IAAI;IAOpD;;;;;;OAMG;IACI,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIlD,sBAAsB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAS1E;;;;;OAKG;IACI,cAAc,IAAI,SAAS,EAAE,GAAG,IAAI;IAI3C;;;;;;;;OAQG;IACI,0BAA0B,IAAI,SAAS,EAAE,GAAG,IAAI;IA06BvD;;;;;;;OAOG;IACI,oBAAoB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,IAAI;IA2OzE;;;;;;OAMG;IACU,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsMlD;;OAEG;IACI,QAAQ,IAAI,IAAI;CAiMxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"HyperLiquidSubscriptionService.d.mts","sourceRoot":"","sources":["../../src/services/HyperLiquidSubscriptionService.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EASV,gBAAgB,EAKjB,4BAA4B;AAS7B,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;AAClB,OAAO,KAAK,EAEV,0BAA0B,EAE3B,uCAAmC;AAmB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AAI;IAI3C;;;;;;;;OAQG;IACI,0BAA0B,IAAI,SAAS,EAAE,GAAG,IAAI;IA06BvD;;;;;;;OAOG;IACI,oBAAoB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,IAAI;IA2OzE;;;;;;OAMG;IACU,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;IAsMlD;;OAEG;IACI,QAAQ,IAAI,IAAI;CAiMxB"}
@@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _HyperLiquidSubscriptionService_instances, _HyperLiquidSubscriptionService_clientService, _HyperLiquidSubscriptionService_walletService, _HyperLiquidSubscriptionService_hip3Enabled, _HyperLiquidSubscriptionService_enabledDexs, _HyperLiquidSubscriptionService_allowlistMarkets, _HyperLiquidSubscriptionService_blocklistMarkets, _HyperLiquidSubscriptionService_priceDeviationLimit, _HyperLiquidSubscriptionService_discoveredDexNames, _HyperLiquidSubscriptionService_dexDiscoveryPromise, _HyperLiquidSubscriptionService_dexDiscoveryResolver, _HyperLiquidSubscriptionService_expectedDexs, _HyperLiquidSubscriptionService_initializedDexs, _HyperLiquidSubscriptionService_priceSubscribers, _HyperLiquidSubscriptionService_positionSubscribers, _HyperLiquidSubscriptionService_orderFillSubscribers, _HyperLiquidSubscriptionService_orderSubscribers, _HyperLiquidSubscriptionService_accountSubscribers, _HyperLiquidSubscriptionService_marketDataSubscribers, _HyperLiquidSubscriptionService_orderBookSubscribers, _HyperLiquidSubscriptionService_globalAllMidsSubscription, _HyperLiquidSubscriptionService_globalAllMidsPromise, _HyperLiquidSubscriptionService_globalActiveAssetSubscriptions, _HyperLiquidSubscriptionService_pendingActiveAssetPromises, _HyperLiquidSubscriptionService_globalBboSubscriptions, _HyperLiquidSubscriptionService_pendingBboPromises, _HyperLiquidSubscriptionService_orderFillSubscriptions, _HyperLiquidSubscriptionService_spotStateSubscriptions, _HyperLiquidSubscriptionService_spotStateSubscriptionPromises, _HyperLiquidSubscriptionService_spotStateSubscriptionGeneration, _HyperLiquidSubscriptionService_symbolSubscriberCounts, _HyperLiquidSubscriptionService_dexSubscriberCounts, _HyperLiquidSubscriptionService_webData3Subscriptions, _HyperLiquidSubscriptionService_webData3SubscriptionPromise, _HyperLiquidSubscriptionService_positionSubscriberCount, _HyperLiquidSubscriptionService_orderSubscriberCount, _HyperLiquidSubscriptionService_accountSubscriberCount, _HyperLiquidSubscriptionService_oiCapSubscriberCount, _HyperLiquidSubscriptionService_dexPositionsCache, _HyperLiquidSubscriptionService_dexOrdersCache, _HyperLiquidSubscriptionService_dexAccountCache, _HyperLiquidSubscriptionService_cachedSpotState, _HyperLiquidSubscriptionService_abstractionModeByUser, _HyperLiquidSubscriptionService_abstractionModeLastWsRefreshAtByUser, _HyperLiquidSubscriptionService_abstractionModeInflightByUser, _HyperLiquidSubscriptionService_cachedSpotStateUserAddress, _HyperLiquidSubscriptionService_spotStatePromise, _HyperLiquidSubscriptionService_spotStatePromiseUserAddress, _HyperLiquidSubscriptionService_spotStateGeneration, _HyperLiquidSubscriptionService_cachedPositions, _HyperLiquidSubscriptionService_cachedOrders, _HyperLiquidSubscriptionService_cachedAccount, _HyperLiquidSubscriptionService_ordersCacheInitialized, _HyperLiquidSubscriptionService_positionsCacheInitialized, _HyperLiquidSubscriptionService_oiCapSubscribers, _HyperLiquidSubscriptionService_cachedOICaps, _HyperLiquidSubscriptionService_cachedOICapsHash, _HyperLiquidSubscriptionService_oiCapsCacheInitialized, _HyperLiquidSubscriptionService_cachedPriceData, _HyperLiquidSubscriptionService_allMidsSnapshots, _HyperLiquidSubscriptionService_cachedFills, _HyperLiquidSubscriptionService_fillsCacheInitialized, _HyperLiquidSubscriptionService_assetCtxsSubscriptions, _HyperLiquidSubscriptionService_dexAssetCtxsCache, _HyperLiquidSubscriptionService_assetCtxsSubscriptionPromises, _HyperLiquidSubscriptionService_dexAllMidsSubscriptions, _HyperLiquidSubscriptionService_dexAllMidsSubscriptionPromises, _HyperLiquidSubscriptionService_clearinghouseStateSubscriptions, _HyperLiquidSubscriptionService_openOrdersSubscriptions, _HyperLiquidSubscriptionService_pendingClearinghouseSubscriptions, _HyperLiquidSubscriptionService_pendingOpenOrdersSubscriptions, _HyperLiquidSubscriptionService_dexMetaCache, _HyperLiquidSubscriptionService_orderBookCache, _HyperLiquidSubscriptionService_marketDataCache, _HyperLiquidSubscriptionService_isClearing, _HyperLiquidSubscriptionService_restoreRetryTimeouts, _HyperLiquidSubscriptionService_deps, _HyperLiquidSubscriptionService_logErrorUnlessClearing, _HyperLiquidSubscriptionService_isTransientSdkError, _HyperLiquidSubscriptionService_scheduleRestoreRetry, _HyperLiquidSubscriptionService_getErrorContext, _HyperLiquidSubscriptionService_isDexEnabled, _HyperLiquidSubscriptionService_waitForDexDiscovery, _HyperLiquidSubscriptionService_hashPositions, _HyperLiquidSubscriptionService_hashOrders, _HyperLiquidSubscriptionService_hashAccountState, _HyperLiquidSubscriptionService_cachedPositionsHash, _HyperLiquidSubscriptionService_cachedOrdersHash, _HyperLiquidSubscriptionService_cachedAccountHash, _HyperLiquidSubscriptionService_extractTPSLFromOrders, _HyperLiquidSubscriptionService_mergeTPSLIntoPositions, _HyperLiquidSubscriptionService_aggregateAccountStates, _HyperLiquidSubscriptionService_getAbstractionModeForUser, _HyperLiquidSubscriptionService_getSpotBalanceOptions, _HyperLiquidSubscriptionService_refreshAbstractionModeThrottled, _HyperLiquidSubscriptionService_ensureSpotState, _HyperLiquidSubscriptionService_refreshSpotState, _HyperLiquidSubscriptionService_ensureSpotStateSubscription, _HyperLiquidSubscriptionService_ensureSharedWebData3Subscription, _HyperLiquidSubscriptionService_createUserDataSubscription, _HyperLiquidSubscriptionService_ensureClearinghouseStateSubscription, _HyperLiquidSubscriptionService_createClearinghouseSubscription, _HyperLiquidSubscriptionService_ensureOpenOrdersSubscription, _HyperLiquidSubscriptionService_createOpenOrdersSubscription, _HyperLiquidSubscriptionService_aggregateAndNotifySubscribers, _HyperLiquidSubscriptionService_cleanupSharedWebData3ISubscription, _HyperLiquidSubscriptionService_ensureOrderFillISubscription, _HyperLiquidSubscriptionService_createSubscription, _HyperLiquidSubscriptionService_createPriceUpdate, _HyperLiquidSubscriptionService_ensureGlobalAllMidsSubscription, _HyperLiquidSubscriptionService_ensureActiveAssetSubscription, _HyperLiquidSubscriptionService_cleanupActiveAssetSubscription, _HyperLiquidSubscriptionService_ensureAssetCtxsSubscription, _HyperLiquidSubscriptionService_ensureDexAllMidsSubscription, _HyperLiquidSubscriptionService_createDexAllMidsSubscription, _HyperLiquidSubscriptionService_createAssetCtxsSubscription, _HyperLiquidSubscriptionService_cleanupAssetCtxsSubscription, _HyperLiquidSubscriptionService_ensureBboSubscription, _HyperLiquidSubscriptionService_cleanupBboSubscription, _HyperLiquidSubscriptionService_processOrderBookData, _HyperLiquidSubscriptionService_notifyAllPriceSubscribers;
12
+ var _HyperLiquidSubscriptionService_instances, _a, _HyperLiquidSubscriptionService_clientService, _HyperLiquidSubscriptionService_walletService, _HyperLiquidSubscriptionService_hip3Enabled, _HyperLiquidSubscriptionService_enabledDexs, _HyperLiquidSubscriptionService_allowlistMarkets, _HyperLiquidSubscriptionService_blocklistMarkets, _HyperLiquidSubscriptionService_priceDeviationLimit, _HyperLiquidSubscriptionService_discoveredDexNames, _HyperLiquidSubscriptionService_dexDiscoveryPromise, _HyperLiquidSubscriptionService_dexDiscoveryResolver, _HyperLiquidSubscriptionService_expectedDexs, _HyperLiquidSubscriptionService_initializedDexs, _HyperLiquidSubscriptionService_priceSubscribers, _HyperLiquidSubscriptionService_positionSubscribers, _HyperLiquidSubscriptionService_orderFillSubscribers, _HyperLiquidSubscriptionService_orderSubscribers, _HyperLiquidSubscriptionService_accountSubscribers, _HyperLiquidSubscriptionService_marketDataSubscribers, _HyperLiquidSubscriptionService_orderBookSubscribers, _HyperLiquidSubscriptionService_globalAllMidsSubscription, _HyperLiquidSubscriptionService_globalAllMidsPromise, _HyperLiquidSubscriptionService_globalActiveAssetSubscriptions, _HyperLiquidSubscriptionService_pendingActiveAssetPromises, _HyperLiquidSubscriptionService_globalBboSubscriptions, _HyperLiquidSubscriptionService_pendingBboPromises, _HyperLiquidSubscriptionService_orderFillSubscriptions, _HyperLiquidSubscriptionService_spotStateSubscriptions, _HyperLiquidSubscriptionService_spotStateSubscriptionPromises, _HyperLiquidSubscriptionService_spotStateSubscriptionGeneration, _HyperLiquidSubscriptionService_symbolSubscriberCounts, _HyperLiquidSubscriptionService_dexSubscriberCounts, _HyperLiquidSubscriptionService_webData3Subscriptions, _HyperLiquidSubscriptionService_webData3SubscriptionPromise, _HyperLiquidSubscriptionService_positionSubscriberCount, _HyperLiquidSubscriptionService_orderSubscriberCount, _HyperLiquidSubscriptionService_accountSubscriberCount, _HyperLiquidSubscriptionService_oiCapSubscriberCount, _HyperLiquidSubscriptionService_dexPositionsCache, _HyperLiquidSubscriptionService_dexOrdersCache, _HyperLiquidSubscriptionService_dexAccountCache, _HyperLiquidSubscriptionService_cachedSpotState, _HyperLiquidSubscriptionService_abstractionModeByUser, _HyperLiquidSubscriptionService_abstractionModeLastWsRefreshAtByUser, _HyperLiquidSubscriptionService_abstractionModeInflightByUser, _HyperLiquidSubscriptionService_cachedSpotStateUserAddress, _HyperLiquidSubscriptionService_spotStatePromise, _HyperLiquidSubscriptionService_spotStatePromiseUserAddress, _HyperLiquidSubscriptionService_spotStateGeneration, _HyperLiquidSubscriptionService_cachedPositions, _HyperLiquidSubscriptionService_cachedOrders, _HyperLiquidSubscriptionService_cachedAccount, _HyperLiquidSubscriptionService_ordersCacheInitialized, _HyperLiquidSubscriptionService_positionsCacheInitialized, _HyperLiquidSubscriptionService_oiCapSubscribers, _HyperLiquidSubscriptionService_cachedOICaps, _HyperLiquidSubscriptionService_cachedOICapsHash, _HyperLiquidSubscriptionService_oiCapsCacheInitialized, _HyperLiquidSubscriptionService_cachedPriceData, _HyperLiquidSubscriptionService_allMidsSnapshots, _HyperLiquidSubscriptionService_cachedFills, _HyperLiquidSubscriptionService_fillsCacheInitialized, _HyperLiquidSubscriptionService_assetCtxsSubscriptions, _HyperLiquidSubscriptionService_dexAssetCtxsCache, _HyperLiquidSubscriptionService_assetCtxsSubscriptionPromises, _HyperLiquidSubscriptionService_dexAllMidsSubscriptions, _HyperLiquidSubscriptionService_dexAllMidsSubscriptionPromises, _HyperLiquidSubscriptionService_clearinghouseStateSubscriptions, _HyperLiquidSubscriptionService_openOrdersSubscriptions, _HyperLiquidSubscriptionService_pendingClearinghouseSubscriptions, _HyperLiquidSubscriptionService_pendingOpenOrdersSubscriptions, _HyperLiquidSubscriptionService_dexMetaCache, _HyperLiquidSubscriptionService_orderBookCache, _HyperLiquidSubscriptionService_marketDataCache, _HyperLiquidSubscriptionService_activeAssetCtxPriceTtlMs, _HyperLiquidSubscriptionService_isClearing, _HyperLiquidSubscriptionService_restoreRetryTimeouts, _HyperLiquidSubscriptionService_deps, _HyperLiquidSubscriptionService_logErrorUnlessClearing, _HyperLiquidSubscriptionService_isTransientSdkError, _HyperLiquidSubscriptionService_scheduleRestoreRetry, _HyperLiquidSubscriptionService_getErrorContext, _HyperLiquidSubscriptionService_isDexEnabled, _HyperLiquidSubscriptionService_waitForDexDiscovery, _HyperLiquidSubscriptionService_hashPositions, _HyperLiquidSubscriptionService_hashOrders, _HyperLiquidSubscriptionService_hashAccountState, _HyperLiquidSubscriptionService_cachedPositionsHash, _HyperLiquidSubscriptionService_cachedOrdersHash, _HyperLiquidSubscriptionService_cachedAccountHash, _HyperLiquidSubscriptionService_extractTPSLFromOrders, _HyperLiquidSubscriptionService_mergeTPSLIntoPositions, _HyperLiquidSubscriptionService_aggregateAccountStates, _HyperLiquidSubscriptionService_getAbstractionModeForUser, _HyperLiquidSubscriptionService_getSpotBalanceOptions, _HyperLiquidSubscriptionService_refreshAbstractionModeThrottled, _HyperLiquidSubscriptionService_ensureSpotState, _HyperLiquidSubscriptionService_refreshSpotState, _HyperLiquidSubscriptionService_ensureSpotStateSubscription, _HyperLiquidSubscriptionService_ensureSharedWebData3Subscription, _HyperLiquidSubscriptionService_createUserDataSubscription, _HyperLiquidSubscriptionService_ensureClearinghouseStateSubscription, _HyperLiquidSubscriptionService_createClearinghouseSubscription, _HyperLiquidSubscriptionService_ensureOpenOrdersSubscription, _HyperLiquidSubscriptionService_createOpenOrdersSubscription, _HyperLiquidSubscriptionService_aggregateAndNotifySubscribers, _HyperLiquidSubscriptionService_cleanupSharedWebData3ISubscription, _HyperLiquidSubscriptionService_ensureOrderFillISubscription, _HyperLiquidSubscriptionService_createSubscription, _HyperLiquidSubscriptionService_createPriceUpdate, _HyperLiquidSubscriptionService_getFreshActiveAssetCtxPrice, _HyperLiquidSubscriptionService_projectPriceUpdate, _HyperLiquidSubscriptionService_ensureGlobalAllMidsSubscription, _HyperLiquidSubscriptionService_ensureActiveAssetSubscription, _HyperLiquidSubscriptionService_cleanupActiveAssetSubscription, _HyperLiquidSubscriptionService_ensureAssetCtxsSubscription, _HyperLiquidSubscriptionService_ensureDexAllMidsSubscription, _HyperLiquidSubscriptionService_createDexAllMidsSubscription, _HyperLiquidSubscriptionService_createAssetCtxsSubscription, _HyperLiquidSubscriptionService_cleanupAssetCtxsSubscription, _HyperLiquidSubscriptionService_ensureBboSubscription, _HyperLiquidSubscriptionService_cleanupBboSubscription, _HyperLiquidSubscriptionService_processOrderBookData, _HyperLiquidSubscriptionService_notifyAllPriceSubscribers;
13
13
  import { hasProperty } from "@metamask/utils";
14
14
  import { HYPERLIQUID_CONFIG } from "../constants/hyperLiquidConfig.mjs";
15
15
  import { TP_SL_CONFIG, PERPS_CONSTANTS, ABSTRACTION_MODE_REFRESH_THROTTLE_MS } from "../constants/perpsConfig.mjs";
@@ -372,11 +372,24 @@ export class HyperLiquidSubscriptionService {
372
372
  __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_ensureBboSubscription).call(this, symbol);
373
373
  }
374
374
  });
375
- // Send cached data immediately if available
375
+ // Send cached data immediately if available, projecting the fast-stream
376
+ // price for focused subscribers and falling back to the allMids baseline
377
+ // for list subscribers.
376
378
  symbols.forEach((symbol) => {
377
379
  const cachedPrice = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f")?.get(symbol);
378
380
  if (cachedPrice) {
379
- callback([cachedPrice]);
381
+ const projected = includeMarketData
382
+ ? __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_projectPriceUpdate).call(this, symbol, cachedPrice)
383
+ : cachedPrice;
384
+ callback([projected]);
385
+ }
386
+ else if (includeMarketData) {
387
+ // No allMids baseline yet; if a fresh fast-stream price is cached,
388
+ // send it immediately so focused screens are not blank on first render.
389
+ const fastPrice = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_getFreshActiveAssetCtxPrice).call(this, symbol);
390
+ if (fastPrice !== undefined) {
391
+ callback([__classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_createPriceUpdate).call(this, symbol, fastPrice)]);
392
+ }
380
393
  }
381
394
  });
382
395
  // Return cleanup function
@@ -649,7 +662,7 @@ export class HyperLiquidSubscriptionService {
649
662
  * @returns Cleanup function to unsubscribe
650
663
  */
651
664
  subscribeToOrderBook(params) {
652
- const { symbol, levels = 10, nSigFigs = 5, mantissa, callback, onError, } = params;
665
+ const { symbol, levels = 10, nSigFigs = 5, mantissa, fast, callback, onError, } = params;
653
666
  __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_clientService, "f")
654
667
  .ensureSubscriptionClient(__classPrivateFieldGet(this, _HyperLiquidSubscriptionService_walletService, "f").createWalletAdapter())
655
668
  .catch(() => {
@@ -667,7 +680,7 @@ export class HyperLiquidSubscriptionService {
667
680
  let subscription;
668
681
  let cancelled = false;
669
682
  subscriptionClient
670
- .l2Book({ coin: symbol, nSigFigs, mantissa }, (data) => {
683
+ .l2Book({ coin: symbol, nSigFigs, mantissa, fast }, (data) => {
671
684
  if (cancelled || data?.coin !== symbol || !data?.levels) {
672
685
  return;
673
686
  }
@@ -1000,7 +1013,7 @@ export class HyperLiquidSubscriptionService {
1000
1013
  });
1001
1014
  }
1002
1015
  }
1003
- _HyperLiquidSubscriptionService_clientService = new WeakMap(), _HyperLiquidSubscriptionService_walletService = new WeakMap(), _HyperLiquidSubscriptionService_hip3Enabled = new WeakMap(), _HyperLiquidSubscriptionService_enabledDexs = new WeakMap(), _HyperLiquidSubscriptionService_allowlistMarkets = new WeakMap(), _HyperLiquidSubscriptionService_blocklistMarkets = new WeakMap(), _HyperLiquidSubscriptionService_priceDeviationLimit = new WeakMap(), _HyperLiquidSubscriptionService_discoveredDexNames = new WeakMap(), _HyperLiquidSubscriptionService_dexDiscoveryPromise = new WeakMap(), _HyperLiquidSubscriptionService_dexDiscoveryResolver = new WeakMap(), _HyperLiquidSubscriptionService_expectedDexs = new WeakMap(), _HyperLiquidSubscriptionService_initializedDexs = new WeakMap(), _HyperLiquidSubscriptionService_priceSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_positionSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_orderFillSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_orderSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_accountSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_marketDataSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_orderBookSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_globalAllMidsSubscription = new WeakMap(), _HyperLiquidSubscriptionService_globalAllMidsPromise = new WeakMap(), _HyperLiquidSubscriptionService_globalActiveAssetSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingActiveAssetPromises = new WeakMap(), _HyperLiquidSubscriptionService_globalBboSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingBboPromises = new WeakMap(), _HyperLiquidSubscriptionService_orderFillSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_spotStateSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_spotStateSubscriptionPromises = new WeakMap(), _HyperLiquidSubscriptionService_spotStateSubscriptionGeneration = new WeakMap(), _HyperLiquidSubscriptionService_symbolSubscriberCounts = new WeakMap(), _HyperLiquidSubscriptionService_dexSubscriberCounts = new WeakMap(), _HyperLiquidSubscriptionService_webData3Subscriptions = new WeakMap(), _HyperLiquidSubscriptionService_webData3SubscriptionPromise = new WeakMap(), _HyperLiquidSubscriptionService_positionSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_orderSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_accountSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_oiCapSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_dexPositionsCache = new WeakMap(), _HyperLiquidSubscriptionService_dexOrdersCache = new WeakMap(), _HyperLiquidSubscriptionService_dexAccountCache = new WeakMap(), _HyperLiquidSubscriptionService_cachedSpotState = new WeakMap(), _HyperLiquidSubscriptionService_abstractionModeByUser = new WeakMap(), _HyperLiquidSubscriptionService_abstractionModeLastWsRefreshAtByUser = new WeakMap(), _HyperLiquidSubscriptionService_abstractionModeInflightByUser = new WeakMap(), _HyperLiquidSubscriptionService_cachedSpotStateUserAddress = new WeakMap(), _HyperLiquidSubscriptionService_spotStatePromise = new WeakMap(), _HyperLiquidSubscriptionService_spotStatePromiseUserAddress = new WeakMap(), _HyperLiquidSubscriptionService_spotStateGeneration = new WeakMap(), _HyperLiquidSubscriptionService_cachedPositions = new WeakMap(), _HyperLiquidSubscriptionService_cachedOrders = new WeakMap(), _HyperLiquidSubscriptionService_cachedAccount = new WeakMap(), _HyperLiquidSubscriptionService_ordersCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_positionsCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_oiCapSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_cachedOICaps = new WeakMap(), _HyperLiquidSubscriptionService_cachedOICapsHash = new WeakMap(), _HyperLiquidSubscriptionService_oiCapsCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_cachedPriceData = new WeakMap(), _HyperLiquidSubscriptionService_allMidsSnapshots = new WeakMap(), _HyperLiquidSubscriptionService_cachedFills = new WeakMap(), _HyperLiquidSubscriptionService_fillsCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_assetCtxsSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_dexAssetCtxsCache = new WeakMap(), _HyperLiquidSubscriptionService_assetCtxsSubscriptionPromises = new WeakMap(), _HyperLiquidSubscriptionService_dexAllMidsSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_dexAllMidsSubscriptionPromises = new WeakMap(), _HyperLiquidSubscriptionService_clearinghouseStateSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_openOrdersSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingClearinghouseSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingOpenOrdersSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_dexMetaCache = new WeakMap(), _HyperLiquidSubscriptionService_orderBookCache = new WeakMap(), _HyperLiquidSubscriptionService_marketDataCache = new WeakMap(), _HyperLiquidSubscriptionService_isClearing = new WeakMap(), _HyperLiquidSubscriptionService_restoreRetryTimeouts = new WeakMap(), _HyperLiquidSubscriptionService_deps = new WeakMap(), _HyperLiquidSubscriptionService_cachedPositionsHash = new WeakMap(), _HyperLiquidSubscriptionService_cachedOrdersHash = new WeakMap(), _HyperLiquidSubscriptionService_cachedAccountHash = new WeakMap(), _HyperLiquidSubscriptionService_instances = new WeakSet(), _HyperLiquidSubscriptionService_logErrorUnlessClearing = function _HyperLiquidSubscriptionService_logErrorUnlessClearing(error, context) {
1016
+ _a = HyperLiquidSubscriptionService, _HyperLiquidSubscriptionService_clientService = new WeakMap(), _HyperLiquidSubscriptionService_walletService = new WeakMap(), _HyperLiquidSubscriptionService_hip3Enabled = new WeakMap(), _HyperLiquidSubscriptionService_enabledDexs = new WeakMap(), _HyperLiquidSubscriptionService_allowlistMarkets = new WeakMap(), _HyperLiquidSubscriptionService_blocklistMarkets = new WeakMap(), _HyperLiquidSubscriptionService_priceDeviationLimit = new WeakMap(), _HyperLiquidSubscriptionService_discoveredDexNames = new WeakMap(), _HyperLiquidSubscriptionService_dexDiscoveryPromise = new WeakMap(), _HyperLiquidSubscriptionService_dexDiscoveryResolver = new WeakMap(), _HyperLiquidSubscriptionService_expectedDexs = new WeakMap(), _HyperLiquidSubscriptionService_initializedDexs = new WeakMap(), _HyperLiquidSubscriptionService_priceSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_positionSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_orderFillSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_orderSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_accountSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_marketDataSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_orderBookSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_globalAllMidsSubscription = new WeakMap(), _HyperLiquidSubscriptionService_globalAllMidsPromise = new WeakMap(), _HyperLiquidSubscriptionService_globalActiveAssetSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingActiveAssetPromises = new WeakMap(), _HyperLiquidSubscriptionService_globalBboSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingBboPromises = new WeakMap(), _HyperLiquidSubscriptionService_orderFillSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_spotStateSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_spotStateSubscriptionPromises = new WeakMap(), _HyperLiquidSubscriptionService_spotStateSubscriptionGeneration = new WeakMap(), _HyperLiquidSubscriptionService_symbolSubscriberCounts = new WeakMap(), _HyperLiquidSubscriptionService_dexSubscriberCounts = new WeakMap(), _HyperLiquidSubscriptionService_webData3Subscriptions = new WeakMap(), _HyperLiquidSubscriptionService_webData3SubscriptionPromise = new WeakMap(), _HyperLiquidSubscriptionService_positionSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_orderSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_accountSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_oiCapSubscriberCount = new WeakMap(), _HyperLiquidSubscriptionService_dexPositionsCache = new WeakMap(), _HyperLiquidSubscriptionService_dexOrdersCache = new WeakMap(), _HyperLiquidSubscriptionService_dexAccountCache = new WeakMap(), _HyperLiquidSubscriptionService_cachedSpotState = new WeakMap(), _HyperLiquidSubscriptionService_abstractionModeByUser = new WeakMap(), _HyperLiquidSubscriptionService_abstractionModeLastWsRefreshAtByUser = new WeakMap(), _HyperLiquidSubscriptionService_abstractionModeInflightByUser = new WeakMap(), _HyperLiquidSubscriptionService_cachedSpotStateUserAddress = new WeakMap(), _HyperLiquidSubscriptionService_spotStatePromise = new WeakMap(), _HyperLiquidSubscriptionService_spotStatePromiseUserAddress = new WeakMap(), _HyperLiquidSubscriptionService_spotStateGeneration = new WeakMap(), _HyperLiquidSubscriptionService_cachedPositions = new WeakMap(), _HyperLiquidSubscriptionService_cachedOrders = new WeakMap(), _HyperLiquidSubscriptionService_cachedAccount = new WeakMap(), _HyperLiquidSubscriptionService_ordersCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_positionsCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_oiCapSubscribers = new WeakMap(), _HyperLiquidSubscriptionService_cachedOICaps = new WeakMap(), _HyperLiquidSubscriptionService_cachedOICapsHash = new WeakMap(), _HyperLiquidSubscriptionService_oiCapsCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_cachedPriceData = new WeakMap(), _HyperLiquidSubscriptionService_allMidsSnapshots = new WeakMap(), _HyperLiquidSubscriptionService_cachedFills = new WeakMap(), _HyperLiquidSubscriptionService_fillsCacheInitialized = new WeakMap(), _HyperLiquidSubscriptionService_assetCtxsSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_dexAssetCtxsCache = new WeakMap(), _HyperLiquidSubscriptionService_assetCtxsSubscriptionPromises = new WeakMap(), _HyperLiquidSubscriptionService_dexAllMidsSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_dexAllMidsSubscriptionPromises = new WeakMap(), _HyperLiquidSubscriptionService_clearinghouseStateSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_openOrdersSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingClearinghouseSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_pendingOpenOrdersSubscriptions = new WeakMap(), _HyperLiquidSubscriptionService_dexMetaCache = new WeakMap(), _HyperLiquidSubscriptionService_orderBookCache = new WeakMap(), _HyperLiquidSubscriptionService_marketDataCache = new WeakMap(), _HyperLiquidSubscriptionService_isClearing = new WeakMap(), _HyperLiquidSubscriptionService_restoreRetryTimeouts = new WeakMap(), _HyperLiquidSubscriptionService_deps = new WeakMap(), _HyperLiquidSubscriptionService_cachedPositionsHash = new WeakMap(), _HyperLiquidSubscriptionService_cachedOrdersHash = new WeakMap(), _HyperLiquidSubscriptionService_cachedAccountHash = new WeakMap(), _HyperLiquidSubscriptionService_instances = new WeakSet(), _HyperLiquidSubscriptionService_logErrorUnlessClearing = function _HyperLiquidSubscriptionService_logErrorUnlessClearing(error, context) {
1004
1017
  if (__classPrivateFieldGet(this, _HyperLiquidSubscriptionService_isClearing, "f")) {
1005
1018
  return;
1006
1019
  }
@@ -2197,7 +2210,7 @@ async function _HyperLiquidSubscriptionService_ensureOrderFillISubscription(acco
2197
2210
  (__classPrivateFieldGet(this, _HyperLiquidSubscriptionService_marketDataSubscribers, "f").get(symbol)?.size ?? 0) > 0;
2198
2211
  const priceUpdate = {
2199
2212
  symbol,
2200
- price, // This is the mid price from allMids
2213
+ price,
2201
2214
  timestamp: Date.now(),
2202
2215
  percentChange24h,
2203
2216
  // Add mark price from activeAssetCtx
@@ -2226,6 +2239,27 @@ async function _HyperLiquidSubscriptionService_ensureOrderFillISubscription(acco
2226
2239
  }),
2227
2240
  };
2228
2241
  return priceUpdate;
2242
+ }, _HyperLiquidSubscriptionService_getFreshActiveAssetCtxPrice = function _HyperLiquidSubscriptionService_getFreshActiveAssetCtxPrice(symbol) {
2243
+ const marketData = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_marketDataCache, "f").get(symbol);
2244
+ if (marketData?.activeAssetCtxPrice === undefined ||
2245
+ marketData.priceLastUpdated === undefined) {
2246
+ return undefined;
2247
+ }
2248
+ if (Date.now() - marketData.priceLastUpdated >
2249
+ __classPrivateFieldGet(_a, _a, "f", _HyperLiquidSubscriptionService_activeAssetCtxPriceTtlMs)) {
2250
+ return undefined;
2251
+ }
2252
+ return marketData.activeAssetCtxPrice.toString();
2253
+ }, _HyperLiquidSubscriptionService_projectPriceUpdate = function _HyperLiquidSubscriptionService_projectPriceUpdate(symbol, base) {
2254
+ const fastPrice = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_getFreshActiveAssetCtxPrice).call(this, symbol);
2255
+ if (fastPrice === undefined) {
2256
+ return base;
2257
+ }
2258
+ return {
2259
+ ...base,
2260
+ price: fastPrice,
2261
+ timestamp: Date.now(),
2262
+ };
2229
2263
  }, _HyperLiquidSubscriptionService_ensureGlobalAllMidsSubscription = function _HyperLiquidSubscriptionService_ensureGlobalAllMidsSubscription() {
2230
2264
  // Check both the subscription AND the promise to prevent race conditions
2231
2265
  if (__classPrivateFieldGet(this, _HyperLiquidSubscriptionService_globalAllMidsSubscription, "f") ?? __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_globalAllMidsPromise, "f")) {
@@ -2326,6 +2360,7 @@ async function _HyperLiquidSubscriptionService_ensureOrderFillISubscription(acco
2326
2360
  const { ctx } = data;
2327
2361
  // Cache market data for consolidation with price updates
2328
2362
  const ctxPrice = ctx.midPx ?? ctx.markPx;
2363
+ const now = Date.now();
2329
2364
  const openInterestUSD = isPerpsContext(data) && ctxPrice
2330
2365
  ? calculateOpenInterestUSD(data.ctx.openInterest, ctxPrice)
2331
2366
  : NaN;
@@ -2347,17 +2382,31 @@ async function _HyperLiquidSubscriptionService_ensureOrderFillISubscription(acco
2347
2382
  oraclePrice: isPerpsContext(data)
2348
2383
  ? parseFloat(data.ctx.oraclePx.toString())
2349
2384
  : undefined,
2350
- lastUpdated: Date.now(),
2385
+ lastUpdated: now,
2386
+ // Store fast-stream price for per-subscriber projection in
2387
+ // #notifyAllPriceSubscribers. Used only for focused subscribers.
2388
+ activeAssetCtxPrice: ctxPrice
2389
+ ? parseFloat(ctxPrice.toString())
2390
+ : undefined,
2391
+ priceLastUpdated: ctxPrice ? now : undefined,
2351
2392
  };
2352
2393
  __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_marketDataCache, "f").set(symbol, marketData);
2353
- // Update cached price data with new 24h change if we have current price
2354
- const currentCachedPrice = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f")?.get(symbol);
2355
- if (currentCachedPrice) {
2356
- const updatedPrice = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_createPriceUpdate).call(this, symbol, currentCachedPrice.price);
2357
- __classPrivateFieldSet(this, _HyperLiquidSubscriptionService_cachedPriceData, __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f") ?? new Map(), "f");
2358
- __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f").set(symbol, updatedPrice);
2359
- __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_notifyAllPriceSubscribers).call(this);
2394
+ // Rebuild the allMids baseline so derived fields (isTradable,
2395
+ // funding, openInterest, volume24h, markPrice, percentChange24h)
2396
+ // pick up the new activeAssetCtx data. Only rebuild when a baseline
2397
+ // already exists to preserve the startup zero-price guard: we never
2398
+ // want to synthesize a baseline from a '0' / absent allMids price.
2399
+ const priceCache = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f");
2400
+ const existingBaseline = priceCache?.get(symbol);
2401
+ if (priceCache && existingBaseline) {
2402
+ priceCache.set(symbol, __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_createPriceUpdate).call(this, symbol, existingBaseline.price));
2360
2403
  }
2404
+ // Notify subscribers. #notifyAllPriceSubscribers projects the
2405
+ // fast-stream price (now stored in #marketDataCache) for focused
2406
+ // (includeMarketData: true) subscribers, while list subscribers
2407
+ // continue to receive only the allMids baseline from #cachedPriceData.
2408
+ // List subscribers are skipped until an allMids tick has arrived.
2409
+ __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_notifyAllPriceSubscribers).call(this);
2361
2410
  }
2362
2411
  })
2363
2412
  .then((sub) => {
@@ -2571,6 +2620,15 @@ async function _HyperLiquidSubscriptionService_createAssetCtxsSubscription(dex)
2571
2620
  // This is a perps context
2572
2621
  const ctxPrice = ctx.midPx ?? ctx.markPx;
2573
2622
  const openInterestUSD = calculateOpenInterestUSD(ctx.openInterest, ctxPrice);
2623
+ // Preserve the fast-stream price fields set by the per-symbol
2624
+ // activeAssetCtx handler. assetCtxs is a per-DEX batch that does not
2625
+ // carry the fast-stream price concept, so rebuilding the entry from
2626
+ // scratch would clobber activeAssetCtxPrice/priceLastUpdated and make
2627
+ // #getFreshActiveAssetCtxPrice return stale, dropping focused
2628
+ // subscribers back to the slower allMids baseline. priceLastUpdated
2629
+ // is carried forward (not reset) so the staleness gate keeps
2630
+ // reflecting the last activeAssetCtx tick.
2631
+ const existingMarketData = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_marketDataCache, "f").get(asset.name);
2574
2632
  const marketData = {
2575
2633
  prevDayPx: ctx.prevDayPx
2576
2634
  ? parseFloat(ctx.prevDayPx.toString())
@@ -2584,6 +2642,8 @@ async function _HyperLiquidSubscriptionService_createAssetCtxsSubscription(dex)
2584
2642
  : undefined,
2585
2643
  oraclePrice: parseFloat(ctx.oraclePx.toString()),
2586
2644
  lastUpdated: Date.now(),
2645
+ activeAssetCtxPrice: existingMarketData?.activeAssetCtxPrice,
2646
+ priceLastUpdated: existingMarketData?.priceLastUpdated,
2587
2647
  };
2588
2648
  __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_marketDataCache, "f").set(asset.name, marketData);
2589
2649
  // HIP-3: Extract price from assetCtx and update cached prices
@@ -2803,26 +2863,30 @@ async function _HyperLiquidSubscriptionService_createAssetCtxsSubscription(dex)
2803
2863
  maxTotal,
2804
2864
  };
2805
2865
  }, _HyperLiquidSubscriptionService_notifyAllPriceSubscribers = function _HyperLiquidSubscriptionService_notifyAllPriceSubscribers() {
2806
- // If no price data exists yet, don't notify
2807
- if (!__classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f")) {
2808
- return;
2809
- }
2810
- const priceData = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f");
2811
- // Group updates by subscriber to batch notifications
2812
2866
  const subscriberUpdates = new Map();
2813
2867
  __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_priceSubscribers, "f").forEach((subscriberSet, symbol) => {
2814
- const priceUpdate = priceData.get(symbol);
2815
- if (priceUpdate) {
2816
- subscriberSet.forEach((callback) => {
2817
- if (!subscriberUpdates.has(callback)) {
2818
- subscriberUpdates.set(callback, []);
2819
- }
2820
- const updates = subscriberUpdates.get(callback);
2821
- if (updates) {
2822
- updates.push(priceUpdate);
2823
- }
2824
- });
2825
- }
2868
+ const allMidsBase = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_cachedPriceData, "f")?.get(symbol);
2869
+ const fastPrice = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_getFreshActiveAssetCtxPrice).call(this, symbol);
2870
+ const now = Date.now();
2871
+ subscriberSet.forEach((callback) => {
2872
+ const isFocused = __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_marketDataSubscribers, "f").get(symbol)?.has(callback) ?? false;
2873
+ let priceUpdate;
2874
+ if (isFocused && fastPrice !== undefined) {
2875
+ // Use allMids baseline as the structural base when available;
2876
+ // fall back to a freshly computed PriceUpdate if allMids hasn't
2877
+ // arrived yet so focused screens stay responsive on first render.
2878
+ const base = allMidsBase ?? __classPrivateFieldGet(this, _HyperLiquidSubscriptionService_instances, "m", _HyperLiquidSubscriptionService_createPriceUpdate).call(this, symbol, fastPrice);
2879
+ priceUpdate = { ...base, price: fastPrice, timestamp: now };
2880
+ }
2881
+ else if (allMidsBase !== undefined) {
2882
+ priceUpdate = allMidsBase;
2883
+ }
2884
+ if (priceUpdate !== undefined) {
2885
+ const updates = subscriberUpdates.get(callback) ?? [];
2886
+ updates.push(priceUpdate);
2887
+ subscriberUpdates.set(callback, updates);
2888
+ }
2889
+ });
2826
2890
  });
2827
2891
  // Send batched updates to each subscriber
2828
2892
  subscriberUpdates.forEach((updates, callback) => {
@@ -2831,4 +2895,8 @@ async function _HyperLiquidSubscriptionService_createAssetCtxsSubscription(dex)
2831
2895
  }
2832
2896
  });
2833
2897
  };
2898
+ // Stale threshold for the fast-stream price preference. If the last
2899
+ // activeAssetCtx price update is older than this, the allMids baseline is
2900
+ // used for focused subscribers.
2901
+ _HyperLiquidSubscriptionService_activeAssetCtxPriceTtlMs = { value: 10000 };
2834
2902
  //# sourceMappingURL=HyperLiquidSubscriptionService.mjs.map