@nktkas/hyperliquid 0.24.3 → 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 (358) hide show
  1. package/README.md +141 -32
  2. package/esm/mod.d.ts +11 -11
  3. package/esm/mod.d.ts.map +1 -1
  4. package/esm/mod.js +2 -1
  5. package/esm/mod.js.map +1 -0
  6. package/esm/src/clients/exchange.d.ts +29 -25
  7. package/esm/src/clients/exchange.d.ts.map +1 -1
  8. package/esm/src/clients/exchange.js +54 -53
  9. package/esm/src/clients/exchange.js.map +1 -0
  10. package/esm/src/clients/info.d.ts +80 -20
  11. package/esm/src/clients/info.d.ts.map +1 -1
  12. package/esm/src/clients/info.js +312 -73
  13. package/esm/src/clients/info.js.map +1 -0
  14. package/esm/src/clients/multiSign.d.ts +11 -7
  15. package/esm/src/clients/multiSign.d.ts.map +1 -1
  16. package/esm/src/clients/multiSign.js +2 -1
  17. package/esm/src/clients/multiSign.js.map +1 -0
  18. package/esm/src/clients/subscription.d.ts +9 -9
  19. package/esm/src/clients/subscription.d.ts.map +1 -1
  20. package/esm/src/clients/subscription.js +29 -27
  21. package/esm/src/clients/subscription.js.map +1 -0
  22. package/esm/src/{base.d.ts → errors.d.ts} +1 -1
  23. package/esm/src/errors.d.ts.map +1 -0
  24. package/esm/src/{base.js → errors.js} +1 -0
  25. package/esm/src/errors.js.map +1 -0
  26. package/esm/src/schemas/_base.d.ts +14 -0
  27. package/esm/src/schemas/_base.d.ts.map +1 -0
  28. package/esm/src/schemas/_base.js +15 -0
  29. package/esm/src/schemas/_base.js.map +1 -0
  30. package/esm/src/schemas/exchange/requests.d.ts +8953 -0
  31. package/esm/src/schemas/exchange/requests.d.ts.map +1 -0
  32. package/esm/src/schemas/exchange/requests.js +1414 -0
  33. package/esm/src/schemas/exchange/requests.js.map +1 -0
  34. package/esm/src/schemas/exchange/responses.d.ts +567 -0
  35. package/esm/src/schemas/exchange/responses.d.ts.map +1 -0
  36. package/esm/src/schemas/exchange/responses.js +244 -0
  37. package/esm/src/schemas/exchange/responses.js.map +1 -0
  38. package/esm/src/schemas/explorer/requests.d.ts +44 -0
  39. package/esm/src/schemas/explorer/requests.d.ts.map +1 -0
  40. package/esm/src/schemas/explorer/requests.js +33 -0
  41. package/esm/src/schemas/explorer/requests.js.map +1 -0
  42. package/esm/src/schemas/explorer/responses.d.ts +360 -0
  43. package/esm/src/schemas/explorer/responses.d.ts.map +1 -0
  44. package/esm/src/schemas/explorer/responses.js +57 -0
  45. package/esm/src/schemas/explorer/responses.js.map +1 -0
  46. package/esm/src/schemas/info/accounts.d.ts +2159 -0
  47. package/esm/src/schemas/info/accounts.d.ts.map +1 -0
  48. package/esm/src/schemas/info/accounts.js +623 -0
  49. package/esm/src/schemas/info/accounts.js.map +1 -0
  50. package/esm/src/schemas/info/assets.d.ts +974 -0
  51. package/esm/src/schemas/info/assets.d.ts.map +1 -0
  52. package/esm/src/schemas/info/assets.js +285 -0
  53. package/esm/src/schemas/info/assets.js.map +1 -0
  54. package/esm/src/schemas/info/markets.d.ts +155 -0
  55. package/esm/src/schemas/info/markets.d.ts.map +1 -0
  56. package/esm/src/schemas/info/markets.js +70 -0
  57. package/esm/src/schemas/info/markets.js.map +1 -0
  58. package/esm/src/schemas/info/orders.d.ts +957 -0
  59. package/esm/src/schemas/info/orders.d.ts.map +1 -0
  60. package/esm/src/schemas/info/orders.js +298 -0
  61. package/esm/src/schemas/info/orders.js.map +1 -0
  62. package/esm/src/schemas/info/requests.d.ts +924 -0
  63. package/esm/src/schemas/info/requests.d.ts.map +1 -0
  64. package/esm/src/schemas/info/requests.js +687 -0
  65. package/esm/src/schemas/info/requests.js.map +1 -0
  66. package/esm/src/schemas/info/validators.d.ts +326 -0
  67. package/esm/src/schemas/info/validators.d.ts.map +1 -0
  68. package/esm/src/schemas/info/validators.js +126 -0
  69. package/esm/src/schemas/info/validators.js.map +1 -0
  70. package/esm/src/schemas/info/vaults.d.ts +447 -0
  71. package/esm/src/schemas/info/vaults.d.ts.map +1 -0
  72. package/esm/src/schemas/info/vaults.js +111 -0
  73. package/esm/src/schemas/info/vaults.js.map +1 -0
  74. package/esm/src/schemas/mod.d.ts +101 -0
  75. package/esm/src/schemas/mod.d.ts.map +1 -0
  76. package/esm/src/schemas/mod.js +115 -0
  77. package/esm/src/schemas/mod.js.map +1 -0
  78. package/esm/src/schemas/subscriptions/requests.d.ts +332 -0
  79. package/esm/src/schemas/subscriptions/requests.d.ts.map +1 -0
  80. package/esm/src/schemas/subscriptions/requests.js +259 -0
  81. package/esm/src/schemas/subscriptions/requests.js.map +1 -0
  82. package/esm/src/schemas/subscriptions/responses.d.ts +3643 -0
  83. package/esm/src/schemas/subscriptions/responses.d.ts.map +1 -0
  84. package/esm/src/schemas/subscriptions/responses.js +234 -0
  85. package/esm/src/schemas/subscriptions/responses.js.map +1 -0
  86. package/esm/src/signing/_signTypedData/ethers.js +1 -0
  87. package/esm/src/signing/_signTypedData/ethers.js.map +1 -0
  88. package/esm/src/signing/_signTypedData/mod.js +1 -0
  89. package/esm/src/signing/_signTypedData/mod.js.map +1 -0
  90. package/esm/src/signing/_signTypedData/private_key.js +1 -0
  91. package/esm/src/signing/_signTypedData/private_key.js.map +1 -0
  92. package/esm/src/signing/_signTypedData/viem.js +1 -0
  93. package/esm/src/signing/_signTypedData/viem.js.map +1 -0
  94. package/esm/src/signing/mod.d.ts +109 -29
  95. package/esm/src/signing/mod.d.ts.map +1 -1
  96. package/esm/src/signing/mod.js +136 -29
  97. package/esm/src/signing/mod.js.map +1 -0
  98. package/esm/src/transports/base.d.ts +4 -4
  99. package/esm/src/transports/base.d.ts.map +1 -1
  100. package/esm/src/transports/base.js +3 -2
  101. package/esm/src/transports/base.js.map +1 -0
  102. package/esm/src/transports/http/http_transport.d.ts +3 -2
  103. package/esm/src/transports/http/http_transport.d.ts.map +1 -1
  104. package/esm/src/transports/http/http_transport.js +1 -0
  105. package/esm/src/transports/http/http_transport.js.map +1 -0
  106. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
  107. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  108. package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  109. package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  110. package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
  111. package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  112. package/esm/src/transports/websocket/_websocket_async_request.js +1 -0
  113. package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -0
  114. package/esm/src/transports/websocket/websocket_transport.d.ts +9 -1
  115. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  116. package/esm/src/transports/websocket/websocket_transport.js +4 -0
  117. package/esm/src/transports/websocket/websocket_transport.js.map +1 -0
  118. package/package.json +6 -5
  119. package/script/mod.d.ts +11 -11
  120. package/script/mod.d.ts.map +1 -1
  121. package/script/mod.js +2 -1
  122. package/script/mod.js.map +1 -0
  123. package/script/src/clients/exchange.d.ts +29 -25
  124. package/script/src/clients/exchange.d.ts.map +1 -1
  125. package/script/src/clients/exchange.js +60 -59
  126. package/script/src/clients/exchange.js.map +1 -0
  127. package/script/src/clients/info.d.ts +80 -20
  128. package/script/src/clients/info.d.ts.map +1 -1
  129. package/script/src/clients/info.js +312 -73
  130. package/script/src/clients/info.js.map +1 -0
  131. package/script/src/clients/multiSign.d.ts +11 -7
  132. package/script/src/clients/multiSign.d.ts.map +1 -1
  133. package/script/src/clients/multiSign.js +2 -1
  134. package/script/src/clients/multiSign.js.map +1 -0
  135. package/script/src/clients/subscription.d.ts +9 -9
  136. package/script/src/clients/subscription.d.ts.map +1 -1
  137. package/script/src/clients/subscription.js +29 -27
  138. package/script/src/clients/subscription.js.map +1 -0
  139. package/script/src/{base.d.ts → errors.d.ts} +1 -1
  140. package/script/src/errors.d.ts.map +1 -0
  141. package/script/src/{base.js → errors.js} +1 -0
  142. package/script/src/errors.js.map +1 -0
  143. package/script/src/schemas/_base.d.ts +14 -0
  144. package/script/src/schemas/_base.d.ts.map +1 -0
  145. package/script/src/schemas/_base.js +51 -0
  146. package/script/src/schemas/_base.js.map +1 -0
  147. package/script/src/schemas/exchange/requests.d.ts +8953 -0
  148. package/script/src/schemas/exchange/requests.d.ts.map +1 -0
  149. package/script/src/schemas/exchange/requests.js +1450 -0
  150. package/script/src/schemas/exchange/requests.js.map +1 -0
  151. package/script/src/schemas/exchange/responses.d.ts +567 -0
  152. package/script/src/schemas/exchange/responses.d.ts.map +1 -0
  153. package/script/src/schemas/exchange/responses.js +280 -0
  154. package/script/src/schemas/exchange/responses.js.map +1 -0
  155. package/script/src/schemas/explorer/requests.d.ts +44 -0
  156. package/script/src/schemas/explorer/requests.d.ts.map +1 -0
  157. package/script/src/schemas/explorer/requests.js +69 -0
  158. package/script/src/schemas/explorer/requests.js.map +1 -0
  159. package/script/src/schemas/explorer/responses.d.ts +360 -0
  160. package/script/src/schemas/explorer/responses.d.ts.map +1 -0
  161. package/script/src/schemas/explorer/responses.js +93 -0
  162. package/script/src/schemas/explorer/responses.js.map +1 -0
  163. package/script/src/schemas/info/accounts.d.ts +2159 -0
  164. package/script/src/schemas/info/accounts.d.ts.map +1 -0
  165. package/script/src/schemas/info/accounts.js +659 -0
  166. package/script/src/schemas/info/accounts.js.map +1 -0
  167. package/script/src/schemas/info/assets.d.ts +974 -0
  168. package/script/src/schemas/info/assets.d.ts.map +1 -0
  169. package/script/src/schemas/info/assets.js +321 -0
  170. package/script/src/schemas/info/assets.js.map +1 -0
  171. package/script/src/schemas/info/markets.d.ts +155 -0
  172. package/script/src/schemas/info/markets.d.ts.map +1 -0
  173. package/script/src/schemas/info/markets.js +106 -0
  174. package/script/src/schemas/info/markets.js.map +1 -0
  175. package/script/src/schemas/info/orders.d.ts +957 -0
  176. package/script/src/schemas/info/orders.d.ts.map +1 -0
  177. package/script/src/schemas/info/orders.js +334 -0
  178. package/script/src/schemas/info/orders.js.map +1 -0
  179. package/script/src/schemas/info/requests.d.ts +924 -0
  180. package/script/src/schemas/info/requests.d.ts.map +1 -0
  181. package/script/src/schemas/info/requests.js +724 -0
  182. package/script/src/schemas/info/requests.js.map +1 -0
  183. package/script/src/schemas/info/validators.d.ts +326 -0
  184. package/script/src/schemas/info/validators.d.ts.map +1 -0
  185. package/script/src/schemas/info/validators.js +162 -0
  186. package/script/src/schemas/info/validators.js.map +1 -0
  187. package/script/src/schemas/info/vaults.d.ts +447 -0
  188. package/script/src/schemas/info/vaults.d.ts.map +1 -0
  189. package/script/src/schemas/info/vaults.js +147 -0
  190. package/script/src/schemas/info/vaults.js.map +1 -0
  191. package/script/src/schemas/mod.d.ts +101 -0
  192. package/script/src/schemas/mod.d.ts.map +1 -0
  193. package/script/src/schemas/mod.js +157 -0
  194. package/script/src/schemas/mod.js.map +1 -0
  195. package/script/src/schemas/subscriptions/requests.d.ts +332 -0
  196. package/script/src/schemas/subscriptions/requests.d.ts.map +1 -0
  197. package/script/src/schemas/subscriptions/requests.js +295 -0
  198. package/script/src/schemas/subscriptions/requests.js.map +1 -0
  199. package/script/src/schemas/subscriptions/responses.d.ts +3643 -0
  200. package/script/src/schemas/subscriptions/responses.d.ts.map +1 -0
  201. package/script/src/schemas/subscriptions/responses.js +270 -0
  202. package/script/src/schemas/subscriptions/responses.js.map +1 -0
  203. package/script/src/signing/_signTypedData/ethers.js +1 -0
  204. package/script/src/signing/_signTypedData/ethers.js.map +1 -0
  205. package/script/src/signing/_signTypedData/mod.js +1 -0
  206. package/script/src/signing/_signTypedData/mod.js.map +1 -0
  207. package/script/src/signing/_signTypedData/private_key.js +1 -0
  208. package/script/src/signing/_signTypedData/private_key.js.map +1 -0
  209. package/script/src/signing/_signTypedData/viem.js +1 -0
  210. package/script/src/signing/_signTypedData/viem.js.map +1 -0
  211. package/script/src/signing/mod.d.ts +109 -29
  212. package/script/src/signing/mod.d.ts.map +1 -1
  213. package/script/src/signing/mod.js +138 -33
  214. package/script/src/signing/mod.js.map +1 -0
  215. package/script/src/transports/base.d.ts +4 -4
  216. package/script/src/transports/base.d.ts.map +1 -1
  217. package/script/src/transports/base.js +4 -3
  218. package/script/src/transports/base.js.map +1 -0
  219. package/script/src/transports/http/http_transport.d.ts +3 -2
  220. package/script/src/transports/http/http_transport.d.ts.map +1 -1
  221. package/script/src/transports/http/http_transport.js +1 -0
  222. package/script/src/transports/http/http_transport.js.map +1 -0
  223. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
  224. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  225. package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  226. package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  227. package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
  228. package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  229. package/script/src/transports/websocket/_websocket_async_request.js +1 -0
  230. package/script/src/transports/websocket/_websocket_async_request.js.map +1 -0
  231. package/script/src/transports/websocket/websocket_transport.d.ts +9 -1
  232. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  233. package/script/src/transports/websocket/websocket_transport.js +4 -0
  234. package/script/src/transports/websocket/websocket_transport.js.map +1 -0
  235. package/src/mod.ts +28 -0
  236. package/src/src/clients/exchange.ts +2246 -0
  237. package/src/src/clients/info.ts +2076 -0
  238. package/src/src/clients/multiSign.ts +183 -0
  239. package/src/src/clients/subscription.ts +841 -0
  240. package/src/src/errors.ts +7 -0
  241. package/src/src/schemas/_base.ts +43 -0
  242. package/src/src/schemas/exchange/requests.ts +3057 -0
  243. package/src/src/schemas/exchange/responses.ts +540 -0
  244. package/src/src/schemas/explorer/requests.ts +65 -0
  245. package/src/src/schemas/explorer/responses.ts +138 -0
  246. package/src/src/schemas/info/accounts.ts +1490 -0
  247. package/src/src/schemas/info/assets.ts +693 -0
  248. package/src/src/schemas/info/markets.ts +171 -0
  249. package/src/src/schemas/info/orders.ts +597 -0
  250. package/src/src/schemas/info/requests.ts +1369 -0
  251. package/src/src/schemas/info/validators.ts +299 -0
  252. package/src/src/schemas/info/vaults.ts +262 -0
  253. package/src/src/schemas/mod.ts +121 -0
  254. package/src/src/schemas/subscriptions/requests.ts +504 -0
  255. package/src/src/schemas/subscriptions/responses.ts +576 -0
  256. package/src/src/signing/_signTypedData/ethers.ts +59 -0
  257. package/src/src/signing/_signTypedData/mod.ts +121 -0
  258. package/src/src/signing/_signTypedData/private_key.ts +229 -0
  259. package/src/src/signing/_signTypedData/viem.ts +55 -0
  260. package/src/src/signing/mod.ts +572 -0
  261. package/src/src/transports/base.ts +54 -0
  262. package/src/src/transports/http/http_transport.ts +208 -0
  263. package/src/src/transports/websocket/_hyperliquid_event_target.ts +118 -0
  264. package/src/src/transports/websocket/_reconnecting_websocket.ts +404 -0
  265. package/src/src/transports/websocket/_websocket_async_request.ts +229 -0
  266. package/src/src/transports/websocket/websocket_transport.ts +394 -0
  267. package/esm/src/base.d.ts.map +0 -1
  268. package/esm/src/signing/_sorter.d.ts +0 -127
  269. package/esm/src/signing/_sorter.d.ts.map +0 -1
  270. package/esm/src/signing/_sorter.js +0 -693
  271. package/esm/src/types/exchange/requests.d.ts +0 -1345
  272. package/esm/src/types/exchange/requests.d.ts.map +0 -1
  273. package/esm/src/types/exchange/requests.js +0 -1
  274. package/esm/src/types/exchange/responses.d.ts +0 -233
  275. package/esm/src/types/exchange/responses.d.ts.map +0 -1
  276. package/esm/src/types/exchange/responses.js +0 -1
  277. package/esm/src/types/explorer/requests.d.ts +0 -32
  278. package/esm/src/types/explorer/requests.d.ts.map +0 -1
  279. package/esm/src/types/explorer/requests.js +0 -1
  280. package/esm/src/types/explorer/responses.d.ts +0 -58
  281. package/esm/src/types/explorer/responses.d.ts.map +0 -1
  282. package/esm/src/types/explorer/responses.js +0 -1
  283. package/esm/src/types/info/accounts.d.ts +0 -864
  284. package/esm/src/types/info/accounts.d.ts.map +0 -1
  285. package/esm/src/types/info/accounts.js +0 -1
  286. package/esm/src/types/info/assets.d.ts +0 -354
  287. package/esm/src/types/info/assets.d.ts.map +0 -1
  288. package/esm/src/types/info/assets.js +0 -1
  289. package/esm/src/types/info/markets.d.ts +0 -79
  290. package/esm/src/types/info/markets.d.ts.map +0 -1
  291. package/esm/src/types/info/markets.js +0 -1
  292. package/esm/src/types/info/orders.d.ts +0 -266
  293. package/esm/src/types/info/orders.d.ts.map +0 -1
  294. package/esm/src/types/info/orders.js +0 -1
  295. package/esm/src/types/info/requests.d.ts +0 -640
  296. package/esm/src/types/info/requests.d.ts.map +0 -1
  297. package/esm/src/types/info/requests.js +0 -1
  298. package/esm/src/types/info/validators.d.ts +0 -147
  299. package/esm/src/types/info/validators.d.ts.map +0 -1
  300. package/esm/src/types/info/validators.js +0 -1
  301. package/esm/src/types/info/vaults.d.ts +0 -119
  302. package/esm/src/types/info/vaults.d.ts.map +0 -1
  303. package/esm/src/types/info/vaults.js +0 -1
  304. package/esm/src/types/mod.d.ts +0 -38
  305. package/esm/src/types/mod.d.ts.map +0 -1
  306. package/esm/src/types/mod.js +0 -24
  307. package/esm/src/types/subscriptions/requests.d.ts +0 -154
  308. package/esm/src/types/subscriptions/requests.d.ts.map +0 -1
  309. package/esm/src/types/subscriptions/requests.js +0 -1
  310. package/esm/src/types/subscriptions/responses.d.ts +0 -238
  311. package/esm/src/types/subscriptions/responses.d.ts.map +0 -1
  312. package/esm/src/types/subscriptions/responses.js +0 -1
  313. package/script/src/base.d.ts.map +0 -1
  314. package/script/src/signing/_sorter.d.ts +0 -127
  315. package/script/src/signing/_sorter.d.ts.map +0 -1
  316. package/script/src/signing/_sorter.js +0 -696
  317. package/script/src/types/exchange/requests.d.ts +0 -1345
  318. package/script/src/types/exchange/requests.d.ts.map +0 -1
  319. package/script/src/types/exchange/requests.js +0 -2
  320. package/script/src/types/exchange/responses.d.ts +0 -233
  321. package/script/src/types/exchange/responses.d.ts.map +0 -1
  322. package/script/src/types/exchange/responses.js +0 -2
  323. package/script/src/types/explorer/requests.d.ts +0 -32
  324. package/script/src/types/explorer/requests.d.ts.map +0 -1
  325. package/script/src/types/explorer/requests.js +0 -2
  326. package/script/src/types/explorer/responses.d.ts +0 -58
  327. package/script/src/types/explorer/responses.d.ts.map +0 -1
  328. package/script/src/types/explorer/responses.js +0 -2
  329. package/script/src/types/info/accounts.d.ts +0 -864
  330. package/script/src/types/info/accounts.d.ts.map +0 -1
  331. package/script/src/types/info/accounts.js +0 -2
  332. package/script/src/types/info/assets.d.ts +0 -354
  333. package/script/src/types/info/assets.d.ts.map +0 -1
  334. package/script/src/types/info/assets.js +0 -2
  335. package/script/src/types/info/markets.d.ts +0 -79
  336. package/script/src/types/info/markets.d.ts.map +0 -1
  337. package/script/src/types/info/markets.js +0 -2
  338. package/script/src/types/info/orders.d.ts +0 -266
  339. package/script/src/types/info/orders.d.ts.map +0 -1
  340. package/script/src/types/info/orders.js +0 -2
  341. package/script/src/types/info/requests.d.ts +0 -640
  342. package/script/src/types/info/requests.d.ts.map +0 -1
  343. package/script/src/types/info/requests.js +0 -2
  344. package/script/src/types/info/validators.d.ts +0 -147
  345. package/script/src/types/info/validators.d.ts.map +0 -1
  346. package/script/src/types/info/validators.js +0 -2
  347. package/script/src/types/info/vaults.d.ts +0 -119
  348. package/script/src/types/info/vaults.d.ts.map +0 -1
  349. package/script/src/types/info/vaults.js +0 -2
  350. package/script/src/types/mod.d.ts +0 -38
  351. package/script/src/types/mod.d.ts.map +0 -1
  352. package/script/src/types/mod.js +0 -25
  353. package/script/src/types/subscriptions/requests.d.ts +0 -154
  354. package/script/src/types/subscriptions/requests.d.ts.map +0 -1
  355. package/script/src/types/subscriptions/requests.js +0 -2
  356. package/script/src/types/subscriptions/responses.d.ts +0 -238
  357. package/script/src/types/subscriptions/responses.d.ts.map +0 -1
  358. package/script/src/types/subscriptions/responses.js +0 -2
