@nktkas/hyperliquid 0.23.1 → 0.24.0

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 (165) hide show
  1. package/CONTRIBUTING.md +3 -2
  2. package/README.md +154 -170
  3. package/esm/mod.d.ts +1 -1
  4. package/esm/mod.d.ts.map +1 -1
  5. package/esm/src/base.d.ts +0 -5
  6. package/esm/src/base.d.ts.map +1 -1
  7. package/esm/src/clients/exchange.d.ts +430 -393
  8. package/esm/src/clients/exchange.d.ts.map +1 -1
  9. package/esm/src/clients/exchange.js +467 -927
  10. package/esm/src/clients/info.d.ts +228 -203
  11. package/esm/src/clients/info.d.ts.map +1 -1
  12. package/esm/src/clients/info.js +236 -368
  13. package/esm/src/clients/multiSign.d.ts +14 -1184
  14. package/esm/src/clients/multiSign.d.ts.map +1 -1
  15. package/esm/src/clients/multiSign.js +37 -2004
  16. package/esm/src/clients/subscription.d.ts +95 -93
  17. package/esm/src/clients/subscription.d.ts.map +1 -1
  18. package/esm/src/clients/subscription.js +101 -146
  19. package/esm/src/signing/_signTypedData/ethers.d.ts +16 -4
  20. package/esm/src/signing/_signTypedData/ethers.d.ts.map +1 -1
  21. package/esm/src/signing/_signTypedData/ethers.js +1 -1
  22. package/esm/src/signing/_signTypedData/mod.d.ts +12 -12
  23. package/esm/src/signing/_signTypedData/mod.d.ts.map +1 -1
  24. package/esm/src/signing/_signTypedData/mod.js +52 -24
  25. package/esm/src/signing/_signTypedData/private_key.d.ts +6 -5
  26. package/esm/src/signing/_signTypedData/private_key.d.ts.map +1 -1
  27. package/esm/src/signing/_signTypedData/private_key.js +40 -19
  28. package/esm/src/signing/_signTypedData/viem.d.ts +27 -6
  29. package/esm/src/signing/_signTypedData/viem.d.ts.map +1 -1
  30. package/esm/src/signing/_signTypedData/viem.js +1 -1
  31. package/esm/src/signing/_sorter.d.ts +12 -21
  32. package/esm/src/signing/_sorter.d.ts.map +1 -1
  33. package/esm/src/signing/_sorter.js +30 -63
  34. package/esm/src/signing/mod.d.ts +177 -127
  35. package/esm/src/signing/mod.d.ts.map +1 -1
  36. package/esm/src/signing/mod.js +182 -130
  37. package/esm/src/transports/base.d.ts +2 -1
  38. package/esm/src/transports/base.d.ts.map +1 -1
  39. package/esm/src/transports/http/http_transport.d.ts +3 -2
  40. package/esm/src/transports/http/http_transport.d.ts.map +1 -1
  41. package/esm/src/transports/http/http_transport.js +4 -4
  42. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +14 -6
  43. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  44. package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -2
  45. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts +2 -1
  46. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  47. package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
  48. package/esm/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  49. package/esm/src/transports/websocket/_websocket_async_request.js +17 -21
  50. package/esm/src/transports/websocket/websocket_transport.d.ts +4 -4
  51. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  52. package/esm/src/transports/websocket/websocket_transport.js +6 -6
  53. package/esm/src/types/exchange/requests.d.ts +492 -306
  54. package/esm/src/types/exchange/requests.d.ts.map +1 -1
  55. package/esm/src/types/exchange/responses.d.ts +105 -25
  56. package/esm/src/types/exchange/responses.d.ts.map +1 -1
  57. package/esm/src/types/explorer/requests.d.ts +3 -3
  58. package/esm/src/types/explorer/requests.d.ts.map +1 -1
  59. package/esm/src/types/explorer/responses.d.ts +1 -1
  60. package/esm/src/types/explorer/responses.d.ts.map +1 -1
  61. package/esm/src/types/info/accounts.d.ts +403 -98
  62. package/esm/src/types/info/accounts.d.ts.map +1 -1
  63. package/esm/src/types/info/assets.d.ts +131 -35
  64. package/esm/src/types/info/assets.d.ts.map +1 -1
  65. package/esm/src/types/info/markets.d.ts +29 -8
  66. package/esm/src/types/info/markets.d.ts.map +1 -1
  67. package/esm/src/types/info/orders.d.ts +62 -17
  68. package/esm/src/types/info/orders.d.ts.map +1 -1
  69. package/esm/src/types/info/requests.d.ts +117 -51
  70. package/esm/src/types/info/requests.d.ts.map +1 -1
  71. package/esm/src/types/info/validators.d.ts +44 -14
  72. package/esm/src/types/info/validators.d.ts.map +1 -1
  73. package/esm/src/types/info/vaults.d.ts +25 -10
  74. package/esm/src/types/info/vaults.d.ts.map +1 -1
  75. package/esm/src/types/mod.d.ts +1 -1
  76. package/esm/src/types/mod.d.ts.map +1 -1
  77. package/esm/src/types/subscriptions/requests.d.ts +21 -66
  78. package/esm/src/types/subscriptions/requests.d.ts.map +1 -1
  79. package/esm/src/types/subscriptions/responses.d.ts +46 -55
  80. package/esm/src/types/subscriptions/responses.d.ts.map +1 -1
  81. package/package.json +2 -3
  82. package/script/mod.d.ts +1 -1
  83. package/script/mod.d.ts.map +1 -1
  84. package/script/src/base.d.ts +0 -5
  85. package/script/src/base.d.ts.map +1 -1
  86. package/script/src/clients/exchange.d.ts +430 -393
  87. package/script/src/clients/exchange.d.ts.map +1 -1
  88. package/script/src/clients/exchange.js +466 -926
  89. package/script/src/clients/info.d.ts +228 -203
  90. package/script/src/clients/info.d.ts.map +1 -1
  91. package/script/src/clients/info.js +236 -368
  92. package/script/src/clients/multiSign.d.ts +14 -1184
  93. package/script/src/clients/multiSign.d.ts.map +1 -1
  94. package/script/src/clients/multiSign.js +38 -2005
  95. package/script/src/clients/subscription.d.ts +95 -93
  96. package/script/src/clients/subscription.d.ts.map +1 -1
  97. package/script/src/clients/subscription.js +101 -146
  98. package/script/src/signing/_signTypedData/ethers.d.ts +16 -4
  99. package/script/src/signing/_signTypedData/ethers.d.ts.map +1 -1
  100. package/script/src/signing/_signTypedData/ethers.js +2 -2
  101. package/script/src/signing/_signTypedData/mod.d.ts +12 -12
  102. package/script/src/signing/_signTypedData/mod.d.ts.map +1 -1
  103. package/script/src/signing/_signTypedData/mod.js +51 -26
  104. package/script/src/signing/_signTypedData/private_key.d.ts +6 -5
  105. package/script/src/signing/_signTypedData/private_key.d.ts.map +1 -1
  106. package/script/src/signing/_signTypedData/private_key.js +40 -18
  107. package/script/src/signing/_signTypedData/viem.d.ts +27 -6
  108. package/script/src/signing/_signTypedData/viem.d.ts.map +1 -1
  109. package/script/src/signing/_signTypedData/viem.js +2 -2
  110. package/script/src/signing/_sorter.d.ts +12 -21
  111. package/script/src/signing/_sorter.d.ts.map +1 -1
  112. package/script/src/signing/_sorter.js +30 -63
  113. package/script/src/signing/mod.d.ts +177 -127
  114. package/script/src/signing/mod.d.ts.map +1 -1
  115. package/script/src/signing/mod.js +185 -148
  116. package/script/src/transports/base.d.ts +2 -1
  117. package/script/src/transports/base.d.ts.map +1 -1
  118. package/script/src/transports/http/http_transport.d.ts +3 -2
  119. package/script/src/transports/http/http_transport.d.ts.map +1 -1
  120. package/script/src/transports/http/http_transport.js +4 -4
  121. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +14 -6
  122. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  123. package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -2
  124. package/script/src/transports/websocket/_reconnecting_websocket.d.ts +2 -1
  125. package/script/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  126. package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
  127. package/script/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  128. package/script/src/transports/websocket/_websocket_async_request.js +17 -21
  129. package/script/src/transports/websocket/websocket_transport.d.ts +4 -4
  130. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  131. package/script/src/transports/websocket/websocket_transport.js +6 -6
  132. package/script/src/types/exchange/requests.d.ts +492 -306
  133. package/script/src/types/exchange/requests.d.ts.map +1 -1
  134. package/script/src/types/exchange/responses.d.ts +105 -25
  135. package/script/src/types/exchange/responses.d.ts.map +1 -1
  136. package/script/src/types/explorer/requests.d.ts +3 -3
  137. package/script/src/types/explorer/requests.d.ts.map +1 -1
  138. package/script/src/types/explorer/responses.d.ts +1 -1
  139. package/script/src/types/explorer/responses.d.ts.map +1 -1
  140. package/script/src/types/info/accounts.d.ts +403 -98
  141. package/script/src/types/info/accounts.d.ts.map +1 -1
  142. package/script/src/types/info/assets.d.ts +131 -35
  143. package/script/src/types/info/assets.d.ts.map +1 -1
  144. package/script/src/types/info/markets.d.ts +29 -8
  145. package/script/src/types/info/markets.d.ts.map +1 -1
  146. package/script/src/types/info/orders.d.ts +62 -17
  147. package/script/src/types/info/orders.d.ts.map +1 -1
  148. package/script/src/types/info/requests.d.ts +117 -51
  149. package/script/src/types/info/requests.d.ts.map +1 -1
  150. package/script/src/types/info/validators.d.ts +44 -14
  151. package/script/src/types/info/validators.d.ts.map +1 -1
  152. package/script/src/types/info/vaults.d.ts +25 -10
  153. package/script/src/types/info/vaults.d.ts.map +1 -1
  154. package/script/src/types/mod.d.ts +1 -1
  155. package/script/src/types/mod.d.ts.map +1 -1
  156. package/script/src/types/subscriptions/requests.d.ts +21 -66
  157. package/script/src/types/subscriptions/requests.d.ts.map +1 -1
  158. package/script/src/types/subscriptions/responses.d.ts +46 -55
  159. package/script/src/types/subscriptions/responses.d.ts.map +1 -1
  160. package/esm/src/signing/_signTypedData/window.d.ts +0 -29
  161. package/esm/src/signing/_signTypedData/window.d.ts.map +0 -1
  162. package/esm/src/signing/_signTypedData/window.js +0 -30
  163. package/script/src/signing/_signTypedData/window.d.ts +0 -29
  164. package/script/src/signing/_signTypedData/window.d.ts.map +0 -1
  165. package/script/src/signing/_signTypedData/window.js +0 -34
