@nktkas/hyperliquid 0.25.0-beta.1 → 0.25.0-beta.3

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 (284) hide show
  1. package/README.md +64 -16
  2. package/esm/bin/cli.d.ts +3 -0
  3. package/esm/bin/cli.d.ts.map +1 -0
  4. package/esm/bin/cli.js +452 -0
  5. package/esm/bin/cli.js.map +1 -0
  6. package/{script/src/errors.d.ts → esm/src/_errors.d.ts} +1 -1
  7. package/esm/src/_errors.d.ts.map +1 -0
  8. package/esm/src/{errors.js → _errors.js} +1 -0
  9. package/esm/src/_errors.js.map +1 -0
  10. package/esm/src/clients/exchange.d.ts +4 -11
  11. package/esm/src/clients/exchange.d.ts.map +1 -1
  12. package/esm/src/clients/exchange.js +8 -9
  13. package/esm/src/clients/exchange.js.map +1 -0
  14. package/esm/src/clients/info.d.ts +86 -2
  15. package/esm/src/clients/info.d.ts.map +1 -1
  16. package/esm/src/clients/info.js +103 -1
  17. package/esm/src/clients/info.js.map +1 -0
  18. package/esm/src/clients/multiSign.d.ts +1 -1
  19. package/esm/src/clients/multiSign.d.ts.map +1 -1
  20. package/esm/src/clients/multiSign.js +3 -2
  21. package/esm/src/clients/multiSign.js.map +1 -0
  22. package/esm/src/clients/subscription.js +1 -0
  23. package/esm/src/clients/subscription.js.map +1 -0
  24. package/esm/src/mod.d.ts +21 -0
  25. package/esm/src/mod.d.ts.map +1 -0
  26. package/esm/src/mod.js +14 -0
  27. package/esm/src/mod.js.map +1 -0
  28. package/esm/src/schemas/_base.d.ts +11 -3
  29. package/esm/src/schemas/_base.d.ts.map +1 -1
  30. package/esm/src/schemas/_base.js +30 -2
  31. package/esm/src/schemas/_base.js.map +1 -0
  32. package/esm/src/schemas/exchange/requests.d.ts +1872 -1872
  33. package/esm/src/schemas/exchange/requests.d.ts.map +1 -1
  34. package/esm/src/schemas/exchange/requests.js +277 -281
  35. package/esm/src/schemas/exchange/requests.js.map +1 -0
  36. package/esm/src/schemas/exchange/responses.d.ts +51 -51
  37. package/esm/src/schemas/exchange/responses.js +55 -54
  38. package/esm/src/schemas/exchange/responses.js.map +1 -0
  39. package/esm/src/schemas/explorer/requests.d.ts +5 -5
  40. package/esm/src/schemas/explorer/requests.js +6 -5
  41. package/esm/src/schemas/explorer/requests.js.map +1 -0
  42. package/esm/src/schemas/explorer/responses.d.ts +10 -10
  43. package/esm/src/schemas/explorer/responses.js +12 -11
  44. package/esm/src/schemas/explorer/responses.js.map +1 -0
  45. package/esm/src/schemas/info/accounts.d.ts +1042 -296
  46. package/esm/src/schemas/info/accounts.d.ts.map +1 -1
  47. package/esm/src/schemas/info/accounts.js +154 -109
  48. package/esm/src/schemas/info/accounts.js.map +1 -0
  49. package/esm/src/schemas/info/assets.d.ts +130 -101
  50. package/esm/src/schemas/info/assets.d.ts.map +1 -1
  51. package/esm/src/schemas/info/assets.js +69 -49
  52. package/esm/src/schemas/info/assets.js.map +1 -0
  53. package/esm/src/schemas/info/markets.d.ts +35 -18
  54. package/esm/src/schemas/info/markets.d.ts.map +1 -1
  55. package/esm/src/schemas/info/markets.js +27 -15
  56. package/esm/src/schemas/info/markets.js.map +1 -0
  57. package/esm/src/schemas/info/orders.d.ts +151 -151
  58. package/esm/src/schemas/info/orders.js +37 -36
  59. package/esm/src/schemas/info/orders.js.map +1 -0
  60. package/esm/src/schemas/info/requests.d.ts +145 -88
  61. package/esm/src/schemas/info/requests.d.ts.map +1 -1
  62. package/esm/src/schemas/info/requests.js +116 -73
  63. package/esm/src/schemas/info/requests.js.map +1 -0
  64. package/esm/src/schemas/info/validators.d.ts +60 -39
  65. package/esm/src/schemas/info/validators.d.ts.map +1 -1
  66. package/esm/src/schemas/info/validators.js +40 -26
  67. package/esm/src/schemas/info/validators.js.map +1 -0
  68. package/esm/src/schemas/info/vaults.d.ts +59 -59
  69. package/esm/src/schemas/info/vaults.js +20 -19
  70. package/esm/src/schemas/info/vaults.js.map +1 -0
  71. package/esm/src/schemas/mod.d.ts +4 -3
  72. package/esm/src/schemas/mod.d.ts.map +1 -1
  73. package/esm/src/schemas/mod.js +5 -3
  74. package/esm/src/schemas/mod.js.map +1 -0
  75. package/esm/src/schemas/subscriptions/requests.d.ts +23 -23
  76. package/esm/src/schemas/subscriptions/requests.d.ts.map +1 -1
  77. package/esm/src/schemas/subscriptions/requests.js +25 -24
  78. package/esm/src/schemas/subscriptions/requests.js.map +1 -0
  79. package/esm/src/schemas/subscriptions/responses.d.ts +547 -547
  80. package/esm/src/schemas/subscriptions/responses.js +41 -40
  81. package/esm/src/schemas/subscriptions/responses.js.map +1 -0
  82. package/esm/src/signing/mod.d.ts +1 -1
  83. package/esm/src/signing/mod.d.ts.map +1 -1
  84. package/esm/src/signing/mod.js +3 -2
  85. package/esm/src/signing/mod.js.map +1 -0
  86. package/esm/src/signing/signTypedData/ethers.d.ts.map +1 -0
  87. package/esm/src/signing/{_signTypedData → signTypedData}/ethers.js +1 -0
  88. package/esm/src/signing/signTypedData/ethers.js.map +1 -0
  89. package/esm/src/signing/signTypedData/mod.d.ts.map +1 -0
  90. package/esm/src/signing/{_signTypedData → signTypedData}/mod.js +1 -0
  91. package/esm/src/signing/signTypedData/mod.js.map +1 -0
  92. package/esm/src/signing/signTypedData/private_key.d.ts.map +1 -0
  93. package/esm/src/signing/{_signTypedData → signTypedData}/private_key.js +10 -8
  94. package/esm/src/signing/signTypedData/private_key.js.map +1 -0
  95. package/esm/src/signing/signTypedData/viem.d.ts.map +1 -0
  96. package/esm/src/signing/{_signTypedData → signTypedData}/viem.js +1 -0
  97. package/esm/src/signing/signTypedData/viem.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 +1 -1
  103. package/esm/src/transports/http/http_transport.js +1 -0
  104. package/esm/src/transports/http/http_transport.js.map +1 -0
  105. package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  106. package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  107. package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
  108. package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  109. package/esm/src/transports/websocket/_websocket_async_request.js +1 -0
  110. package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -0
  111. package/esm/src/transports/websocket/websocket_transport.d.ts +7 -0
  112. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  113. package/esm/src/transports/websocket/websocket_transport.js +4 -0
  114. package/esm/src/transports/websocket/websocket_transport.js.map +1 -0
  115. package/package.json +15 -7
  116. package/script/bin/cli.d.ts +3 -0
  117. package/script/bin/cli.d.ts.map +1 -0
  118. package/script/bin/cli.js +490 -0
  119. package/script/bin/cli.js.map +1 -0
  120. package/{esm/src/errors.d.ts → script/src/_errors.d.ts} +1 -1
  121. package/script/src/_errors.d.ts.map +1 -0
  122. package/script/src/{errors.js → _errors.js} +1 -0
  123. package/script/src/_errors.js.map +1 -0
  124. package/script/src/clients/exchange.d.ts +4 -11
  125. package/script/src/clients/exchange.d.ts.map +1 -1
  126. package/script/src/clients/exchange.js +9 -10
  127. package/script/src/clients/exchange.js.map +1 -0
  128. package/script/src/clients/info.d.ts +86 -2
  129. package/script/src/clients/info.d.ts.map +1 -1
  130. package/script/src/clients/info.js +102 -0
  131. package/script/src/clients/info.js.map +1 -0
  132. package/script/src/clients/multiSign.d.ts +1 -1
  133. package/script/src/clients/multiSign.d.ts.map +1 -1
  134. package/script/src/clients/multiSign.js +3 -2
  135. package/script/src/clients/multiSign.js.map +1 -0
  136. package/script/src/clients/subscription.js +1 -0
  137. package/script/src/clients/subscription.js.map +1 -0
  138. package/script/src/mod.d.ts +21 -0
  139. package/script/src/mod.d.ts.map +1 -0
  140. package/script/{mod.js → src/mod.js} +13 -8
  141. package/script/src/mod.js.map +1 -0
  142. package/script/src/schemas/_base.d.ts +11 -3
  143. package/script/src/schemas/_base.d.ts.map +1 -1
  144. package/script/src/schemas/_base.js +31 -3
  145. package/script/src/schemas/_base.js.map +1 -0
  146. package/script/src/schemas/exchange/requests.d.ts +1872 -1872
  147. package/script/src/schemas/exchange/requests.d.ts.map +1 -1
  148. package/script/src/schemas/exchange/requests.js +276 -280
  149. package/script/src/schemas/exchange/requests.js.map +1 -0
  150. package/script/src/schemas/exchange/responses.d.ts +51 -51
  151. package/script/src/schemas/exchange/responses.js +54 -53
  152. package/script/src/schemas/exchange/responses.js.map +1 -0
  153. package/script/src/schemas/explorer/requests.d.ts +5 -5
  154. package/script/src/schemas/explorer/requests.js +5 -4
  155. package/script/src/schemas/explorer/requests.js.map +1 -0
  156. package/script/src/schemas/explorer/responses.d.ts +10 -10
  157. package/script/src/schemas/explorer/responses.js +11 -10
  158. package/script/src/schemas/explorer/responses.js.map +1 -0
  159. package/script/src/schemas/info/accounts.d.ts +1042 -296
  160. package/script/src/schemas/info/accounts.d.ts.map +1 -1
  161. package/script/src/schemas/info/accounts.js +154 -109
  162. package/script/src/schemas/info/accounts.js.map +1 -0
  163. package/script/src/schemas/info/assets.d.ts +130 -101
  164. package/script/src/schemas/info/assets.d.ts.map +1 -1
  165. package/script/src/schemas/info/assets.js +69 -49
  166. package/script/src/schemas/info/assets.js.map +1 -0
  167. package/script/src/schemas/info/markets.d.ts +35 -18
  168. package/script/src/schemas/info/markets.d.ts.map +1 -1
  169. package/script/src/schemas/info/markets.js +27 -15
  170. package/script/src/schemas/info/markets.js.map +1 -0
  171. package/script/src/schemas/info/orders.d.ts +151 -151
  172. package/script/src/schemas/info/orders.js +36 -35
  173. package/script/src/schemas/info/orders.js.map +1 -0
  174. package/script/src/schemas/info/requests.d.ts +145 -88
  175. package/script/src/schemas/info/requests.d.ts.map +1 -1
  176. package/script/src/schemas/info/requests.js +116 -73
  177. package/script/src/schemas/info/requests.js.map +1 -0
  178. package/script/src/schemas/info/validators.d.ts +60 -39
  179. package/script/src/schemas/info/validators.d.ts.map +1 -1
  180. package/script/src/schemas/info/validators.js +40 -26
  181. package/script/src/schemas/info/validators.js.map +1 -0
  182. package/script/src/schemas/info/vaults.d.ts +59 -59
  183. package/script/src/schemas/info/vaults.js +19 -18
  184. package/script/src/schemas/info/vaults.js.map +1 -0
  185. package/script/src/schemas/mod.d.ts +4 -3
  186. package/script/src/schemas/mod.d.ts.map +1 -1
  187. package/script/src/schemas/mod.js +8 -5
  188. package/script/src/schemas/mod.js.map +1 -0
  189. package/script/src/schemas/subscriptions/requests.d.ts +23 -23
  190. package/script/src/schemas/subscriptions/requests.d.ts.map +1 -1
  191. package/script/src/schemas/subscriptions/requests.js +24 -23
  192. package/script/src/schemas/subscriptions/requests.js.map +1 -0
  193. package/script/src/schemas/subscriptions/responses.d.ts +547 -547
  194. package/script/src/schemas/subscriptions/responses.js +40 -39
  195. package/script/src/schemas/subscriptions/responses.js.map +1 -0
  196. package/script/src/signing/mod.d.ts +1 -1
  197. package/script/src/signing/mod.d.ts.map +1 -1
  198. package/script/src/signing/mod.js +4 -3
  199. package/script/src/signing/mod.js.map +1 -0
  200. package/script/src/signing/signTypedData/ethers.d.ts.map +1 -0
  201. package/script/src/signing/{_signTypedData → signTypedData}/ethers.js +1 -0
  202. package/script/src/signing/signTypedData/ethers.js.map +1 -0
  203. package/script/src/signing/signTypedData/mod.d.ts.map +1 -0
  204. package/script/src/signing/{_signTypedData → signTypedData}/mod.js +1 -0
  205. package/script/src/signing/signTypedData/mod.js.map +1 -0
  206. package/script/src/signing/signTypedData/private_key.d.ts.map +1 -0
  207. package/script/src/signing/{_signTypedData → signTypedData}/private_key.js +17 -15
  208. package/script/src/signing/signTypedData/private_key.js.map +1 -0
  209. package/script/src/signing/signTypedData/viem.d.ts.map +1 -0
  210. package/script/src/signing/{_signTypedData → signTypedData}/viem.js +1 -0
  211. package/script/src/signing/signTypedData/viem.js.map +1 -0
  212. package/script/src/transports/base.d.ts +4 -4
  213. package/script/src/transports/base.d.ts.map +1 -1
  214. package/script/src/transports/base.js +4 -3
  215. package/script/src/transports/base.js.map +1 -0
  216. package/script/src/transports/http/http_transport.d.ts +1 -1
  217. package/script/src/transports/http/http_transport.js +1 -0
  218. package/script/src/transports/http/http_transport.js.map +1 -0
  219. package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  220. package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  221. package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
  222. package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  223. package/script/src/transports/websocket/_websocket_async_request.js +1 -0
  224. package/script/src/transports/websocket/_websocket_async_request.js.map +1 -0
  225. package/script/src/transports/websocket/websocket_transport.d.ts +7 -0
  226. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  227. package/script/src/transports/websocket/websocket_transport.js +4 -0
  228. package/script/src/transports/websocket/websocket_transport.js.map +1 -0
  229. package/src/bin/cli.ts +481 -0
  230. package/src/src/_errors.ts +7 -0
  231. package/src/src/clients/exchange.ts +2246 -0
  232. package/src/src/clients/info.ts +2110 -0
  233. package/src/src/clients/multiSign.ts +183 -0
  234. package/src/src/clients/subscription.ts +841 -0
  235. package/src/src/mod.ts +29 -0
  236. package/src/src/schemas/_base.ts +82 -0
  237. package/src/src/schemas/exchange/requests.ts +3052 -0
  238. package/src/src/schemas/exchange/responses.ts +540 -0
  239. package/src/src/schemas/explorer/requests.ts +65 -0
  240. package/src/src/schemas/explorer/responses.ts +138 -0
  241. package/src/src/schemas/info/accounts.ts +1598 -0
  242. package/src/src/schemas/info/assets.ts +693 -0
  243. package/src/src/schemas/info/markets.ts +171 -0
  244. package/src/src/schemas/info/orders.ts +597 -0
  245. package/src/src/schemas/info/requests.ts +1401 -0
  246. package/src/src/schemas/info/validators.ts +297 -0
  247. package/src/src/schemas/info/vaults.ts +262 -0
  248. package/src/src/schemas/mod.ts +121 -0
  249. package/src/src/schemas/subscriptions/requests.ts +514 -0
  250. package/src/src/schemas/subscriptions/responses.ts +576 -0
  251. package/src/src/signing/mod.ts +572 -0
  252. package/src/src/signing/signTypedData/ethers.ts +59 -0
  253. package/src/src/signing/signTypedData/mod.ts +121 -0
  254. package/src/src/signing/signTypedData/private_key.ts +234 -0
  255. package/src/src/signing/signTypedData/viem.ts +55 -0
  256. package/src/src/transports/base.ts +54 -0
  257. package/src/src/transports/http/http_transport.ts +208 -0
  258. package/src/src/transports/websocket/_hyperliquid_event_target.ts +118 -0
  259. package/src/src/transports/websocket/_reconnecting_websocket.ts +404 -0
  260. package/src/src/transports/websocket/_websocket_async_request.ts +229 -0
  261. package/src/src/transports/websocket/websocket_transport.ts +394 -0
  262. package/esm/mod.d.ts +0 -20
  263. package/esm/mod.d.ts.map +0 -1
  264. package/esm/mod.js +0 -11
  265. package/esm/src/errors.d.ts.map +0 -1
  266. package/esm/src/signing/_signTypedData/ethers.d.ts.map +0 -1
  267. package/esm/src/signing/_signTypedData/mod.d.ts.map +0 -1
  268. package/esm/src/signing/_signTypedData/private_key.d.ts.map +0 -1
  269. package/esm/src/signing/_signTypedData/viem.d.ts.map +0 -1
  270. package/script/mod.d.ts +0 -20
  271. package/script/mod.d.ts.map +0 -1
  272. package/script/src/errors.d.ts.map +0 -1
  273. package/script/src/signing/_signTypedData/ethers.d.ts.map +0 -1
  274. package/script/src/signing/_signTypedData/mod.d.ts.map +0 -1
  275. package/script/src/signing/_signTypedData/private_key.d.ts.map +0 -1
  276. package/script/src/signing/_signTypedData/viem.d.ts.map +0 -1
  277. /package/esm/src/signing/{_signTypedData → signTypedData}/ethers.d.ts +0 -0
  278. /package/esm/src/signing/{_signTypedData → signTypedData}/mod.d.ts +0 -0
  279. /package/esm/src/signing/{_signTypedData → signTypedData}/private_key.d.ts +0 -0
  280. /package/esm/src/signing/{_signTypedData → signTypedData}/viem.d.ts +0 -0
  281. /package/script/src/signing/{_signTypedData → signTypedData}/ethers.d.ts +0 -0
  282. /package/script/src/signing/{_signTypedData → signTypedData}/mod.d.ts +0 -0
  283. /package/script/src/signing/{_signTypedData → signTypedData}/private_key.d.ts +0 -0
  284. /package/script/src/signing/{_signTypedData → signTypedData}/viem.d.ts +0 -0
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.MultiSigRequest = exports.Withdraw3Request = exports.VaultTransferRequest = exports.VaultModifyRequest = exports.VaultDistributeRequest = exports.UsdSendRequest = exports.UsdClassTransferRequest = exports.UpdateLeverageRequest = exports.UpdateIsolatedMarginRequest = exports.TwapOrderRequest = exports.TwapCancelRequest = exports.TokenDelegateRequest = exports.SubAccountTransferRequest = exports.SubAccountSpotTransferRequest = exports.SubAccountModifyRequest = exports.SpotUserRequest = exports.SpotSendRequest = exports.SpotDeployRequest = exports.SetReferrerRequest = exports.SetDisplayNameRequest = exports.SendAssetRequest = exports.ScheduleCancelRequest = exports.ReserveRequestWeightRequest = exports.RegisterReferrerRequest = exports.PerpDeployRequest = exports.OrderRequest = exports.NoopRequest = exports.ModifyRequest = exports.EvmUserModifyRequest = exports.CWithdrawRequest = exports.CValidatorActionRequest = exports.CSignerActionRequest = exports.CreateVaultRequest = exports.CreateSubAccountRequest = exports.ConvertToMultiSigUserRequest = exports.ConvertToMultiSigUserRequestSigners = exports.ClaimRewardsRequest = exports.CDepositRequest = exports.CancelByCloidRequest = exports.CancelRequest = exports.BatchModifyRequest = exports.ApproveBuilderFeeRequest = exports.ApproveAgentRequest = exports.OrderParams = exports.Signature = void 0;
37
37
  const v = __importStar(require("valibot"));
