@nktkas/hyperliquid 0.25.0-beta.1 → 0.25.0-beta.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 (222) hide show
  1. package/README.md +46 -14
  2. package/esm/mod.js +1 -0
  3. package/esm/mod.js.map +1 -0
  4. package/esm/src/clients/exchange.d.ts +0 -7
  5. package/esm/src/clients/exchange.d.ts.map +1 -1
  6. package/esm/src/clients/exchange.js +4 -5
  7. package/esm/src/clients/exchange.js.map +1 -0
  8. package/esm/src/clients/info.d.ts +64 -2
  9. package/esm/src/clients/info.d.ts.map +1 -1
  10. package/esm/src/clients/info.js +77 -1
  11. package/esm/src/clients/info.js.map +1 -0
  12. package/esm/src/clients/multiSign.js +2 -1
  13. package/esm/src/clients/multiSign.js.map +1 -0
  14. package/esm/src/clients/subscription.js +1 -0
  15. package/esm/src/clients/subscription.js.map +1 -0
  16. package/esm/src/errors.js +1 -0
  17. package/esm/src/errors.js.map +1 -0
  18. package/esm/src/schemas/_base.d.ts +6 -2
  19. package/esm/src/schemas/_base.d.ts.map +1 -1
  20. package/esm/src/schemas/_base.js +4 -1
  21. package/esm/src/schemas/_base.js.map +1 -0
  22. package/esm/src/schemas/exchange/requests.d.ts +284 -284
  23. package/esm/src/schemas/exchange/requests.js +260 -259
  24. package/esm/src/schemas/exchange/requests.js.map +1 -0
  25. package/esm/src/schemas/exchange/responses.d.ts +47 -47
  26. package/esm/src/schemas/exchange/responses.js +55 -54
  27. package/esm/src/schemas/exchange/responses.js.map +1 -0
  28. package/esm/src/schemas/explorer/requests.d.ts +3 -3
  29. package/esm/src/schemas/explorer/requests.js +6 -5
  30. package/esm/src/schemas/explorer/requests.js.map +1 -0
  31. package/esm/src/schemas/explorer/responses.d.ts +10 -10
  32. package/esm/src/schemas/explorer/responses.js +12 -11
  33. package/esm/src/schemas/explorer/responses.js.map +1 -0
  34. package/esm/src/schemas/info/accounts.d.ts +121 -121
  35. package/esm/src/schemas/info/accounts.js +110 -109
  36. package/esm/src/schemas/info/accounts.js.map +1 -0
  37. package/esm/src/schemas/info/assets.d.ts +68 -39
  38. package/esm/src/schemas/info/assets.d.ts.map +1 -1
  39. package/esm/src/schemas/info/assets.js +69 -49
  40. package/esm/src/schemas/info/assets.js.map +1 -0
  41. package/esm/src/schemas/info/markets.d.ts +25 -8
  42. package/esm/src/schemas/info/markets.d.ts.map +1 -1
  43. package/esm/src/schemas/info/markets.js +27 -15
  44. package/esm/src/schemas/info/markets.js.map +1 -0
  45. package/esm/src/schemas/info/orders.d.ts +56 -56
  46. package/esm/src/schemas/info/orders.js +37 -36
  47. package/esm/src/schemas/info/orders.js.map +1 -0
  48. package/esm/src/schemas/info/requests.d.ts +98 -56
  49. package/esm/src/schemas/info/requests.d.ts.map +1 -1
  50. package/esm/src/schemas/info/requests.js +103 -71
  51. package/esm/src/schemas/info/requests.js.map +1 -0
  52. package/esm/src/schemas/info/validators.d.ts +44 -23
  53. package/esm/src/schemas/info/validators.d.ts.map +1 -1
  54. package/esm/src/schemas/info/validators.js +40 -26
  55. package/esm/src/schemas/info/validators.js.map +1 -0
  56. package/esm/src/schemas/info/vaults.d.ts +40 -40
  57. package/esm/src/schemas/info/vaults.js +20 -19
  58. package/esm/src/schemas/info/vaults.js.map +1 -0
  59. package/esm/src/schemas/mod.d.ts +1 -0
  60. package/esm/src/schemas/mod.d.ts.map +1 -1
  61. package/esm/src/schemas/mod.js +2 -0
  62. package/esm/src/schemas/mod.js.map +1 -0
  63. package/esm/src/schemas/subscriptions/requests.d.ts +21 -21
  64. package/esm/src/schemas/subscriptions/requests.js +22 -21
  65. package/esm/src/schemas/subscriptions/requests.js.map +1 -0
  66. package/esm/src/schemas/subscriptions/responses.d.ts +192 -192
  67. package/esm/src/schemas/subscriptions/responses.js +41 -40
  68. package/esm/src/schemas/subscriptions/responses.js.map +1 -0
  69. package/esm/src/signing/_signTypedData/ethers.js +1 -0
  70. package/esm/src/signing/_signTypedData/ethers.js.map +1 -0
  71. package/esm/src/signing/_signTypedData/mod.js +1 -0
  72. package/esm/src/signing/_signTypedData/mod.js.map +1 -0
  73. package/esm/src/signing/_signTypedData/private_key.js +1 -0
  74. package/esm/src/signing/_signTypedData/private_key.js.map +1 -0
  75. package/esm/src/signing/_signTypedData/viem.js +1 -0
  76. package/esm/src/signing/_signTypedData/viem.js.map +1 -0
  77. package/esm/src/signing/mod.js +1 -0
  78. package/esm/src/signing/mod.js.map +1 -0
  79. package/esm/src/transports/base.d.ts +2 -2
  80. package/esm/src/transports/base.d.ts.map +1 -1
  81. package/esm/src/transports/base.js +1 -0
  82. package/esm/src/transports/base.js.map +1 -0
  83. package/esm/src/transports/http/http_transport.d.ts +1 -1
  84. package/esm/src/transports/http/http_transport.js +1 -0
  85. package/esm/src/transports/http/http_transport.js.map +1 -0
  86. package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  87. package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  88. package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
  89. package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  90. package/esm/src/transports/websocket/_websocket_async_request.js +1 -0
  91. package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -0
  92. package/esm/src/transports/websocket/websocket_transport.d.ts +7 -0
  93. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  94. package/esm/src/transports/websocket/websocket_transport.js +4 -0
  95. package/esm/src/transports/websocket/websocket_transport.js.map +1 -0
  96. package/package.json +1 -1
  97. package/script/mod.js +1 -0
  98. package/script/mod.js.map +1 -0
  99. package/script/src/clients/exchange.d.ts +0 -7
  100. package/script/src/clients/exchange.d.ts.map +1 -1
  101. package/script/src/clients/exchange.js +4 -5
  102. package/script/src/clients/exchange.js.map +1 -0
  103. package/script/src/clients/info.d.ts +64 -2
  104. package/script/src/clients/info.d.ts.map +1 -1
  105. package/script/src/clients/info.js +76 -0
  106. package/script/src/clients/info.js.map +1 -0
  107. package/script/src/clients/multiSign.js +2 -1
  108. package/script/src/clients/multiSign.js.map +1 -0
  109. package/script/src/clients/subscription.js +1 -0
  110. package/script/src/clients/subscription.js.map +1 -0
  111. package/script/src/errors.js +1 -0
  112. package/script/src/errors.js.map +1 -0
  113. package/script/src/schemas/_base.d.ts +6 -2
  114. package/script/src/schemas/_base.d.ts.map +1 -1
  115. package/script/src/schemas/_base.js +5 -2
  116. package/script/src/schemas/_base.js.map +1 -0
  117. package/script/src/schemas/exchange/requests.d.ts +284 -284
  118. package/script/src/schemas/exchange/requests.js +259 -258
  119. package/script/src/schemas/exchange/requests.js.map +1 -0
  120. package/script/src/schemas/exchange/responses.d.ts +47 -47
  121. package/script/src/schemas/exchange/responses.js +54 -53
  122. package/script/src/schemas/exchange/responses.js.map +1 -0
  123. package/script/src/schemas/explorer/requests.d.ts +3 -3
  124. package/script/src/schemas/explorer/requests.js +5 -4
  125. package/script/src/schemas/explorer/requests.js.map +1 -0
  126. package/script/src/schemas/explorer/responses.d.ts +10 -10
  127. package/script/src/schemas/explorer/responses.js +11 -10
  128. package/script/src/schemas/explorer/responses.js.map +1 -0
  129. package/script/src/schemas/info/accounts.d.ts +121 -121
  130. package/script/src/schemas/info/accounts.js +109 -108
  131. package/script/src/schemas/info/accounts.js.map +1 -0
  132. package/script/src/schemas/info/assets.d.ts +68 -39
  133. package/script/src/schemas/info/assets.d.ts.map +1 -1
  134. package/script/src/schemas/info/assets.js +69 -49
  135. package/script/src/schemas/info/assets.js.map +1 -0
  136. package/script/src/schemas/info/markets.d.ts +25 -8
  137. package/script/src/schemas/info/markets.d.ts.map +1 -1
  138. package/script/src/schemas/info/markets.js +27 -15
  139. package/script/src/schemas/info/markets.js.map +1 -0
  140. package/script/src/schemas/info/orders.d.ts +56 -56
  141. package/script/src/schemas/info/orders.js +36 -35
  142. package/script/src/schemas/info/orders.js.map +1 -0
  143. package/script/src/schemas/info/requests.d.ts +98 -56
  144. package/script/src/schemas/info/requests.d.ts.map +1 -1
  145. package/script/src/schemas/info/requests.js +103 -71
  146. package/script/src/schemas/info/requests.js.map +1 -0
  147. package/script/src/schemas/info/validators.d.ts +44 -23
  148. package/script/src/schemas/info/validators.d.ts.map +1 -1
  149. package/script/src/schemas/info/validators.js +40 -26
  150. package/script/src/schemas/info/validators.js.map +1 -0
  151. package/script/src/schemas/info/vaults.d.ts +40 -40
  152. package/script/src/schemas/info/vaults.js +19 -18
  153. package/script/src/schemas/info/vaults.js.map +1 -0
  154. package/script/src/schemas/mod.d.ts +1 -0
  155. package/script/src/schemas/mod.d.ts.map +1 -1
  156. package/script/src/schemas/mod.js +4 -1
  157. package/script/src/schemas/mod.js.map +1 -0
  158. package/script/src/schemas/subscriptions/requests.d.ts +21 -21
  159. package/script/src/schemas/subscriptions/requests.js +22 -21
  160. package/script/src/schemas/subscriptions/requests.js.map +1 -0
  161. package/script/src/schemas/subscriptions/responses.d.ts +192 -192
  162. package/script/src/schemas/subscriptions/responses.js +40 -39
  163. package/script/src/schemas/subscriptions/responses.js.map +1 -0
  164. package/script/src/signing/_signTypedData/ethers.js +1 -0
  165. package/script/src/signing/_signTypedData/ethers.js.map +1 -0
  166. package/script/src/signing/_signTypedData/mod.js +1 -0
  167. package/script/src/signing/_signTypedData/mod.js.map +1 -0
  168. package/script/src/signing/_signTypedData/private_key.js +1 -0
  169. package/script/src/signing/_signTypedData/private_key.js.map +1 -0
  170. package/script/src/signing/_signTypedData/viem.js +1 -0
  171. package/script/src/signing/_signTypedData/viem.js.map +1 -0
  172. package/script/src/signing/mod.js +1 -0
  173. package/script/src/signing/mod.js.map +1 -0
  174. package/script/src/transports/base.d.ts +2 -2
  175. package/script/src/transports/base.d.ts.map +1 -1
  176. package/script/src/transports/base.js +1 -0
  177. package/script/src/transports/base.js.map +1 -0
  178. package/script/src/transports/http/http_transport.d.ts +1 -1
  179. package/script/src/transports/http/http_transport.js +1 -0
  180. package/script/src/transports/http/http_transport.js.map +1 -0
  181. package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  182. package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  183. package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
  184. package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  185. package/script/src/transports/websocket/_websocket_async_request.js +1 -0
  186. package/script/src/transports/websocket/_websocket_async_request.js.map +1 -0
  187. package/script/src/transports/websocket/websocket_transport.d.ts +7 -0
  188. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  189. package/script/src/transports/websocket/websocket_transport.js +4 -0
  190. package/script/src/transports/websocket/websocket_transport.js.map +1 -0
  191. package/src/mod.ts +28 -0
  192. package/src/src/clients/exchange.ts +2246 -0
  193. package/src/src/clients/info.ts +2076 -0
  194. package/src/src/clients/multiSign.ts +183 -0
  195. package/src/src/clients/subscription.ts +841 -0
  196. package/src/src/errors.ts +7 -0
  197. package/src/src/schemas/_base.ts +43 -0
  198. package/src/src/schemas/exchange/requests.ts +3057 -0
  199. package/src/src/schemas/exchange/responses.ts +540 -0
  200. package/src/src/schemas/explorer/requests.ts +65 -0
  201. package/src/src/schemas/explorer/responses.ts +138 -0
  202. package/src/src/schemas/info/accounts.ts +1490 -0
  203. package/src/src/schemas/info/assets.ts +693 -0
  204. package/src/src/schemas/info/markets.ts +171 -0
  205. package/src/src/schemas/info/orders.ts +597 -0
  206. package/src/src/schemas/info/requests.ts +1369 -0
  207. package/src/src/schemas/info/validators.ts +299 -0
  208. package/src/src/schemas/info/vaults.ts +262 -0
  209. package/src/src/schemas/mod.ts +121 -0
  210. package/src/src/schemas/subscriptions/requests.ts +504 -0
  211. package/src/src/schemas/subscriptions/responses.ts +576 -0
  212. package/src/src/signing/_signTypedData/ethers.ts +59 -0
  213. package/src/src/signing/_signTypedData/mod.ts +121 -0
  214. package/src/src/signing/_signTypedData/private_key.ts +229 -0
  215. package/src/src/signing/_signTypedData/viem.ts +55 -0
  216. package/src/src/signing/mod.ts +572 -0
  217. package/src/src/transports/base.ts +54 -0
  218. package/src/src/transports/http/http_transport.ts +208 -0
  219. package/src/src/transports/websocket/_hyperliquid_event_target.ts +118 -0
  220. package/src/src/transports/websocket/_reconnecting_websocket.ts +404 -0
  221. package/src/src/transports/websocket/_websocket_async_request.ts +229 -0
  222. package/src/src/transports/websocket/websocket_transport.ts +394 -0
