@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.
- package/CHANGELOG.md +2 -0
- package/dist/providers/HyperLiquidProvider.d.ts.map +1 -1
- package/dist/providers/HyperLiquidProvider.js +60 -35
- package/dist/providers/HyperLiquidProvider.js.map +1 -1
- package/dist/services/HyperLiquidClientService.d.ts.map +1 -1
- package/dist/services/HyperLiquidClientService.js +5 -4
- package/dist/services/HyperLiquidClientService.js.map +1 -1
- package/dist/services/HyperLiquidSubscriptionService.d.ts +13 -1
- package/dist/services/HyperLiquidSubscriptionService.d.ts.map +1 -1
- package/dist/services/HyperLiquidSubscriptionService.js +296 -50
- package/dist/services/HyperLiquidSubscriptionService.js.map +1 -1
- package/dist/types/index.d.ts +10 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/docs/venues/hyperliquid/init-flow.md +25 -8
- package/package.json +1 -1
|
@@ -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
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
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