38
38
  const _base_js_1 = require("../_base.js");
39
+ const orders_js_1 = require("../info/orders.js");
39
40
  /** Deeply removes undefined keys from an object. */
40
41
  function removeUndefinedKeys(obj) {
41
42
  if (typeof obj !== "object" || obj === null) {
@@ -55,7 +56,7 @@ function removeUndefinedKeys(obj) {
55
56
  }
56
57
  const Percent = v.pipe(v.string(), v.regex(/^[0-9]+(\.[0-9]+)?%$/), v.transform((value) => value));
57
58
  /** ECDSA signature components for Ethereum typed data. */
58
- exports.Signature = v.pipe(v.strictObject({
59
+ exports.Signature = v.pipe(v.object({
59
60
  /** First 32-byte component of ECDSA signature. */
60
61
  r: v.pipe(v.pipe(_base_js_1.Hex, v.length(66), v.transform((value) => value.replace(/^0x0+/, "0x"))), v.description("First 32-byte component of ECDSA signature.")),
61
62
  /** Second 32-byte component of ECDSA signature. */
@@ -64,39 +65,33 @@ exports.Signature = v.pipe(v.strictObject({
64
65
  v: v.pipe(v.union([v.literal(27), v.literal(28)]), v.description("Recovery identifier.")),
65
66
  }), v.description("ECDSA signature components for Ethereum typed data."));
66
67
  /** Order parameters. */
67
- exports.OrderParams = v.pipe(v.strictObject({
68
+ exports.OrderParams = v.pipe(v.object({
68
69
  /** Asset ID. */
69
- a: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
70
+ a: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
70
71
  /** Position side (`true` for long, `false` for short). */
71
72
  b: v.pipe(v.boolean(), v.description("Position side (`true` for long, `false` for short).")),
72
73
  /** Price. */
73
- p: v.pipe(_base_js_1.UnsignedDecimal, v.description("Price.")),
74
+ p: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Price.")),
74
75
  /** Size (in base currency units). */
75
- s: v.pipe(_base_js_1.UnsignedDecimal, v.description("Size (in base currency units).")),
76
+ s: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Size (in base currency units).")),
76
77
  /** Is reduce-only? */
77
78
  r: v.pipe(v.boolean(), v.description("Is reduce-only?")),
78
79
  /** Order type. */
79
80
  t: v.pipe(v.union([
80
- v.strictObject({
81
+ v.object({
81
82
  /** Limit order parameters. */
82
- limit: v.pipe(v.strictObject({
83
+ limit: v.pipe(v.object({
83
84
  /** Time-in-force. */
84
- tif: v.pipe(v.union([
85
- v.literal("Gtc"),
86
- v.literal("Ioc"),
87
- v.literal("Alo"),
88
- v.literal("FrontendMarket"),
89
- v.literal("LiquidationMarket"),
90
- ]), v.description("Time-in-force.")),
85
+ tif: v.pipe(orders_js_1.TIF, v.description("Time-in-force.")),
91
86
  }), v.description("Limit order parameters.")),
92
87
  }),
93
- v.strictObject({
88
+ v.object({
94
89
  /** Trigger order parameters. */
95
- trigger: v.pipe(v.strictObject({
90
+ trigger: v.pipe(v.object({
96
91
  /** Is market order? */
97
92
  isMarket: v.pipe(v.boolean(), v.description("Is market order?")),
98
93
  /** Trigger price. */
99
- triggerPx: v.pipe(_base_js_1.UnsignedDecimal, v.description("Trigger price.")),
94
+ triggerPx: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Trigger price.")),
100
95
  /** Indicates whether it is take profit or stop loss. */
101
96
  tpsl: v.pipe(v.union([v.literal("tp"), v.literal("sl")]), v.description("Indicates whether it is take profit or stop loss.")),
102
97
  }), v.description("Trigger order parameters.")),
@@ -110,9 +105,9 @@ exports.OrderParams = v.pipe(v.strictObject({
110
105
  * @returns {SuccessResponse}
111
106
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#approve-an-api-wallet
112
107
  */
113
- exports.ApproveAgentRequest = v.pipe(v.strictObject({
108
+ exports.ApproveAgentRequest = v.pipe(v.object({
114
109
  /** Action to perform. */
115
- action: v.pipe(v.strictObject({
110
+ action: v.pipe(v.object({
116
111
  /** Type of action. */
117
112
  type: v.pipe(v.literal("approveAgent"), v.description("Type of action.")),
118
113
  /** Chain ID used for signing. */
@@ -124,10 +119,10 @@ exports.ApproveAgentRequest = v.pipe(v.strictObject({
124
119
  /** Agent name or null for unnamed agent. */
125
120
  agentName: v.pipe(v.nullable(v.string()), v.description("Agent name or null for unnamed agent.")),
126
121
  /** Unique request identifier (current timestamp in ms). */
127
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
122
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
128
123
  }), v.description("Action to perform.")),
129
124
  /** Unique request identifier (current timestamp in ms). */
130
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
125
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
131
126
  /** Cryptographic signature. */
132
127
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
133
128
  }), v.transform(removeUndefinedKeys), v.description("Approve an agent to sign on behalf of the master account."));
@@ -136,9 +131,9 @@ exports.ApproveAgentRequest = v.pipe(v.strictObject({
136
131
  * @returns {SuccessResponse}
137
132
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#approve-a-builder-fee
138
133
  */
139
- exports.ApproveBuilderFeeRequest = v.pipe(v.strictObject({
134
+ exports.ApproveBuilderFeeRequest = v.pipe(v.object({
140
135
  /** Action to perform. */
141
- action: v.pipe(v.strictObject({
136
+ action: v.pipe(v.object({
142
137
  /** Type of action. */
143
138
  type: v.pipe(v.literal("approveBuilderFee"), v.description("Type of action.")),
144
139
  /** Chain ID used for signing. */
@@ -150,10 +145,10 @@ exports.ApproveBuilderFeeRequest = v.pipe(v.strictObject({
150
145
  /** Builder address. */
151
146
  builder: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Builder address.")),
152
147
  /** Unique request identifier (current timestamp in ms). */
153
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
148
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
154
149
  }), v.description("Action to perform.")),
155
150
  /** Unique request identifier (current timestamp in ms). */
156
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
151
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
157
152
  /** Cryptographic signature. */
158
153
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
159
154
  }), v.transform(removeUndefinedKeys), v.description("Approve a maximum fee rate for a builder."));
@@ -162,16 +157,16 @@ exports.ApproveBuilderFeeRequest = v.pipe(v.strictObject({
162
157
  * @returns {OrderResponse}
163
158
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-multiple-orders
164
159
  */
165
- exports.BatchModifyRequest = v.pipe(v.strictObject({
160
+ exports.BatchModifyRequest = v.pipe(v.object({
166
161
  /** Action to perform. */
167
- action: v.pipe(v.strictObject({
162
+ action: v.pipe(v.object({
168
163
  /** Type of action. */
169
164
  type: v.pipe(v.literal("batchModify"), v.description("Type of action.")),
170
165
  /** Order modifications. */
171
- modifies: v.pipe(v.array(v.strictObject({
166
+ modifies: v.pipe(v.array(v.object({
172
167
  /** Order ID or Client Order ID. */
173
168
  oid: v.pipe(v.union([
174
- v.pipe(v.number(), v.safeInteger(), v.minValue(0)),
169
+ _base_js_1.UnsignedIntegerMayInputString,
175
170
  v.pipe(_base_js_1.Hex, v.length(34)),
176
171
  ]), v.description("Order ID or Client Order ID.")),
177
172
  /** New order parameters. */
@@ -179,76 +174,76 @@ exports.BatchModifyRequest = v.pipe(v.strictObject({
179
174
  })), v.description("Order modifications.")),
180
175
  }), v.description("Action to perform.")),
181
176
  /** Unique request identifier (current timestamp in ms). */
182
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
177
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
183
178
  /** Cryptographic signature. */
184
179
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
185
180
  /** Vault address (for vault trading). */
186
181
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
187
182
  /** Expiration time of the action. */
188
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
183
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
189
184
  }), v.transform(removeUndefinedKeys), v.description("Modify multiple orders."));
190
185
  /**
191
186
  * Cancel order(s).
192
187
  * @returns {CancelResponse}
193
188
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s
194
189
  */
195
- exports.CancelRequest = v.pipe(v.strictObject({
190
+ exports.CancelRequest = v.pipe(v.object({
196
191
  /** Action to perform. */
197
- action: v.pipe(v.strictObject({
192
+ action: v.pipe(v.object({
198
193
  /** Type of action. */
199
194
  type: v.pipe(v.literal("cancel"), v.description("Type of action.")),
200
195
  /** Orders to cancel. */
201
- cancels: v.pipe(v.array(v.strictObject({
196
+ cancels: v.pipe(v.array(v.object({
202
197
  /** Asset ID. */
203
- a: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
198
+ a: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
204
199
  /** Order ID. */
205
- o: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Order ID.")),
200
+ o: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Order ID.")),
206
201
  })), v.description("Orders to cancel.")),
207
202
  }), v.description("Action to perform.")),
208
203
  /** Unique request identifier (current timestamp in ms). */
209
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
204
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
210
205
  /** Cryptographic signature. */
211
206
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
212
207
  /** Vault address (for vault trading). */
213
208
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
214
209
  /** Expiration time of the action. */
215
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
210
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
216
211
  }), v.transform(removeUndefinedKeys), v.description("Cancel order(s)."));
217
212
  /**
218
213
  * Cancel order(s) by cloid.
219
214
  * @returns {CancelResponse}
220
215
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-order-s-by-cloid
221
216
  */
222
- exports.CancelByCloidRequest = v.pipe(v.strictObject({
217
+ exports.CancelByCloidRequest = v.pipe(v.object({
223
218
  /** Action to perform. */
224
- action: v.pipe(v.strictObject({
219
+ action: v.pipe(v.object({
225
220
  /** Type of action. */
226
221
  type: v.pipe(v.literal("cancelByCloid"), v.description("Type of action.")),
227
222
  /** Orders to cancel. */
228
- cancels: v.pipe(v.array(v.strictObject({
223
+ cancels: v.pipe(v.array(v.object({
229
224
  /** Asset ID. */
230
- asset: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
225
+ asset: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
231
226
  /** Client Order ID. */
232
227
  cloid: v.pipe(v.pipe(_base_js_1.Hex, v.length(34)), v.description("Client Order ID.")),
233
228
  })), v.description("Orders to cancel.")),
234
229
  }), v.description("Action to perform.")),
235
230
  /** Unique request identifier (current timestamp in ms). */
236
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
231
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
237
232
  /** Cryptographic signature. */
238
233
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
239
234
  /** Vault address (for vault trading). */
240
235
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
241
236
  /** Expiration time of the action. */
242
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
237
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
243
238
  }), v.transform(removeUndefinedKeys), v.description("Cancel order(s) by cloid."));
244
239
  /**
245
240
  * Transfer native token from the user spot account into staking for delegating to validators.
246
241
  * @returns {SuccessResponse}
247
242
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#deposit-into-staking
248
243
  */
249
- exports.CDepositRequest = v.pipe(v.strictObject({
244
+ exports.CDepositRequest = v.pipe(v.object({
250
245
  /** Action to perform. */
251
- action: v.pipe(v.strictObject({
246
+ action: v.pipe(v.object({
252
247
  /** Type of action. */
253
248
  type: v.pipe(v.literal("cDeposit"), v.description("Type of action.")),
254
249
  /** Chain ID used for signing. */
@@ -256,12 +251,12 @@ exports.CDepositRequest = v.pipe(v.strictObject({
256
251
  /** HyperLiquid network. */
257
252
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
258
253
  /** Amount of wei to deposit into staking balance (float * 1e8). */
259
- wei: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount of wei to deposit into staking balance (float * 1e8).")),
254
+ wei: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount of wei to deposit into staking balance (float * 1e8).")),
260
255
  /** Unique request identifier (current timestamp in ms). */
261
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
256
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
262
257
  }), v.description("Action to perform.")),
263
258
  /** Unique request identifier (current timestamp in ms). */
264
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
259
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
265
260
  /** Cryptographic signature. */
266
261
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
267
262
  }), v.transform(removeUndefinedKeys), v.description("Transfer native token from the user spot account into staking for delegating to validators."));
@@ -270,26 +265,26 @@ exports.CDepositRequest = v.pipe(v.strictObject({
270
265
  * @returns {SuccessResponse}
271
266
  * @see null
272
267
  */
273
- exports.ClaimRewardsRequest = v.pipe(v.strictObject({
268
+ exports.ClaimRewardsRequest = v.pipe(v.object({
274
269
  /** Action to perform. */
275
- action: v.pipe(v.strictObject({
270
+ action: v.pipe(v.object({
276
271
  /** Type of action. */
277
272
  type: v.pipe(v.literal("claimRewards"), v.description("Type of action.")),
278
273
  }), v.description("Action to perform.")),
279
274
  /** Unique request identifier (current timestamp in ms). */
280
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
275
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
281
276
  /** Cryptographic signature. */
282
277
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
283
278
  /** Expiration time of the action. */
284
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
279
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
285
280
  }), v.transform(removeUndefinedKeys), v.description("Claim rewards from referral program."));
286
281
  /** Signers configuration for {@linkcode ConvertToMultiSigUserRequest}. */
287
282
  exports.ConvertToMultiSigUserRequestSigners = v.pipe(v.union([
288
- v.strictObject({
283
+ v.object({
289
284
  /** List of authorized user addresses. */
290
285
  authorizedUsers: v.pipe(v.array(v.pipe(_base_js_1.Hex, v.length(42))), v.description("List of authorized user addresses.")),
291
286
  /** Minimum number of signatures required. */
292
- threshold: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Minimum number of signatures required.")),
287
+ threshold: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Minimum number of signatures required.")),
293
288
  }),
294
289
  /** Convert a multi-signature account to a single-signature account. */
295
290
  v.pipe(v.null(), v.description("Convert a multi-signature account to a single-signature account.")),
@@ -299,9 +294,9 @@ exports.ConvertToMultiSigUserRequestSigners = v.pipe(v.union([
299
294
  * @returns {SuccessResponse}
300
295
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/multi-sig
301
296
  */
302
- exports.ConvertToMultiSigUserRequest = v.pipe(v.strictObject({
297
+ exports.ConvertToMultiSigUserRequest = v.pipe(v.object({
303
298
  /** Action to perform. */
304
- action: v.pipe(v.strictObject({
299
+ action: v.pipe(v.object({
305
300
  /** Type of action. */
306
301
  type: v.pipe(v.literal("convertToMultiSigUser"), v.description("Type of action.")),
307
302
  /** Chain ID used for signing. */
@@ -319,10 +314,10 @@ exports.ConvertToMultiSigUserRequest = v.pipe(v.strictObject({
319
314
  ]), v.description("Signers configuration." +
320
315
  "\n\nMust be `ConvertToMultiSigUserRequestSigners` converted to a string via `JSON.stringify(...)`.")),
321
316
  /** Unique request identifier (current timestamp in ms). */
322
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
317
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
323
318
  }), v.description("Action to perform.")),
324
319
  /** Unique request identifier (current timestamp in ms). */
325
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
320
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
326
321
  /** Cryptographic signature. */
327
322
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
328
323
  }), v.transform(removeUndefinedKeys), v.description("Convert a single-signature account to a multi-signature account."));
@@ -331,29 +326,29 @@ exports.ConvertToMultiSigUserRequest = v.pipe(v.strictObject({
331
326
  * @returns {CreateSubAccountResponse}
332
327
  * @see null
333
328
  */
334
- exports.CreateSubAccountRequest = v.pipe(v.strictObject({
329
+ exports.CreateSubAccountRequest = v.pipe(v.object({
335
330
  /** Action to perform. */
336
- action: v.pipe(v.strictObject({
331
+ action: v.pipe(v.object({
337
332
  /** Type of action. */
338
333
  type: v.pipe(v.literal("createSubAccount"), v.description("Type of action.")),
339
334
  /** Sub-account name. */
340
335
  name: v.pipe(v.string(), v.minLength(1), v.description("Sub-account name.")),
341
336
  }), v.description("Action to perform.")),
342
337
  /** Unique request identifier (current timestamp in ms). */
343
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
338
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
344
339
  /** Cryptographic signature. */
345
340
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
346
341
  /** Expiration time of the action. */
347
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
342
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
348
343
  }), v.transform(removeUndefinedKeys), v.description("Create a sub-account."));
349
344
  /**
350
345
  * Create a vault.
351
346
  * @returns {CreateVaultResponse}
352
347
  * @see null
353
348
  */
354
- exports.CreateVaultRequest = v.pipe(v.strictObject({
349
+ exports.CreateVaultRequest = v.pipe(v.object({
355
350
  /** Action to perform. */
356
- action: v.pipe(v.strictObject({
351
+ action: v.pipe(v.object({
357
352
  /** Type of action. */
358
353
  type: v.pipe(v.literal("createVault"), v.description("Type of action.")),
359
354
  /** Vault name. */
@@ -361,17 +356,17 @@ exports.CreateVaultRequest = v.pipe(v.strictObject({
361
356
  /** Vault description. */
362
357
  description: v.pipe(v.string(), v.minLength(10), v.description("Vault description.")),
363
358
  /** Initial balance (float * 1e6). */
364
- initialUsd: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.minValue(100000000), // 100 USDC
359
+ initialUsd: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.minValue(100000000), // 100 USDC
365
360
  v.description("Initial balance (float * 1e6).")),
366
361
  /** Unique request identifier (current timestamp in ms). */
367
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
362
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
368
363
  }), v.description("Action to perform.")),
369
364
  /** Unique request identifier (current timestamp in ms). */
370
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
365
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
371
366
  /** Cryptographic signature. */
372
367
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
373
368
  /** Expiration time of the action. */
374
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
369
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
375
370
  }), v.transform(removeUndefinedKeys), v.description("Create a vault."));
376
371
  /**
377
372
  * Perform an action on a signer:
@@ -380,16 +375,16 @@ exports.CreateVaultRequest = v.pipe(v.strictObject({
380
375
  * @returns {SuccessResponse}
381
376
  * @see null
382
377
  */
383
- exports.CSignerActionRequest = v.pipe(v.strictObject({
378
+ exports.CSignerActionRequest = v.pipe(v.object({
384
379
  /** Action to perform. */
385
380
  action: v.pipe(v.union([
386
- v.strictObject({
381
+ v.object({
387
382
  /** Type of action. */
388
383
  type: v.pipe(v.literal("CSignerAction"), v.description("Type of action.")),
389
384
  /** Jail the signer. */
390
385
  jailSelf: v.pipe(v.null(), v.description("Jail the signer.")),
391
386
  }),
392
- v.strictObject({
387
+ v.object({
393
388
  /** Type of action. */
394
389
  type: v.pipe(v.literal("CSignerAction"), v.description("Type of action.")),
395
390
  /** Unjail the signer. */
@@ -397,11 +392,11 @@ exports.CSignerActionRequest = v.pipe(v.strictObject({
397
392
  }),
398
393
  ]), v.description("Action to perform.")),
399
394
  /** Unique request identifier (current timestamp in ms). */
400
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
395
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
401
396
  /** Cryptographic signature. */
402
397
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
403
398
  /** Expiration time of the action. */
404
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
399
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
405
400
  }), v.transform(removeUndefinedKeys), v.description("Perform an action on a signer." +
406
401
  "\n- Jail to prevent them from signing transactions." +
407
402
  "\n- Unjail to allow them to sign transactions again."));
@@ -413,17 +408,17 @@ exports.CSignerActionRequest = v.pipe(v.strictObject({
413
408
  * @returns {SuccessResponse}
414
409
  * @see null
415
410
  */
416
- exports.CValidatorActionRequest = v.pipe(v.strictObject({
411
+ exports.CValidatorActionRequest = v.pipe(v.object({
417
412
  /** Action to perform. */
418
413
  action: v.pipe(v.union([
419
- v.strictObject({
414
+ v.object({
420
415
  /** Type of action. */
421
416
  type: v.pipe(v.literal("CValidatorAction"), v.description("Type of action.")),
422
417
  /** Profile changes to apply. */
423
- changeProfile: v.pipe(v.strictObject({
418
+ changeProfile: v.pipe(v.object({
424
419
  /** Validator node IP address. */
425
420
  node_ip: v.pipe(v.union([
426
- v.strictObject({
421
+ v.object({
427
422
  /** IP address. */
428
423
  Ip: v.pipe(v.string(), v.ip(), v.description("IP address.")),
429
424
  }),
@@ -438,20 +433,20 @@ exports.CValidatorActionRequest = v.pipe(v.strictObject({
438
433
  /** Enable or disable delegations. */
439
434
  disable_delegations: v.pipe(v.nullable(v.boolean()), v.description("Enable or disable delegations.")),
440
435
  /** Commission rate in basis points (1 = 0.0001%). */
441
- commission_bps: v.pipe(v.nullable(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Commission rate in basis points (1 = 0.0001%).")),
436
+ commission_bps: v.pipe(v.nullable(_base_js_1.UnsignedIntegerMayInputString), v.description("Commission rate in basis points (1 = 0.0001%).")),
442
437
  /** Signer address. */
443
438
  signer: v.pipe(v.nullable(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Signer address.")),
444
439
  }), v.description("Profile changes to apply.")),
445
440
  }),
446
- v.strictObject({
441
+ v.object({
447
442
  /** Type of action. */
448
443
  type: v.pipe(v.literal("CValidatorAction"), v.description("Type of action.")),
449
444
  /** Registration parameters. */
450
- register: v.pipe(v.strictObject({
445
+ register: v.pipe(v.object({
451
446
  /** Validator profile information. */
452
- profile: v.pipe(v.strictObject({
447
+ profile: v.pipe(v.object({
453
448
  /** Validator node IP address. */
454
- node_ip: v.pipe(v.strictObject({
449
+ node_ip: v.pipe(v.object({
455
450
  /** IP address. */
456
451
  Ip: v.pipe(v.string(), v.ip(), v.description("IP address.")),
457
452
  }), v.description("Validator node IP address.")),
@@ -462,17 +457,17 @@ exports.CValidatorActionRequest = v.pipe(v.strictObject({
462
457
  /** Whether delegations are disabled. */
463
458
  delegations_disabled: v.pipe(v.boolean(), v.description("Whether delegations are disabled.")),
464
459
  /** Commission rate in basis points (1 = 0.0001%). */
465
- commission_bps: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Commission rate in basis points (1 = 0.0001%).")),
460
+ commission_bps: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Commission rate in basis points (1 = 0.0001%).")),
466
461
  /** Signer address. */
467
462
  signer: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Signer address.")),
468
463
  }), v.description("Validator profile information.")),
469
464
  /** Initial jail status. */
470
465
  unjailed: v.pipe(v.boolean(), v.description("Initial jail status.")),
471
466
  /** Initial stake amount in wei. */
472
- initial_wei: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Initial stake amount in wei.")),
467
+ initial_wei: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Initial stake amount in wei.")),
473
468
  }), v.description("Registration parameters.")),
474
469
  }),
475
- v.strictObject({
470
+ v.object({
476
471
  /** Type of action. */
477
472
  type: v.pipe(v.literal("CValidatorAction"), v.description("Type of action.")),
478
473
  /** Unregister the validator. */
@@ -480,11 +475,11 @@ exports.CValidatorActionRequest = v.pipe(v.strictObject({
480
475
  }),
481
476
  ]), v.description("Action to perform.")),
482
477
  /** Unique request identifier (current timestamp in ms). */
483
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
478
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
484
479
  /** Cryptographic signature. */
485
480
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
486
481
  /** Expiration time of the action. */
487
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
482
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
488
483
  }), v.transform(removeUndefinedKeys), v.description("Perform an action on a validator:" +
489
484
  "\n- Change profile information." +
490
485
  "\n- Register a new validator." +
@@ -494,9 +489,9 @@ exports.CValidatorActionRequest = v.pipe(v.strictObject({
494
489
  * @returns {SuccessResponse}
495
490
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#withdraw-from-staking
496
491
  */
497
- exports.CWithdrawRequest = v.pipe(v.strictObject({
492
+ exports.CWithdrawRequest = v.pipe(v.object({
498
493
  /** Action to perform. */
499
- action: v.pipe(v.strictObject({
494
+ action: v.pipe(v.object({
500
495
  /** Type of action. */
501
496
  type: v.pipe(v.literal("cWithdraw"), v.description("Type of action.")),
502
497
  /** Chain ID used for signing. */
@@ -504,12 +499,12 @@ exports.CWithdrawRequest = v.pipe(v.strictObject({
504
499
  /** HyperLiquid network. */
505
500
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
506
501
  /** Amount of wei to withdraw from staking balance (float * 1e8). */
507
- wei: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount of wei to withdraw from staking balance (float * 1e8).")),
502
+ wei: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount of wei to withdraw from staking balance (float * 1e8).")),
508
503
  /** Unique request identifier (current timestamp in ms). */
509
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
504
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
510
505
  }), v.description("Action to perform.")),
511
506
  /** Unique request identifier (current timestamp in ms). */
512
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
507
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
513
508
  /** Cryptographic signature. */
514
509
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
515
510
  }), v.transform(removeUndefinedKeys), v.description("Transfer native token from staking into the user spot account."));
@@ -518,74 +513,74 @@ exports.CWithdrawRequest = v.pipe(v.strictObject({
518
513
  * @returns {SuccessResponse}
519
514
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm/dual-block-architecture
520
515
  */
521
- exports.EvmUserModifyRequest = v.pipe(v.strictObject({
516
+ exports.EvmUserModifyRequest = v.pipe(v.object({
522
517
  /** Action to perform. */
523
- action: v.pipe(v.strictObject({
518
+ action: v.pipe(v.object({
524
519
  /** Type of action. */
525
520
  type: v.pipe(v.literal("evmUserModify"), v.description("Type of action.")),
526
521
  /** `true` for large blocks, `false` for small blocks. */
527
522
  usingBigBlocks: v.pipe(v.boolean(), v.description("`true` for large blocks, `false` for small blocks.")),
528
523
  }), v.description("Action to perform.")),
529
524
  /** Unique request identifier (current timestamp in ms). */
530
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
525
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
531
526
  /** Cryptographic signature. */
532
527
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
533
528
  /** Expiration time of the action. */
534
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
529
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
535
530
  }), v.transform(removeUndefinedKeys), v.description("Configure block type for EVM transactions."));
536
531
  /**
537
532
  * Modify an order.
538
533
  * @returns {SuccessResponse}
539
534
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#modify-an-order
540
535
  */
541
- exports.ModifyRequest = v.pipe(v.strictObject({
536
+ exports.ModifyRequest = v.pipe(v.object({
542
537
  /** Action to perform. */
543
- action: v.pipe(v.strictObject({
538
+ action: v.pipe(v.object({
544
539
  /** Type of action. */
545
540
  type: v.pipe(v.literal("modify"), v.description("Type of action.")),
546
541
  /** Order ID or Client Order ID. */
547
542
  oid: v.pipe(v.union([
548
- v.pipe(v.number(), v.safeInteger(), v.minValue(0)),
543
+ _base_js_1.UnsignedIntegerMayInputString,
549
544
  v.pipe(_base_js_1.Hex, v.length(34)),
550
545
  ]), v.description("Order ID or Client Order ID.")),
551
546
  /** New order parameters. */
552
547
  order: v.pipe(exports.OrderParams, v.description("New order parameters.")),
553
548
  }), v.description("Action to perform.")),
554
549
  /** Unique request identifier (current timestamp in ms). */
555
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
550
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
556
551
  /** Cryptographic signature. */
557
552
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
558
553
  /** Vault address (for vault trading). */
559
554
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
560
555
  /** Expiration time of the action. */
561
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
556
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
562
557
  }), v.transform(removeUndefinedKeys), v.description("Modify an order."));
563
558
  /**
564
559
  * This action does not do anything (no operation), but causes the nonce to be marked as used.
565
560
  * @returns {SuccessResponse}
566
561
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#invalidate-pending-nonce-noop
567
562
  */
568
- exports.NoopRequest = v.pipe(v.strictObject({
563
+ exports.NoopRequest = v.pipe(v.object({
569
564
  /** Action to perform. */
570
- action: v.pipe(v.strictObject({
565
+ action: v.pipe(v.object({
571
566
  /** Type of action. */
572
567
  type: v.pipe(v.literal("noop"), v.description("Type of action.")),
573
568
  }), v.description("Action to perform.")),
574
569
  /** Unique request identifier (current timestamp in ms). */
575
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
570
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
576
571
  /** Cryptographic signature. */
577
572
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
578
573
  /** Expiration time of the action. */
579
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
574
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
580
575
  }), v.transform(removeUndefinedKeys), v.description("This action does not do anything (no operation), but causes the nonce to be marked as used."));
581
576
  /**
582
577
  * Place an order(s).
583
578
  * @returns {OrderResponse}
584
579
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-an-order
585
580
  */
586
- exports.OrderRequest = v.pipe(v.strictObject({
581
+ exports.OrderRequest = v.pipe(v.object({
587
582
  /** Action to perform. */
588
- action: v.pipe(v.strictObject({
583
+ action: v.pipe(v.object({
589
584
  /** Type of action. */
590
585
  type: v.pipe(v.literal("order"), v.description("Type of action.")),
591
586
  /** Order parameters. */
@@ -605,21 +600,21 @@ exports.OrderRequest = v.pipe(v.strictObject({
605
600
  "\n- `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes." +
606
601
  "\n- `positionTpsl`: TP/SL order that adjusts proportionally with the position size.")),
607
602
  /** Builder fee. */
608
- builder: v.pipe(v.optional(v.strictObject({
603
+ builder: v.pipe(v.optional(v.object({
609
604
  /** Builder address. */
610
605
  b: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Builder address.")),
611
606
  /** Builder fee in 0.1bps (1 = 0.0001%). */
612
- f: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Builder fee in 0.1bps (1 = 0.0001%).")),
607
+ f: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Builder fee in 0.1bps (1 = 0.0001%).")),
613
608
  })), v.description("Builder fee.")),
614
609
  }), v.description("Action to perform.")),
615
610
  /** Unique request identifier (current timestamp in ms). */
616
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
611
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
617
612
  /** Cryptographic signature. */
618
613
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
619
614
  /** Vault address (for vault trading). */
620
615
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
621
616
  /** Expiration time of the action. */
622
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
617
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
623
618
  }), v.transform(removeUndefinedKeys), v.description("Place an order(s)."));
624
619
  /**
625
620
  * Deploying HIP-3 assets:
@@ -628,62 +623,62 @@ exports.OrderRequest = v.pipe(v.strictObject({
628
623
  * @returns {SuccessResponse}
629
624
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-3-assets
630
625
  */
631
- exports.PerpDeployRequest = v.pipe(v.strictObject({
626
+ exports.PerpDeployRequest = v.pipe(v.object({
632
627
  /** Action to perform. */
633
628
  action: v.pipe(v.union([
634
- v.pipe(v.strictObject({
629
+ v.pipe(v.object({
635
630
  /** Type of action. */
636
631
  type: v.pipe(v.literal("perpDeploy"), v.description("Type of action.")),
637
632
  /** Parameters for registering a new perpetual asset. */
638
- registerAsset: v.pipe(v.strictObject({
633
+ registerAsset: v.pipe(v.object({
639
634
  /** Max gas in native token wei. If not provided, then uses current deploy auction price. */
640
- maxGas: v.pipe(v.nullable(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Max gas in native token wei. If not provided, then uses current deploy auction price.")),
635
+ maxGas: v.pipe(v.nullable(_base_js_1.UnsignedIntegerMayInputString), v.description("Max gas in native token wei. If not provided, then uses current deploy auction price.")),
641
636
  /** Contains new asset listing parameters. */
642
- assetRequest: v.pipe(v.strictObject({
637
+ assetRequest: v.pipe(v.object({
643
638
  /** Coin symbol for the new asset. */
644
639
  coin: v.pipe(v.string(), v.description("Coin symbol for the new asset.")),
645
640
  /** Number of decimal places for size. */
646
- szDecimals: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Number of decimal places for size.")),
641
+ szDecimals: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Number of decimal places for size.")),
647
642
  /** Initial oracle price for the asset. */
648
- oraclePx: v.pipe(_base_js_1.UnsignedDecimal, v.description("Initial oracle price for the asset.")),
643
+ oraclePx: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Initial oracle price for the asset.")),
649
644
  /** Margin table identifier for risk management. */
650
- marginTableId: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Margin table identifier for risk management.")),
645
+ marginTableId: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Margin table identifier for risk management.")),
651
646
  /** Whether the asset can only be traded with isolated margin. */
652
647
  onlyIsolated: v.pipe(v.boolean(), v.description("Whether the asset can only be traded with isolated margin.")),
653
648
  }), v.description("Contains new asset listing parameters.")),
654
649
  /** Name of the dex. */
655
650
  dex: v.pipe(v.string(), v.description("Name of the dex.")),
656
651
  /** Contains new dex parameters. */
657
- schema: v.pipe(v.nullable(v.strictObject({
652
+ schema: v.pipe(v.nullable(v.object({
658
653
  /** Full name of the dex. */
659
654
  fullName: v.pipe(v.string(), v.description("Full name of the dex.")),
660
655
  /** Collateral token index. */
661
- collateralToken: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Collateral token index.")),
656
+ collateralToken: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Collateral token index.")),
662
657
  /** User to update oracles. If not provided, then deployer is assumed to be oracle updater. */
663
658
  oracleUpdater: v.pipe(v.nullable(v.pipe(_base_js_1.Hex, v.length(42))), v.description("User to update oracles. If not provided, then deployer is assumed to be oracle updater.")),
664
659
  })), v.description("Contains new dex parameters.")),
665
660
  }), v.description("Parameters for registering a new perpetual asset.")),
666
661
  }), v.description("Register asset variant")),
667
- v.pipe(v.strictObject({
662
+ v.pipe(v.object({
668
663
  /** Type of action. */
669
664
  type: v.pipe(v.literal("perpDeploy"), v.description("Type of action.")),
670
665
  /** Parameters for setting oracle and mark prices for assets. */
671
- setOracle: v.pipe(v.strictObject({
666
+ setOracle: v.pipe(v.object({
672
667
  /** Name of the dex. */
673
668
  dex: v.pipe(v.string(), v.minLength(1), v.description("Name of the dex.")),
674
669
  /** A list (sorted by key) of asset and oracle prices. */
675
- oraclePxs: v.pipe(v.array(v.strictTuple([v.string(), _base_js_1.UnsignedDecimal])), v.description("A list (sorted by key) of asset and oracle prices.")),
670
+ oraclePxs: v.pipe(v.array(v.tuple([v.string(), _base_js_1.UnsignedDecimalMayInputNumber])), v.description("A list (sorted by key) of asset and oracle prices.")),
676
671
  /** An outer list of inner lists (inner list sorted by key) of asset and mark prices. */
677
- markPxs: v.pipe(v.array(v.array(v.strictTuple([v.string(), _base_js_1.UnsignedDecimal]))), v.description("An outer list of inner lists (inner list sorted by key) of asset and mark prices.")),
672
+ markPxs: v.pipe(v.array(v.array(v.tuple([v.string(), _base_js_1.UnsignedDecimalMayInputNumber]))), v.description("An outer list of inner lists (inner list sorted by key) of asset and mark prices.")),
678
673
  }), v.description("Parameters for setting oracle and mark prices for assets.")),
679
674
  }), v.description("Set oracle variant")),
680
675
  ]), v.description("Action to perform.")),
681
676
  /** Unique request identifier (current timestamp in ms). */
682
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
677
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
683
678
  /** Cryptographic signature. */
684
679
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
685
680
  /** Expiration time of the action. */
686
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
681
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
687
682
  }), v.transform(removeUndefinedKeys), v.description("Deploying HIP-3 assets:" +
688
683
  "\n- Register Asset" +
689
684
  "\n- Set Oracle"));
@@ -692,49 +687,49 @@ exports.PerpDeployRequest = v.pipe(v.strictObject({
692
687
  * @returns {SuccessResponse}
693
688
  * @see null
694
689
  */
695
- exports.RegisterReferrerRequest = v.pipe(v.strictObject({
690
+ exports.RegisterReferrerRequest = v.pipe(v.object({
696
691
  /** Action to perform. */
697
- action: v.pipe(v.strictObject({
692
+ action: v.pipe(v.object({
698
693
  /** Type of action. */
699
694
  type: v.pipe(v.literal("registerReferrer"), v.description("Type of action.")),
700
695
  /** Referral code to create. */
701
696
  code: v.pipe(v.string(), v.minLength(1), v.description("Referral code to create.")),
702
697
  }), v.description("Action to perform.")),
703
698
  /** Unique request identifier (current timestamp in ms). */
704
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
699
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
705
700
  /** Cryptographic signature. */
706
701
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
707
702
  /** Expiration time of the action. */
708
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
703
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
709
704
  }), v.transform(removeUndefinedKeys), v.description("Create a referral code."));
710
705
  /**
711
706
  * Reserve additional rate-limited actions for a fee.
712
707
  * @returns {SuccessResponse}
713
708
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#reserve-additional-actions
714
709
  */
715
- exports.ReserveRequestWeightRequest = v.pipe(v.strictObject({
710
+ exports.ReserveRequestWeightRequest = v.pipe(v.object({
716
711
  /** Action to perform. */
717
- action: v.pipe(v.strictObject({
712
+ action: v.pipe(v.object({
718
713
  /** Type of action. */
719
714
  type: v.pipe(v.literal("reserveRequestWeight"), v.description("Type of action.")),
720
715
  /** Amount of request weight to reserve. */
721
- weight: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount of request weight to reserve.")),
716
+ weight: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount of request weight to reserve.")),
722
717
  }), v.description("Action to perform.")),
723
718
  /** Unique request identifier (current timestamp in ms). */
724
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
719
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
725
720
  /** Cryptographic signature. */
726
721
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
727
722
  /** Expiration time of the action. */
728
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
723
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
729
724
  }), v.transform(removeUndefinedKeys), v.description("Reserve additional rate-limited actions for a fee."));
730
725
  /**
731
726
  * Schedule a cancel-all operation at a future time.
732
727
  * @returns {SuccessResponse}
733
728
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#schedule-cancel-dead-mans-switch
734
729
  */
735
- exports.ScheduleCancelRequest = v.pipe(v.strictObject({
730
+ exports.ScheduleCancelRequest = v.pipe(v.object({
736
731
  /** Action to perform. */
737
- action: v.pipe(v.strictObject({
732
+ action: v.pipe(v.object({
738
733
  /** Type of action. */
739
734
  type: v.pipe(v.literal("scheduleCancel"), v.description("Type of action.")),
740
735
  /**
@@ -743,27 +738,27 @@ exports.ScheduleCancelRequest = v.pipe(v.strictObject({
743
738
  *
744
739
  * If not specified, will cause all scheduled cancel operations to be deleted.
745
740
  */
746
- time: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Scheduled time (in ms since epoch)." +
741
+ time: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Scheduled time (in ms since epoch)." +
747
742
  "\nMust be at least 5 seconds in the future." +
748
743
  "\n\nIf not specified, will cause all scheduled cancel operations to be deleted.")),
749
744
  }), v.description("Action to perform.")),
750
745
  /** Unique request identifier (current timestamp in ms). */
751
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
746
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
752
747
  /** Cryptographic signature. */
753
748
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
754
749
  /** Vault address (for vault trading). */
755
750
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
756
751
  /** Expiration time of the action. */
757
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
752
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
758
753
  }), v.transform(removeUndefinedKeys), v.description("Schedule a cancel-all operation at a future time."));
759
754
  /**
760
755
  * Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts.
761
756
  * @returns {SuccessResponse}
762
757
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#send-asset-testnet-only
763
758
  */
764
- exports.SendAssetRequest = v.pipe(v.strictObject({
759
+ exports.SendAssetRequest = v.pipe(v.object({
765
760
  /** Action to perform. */
766
- action: v.pipe(v.strictObject({
761
+ action: v.pipe(v.object({
767
762
  /** Type of action. */
768
763
  type: v.pipe(v.literal("sendAsset"), v.description("Type of action.")),
769
764
  /** Chain ID used for signing. */
@@ -779,17 +774,17 @@ exports.SendAssetRequest = v.pipe(v.strictObject({
779
774
  /** Token identifier. */
780
775
  token: v.pipe(_base_js_1.TokenId, v.description("Token identifier.")),
781
776
  /** Amount to send (not in wei). */
782
- amount: v.pipe(_base_js_1.UnsignedDecimal, v.description("Amount to send (not in wei).")),
777
+ amount: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Amount to send (not in wei).")),
783
778
  /** Source sub-account address ("" for main account). */
784
779
  fromSubAccount: v.pipe(v.union([
785
780
  v.literal(""),
786
781
  v.pipe(_base_js_1.Hex, v.length(42)),
787
782
  ]), v.description('Source sub-account address ("" for main account).')),
788
783
  /** Unique request identifier (current timestamp in ms). */
789
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
784
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
790
785
  }), v.description("Action to perform.")),
791
786
  /** Unique request identifier (current timestamp in ms). */
792
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
787
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
793
788
  /** Cryptographic signature. */
794
789
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
795
790
  }), v.transform(removeUndefinedKeys), v.description("Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts."));
@@ -798,9 +793,9 @@ exports.SendAssetRequest = v.pipe(v.strictObject({
798
793
  * @returns {SuccessResponse}
799
794
  * @see null
800
795
  */
801
- exports.SetDisplayNameRequest = v.pipe(v.strictObject({
796
+ exports.SetDisplayNameRequest = v.pipe(v.object({
802
797
  /** Action to perform. */
803
- action: v.pipe(v.strictObject({
798
+ action: v.pipe(v.object({
804
799
  /** Type of action. */
805
800
  type: v.pipe(v.literal("setDisplayName"), v.description("Type of action.")),
806
801
  /**
@@ -812,31 +807,31 @@ exports.SetDisplayNameRequest = v.pipe(v.strictObject({
812
807
  "\n\nSet to an empty string to remove the display name.")),
813
808
  }), v.description("Action to perform.")),
814
809
  /** Unique request identifier (current timestamp in ms). */
815
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
810
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
816
811
  /** Cryptographic signature. */
817
812
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
818
813
  /** Expiration time of the action. */
819
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
814
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
820
815
  }), v.transform(removeUndefinedKeys), v.description("Set the display name in the leaderboard."));
821
816
  /**
822
817
  * Set a referral code.
823
818
  * @returns {SuccessResponse}
824
819
  * @see null
825
820
  */
826
- exports.SetReferrerRequest = v.pipe(v.strictObject({
821
+ exports.SetReferrerRequest = v.pipe(v.object({
827
822
  /** Action to perform. */
828
- action: v.pipe(v.strictObject({
823
+ action: v.pipe(v.object({
829
824
  /** Type of action. */
830
825
  type: v.pipe(v.literal("setReferrer"), v.description("Type of action.")),
831
826
  /** Referral code. */
832
827
  code: v.pipe(v.string(), v.minLength(1), v.description("Referral code.")),
833
828
  }), v.description("Action to perform.")),
834
829
  /** Unique request identifier (current timestamp in ms). */
835
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
830
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
836
831
  /** Cryptographic signature. */
837
832
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
838
833
  /** Expiration time of the action. */
839
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
834
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
840
835
  }), v.transform(removeUndefinedKeys), v.description("Set a referral code."));
841
836
  /**
842
837
  * Deploying HIP-1 and HIP-2 assets:
@@ -849,107 +844,107 @@ exports.SetReferrerRequest = v.pipe(v.strictObject({
849
844
  * @returns {SuccessResponse}
850
845
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/deploying-hip-1-and-hip-2-assets
851
846
  */
852
- exports.SpotDeployRequest = v.pipe(v.strictObject({
847
+ exports.SpotDeployRequest = v.pipe(v.object({
853
848
  /** Action to perform. */
854
849
  action: v.pipe(v.union([
855
- v.pipe(v.strictObject({
850
+ v.pipe(v.object({
856
851
  /** Type of action. */
857
852
  type: v.pipe(v.literal("spotDeploy"), v.description("Type of action.")),
858
853
  /** Genesis parameters. */
859
- genesis: v.pipe(v.strictObject({
854
+ genesis: v.pipe(v.object({
860
855
  /** Token identifier. */
861
- token: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Token identifier.")),
856
+ token: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Token identifier.")),
862
857
  /** Maximum token supply. */
863
- maxSupply: v.pipe(_base_js_1.UnsignedDecimal, v.description("Maximum token supply.")),
858
+ maxSupply: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Maximum token supply.")),
864
859
  /** Set hyperliquidity balance to 0. */
865
860
  noHyperliquidity: v.pipe(v.optional(v.literal(true)), v.description("Set hyperliquidity balance to 0.")),
866
861
  }), v.description("Genesis parameters.")),
867
862
  }), v.description("Genesis variant")),
868
- v.pipe(v.strictObject({
863
+ v.pipe(v.object({
869
864
  /** Type of action. */
870
865
  type: v.pipe(v.literal("spotDeploy"), v.description("Type of action.")),
871
866
  /** Register hyperliquidity parameters. */
872
- registerHyperliquidity: v.pipe(v.strictObject({
867
+ registerHyperliquidity: v.pipe(v.object({
873
868
  /** Spot index (distinct from base token index). */
874
- spot: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Spot index (distinct from base token index).")),
869
+ spot: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Spot index (distinct from base token index).")),
875
870
  /** Starting price for liquidity seeding. */
876
- startPx: v.pipe(_base_js_1.UnsignedDecimal, v.description("Starting price for liquidity seeding.")),
871
+ startPx: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Starting price for liquidity seeding.")),
877
872
  /** Order size as a float (not in wei). */
878
- orderSz: v.pipe(_base_js_1.UnsignedDecimal, v.description("Order size as a float (not in wei).")),
873
+ orderSz: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Order size as a float (not in wei).")),
879
874
  /** Total number of orders to place. */
880
- nOrders: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Total number of orders to place.")),
875
+ nOrders: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Total number of orders to place.")),
881
876
  /** Number of levels to seed with USDC. */
882
- nSeededLevels: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Number of levels to seed with USDC.")),
877
+ nSeededLevels: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Number of levels to seed with USDC.")),
883
878
  }), v.description("Register hyperliquidity parameters.")),
884
879
  }), v.description("Register hyperliquidity variant")),
885
- v.pipe(v.strictObject({
880
+ v.pipe(v.object({
886
881
  /** Type of action. */
887
882
  type: v.pipe(v.literal("spotDeploy"), v.description("Type of action.")),
888
883
  /** Register spot parameters. */
889
- registerSpot: v.pipe(v.strictObject({
884
+ registerSpot: v.pipe(v.object({
890
885
  /** Tuple containing base and quote token indices. */
891
- tokens: v.pipe(v.strictTuple([
892
- v.pipe(v.number(), v.safeInteger(), v.minValue(0)),
893
- v.pipe(v.number(), v.safeInteger(), v.minValue(0)),
886
+ tokens: v.pipe(v.tuple([
887
+ _base_js_1.UnsignedIntegerMayInputString,
888
+ _base_js_1.UnsignedIntegerMayInputString,
894
889
  ]), v.description("Tuple containing base and quote token indices.")),
895
890
  }), v.description("Register spot parameters.")),
896
891
  }), v.description("Register spot variant")),
897
- v.pipe(v.strictObject({
892
+ v.pipe(v.object({
898
893
  /** Type of action. */
899
894
  type: v.pipe(v.literal("spotDeploy"), v.description("Type of action.")),
900
895
  /** Register token parameters. */
901
- registerToken2: v.pipe(v.strictObject({
896
+ registerToken2: v.pipe(v.object({
902
897
  /** Token specifications. */
903
- spec: v.pipe(v.strictObject({
898
+ spec: v.pipe(v.object({
904
899
  /** Token name. */
905
900
  name: v.pipe(v.string(), v.description("Token name.")),
906
901
  /** Number of decimals for token size. */
907
- szDecimals: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Number of decimals for token size.")),
902
+ szDecimals: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Number of decimals for token size.")),
908
903
  /** Number of decimals for token amounts in wei. */
909
- weiDecimals: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Number of decimals for token amounts in wei.")),
904
+ weiDecimals: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Number of decimals for token amounts in wei.")),
910
905
  }), v.description("Token specifications.")),
911
906
  /** Maximum gas allowed for registration. */
912
- maxGas: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Maximum gas allowed for registration.")),
907
+ maxGas: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Maximum gas allowed for registration.")),
913
908
  /** Optional full token name. */
914
909
  fullName: v.pipe(v.optional(v.string()), v.description("Optional full token name.")),
915
910
  }), v.description("Register token parameters.")),
916
911
  }), v.description("Register token variant")),
917
- v.pipe(v.strictObject({
912
+ v.pipe(v.object({
918
913
  /** Type of action. */
919
914
  type: v.pipe(v.literal("spotDeploy"), v.description("Type of action.")),
920
915
  /** Set deployer trading fee share parameters. */
921
- setDeployerTradingFeeShare: v.pipe(v.strictObject({
916
+ setDeployerTradingFeeShare: v.pipe(v.object({
922
917
  /** Token identifier. */
923
- token: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Token identifier.")),
918
+ token: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Token identifier.")),
924
919
  /** The deployer trading fee share. Range is 0% to 100%. */
925
920
  share: v.pipe(Percent, v.description("The deployer trading fee share. Range is 0% to 100%.")),
926
921
  }), v.description("Set deployer trading fee share parameters.")),
927
922
  }), v.description("Set deployer trading fee share variant")),
928
- v.pipe(v.strictObject({
923
+ v.pipe(v.object({
929
924
  /** Type of action. */
930
925
  type: v.pipe(v.literal("spotDeploy"), v.description("Type of action.")),
931
926
  /** User genesis parameters. */
932
- userGenesis: v.pipe(v.strictObject({
927
+ userGenesis: v.pipe(v.object({
933
928
  /** Token identifier. */
934
- token: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Token identifier.")),
929
+ token: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Token identifier.")),
935
930
  /** Array of tuples: [user address, genesis amount in wei]. */
936
- userAndWei: v.pipe(v.array(v.strictTuple([v.pipe(_base_js_1.Hex, v.length(42)), _base_js_1.UnsignedDecimal])), v.description("Array of tuples: [user address, genesis amount in wei].")),
931
+ userAndWei: v.pipe(v.array(v.tuple([v.pipe(_base_js_1.Hex, v.length(42)), _base_js_1.UnsignedDecimalMayInputNumber])), v.description("Array of tuples: [user address, genesis amount in wei].")),
937
932
  /** Array of tuples: [existing token identifier, genesis amount in wei]. */
938
- existingTokenAndWei: v.pipe(v.array(v.strictTuple([
939
- v.pipe(v.number(), v.safeInteger(), v.minValue(0)),
940
- _base_js_1.UnsignedDecimal,
933
+ existingTokenAndWei: v.pipe(v.array(v.tuple([
934
+ _base_js_1.UnsignedIntegerMayInputString,
935
+ _base_js_1.UnsignedDecimalMayInputNumber,
941
936
  ])), v.description("Array of tuples: [existing token identifier, genesis amount in wei].")),
942
937
  /** Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user). */
943
- blacklistUsers: v.pipe(v.optional(v.array(v.strictTuple([v.pipe(_base_js_1.Hex, v.length(42)), v.boolean()]))), v.description("Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user).")),
938
+ blacklistUsers: v.pipe(v.optional(v.array(v.tuple([v.pipe(_base_js_1.Hex, v.length(42)), v.boolean()]))), v.description("Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user).")),
944
939
  }), v.description("User genesis parameters.")),
945
940
  }), v.description("User genesis variant")),
946
941
  ]), v.description("Action to perform.")),
947
942
  /** Unique request identifier (current timestamp in ms). */
948
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
943
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
949
944
  /** Cryptographic signature. */
950
945
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
951
946
  /** Expiration time of the action. */
952
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
947
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
953
948
  }), v.transform(removeUndefinedKeys), v.description("Deploying HIP-1 and HIP-2 assets:" +
954
949
  "\n- Genesis" +
955
950
  "\n- Register Hyperliquidity" +
@@ -962,9 +957,9 @@ exports.SpotDeployRequest = v.pipe(v.strictObject({
962
957
  * @returns {SuccessResponse}
963
958
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#core-spot-transfer
964
959
  */
965
- exports.SpotSendRequest = v.pipe(v.strictObject({
960
+ exports.SpotSendRequest = v.pipe(v.object({
966
961
  /** Action to perform. */
967
- action: v.pipe(v.strictObject({
962
+ action: v.pipe(v.object({
968
963
  /** Type of action. */
969
964
  type: v.pipe(v.literal("spotSend"), v.description("Type of action.")),
970
965
  /** Chain ID used for signing. */
@@ -976,12 +971,12 @@ exports.SpotSendRequest = v.pipe(v.strictObject({
976
971
  /** Token identifier. */
977
972
  token: v.pipe(_base_js_1.TokenId, v.description("Token identifier.")),
978
973
  /** Amount to send (not in wei). */
979
- amount: v.pipe(_base_js_1.UnsignedDecimal, v.description("Amount to send (not in wei).")),
974
+ amount: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Amount to send (not in wei).")),
980
975
  /** Unique request identifier (current timestamp in ms). */
981
- time: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
976
+ time: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
982
977
  }), v.description("Action to perform.")),
983
978
  /** Unique request identifier (current timestamp in ms). */
984
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
979
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
985
980
  /** Cryptographic signature. */
986
981
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
987
982
  }), v.transform(removeUndefinedKeys), v.description("Send spot assets to another address."));
@@ -990,32 +985,32 @@ exports.SpotSendRequest = v.pipe(v.strictObject({
990
985
  * @returns {SuccessResponse}
991
986
  * @see null
992
987
  */
993
- exports.SpotUserRequest = v.pipe(v.strictObject({
988
+ exports.SpotUserRequest = v.pipe(v.object({
994
989
  /** Action to perform. */
995
- action: v.pipe(v.strictObject({
990
+ action: v.pipe(v.object({
996
991
  /** Type of action. */
997
992
  type: v.pipe(v.literal("spotUser"), v.description("Type of action.")),
998
993
  /** Spot dusting options. */
999
- toggleSpotDusting: v.pipe(v.strictObject({
994
+ toggleSpotDusting: v.pipe(v.object({
1000
995
  /** Opt out of spot dusting. */
1001
996
  optOut: v.pipe(v.boolean(), v.description("Opt out of spot dusting.")),
1002
997
  }), v.description("Spot dusting options.")),
1003
998
  }), v.description("Action to perform.")),
1004
999
  /** Unique request identifier (current timestamp in ms). */
1005
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1000
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1006
1001
  /** Cryptographic signature. */
1007
1002
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1008
1003
  /** Expiration time of the action. */
1009
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1004
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1010
1005
  }), v.transform(removeUndefinedKeys), v.description("Opt Out of Spot Dusting."));
1011
1006
  /**
1012
1007
  * Modify a sub-account.
1013
1008
  * @returns {SuccessResponse}
1014
1009
  * @see null
1015
1010
  */
1016
- exports.SubAccountModifyRequest = v.pipe(v.strictObject({
1011
+ exports.SubAccountModifyRequest = v.pipe(v.object({
1017
1012
  /** Action to perform. */
1018
- action: v.pipe(v.strictObject({
1013
+ action: v.pipe(v.object({
1019
1014
  /** Type of action. */
1020
1015
  type: v.pipe(v.literal("subAccountModify"), v.description("Type of action.")),
1021
1016
  /** Sub-account address to modify. */
@@ -1024,20 +1019,20 @@ exports.SubAccountModifyRequest = v.pipe(v.strictObject({
1024
1019
  name: v.pipe(v.string(), v.minLength(1), v.description("New sub-account name.")),
1025
1020
  }), v.description("Action to perform.")),
1026
1021
  /** Unique request identifier (current timestamp in ms). */
1027
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1022
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1028
1023
  /** Cryptographic signature. */
1029
1024
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1030
1025
  /** Expiration time of the action. */
1031
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1026
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1032
1027
  }), v.transform(removeUndefinedKeys), v.description("Modify a sub-account."));
1033
1028
  /**
1034
1029
  * Transfer between sub-accounts (spot).
1035
1030
  * @returns {SuccessResponse}
1036
1031
  * @see null
1037
1032
  */
1038
- exports.SubAccountSpotTransferRequest = v.pipe(v.strictObject({
1033
+ exports.SubAccountSpotTransferRequest = v.pipe(v.object({
1039
1034
  /** Action to perform. */
1040
- action: v.pipe(v.strictObject({
1035
+ action: v.pipe(v.object({
1041
1036
  /** Type of action. */
1042
1037
  type: v.pipe(v.literal("subAccountSpotTransfer"), v.description("Type of action.")),
1043
1038
  /** Sub-account address. */
@@ -1047,23 +1042,23 @@ exports.SubAccountSpotTransferRequest = v.pipe(v.strictObject({
1047
1042
  /** Token identifier. */
1048
1043
  token: v.pipe(_base_js_1.TokenId, v.description("Token identifier.")),
1049
1044
  /** Amount to send (not in wei). */
1050
- amount: v.pipe(_base_js_1.UnsignedDecimal, v.description("Amount to send (not in wei).")),
1045
+ amount: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Amount to send (not in wei).")),
1051
1046
  }), v.description("Action to perform.")),
1052
1047
  /** Unique request identifier (current timestamp in ms). */
1053
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1048
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1054
1049
  /** Cryptographic signature. */
1055
1050
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1056
1051
  /** Expiration time of the action. */
1057
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1052
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1058
1053
  }), v.transform(removeUndefinedKeys), v.description("Transfer between sub-accounts (spot)."));
1059
1054
  /**
1060
1055
  * Transfer between sub-accounts (perpetual).
1061
1056
  * @returns {SuccessResponse}
1062
1057
  * @see null
1063
1058
  */
1064
- exports.SubAccountTransferRequest = v.pipe(v.strictObject({
1059
+ exports.SubAccountTransferRequest = v.pipe(v.object({
1065
1060
  /** Action to perform. */
1066
- action: v.pipe(v.strictObject({
1061
+ action: v.pipe(v.object({
1067
1062
  /** Type of action. */
1068
1063
  type: v.pipe(v.literal("subAccountTransfer"), v.description("Type of action.")),
1069
1064
  /** Sub-account address. */
@@ -1071,23 +1066,23 @@ exports.SubAccountTransferRequest = v.pipe(v.strictObject({
1071
1066
  /** `true` for deposit, `false` for withdrawal. */
1072
1067
  isDeposit: v.pipe(v.boolean(), v.description("`true` for deposit, `false` for withdrawal.")),
1073
1068
  /** Amount to transfer (float * 1e6). */
1074
- usd: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount to transfer (float * 1e6).")),
1069
+ usd: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount to transfer (float * 1e6).")),
1075
1070
  }), v.description("Action to perform.")),
1076
1071
  /** Unique request identifier (current timestamp in ms). */
1077
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1072
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1078
1073
  /** Cryptographic signature. */
1079
1074
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1080
1075
  /** Expiration time of the action. */
1081
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1076
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1082
1077
  }), v.transform(removeUndefinedKeys), v.description("Transfer between sub-accounts (perpetual)."));
1083
1078
  /**
1084
1079
  * Delegate or undelegate native tokens to or from a validator.
1085
1080
  * @returns {SuccessResponse}
1086
1081
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#delegate-or-undelegate-stake-from-validator
1087
1082
  */
1088
- exports.TokenDelegateRequest = v.pipe(v.strictObject({
1083
+ exports.TokenDelegateRequest = v.pipe(v.object({
1089
1084
  /** Action to perform. */
1090
- action: v.pipe(v.strictObject({
1085
+ action: v.pipe(v.object({
1091
1086
  /** Type of action. */
1092
1087
  type: v.pipe(v.literal("tokenDelegate"), v.description("Type of action.")),
1093
1088
  /** Chain ID used for signing. */
@@ -1097,14 +1092,14 @@ exports.TokenDelegateRequest = v.pipe(v.strictObject({
1097
1092
  /** Validator address. */
1098
1093
  validator: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Validator address.")),
1099
1094
  /** Amount for delegate/undelegate (float * 1e8). */
1100
- wei: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount for delegate/undelegate (float * 1e8).")),
1095
+ wei: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount for delegate/undelegate (float * 1e8).")),
1101
1096
  /** `true` for undelegate, `false` for delegate. */
1102
1097
  isUndelegate: v.pipe(v.boolean(), v.description("`true` for undelegate, `false` for delegate.")),
1103
1098
  /** Unique request identifier (current timestamp in ms). */
1104
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1099
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1105
1100
  }), v.description("Action to perform.")),
1106
1101
  /** Unique request identifier (current timestamp in ms). */
1107
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1102
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1108
1103
  /** Cryptographic signature. */
1109
1104
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1110
1105
  }), v.transform(removeUndefinedKeys), v.description("Delegate or undelegate native tokens to or from a validator."));
@@ -1113,120 +1108,120 @@ exports.TokenDelegateRequest = v.pipe(v.strictObject({
1113
1108
  * @returns {TwapCancelResponse}
1114
1109
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#cancel-a-twap-order
1115
1110
  */
1116
- exports.TwapCancelRequest = v.pipe(v.strictObject({
1111
+ exports.TwapCancelRequest = v.pipe(v.object({
1117
1112
  /** Action to perform. */
1118
- action: v.pipe(v.strictObject({
1113
+ action: v.pipe(v.object({
1119
1114
  /** Type of action. */
1120
1115
  type: v.pipe(v.literal("twapCancel"), v.description("Type of action.")),
1121
1116
  /** Asset ID. */
1122
- a: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
1117
+ a: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
1123
1118
  /** Twap ID. */
1124
- t: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Twap ID.")),
1119
+ t: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Twap ID.")),
1125
1120
  }), v.description("Action to perform.")),
1126
1121
  /** Unique request identifier (current timestamp in ms). */
1127
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1122
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1128
1123
  /** Cryptographic signature. */
1129
1124
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1130
1125
  /** Vault address (for vault trading). */
1131
1126
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1132
1127
  /** Expiration time of the action. */
1133
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1128
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1134
1129
  }), v.transform(removeUndefinedKeys), v.description("Cancel a TWAP order."));
1135
1130
  /**
1136
1131
  * Place a TWAP order.
1137
1132
  * @returns {TwapOrderResponse}
1138
1133
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#place-a-twap-order
1139
1134
  */
1140
- exports.TwapOrderRequest = v.pipe(v.strictObject({
1135
+ exports.TwapOrderRequest = v.pipe(v.object({
1141
1136
  /** Action to perform. */
1142
- action: v.pipe(v.strictObject({
1137
+ action: v.pipe(v.object({
1143
1138
  /** Type of action. */
1144
1139
  type: v.pipe(v.literal("twapOrder"), v.description("Type of action.")),
1145
1140
  /** Twap parameters. */
1146
- twap: v.pipe(v.strictObject({
1141
+ twap: v.pipe(v.object({
1147
1142
  /** Asset ID. */
1148
- a: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
1143
+ a: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
1149
1144
  /** Position side (`true` for long, `false` for short). */
1150
1145
  b: v.pipe(v.boolean(), v.description("Position side (`true` for long, `false` for short).")),
1151
1146
  /** Size (in base currency units). */
1152
- s: v.pipe(_base_js_1.UnsignedDecimal, v.description("Size (in base currency units).")),
1147
+ s: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Size (in base currency units).")),
1153
1148
  /** Is reduce-only? */
1154
1149
  r: v.pipe(v.boolean(), v.description("Is reduce-only?")),
1155
1150
  /** TWAP duration in minutes. */
1156
- m: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("TWAP duration in minutes.")),
1151
+ m: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("TWAP duration in minutes.")),
1157
1152
  /** Enable random order timing. */
1158
1153
  t: v.pipe(v.boolean(), v.description("Enable random order timing.")),
1159
1154
  }), v.description("Twap parameters.")),
1160
1155
  }), v.description("Action to perform.")),
1161
1156
  /** Unique request identifier (current timestamp in ms). */
1162
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1157
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1163
1158
  /** Cryptographic signature. */
1164
1159
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1165
1160
  /** Vault address (for vault trading). */
1166
1161
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1167
1162
  /** Expiration time of the action. */
1168
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1163
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1169
1164
  }), v.transform(removeUndefinedKeys), v.description("Place a TWAP order."));
1170
1165
  /**
1171
1166
  * Add or remove margin from isolated position.
1172
1167
  * @returns {SuccessResponse}
1173
1168
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-isolated-margin
1174
1169
  */
1175
- exports.UpdateIsolatedMarginRequest = v.pipe(v.strictObject({
1170
+ exports.UpdateIsolatedMarginRequest = v.pipe(v.object({
1176
1171
  /** Action to perform. */
1177
- action: v.pipe(v.strictObject({
1172
+ action: v.pipe(v.object({
1178
1173
  /** Type of action. */
1179
1174
  type: v.pipe(v.literal("updateIsolatedMargin"), v.description("Type of action.")),
1180
1175
  /** Asset ID. */
1181
- asset: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
1176
+ asset: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
1182
1177
  /** Position side (`true` for long, `false` for short). */
1183
1178
  isBuy: v.pipe(v.boolean(), v.description("Position side (`true` for long, `false` for short).")),
1184
1179
  /** Amount to adjust (float * 1e6). */
1185
- ntli: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount to adjust (float * 1e6).")),
1180
+ ntli: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount to adjust (float * 1e6).")),
1186
1181
  }), v.description("Action to perform.")),
1187
1182
  /** Unique request identifier (current timestamp in ms). */
1188
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1183
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1189
1184
  /** Cryptographic signature. */
1190
1185
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1191
1186
  /** Vault address (for vault trading). */
1192
1187
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1193
1188
  /** Expiration time of the action. */
1194
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1189
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1195
1190
  }), v.transform(removeUndefinedKeys), v.description("Add or remove margin from isolated position."));
1196
1191
  /**
1197
1192
  * Update cross or isolated leverage on a coin.
1198
1193
  * @returns {SuccessResponse}
1199
1194
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#update-leverage
1200
1195
  */
1201
- exports.UpdateLeverageRequest = v.pipe(v.strictObject({
1196
+ exports.UpdateLeverageRequest = v.pipe(v.object({
1202
1197
  /** Action to perform. */
1203
- action: v.pipe(v.strictObject({
1198
+ action: v.pipe(v.object({
1204
1199
  /** Type of action. */
1205
1200
  type: v.pipe(v.literal("updateLeverage"), v.description("Type of action.")),
1206
1201
  /** Asset ID. */
1207
- asset: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Asset ID.")),
1202
+ asset: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Asset ID.")),
1208
1203
  /** `true` for cross leverage, `false` for isolated leverage. */
1209
1204
  isCross: v.pipe(v.boolean(), v.description("`true` for cross leverage, `false` for isolated leverage.")),
1210
1205
  /** New leverage value. */
1211
- leverage: v.pipe(v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.minValue(1)), v.description("New leverage value.")),
1206
+ leverage: v.pipe(v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.minValue(1)), v.description("New leverage value.")),
1212
1207
  }), v.description("Action to perform.")),
1213
1208
  /** Unique request identifier (current timestamp in ms). */
1214
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1209
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1215
1210
  /** Cryptographic signature. */
1216
1211
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1217
1212
  /** Vault address (for vault trading). */
1218
1213
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1219
1214
  /** Expiration time of the action. */
1220
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1215
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1221
1216
  }), v.transform(removeUndefinedKeys), v.description("Update cross or isolated leverage on a coin."));
1222
1217
  /**
1223
1218
  * Transfer funds between Spot account and Perp account.
1224
1219
  * @returns {SuccessResponse}
1225
1220
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#transfer-from-spot-account-to-perp-account-and-vice-versa
1226
1221
  */
1227
- exports.UsdClassTransferRequest = v.pipe(v.strictObject({
1222
+ exports.UsdClassTransferRequest = v.pipe(v.object({
1228
1223
  /** Action to perform. */
1229
- action: v.pipe(v.strictObject({
1224
+ action: v.pipe(v.object({
1230
1225
  /** Type of action. */
1231
1226
  type: v.pipe(v.literal("usdClassTransfer"), v.description("Type of action.")),
1232
1227
  /** Chain ID used for signing. */
@@ -1234,14 +1229,14 @@ exports.UsdClassTransferRequest = v.pipe(v.strictObject({
1234
1229
  /** HyperLiquid network. */
1235
1230
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
1236
1231
  /** Amount to transfer (1 = 1$). */
1237
- amount: v.pipe(_base_js_1.UnsignedDecimal, v.description("Amount to transfer (1 = 1$).")),
1232
+ amount: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Amount to transfer (1 = 1$).")),
1238
1233
  /** `true` for Spot to Perp, `false` for Perp to Spot. */
1239
1234
  toPerp: v.pipe(v.boolean(), v.description("`true` for Spot to Perp, `false` for Perp to Spot.")),
1240
1235
  /** Unique request identifier (current timestamp in ms). */
1241
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1236
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1242
1237
  }), v.description("Action to perform.")),
1243
1238
  /** Unique request identifier (current timestamp in ms). */
1244
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1239
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1245
1240
  /** Cryptographic signature. */
1246
1241
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1247
1242
  }), v.transform(removeUndefinedKeys), v.description("Transfer funds between Spot account and Perp account."));
@@ -1250,9 +1245,9 @@ exports.UsdClassTransferRequest = v.pipe(v.strictObject({
1250
1245
  * @returns {SuccessResponse}
1251
1246
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#core-usdc-transfer
1252
1247
  */
1253
- exports.UsdSendRequest = v.pipe(v.strictObject({
1248
+ exports.UsdSendRequest = v.pipe(v.object({
1254
1249
  /** Action to perform. */
1255
- action: v.pipe(v.strictObject({
1250
+ action: v.pipe(v.object({
1256
1251
  /** Type of action. */
1257
1252
  type: v.pipe(v.literal("usdSend"), v.description("Type of action.")),
1258
1253
  /** Chain ID used for signing. */
@@ -1262,12 +1257,12 @@ exports.UsdSendRequest = v.pipe(v.strictObject({
1262
1257
  /** Destination address. */
1263
1258
  destination: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Destination address.")),
1264
1259
  /** Amount to send (1 = 1$). */
1265
- amount: v.pipe(_base_js_1.UnsignedDecimal, v.description("Amount to send (1 = 1$).")),
1260
+ amount: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Amount to send (1 = 1$).")),
1266
1261
  /** Unique request identifier (current timestamp in ms). */
1267
- time: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1262
+ time: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1268
1263
  }), v.description("Action to perform.")),
1269
1264
  /** Unique request identifier (current timestamp in ms). */
1270
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1265
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1271
1266
  /** Cryptographic signature. */
1272
1267
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1273
1268
  }), v.transform(removeUndefinedKeys), v.description("Send usd to another address."));
@@ -1276,9 +1271,9 @@ exports.UsdSendRequest = v.pipe(v.strictObject({
1276
1271
  * @returns {SuccessResponse}
1277
1272
  * @see null
1278
1273
  */
1279
- exports.VaultDistributeRequest = v.pipe(v.strictObject({
1274
+ exports.VaultDistributeRequest = v.pipe(v.object({
1280
1275
  /** Action to perform. */
1281
- action: v.pipe(v.strictObject({
1276
+ action: v.pipe(v.object({
1282
1277
  /** Type of action. */
1283
1278
  type: v.pipe(v.literal("vaultDistribute"), v.description("Type of action.")),
1284
1279
  /** Vault address. */
@@ -1288,24 +1283,24 @@ exports.VaultDistributeRequest = v.pipe(v.strictObject({
1288
1283
  *
1289
1284
  * Set to 0 to close the vault.
1290
1285
  */
1291
- usd: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount to distribute (float * 1e6)." +
1286
+ usd: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount to distribute (float * 1e6)." +
1292
1287
  "\n\nSet to 0 to close the vault.")),
1293
1288
  }), v.description("Action to perform.")),
1294
1289
  /** Unique request identifier (current timestamp in ms). */
1295
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1290
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1296
1291
  /** Cryptographic signature. */
1297
1292
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1298
1293
  /** Expiration time of the action. */
1299
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1294
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1300
1295
  }), v.transform(removeUndefinedKeys), v.description("Distribute funds from a vault between followers."));
1301
1296
  /**
1302
1297
  * Modify a vault configuration.
1303
1298
  * @returns {SuccessResponse}
1304
1299
  * @see null
1305
1300
  */
1306
- exports.VaultModifyRequest = v.pipe(v.strictObject({
1301
+ exports.VaultModifyRequest = v.pipe(v.object({
1307
1302
  /** Action to perform. */
1308
- action: v.pipe(v.strictObject({
1303
+ action: v.pipe(v.object({
1309
1304
  /** Type of action. */
1310
1305
  type: v.pipe(v.literal("vaultModify"), v.description("Type of action.")),
1311
1306
  /** Vault address. */
@@ -1316,20 +1311,20 @@ exports.VaultModifyRequest = v.pipe(v.strictObject({
1316
1311
  alwaysCloseOnWithdraw: v.pipe(v.nullable(v.boolean()), v.description("Always close positions on withdrawal.")),
1317
1312
  }), v.description("Action to perform.")),
1318
1313
  /** Unique request identifier (current timestamp in ms). */
1319
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1314
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1320
1315
  /** Cryptographic signature. */
1321
1316
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1322
1317
  /** Expiration time of the action. */
1323
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1318
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1324
1319
  }), v.transform(removeUndefinedKeys), v.description("Modify a vault configuration."));
1325
1320
  /**
1326
1321
  * Deposit or withdraw from a vault.
1327
1322
  * @returns {SuccessResponse}
1328
1323
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#deposit-or-withdraw-from-a-vault
1329
1324
  */
1330
- exports.VaultTransferRequest = v.pipe(v.strictObject({
1325
+ exports.VaultTransferRequest = v.pipe(v.object({
1331
1326
  /** Action to perform. */
1332
- action: v.pipe(v.strictObject({
1327
+ action: v.pipe(v.object({
1333
1328
  /** Type of action. */
1334
1329
  type: v.pipe(v.literal("vaultTransfer"), v.description("Type of action.")),
1335
1330
  /** Vault address. */
@@ -1337,23 +1332,23 @@ exports.VaultTransferRequest = v.pipe(v.strictObject({
1337
1332
  /** `true` for deposit, `false` for withdrawal. */
1338
1333
  isDeposit: v.pipe(v.boolean(), v.description("`true` for deposit, `false` for withdrawal.")),
1339
1334
  /** Amount for deposit/withdrawal (float * 1e6). */
1340
- usd: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Amount for deposit/withdrawal (float * 1e6).")),
1335
+ usd: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Amount for deposit/withdrawal (float * 1e6).")),
1341
1336
  }), v.description("Action to perform.")),
1342
1337
  /** Unique request identifier (current timestamp in ms). */
1343
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1338
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1344
1339
  /** Cryptographic signature. */
1345
1340
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1346
1341
  /** Expiration time of the action. */
1347
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1342
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1348
1343
  }), v.transform(removeUndefinedKeys), v.description("Deposit or withdraw from a vault."));
1349
1344
  /**
1350
1345
  * Initiate a withdrawal request.
1351
1346
  * @returns {SuccessResponse}
1352
1347
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#initiate-a-withdrawal-request
1353
1348
  */
1354
- exports.Withdraw3Request = v.pipe(v.strictObject({
1349
+ exports.Withdraw3Request = v.pipe(v.object({
1355
1350
  /** Action to perform. */
1356
- action: v.pipe(v.strictObject({
1351
+ action: v.pipe(v.object({
1357
1352
  /** Type of action. */
1358
1353
  type: v.pipe(v.literal("withdraw3"), v.description("Type of action.")),
1359
1354
  /** Chain ID used for signing. */
@@ -1363,12 +1358,12 @@ exports.Withdraw3Request = v.pipe(v.strictObject({
1363
1358
  /** Destination address. */
1364
1359
  destination: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Destination address.")),
1365
1360
  /** Amount to withdraw (1 = 1$). */
1366
- amount: v.pipe(_base_js_1.UnsignedDecimal, v.description("Amount to withdraw (1 = 1$).")),
1361
+ amount: v.pipe(_base_js_1.UnsignedDecimalMayInputNumber, v.description("Amount to withdraw (1 = 1$).")),
1367
1362
  /** Unique request identifier (current timestamp in ms). */
1368
- time: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1363
+ time: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1369
1364
  }), v.description("Action to perform.")),
1370
1365
  /** Unique request identifier (current timestamp in ms). */
1371
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1366
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1372
1367
  /** Cryptographic signature. */
1373
1368
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1374
1369
  }), v.transform(removeUndefinedKeys), v.description("Initiate a withdrawal request."));
@@ -1377,9 +1372,9 @@ exports.Withdraw3Request = v.pipe(v.strictObject({
1377
1372
  * @returns {SuccessResponse}
1378
1373
  * @see https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/multi-sig
1379
1374
  */
1380
- exports.MultiSigRequest = v.pipe(v.strictObject({
1375
+ exports.MultiSigRequest = v.pipe(v.object({
1381
1376
  /** Action to perform. */
1382
- action: v.pipe(v.strictObject({
1377
+ action: v.pipe(v.object({
1383
1378
  /** Type of action. */
1384
1379
  type: v.pipe(v.literal("multiSig"), v.description("Type of action.")),
1385
1380
  /** Chain ID used for signing. */
@@ -1387,7 +1382,7 @@ exports.MultiSigRequest = v.pipe(v.strictObject({
1387
1382
  /** List of signatures from authorized signers. */
1388
1383
  signatures: v.pipe(v.array(exports.Signature), v.description("List of signatures from authorized signers.")),
1389
1384
  /** Multi-signature payload information. */
1390
- payload: v.pipe(v.strictObject({
1385
+ payload: v.pipe(v.object({
1391
1386
  /** Address of the multi-signature user account. */
1392
1387
  multiSigUser: v.pipe(v.pipe(_base_js_1.Hex, v.length(42)), v.description("Address of the multi-signature user account.")),
1393
1388
  /** Address of the authorized user initiating the request (any authorized user). */
@@ -1439,11 +1434,12 @@ exports.MultiSigRequest = v.pipe(v.strictObject({
1439
1434
  }), v.description("Multi-signature payload information.")),
1440
1435
  }), v.description("Action to perform.")),
1441
1436
  /** Unique request identifier (current timestamp in ms). */
1442
- nonce: v.pipe(v.pipe(v.number(), v.safeInteger(), v.minValue(0)), v.description("Unique request identifier (current timestamp in ms).")),
1437
+ nonce: v.pipe(_base_js_1.UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1443
1438
  /** Cryptographic signature. */
1444
1439
  signature: v.pipe(exports.Signature, v.description("Cryptographic signature.")),
1445
1440
  /** Vault address (for vault trading). */
1446
1441
  vaultAddress: v.pipe(v.optional(v.pipe(_base_js_1.Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1447
1442
  /** Expiration time of the action. */
1448
- expiresAfter: v.pipe(v.optional(v.pipe(v.number(), v.safeInteger(), v.minValue(0))), v.description("Expiration time of the action.")),
1443
+ expiresAfter: v.pipe(v.optional(_base_js_1.UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1449
1444
  }), v.transform(removeUndefinedKeys), v.description("A multi-signature request."));
1445
+ //# sourceMappingURL=requests.js.map