@metamask-previews/perps-controller 25.0.0-preview-2caafa97d → 25.0.0-preview-d8b2a69a9

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.
@@ -104,13 +104,30 @@ Code: `src/services/HyperLiquidClientService.ts` `#createAllClients`, `#createHt
104
104
 
105
105
  ## Subscriptions
106
106
 
107
- | Channel | Scope | Feeds |
108
- | -------------------- | ------------------ | ---------------------------------- |
109
- | `clearinghouseState` | Per DEX | Positions and account |
110
- | `openOrders` | Per DEX | Orders |
111
- | `webData3` | User | Open-interest caps only |
112
- | `allMids` | Global and per DEX | Mid prices |
113
- | `assetCtxs` | Per DEX | Funding, open interest, mark price |
114
- | `fastAssetCtxs` | Global | Price updates |
107
+ | Channel | Scope | Feeds |
108
+ | -------------------- | ------------------ | ----------------------------------- |
109
+ | `clearinghouseState` | Per DEX | Positions and account |
110
+ | `openOrders` | Per DEX | Orders |
111
+ | `spotState` | User | Spot balances |
112
+ | `webData3` | User | Account mode and open-interest caps |
113
+ | `allMids` | Global and per DEX | Mid prices |
114
+ | `assetCtxs` | Per DEX | Funding, open interest, mark price |
115
+ | `fastAssetCtxs` | Global | Price updates |
116
+
117
+ Direct Hyperliquid account updates can include `accountMode` from `webData3`
118
+ for the bound wallet on the current WebSocket connection. Cross opening
119
+ previews reuse live data only when that mode and the required account slices
120
+ are current. Standard mode uses the main DEX account slice. Unified mode also
121
+ requires current spot balances and account coverage for every configured
122
+ position DEX. After a wallet switch, reconnect, or mode change, a preview
123
+ uses fresh venue reads while the required inputs are still arriving.
124
+
125
+ Direct Hyperliquid position and order subscriptions accept
126
+ `includeSnapshotStatus: true`. Each channel waits independently for all
127
+ configured DEXs to deliver that channel's snapshot for the bound wallet and
128
+ current connection. This includes confirmed empty snapshots. Position callbacks
129
+ receive `(positions, true)` and order callbacks receive
130
+ `(orders, undefined, true)`. Calls that omit the option keep their existing
131
+ delivery and callback signatures.
115
132
 
116
133
  Code: `src/services/HyperLiquidSubscriptionService.ts` `#ensureClearinghouseStateSubscription`, `#ensureOpenOrdersSubscription`, `#ensureGlobalAllMidsSubscription`, `#createDexAllMidsSubscription`, `#createAssetCtxsSubscription`, `#ensureGlobalFastAssetCtxsSubscription`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/perps-controller",
3
- "version": "25.0.0-preview-2caafa97d",
3
+ "version": "25.0.0-preview-d8b2a69a9",
4
4
  "description": "Controller for perpetual trading functionality in MetaMask",
5
5
  "keywords": [
6
6
  "Ethereum",