@@ -1,11 +1,11 @@
1
1
  import * as v from "valibot";
2
- import { Hex } from "../_base.js";
2
+ import { Hex, UnsignedInteger } from "../_base.js";
3
3
  /**
4
4
  * Request user active asset data.
5
5
  * @returns {ActiveAssetData}
6
6
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-active-asset-data
7
7
  */
8
- export const ActiveAssetDataRequest = v.pipe(v.strictObject({
8
+ export const ActiveAssetDataRequest = v.pipe(v.object({
9
9
  /** Type of request. */
10
10
  type: v.pipe(v.literal("activeAssetData"), v.description("Type of request.")),
11
11
  /** Asset symbol (e.g., BTC). */
@@ -18,7 +18,7 @@ export const ActiveAssetDataRequest = v.pipe(v.strictObject({
18
18
  * @returns {AllMids}
19
19
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-mids-for-all-coins
20
20
  */
21
- export const AllMidsRequest = v.pipe(v.strictObject({
21
+ export const AllMidsRequest = v.pipe(v.object({
22
22
  /** Type of request. */
23
23
  type: v.pipe(v.literal("allMids"), v.description("Type of request.")),
24
24
  /** DEX name (empty string for main dex). */
@@ -29,11 +29,11 @@ export const AllMidsRequest = v.pipe(v.strictObject({
29
29
  * @returns {Candle[]}
30
30
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#candle-snapshot
31
31
  */
32
- export const CandleSnapshotRequest = v.pipe(v.strictObject({
32
+ export const CandleSnapshotRequest = v.pipe(v.object({
33
33
  /** Type of request. */
34
34
  type: v.pipe(v.literal("candleSnapshot"), v.description("Type of request.")),
35
35
  /** Request parameters. */
36
- req: v.pipe(v.strictObject({
36
+ req: v.pipe(v.object({
37
37
  /** Asset symbol (e.g., BTC). */
38
38
  coin: v.pipe(v.string(), v.description("Asset symbol (e.g., BTC).")),
39
39
  /** Time interval. */
@@ -54,9 +54,9 @@ export const CandleSnapshotRequest = v.pipe(v.strictObject({
54
54
  v.literal("1M"),
55
55
  ]), v.description("Time interval.")),
56
56
  /** Start time (in ms since epoch). */
57
- startTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Start time (in ms since epoch).")),
57
+ startTime: v.pipe(UnsignedInteger, v.description("Start time (in ms since epoch).")),
58
58
  /** End time (in ms since epoch). */
59
- endTime: v.pipe(v.nullish(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("End time (in ms since epoch).")),
59
+ endTime: v.pipe(v.nullish(UnsignedInteger), v.description("End time (in ms since epoch).")),
60
60
  }), v.description("Request parameters.")),
61
61
  }), v.description("Request candlestick snapshots."));
62
62
  /**
@@ -64,7 +64,7 @@ export const CandleSnapshotRequest = v.pipe(v.strictObject({
64
64
  * @returns {PerpsClearinghouseState}
65
65
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-users-perpetuals-account-summary
66
66
  */
67
- export const ClearinghouseStateRequest = v.pipe(v.strictObject({
67
+ export const ClearinghouseStateRequest = v.pipe(v.object({
68
68
  /** Type of request. */
69
69
  type: v.pipe(v.literal("clearinghouseState"), v.description("Type of request.")),
70
70
  /** User address. */
@@ -77,7 +77,7 @@ export const ClearinghouseStateRequest = v.pipe(v.strictObject({
77
77
  * @returns {Delegation[]}
78
78
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-delegations
79
79
  */
80
- export const DelegationsRequest = v.pipe(v.strictObject({
80
+ export const DelegationsRequest = v.pipe(v.object({
81
81
  /** Type of request. */
82
82
  type: v.pipe(v.literal("delegations"), v.description("Type of request.")),
83
83
  /** User address. */
@@ -88,7 +88,7 @@ export const DelegationsRequest = v.pipe(v.strictObject({
88
88
  * @returns {DelegatorUpdate[]}
89
89
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-history
90
90
  */
91
- export const DelegatorHistoryRequest = v.pipe(v.strictObject({
91
+ export const DelegatorHistoryRequest = v.pipe(v.object({
92
92
  /** Type of request. */
93
93
  type: v.pipe(v.literal("delegatorHistory"), v.description("Type of request.")),
94
94
  /** User address. */
@@ -99,7 +99,7 @@ export const DelegatorHistoryRequest = v.pipe(v.strictObject({
99
99
  * @returns {DelegatorReward[]}
100
100
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-rewards
101
101
  */
102
- export const DelegatorRewardsRequest = v.pipe(v.strictObject({
102
+ export const DelegatorRewardsRequest = v.pipe(v.object({
103
103
  /** Type of request. */
104
104
  type: v.pipe(v.literal("delegatorRewards"), v.description("Type of request.")),
105
105
  /** User address. */
@@ -110,7 +110,7 @@ export const DelegatorRewardsRequest = v.pipe(v.strictObject({
110
110
  * @returns {DelegatorSummary}
111
111
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-staking-summary
112
112
  */
113
- export const DelegatorSummaryRequest = v.pipe(v.strictObject({
113
+ export const DelegatorSummaryRequest = v.pipe(v.object({
114
114
  /** Type of request. */
115
115
  type: v.pipe(v.literal("delegatorSummary"), v.description("Type of request.")),
116
116
  /** User address. */
@@ -121,7 +121,7 @@ export const DelegatorSummaryRequest = v.pipe(v.strictObject({
121
121
  * @returns {ExchangeStatus}
122
122
  * @see null
123
123
  */
124
- export const ExchangeStatusRequest = v.pipe(v.strictObject({
124
+ export const ExchangeStatusRequest = v.pipe(v.object({
125
125
  /** Type of request. */
126
126
  type: v.pipe(v.literal("exchangeStatus"), v.description("Type of request.")),
127
127
  }), v.description("Request exchange status information."));
@@ -130,7 +130,7 @@ export const ExchangeStatusRequest = v.pipe(v.strictObject({
130
130
  * @returns {ExtraAgent[]}
131
131
  * @see null
132
132
  */
133
- export const ExtraAgentsRequest = v.pipe(v.strictObject({
133
+ export const ExtraAgentsRequest = v.pipe(v.object({
134
134
  /** Type of request. */
135
135
  type: v.pipe(v.literal("extraAgents"), v.description("Type of request.")),
136
136
  /** User address. */
@@ -141,7 +141,7 @@ export const ExtraAgentsRequest = v.pipe(v.strictObject({
141
141
  * @returns {FrontendOrder[]}
142
142
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders-with-additional-frontend-info
143
143
  */
144
- export const FrontendOpenOrdersRequest = v.pipe(v.strictObject({
144
+ export const FrontendOpenOrdersRequest = v.pipe(v.object({
145
145
  /** Type of request. */
146
146
  type: v.pipe(v.literal("frontendOpenOrders"), v.description("Type of request.")),
147
147
  /** User address. */
@@ -154,22 +154,22 @@ export const FrontendOpenOrdersRequest = v.pipe(v.strictObject({
154
154
  * @returns {FundingHistory[]}
155
155
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-historical-funding-rates
156
156
  */
157
- export const FundingHistoryRequest = v.pipe(v.strictObject({
157
+ export const FundingHistoryRequest = v.pipe(v.object({
158
158
  /** Type of request. */
159
159
  type: v.pipe(v.literal("fundingHistory"), v.description("Type of request.")),
160
160
  /** Asset symbol (e.g., BTC). */
161
161
  coin: v.pipe(v.string(), v.description("Asset symbol (e.g., BTC).")),
162
162
  /** Start time (in ms since epoch). */
163
- startTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Start time (in ms since epoch).")),
163
+ startTime: v.pipe(UnsignedInteger, v.description("Start time (in ms since epoch).")),
164
164
  /** End time (in ms since epoch). */
165
- endTime: v.pipe(v.nullish(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("End time (in ms since epoch).")),
165
+ endTime: v.pipe(v.nullish(UnsignedInteger), v.description("End time (in ms since epoch).")),
166
166
  }), v.description("Request funding history."));
167
167
  /**
168
168
  * Request user historical orders.
169
169
  * @returns {FrontendOrderStatus[]}
170
170
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-historical-orders
171
171
  */
172
- export const HistoricalOrdersRequest = v.pipe(v.strictObject({
172
+ export const HistoricalOrdersRequest = v.pipe(v.object({
173
173
  /** Type of request. */
174
174
  type: v.pipe(v.literal("historicalOrders"), v.description("Type of request.")),
175
175
  /** User address. */
@@ -180,7 +180,7 @@ export const HistoricalOrdersRequest = v.pipe(v.strictObject({
180
180
  * @returns {boolean | null}
181
181
  * @see null
182
182
  */
183
- export const IsVipRequest = v.pipe(v.strictObject({
183
+ export const IsVipRequest = v.pipe(v.object({
184
184
  /** Type of request. */
185
185
  type: v.pipe(v.literal("isVip"), v.description("Type of request.")),
186
186
  /** User address. */
@@ -191,7 +191,7 @@ export const IsVipRequest = v.pipe(v.strictObject({
191
191
  * @returns {Book}
192
192
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#l2-book-snapshot
193
193
  */
194
- export const L2BookRequest = v.pipe(v.strictObject({
194
+ export const L2BookRequest = v.pipe(v.object({
195
195
  /** Type of request. */
196
196
  type: v.pipe(v.literal("l2Book"), v.description("Type of request.")),
197
197
  /** Asset symbol (e.g., BTC). */
@@ -206,7 +206,7 @@ export const L2BookRequest = v.pipe(v.strictObject({
206
206
  * @returns {VaultLeading[]}
207
207
  * @see null
208
208
  */
209
- export const LeadingVaultsRequest = v.pipe(v.strictObject({
209
+ export const LeadingVaultsRequest = v.pipe(v.object({
210
210
  /** Type of request. */
211
211
  type: v.pipe(v.literal("leadingVaults"), v.description("Type of request.")),
212
212
  /** User address. */
@@ -217,7 +217,7 @@ export const LeadingVaultsRequest = v.pipe(v.strictObject({
217
217
  * @returns {LegalCheck}
218
218
  * @see null
219
219
  */
220
- export const LegalCheckRequest = v.pipe(v.strictObject({
220
+ export const LegalCheckRequest = v.pipe(v.object({
221
221
  /** Type of request. */
222
222
  type: v.pipe(v.literal("legalCheck"), v.description("Type of request.")),
223
223
  /** User address. */
@@ -228,7 +228,7 @@ export const LegalCheckRequest = v.pipe(v.strictObject({
228
228
  * @returns {unknown[]} FIXME: Define the return type
229
229
  * @see null
230
230
  */
231
- export const LiquidatableRequest = v.pipe(v.strictObject({
231
+ export const LiquidatableRequest = v.pipe(v.object({
232
232
  /** Type of request. */
233
233
  type: v.pipe(v.literal("liquidatable"), v.description("Type of request.")),
234
234
  }), v.description("Request liquidatable."));
@@ -237,18 +237,18 @@ export const LiquidatableRequest = v.pipe(v.strictObject({
237
237
  * @returns {MarginTable}
238
238
  * @see null
239
239
  */
240
- export const MarginTableRequest = v.pipe(v.strictObject({
240
+ export const MarginTableRequest = v.pipe(v.object({
241
241
  /** Type of request. */
242
242
  type: v.pipe(v.literal("marginTable"), v.description("Type of request.")),
243
243
  /** Margin requirements table. */
244
- id: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Margin requirements table.")),
244
+ id: v.pipe(UnsignedInteger, v.description("Margin requirements table.")),
245
245
  }), v.description("Request margin table data."));
246
246
  /**
247
247
  * Request builder fee approval.
248
248
  * @returns {number}
249
249
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#check-builder-fee-approval
250
250
  */
251
- export const MaxBuilderFeeRequest = v.pipe(v.strictObject({
251
+ export const MaxBuilderFeeRequest = v.pipe(v.object({
252
252
  /** Type of request. */
253
253
  type: v.pipe(v.literal("maxBuilderFee"), v.description("Type of request.")),
254
254
  /** User address. */
@@ -261,7 +261,7 @@ export const MaxBuilderFeeRequest = v.pipe(v.strictObject({
261
261
  * @returns {[number, string][]}
262
262
  * @see null
263
263
  */
264
- export const MaxMarketOrderNtlsRequest = v.pipe(v.strictObject({
264
+ export const MaxMarketOrderNtlsRequest = v.pipe(v.object({
265
265
  /** Type of request. */
266
266
  type: v.pipe(v.literal("maxMarketOrderNtls"), v.description("Type of request.")),
267
267
  }), v.description("Request maximum market order notionals."));
@@ -270,7 +270,7 @@ export const MaxMarketOrderNtlsRequest = v.pipe(v.strictObject({
270
270
  * @returns {PerpsMeta}
271
271
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-metadata-universe-and-margin-tables
272
272
  */
273
- export const MetaRequest = v.pipe(v.strictObject({
273
+ export const MetaRequest = v.pipe(v.object({
274
274
  /** Type of request. */
275
275
  type: v.pipe(v.literal("meta"), v.description("Type of request.")),
276
276
  /** DEX name (empty string for main dex). */
@@ -281,7 +281,7 @@ export const MetaRequest = v.pipe(v.strictObject({
281
281
  * @returns {PerpsMetaAndAssetCtxs}
282
282
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-perpetuals-asset-contexts-includes-mark-price-current-funding-open-interest-etc
283
283
  */
284
- export const MetaAndAssetCtxsRequest = v.pipe(v.strictObject({
284
+ export const MetaAndAssetCtxsRequest = v.pipe(v.object({
285
285
  /** Type of request. */
286
286
  type: v.pipe(v.literal("metaAndAssetCtxs"), v.description("Type of request.")),
287
287
  /** DEX name (empty string for main dex). */
@@ -292,7 +292,7 @@ export const MetaAndAssetCtxsRequest = v.pipe(v.strictObject({
292
292
  * @returns {Order[]}
293
293
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-open-orders
294
294
  */
295
- export const OpenOrdersRequest = v.pipe(v.strictObject({
295
+ export const OpenOrdersRequest = v.pipe(v.object({
296
296
  /** Type of request. */
297
297
  type: v.pipe(v.literal("openOrders"), v.description("Type of request.")),
298
298
  /** User address. */
@@ -305,20 +305,20 @@ export const OpenOrdersRequest = v.pipe(v.strictObject({
305
305
  * @returns {OrderLookup}
306
306
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-order-status-by-oid-or-cloid
307
307
  */
308
- export const OrderStatusRequest = v.pipe(v.strictObject({
308
+ export const OrderStatusRequest = v.pipe(v.object({
309
309
  /** Type of request. */
310
310
  type: v.pipe(v.literal("orderStatus"), v.description("Type of request.")),
311
311
  /** User address. */
312
312
  user: v.pipe(v.pipe(Hex, v.length(42)), v.description("User address.")),
313
313
  /** Order ID or Client Order ID. */
314
- oid: v.pipe(v.union([v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.pipe(Hex, v.length(34))]), v.description("Order ID or Client Order ID.")),
314
+ oid: v.pipe(v.union([UnsignedInteger, v.pipe(Hex, v.length(34))]), v.description("Order ID or Client Order ID.")),
315
315
  }), v.description("Request order status."));
316
316
  /**
317
317
  * Request for the status of the perpetual deploy auction.
318
318
  * @returns {DeployAuctionStatus}
319
319
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-information-about-the-perp-deploy-auction
320
320
  */
321
- export const PerpDeployAuctionStatusRequest = v.pipe(v.strictObject({
321
+ export const PerpDeployAuctionStatusRequest = v.pipe(v.object({
322
322
  /** Type of request. */
323
323
  type: v.pipe(v.literal("perpDeployAuctionStatus"), v.description("Type of request.")),
324
324
  }), v.description("Request for the status of the perpetual deploy auction."));
@@ -327,7 +327,7 @@ export const PerpDeployAuctionStatusRequest = v.pipe(v.strictObject({
327
327
  * @returns {PerpDexs}
328
328
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-all-perpetual-dexs
329
329
  */
330
- export const PerpDexsRequest = v.pipe(v.strictObject({
330
+ export const PerpDexsRequest = v.pipe(v.object({
331
331
  /** Type of request. */
332
332
  type: v.pipe(v.literal("perpDexs"), v.description("Type of request.")),
333
333
  }), v.description("Request all perpetual dexs."));
@@ -336,7 +336,7 @@ export const PerpDexsRequest = v.pipe(v.strictObject({
336
336
  * @returns {string[]}
337
337
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#query-perps-at-open-interest-caps
338
338
  */
339
- export const PerpsAtOpenInterestCapRequest = v.pipe(v.strictObject({
339
+ export const PerpsAtOpenInterestCapRequest = v.pipe(v.object({
340
340
  /** Type of request. */
341
341
  type: v.pipe(v.literal("perpsAtOpenInterestCap"), v.description("Type of request.")),
342
342
  /** DEX name (empty string for main dex). */
@@ -347,7 +347,7 @@ export const PerpsAtOpenInterestCapRequest = v.pipe(v.strictObject({
347
347
  * @returns {PortfolioPeriods}
348
348
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-portfolio
349
349
  */
350
- export const PortfolioRequest = v.pipe(v.strictObject({
350
+ export const PortfolioRequest = v.pipe(v.object({
351
351
  /** Type of request. */
352
352
  type: v.pipe(v.literal("portfolio"), v.description("Type of request.")),
353
353
  /** User address. */
@@ -358,7 +358,7 @@ export const PortfolioRequest = v.pipe(v.strictObject({
358
358
  * @returns {PredictedFunding[]}
359
359
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-predicted-funding-rates-for-different-venues
360
360
  */
361
- export const PredictedFundingsRequest = v.pipe(v.strictObject({
361
+ export const PredictedFundingsRequest = v.pipe(v.object({
362
362
  /** Type of request. */
363
363
  type: v.pipe(v.literal("predictedFundings"), v.description("Type of request.")),
364
364
  }), v.description("Request predicted funding rates."));
@@ -367,7 +367,7 @@ export const PredictedFundingsRequest = v.pipe(v.strictObject({
367
367
  * @returns {PreTransferCheck}
368
368
  * @see null
369
369
  */
370
- export const PreTransferCheckRequest = v.pipe(v.strictObject({
370
+ export const PreTransferCheckRequest = v.pipe(v.object({
371
371
  /** Type of request. */
372
372
  type: v.pipe(v.literal("preTransferCheck"), v.description("Type of request.")),
373
373
  /** User address. */
@@ -380,7 +380,7 @@ export const PreTransferCheckRequest = v.pipe(v.strictObject({
380
380
  * @returns {Referral}
381
381
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-referral-information
382
382
  */
383
- export const ReferralRequest = v.pipe(v.strictObject({
383
+ export const ReferralRequest = v.pipe(v.object({
384
384
  /** Type of request. */
385
385
  type: v.pipe(v.literal("referral"), v.description("Type of request.")),
386
386
  /** User address. */
@@ -391,7 +391,7 @@ export const ReferralRequest = v.pipe(v.strictObject({
391
391
  * @returns {SpotClearinghouseState}
392
392
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-a-users-token-balances
393
393
  */
394
- export const SpotClearinghouseStateRequest = v.pipe(v.strictObject({
394
+ export const SpotClearinghouseStateRequest = v.pipe(v.object({
395
395
  /** Type of request. */
396
396
  type: v.pipe(v.literal("spotClearinghouseState"), v.description("Type of request.")),
397
397
  /** User address. */
@@ -404,7 +404,7 @@ export const SpotClearinghouseStateRequest = v.pipe(v.strictObject({
404
404
  * @returns {SpotDeployState}
405
405
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-deploy-auction
406
406
  */
407
- export const SpotDeployStateRequest = v.pipe(v.strictObject({
407
+ export const SpotDeployStateRequest = v.pipe(v.object({
408
408
  /** Type of request. */
409
409
  type: v.pipe(v.literal("spotDeployState"), v.description("Type of request.")),
410
410
  /** User address. */
@@ -415,7 +415,7 @@ export const SpotDeployStateRequest = v.pipe(v.strictObject({
415
415
  * @returns {SpotMeta}
416
416
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-metadata
417
417
  */
418
- export const SpotMetaRequest = v.pipe(v.strictObject({
418
+ export const SpotMetaRequest = v.pipe(v.object({
419
419
  /** Type of request. */
420
420
  type: v.pipe(v.literal("spotMeta"), v.description("Type of request.")),
421
421
  }), v.description("Request spot trading metadata."));
@@ -424,7 +424,7 @@ export const SpotMetaRequest = v.pipe(v.strictObject({
424
424
  * @returns {SpotMetaAndAssetCtxs}
425
425
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-spot-asset-contexts
426
426
  */
427
- export const SpotMetaAndAssetCtxsRequest = v.pipe(v.strictObject({
427
+ export const SpotMetaAndAssetCtxsRequest = v.pipe(v.object({
428
428
  /** Type of request. */
429
429
  type: v.pipe(v.literal("spotMetaAndAssetCtxs"), v.description("Type of request.")),
430
430
  }), v.description("Request spot metadata and asset contexts."));
@@ -433,7 +433,7 @@ export const SpotMetaAndAssetCtxsRequest = v.pipe(v.strictObject({
433
433
  * @returns {DeployAuctionStatus}
434
434
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-pair-deploy-auction
435
435
  */
436
- export const SpotPairDeployAuctionStatusRequest = v.pipe(v.strictObject({
436
+ export const SpotPairDeployAuctionStatusRequest = v.pipe(v.object({
437
437
  /** Type of request. */
438
438
  type: v.pipe(v.literal("spotPairDeployAuctionStatus"), v.description("Type of request.")),
439
439
  }), v.description("Request for the status of the spot deploy auction."));
@@ -442,7 +442,7 @@ export const SpotPairDeployAuctionStatusRequest = v.pipe(v.strictObject({
442
442
  * @returns {SubAccount[] | null}
443
443
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-subaccounts
444
444
  */
445
- export const SubAccountsRequest = v.pipe(v.strictObject({
445
+ export const SubAccountsRequest = v.pipe(v.object({
446
446
  /** Type of request. */
447
447
  type: v.pipe(v.literal("subAccounts"), v.description("Type of request.")),
448
448
  /** User address. */
@@ -453,7 +453,7 @@ export const SubAccountsRequest = v.pipe(v.strictObject({
453
453
  * @returns {TokenDetails}
454
454
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-a-token
455
455
  */
456
- export const TokenDetailsRequest = v.pipe(v.strictObject({
456
+ export const TokenDetailsRequest = v.pipe(v.object({
457
457
  /** Type of request. */
458
458
  type: v.pipe(v.literal("tokenDetails"), v.description("Type of request.")),
459
459
  /** Token ID. */
@@ -464,7 +464,7 @@ export const TokenDetailsRequest = v.pipe(v.strictObject({
464
464
  * @returns {TwapHistory[]}
465
465
  * @see null
466
466
  */
467
- export const TwapHistoryRequest = v.pipe(v.strictObject({
467
+ export const TwapHistoryRequest = v.pipe(v.object({
468
468
  /** Type of request. */
469
469
  type: v.pipe(v.literal("twapHistory"), v.description("Type of request.")),
470
470
  /** User address. */
@@ -475,7 +475,7 @@ export const TwapHistoryRequest = v.pipe(v.strictObject({
475
475
  * @returns {UserFees}
476
476
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-fees
477
477
  */
478
- export const UserFeesRequest = v.pipe(v.strictObject({
478
+ export const UserFeesRequest = v.pipe(v.object({
479
479
  /** Type of request. */
480
480
  type: v.pipe(v.literal("userFees"), v.description("Type of request.")),
481
481
  /** User address. */
@@ -486,7 +486,7 @@ export const UserFeesRequest = v.pipe(v.strictObject({
486
486
  * @returns {Fill[]}
487
487
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills
488
488
  */
489
- export const UserFillsRequest = v.pipe(v.strictObject({
489
+ export const UserFillsRequest = v.pipe(v.object({
490
490
  /** Type of request. */
491
491
  type: v.pipe(v.literal("userFills"), v.description("Type of request.")),
492
492
  /** User address. */
@@ -499,15 +499,15 @@ export const UserFillsRequest = v.pipe(v.strictObject({
499
499
  * @returns {Fill[]}
500
500
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-fills-by-time
501
501
  */
502
- export const UserFillsByTimeRequest = v.pipe(v.strictObject({
502
+ export const UserFillsByTimeRequest = v.pipe(v.object({
503
503
  /** Type of request. */
504
504
  type: v.pipe(v.literal("userFillsByTime"), v.description("Type of request.")),
505
505
  /** User address. */
506
506
  user: v.pipe(v.pipe(Hex, v.length(42)), v.description("User address.")),
507
507
  /** Start time (in ms since epoch). */
508
- startTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Start time (in ms since epoch).")),
508
+ startTime: v.pipe(UnsignedInteger, v.description("Start time (in ms since epoch).")),
509
509
  /** End time (in ms since epoch). */
510
- endTime: v.pipe(v.nullish(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("End time (in ms since epoch).")),
510
+ endTime: v.pipe(v.nullish(UnsignedInteger), v.description("End time (in ms since epoch).")),
511
511
  /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */
512
512
  aggregateByTime: v.pipe(v.optional(v.boolean()), v.description("If true, partial fills are aggregated when a crossing order fills multiple resting orders.")),
513
513
  }), v.description("Request user fills by time."));
@@ -516,37 +516,37 @@ export const UserFillsByTimeRequest = v.pipe(v.strictObject({
516
516
  * @returns {UserFundingUpdate[]}
517
517
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-a-users-funding-history-or-non-funding-ledger-updates
518
518
  */
519
- export const UserFundingRequest = v.pipe(v.strictObject({
519
+ export const UserFundingRequest = v.pipe(v.object({
520
520
  /** Type of request. */
521
521
  type: v.pipe(v.literal("userFunding"), v.description("Type of request.")),
522
522
  /** User address. */
523
523
  user: v.pipe(v.pipe(Hex, v.length(42)), v.description("User address.")),
524
524
  /** Start time (in ms since epoch). */
525
- startTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Start time (in ms since epoch).")),
525
+ startTime: v.pipe(UnsignedInteger, v.description("Start time (in ms since epoch).")),
526
526
  /** End time (in ms since epoch). */
527
- endTime: v.pipe(v.nullish(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("End time (in ms since epoch).")),
527
+ endTime: v.pipe(v.nullish(UnsignedInteger), v.description("End time (in ms since epoch).")),
528
528
  }), v.description("Request user funding."));
529
529
  /**
530
530
  * Request user non-funding ledger updates.
531
531
  * @returns {UserNonFundingLedgerUpdate[]}
532
532
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-a-users-funding-history-or-non-funding-ledger-updates
533
533
  */
534
- export const UserNonFundingLedgerUpdatesRequest = v.pipe(v.strictObject({
534
+ export const UserNonFundingLedgerUpdatesRequest = v.pipe(v.object({
535
535
  /** Type of request. */
536
536
  type: v.pipe(v.literal("userNonFundingLedgerUpdates"), v.description("Type of request.")),
537
537
  /** User address. */
538
538
  user: v.pipe(v.pipe(Hex, v.length(42)), v.description("User address.")),
539
539
  /** Start time (in ms since epoch). */
540
- startTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Start time (in ms since epoch).")),
540
+ startTime: v.pipe(UnsignedInteger, v.description("Start time (in ms since epoch).")),
541
541
  /** End time (in ms since epoch). */
542
- endTime: v.pipe(v.nullish(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("End time (in ms since epoch).")),
542
+ endTime: v.pipe(v.nullish(UnsignedInteger), v.description("End time (in ms since epoch).")),
543
543
  }), v.description("Request user non-funding ledger updates."));
544
544
  /**
545
545
  * Request user rate limits.
546
546
  * @returns {UserRateLimit}
547
547
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-user-rate-limits
548
548
  */
549
- export const UserRateLimitRequest = v.pipe(v.strictObject({
549
+ export const UserRateLimitRequest = v.pipe(v.object({
550
550
  /** Type of request. */
551
551
  type: v.pipe(v.literal("userRateLimit"), v.description("Type of request.")),
552
552
  /** User address. */
@@ -557,7 +557,7 @@ export const UserRateLimitRequest = v.pipe(v.strictObject({
557
557
  * @returns {UserRole}
558
558
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#query-a-users-role
559
559
  */
560
- export const UserRoleRequest = v.pipe(v.strictObject({
560
+ export const UserRoleRequest = v.pipe(v.object({
561
561
  /** Type of request. */
562
562
  type: v.pipe(v.literal("userRole"), v.description("Type of request.")),
563
563
  /** User address. */
@@ -568,7 +568,7 @@ export const UserRoleRequest = v.pipe(v.strictObject({
568
568
  * @returns {MultiSigSigners | null}
569
569
  * @see null
570
570
  */
571
- export const UserToMultiSigSignersRequest = v.pipe(v.strictObject({
571
+ export const UserToMultiSigSignersRequest = v.pipe(v.object({
572
572
  /** Type of request. */
573
573
  type: v.pipe(v.literal("userToMultiSigSigners"), v.description("Type of request.")),
574
574
  /** User address. */
@@ -579,7 +579,7 @@ export const UserToMultiSigSignersRequest = v.pipe(v.strictObject({
579
579
  * @returns {TwapSliceFill[]}
580
580
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-twap-slice-fills
581
581
  */
582
- export const UserTwapSliceFillsRequest = v.pipe(v.strictObject({
582
+ export const UserTwapSliceFillsRequest = v.pipe(v.object({
583
583
  /** Type of request. */
584
584
  type: v.pipe(v.literal("userTwapSliceFills"), v.description("Type of request.")),
585
585
  /** User address. */
@@ -590,15 +590,15 @@ export const UserTwapSliceFillsRequest = v.pipe(v.strictObject({
590
590
  * @returns {TwapSliceFill[]}
591
591
  * @see null
592
592
  */
593
- export const UserTwapSliceFillsByTimeRequest = v.pipe(v.strictObject({
593
+ export const UserTwapSliceFillsByTimeRequest = v.pipe(v.object({
594
594
  /** Type of request. */
595
595
  type: v.pipe(v.literal("userTwapSliceFillsByTime"), v.description("Type of request.")),
596
596
  /** User address. */
597
597
  user: v.pipe(v.pipe(Hex, v.length(42)), v.description("User address.")),
598
598
  /** Start time (in ms since epoch). */
599
- startTime: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Start time (in ms since epoch).")),
599
+ startTime: v.pipe(UnsignedInteger, v.description("Start time (in ms since epoch).")),
600
600
  /** End time (in ms since epoch). */
601
- endTime: v.pipe(v.nullish(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("End time (in ms since epoch).")),
601
+ endTime: v.pipe(v.nullish(UnsignedInteger), v.description("End time (in ms since epoch).")),
602
602
  /** If true, partial fills are aggregated when a crossing order fills multiple resting orders. */
603
603
  aggregateByTime: v.pipe(v.optional(v.boolean()), v.description("If true, partial fills are aggregated when a crossing order fills multiple resting orders.")),
604
604
  }), v.description("Request user TWAP slice fills by time."));
@@ -607,7 +607,7 @@ export const UserTwapSliceFillsByTimeRequest = v.pipe(v.strictObject({
607
607
  * @returns {VaultEquity[]}
608
608
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-a-users-vault-deposits
609
609
  */
610
- export const UserVaultEquitiesRequest = v.pipe(v.strictObject({
610
+ export const UserVaultEquitiesRequest = v.pipe(v.object({
611
611
  /** Type of request. */
612
612
  type: v.pipe(v.literal("userVaultEquities"), v.description("Type of request.")),
613
613
  /** User address. */
@@ -618,7 +618,7 @@ export const UserVaultEquitiesRequest = v.pipe(v.strictObject({
618
618
  * @returns {unknown[]} FIXME: Define the return type
619
619
  * @see null
620
620
  */
621
- export const ValidatorL1VotesRequest = v.pipe(v.strictObject({
621
+ export const ValidatorL1VotesRequest = v.pipe(v.object({
622
622
  /** Type of request. */
623
623
  type: v.pipe(v.literal("validatorL1Votes"), v.description("Type of request.")),
624
624
  }), v.description("Request validator L1 votes."));
@@ -627,7 +627,7 @@ export const ValidatorL1VotesRequest = v.pipe(v.strictObject({
627
627
  * @returns {ValidatorSummary[]}
628
628
  * @see null
629
629
  */
630
- export const ValidatorSummariesRequest = v.pipe(v.strictObject({
630
+ export const ValidatorSummariesRequest = v.pipe(v.object({
631
631
  /** Type of request. */
632
632
  type: v.pipe(v.literal("validatorSummaries"), v.description("Type of request.")),
633
633
  }), v.description("Request validator summaries."));
@@ -636,7 +636,7 @@ export const ValidatorSummariesRequest = v.pipe(v.strictObject({
636
636
  * @returns {VaultDetails | null}
637
637
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint#retrieve-details-for-a-vault
638
638
  */
639
- export const VaultDetailsRequest = v.pipe(v.strictObject({
639
+ export const VaultDetailsRequest = v.pipe(v.object({
640
640
  /** Type of request. */
641
641
  type: v.pipe(v.literal("vaultDetails"), v.description("Type of request.")),
642
642
  /** Vault address. */
@@ -649,7 +649,39 @@ export const VaultDetailsRequest = v.pipe(v.strictObject({
649
649
  * @returns {VaultSummary[]}
650
650
  * @see null
651
651
  */
652
- export const VaultSummariesRequest = v.pipe(v.strictObject({
652
+ export const VaultSummariesRequest = v.pipe(v.object({
653
653
  /** Type of request. */
654
654
  type: v.pipe(v.literal("vaultSummaries"), v.description("Type of request.")),
655
655
  }), v.description("Request a list of vaults less than 2 hours old."));
656
+ /**
657
+ * Request gossip root IPs.
658
+ * @returns {GossipRootIps[]}
659
+ * @see null
660
+ */
661
+ export const GossipRootIpsRequest = v.pipe(v.object({
662
+ /** Type of request. */
663
+ type: v.pipe(v.literal("gossipRootIps"), v.description("Type of request.")),
664
+ }), v.description("Request gossip root IPs."));
665
+ /**
666
+ * Request recent trades.
667
+ * @returns {Trade[]}
668
+ * @see null
669
+ */
670
+ export const RecentTradesRequest = v.pipe(v.object({
671
+ /** Type of request. */
672
+ type: v.pipe(v.literal("recentTrades"), v.description("Type of request.")),
673
+ /** Asset symbol (e.g., BTC). */
674
+ coin: v.pipe(v.string(), v.description("Asset symbol (e.g., BTC).")),
675
+ }), v.description("Request recent trades."));
676
+ /**
677
+ * Request builder deployed perpetual market limits.
678
+ * @returns {PerpDexLimits}
679
+ * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-builder-deployed-perp-market-limits
680
+ */
681
+ export const PerpDexLimitsRequest = v.pipe(v.object({
682
+ /** Type of request. */
683
+ type: v.pipe(v.literal("perpDexLimits"), v.description("Type of request.")),
684
+ /** DEX name (empty string for main dex). */
685
+ dex: v.pipe(v.string(), v.description("DEX name (empty string for main dex).")),
686
+ }), v.description("Request perpetual DEX limits."));
687
+ //# sourceMappingURL=requests.js.map