@@ -24,9 +24,9 @@ class SubscriptionClient {
24
24
  }
25
25
  /**
26
26
  * Subscribe to context updates for a specific perpetual asset.
27
- * @param args - The parameters for the subscription.
28
- * @param listener - The callback function to be called when the event is received.
29
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
27
+ * @param params - Subscription-specific parameters.
28
+ * @param listener - A callback function to be called when the event is received.
29
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
30
30
  *
31
31
  * @throws {TransportError} When the transport layer throws an error.
32
32
  *
@@ -43,23 +43,20 @@ class SubscriptionClient {
43
43
  * });
44
44
  * ```
45
45
  */
46
- activeAssetCtx(args, listener) {
47
- const channel = args.coin.startsWith("@") ? "activeSpotAssetCtx" : "activeAssetCtx";
48
- const payload = {
49
- type: "activeAssetCtx",
50
- coin: args.coin,
51
- };
46
+ activeAssetCtx(params, listener) {
47
+ const channel = params.coin.startsWith("@") ? "activeSpotAssetCtx" : "activeAssetCtx";
48
+ const payload = { type: "activeAssetCtx", ...params };
52
49
  return this.transport.subscribe(channel, payload, (e) => {
53
- if (e.detail.coin === args.coin) {
50
+ if (e.detail.coin === params.coin) {
54
51
  listener(e.detail);
55
52
  }
56
53
  });
57
54
  }
58
55
  /**
59
56
  * Subscribe to trading data updates for a specific asset and user.
60
- * @param args - The parameters for the subscription.
61
- * @param listener - The callback function to be called when the event is received.
62
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
57
+ * @param params - Subscription-specific parameters.
58
+ * @param listener - A callback function to be called when the event is received.
59
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
63
60
  *
64
61
  * @throws {TransportError} When the transport layer throws an error.
65
62
  *
@@ -76,34 +73,27 @@ class SubscriptionClient {
76
73
  * });
77
74
  * ```
78
75
  */
79
- activeAssetData(args, listener) {
80
- const payload = {
81
- type: "activeAssetData",
82
- coin: args.coin,
83
- user: args.user,
84
- };
76
+ activeAssetData(params, listener) {
77
+ const payload = { type: "activeAssetData", ...params };
85
78
  return this.transport.subscribe(payload.type, payload, (e) => {
86
- if (e.detail.coin === args.coin && e.detail.user === args.user.toLowerCase()) {
79
+ if (e.detail.coin === params.coin && e.detail.user === params.user.toLowerCase()) {
87
80
  listener(e.detail);
88
81
  }
89
82
  });
90
83
  }
91
- allMids(args_or_listener, maybeListener) {
92
- const args = typeof args_or_listener === "function" ? {} : args_or_listener;
93
- const listener = typeof args_or_listener === "function" ? args_or_listener : maybeListener;
94
- const payload = {
95
- type: "allMids",
96
- dex: args.dex,
97
- };
84
+ allMids(params_or_listener, maybeListener) {
85
+ const params = typeof params_or_listener === "function" ? {} : params_or_listener;
86
+ const listener = typeof params_or_listener === "function" ? params_or_listener : maybeListener;
87
+ const payload = { type: "allMids", ...params };
98
88
  return this.transport.subscribe(payload.type, payload, (e) => {
99
89
  listener(e.detail);
100
90
  });
101
91
  }
102
92
  /**
103
93
  * Subscribe to best bid and offer updates for a specific asset.
104
- * @param args - The parameters for the subscription.
105
- * @param listener - The callback function to be called when the event is received.
106
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
94
+ * @param params - Subscription-specific parameters.
95
+ * @param listener - A callback function to be called when the event is received.
96
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
107
97
  *
108
98
  * @throws {TransportError} When the transport layer throws an error.
109
99
  *
@@ -120,22 +110,19 @@ class SubscriptionClient {
120
110
  * });
121
111
  * ```
122
112
  */
123
- bbo(args, listener) {
124
- const payload = {
125
- type: "bbo",
126
- coin: args.coin,
127
- };
113
+ bbo(params, listener) {
114
+ const payload = { type: "bbo", ...params };
128
115
  return this.transport.subscribe(payload.type, payload, (e) => {
129
- if (e.detail.coin === args.coin) {
116
+ if (e.detail.coin === params.coin) {
130
117
  listener(e.detail);
131
118
  }
132
119
  });
133
120
  }
134
121
  /**
135
122
  * Subscribe to candlestick data updates for a specific asset.
136
- * @param args - The parameters for the subscription.
137
- * @param listener - The callback function to be called when the event is received.
138
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
123
+ * @param params - Subscription-specific parameters.
124
+ * @param listener - A callback function to be called when the event is received.
125
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
139
126
  *
140
127
  * @throws {TransportError} When the transport layer throws an error.
141
128
  *
@@ -152,22 +139,18 @@ class SubscriptionClient {
152
139
  * });
153
140
  * ```
154
141
  */
155
- candle(args, listener) {
156
- const payload = {
157
- type: "candle",
158
- coin: args.coin,
159
- interval: args.interval,
160
- };
142
+ candle(params, listener) {
143
+ const payload = { type: "candle", ...params };
161
144
  return this.transport.subscribe(payload.type, payload, (e) => {
162
- if (e.detail.s === args.coin && e.detail.i === args.interval) {
145
+ if (e.detail.s === params.coin && e.detail.i === params.interval) {
163
146
  listener(e.detail);
164
147
  }
165
148
  });
166
149
  }
167
150
  /**
168
151
  * Subscribe to explorer block updates.
169
- * @param listener - The callback function to be called when the event is received.
170
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
152
+ * @param listener - A callback function to be called when the event is received.
153
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
171
154
  * @note Make sure the endpoint in the {@link transport} supports this method.
172
155
  *
173
156
  * @throws {TransportError} When the transport layer throws an error.
@@ -186,17 +169,15 @@ class SubscriptionClient {
186
169
  * ```
187
170
  */
188
171
  explorerBlock(listener) {
189
- const payload = {
190
- type: "explorerBlock",
191
- };
172
+ const payload = { type: "explorerBlock" };
192
173
  return this.transport.subscribe("_explorerBlock", payload, (e) => {
193
174
  listener(e.detail);
194
175
  });
195
176
  }
196
177
  /**
197
178
  * Subscribe to explorer transaction updates.
198
- * @param listener - The callback function to be called when the event is received.
199
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
179
+ * @param listener - A callback function to be called when the event is received.
180
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
200
181
  * @note Make sure the endpoint in the {@link transport} supports this method.
201
182
  *
202
183
  * @throws {TransportError} When the transport layer throws an error.
@@ -215,18 +196,16 @@ class SubscriptionClient {
215
196
  * ```
216
197
  */
217
198
  explorerTxs(listener) {
218
- const payload = {
219
- type: "explorerTxs",
220
- };
199
+ const payload = { type: "explorerTxs" };
221
200
  return this.transport.subscribe("_explorerTxs", payload, (e) => {
222
201
  listener(e.detail);
223
202
  });
224
203
  }
225
204
  /**
226
205
  * Subscribe to L2 order book updates for a specific asset.
227
- * @param args - The parameters for the subscription.
228
- * @param listener - The callback function to be called when the event is received.
229
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
206
+ * @param params - Subscription-specific parameters.
207
+ * @param listener - A callback function to be called when the event is received.
208
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
230
209
  *
231
210
  * @throws {TransportError} When the transport layer throws an error.
232
211
  *
@@ -243,24 +222,24 @@ class SubscriptionClient {
243
222
  * });
244
223
  * ```
245
224
  */
246
- l2Book(args, listener) {
225
+ l2Book(params, listener) {
247
226
  const payload = {
248
227
  type: "l2Book",
249
- coin: args.coin,
250
- nSigFigs: args.nSigFigs ?? null,
251
- mantissa: args.mantissa ?? null,
228
+ nSigFigs: params.nSigFigs ?? null,
229
+ mantissa: params.mantissa ?? null,
230
+ ...params,
252
231
  };
253
232
  return this.transport.subscribe(payload.type, payload, (e) => {
254
- if (e.detail.coin === args.coin) {
233
+ if (e.detail.coin === params.coin) {
255
234
  listener(e.detail);
256
235
  }
257
236
  });
258
237
  }
259
238
  /**
260
239
  * Subscribe to notification updates for a specific user.
261
- * @param args - The parameters for the subscription.
262
- * @param listener - The callback function to be called when the event is received.
263
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
240
+ * @param params - Subscription-specific parameters.
241
+ * @param listener - A callback function to be called when the event is received.
242
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
264
243
  *
265
244
  * @throws {TransportError} When the transport layer throws an error.
266
245
  *
@@ -277,20 +256,17 @@ class SubscriptionClient {
277
256
  * });
278
257
  * ```
279
258
  */
280
- notification(args, listener) {
281
- const payload = {
282
- type: "notification",
283
- user: args.user,
284
- };
259
+ notification(params, listener) {
260
+ const payload = { type: "notification", ...params };
285
261
  return this.transport.subscribe(payload.type, payload, (e) => {
286
262
  listener(e.detail);
287
263
  });
288
264
  }
289
265
  /**
290
266
  * Subscribe to order status updates for a specific user.
291
- * @param args - The parameters for the subscription.
292
- * @param listener - The callback function to be called when the event is received.
293
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
267
+ * @param params - Subscription-specific parameters.
268
+ * @param listener - A callback function to be called when the event is received.
269
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
294
270
  *
295
271
  * @throws {TransportError} When the transport layer throws an error.
296
272
  *
@@ -307,20 +283,17 @@ class SubscriptionClient {
307
283
  * });
308
284
  * ```
309
285
  */
310
- orderUpdates(args, listener) {
311
- const payload = {
312
- type: "orderUpdates",
313
- user: args.user,
314
- };
286
+ orderUpdates(params, listener) {
287
+ const payload = { type: "orderUpdates", ...params };
315
288
  return this.transport.subscribe(payload.type, payload, (e) => {
316
289
  listener(e.detail);
317
290
  });
318
291
  }
319
292
  /**
320
293
  * Subscribe to real-time trade updates for a specific asset.
321
- * @param args - The parameters for the subscription.
322
- * @param listener - The callback function to be called when the event is received.
323
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
294
+ * @param params - Subscription-specific parameters.
295
+ * @param listener - A callback function to be called when the event is received.
296
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
324
297
  *
325
298
  * @throws {TransportError} When the transport layer throws an error.
326
299
  *
@@ -337,22 +310,19 @@ class SubscriptionClient {
337
310
  * });
338
311
  * ```
339
312
  */
340
- trades(args, listener) {
341
- const payload = {
342
- type: "trades",
343
- coin: args.coin,
344
- };
313
+ trades(params, listener) {
314
+ const payload = { type: "trades", ...params };
345
315
  return this.transport.subscribe(payload.type, payload, (e) => {
346
- if (e.detail[0]?.coin === args.coin) {
316
+ if (e.detail[0]?.coin === params.coin) {
347
317
  listener(e.detail);
348
318
  }
349
319
  });
350
320
  }
351
321
  /**
352
322
  * Subscribe to non-order events for a specific user.
353
- * @param args - The parameters for the subscription.
354
- * @param listener - The callback function to be called when the event is received.
355
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
323
+ * @param params - Subscription-specific parameters.
324
+ * @param listener - A callback function to be called when the event is received.
325
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
356
326
  * @note Different subscriptions cannot be distinguished from each other.
357
327
  *
358
328
  * @throws {TransportError} When the transport layer throws an error.
@@ -370,20 +340,17 @@ class SubscriptionClient {
370
340
  * });
371
341
  * ```
372
342
  */
373
- userEvents(args, listener) {
374
- const payload = {
375
- type: "userEvents",
376
- user: args.user,
377
- };
343
+ userEvents(params, listener) {
344
+ const payload = { type: "userEvents", ...params };
378
345
  return this.transport.subscribe("user", payload, (e) => {
379
346
  listener(e.detail);
380
347
  });
381
348
  }
382
349
  /**
383
350
  * Subscribe to trade fill updates for a specific user.
384
- * @param args - The parameters for the subscription.
385
- * @param listener - The callback function to be called when the event is received.
386
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
351
+ * @param params - Subscription-specific parameters.
352
+ * @param listener - A callback function to be called when the event is received.
353
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
387
354
  *
388
355
  * @throws {TransportError} When the transport layer throws an error.
389
356
  *
@@ -400,23 +367,23 @@ class SubscriptionClient {
400
367
  * });
401
368
  * ```
402
369
  */
403
- userFills(args, listener) {
370
+ userFills(params, listener) {
404
371
  const payload = {
405
372
  type: "userFills",
406
- user: args.user,
407
- aggregateByTime: args.aggregateByTime ?? false,
373
+ aggregateByTime: params.aggregateByTime ?? false,
374
+ ...params,
408
375
  };
409
376
  return this.transport.subscribe(payload.type, payload, (e) => {
410
- if (e.detail.user === args.user.toLowerCase()) {
377
+ if (e.detail.user === params.user.toLowerCase()) {
411
378
  listener(e.detail);
412
379
  }
413
380
  });
414
381
  }
415
382
  /**
416
383
  * Subscribe to funding payment updates for a specific user.
417
- * @param args - The parameters for the subscription.
418
- * @param listener - The callback function to be called when the event is received.
419
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
384
+ * @param params - Subscription-specific parameters.
385
+ * @param listener - A callback function to be called when the event is received.
386
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
420
387
  *
421
388
  * @throws {TransportError} When the transport layer throws an error.
422
389
  *
@@ -433,22 +400,19 @@ class SubscriptionClient {
433
400
  * });
434
401
  * ```
435
402
  */
436
- userFundings(args, listener) {
437
- const payload = {
438
- type: "userFundings",
439
- user: args.user,
440
- };
403
+ userFundings(params, listener) {
404
+ const payload = { type: "userFundings", ...params };
441
405
  return this.transport.subscribe(payload.type, payload, (e) => {
442
- if (e.detail.user === args.user.toLowerCase()) {
406
+ if (e.detail.user === params.user.toLowerCase()) {
443
407
  listener(e.detail);
444
408
  }
445
409
  });
446
410
  }
447
411
  /**
448
412
  * Subscribe to non-funding ledger updates for a specific user.
449
- * @param args - The parameters for the subscription.
450
- * @param listener - The callback function to be called when the event is received.
451
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
413
+ * @param params - Subscription-specific parameters.
414
+ * @param listener - A callback function to be called when the event is received.
415
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
452
416
  *
453
417
  * @throws {TransportError} When the transport layer throws an error.
454
418
  *
@@ -465,22 +429,22 @@ class SubscriptionClient {
465
429
  * });
466
430
  * ```
467
431
  */
468
- userNonFundingLedgerUpdates(args, listener) {
432
+ userNonFundingLedgerUpdates(params, listener) {
469
433
  const payload = {
470
434
  type: "userNonFundingLedgerUpdates",
471
- user: args.user,
435
+ ...params,
472
436
  };
473
437
  return this.transport.subscribe(payload.type, payload, (e) => {
474
- if (e.detail.user === args.user.toLowerCase()) {
438
+ if (e.detail.user === params.user.toLowerCase()) {
475
439
  listener(e.detail);
476
440
  }
477
441
  });
478
442
  }
479
443
  /**
480
444
  * Subscribe to TWAP order history updates for a specific user.
481
- * @param args - The parameters for the subscription.
482
- * @param listener - The callback function to be called when the event is received.
483
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
445
+ * @param params - Subscription-specific parameters.
446
+ * @param listener - A callback function to be called when the event is received.
447
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
484
448
  *
485
449
  * @throws {TransportError} When the transport layer throws an error.
486
450
  *
@@ -497,22 +461,19 @@ class SubscriptionClient {
497
461
  * });
498
462
  * ```
499
463
  */
500
- userTwapHistory(args, listener) {
501
- const payload = {
502
- type: "userTwapHistory",
503
- user: args.user,
504
- };
464
+ userTwapHistory(params, listener) {
465
+ const payload = { type: "userTwapHistory", ...params };
505
466
  return this.transport.subscribe(payload.type, payload, (e) => {
506
- if (e.detail.user === args.user.toLowerCase()) {
467
+ if (e.detail.user === params.user.toLowerCase()) {
507
468
  listener(e.detail);
508
469
  }
509
470
  });
510
471
  }
511
472
  /**
512
473
  * Subscribe to TWAP execution updates for a specific user.
513
- * @param args - The parameters for the subscription.
514
- * @param listener - The callback function to be called when the event is received.
515
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
474
+ * @param params - Subscription-specific parameters.
475
+ * @param listener - A callback function to be called when the event is received.
476
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
516
477
  *
517
478
  * @throws {TransportError} When the transport layer throws an error.
518
479
  *
@@ -529,22 +490,19 @@ class SubscriptionClient {
529
490
  * });
530
491
  * ```
531
492
  */
532
- userTwapSliceFills(args, listener) {
533
- const payload = {
534
- type: "userTwapSliceFills",
535
- user: args.user,
536
- };
493
+ userTwapSliceFills(params, listener) {
494
+ const payload = { type: "userTwapSliceFills", ...params };
537
495
  return this.transport.subscribe(payload.type, payload, (e) => {
538
- if (e.detail.user === args.user.toLowerCase()) {
496
+ if (e.detail.user === params.user.toLowerCase()) {
539
497
  listener(e.detail);
540
498
  }
541
499
  });
542
500
  }
543
501
  /**
544
502
  * Subscribe to comprehensive user and market data updates.
545
- * @param args - The parameters for the subscription.
546
- * @param listener - The callback function to be called when the event is received.
547
- * @returns A promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
503
+ * @param params - Subscription-specific parameters.
504
+ * @param listener - A callback function to be called when the event is received.
505
+ * @returns A request-promise that resolves with a {@link Subscription} object to manage the subscription lifecycle.
548
506
  *
549
507
  * @throws {TransportError} When the transport layer throws an error.
550
508
  *
@@ -561,13 +519,10 @@ class SubscriptionClient {
561
519
  * });
562
520
  * ```
563
521
  */
564
- webData2(args, listener) {
565
- const payload = {
566
- type: "webData2",
567
- user: args.user,
568
- };
522
+ webData2(params, listener) {
523
+ const payload = { type: "webData2", ...params };
569
524
  return this.transport.subscribe(payload.type, payload, (e) => {
570
- if (e.detail.user === args.user.toLowerCase()) {
525
+ if (e.detail.user === params.user.toLowerCase()) {
571
526
  listener(e.detail);
572
527
  }
573
528
  });
@@ -1,5 +1,5 @@
1
- /** Abstract interface for an [ethers.js signer](https://docs.ethers.org/v6/api/providers/#Signer). */
2
- export interface AbstractEthersSigner {
1
+ /** Abstract interface for an {@link https://docs.ethers.org/v6/api/providers/#Signer | ethers.js signer}. */
2
+ export interface AbstractEthersV6Signer {
3
3
  signTypedData(domain: {
4
4
  name: string;
5
5
  version: string;
@@ -11,8 +11,14 @@ export interface AbstractEthersSigner {
11
11
  type: string;
12
12
  }[];
13
13
  }, value: Record<string, unknown>): Promise<string>;
14
+ getAddress?(): Promise<string>;
15
+ provider?: {
16
+ getNetwork(): Promise<{
17
+ chainId: number | bigint;
18
+ }>;
19
+ } | null;
14
20
  }
15
- /** Abstract interface for an [ethers.js v5 signer](https://docs.ethers.org/v5/api/signer/). */
21
+ /** Abstract interface for an {@link https://docs.ethers.org/v5/api/signer/ | ethers.js v5 signer}. */
16
22
  export interface AbstractEthersV5Signer {
17
23
  _signTypedData(domain: {
18
24
  name: string;
@@ -25,9 +31,15 @@ export interface AbstractEthersV5Signer {
25
31
  type: string;
26
32
  }[];
27
33
  }, value: Record<string, unknown>): Promise<string>;
34
+ getAddress?(): Promise<string>;
35
+ provider?: {
36
+ getNetwork(): Promise<{
37
+ chainId: number | bigint;
38
+ }>;
39
+ } | null;
28
40
  }
29
41
  /** Checks if the given value is an abstract ethers signer. */
30
- export declare function isAbstractEthersSigner(client: unknown): client is AbstractEthersSigner;
42
+ export declare function isAbstractEthersV6Signer(client: unknown): client is AbstractEthersV6Signer;
31
43
  /** Checks if the given value is an abstract ethers v5 signer. */
32
44
  export declare function isAbstractEthersV5Signer(client: unknown): client is AbstractEthersV5Signer;
33
45
  //# sourceMappingURL=ethers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../../../../src/src/signing/_signTypedData/ethers.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,MAAM,WAAW,oBAAoB;IACjC,aAAa,CACT,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,EACD,KAAK,EAAE;QACH,CAAC,GAAG,EAAE,MAAM,GAAG;YACX,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;KACP,EACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,+FAA+F;AAC/F,MAAM,WAAW,sBAAsB;IACnC,cAAc,CACV,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,EACD,KAAK,EAAE;QACH,CAAC,GAAG,EAAE,MAAM,GAAG;YACX,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;KACP,EACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,8DAA8D;AAC9D,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,oBAAoB,CAItF;AAED,iEAAiE;AACjE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,sBAAsB,CAI1F"}
1
+ {"version":3,"file":"ethers.d.ts","sourceRoot":"","sources":["../../../../src/src/signing/_signTypedData/ethers.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,MAAM,WAAW,sBAAsB;IACnC,aAAa,CACT,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,EACD,KAAK,EAAE;QACH,CAAC,GAAG,EAAE,MAAM,GAAG;YACX,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;KACP,EACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,UAAU,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,EACH;QAAE,UAAU,IAAI,OAAO,CAAC;YAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,GACvD,IAAI,CAAC;CACd;AAED,sGAAsG;AACtG,MAAM,WAAW,sBAAsB;IACnC,cAAc,CACV,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,EAAE,MAAM,CAAC;KAC7B,EACD,KAAK,EAAE;QACH,CAAC,GAAG,EAAE,MAAM,GAAG;YACX,IAAI,EAAE,MAAM,CAAC;YACb,IAAI,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;KACP,EACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,OAAO,CAAC,MAAM,CAAC,CAAC;IACnB,UAAU,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,EACH;QAAE,UAAU,IAAI,OAAO,CAAC;YAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,GACvD,IAAI,CAAC;CACd;AAED,8DAA8D;AAC9D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,sBAAsB,CAI1F;AAED,iEAAiE;AACjE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,sBAAsB,CAI1F"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isAbstractEthersSigner = isAbstractEthersSigner;
3
+ exports.isAbstractEthersV6Signer = isAbstractEthersV6Signer;
4
4
  exports.isAbstractEthersV5Signer = isAbstractEthersV5Signer;
5
5
  /** Checks if the given value is an abstract ethers signer. */
6
- function isAbstractEthersSigner(client) {
6
+ function isAbstractEthersV6Signer(client) {
7
7
  return typeof client === "object" && client !== null &&
8
8
  "signTypedData" in client && typeof client.signTypedData === "function" &&
9
9
  client.signTypedData.length === 3;
@@ -1,19 +1,15 @@
1
- import type { Hex } from "../../base.js";
2
- import { type AbstractEthersSigner, type AbstractEthersV5Signer, isAbstractEthersSigner, isAbstractEthersV5Signer } from "./ethers.js";
3
- import { isValidPrivateKey } from "./private_key.js";
4
- import { type AbstractViemWalletClient, isAbstractViemWalletClient } from "./viem.js";
5
- import { type AbstractWindowEthereum, isAbstractWindowEthereum } from "./window.js";
6
- export { type AbstractEthersSigner, type AbstractEthersV5Signer, type AbstractViemWalletClient, type AbstractWindowEthereum, isAbstractEthersSigner, isAbstractEthersV5Signer, isAbstractViemWalletClient, isAbstractWindowEthereum, isValidPrivateKey, };
1
+ import { type AbstractEthersV5Signer, type AbstractEthersV6Signer } from "./ethers.js";
2
+ import { type AbstractViemJsonRpcAccount, type AbstractViemLocalAccount } from "./viem.js";
7
3
  /** Abstract interface for a wallet that can sign typed data. */
8
- export type AbstractWallet = Hex | AbstractViemWalletClient | AbstractEthersSigner | AbstractEthersV5Signer | AbstractWindowEthereum;
4
+ export type AbstractWallet = `0x${string}` | AbstractViemJsonRpcAccount | AbstractViemLocalAccount | AbstractEthersV6Signer | AbstractEthersV5Signer;
9
5
  /** ECDSA signature components for Ethereum transactions and typed data. */
10
6
  export interface Signature {
11
7
  /** First 32-byte component of ECDSA signature */
12
- r: Hex;
8
+ r: `0x${string}`;
13
9
  /** Second 32-byte component of ECDSA signature */
14
- s: Hex;
15
- /** Recovery identifier (27 or 28, or 0 or 1 for EIP-155) */
16
- v: number;
10
+ s: `0x${string}`;
11
+ /** Recovery identifier */
12
+ v: 27 | 28;
17
13
  }
18
14
  export declare function signTypedData(args: {
19
15
  wallet: AbstractWallet;
@@ -21,7 +17,7 @@ export declare function signTypedData(args: {
21
17
  name: string;
22
18
  version: string;
23
19
  chainId: number;
24
- verifyingContract: Hex;
20
+ verifyingContract: `0x${string}`;
25
21
  };
26
22
  types: {
27
23
  [key: string]: {
@@ -32,4 +28,8 @@ export declare function signTypedData(args: {
32
28
  primaryType: string;
33
29
  message: Record<string, unknown>;
34
30
  }): Promise<Signature>;
31
+ /** Get the chain ID of the wallet. */
32
+ export declare function getWalletChainId(wallet: AbstractWallet): Promise<`0x${string}`>;
33
+ /** Get the wallet address from various wallet types. */
34
+ export declare function getWalletAddress(wallet: AbstractWallet): Promise<`0x${string}`>;
35
35
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/signing/_signTypedData/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACH,KAAK,oBAAoB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