@@ -0,0 +1,299 @@
1
+ import * as v from "valibot";
2
+ import { Hex, Integer, UnsignedDecimal, UnsignedInteger } from "../_base.js";
3
+
4
+ /** User delegation to a validator. */
5
+ export const Delegation = v.pipe(
6
+ v.object({
7
+ /** Validator address. */
8
+ validator: v.pipe(
9
+ v.pipe(Hex, v.length(42)),
10
+ v.description("Validator address."),
11
+ ),
12
+ /** Amount of tokens delegated to the validator. */
13
+ amount: v.pipe(
14
+ UnsignedDecimal,
15
+ v.description("Amount of tokens delegated to the validator."),
16
+ ),
17
+ /** Locked until timestamp (in ms since epoch). */
18
+ lockedUntilTimestamp: v.pipe(
19
+ UnsignedInteger,
20
+ v.description("Locked until timestamp (in ms since epoch)."),
21
+ ),
22
+ }),
23
+ v.description("User delegation to a validator."),
24
+ );
25
+ export type Delegation = v.InferOutput<typeof Delegation>;
26
+
27
+ /** Reward received from staking activities. */
28
+ export const DelegatorReward = v.pipe(
29
+ v.object({
30
+ /** Timestamp when the reward was received (in ms since epoch). */
31
+ time: v.pipe(
32
+ UnsignedInteger,
33
+ v.description("Timestamp when the reward was received (in ms since epoch)."),
34
+ ),
35
+ /** Source of the reward. */
36
+ source: v.pipe(
37
+ v.union([v.literal("delegation"), v.literal("commission")]),
38
+ v.description("Source of the reward."),
39
+ ),
40
+ /** Total reward amount. */
41
+ totalAmount: v.pipe(
42
+ UnsignedDecimal,
43
+ v.description("Total reward amount."),
44
+ ),
45
+ }),
46
+ v.description("Reward received from staking activities."),
47
+ );
48
+ export type DelegatorReward = v.InferOutput<typeof DelegatorReward>;
49
+
50
+ /** Summary of a user staking delegations. */
51
+ export const DelegatorSummary = v.pipe(
52
+ v.object({
53
+ /** Total amount of delegated tokens. */
54
+ delegated: v.pipe(
55
+ UnsignedDecimal,
56
+ v.description("Total amount of delegated tokens."),
57
+ ),
58
+ /** Total amount of undelegated tokens. */
59
+ undelegated: v.pipe(
60
+ UnsignedDecimal,
61
+ v.description("Total amount of undelegated tokens."),
62
+ ),
63
+ /** Total amount of tokens pending withdrawal. */
64
+ totalPendingWithdrawal: v.pipe(
65
+ UnsignedDecimal,
66
+ v.description("Total amount of tokens pending withdrawal."),
67
+ ),
68
+ /** Number of pending withdrawals. */
69
+ nPendingWithdrawals: v.pipe(
70
+ UnsignedInteger,
71
+ v.description("Number of pending withdrawals."),
72
+ ),
73
+ }),
74
+ v.description("Summary of a user staking delegations."),
75
+ );
76
+ export type DelegatorSummary = v.InferOutput<typeof DelegatorSummary>;
77
+
78
+ /** Delegation operation in a delegator update. */
79
+ export const DelegatorUpdateDelegate = v.pipe(
80
+ v.object({
81
+ /** Delegation operation details. */
82
+ delegate: v.pipe(
83
+ v.object({
84
+ /** Address of the validator receiving or losing delegation. */
85
+ validator: v.pipe(
86
+ v.pipe(Hex, v.length(42)),
87
+ v.description("Address of the validator receiving or losing delegation."),
88
+ ),
89
+ /** Amount of tokens being delegated or undelegated. */
90
+ amount: v.pipe(
91
+ UnsignedDecimal,
92
+ v.description("Amount of tokens being delegated or undelegated."),
93
+ ),
94
+ /** Whether this is an undelegation operation. */
95
+ isUndelegate: v.pipe(
96
+ v.boolean(),
97
+ v.description("Whether this is an undelegation operation."),
98
+ ),
99
+ }),
100
+ v.description("Delegation operation details."),
101
+ ),
102
+ }),
103
+ v.description("Delegation operation in a delegator update."),
104
+ );
105
+ export type DelegatorUpdateDelegate = v.InferOutput<typeof DelegatorUpdateDelegate>;
106
+
107
+ /** Deposit operation in a delegator update. */
108
+ export const DelegatorUpdateDeposit = v.pipe(
109
+ v.object({
110
+ /** Deposit details. */
111
+ cDeposit: v.pipe(
112
+ v.object({
113
+ /** Amount of tokens being deposited. */
114
+ amount: v.pipe(
115
+ UnsignedDecimal,
116
+ v.description("Amount of tokens being deposited."),
117
+ ),
118
+ }),
119
+ v.description("Deposit details."),
120
+ ),
121
+ }),
122
+ v.description("Deposit operation in a delegator update."),
123
+ );
124
+ export type DelegatorUpdateDeposit = v.InferOutput<typeof DelegatorUpdateDeposit>;
125
+
126
+ /** Withdrawal operation in a delegator update. */
127
+ export const DelegatorUpdateWithdrawal = v.pipe(
128
+ v.object({
129
+ /** Withdrawal details. */
130
+ withdrawal: v.pipe(
131
+ v.object({
132
+ /** Amount of tokens being withdrawn. */
133
+ amount: v.pipe(
134
+ UnsignedDecimal,
135
+ v.description("Amount of tokens being withdrawn."),
136
+ ),
137
+ /** Phase of the withdrawal process. */
138
+ phase: v.pipe(
139
+ v.union([v.literal("initiated"), v.literal("finalized")]),
140
+ v.description("Phase of the withdrawal process."),
141
+ ),
142
+ }),
143
+ v.description("Withdrawal details."),
144
+ ),
145
+ }),
146
+ v.description("Withdrawal operation in a delegator update."),
147
+ );
148
+ export type DelegatorUpdateWithdrawal = v.InferOutput<typeof DelegatorUpdateWithdrawal>;
149
+
150
+ /** Record of a staking event by a delegator. */
151
+ export const DelegatorUpdate = v.pipe(
152
+ v.object({
153
+ /** Timestamp of the delegation event (in ms since epoch). */
154
+ time: v.pipe(
155
+ UnsignedInteger,
156
+ v.description("Timestamp of the delegation event (in ms since epoch)."),
157
+ ),
158
+ /** Transaction hash of the delegation event. */
159
+ hash: v.pipe(
160
+ v.pipe(Hex, v.length(66)),
161
+ v.description("Transaction hash of the delegation event."),
162
+ ),
163
+ /** Details of the update. */
164
+ delta: v.pipe(
165
+ v.union([
166
+ DelegatorUpdateDelegate,
167
+ DelegatorUpdateDeposit,
168
+ DelegatorUpdateWithdrawal,
169
+ ]),
170
+ v.description("Details of the update."),
171
+ ),
172
+ }),
173
+ v.description("Record of a staking event by a delegator."),
174
+ );
175
+ export type DelegatorUpdate = v.InferOutput<typeof DelegatorUpdate>;
176
+
177
+ /** Statistics for validator performance over a time period. */
178
+ export const ValidatorStats = v.pipe(
179
+ v.object({
180
+ /** Fraction of time the validator was online. */
181
+ uptimeFraction: v.pipe(
182
+ v.string(),
183
+ v.description("Fraction of time the validator was online."),
184
+ ),
185
+ /** Predicted annual percentage rate of returns. */
186
+ predictedApr: v.pipe(
187
+ UnsignedDecimal,
188
+ v.description("Predicted annual percentage rate of returns."),
189
+ ),
190
+ /** Number of samples used for statistics calculation. */
191
+ nSamples: v.pipe(
192
+ UnsignedInteger,
193
+ v.description("Number of samples used for statistics calculation."),
194
+ ),
195
+ }),
196
+ v.description("Statistics for validator performance over a time period."),
197
+ );
198
+ export type ValidatorStats = v.InferOutput<typeof ValidatorStats>;
199
+
200
+ /** Summary of a validator status and performance. */
201
+ export const ValidatorSummary = v.pipe(
202
+ v.object({
203
+ /** Address of the validator. */
204
+ validator: v.pipe(
205
+ v.pipe(Hex, v.length(42)),
206
+ v.description("Address of the validator."),
207
+ ),
208
+ /** Address of the validator signer. */
209
+ signer: v.pipe(
210
+ v.pipe(Hex, v.length(42)),
211
+ v.description("Address of the validator signer."),
212
+ ),
213
+ /** Name of the validator. */
214
+ name: v.pipe(
215
+ v.string(),
216
+ v.description("Name of the validator."),
217
+ ),
218
+ /** Description of the validator. */
219
+ description: v.pipe(
220
+ v.string(),
221
+ v.description("Description of the validator."),
222
+ ),
223
+ /** Number of blocks produced recently. */
224
+ nRecentBlocks: v.pipe(
225
+ UnsignedInteger,
226
+ v.description("Number of blocks produced recently."),
227
+ ),
228
+ /** Total amount of tokens staked **(unsafe integer)**. */
229
+ stake: v.pipe(
230
+ v.pipe(v.number(), v.integer()),
231
+ v.description("Total amount of tokens staked **(unsafe integer)**."),
232
+ ),
233
+ /** Whether the validator is currently jailed. */
234
+ isJailed: v.pipe(
235
+ v.boolean(),
236
+ v.description("Whether the validator is currently jailed."),
237
+ ),
238
+ /** Timestamp when the validator can be unjailed (in ms since epoch). */
239
+ unjailableAfter: v.pipe(
240
+ v.union([UnsignedInteger, v.null()]),
241
+ v.description("Timestamp when the validator can be unjailed (in ms since epoch)."),
242
+ ),
243
+ /** Whether the validator is currently active. */
244
+ isActive: v.pipe(
245
+ v.boolean(),
246
+ v.description("Whether the validator is currently active."),
247
+ ),
248
+ /** Commission rate charged by the validator. */
249
+ commission: v.pipe(
250
+ UnsignedDecimal,
251
+ v.description("Commission rate charged by the validator."),
252
+ ),
253
+ /** Performance statistics over different time periods. */
254
+ stats: v.pipe(
255
+ v.tuple([
256
+ v.tuple([v.literal("day"), ValidatorStats]),
257
+ v.tuple([v.literal("week"), ValidatorStats]),
258
+ v.tuple([v.literal("month"), ValidatorStats]),
259
+ ]),
260
+ v.description("Performance statistics over different time periods."),
261
+ ),
262
+ }),
263
+ v.description("Summary of a validator status and performance."),
264
+ );
265
+ export type ValidatorSummary = v.InferOutput<typeof ValidatorSummary>;
266
+
267
+ /** L1 governance vote cast by a validator. */
268
+ export const ValidatorL1Vote = v.pipe(
269
+ v.array(
270
+ v.object({
271
+ /** Timestamp when the vote expires (in ms since epoch). */
272
+ expireTime: v.pipe(
273
+ v.pipe(Integer),
274
+ v.description("Timestamp when the vote expires (in ms since epoch)."),
275
+ ),
276
+ /** Vote decision or action identifier. */
277
+ action: v.object({
278
+ D: v.pipe(
279
+ v.string(),
280
+ v.description("Vote decision or action identifier."),
281
+ ),
282
+ }),
283
+ /** List of validator addresses that cast this vote. */
284
+ votes: v.pipe(
285
+ v.array(v.pipe(Hex, v.length(42))),
286
+ v.description("List of validator addresses that cast this vote."),
287
+ ),
288
+ }),
289
+ ),
290
+ v.description("L1 governance vote cast by a validator."),
291
+ );
292
+ export type ValidatorL1Vote = v.InferOutput<typeof ValidatorL1Vote>;
293
+
294
+ /** List of gossip root IPs. */
295
+ export const GossipRootIps = v.pipe(
296
+ v.array(v.pipe(v.string(), v.ipv4())),
297
+ v.description("List of gossip root IPs."),
298
+ );
299
+ export type GossipRootIps = v.InferOutput<typeof GossipRootIps>;
@@ -0,0 +1,262 @@
1
+ import * as v from "valibot";
2
+ import { Decimal, Hex, UnsignedDecimal, UnsignedInteger } from "../_base.js";
3
+ import { PortfolioPeriods } from "./accounts.js";
4
+
5
+ /** Vault relationship configuration. */
6
+ export const VaultRelationship = v.pipe(
7
+ v.union([
8
+ v.object({
9
+ /** Relationship type. */
10
+ type: v.pipe(
11
+ v.union([v.literal("normal"), v.literal("child")]),
12
+ v.description("Relationship type."),
13
+ ),
14
+ }),
15
+ v.object({
16
+ /** Relationship type. */
17
+ type: v.pipe(
18
+ v.literal("parent"),
19
+ v.description("Relationship type."),
20
+ ),
21
+ /** Child vault information. */
22
+ data: v.pipe(
23
+ v.object({
24
+ /** Child vault addresses. */
25
+ childAddresses: v.pipe(
26
+ v.array(v.pipe(Hex, v.length(42))),
27
+ v.description("Child vault addresses."),
28
+ ),
29
+ }),
30
+ v.description("Child vault information."),
31
+ ),
32
+ }),
33
+ ]),
34
+ v.description("Vault relationship configuration."),
35
+ );
36
+ export type VaultRelationship = v.InferOutput<typeof VaultRelationship>;
37
+
38
+ /** Vault follower state. */
39
+ export const VaultFollowerState = v.pipe(
40
+ v.object({
41
+ /** Follower address. */
42
+ user: v.pipe(
43
+ v.pipe(Hex, v.length(42)),
44
+ v.description("Follower address."),
45
+ ),
46
+ /** Follower vault equity. */
47
+ vaultEquity: v.pipe(
48
+ UnsignedDecimal,
49
+ v.description("Follower vault equity."),
50
+ ),
51
+ /** Current profit and loss. */
52
+ pnl: v.pipe(
53
+ Decimal,
54
+ v.description("Current profit and loss."),
55
+ ),
56
+ /** All-time profit and loss. */
57
+ allTimePnl: v.pipe(
58
+ Decimal,
59
+ v.description("All-time profit and loss."),
60
+ ),
61
+ /** Subscription duration in days. */
62
+ daysFollowing: v.pipe(
63
+ UnsignedInteger,
64
+ v.description("Subscription duration in days."),
65
+ ),
66
+ /** Vault entry timestamp. */
67
+ vaultEntryTime: v.pipe(
68
+ UnsignedInteger,
69
+ v.description("Vault entry timestamp."),
70
+ ),
71
+ /** Timestamp when funds become unlocked. */
72
+ lockupUntil: v.pipe(
73
+ UnsignedInteger,
74
+ v.description("Timestamp when funds become unlocked."),
75
+ ),
76
+ }),
77
+ v.description("Vault follower state."),
78
+ );
79
+ export type VaultFollowerState = v.InferOutput<typeof VaultFollowerState>;
80
+
81
+ /** Details about a vault. */
82
+ export const VaultDetails = v.pipe(
83
+ v.object({
84
+ /** Vault name. */
85
+ name: v.pipe(
86
+ v.string(),
87
+ v.description("Vault name."),
88
+ ),
89
+ /** Vault address. */
90
+ vaultAddress: v.pipe(
91
+ v.pipe(Hex, v.length(42)),
92
+ v.description("Vault address."),
93
+ ),
94
+ /** Leader address. */
95
+ leader: v.pipe(
96
+ v.pipe(Hex, v.length(42)),
97
+ v.description("Leader address."),
98
+ ),
99
+ /** Vault description. */
100
+ description: v.pipe(
101
+ v.string(),
102
+ v.description("Vault description."),
103
+ ),
104
+ /** Vault portfolio metrics grouped by time periods. */
105
+ portfolio: v.pipe(
106
+ PortfolioPeriods,
107
+ v.description("Vault portfolio metrics grouped by time periods."),
108
+ ),
109
+ /** Annual percentage rate. */
110
+ apr: v.pipe(
111
+ v.number(),
112
+ v.description("Annual percentage rate."),
113
+ ),
114
+ /** Current user follower state */
115
+ followerState: v.pipe(
116
+ v.nullable(VaultFollowerState),
117
+ v.description("Current user follower state"),
118
+ ),
119
+ /** Ownership percentage held by leader. */
120
+ leaderFraction: v.pipe(
121
+ v.number(),
122
+ v.description("Ownership percentage held by leader."),
123
+ ),
124
+ /** Leader commission percentage. */
125
+ leaderCommission: v.pipe(
126
+ v.number(),
127
+ v.description("Leader commission percentage."),
128
+ ),
129
+ /** Vault followers list. */
130
+ followers: v.pipe(
131
+ v.array(
132
+ v.object({
133
+ ...v.omit(v.object(VaultFollowerState.entries), ["user"]).entries,
134
+ ...v.object({
135
+ /** Follower address or Leader. */
136
+ user: v.pipe(
137
+ v.union([v.pipe(Hex, v.length(42)), v.literal("Leader")]),
138
+ v.description("Follower address or Leader."),
139
+ ),
140
+ }).entries,
141
+ }),
142
+ ),
143
+ v.description("Vault followers list."),
144
+ ),
145
+ /** Maximum distributable amount. */
146
+ maxDistributable: v.pipe(
147
+ v.number(),
148
+ v.description("Maximum distributable amount."),
149
+ ),
150
+ /** Maximum withdrawable amount. */
151
+ maxWithdrawable: v.pipe(
152
+ v.number(),
153
+ v.description("Maximum withdrawable amount."),
154
+ ),
155
+ /** Vault closure status. */
156
+ isClosed: v.pipe(
157
+ v.boolean(),
158
+ v.description("Vault closure status."),
159
+ ),
160
+ /** Vault relationship type. */
161
+ relationship: v.pipe(
162
+ VaultRelationship,
163
+ v.description("Vault relationship type."),
164
+ ),
165
+ /** Deposit permission status. */
166
+ allowDeposits: v.pipe(
167
+ v.boolean(),
168
+ v.description("Deposit permission status."),
169
+ ),
170
+ /** Position closure policy on withdrawal. */
171
+ alwaysCloseOnWithdraw: v.pipe(
172
+ v.boolean(),
173
+ v.description("Position closure policy on withdrawal."),
174
+ ),
175
+ }),
176
+ v.description("Details about a vault."),
177
+ );
178
+ export type VaultDetails = v.InferOutput<typeof VaultDetails>;
179
+
180
+ /** User vault equity details. */
181
+ export const VaultEquity = v.pipe(
182
+ v.object({
183
+ /** Vault address. */
184
+ vaultAddress: v.pipe(
185
+ v.pipe(Hex, v.length(42)),
186
+ v.description("Vault address."),
187
+ ),
188
+ /** User deposited equity. */
189
+ equity: v.pipe(
190
+ UnsignedDecimal,
191
+ v.description("User deposited equity."),
192
+ ),
193
+ /** Timestamp when the user can withdraw their equity. */
194
+ lockedUntilTimestamp: v.pipe(
195
+ UnsignedInteger,
196
+ v.description("Timestamp when the user can withdraw their equity."),
197
+ ),
198
+ }),
199
+ v.description("User vault equity details."),
200
+ );
201
+ export type VaultEquity = v.InferOutput<typeof VaultEquity>;
202
+
203
+ /** Summary of a vault. */
204
+ export const VaultSummary = v.pipe(
205
+ v.object({
206
+ /** Vault name. */
207
+ name: v.pipe(
208
+ v.string(),
209
+ v.description("Vault name."),
210
+ ),
211
+ /** Vault address. */
212
+ vaultAddress: v.pipe(
213
+ v.pipe(Hex, v.length(42)),
214
+ v.description("Vault address."),
215
+ ),
216
+ /** Leader address. */
217
+ leader: v.pipe(
218
+ v.pipe(Hex, v.length(42)),
219
+ v.description("Leader address."),
220
+ ),
221
+ /** Total value locked. */
222
+ tvl: v.pipe(
223
+ UnsignedDecimal,
224
+ v.description("Total value locked."),
225
+ ),
226
+ /** Vault closure status. */
227
+ isClosed: v.pipe(
228
+ v.boolean(),
229
+ v.description("Vault closure status."),
230
+ ),
231
+ /** Vault relationship type. */
232
+ relationship: v.pipe(
233
+ VaultRelationship,
234
+ v.description("Vault relationship type."),
235
+ ),
236
+ /** Creation timestamp. */
237
+ createTimeMillis: v.pipe(
238
+ UnsignedInteger,
239
+ v.description("Creation timestamp."),
240
+ ),
241
+ }),
242
+ v.description("Summary of a vault."),
243
+ );
244
+ export type VaultSummary = v.InferOutput<typeof VaultSummary>;
245
+
246
+ /** Vault that a user is leading. */
247
+ export const VaultLeading = v.pipe(
248
+ v.object({
249
+ /** Vault address. */
250
+ address: v.pipe(
251
+ v.pipe(Hex, v.length(42)),
252
+ v.description("Vault address."),
253
+ ),
254
+ /** Vault name. */
255
+ name: v.pipe(
256
+ v.string(),
257
+ v.description("Vault name."),
258
+ ),
259
+ }),
260
+ v.description("Vault that a user is leading."),
261
+ );
262
+ export type VaultLeading = v.InferOutput<typeof VaultLeading>;
@@ -0,0 +1,121 @@
1
+ /**
2
+ * This module provides valibot schemas for validating, formatting, and inferring types for data used in the Hyperliquid API.
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * import { OrderRequest, parser } from "@nktkas/hyperliquid/schemas";
7
+ * // ^^^^^^^^^^^^
8
+ * // both a Valibot schema and a TypeScript type
9
+ *
10
+ * const action = {
11
+ * type: "order",
12
+ * orders: [{
13
+ * a: 0,
14
+ * b: true,
15
+ * p: "50000",
16
+ * s: "0.1",
17
+ * r: false,
18
+ * t: { limit: { tif: "Gtc" } },
19
+ * }],
20
+ * grouping: "na",
21
+ * } satisfies OrderRequest["action"]; // can be used as type
22
+ *
23
+ * // or as valibot schema
24
+ * // ⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄
25
+ * const validatedAction = parser(OrderRequest.entries.action)(action);
26
+ * // ^^^^^^
27
+ * // validates, formats, sorts object keys for correct signature generation
28
+ * // and returns typed data
29
+ * ```
30
+ *
31
+ * Also valibot schema can be converted to JSON Schema:
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * import { OrderRequest } from "@nktkas/hyperliquid/schemas";
36
+ * import { toJsonSchema } from "npm:@valibot/to-json-schema";
37
+ *
38
+ * const schema = toJsonSchema(OrderRequest, { errorMode: "ignore" });
39
+ *
40
+ * console.log(JSON.stringify(schema, null, 2));
41
+ * // {
42
+ * // "$schema": "http://json-schema.org/draft-07/schema#",
43
+ * // "type": "object",
44
+ * // "properties": {
45
+ * // "action": {
46
+ * // "type": "object",
47
+ * // "properties": {
48
+ * // "type": { "const": "order" },
49
+ * // "orders": { "type": "array", "items": {...} },
50
+ * // "grouping": { "anyOf": [...] },
51
+ * // "builder": { "type": "object", ... }
52
+ * // },
53
+ * // "required": ["type", "orders", "grouping"]
54
+ * // },
55
+ * // "nonce": { "type": "number" },
56
+ * // "signature": {
57
+ * // "type": "object",
58
+ * // "properties": {
59
+ * // "r": { "type": "string", ... },
60
+ * // "s": { "type": "string", ... },
61
+ * // "v": { "anyOf": [{"const": 27}, {"const": 28}] }
62
+ * // },
63
+ * // "required": ["r", "s", "v"]
64
+ * // },
65
+ * // "vaultAddress": { "type": "string", ... },
66
+ * // "expiresAfter": { "type": "number" }
67
+ * // },
68
+ * // "required": ["action", "nonce", "signature"]
69
+ * // }
70
+ * ```
71
+ *
72
+ * @module
73
+ */
74
+
75
+ import * as v from "valibot";
76
+ import { HyperliquidError } from "../errors.js";
77
+
78
+ /** Thrown when a schema validation error occurs. */
79
+ export class SchemaError extends HyperliquidError {
80
+ constructor(message: string) {
81
+ super(message);
82
+ this.name = "SchemaError";
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Creates a valibot parser with summarized error messages.
88
+ * Used for validating, formatting, and sorting object keys for correct signature generation.
89
+ * @param schema - The valibot schema to validate against.
90
+ * @returns A parser function that validates input against the schema.
91
+ */
92
+ export function parser<TSchema extends v.GenericSchema>(schema: TSchema): v.Parser<TSchema, undefined> {
93
+ const safeParser = v.safeParser(schema);
94
+ const parser = (input: unknown) => {
95
+ const result = safeParser(input);
96
+ if (result.issues) throw new SchemaError("\n" + v.summarize(result.issues));
97
+ return result.output;
98
+ };
99
+ parser.schema = schema;
100
+ parser.config = undefined;
101
+ return parser;
102
+ }
103
+
104
+ export { Hex } from "./_base.js";
105
+
106
+ export * from "./exchange/requests.js";
107
+ export * from "./exchange/responses.js";
108
+
109
+ export * from "./explorer/requests.js";
110
+ export * from "./explorer/responses.js";
111
+
112
+ export * from "./info/accounts.js";
113
+ export * from "./info/assets.js";
114
+ export * from "./info/markets.js";
115
+ export * from "./info/orders.js";
116
+ export * from "./info/requests.js";
117
+ export * from "./info/validators.js";
118
+ export * from "./info/vaults.js";
119
+
120
+ export * from "./subscriptions/responses.js";
121
+ export * from "./subscriptions/requests.js";