@nktkas/hyperliquid 0.13.0 → 0.13.2

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 (206) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +42 -17
  3. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts +9 -0
  4. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts.map +1 -0
  5. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.js +2 -0
  6. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.d.ts +3 -1
  7. package/esm/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts.map +1 -0
  8. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.js +1 -1
  9. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts +9 -0
  10. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts.map +1 -0
  11. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.js +2 -0
  12. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts.map +1 -1
  13. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.js +1 -1
  14. package/{script/deps/jsr.io/@std/encoding/1.0.6 → esm/deps/jsr.io/@std/encoding/1.0.7}/hex.d.ts +3 -1
  15. package/esm/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  16. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/hex.js +1 -1
  17. package/esm/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts +9 -0
  18. package/esm/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts.map +1 -0
  19. package/esm/deps/jsr.io/@std/msgpack/1.0.3/_types.js +2 -0
  20. package/esm/deps/jsr.io/@std/msgpack/{1.0.2 → 1.0.3}/encode.d.ts +3 -1
  21. package/esm/deps/jsr.io/@std/msgpack/1.0.3/encode.d.ts.map +1 -0
  22. package/esm/deps/jsr.io/@std/msgpack/{1.0.2 → 1.0.3}/encode.js +2 -2
  23. package/esm/mod.d.ts +15 -14
  24. package/esm/mod.d.ts.map +1 -1
  25. package/esm/src/clients/event.d.ts +64 -21
  26. package/esm/src/clients/event.d.ts.map +1 -1
  27. package/esm/src/clients/event.js +76 -18
  28. package/esm/src/clients/public.d.ts +244 -52
  29. package/esm/src/clients/public.d.ts.map +1 -1
  30. package/esm/src/clients/public.js +243 -47
  31. package/esm/src/clients/wallet.d.ts +122 -53
  32. package/esm/src/clients/wallet.d.ts.map +1 -1
  33. package/esm/src/clients/wallet.js +201 -65
  34. package/esm/src/transports/http/http_transport.d.ts.map +1 -1
  35. package/esm/src/transports/http/http_transport.js +4 -1
  36. package/esm/src/transports/websocket/hyperliquid_event_target.d.ts +27 -21
  37. package/esm/src/transports/websocket/hyperliquid_event_target.d.ts.map +1 -1
  38. package/esm/src/transports/websocket/hyperliquid_event_target.js +37 -0
  39. package/esm/src/transports/websocket/websocket_request_dispatcher.d.ts.map +1 -1
  40. package/esm/src/transports/websocket/websocket_request_dispatcher.js +4 -4
  41. package/esm/src/transports/websocket/websocket_transport.d.ts +7 -10
  42. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  43. package/esm/src/transports/websocket/websocket_transport.js +41 -35
  44. package/esm/src/types/common.d.ts +3 -0
  45. package/esm/src/types/common.d.ts.map +1 -0
  46. package/esm/src/types/common.js +1 -0
  47. package/esm/src/types/exchange/common.d.ts +36 -0
  48. package/esm/src/types/exchange/common.d.ts.map +1 -0
  49. package/esm/src/types/exchange/common.js +1 -0
  50. package/esm/src/types/exchange/requests.d.ts +502 -0
  51. package/esm/src/types/exchange/requests.d.ts.map +1 -0
  52. package/esm/src/types/exchange/requests.js +1 -0
  53. package/esm/src/types/exchange/responses.d.ts +141 -0
  54. package/esm/src/types/exchange/responses.d.ts.map +1 -0
  55. package/esm/src/types/exchange/responses.js +1 -0
  56. package/esm/src/types/explorer/common.d.ts +37 -0
  57. package/esm/src/types/explorer/common.d.ts.map +1 -0
  58. package/esm/src/types/explorer/common.js +1 -0
  59. package/esm/src/types/explorer/requests.d.ts +35 -0
  60. package/esm/src/types/explorer/requests.d.ts.map +1 -0
  61. package/esm/src/types/explorer/requests.js +1 -0
  62. package/esm/src/types/explorer/responses.d.ts +23 -0
  63. package/esm/src/types/explorer/responses.d.ts.map +1 -0
  64. package/esm/src/types/explorer/responses.js +1 -0
  65. package/esm/src/types/info/accounts.d.ts +489 -0
  66. package/esm/src/types/info/accounts.d.ts.map +1 -0
  67. package/esm/src/types/info/accounts.js +1 -0
  68. package/esm/src/types/info/assets.d.ts +275 -0
  69. package/esm/src/types/info/assets.d.ts.map +1 -0
  70. package/esm/src/types/info/assets.js +1 -0
  71. package/esm/src/types/info/delegations.d.ts +117 -0
  72. package/esm/src/types/info/delegations.d.ts.map +1 -0
  73. package/esm/src/types/info/delegations.js +1 -0
  74. package/esm/src/types/info/orders.d.ts +209 -0
  75. package/esm/src/types/info/orders.d.ts.map +1 -0
  76. package/esm/src/types/info/orders.js +1 -0
  77. package/esm/src/types/info/requests.d.ts +445 -0
  78. package/esm/src/types/info/requests.d.ts.map +1 -0
  79. package/esm/src/types/info/requests.js +1 -0
  80. package/esm/src/types/info/vaults.d.ts +90 -0
  81. package/esm/src/types/info/vaults.d.ts.map +1 -0
  82. package/esm/src/types/info/vaults.js +1 -0
  83. package/esm/src/types/subscriptions/common.d.ts +208 -0
  84. package/esm/src/types/subscriptions/common.d.ts.map +1 -0
  85. package/esm/src/types/subscriptions/common.js +1 -0
  86. package/esm/src/types/subscriptions/requests.d.ts +134 -0
  87. package/esm/src/types/subscriptions/requests.d.ts.map +1 -0
  88. package/esm/src/types/subscriptions/requests.js +1 -0
  89. package/esm/src/utils/key_sort.d.ts +3 -3
  90. package/esm/src/utils/key_sort.d.ts.map +1 -1
  91. package/esm/src/utils/signing.d.ts +1 -1
  92. package/esm/src/utils/signing.js +2 -2
  93. package/package.json +2 -2
  94. package/script/deps/jsr.io/@derzade/typescript-event-target/1.1.1/mod.js +13 -3
  95. package/script/deps/jsr.io/@derzade/typescript-event-target/1.1.1/src/TypedEventTarget.js +23 -13
  96. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/_assert.js +55 -45
  97. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/_u64.js +97 -87
  98. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/crypto.js +14 -4
  99. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/sha3.js +288 -278
  100. package/script/deps/jsr.io/@noble/hashes/1.7.1/src/utils.js +238 -228
  101. package/script/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts +9 -0
  102. package/script/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts.map +1 -0
  103. package/script/deps/jsr.io/@std/bytes/1.0.5/_types.js +13 -0
  104. package/script/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.d.ts +3 -1
  105. package/script/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts.map +1 -0
  106. package/script/deps/jsr.io/@std/bytes/1.0.5/concat.js +45 -0
  107. package/script/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts +9 -0
  108. package/script/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts.map +1 -0
  109. package/script/deps/jsr.io/@std/encoding/1.0.7/_types.js +13 -0
  110. package/script/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts.map +1 -1
  111. package/script/deps/jsr.io/@std/encoding/1.0.7/_validate_binary_like.js +39 -0
  112. package/{esm/deps/jsr.io/@std/encoding/1.0.6 → script/deps/jsr.io/@std/encoding/1.0.7}/hex.d.ts +3 -1
  113. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  114. package/script/deps/jsr.io/@std/encoding/1.0.7/hex.js +123 -0
  115. package/script/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts +9 -0
  116. package/script/deps/jsr.io/@std/msgpack/1.0.3/_types.d.ts.map +1 -0
  117. package/script/deps/jsr.io/@std/msgpack/1.0.3/_types.js +13 -0
  118. package/script/deps/jsr.io/@std/msgpack/{1.0.2 → 1.0.3}/encode.d.ts +3 -1
  119. package/script/deps/jsr.io/@std/msgpack/1.0.3/encode.d.ts.map +1 -0
  120. package/script/deps/jsr.io/@std/msgpack/1.0.3/encode.js +250 -0
  121. package/script/mod.d.ts +15 -14
  122. package/script/mod.d.ts.map +1 -1
  123. package/script/mod.js +23 -13
  124. package/script/src/clients/event.d.ts +64 -21
  125. package/script/src/clients/event.d.ts.map +1 -1
  126. package/script/src/clients/event.js +551 -483
  127. package/script/src/clients/public.d.ts +244 -52
  128. package/script/src/clients/public.d.ts.map +1 -1
  129. package/script/src/clients/public.js +914 -708
  130. package/script/src/clients/wallet.d.ts +122 -53
  131. package/script/src/clients/wallet.d.ts.map +1 -1
  132. package/script/src/clients/wallet.js +1121 -975
  133. package/script/src/transports/base.js +25 -15
  134. package/script/src/transports/http/http_transport.d.ts.map +1 -1
  135. package/script/src/transports/http/http_transport.js +174 -161
  136. package/script/src/transports/websocket/hyperliquid_event_target.d.ts +27 -21
  137. package/script/src/transports/websocket/hyperliquid_event_target.d.ts.map +1 -1
  138. package/script/src/transports/websocket/hyperliquid_event_target.js +80 -33
  139. package/script/src/transports/websocket/reconnecting_websocket.js +364 -354
  140. package/script/src/transports/websocket/websocket_request_dispatcher.d.ts.map +1 -1
  141. package/script/src/transports/websocket/websocket_request_dispatcher.js +196 -186
  142. package/script/src/transports/websocket/websocket_transport.d.ts +7 -10
  143. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  144. package/script/src/transports/websocket/websocket_transport.js +236 -220
  145. package/script/src/types/common.d.ts +3 -0
  146. package/script/src/types/common.d.ts.map +1 -0
  147. package/script/src/types/common.js +12 -0
  148. package/script/src/types/exchange/common.d.ts +36 -0
  149. package/script/src/types/exchange/common.d.ts.map +1 -0
  150. package/script/src/types/exchange/common.js +12 -0
  151. package/script/src/types/exchange/requests.d.ts +502 -0
  152. package/script/src/types/exchange/requests.d.ts.map +1 -0
  153. package/script/src/types/exchange/requests.js +12 -0
  154. package/script/src/types/exchange/responses.d.ts +141 -0
  155. package/script/src/types/exchange/responses.d.ts.map +1 -0
  156. package/script/src/types/exchange/responses.js +12 -0
  157. package/script/src/types/explorer/common.d.ts +37 -0
  158. package/script/src/types/explorer/common.d.ts.map +1 -0
  159. package/script/src/types/explorer/common.js +12 -0
  160. package/script/src/types/explorer/requests.d.ts +35 -0
  161. package/script/src/types/explorer/requests.d.ts.map +1 -0
  162. package/script/src/types/explorer/requests.js +12 -0
  163. package/script/src/types/explorer/responses.d.ts +23 -0
  164. package/script/src/types/explorer/responses.d.ts.map +1 -0
  165. package/script/src/types/explorer/responses.js +12 -0
  166. package/script/src/types/info/accounts.d.ts +489 -0
  167. package/script/src/types/info/accounts.d.ts.map +1 -0
  168. package/script/src/types/info/accounts.js +12 -0
  169. package/script/src/types/info/assets.d.ts +275 -0
  170. package/script/src/types/info/assets.d.ts.map +1 -0
  171. package/script/src/types/info/assets.js +12 -0
  172. package/script/src/types/info/delegations.d.ts +117 -0
  173. package/script/src/types/info/delegations.d.ts.map +1 -0
  174. package/script/src/types/info/delegations.js +12 -0
  175. package/script/src/types/info/orders.d.ts +209 -0
  176. package/script/src/types/info/orders.d.ts.map +1 -0
  177. package/script/src/types/info/orders.js +12 -0
  178. package/script/src/types/info/requests.d.ts +445 -0
  179. package/script/src/types/info/requests.d.ts.map +1 -0
  180. package/script/src/types/info/requests.js +12 -0
  181. package/script/src/types/info/vaults.d.ts +90 -0
  182. package/script/src/types/info/vaults.d.ts.map +1 -0
  183. package/script/src/types/info/vaults.js +12 -0
  184. package/script/src/types/subscriptions/common.d.ts +208 -0
  185. package/script/src/types/subscriptions/common.d.ts.map +1 -0
  186. package/script/src/types/subscriptions/common.js +12 -0
  187. package/script/src/types/subscriptions/requests.d.ts +134 -0
  188. package/script/src/types/subscriptions/requests.d.ts.map +1 -0
  189. package/script/src/types/subscriptions/requests.js +12 -0
  190. package/script/src/utils/key_sort.d.ts +3 -3
  191. package/script/src/utils/key_sort.d.ts.map +1 -1
  192. package/script/src/utils/key_sort.js +133 -123
  193. package/script/src/utils/signing.d.ts +1 -1
  194. package/script/src/utils/signing.js +172 -162
  195. package/esm/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  196. package/esm/deps/jsr.io/@std/encoding/1.0.6/hex.d.ts.map +0 -1
  197. package/esm/deps/jsr.io/@std/msgpack/1.0.2/encode.d.ts.map +0 -1
  198. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  199. package/script/deps/jsr.io/@std/bytes/1.0.4/concat.js +0 -35
  200. package/script/deps/jsr.io/@std/encoding/1.0.6/_validate_binary_like.js +0 -29
  201. package/script/deps/jsr.io/@std/encoding/1.0.6/hex.d.ts.map +0 -1
  202. package/script/deps/jsr.io/@std/encoding/1.0.6/hex.js +0 -113
  203. package/script/deps/jsr.io/@std/msgpack/1.0.2/encode.d.ts.map +0 -1
  204. package/script/deps/jsr.io/@std/msgpack/1.0.2/encode.js +0 -240
  205. /package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts +0 -0
  206. /package/script/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024-2025 nktkas
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 nktkas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![JSR](https://jsr.io/badges/@nktkas/hyperliquid)](https://jsr.io/@nktkas/hyperliquid)
4
4
  [![JSR Score](https://jsr.io/badges/@nktkas/hyperliquid/score)](https://jsr.io/@nktkas/hyperliquid)
5
+ [![bundlephobia](https://badgen.net/bundlephobia/minzip/@nktkas/hyperliquid)](https://bundlephobia.com/package/@nktkas/hyperliquid)
5
6
 
6
7
  Unofficial [Hyperliquid API](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api) SDK for all major JS
7
8
  runtimes, written in TypeScript and provided with tests.
@@ -22,16 +23,16 @@ runtimes, written in TypeScript and provided with tests.
22
23
 
23
24
  ```bash
24
25
  # npm
25
- npx jsr add @nktkas/hyperliquid
26
+ npm i @nktkas/hyperliquid
26
27
 
27
28
  # yarn
28
- yarn dlx jsr add @nktkas/hyperliquid
29
+ yarn add @nktkas/hyperliquid
29
30
 
30
31
  # pnpm
31
- pnpm dlx jsr add @nktkas/hyperliquid
32
+ pnpm add @nktkas/hyperliquid
32
33
 
33
34
  # bun
34
- bunx jsr add @nktkas/hyperliquid
35
+ bun i @nktkas/hyperliquid
35
36
 
36
37
  # deno
37
38
  deno add jsr:@nktkas/hyperliquid
@@ -80,7 +81,6 @@ const client = new hl.PublicClient({ transport });
80
81
  ```typescript
81
82
  import * as hl from "@nktkas/hyperliquid";
82
83
  import { createWalletClient, custom } from "viem";
83
- import { arbitrum } from "viem/chains";
84
84
  import { privateKeyToAccount } from "viem/accounts";
85
85
  import { ethers } from "ethers";
86
86
 
@@ -96,14 +96,19 @@ const ethersClient = new hl.WalletClient({ wallet: ethersWallet, transport });
96
96
 
97
97
  // 3. Using external wallet (e.g. MetaMask) via Viem
98
98
  const [account] = await window.ethereum.request({ method: "eth_requestAccounts" });
99
- const externalWallet = createWalletClient({
100
- account,
101
- chain: arbitrum,
102
- transport: custom(window.ethereum),
103
- });
99
+ const externalWallet = createWalletClient({ account, transport: custom(window.ethereum) });
104
100
  const metamaskClient = new hl.WalletClient({ wallet: externalWallet, transport });
105
101
  ```
106
102
 
103
+ #### Create EventClient
104
+
105
+ ```typescript
106
+ import * as hl from "@nktkas/hyperliquid";
107
+
108
+ const transport = new hl.WebSocketTransport();
109
+ const client = new hl.EventClient({ transport });
110
+ ```
111
+
107
112
  ## API Reference
108
113
 
109
114
  ### Clients
@@ -135,6 +140,7 @@ class PublicClient<T extends IRESTTransport> {
135
140
  l2Book(args: L2BookParameters): Promise<L2Book>;
136
141
  meta(): Promise<Meta>;
137
142
  metaAndAssetCtxs(): Promise<MetaAndAssetCtxs>;
143
+ perpsAtOpenInterestCap(): Promise<string[]>;
138
144
  predictedFundings(): Promise<PredictedFunding[]>;
139
145
  spotDeployState(args: SpotDeployStateParameters): Promise<SpotDeployState>;
140
146
  spotMeta(): Promise<SpotMeta>;
@@ -145,6 +151,7 @@ class PublicClient<T extends IRESTTransport> {
145
151
  clearinghouseState(args: ClearinghouseStateParameters): Promise<ClearinghouseState>;
146
152
  extraAgents(args: ExtraAgentsParameters): Promise<ExtraAgent[]>;
147
153
  maxBuilderFee(args: MaxBuilderFeeParameters): Promise<number>;
154
+ portfolio(args: PortfolioParameters): Promise<PortfolioPeriods>;
148
155
  referral(args: ReferralParameters): Promise<Referral>;
149
156
  spotClearinghouseState(args: SpotClearinghouseStateParameters): Promise<SpotClearinghouseState>;
150
157
  subAccounts(args: SubAccountsParameters): Promise<SubAccount[]>;
@@ -152,6 +159,7 @@ class PublicClient<T extends IRESTTransport> {
152
159
  userFunding(args: UserFundingParameters): Promise<UserFunding[]>;
153
160
  userNonFundingLedgerUpdates(args: UserNonFundingLedgerUpdatesParameters): Promise<UserNonFundingLedgerUpdates[]>;
154
161
  userRateLimit(args: UserRateLimitParameters): Promise<UserRateLimit>;
162
+ userRole(args: UserRoleParameters): Promise<UserRole>;
155
163
 
156
164
  // Order
157
165
  frontendOpenOrders(args: FrontendOpenOrdersParameters): Promise<FrontendOpenOrder[]>;
@@ -163,14 +171,22 @@ class PublicClient<T extends IRESTTransport> {
163
171
  userFillsByTime(args: UserFillsByTimeParameters): Promise<UserFill[]>;
164
172
  userTwapSliceFills(args: UserTwapSliceFillsParameters): Promise<UserTwapSliceFill[]>;
165
173
 
174
+ // Staking
175
+ delegations(args: DelegationsParameters): Promise<Delegation[]>;
176
+ delegatorHistory(args: DelegatorHistoryParameters): Promise<DelegatorUpdate[]>;
177
+ delegatorRewards(args: DelegatorRewardsParameters): Promise<DelegatorReward[]>;
178
+ delegatorSummary(args: DelegatorSummaryParameters): Promise<DelegatorSummary>;
179
+ validatorSummaries(): Promise<ValidatorSummary[]>;
180
+
166
181
  // Vault
167
182
  userVaultEquities(args: UserVaultEquitiesParameters): Promise<UserVaultEquity[]>;
168
183
  vaultDetails(args: VaultDetailsParameters): Promise<VaultDetails | null>;
169
184
  vaultSummaries(): Promise<VaultSummary[]>;
170
185
 
171
- // Blockchain
186
+ // Explorer
172
187
  blockDetails(args: BlockDetailsParameters): Promise<BlockDetailsResponse>;
173
188
  txDetails(args: TxDetailsParameters): Promise<TxDetailsResponse>;
189
+ userDetails(args: UserDetailsParameters): Promise<UserDetailsResponse>;
174
190
  }
175
191
  ```
176
192
 
@@ -201,7 +217,7 @@ class WalletClient<
201
217
  > {
202
218
  constructor(args: WalletClientParameters<T, W>);
203
219
 
204
- // Order Management
220
+ // Order
205
221
  batchModify(args: BatchModifyParameters): Promise<OrderResponseSuccess>;
206
222
  cancel(args: CancelParameters): Promise<CancelResponseSuccess>;
207
223
  cancelByCloid(args: CancelByCloidParameters): Promise<CancelResponseSuccess>;
@@ -213,7 +229,7 @@ class WalletClient<
213
229
  updateIsolatedMargin(args: UpdateIsolatedMarginParameters): Promise<SuccessResponse>;
214
230
  updateLeverage(args: UpdateLeverageParameters): Promise<SuccessResponse>;
215
231
 
216
- // Account Management
232
+ // Account
217
233
  approveAgent(args: ApproveAgentParameters): Promise<SuccessResponse>;
218
234
  approveBuilderFee(args: ApproveBuilderFeeParameters): Promise<SuccessResponse>;
219
235
  createSubAccount(args: CreateSubAccountParameters): Promise<CreateSubAccountResponse>;
@@ -226,6 +242,11 @@ class WalletClient<
226
242
  usdSend(args: UsdSendParameters): Promise<SuccessResponse>;
227
243
  vaultTransfer(args: VaultTransferParameters): Promise<SuccessResponse>;
228
244
  withdraw3(args: Withdraw3Parameters): Promise<SuccessResponse>;
245
+
246
+ // Staking
247
+ cDeposit(args: CDepositParameters): Promise<SuccessResponse>;
248
+ cWithdraw(args: CWithdrawParameters): Promise<SuccessResponse>;
249
+ tokenDelegate(args: TokenDelegateParameters): Promise<SuccessResponse>;
229
250
  }
230
251
  ```
231
252
 
@@ -246,7 +267,7 @@ interface EventClientParameters<T extends ISubscriptionTransport> {
246
267
  class EventClient<T extends ISubscriptionTransport> {
247
268
  constructor(args: EventClientParameters<T>);
248
269
 
249
- // Market Data
270
+ // Market
250
271
  activeAssetCtx(args: EventActiveAssetCtxParameters, listener: (data: WsActiveAssetCtx | WsActiveSpotAssetCtx) => void): Promise<Subscription>;
251
272
  activeAssetData(args: EventActiveAssetDataParameters, listener: (data: WsActiveAssetData) => void): Promise<Subscription>;
252
273
  allMids(listener: (data: WsAllMids) => void): Promise<Subscription>;
@@ -254,18 +275,22 @@ class EventClient<T extends ISubscriptionTransport> {
254
275
  l2Book(args: EventL2BookParameters, listener: (data: Book) => void): Promise<Subscription>;
255
276
  trades(args: EventTradesParameters, listener: (data: WsTrade[]) => void): Promise<Subscription>;
256
277
 
257
- // Account/User Data
278
+ // Account
258
279
  notification(args: EventNotificationParameters, listener: (data: WsNotification) => void): Promise<Subscription>;
259
280
  userEvents(args: EventUserEventsParameters, listener: (data: WsUserEvent) => void): Promise<Subscription>;
260
281
  userFundings(args: EventUserFundingsParameters, listener: (data: WsUserFundings) => void): Promise<Subscription>;
261
282
  userNonFundingLedgerUpdates(args: EventUserNonFundingLedgerUpdatesParameters, listener: (data: WsUserNonFundingLedgerUpdates) => void): Promise<Subscription>;
262
283
  webData2(args: EventWebData2Parameters, listener: (data: WsWebData2) => void): Promise<Subscription>;
263
284
 
264
- // Order Management
265
- orderUpdates(args: EventOrderUpdatesParameters, listener: (data: OrderStatus) => void): Promise<Subscription>;
285
+ // Order
286
+ orderUpdates(args: EventOrderUpdatesParameters, listener: (data: OrderStatus<Order>[]) => void): Promise<Subscription>;
266
287
  userFills(args: EventUserFillsParameters, listener: (data: WsUserFills) => void): Promise<Subscription>;
267
288
  userTwapHistory(args: EventUserTwapHistory, listener: (data: WsUserTwapHistory) => void): Promise<Subscription>;
268
289
  userTwapSliceFills(args: EventUserTwapSliceFills, listener: (data: WsUserTwapSliceFills) => void): Promise<Subscription>;
290
+
291
+ // Explorer
292
+ explorerBlock(listener: (data: WsBlockDetails[]) => void): Promise<Subscription>;
293
+ explorerTx(listener: (data: TxDetails[]) => void): Promise<Subscription>;
269
294
  }
270
295
  ```
271
296
  <!-- deno-fmt-ignore-end -->
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Proxy type of {@code Uint8Array<ArrayBuffer} or {@code Uint8Array} in TypeScript 5.7 or below respectively.
3
+ *
4
+ * This type is internal utility type and should not be used directly.
5
+ *
6
+ * @internal @private
7
+ */
8
+ export type Uint8Array_ = ReturnType<Uint8Array["slice"]>;
9
+ //# sourceMappingURL=_types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.5/_types.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ export {};
@@ -1,3 +1,5 @@
1
+ import type { Uint8Array_ } from "./_types.js";
2
+ export type { Uint8Array_ };
1
3
  /**
2
4
  * Concatenate an array of byte slices into a single slice.
3
5
  *
@@ -15,5 +17,5 @@
15
17
  * assertEquals(concat([a, b]), new Uint8Array([0, 1, 2, 3, 4, 5]));
16
18
  * ```
17
19
  */
18
- export declare function concat(buffers: Uint8Array[]): Uint8Array;
20
+ export declare function concat(buffers: Uint8Array[]): Uint8Array_;
19
21
  //# sourceMappingURL=concat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/bytes/1.0.5/concat.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,WAAW,CAazD"}
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Concatenate an array of byte slices into a single slice.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Proxy type of {@code Uint8Array<ArrayBuffer} or {@code Uint8Array} in TypeScript 5.7 or below respectively.
3
+ *
4
+ * This type is internal utility type and should not be used directly.
5
+ *
6
+ * @internal @private
7
+ */
8
+ export type Uint8Array_ = ReturnType<Uint8Array["slice"]>;
9
+ //# sourceMappingURL=_types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.7/_types.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"_validate_binary_like.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.6/_validate_binary_like.ts"],"names":[],"mappings":"AAeA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAa9D"}
1
+ {"version":3,"file":"_validate_binary_like.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.7/_validate_binary_like.ts"],"names":[],"mappings":"AAeA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAa9D"}
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  const encoder = new TextEncoder();
3
3
  function getTypeName(value) {
4
4
  const type = typeof value;
@@ -1,3 +1,5 @@
1
+ import type { Uint8Array_ } from "./_types.js";
2
+ export type { Uint8Array_ };
1
3
  /**
2
4
  * Converts data into a hex-encoded string.
3
5
  *
@@ -33,5 +35,5 @@ export declare function encodeHex(src: string | Uint8Array | ArrayBuffer): strin
33
35
  * );
34
36
  * ```
35
37
  */
36
- export declare function decodeHex(src: string): Uint8Array;
38
+ export declare function decodeHex(src: string): Uint8Array_;
37
39
  //# sourceMappingURL=hex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/1.0.7/hex.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AA4B5B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAUxE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAiBlD"}
@@ -1,6 +1,6 @@
1
1
  // Copyright 2009 The Go Authors. All rights reserved.
2
2
  // https://github.com/golang/go/blob/master/LICENSE
3
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
+ // Copyright 2018-2025 the Deno authors. MIT license.
4
4
  // This module is browser compatible.
5
5
  /**
6
6
  * Port of the Go
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Proxy type of {@code Uint8Array<ArrayBuffer} or {@code Uint8Array} in TypeScript 5.7 or below respectively.
3
+ *
4
+ * This type is internal utility type and should not be used directly.
5
+ *
6
+ * @internal @private
7
+ */
8
+ export type Uint8Array_ = ReturnType<Uint8Array["slice"]>;
9
+ //# sourceMappingURL=_types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/msgpack/1.0.3/_types.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ export {};
@@ -1,3 +1,5 @@
1
+ import type { Uint8Array_ } from "./_types.js";
2
+ export type { Uint8Array_ };
1
3
  /**
2
4
  * Value types that can be encoded to MessagePack.
3
5
  */
@@ -33,5 +35,5 @@ export interface ValueMap {
33
35
  * @param object Value to encode to MessagePack binary format.
34
36
  * @returns Encoded MessagePack binary data.
35
37
  */
36
- export declare function encode(object: ValueType): Uint8Array;
38
+ export declare function encode(object: ValueType): Uint8Array_;
37
39
  //# sourceMappingURL=encode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/msgpack/1.0.3/encode.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,UAAU,GACV,SAAS,SAAS,EAAE,GACpB,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,sBAAsB;IACtB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACrC;AAeD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAIrD"}
@@ -1,6 +1,6 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
- import { concat } from "../../bytes/1.0.4/concat.js";
3
+ import { concat } from "../../bytes/1.0.5/concat.js";
4
4
  const FOUR_BITS = 16;
5
5
  const FIVE_BITS = 32;
6
6
  const SEVEN_BITS = 128;
package/esm/mod.d.ts CHANGED
@@ -6,19 +6,20 @@ export * from "./src/transports/http/http_transport.js";
6
6
  export * from "./src/transports/websocket/websocket_transport.js";
7
7
  export type { MessageBufferStrategy, ReconnectingWebSocketOptions, } from "./src/transports/websocket/reconnecting_websocket.js";
8
8
  export { WebSocketRequestError } from "./src/transports/websocket/websocket_request_dispatcher.js";
9
- export type * from "./src/types/common";
10
- export type * from "./src/types/exchange/common";
11
- export type * from "./src/types/exchange/requests";
12
- export type * from "./src/types/exchange/responses";
13
- export type * from "./src/types/explorer/common";
14
- export type * from "./src/types/explorer/requests";
15
- export type * from "./src/types/explorer/responses";
16
- export type * from "./src/types/info/accounts";
17
- export type * from "./src/types/info/assets";
18
- export type * from "./src/types/info/orders";
19
- export type * from "./src/types/info/requests";
20
- export type * from "./src/types/info/vaults";
21
- export type * from "./src/types/subscriptions/common";
22
- export type * from "./src/types/subscriptions/requests";
9
+ export type * from "./src/types/common.js";
10
+ export type * from "./src/types/exchange/common.js";
11
+ export type * from "./src/types/exchange/requests.js";
12
+ export type * from "./src/types/exchange/responses.js";
13
+ export type * from "./src/types/explorer/common.js";
14
+ export type * from "./src/types/explorer/requests.js";
15
+ export type * from "./src/types/explorer/responses.js";
16
+ export type * from "./src/types/info/accounts.js";
17
+ export type * from "./src/types/info/assets.js";
18
+ export type * from "./src/types/info/delegations.js";
19
+ export type * from "./src/types/info/orders.js";
20
+ export type * from "./src/types/info/requests.js";
21
+ export type * from "./src/types/info/vaults.js";
22
+ export type * from "./src/types/subscriptions/common.js";
23
+ export type * from "./src/types/subscriptions/requests.js";
23
24
  export type { AbstractEthersSigner, AbstractEthersV5Signer, AbstractViemWalletClient } from "./src/utils/signing.js";
24
25
  //# sourceMappingURL=mod.d.ts.map
package/esm/mod.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yCAAyC,CAAC;AAExD,cAAc,mDAAmD,CAAC;AAClE,YAAY,EACR,qBAAqB,EACrB,4BAA4B,GAC/B,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAGnG,mBAAmB,oBAAoB,CAAC;AAExC,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,+BAA+B,CAAC;AACnD,mBAAmB,gCAAgC,CAAC;AAEpD,mBAAmB,6BAA6B,CAAC;AACjD,mBAAmB,+BAA+B,CAAC;AACnD,mBAAmB,gCAAgC,CAAC;AAEpD,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,2BAA2B,CAAC;AAC/C,mBAAmB,yBAAyB,CAAC;AAE7C,mBAAmB,kCAAkC,CAAC;AACtD,mBAAmB,oCAAoC,CAAC;AAGxD,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,yCAAyC,CAAC;AAExD,cAAc,mDAAmD,CAAC;AAClE,YAAY,EACR,qBAAqB,EACrB,4BAA4B,GAC/B,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAGnG,mBAAmB,uBAAuB,CAAC;AAE3C,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,kCAAkC,CAAC;AACtD,mBAAmB,mCAAmC,CAAC;AAEvD,mBAAmB,gCAAgC,CAAC;AACpD,mBAAmB,kCAAkC,CAAC;AACtD,mBAAmB,mCAAmC,CAAC;AAEvD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,iCAAiC,CAAC;AACrD,mBAAmB,4BAA4B,CAAC;AAChD,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,4BAA4B,CAAC;AAEhD,mBAAmB,qCAAqC,CAAC;AACzD,mBAAmB,uCAAuC,CAAC;AAG3D,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import type { ISubscriptionTransport, Subscription } from "../transports/base.js";
2
- import type { WsActiveAssetCtxRequest, WsActiveAssetDataRequest, WsCandleRequest, WsL2BookRequest, WsNotificationRequest, WsOrderUpdatesRequest, WsTradesRequest, WsUserEventsRequest, WsUserFillsRequest, WsUserFundingsRequest, WsUserNonFundingLedgerUpdatesRequest, WsUserTwapHistoryRequest, WsUserTwapSliceFillsRequest, WsWebData2Request } from "../types/subscriptions/requests";
3
- import type { WsActiveAssetCtx, WsActiveAssetData, WsActiveSpotAssetCtx, WsAllMids, WsNotification, WsTrade, WsUserEvent, WsUserFills, WsUserFundings, WsUserNonFundingLedgerUpdates, WsUserTwapHistory, WsUserTwapSliceFills, WsWebData2 } from "../types/subscriptions/common";
4
- import type { Candle } from "../types/info/assets";
5
- import type { Book, Order, OrderStatus } from "../types/info/orders";
2
+ import type { WsActiveAssetCtxRequest, WsActiveAssetDataRequest, WsCandleRequest, WsL2BookRequest, WsNotificationRequest, WsOrderUpdatesRequest, WsTradesRequest, WsUserEventsRequest, WsUserFillsRequest, WsUserFundingsRequest, WsUserNonFundingLedgerUpdatesRequest, WsUserTwapHistoryRequest, WsUserTwapSliceFillsRequest, WsWebData2Request } from "../types/subscriptions/requests.js";
3
+ import type { WsActiveAssetCtx, WsActiveAssetData, WsActiveSpotAssetCtx, WsAllMids, WsBlockDetails, WsNotification, WsTrade, WsUserEvent, WsUserFills, WsUserFundings, WsUserNonFundingLedgerUpdates, WsUserTwapHistory, WsUserTwapSliceFills, WsWebData2 } from "../types/subscriptions/common.js";
4
+ import type { Candle } from "../types/info/assets.js";
5
+ import type { Book, Order, OrderStatus } from "../types/info/orders.js";
6
+ import type { TxDetails } from "../types/explorer/common.js";
6
7
  /** Parameters for the {@linkcode EventClient} constructor. */
7
8
  export interface EventClientParameters<T extends ISubscriptionTransport = ISubscriptionTransport> {
8
9
  /** The transport used to connect to the Hyperliquid API. */
@@ -63,7 +64,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
63
64
  * @param signal - An optional abort signal for canceling the subscription request.
64
65
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
65
66
  *
66
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
67
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
67
68
  * @example
68
69
  * ```ts
69
70
  * import * as hl from "@nktkas/hyperliquid";
@@ -84,7 +85,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
84
85
  * @param signal - An optional abort signal for canceling the subscription request.
85
86
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
86
87
  *
87
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
88
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
88
89
  * @example
89
90
  * ```ts
90
91
  * import * as hl from "@nktkas/hyperliquid";
@@ -104,7 +105,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
104
105
  * @param signal - An optional abort signal for canceling the subscription request.
105
106
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
106
107
  *
107
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
108
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
108
109
  * @example
109
110
  * ```ts
110
111
  * import * as hl from "@nktkas/hyperliquid";
@@ -125,7 +126,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
125
126
  * @param signal - An optional abort signal for canceling the subscription request.
126
127
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
127
128
  *
128
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
129
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
129
130
  * @example
130
131
  * ```ts
131
132
  * import * as hl from "@nktkas/hyperliquid";
@@ -139,6 +140,46 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
139
140
  * ```
140
141
  */
141
142
  candle(args: EventCandleParameters, listener: (data: Candle) => void, signal?: AbortSignal): Promise<Subscription>;
143
+ /**
144
+ * Subscribe to explorer block updates.
145
+ * @param listener - The callback function to be called when the event is received.
146
+ * @param signal - An optional abort signal for canceling the subscription request.
147
+ * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
148
+ *
149
+ * @see null - no documentation
150
+ * @example
151
+ * ```ts
152
+ * import * as hl from "@nktkas/hyperliquid";
153
+ *
154
+ * const transport = new hl.WebSocketTransport();
155
+ * const client = new hl.EventClient({ transport });
156
+ *
157
+ * const sub = await client.explorerBlock((data) => {
158
+ * console.log(data);
159
+ * });
160
+ * ```
161
+ */
162
+ explorerBlock(listener: (data: WsBlockDetails[]) => void, signal?: AbortSignal): Promise<Subscription>;
163
+ /**
164
+ * Subscribe to explorer transaction updates.
165
+ * @param listener - The callback function to be called when the event is received.
166
+ * @param signal - An optional abort signal for canceling the subscription request.
167
+ * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
168
+ *
169
+ * @see null - no documentation
170
+ * @example
171
+ * ```ts
172
+ * import * as hl from "@nktkas/hyperliquid";
173
+ *
174
+ * const transport = new hl.WebSocketTransport();
175
+ * const client = new hl.EventClient({ transport });
176
+ *
177
+ * const sub = await client.explorerTxs((data) => {
178
+ * console.log(data);
179
+ * });
180
+ * ```
181
+ */
182
+ explorerTxs(listener: (data: TxDetails[]) => void, signal?: AbortSignal): Promise<Subscription>;
142
183
  /**
143
184
  * Subscribe to L2 order book updates for a specific asset.
144
185
  * @param args - The parameters for the subscription.
@@ -146,7 +187,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
146
187
  * @param signal - An optional abort signal for canceling the subscription request.
147
188
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
148
189
  *
149
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
190
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
150
191
  * @example
151
192
  * ```ts
152
193
  * import * as hl from "@nktkas/hyperliquid";
@@ -161,13 +202,13 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
161
202
  */
162
203
  l2Book(args: EventL2BookParameters, listener: (data: Book) => void, signal?: AbortSignal): Promise<Subscription>;
163
204
  /**
164
- * Subscribe to user notification.
205
+ * Subscribe to notification updates for a specific user.
165
206
  * @param args - The parameters for the subscription.
166
207
  * @param listener - The callback function to be called when the event is received.
167
208
  * @param signal - An optional abort signal for canceling the subscription request.
168
209
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
169
210
  *
170
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
211
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
171
212
  * @example
172
213
  * ```ts
173
214
  * import * as hl from "@nktkas/hyperliquid";
@@ -188,7 +229,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
188
229
  * @param signal - An optional abort signal for canceling the subscription request.
189
230
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
190
231
  *
191
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
232
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
192
233
  * @example
193
234
  * ```ts
194
235
  * import * as hl from "@nktkas/hyperliquid";
@@ -209,7 +250,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
209
250
  * @param signal - An optional abort signal for canceling the subscription request.
210
251
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
211
252
  *
212
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
253
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
213
254
  * @example
214
255
  * ```ts
215
256
  * import * as hl from "@nktkas/hyperliquid";
@@ -224,13 +265,15 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
224
265
  */
225
266
  trades(args: EventTradesParameters, listener: (data: WsTrade[]) => void, signal?: AbortSignal): Promise<Subscription>;
226
267
  /**
227
- * Subscribe to all events for a specific user.
268
+ * Subscribe to non-order events for a specific user.
228
269
  * @param args - The parameters for the subscription.
229
270
  * @param listener - The callback function to be called when the event is received.
230
271
  * @param signal - An optional abort signal for canceling the subscription request.
231
272
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
232
273
  *
233
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
274
+ * @note Different subscriptions cannot be distinguished from each other.
275
+ *
276
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
234
277
  * @example
235
278
  * ```ts
236
279
  * import * as hl from "@nktkas/hyperliquid";
@@ -251,7 +294,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
251
294
  * @param signal - An optional abort signal for canceling the subscription request.
252
295
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
253
296
  *
254
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
297
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
255
298
  * @example
256
299
  * ```ts
257
300
  * import * as hl from "@nktkas/hyperliquid";
@@ -272,7 +315,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
272
315
  * @param signal - An optional abort signal for canceling the subscription request.
273
316
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
274
317
  *
275
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
318
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
276
319
  * @example
277
320
  * ```ts
278
321
  * import * as hl from "@nktkas/hyperliquid";
@@ -293,7 +336,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
293
336
  * @param signal - An optional abort signal for canceling the subscription request.
294
337
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
295
338
  *
296
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
339
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
297
340
  * @example
298
341
  * ```ts
299
342
  * import * as hl from "@nktkas/hyperliquid";
@@ -314,7 +357,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
314
357
  * @param signal - An optional abort signal for canceling the subscription request.
315
358
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
316
359
  *
317
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
360
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
318
361
  * @example
319
362
  * ```ts
320
363
  * import * as hl from "@nktkas/hyperliquid";
@@ -335,7 +378,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
335
378
  * @param signal - An optional abort signal for canceling the subscription request.
336
379
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
337
380
  *
338
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
381
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
339
382
  * @example
340
383
  * ```ts
341
384
  * import * as hl from "@nktkas/hyperliquid";
@@ -356,7 +399,7 @@ export declare class EventClient<T extends ISubscriptionTransport = ISubscriptio
356
399
  * @param signal - An optional abort signal for canceling the subscription request.
357
400
  * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
358
401
  *
359
- * @see {@link https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions | Hyperliquid GitBook}
402
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
360
403
  * @example
361
404
  * ```ts
362
405
  * import * as hl from "@nktkas/hyperliquid";