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

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 (223) hide show
  1. package/README.md +108 -116
  2. package/esm/bin/_utils.d.ts +80 -0
  3. package/esm/bin/_utils.d.ts.map +1 -0
  4. package/esm/bin/_utils.js +112 -0
  5. package/esm/bin/_utils.js.map +1 -0
  6. package/esm/bin/cli.js +43 -161
  7. package/esm/bin/cli.js.map +1 -1
  8. package/esm/src/clients/exchange.d.ts +93 -93
  9. package/esm/src/clients/exchange.d.ts.map +1 -1
  10. package/esm/src/clients/exchange.js +63 -58
  11. package/esm/src/clients/exchange.js.map +1 -1
  12. package/esm/src/clients/info.d.ts +113 -113
  13. package/esm/src/clients/info.d.ts.map +1 -1
  14. package/esm/src/clients/info.js +70 -73
  15. package/esm/src/clients/info.js.map +1 -1
  16. package/esm/src/clients/multiSign.d.ts +3 -3
  17. package/esm/src/clients/multiSign.d.ts.map +1 -1
  18. package/esm/src/clients/multiSign.js +4 -2
  19. package/esm/src/clients/multiSign.js.map +1 -1
  20. package/esm/src/clients/subscription.d.ts +23 -23
  21. package/esm/src/clients/subscription.d.ts.map +1 -1
  22. package/esm/src/clients/subscription.js +8 -11
  23. package/esm/src/clients/subscription.js.map +1 -1
  24. package/esm/src/schemas/_base.d.ts +6 -8
  25. package/esm/src/schemas/_base.d.ts.map +1 -1
  26. package/esm/src/schemas/_base.js +5 -28
  27. package/esm/src/schemas/_base.js.map +1 -1
  28. package/esm/src/schemas/exchange/requests.d.ts +1676 -1657
  29. package/esm/src/schemas/exchange/requests.d.ts.map +1 -1
  30. package/esm/src/schemas/exchange/requests.js +195 -199
  31. package/esm/src/schemas/exchange/requests.js.map +1 -1
  32. package/esm/src/schemas/exchange/responses.d.ts +10 -10
  33. package/esm/src/schemas/exchange/responses.js +3 -3
  34. package/esm/src/schemas/exchange/responses.js.map +1 -1
  35. package/esm/src/schemas/explorer/requests.d.ts +2 -2
  36. package/esm/src/schemas/explorer/requests.js +3 -3
  37. package/esm/src/schemas/explorer/requests.js.map +1 -1
  38. package/esm/src/schemas/explorer/responses.d.ts +16 -16
  39. package/esm/src/schemas/explorer/responses.js +3 -3
  40. package/esm/src/schemas/explorer/responses.js.map +1 -1
  41. package/esm/src/schemas/info/accounts.d.ts +298 -298
  42. package/esm/src/schemas/info/accounts.js +24 -24
  43. package/esm/src/schemas/info/accounts.js.map +1 -1
  44. package/esm/src/schemas/info/assets.d.ts +110 -110
  45. package/esm/src/schemas/info/assets.js +9 -9
  46. package/esm/src/schemas/info/assets.js.map +1 -1
  47. package/esm/src/schemas/info/markets.d.ts +25 -25
  48. package/esm/src/schemas/info/markets.js +3 -3
  49. package/esm/src/schemas/info/markets.js.map +1 -1
  50. package/esm/src/schemas/info/orders.d.ts +104 -104
  51. package/esm/src/schemas/info/orders.js +3 -3
  52. package/esm/src/schemas/info/orders.js.map +1 -1
  53. package/esm/src/schemas/info/requests.d.ts +32 -32
  54. package/esm/src/schemas/info/requests.js +55 -55
  55. package/esm/src/schemas/info/requests.js.map +1 -1
  56. package/esm/src/schemas/info/validators.d.ts +27 -27
  57. package/esm/src/schemas/info/validators.js +6 -6
  58. package/esm/src/schemas/info/validators.js.map +1 -1
  59. package/esm/src/schemas/info/vaults.d.ts +46 -46
  60. package/esm/src/schemas/info/vaults.js +10 -10
  61. package/esm/src/schemas/info/vaults.js.map +1 -1
  62. package/esm/src/schemas/subscriptions/requests.d.ts +4 -4
  63. package/esm/src/schemas/subscriptions/requests.js +17 -17
  64. package/esm/src/schemas/subscriptions/requests.js.map +1 -1
  65. package/esm/src/schemas/subscriptions/responses.d.ts +401 -401
  66. package/esm/src/schemas/subscriptions/responses.js +14 -14
  67. package/esm/src/schemas/subscriptions/responses.js.map +1 -1
  68. package/esm/src/signing/mod.js +4 -4
  69. package/esm/src/signing/mod.js.map +1 -1
  70. package/esm/src/signing/signTypedData/private_key.js +16 -16
  71. package/esm/src/signing/signTypedData/private_key.js.map +1 -1
  72. package/esm/src/transports/_polyfills.d.ts +12 -0
  73. package/esm/src/transports/_polyfills.d.ts.map +1 -0
  74. package/esm/src/transports/_polyfills.js +40 -0
  75. package/esm/src/transports/_polyfills.js.map +1 -0
  76. package/esm/src/transports/base.d.ts +6 -6
  77. package/esm/src/transports/base.d.ts.map +1 -1
  78. package/esm/src/transports/http/http_transport.d.ts +11 -4
  79. package/esm/src/transports/http/http_transport.d.ts.map +1 -1
  80. package/esm/src/transports/http/http_transport.js +17 -6
  81. package/esm/src/transports/http/http_transport.js.map +1 -1
  82. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +8 -7
  83. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  84. package/esm/src/transports/websocket/_hyperliquid_event_target.js +14 -33
  85. package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -1
  86. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts +26 -29
  87. package/esm/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  88. package/esm/src/transports/websocket/_reconnecting_websocket.js +82 -76
  89. package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -1
  90. package/esm/src/transports/websocket/_websocket_async_request.d.ts +6 -0
  91. package/esm/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  92. package/esm/src/transports/websocket/_websocket_async_request.js +49 -41
  93. package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -1
  94. package/esm/src/transports/websocket/websocket_transport.d.ts +48 -70
  95. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  96. package/esm/src/transports/websocket/websocket_transport.js +90 -103
  97. package/esm/src/transports/websocket/websocket_transport.js.map +1 -1
  98. package/package.json +3 -7
  99. package/script/bin/_utils.d.ts +80 -0
  100. package/script/bin/_utils.d.ts.map +1 -0
  101. package/script/bin/_utils.js +116 -0
  102. package/script/bin/_utils.js.map +1 -0
  103. package/script/bin/cli.js +43 -164
  104. package/script/bin/cli.js.map +1 -1
  105. package/script/src/clients/exchange.d.ts +93 -93
  106. package/script/src/clients/exchange.d.ts.map +1 -1
  107. package/script/src/clients/exchange.js +62 -57
  108. package/script/src/clients/exchange.js.map +1 -1
  109. package/script/src/clients/info.d.ts +113 -113
  110. package/script/src/clients/info.d.ts.map +1 -1
  111. package/script/src/clients/info.js +70 -73
  112. package/script/src/clients/info.js.map +1 -1
  113. package/script/src/clients/multiSign.d.ts +3 -3
  114. package/script/src/clients/multiSign.d.ts.map +1 -1
  115. package/script/src/clients/multiSign.js +10 -8
  116. package/script/src/clients/multiSign.js.map +1 -1
  117. package/script/src/clients/subscription.d.ts +23 -23
  118. package/script/src/clients/subscription.d.ts.map +1 -1
  119. package/script/src/clients/subscription.js +8 -11
  120. package/script/src/clients/subscription.js.map +1 -1
  121. package/script/src/schemas/_base.d.ts +6 -8
  122. package/script/src/schemas/_base.d.ts.map +1 -1
  123. package/script/src/schemas/_base.js +6 -29
  124. package/script/src/schemas/_base.js.map +1 -1
  125. package/script/src/schemas/exchange/requests.d.ts +1676 -1657
  126. package/script/src/schemas/exchange/requests.d.ts.map +1 -1
  127. package/script/src/schemas/exchange/requests.js +194 -198
  128. package/script/src/schemas/exchange/requests.js.map +1 -1
  129. package/script/src/schemas/exchange/responses.d.ts +10 -10
  130. package/script/src/schemas/exchange/responses.js +2 -2
  131. package/script/src/schemas/exchange/responses.js.map +1 -1
  132. package/script/src/schemas/explorer/requests.d.ts +2 -2
  133. package/script/src/schemas/explorer/requests.js +2 -2
  134. package/script/src/schemas/explorer/requests.js.map +1 -1
  135. package/script/src/schemas/explorer/responses.d.ts +16 -16
  136. package/script/src/schemas/explorer/responses.js +2 -2
  137. package/script/src/schemas/explorer/responses.js.map +1 -1
  138. package/script/src/schemas/info/accounts.d.ts +298 -298
  139. package/script/src/schemas/info/accounts.js +23 -23
  140. package/script/src/schemas/info/accounts.js.map +1 -1
  141. package/script/src/schemas/info/assets.d.ts +110 -110
  142. package/script/src/schemas/info/assets.js +8 -8
  143. package/script/src/schemas/info/assets.js.map +1 -1
  144. package/script/src/schemas/info/markets.d.ts +25 -25
  145. package/script/src/schemas/info/markets.js +2 -2
  146. package/script/src/schemas/info/markets.js.map +1 -1
  147. package/script/src/schemas/info/orders.d.ts +104 -104
  148. package/script/src/schemas/info/orders.js +2 -2
  149. package/script/src/schemas/info/orders.js.map +1 -1
  150. package/script/src/schemas/info/requests.d.ts +32 -32
  151. package/script/src/schemas/info/requests.js +54 -54
  152. package/script/src/schemas/info/requests.js.map +1 -1
  153. package/script/src/schemas/info/validators.d.ts +27 -27
  154. package/script/src/schemas/info/validators.js +5 -5
  155. package/script/src/schemas/info/validators.js.map +1 -1
  156. package/script/src/schemas/info/vaults.d.ts +46 -46
  157. package/script/src/schemas/info/vaults.js +9 -9
  158. package/script/src/schemas/info/vaults.js.map +1 -1
  159. package/script/src/schemas/subscriptions/requests.d.ts +4 -4
  160. package/script/src/schemas/subscriptions/requests.js +16 -16
  161. package/script/src/schemas/subscriptions/requests.js.map +1 -1
  162. package/script/src/schemas/subscriptions/responses.d.ts +401 -401
  163. package/script/src/schemas/subscriptions/responses.js +13 -13
  164. package/script/src/schemas/subscriptions/responses.js.map +1 -1
  165. package/script/src/signing/mod.js +37 -4
  166. package/script/src/signing/mod.js.map +1 -1
  167. package/script/src/signing/signTypedData/private_key.js +49 -16
  168. package/script/src/signing/signTypedData/private_key.js.map +1 -1
  169. package/script/src/transports/_polyfills.d.ts +12 -0
  170. package/script/src/transports/_polyfills.d.ts.map +1 -0
  171. package/script/src/transports/_polyfills.js +43 -0
  172. package/script/src/transports/_polyfills.js.map +1 -0
  173. package/script/src/transports/base.d.ts +6 -6
  174. package/script/src/transports/base.d.ts.map +1 -1
  175. package/script/src/transports/http/http_transport.d.ts +11 -4
  176. package/script/src/transports/http/http_transport.d.ts.map +1 -1
  177. package/script/src/transports/http/http_transport.js +17 -6
  178. package/script/src/transports/http/http_transport.js.map +1 -1
  179. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +8 -7
  180. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  181. package/script/src/transports/websocket/_hyperliquid_event_target.js +47 -33
  182. package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -1
  183. package/script/src/transports/websocket/_reconnecting_websocket.d.ts +26 -29
  184. package/script/src/transports/websocket/_reconnecting_websocket.d.ts.map +1 -1
  185. package/script/src/transports/websocket/_reconnecting_websocket.js +82 -76
  186. package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -1
  187. package/script/src/transports/websocket/_websocket_async_request.d.ts +6 -0
  188. package/script/src/transports/websocket/_websocket_async_request.d.ts.map +1 -1
  189. package/script/src/transports/websocket/_websocket_async_request.js +52 -43
  190. package/script/src/transports/websocket/_websocket_async_request.js.map +1 -1
  191. package/script/src/transports/websocket/websocket_transport.d.ts +48 -70
  192. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  193. package/script/src/transports/websocket/websocket_transport.js +92 -105
  194. package/script/src/transports/websocket/websocket_transport.js.map +1 -1
  195. package/src/bin/_utils.ts +185 -0
  196. package/src/bin/cli.ts +49 -171
  197. package/src/src/clients/exchange.ts +160 -149
  198. package/src/src/clients/info.ts +128 -128
  199. package/src/src/clients/multiSign.ts +15 -13
  200. package/src/src/clients/subscription.ts +32 -32
  201. package/src/src/schemas/_base.ts +18 -40
  202. package/src/src/schemas/exchange/requests.ts +202 -199
  203. package/src/src/schemas/exchange/responses.ts +3 -3
  204. package/src/src/schemas/explorer/requests.ts +3 -3
  205. package/src/src/schemas/explorer/responses.ts +3 -3
  206. package/src/src/schemas/info/accounts.ts +24 -24
  207. package/src/src/schemas/info/assets.ts +9 -9
  208. package/src/src/schemas/info/markets.ts +3 -3
  209. package/src/src/schemas/info/orders.ts +3 -3
  210. package/src/src/schemas/info/requests.ts +55 -55
  211. package/src/src/schemas/info/validators.ts +6 -6
  212. package/src/src/schemas/info/vaults.ts +10 -10
  213. package/src/src/schemas/subscriptions/requests.ts +17 -17
  214. package/src/src/schemas/subscriptions/responses.ts +14 -14
  215. package/src/src/signing/mod.ts +4 -4
  216. package/src/src/signing/signTypedData/private_key.ts +17 -17
  217. package/src/src/transports/_polyfills.ts +41 -0
  218. package/src/src/transports/base.ts +6 -6
  219. package/src/src/transports/http/http_transport.ts +25 -14
  220. package/src/src/transports/websocket/_hyperliquid_event_target.ts +24 -51
  221. package/src/src/transports/websocket/_reconnecting_websocket.ts +107 -119
  222. package/src/src/transports/websocket/_websocket_async_request.ts +57 -59
  223. package/src/src/transports/websocket/websocket_transport.ts +126 -167
@@ -1,5 +1,5 @@
1
1
  import * as v from "valibot";
2
- import { Hex, TokenId, UnsignedDecimalMayInputNumber, UnsignedIntegerMayInputString } from "../_base.js";
2
+ import { Address, Hex, Integer, TokenId, UnsignedDecimal, UnsignedInteger } from "../_base.js";
3
3
  import { TIF } from "../info/orders.js";
4
4
  /** Deeply removes undefined keys from an object. */
5
5
  function removeUndefinedKeys(obj) {
@@ -26,18 +26,18 @@ export const Signature = v.pipe(v.object({
26
26
  /** Second 32-byte component of ECDSA signature. */
27
27
  s: v.pipe(v.pipe(Hex, v.length(66), v.transform((value) => value.replace(/^0x0+/, "0x"))), v.description("Second 32-byte component of ECDSA signature.")),
28
28
  /** Recovery identifier. */
29
- v: v.pipe(v.union([v.literal(27), v.literal(28)]), v.description("Recovery identifier.")),
29
+ v: v.pipe(v.pipe(Integer, v.union([v.literal(27), v.literal(28)])), v.description("Recovery identifier.")),
30
30
  }), v.description("ECDSA signature components for Ethereum typed data."));
31
31
  /** Order parameters. */
32
32
  export const OrderParams = v.pipe(v.object({
33
33
  /** Asset ID. */
34
- a: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
34
+ a: v.pipe(UnsignedInteger, v.description("Asset ID.")),
35
35
  /** Position side (`true` for long, `false` for short). */
36
36
  b: v.pipe(v.boolean(), v.description("Position side (`true` for long, `false` for short).")),
37
37
  /** Price. */
38
- p: v.pipe(UnsignedDecimalMayInputNumber, v.description("Price.")),
38
+ p: v.pipe(UnsignedDecimal, v.description("Price.")),
39
39
  /** Size (in base currency units). */
40
- s: v.pipe(UnsignedDecimalMayInputNumber, v.description("Size (in base currency units).")),
40
+ s: v.pipe(UnsignedDecimal, v.description("Size (in base currency units).")),
41
41
  /** Is reduce-only? */
42
42
  r: v.pipe(v.boolean(), v.description("Is reduce-only?")),
43
43
  /** Order type. */
@@ -55,7 +55,7 @@ export const OrderParams = v.pipe(v.object({
55
55
  /** Is market order? */
56
56
  isMarket: v.pipe(v.boolean(), v.description("Is market order?")),
57
57
  /** Trigger price. */
58
- triggerPx: v.pipe(UnsignedDecimalMayInputNumber, v.description("Trigger price.")),
58
+ triggerPx: v.pipe(UnsignedDecimal, v.description("Trigger price.")),
59
59
  /** Indicates whether it is take profit or stop loss. */
60
60
  tpsl: v.pipe(v.union([v.literal("tp"), v.literal("sl")]), v.description("Indicates whether it is take profit or stop loss.")),
61
61
  }), v.description("Trigger order parameters.")),
@@ -79,14 +79,14 @@ export const ApproveAgentRequest = v.pipe(v.object({
79
79
  /** HyperLiquid network. */
80
80
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
81
81
  /** Agent address. */
82
- agentAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Agent address.")),
83
- /** Agent name or null for unnamed agent. */
84
- agentName: v.pipe(v.nullable(v.string()), v.description("Agent name or null for unnamed agent.")),
82
+ agentAddress: v.pipe(Address, v.description("Agent address.")),
83
+ /** Agent name or null for unnamed agent (default: null). */
84
+ agentName: v.pipe(v.optional(v.nullable(v.string()), null), v.description("Agent name or null for unnamed agent.")),
85
85
  /** Unique request identifier (current timestamp in ms). */
86
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
86
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
87
87
  }), v.description("Action to perform.")),
88
88
  /** Unique request identifier (current timestamp in ms). */
89
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
89
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
90
90
  /** Cryptographic signature. */
91
91
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
92
92
  }), v.transform(removeUndefinedKeys), v.description("Approve an agent to sign on behalf of the master account."));
@@ -107,12 +107,12 @@ export const ApproveBuilderFeeRequest = v.pipe(v.object({
107
107
  /** Max fee rate (e.g., "0.01%"). */
108
108
  maxFeeRate: v.pipe(Percent, v.description('Max fee rate (e.g., "0.01%").')),
109
109
  /** Builder address. */
110
- builder: v.pipe(v.pipe(Hex, v.length(42)), v.description("Builder address.")),
110
+ builder: v.pipe(Address, v.description("Builder address.")),
111
111
  /** Unique request identifier (current timestamp in ms). */
112
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
112
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
113
113
  }), v.description("Action to perform.")),
114
114
  /** Unique request identifier (current timestamp in ms). */
115
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
115
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
116
116
  /** Cryptographic signature. */
117
117
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
118
118
  }), v.transform(removeUndefinedKeys), v.description("Approve a maximum fee rate for a builder."));
@@ -130,7 +130,7 @@ export const BatchModifyRequest = v.pipe(v.object({
130
130
  modifies: v.pipe(v.array(v.object({
131
131
  /** Order ID or Client Order ID. */
132
132
  oid: v.pipe(v.union([
133
- UnsignedIntegerMayInputString,
133
+ UnsignedInteger,
134
134
  v.pipe(Hex, v.length(34)),
135
135
  ]), v.description("Order ID or Client Order ID.")),
136
136
  /** New order parameters. */
@@ -138,13 +138,13 @@ export const BatchModifyRequest = v.pipe(v.object({
138
138
  })), v.description("Order modifications.")),
139
139
  }), v.description("Action to perform.")),
140
140
  /** Unique request identifier (current timestamp in ms). */
141
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
141
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
142
142
  /** Cryptographic signature. */
143
143
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
144
144
  /** Vault address (for vault trading). */
145
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
145
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
146
146
  /** Expiration time of the action. */
147
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
147
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
148
148
  }), v.transform(removeUndefinedKeys), v.description("Modify multiple orders."));
149
149
  /**
150
150
  * Cancel order(s).
@@ -159,19 +159,19 @@ export const CancelRequest = v.pipe(v.object({
159
159
  /** Orders to cancel. */
160
160
  cancels: v.pipe(v.array(v.object({
161
161
  /** Asset ID. */
162
- a: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
162
+ a: v.pipe(UnsignedInteger, v.description("Asset ID.")),
163
163
  /** Order ID. */
164
- o: v.pipe(UnsignedIntegerMayInputString, v.description("Order ID.")),
164
+ o: v.pipe(UnsignedInteger, v.description("Order ID.")),
165
165
  })), v.description("Orders to cancel.")),
166
166
  }), v.description("Action to perform.")),
167
167
  /** Unique request identifier (current timestamp in ms). */
168
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
168
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
169
169
  /** Cryptographic signature. */
170
170
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
171
171
  /** Vault address (for vault trading). */
172
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
172
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
173
173
  /** Expiration time of the action. */
174
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
174
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
175
175
  }), v.transform(removeUndefinedKeys), v.description("Cancel order(s)."));
176
176
  /**
177
177
  * Cancel order(s) by cloid.
@@ -186,19 +186,19 @@ export const CancelByCloidRequest = v.pipe(v.object({
186
186
  /** Orders to cancel. */
187
187
  cancels: v.pipe(v.array(v.object({
188
188
  /** Asset ID. */
189
- asset: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
189
+ asset: v.pipe(UnsignedInteger, v.description("Asset ID.")),
190
190
  /** Client Order ID. */
191
191
  cloid: v.pipe(v.pipe(Hex, v.length(34)), v.description("Client Order ID.")),
192
192
  })), v.description("Orders to cancel.")),
193
193
  }), v.description("Action to perform.")),
194
194
  /** Unique request identifier (current timestamp in ms). */
195
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
195
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
196
196
  /** Cryptographic signature. */
197
197
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
198
198
  /** Vault address (for vault trading). */
199
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
199
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
200
200
  /** Expiration time of the action. */
201
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
201
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
202
202
  }), v.transform(removeUndefinedKeys), v.description("Cancel order(s) by cloid."));
203
203
  /**
204
204
  * Transfer native token from the user spot account into staking for delegating to validators.
@@ -215,12 +215,12 @@ export const CDepositRequest = v.pipe(v.object({
215
215
  /** HyperLiquid network. */
216
216
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
217
217
  /** Amount of wei to deposit into staking balance (float * 1e8). */
218
- wei: v.pipe(UnsignedIntegerMayInputString, v.description("Amount of wei to deposit into staking balance (float * 1e8).")),
218
+ wei: v.pipe(UnsignedInteger, v.description("Amount of wei to deposit into staking balance (float * 1e8).")),
219
219
  /** Unique request identifier (current timestamp in ms). */
220
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
220
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
221
221
  }), v.description("Action to perform.")),
222
222
  /** Unique request identifier (current timestamp in ms). */
223
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
223
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
224
224
  /** Cryptographic signature. */
225
225
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
226
226
  }), v.transform(removeUndefinedKeys), v.description("Transfer native token from the user spot account into staking for delegating to validators."));
@@ -236,19 +236,19 @@ export const ClaimRewardsRequest = v.pipe(v.object({
236
236
  type: v.pipe(v.literal("claimRewards"), v.description("Type of action.")),
237
237
  }), v.description("Action to perform.")),
238
238
  /** Unique request identifier (current timestamp in ms). */
239
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
239
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
240
240
  /** Cryptographic signature. */
241
241
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
242
242
  /** Expiration time of the action. */
243
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
243
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
244
244
  }), v.transform(removeUndefinedKeys), v.description("Claim rewards from referral program."));
245
245
  /** Signers configuration for {@linkcode ConvertToMultiSigUserRequest}. */
246
246
  export const ConvertToMultiSigUserRequestSigners = v.pipe(v.union([
247
247
  v.object({
248
248
  /** List of authorized user addresses. */
249
- authorizedUsers: v.pipe(v.array(v.pipe(Hex, v.length(42))), v.description("List of authorized user addresses.")),
249
+ authorizedUsers: v.pipe(v.array(Address), v.description("List of authorized user addresses.")),
250
250
  /** Minimum number of signatures required. */
251
- threshold: v.pipe(UnsignedIntegerMayInputString, v.description("Minimum number of signatures required.")),
251
+ threshold: v.pipe(UnsignedInteger, v.description("Minimum number of signatures required.")),
252
252
  }),
253
253
  /** Convert a multi-signature account to a single-signature account. */
254
254
  v.pipe(v.null(), v.description("Convert a multi-signature account to a single-signature account.")),
@@ -278,10 +278,10 @@ export const ConvertToMultiSigUserRequest = v.pipe(v.object({
278
278
  ]), v.description("Signers configuration." +
279
279
  "\n\nMust be `ConvertToMultiSigUserRequestSigners` converted to a string via `JSON.stringify(...)`.")),
280
280
  /** Unique request identifier (current timestamp in ms). */
281
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
281
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
282
282
  }), v.description("Action to perform.")),
283
283
  /** Unique request identifier (current timestamp in ms). */
284
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
284
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
285
285
  /** Cryptographic signature. */
286
286
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
287
287
  }), v.transform(removeUndefinedKeys), v.description("Convert a single-signature account to a multi-signature account."));
@@ -299,11 +299,11 @@ export const CreateSubAccountRequest = v.pipe(v.object({
299
299
  name: v.pipe(v.string(), v.minLength(1), v.description("Sub-account name.")),
300
300
  }), v.description("Action to perform.")),
301
301
  /** Unique request identifier (current timestamp in ms). */
302
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
302
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
303
303
  /** Cryptographic signature. */
304
304
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
305
305
  /** Expiration time of the action. */
306
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
306
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
307
307
  }), v.transform(removeUndefinedKeys), v.description("Create a sub-account."));
308
308
  /**
309
309
  * Create a vault.
@@ -320,17 +320,18 @@ export const CreateVaultRequest = v.pipe(v.object({
320
320
  /** Vault description. */
321
321
  description: v.pipe(v.string(), v.minLength(10), v.description("Vault description.")),
322
322
  /** Initial balance (float * 1e6). */
323
- initialUsd: v.pipe(UnsignedIntegerMayInputString, v.minValue(100000000), // 100 USDC
323
+ initialUsd: v.pipe(UnsignedInteger, v.minValue(100000000), // 100 USDC
324
324
  v.description("Initial balance (float * 1e6).")),
325
- /** Unique request identifier (current timestamp in ms). */
326
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
325
+ /** Unique request identifier (current timestamp in ms) (default: Date.now()). */
326
+ nonce: v.pipe(v.optional(UnsignedInteger, () => Date.now()), // default value is allowed because this is an L1 action
327
+ v.description("Unique request identifier (current timestamp in ms).")),
327
328
  }), v.description("Action to perform.")),
328
329
  /** Unique request identifier (current timestamp in ms). */
329
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
330
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
330
331
  /** Cryptographic signature. */
331
332
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
332
333
  /** Expiration time of the action. */
333
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
334
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
334
335
  }), v.transform(removeUndefinedKeys), v.description("Create a vault."));
335
336
  /**
336
337
  * Perform an action on a signer:
@@ -356,11 +357,11 @@ export const CSignerActionRequest = v.pipe(v.object({
356
357
  }),
357
358
  ]), v.description("Action to perform.")),
358
359
  /** Unique request identifier (current timestamp in ms). */
359
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
360
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
360
361
  /** Cryptographic signature. */
361
362
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
362
363
  /** Expiration time of the action. */
363
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
364
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
364
365
  }), v.transform(removeUndefinedKeys), v.description("Perform an action on a signer." +
365
366
  "\n- Jail to prevent them from signing transactions." +
366
367
  "\n- Unjail to allow them to sign transactions again."));
@@ -397,9 +398,9 @@ export const CValidatorActionRequest = v.pipe(v.object({
397
398
  /** Enable or disable delegations. */
398
399
  disable_delegations: v.pipe(v.nullable(v.boolean()), v.description("Enable or disable delegations.")),
399
400
  /** Commission rate in basis points (1 = 0.0001%). */
400
- commission_bps: v.pipe(v.nullable(UnsignedIntegerMayInputString), v.description("Commission rate in basis points (1 = 0.0001%).")),
401
+ commission_bps: v.pipe(v.nullable(UnsignedInteger), v.description("Commission rate in basis points (1 = 0.0001%).")),
401
402
  /** Signer address. */
402
- signer: v.pipe(v.nullable(v.pipe(Hex, v.length(42))), v.description("Signer address.")),
403
+ signer: v.pipe(v.nullable(Address), v.description("Signer address.")),
403
404
  }), v.description("Profile changes to apply.")),
404
405
  }),
405
406
  v.object({
@@ -421,14 +422,14 @@ export const CValidatorActionRequest = v.pipe(v.object({
421
422
  /** Whether delegations are disabled. */
422
423
  delegations_disabled: v.pipe(v.boolean(), v.description("Whether delegations are disabled.")),
423
424
  /** Commission rate in basis points (1 = 0.0001%). */
424
- commission_bps: v.pipe(UnsignedIntegerMayInputString, v.description("Commission rate in basis points (1 = 0.0001%).")),
425
+ commission_bps: v.pipe(UnsignedInteger, v.description("Commission rate in basis points (1 = 0.0001%).")),
425
426
  /** Signer address. */
426
- signer: v.pipe(v.pipe(Hex, v.length(42)), v.description("Signer address.")),
427
+ signer: v.pipe(Address, v.description("Signer address.")),
427
428
  }), v.description("Validator profile information.")),
428
429
  /** Initial jail status. */
429
430
  unjailed: v.pipe(v.boolean(), v.description("Initial jail status.")),
430
431
  /** Initial stake amount in wei. */
431
- initial_wei: v.pipe(UnsignedIntegerMayInputString, v.description("Initial stake amount in wei.")),
432
+ initial_wei: v.pipe(UnsignedInteger, v.description("Initial stake amount in wei.")),
432
433
  }), v.description("Registration parameters.")),
433
434
  }),
434
435
  v.object({
@@ -439,11 +440,11 @@ export const CValidatorActionRequest = v.pipe(v.object({
439
440
  }),
440
441
  ]), v.description("Action to perform.")),
441
442
  /** Unique request identifier (current timestamp in ms). */
442
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
443
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
443
444
  /** Cryptographic signature. */
444
445
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
445
446
  /** Expiration time of the action. */
446
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
447
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
447
448
  }), v.transform(removeUndefinedKeys), v.description("Perform an action on a validator:" +
448
449
  "\n- Change profile information." +
449
450
  "\n- Register a new validator." +
@@ -463,12 +464,12 @@ export const CWithdrawRequest = v.pipe(v.object({
463
464
  /** HyperLiquid network. */
464
465
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
465
466
  /** Amount of wei to withdraw from staking balance (float * 1e8). */
466
- wei: v.pipe(UnsignedIntegerMayInputString, v.description("Amount of wei to withdraw from staking balance (float * 1e8).")),
467
+ wei: v.pipe(UnsignedInteger, v.description("Amount of wei to withdraw from staking balance (float * 1e8).")),
467
468
  /** Unique request identifier (current timestamp in ms). */
468
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
469
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
469
470
  }), v.description("Action to perform.")),
470
471
  /** Unique request identifier (current timestamp in ms). */
471
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
472
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
472
473
  /** Cryptographic signature. */
473
474
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
474
475
  }), v.transform(removeUndefinedKeys), v.description("Transfer native token from staking into the user spot account."));
@@ -486,11 +487,11 @@ export const EvmUserModifyRequest = v.pipe(v.object({
486
487
  usingBigBlocks: v.pipe(v.boolean(), v.description("`true` for large blocks, `false` for small blocks.")),
487
488
  }), v.description("Action to perform.")),
488
489
  /** Unique request identifier (current timestamp in ms). */
489
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
490
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
490
491
  /** Cryptographic signature. */
491
492
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
492
493
  /** Expiration time of the action. */
493
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
494
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
494
495
  }), v.transform(removeUndefinedKeys), v.description("Configure block type for EVM transactions."));
495
496
  /**
496
497
  * Modify an order.
@@ -504,20 +505,20 @@ export const ModifyRequest = v.pipe(v.object({
504
505
  type: v.pipe(v.literal("modify"), v.description("Type of action.")),
505
506
  /** Order ID or Client Order ID. */
506
507
  oid: v.pipe(v.union([
507
- UnsignedIntegerMayInputString,
508
+ UnsignedInteger,
508
509
  v.pipe(Hex, v.length(34)),
509
510
  ]), v.description("Order ID or Client Order ID.")),
510
511
  /** New order parameters. */
511
512
  order: v.pipe(OrderParams, v.description("New order parameters.")),
512
513
  }), v.description("Action to perform.")),
513
514
  /** Unique request identifier (current timestamp in ms). */
514
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
515
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
515
516
  /** Cryptographic signature. */
516
517
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
517
518
  /** Vault address (for vault trading). */
518
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
519
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
519
520
  /** Expiration time of the action. */
520
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
521
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
521
522
  }), v.transform(removeUndefinedKeys), v.description("Modify an order."));
522
523
  /**
523
524
  * This action does not do anything (no operation), but causes the nonce to be marked as used.
@@ -531,11 +532,11 @@ export const NoopRequest = v.pipe(v.object({
531
532
  type: v.pipe(v.literal("noop"), v.description("Type of action.")),
532
533
  }), v.description("Action to perform.")),
533
534
  /** Unique request identifier (current timestamp in ms). */
534
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
535
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
535
536
  /** Cryptographic signature. */
536
537
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
537
538
  /** Expiration time of the action. */
538
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
539
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
539
540
  }), v.transform(removeUndefinedKeys), v.description("This action does not do anything (no operation), but causes the nonce to be marked as used."));
540
541
  /**
541
542
  * Place an order(s).
@@ -551,34 +552,30 @@ export const OrderRequest = v.pipe(v.object({
551
552
  orders: v.pipe(v.array(OrderParams), v.description("Order parameters.")),
552
553
  /**
553
554
  * Order grouping strategy:
554
- * - `na`: Standard order without grouping.
555
+ * - `na`: Standard order without grouping (default).
555
556
  * - `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes.
556
557
  * - `positionTpsl`: TP/SL order that adjusts proportionally with the position size.
557
558
  */
558
- grouping: v.pipe(v.union([
559
- v.literal("na"),
560
- v.literal("normalTpsl"),
561
- v.literal("positionTpsl"),
562
- ]), v.description("Order grouping strategy:" +
559
+ grouping: v.pipe(v.optional(v.union([v.literal("na"), v.literal("normalTpsl"), v.literal("positionTpsl")]), "na"), v.description("Order grouping strategy:" +
563
560
  "\n- `na`: Standard order without grouping." +
564
561
  "\n- `normalTpsl`: TP/SL order with fixed size that doesn't adjust with position changes." +
565
562
  "\n- `positionTpsl`: TP/SL order that adjusts proportionally with the position size.")),
566
563
  /** Builder fee. */
567
564
  builder: v.pipe(v.optional(v.object({
568
565
  /** Builder address. */
569
- b: v.pipe(v.pipe(Hex, v.length(42)), v.description("Builder address.")),
566
+ b: v.pipe(Address, v.description("Builder address.")),
570
567
  /** Builder fee in 0.1bps (1 = 0.0001%). */
571
- f: v.pipe(UnsignedIntegerMayInputString, v.description("Builder fee in 0.1bps (1 = 0.0001%).")),
568
+ f: v.pipe(UnsignedInteger, v.description("Builder fee in 0.1bps (1 = 0.0001%).")),
572
569
  })), v.description("Builder fee.")),
573
570
  }), v.description("Action to perform.")),
574
571
  /** Unique request identifier (current timestamp in ms). */
575
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
572
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
576
573
  /** Cryptographic signature. */
577
574
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
578
575
  /** Vault address (for vault trading). */
579
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
576
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
580
577
  /** Expiration time of the action. */
581
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
578
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
582
579
  }), v.transform(removeUndefinedKeys), v.description("Place an order(s)."));
583
580
  /**
584
581
  * Deploying HIP-3 assets:
@@ -596,17 +593,17 @@ export const PerpDeployRequest = v.pipe(v.object({
596
593
  /** Parameters for registering a new perpetual asset. */
597
594
  registerAsset: v.pipe(v.object({
598
595
  /** Max gas in native token wei. If not provided, then uses current deploy auction price. */
599
- maxGas: v.pipe(v.nullable(UnsignedIntegerMayInputString), v.description("Max gas in native token wei. If not provided, then uses current deploy auction price.")),
596
+ maxGas: v.pipe(v.nullable(UnsignedInteger), v.description("Max gas in native token wei. If not provided, then uses current deploy auction price.")),
600
597
  /** Contains new asset listing parameters. */
601
598
  assetRequest: v.pipe(v.object({
602
599
  /** Coin symbol for the new asset. */
603
600
  coin: v.pipe(v.string(), v.description("Coin symbol for the new asset.")),
604
601
  /** Number of decimal places for size. */
605
- szDecimals: v.pipe(UnsignedIntegerMayInputString, v.description("Number of decimal places for size.")),
602
+ szDecimals: v.pipe(UnsignedInteger, v.description("Number of decimal places for size.")),
606
603
  /** Initial oracle price for the asset. */
607
- oraclePx: v.pipe(UnsignedDecimalMayInputNumber, v.description("Initial oracle price for the asset.")),
604
+ oraclePx: v.pipe(UnsignedDecimal, v.description("Initial oracle price for the asset.")),
608
605
  /** Margin table identifier for risk management. */
609
- marginTableId: v.pipe(UnsignedIntegerMayInputString, v.description("Margin table identifier for risk management.")),
606
+ marginTableId: v.pipe(UnsignedInteger, v.description("Margin table identifier for risk management.")),
610
607
  /** Whether the asset can only be traded with isolated margin. */
611
608
  onlyIsolated: v.pipe(v.boolean(), v.description("Whether the asset can only be traded with isolated margin.")),
612
609
  }), v.description("Contains new asset listing parameters.")),
@@ -617,9 +614,9 @@ export const PerpDeployRequest = v.pipe(v.object({
617
614
  /** Full name of the dex. */
618
615
  fullName: v.pipe(v.string(), v.description("Full name of the dex.")),
619
616
  /** Collateral token index. */
620
- collateralToken: v.pipe(UnsignedIntegerMayInputString, v.description("Collateral token index.")),
617
+ collateralToken: v.pipe(UnsignedInteger, v.description("Collateral token index.")),
621
618
  /** User to update oracles. If not provided, then deployer is assumed to be oracle updater. */
622
- oracleUpdater: v.pipe(v.nullable(v.pipe(Hex, v.length(42))), v.description("User to update oracles. If not provided, then deployer is assumed to be oracle updater.")),
619
+ oracleUpdater: v.pipe(v.nullable(Address), v.description("User to update oracles. If not provided, then deployer is assumed to be oracle updater.")),
623
620
  })), v.description("Contains new dex parameters.")),
624
621
  }), v.description("Parameters for registering a new perpetual asset.")),
625
622
  }), v.description("Register asset variant")),
@@ -631,18 +628,20 @@ export const PerpDeployRequest = v.pipe(v.object({
631
628
  /** Name of the dex. */
632
629
  dex: v.pipe(v.string(), v.minLength(1), v.description("Name of the dex.")),
633
630
  /** A list (sorted by key) of asset and oracle prices. */
634
- oraclePxs: v.pipe(v.array(v.tuple([v.string(), UnsignedDecimalMayInputNumber])), v.description("A list (sorted by key) of asset and oracle prices.")),
631
+ oraclePxs: v.pipe(v.array(v.tuple([v.string(), UnsignedDecimal])), v.description("A list (sorted by key) of asset and oracle prices.")),
635
632
  /** An outer list of inner lists (inner list sorted by key) of asset and mark prices. */
636
- markPxs: v.pipe(v.array(v.array(v.tuple([v.string(), UnsignedDecimalMayInputNumber]))), v.description("An outer list of inner lists (inner list sorted by key) of asset and mark prices.")),
633
+ markPxs: v.pipe(v.array(v.array(v.tuple([v.string(), UnsignedDecimal]))), v.description("An outer list of inner lists (inner list sorted by key) of asset and mark prices.")),
634
+ /** A list (sorted by key) of asset and external prices which prevent sudden mark price deviations. */
635
+ externalPerpPxs: v.pipe(v.array(v.tuple([v.string(), UnsignedDecimal])), v.description("A list (sorted by key) of asset and external prices which prevent sudden mark price deviations.")),
637
636
  }), v.description("Parameters for setting oracle and mark prices for assets.")),
638
637
  }), v.description("Set oracle variant")),
639
638
  ]), v.description("Action to perform.")),
640
639
  /** Unique request identifier (current timestamp in ms). */
641
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
640
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
642
641
  /** Cryptographic signature. */
643
642
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
644
643
  /** Expiration time of the action. */
645
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
644
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
646
645
  }), v.transform(removeUndefinedKeys), v.description("Deploying HIP-3 assets:" +
647
646
  "\n- Register Asset" +
648
647
  "\n- Set Oracle"));
@@ -660,11 +659,11 @@ export const RegisterReferrerRequest = v.pipe(v.object({
660
659
  code: v.pipe(v.string(), v.minLength(1), v.description("Referral code to create.")),
661
660
  }), v.description("Action to perform.")),
662
661
  /** Unique request identifier (current timestamp in ms). */
663
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
662
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
664
663
  /** Cryptographic signature. */
665
664
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
666
665
  /** Expiration time of the action. */
667
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
666
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
668
667
  }), v.transform(removeUndefinedKeys), v.description("Create a referral code."));
669
668
  /**
670
669
  * Reserve additional rate-limited actions for a fee.
@@ -677,14 +676,14 @@ export const ReserveRequestWeightRequest = v.pipe(v.object({
677
676
  /** Type of action. */
678
677
  type: v.pipe(v.literal("reserveRequestWeight"), v.description("Type of action.")),
679
678
  /** Amount of request weight to reserve. */
680
- weight: v.pipe(UnsignedIntegerMayInputString, v.description("Amount of request weight to reserve.")),
679
+ weight: v.pipe(UnsignedInteger, v.description("Amount of request weight to reserve.")),
681
680
  }), v.description("Action to perform.")),
682
681
  /** Unique request identifier (current timestamp in ms). */
683
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
682
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
684
683
  /** Cryptographic signature. */
685
684
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
686
685
  /** Expiration time of the action. */
687
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
686
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
688
687
  }), v.transform(removeUndefinedKeys), v.description("Reserve additional rate-limited actions for a fee."));
689
688
  /**
690
689
  * Schedule a cancel-all operation at a future time.
@@ -702,18 +701,18 @@ export const ScheduleCancelRequest = v.pipe(v.object({
702
701
  *
703
702
  * If not specified, will cause all scheduled cancel operations to be deleted.
704
703
  */
705
- time: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Scheduled time (in ms since epoch)." +
704
+ time: v.pipe(v.optional(UnsignedInteger), v.description("Scheduled time (in ms since epoch)." +
706
705
  "\nMust be at least 5 seconds in the future." +
707
706
  "\n\nIf not specified, will cause all scheduled cancel operations to be deleted.")),
708
707
  }), v.description("Action to perform.")),
709
708
  /** Unique request identifier (current timestamp in ms). */
710
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
709
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
711
710
  /** Cryptographic signature. */
712
711
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
713
712
  /** Vault address (for vault trading). */
714
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
713
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
715
714
  /** Expiration time of the action. */
716
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
715
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
717
716
  }), v.transform(removeUndefinedKeys), v.description("Schedule a cancel-all operation at a future time."));
718
717
  /**
719
718
  * Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts.
@@ -730,7 +729,7 @@ export const SendAssetRequest = v.pipe(v.object({
730
729
  /** HyperLiquid network. */
731
730
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
732
731
  /** Destination address. */
733
- destination: v.pipe(v.pipe(Hex, v.length(42)), v.description("Destination address.")),
732
+ destination: v.pipe(Address, v.description("Destination address.")),
734
733
  /** Source DEX ("" for default USDC perp DEX, "spot" for spot). */
735
734
  sourceDex: v.pipe(v.string(), v.description('Source DEX ("" for default USDC perp DEX, "spot" for spot).')),
736
735
  /** Destination DEX ("" for default USDC perp DEX, "spot" for spot). */
@@ -738,17 +737,14 @@ export const SendAssetRequest = v.pipe(v.object({
738
737
  /** Token identifier. */
739
738
  token: v.pipe(TokenId, v.description("Token identifier.")),
740
739
  /** Amount to send (not in wei). */
741
- amount: v.pipe(UnsignedDecimalMayInputNumber, v.description("Amount to send (not in wei).")),
742
- /** Source sub-account address ("" for main account). */
743
- fromSubAccount: v.pipe(v.union([
744
- v.literal(""),
745
- v.pipe(Hex, v.length(42)),
746
- ]), v.description('Source sub-account address ("" for main account).')),
740
+ amount: v.pipe(UnsignedDecimal, v.description("Amount to send (not in wei).")),
741
+ /** Source sub-account address ("" for main account) (default: ""). */
742
+ fromSubAccount: v.pipe(v.optional(v.union([v.literal(""), Address]), ""), v.description('Source sub-account address ("" for main account).')),
747
743
  /** Unique request identifier (current timestamp in ms). */
748
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
744
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
749
745
  }), v.description("Action to perform.")),
750
746
  /** Unique request identifier (current timestamp in ms). */
751
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
747
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
752
748
  /** Cryptographic signature. */
753
749
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
754
750
  }), v.transform(removeUndefinedKeys), v.description("Transfer tokens between different perp DEXs, spot balance, users, and/or sub-accounts."));
@@ -771,11 +767,11 @@ export const SetDisplayNameRequest = v.pipe(v.object({
771
767
  "\n\nSet to an empty string to remove the display name.")),
772
768
  }), v.description("Action to perform.")),
773
769
  /** Unique request identifier (current timestamp in ms). */
774
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
770
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
775
771
  /** Cryptographic signature. */
776
772
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
777
773
  /** Expiration time of the action. */
778
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
774
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
779
775
  }), v.transform(removeUndefinedKeys), v.description("Set the display name in the leaderboard."));
780
776
  /**
781
777
  * Set a referral code.
@@ -791,11 +787,11 @@ export const SetReferrerRequest = v.pipe(v.object({
791
787
  code: v.pipe(v.string(), v.minLength(1), v.description("Referral code.")),
792
788
  }), v.description("Action to perform.")),
793
789
  /** Unique request identifier (current timestamp in ms). */
794
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
790
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
795
791
  /** Cryptographic signature. */
796
792
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
797
793
  /** Expiration time of the action. */
798
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
794
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
799
795
  }), v.transform(removeUndefinedKeys), v.description("Set a referral code."));
800
796
  /**
801
797
  * Deploying HIP-1 and HIP-2 assets:
@@ -817,9 +813,9 @@ export const SpotDeployRequest = v.pipe(v.object({
817
813
  /** Genesis parameters. */
818
814
  genesis: v.pipe(v.object({
819
815
  /** Token identifier. */
820
- token: v.pipe(UnsignedIntegerMayInputString, v.description("Token identifier.")),
816
+ token: v.pipe(UnsignedInteger, v.description("Token identifier.")),
821
817
  /** Maximum token supply. */
822
- maxSupply: v.pipe(UnsignedDecimalMayInputNumber, v.description("Maximum token supply.")),
818
+ maxSupply: v.pipe(UnsignedDecimal, v.description("Maximum token supply.")),
823
819
  /** Set hyperliquidity balance to 0. */
824
820
  noHyperliquidity: v.pipe(v.optional(v.literal(true)), v.description("Set hyperliquidity balance to 0.")),
825
821
  }), v.description("Genesis parameters.")),
@@ -830,15 +826,15 @@ export const SpotDeployRequest = v.pipe(v.object({
830
826
  /** Register hyperliquidity parameters. */
831
827
  registerHyperliquidity: v.pipe(v.object({
832
828
  /** Spot index (distinct from base token index). */
833
- spot: v.pipe(UnsignedIntegerMayInputString, v.description("Spot index (distinct from base token index).")),
829
+ spot: v.pipe(UnsignedInteger, v.description("Spot index (distinct from base token index).")),
834
830
  /** Starting price for liquidity seeding. */
835
- startPx: v.pipe(UnsignedDecimalMayInputNumber, v.description("Starting price for liquidity seeding.")),
831
+ startPx: v.pipe(UnsignedDecimal, v.description("Starting price for liquidity seeding.")),
836
832
  /** Order size as a float (not in wei). */
837
- orderSz: v.pipe(UnsignedDecimalMayInputNumber, v.description("Order size as a float (not in wei).")),
833
+ orderSz: v.pipe(UnsignedDecimal, v.description("Order size as a float (not in wei).")),
838
834
  /** Total number of orders to place. */
839
- nOrders: v.pipe(UnsignedIntegerMayInputString, v.description("Total number of orders to place.")),
835
+ nOrders: v.pipe(UnsignedInteger, v.description("Total number of orders to place.")),
840
836
  /** Number of levels to seed with USDC. */
841
- nSeededLevels: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Number of levels to seed with USDC.")),
837
+ nSeededLevels: v.pipe(v.optional(UnsignedInteger), v.description("Number of levels to seed with USDC.")),
842
838
  }), v.description("Register hyperliquidity parameters.")),
843
839
  }), v.description("Register hyperliquidity variant")),
844
840
  v.pipe(v.object({
@@ -848,8 +844,8 @@ export const SpotDeployRequest = v.pipe(v.object({
848
844
  registerSpot: v.pipe(v.object({
849
845
  /** Tuple containing base and quote token indices. */
850
846
  tokens: v.pipe(v.tuple([
851
- UnsignedIntegerMayInputString,
852
- UnsignedIntegerMayInputString,
847
+ UnsignedInteger,
848
+ UnsignedInteger,
853
849
  ]), v.description("Tuple containing base and quote token indices.")),
854
850
  }), v.description("Register spot parameters.")),
855
851
  }), v.description("Register spot variant")),
@@ -863,12 +859,12 @@ export const SpotDeployRequest = v.pipe(v.object({
863
859
  /** Token name. */
864
860
  name: v.pipe(v.string(), v.description("Token name.")),
865
861
  /** Number of decimals for token size. */
866
- szDecimals: v.pipe(UnsignedIntegerMayInputString, v.description("Number of decimals for token size.")),
862
+ szDecimals: v.pipe(UnsignedInteger, v.description("Number of decimals for token size.")),
867
863
  /** Number of decimals for token amounts in wei. */
868
- weiDecimals: v.pipe(UnsignedIntegerMayInputString, v.description("Number of decimals for token amounts in wei.")),
864
+ weiDecimals: v.pipe(UnsignedInteger, v.description("Number of decimals for token amounts in wei.")),
869
865
  }), v.description("Token specifications.")),
870
866
  /** Maximum gas allowed for registration. */
871
- maxGas: v.pipe(UnsignedIntegerMayInputString, v.description("Maximum gas allowed for registration.")),
867
+ maxGas: v.pipe(UnsignedInteger, v.description("Maximum gas allowed for registration.")),
872
868
  /** Optional full token name. */
873
869
  fullName: v.pipe(v.optional(v.string()), v.description("Optional full token name.")),
874
870
  }), v.description("Register token parameters.")),
@@ -879,7 +875,7 @@ export const SpotDeployRequest = v.pipe(v.object({
879
875
  /** Set deployer trading fee share parameters. */
880
876
  setDeployerTradingFeeShare: v.pipe(v.object({
881
877
  /** Token identifier. */
882
- token: v.pipe(UnsignedIntegerMayInputString, v.description("Token identifier.")),
878
+ token: v.pipe(UnsignedInteger, v.description("Token identifier.")),
883
879
  /** The deployer trading fee share. Range is 0% to 100%. */
884
880
  share: v.pipe(Percent, v.description("The deployer trading fee share. Range is 0% to 100%.")),
885
881
  }), v.description("Set deployer trading fee share parameters.")),
@@ -890,25 +886,25 @@ export const SpotDeployRequest = v.pipe(v.object({
890
886
  /** User genesis parameters. */
891
887
  userGenesis: v.pipe(v.object({
892
888
  /** Token identifier. */
893
- token: v.pipe(UnsignedIntegerMayInputString, v.description("Token identifier.")),
889
+ token: v.pipe(UnsignedInteger, v.description("Token identifier.")),
894
890
  /** Array of tuples: [user address, genesis amount in wei]. */
895
- userAndWei: v.pipe(v.array(v.tuple([v.pipe(Hex, v.length(42)), UnsignedDecimalMayInputNumber])), v.description("Array of tuples: [user address, genesis amount in wei].")),
891
+ userAndWei: v.pipe(v.array(v.tuple([Address, UnsignedDecimal])), v.description("Array of tuples: [user address, genesis amount in wei].")),
896
892
  /** Array of tuples: [existing token identifier, genesis amount in wei]. */
897
893
  existingTokenAndWei: v.pipe(v.array(v.tuple([
898
- UnsignedIntegerMayInputString,
899
- UnsignedDecimalMayInputNumber,
894
+ UnsignedInteger,
895
+ UnsignedDecimal,
900
896
  ])), v.description("Array of tuples: [existing token identifier, genesis amount in wei].")),
901
897
  /** Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user). */
902
- blacklistUsers: v.pipe(v.optional(v.array(v.tuple([v.pipe(Hex, v.length(42)), v.boolean()]))), v.description("Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user).")),
898
+ blacklistUsers: v.pipe(v.optional(v.array(v.tuple([Address, v.boolean()]))), v.description("Array of tuples: [user address, blacklist status] (`true` for blacklist, `false` to remove existing blacklisted user).")),
903
899
  }), v.description("User genesis parameters.")),
904
900
  }), v.description("User genesis variant")),
905
901
  ]), v.description("Action to perform.")),
906
902
  /** Unique request identifier (current timestamp in ms). */
907
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
903
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
908
904
  /** Cryptographic signature. */
909
905
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
910
906
  /** Expiration time of the action. */
911
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
907
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
912
908
  }), v.transform(removeUndefinedKeys), v.description("Deploying HIP-1 and HIP-2 assets:" +
913
909
  "\n- Genesis" +
914
910
  "\n- Register Hyperliquidity" +
@@ -931,16 +927,16 @@ export const SpotSendRequest = v.pipe(v.object({
931
927
  /** HyperLiquid network. */
932
928
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
933
929
  /** Destination address. */
934
- destination: v.pipe(v.pipe(Hex, v.length(42)), v.description("Destination address.")),
930
+ destination: v.pipe(Address, v.description("Destination address.")),
935
931
  /** Token identifier. */
936
932
  token: v.pipe(TokenId, v.description("Token identifier.")),
937
933
  /** Amount to send (not in wei). */
938
- amount: v.pipe(UnsignedDecimalMayInputNumber, v.description("Amount to send (not in wei).")),
934
+ amount: v.pipe(UnsignedDecimal, v.description("Amount to send (not in wei).")),
939
935
  /** Unique request identifier (current timestamp in ms). */
940
- time: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
936
+ time: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
941
937
  }), v.description("Action to perform.")),
942
938
  /** Unique request identifier (current timestamp in ms). */
943
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
939
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
944
940
  /** Cryptographic signature. */
945
941
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
946
942
  }), v.transform(removeUndefinedKeys), v.description("Send spot assets to another address."));
@@ -961,11 +957,11 @@ export const SpotUserRequest = v.pipe(v.object({
961
957
  }), v.description("Spot dusting options.")),
962
958
  }), v.description("Action to perform.")),
963
959
  /** Unique request identifier (current timestamp in ms). */
964
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
960
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
965
961
  /** Cryptographic signature. */
966
962
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
967
963
  /** Expiration time of the action. */
968
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
964
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
969
965
  }), v.transform(removeUndefinedKeys), v.description("Opt Out of Spot Dusting."));
970
966
  /**
971
967
  * Modify a sub-account.
@@ -978,16 +974,16 @@ export const SubAccountModifyRequest = v.pipe(v.object({
978
974
  /** Type of action. */
979
975
  type: v.pipe(v.literal("subAccountModify"), v.description("Type of action.")),
980
976
  /** Sub-account address to modify. */
981
- subAccountUser: v.pipe(v.pipe(Hex, v.length(42)), v.description("Sub-account address to modify.")),
977
+ subAccountUser: v.pipe(Address, v.description("Sub-account address to modify.")),
982
978
  /** New sub-account name. */
983
979
  name: v.pipe(v.string(), v.minLength(1), v.description("New sub-account name.")),
984
980
  }), v.description("Action to perform.")),
985
981
  /** Unique request identifier (current timestamp in ms). */
986
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
982
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
987
983
  /** Cryptographic signature. */
988
984
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
989
985
  /** Expiration time of the action. */
990
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
986
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
991
987
  }), v.transform(removeUndefinedKeys), v.description("Modify a sub-account."));
992
988
  /**
993
989
  * Transfer between sub-accounts (spot).
@@ -1000,20 +996,20 @@ export const SubAccountSpotTransferRequest = v.pipe(v.object({
1000
996
  /** Type of action. */
1001
997
  type: v.pipe(v.literal("subAccountSpotTransfer"), v.description("Type of action.")),
1002
998
  /** Sub-account address. */
1003
- subAccountUser: v.pipe(v.pipe(Hex, v.length(42)), v.description("Sub-account address.")),
999
+ subAccountUser: v.pipe(Address, v.description("Sub-account address.")),
1004
1000
  /** `true` for deposit, `false` for withdrawal. */
1005
1001
  isDeposit: v.pipe(v.boolean(), v.description("`true` for deposit, `false` for withdrawal.")),
1006
1002
  /** Token identifier. */
1007
1003
  token: v.pipe(TokenId, v.description("Token identifier.")),
1008
1004
  /** Amount to send (not in wei). */
1009
- amount: v.pipe(UnsignedDecimalMayInputNumber, v.description("Amount to send (not in wei).")),
1005
+ amount: v.pipe(UnsignedDecimal, v.description("Amount to send (not in wei).")),
1010
1006
  }), v.description("Action to perform.")),
1011
1007
  /** Unique request identifier (current timestamp in ms). */
1012
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1008
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1013
1009
  /** Cryptographic signature. */
1014
1010
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1015
1011
  /** Expiration time of the action. */
1016
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1012
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1017
1013
  }), v.transform(removeUndefinedKeys), v.description("Transfer between sub-accounts (spot)."));
1018
1014
  /**
1019
1015
  * Transfer between sub-accounts (perpetual).
@@ -1026,18 +1022,18 @@ export const SubAccountTransferRequest = v.pipe(v.object({
1026
1022
  /** Type of action. */
1027
1023
  type: v.pipe(v.literal("subAccountTransfer"), v.description("Type of action.")),
1028
1024
  /** Sub-account address. */
1029
- subAccountUser: v.pipe(v.pipe(Hex, v.length(42)), v.description("Sub-account address.")),
1025
+ subAccountUser: v.pipe(Address, v.description("Sub-account address.")),
1030
1026
  /** `true` for deposit, `false` for withdrawal. */
1031
1027
  isDeposit: v.pipe(v.boolean(), v.description("`true` for deposit, `false` for withdrawal.")),
1032
1028
  /** Amount to transfer (float * 1e6). */
1033
- usd: v.pipe(UnsignedIntegerMayInputString, v.description("Amount to transfer (float * 1e6).")),
1029
+ usd: v.pipe(UnsignedInteger, v.description("Amount to transfer (float * 1e6).")),
1034
1030
  }), v.description("Action to perform.")),
1035
1031
  /** Unique request identifier (current timestamp in ms). */
1036
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1032
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1037
1033
  /** Cryptographic signature. */
1038
1034
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1039
1035
  /** Expiration time of the action. */
1040
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1036
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1041
1037
  }), v.transform(removeUndefinedKeys), v.description("Transfer between sub-accounts (perpetual)."));
1042
1038
  /**
1043
1039
  * Delegate or undelegate native tokens to or from a validator.
@@ -1054,16 +1050,16 @@ export const TokenDelegateRequest = v.pipe(v.object({
1054
1050
  /** HyperLiquid network. */
1055
1051
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
1056
1052
  /** Validator address. */
1057
- validator: v.pipe(v.pipe(Hex, v.length(42)), v.description("Validator address.")),
1053
+ validator: v.pipe(Address, v.description("Validator address.")),
1058
1054
  /** Amount for delegate/undelegate (float * 1e8). */
1059
- wei: v.pipe(UnsignedIntegerMayInputString, v.description("Amount for delegate/undelegate (float * 1e8).")),
1055
+ wei: v.pipe(UnsignedInteger, v.description("Amount for delegate/undelegate (float * 1e8).")),
1060
1056
  /** `true` for undelegate, `false` for delegate. */
1061
1057
  isUndelegate: v.pipe(v.boolean(), v.description("`true` for undelegate, `false` for delegate.")),
1062
1058
  /** Unique request identifier (current timestamp in ms). */
1063
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1059
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1064
1060
  }), v.description("Action to perform.")),
1065
1061
  /** Unique request identifier (current timestamp in ms). */
1066
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1062
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1067
1063
  /** Cryptographic signature. */
1068
1064
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1069
1065
  }), v.transform(removeUndefinedKeys), v.description("Delegate or undelegate native tokens to or from a validator."));
@@ -1078,18 +1074,18 @@ export const TwapCancelRequest = v.pipe(v.object({
1078
1074
  /** Type of action. */
1079
1075
  type: v.pipe(v.literal("twapCancel"), v.description("Type of action.")),
1080
1076
  /** Asset ID. */
1081
- a: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
1077
+ a: v.pipe(UnsignedInteger, v.description("Asset ID.")),
1082
1078
  /** Twap ID. */
1083
- t: v.pipe(UnsignedIntegerMayInputString, v.description("Twap ID.")),
1079
+ t: v.pipe(UnsignedInteger, v.description("Twap ID.")),
1084
1080
  }), v.description("Action to perform.")),
1085
1081
  /** Unique request identifier (current timestamp in ms). */
1086
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1082
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1087
1083
  /** Cryptographic signature. */
1088
1084
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1089
1085
  /** Vault address (for vault trading). */
1090
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1086
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
1091
1087
  /** Expiration time of the action. */
1092
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1088
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1093
1089
  }), v.transform(removeUndefinedKeys), v.description("Cancel a TWAP order."));
1094
1090
  /**
1095
1091
  * Place a TWAP order.
@@ -1104,27 +1100,27 @@ export const TwapOrderRequest = v.pipe(v.object({
1104
1100
  /** Twap parameters. */
1105
1101
  twap: v.pipe(v.object({
1106
1102
  /** Asset ID. */
1107
- a: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
1103
+ a: v.pipe(UnsignedInteger, v.description("Asset ID.")),
1108
1104
  /** Position side (`true` for long, `false` for short). */
1109
1105
  b: v.pipe(v.boolean(), v.description("Position side (`true` for long, `false` for short).")),
1110
1106
  /** Size (in base currency units). */
1111
- s: v.pipe(UnsignedDecimalMayInputNumber, v.description("Size (in base currency units).")),
1107
+ s: v.pipe(UnsignedDecimal, v.description("Size (in base currency units).")),
1112
1108
  /** Is reduce-only? */
1113
1109
  r: v.pipe(v.boolean(), v.description("Is reduce-only?")),
1114
1110
  /** TWAP duration in minutes. */
1115
- m: v.pipe(UnsignedIntegerMayInputString, v.description("TWAP duration in minutes.")),
1111
+ m: v.pipe(UnsignedInteger, v.description("TWAP duration in minutes.")),
1116
1112
  /** Enable random order timing. */
1117
1113
  t: v.pipe(v.boolean(), v.description("Enable random order timing.")),
1118
1114
  }), v.description("Twap parameters.")),
1119
1115
  }), v.description("Action to perform.")),
1120
1116
  /** Unique request identifier (current timestamp in ms). */
1121
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1117
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1122
1118
  /** Cryptographic signature. */
1123
1119
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1124
1120
  /** Vault address (for vault trading). */
1125
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1121
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
1126
1122
  /** Expiration time of the action. */
1127
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1123
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1128
1124
  }), v.transform(removeUndefinedKeys), v.description("Place a TWAP order."));
1129
1125
  /**
1130
1126
  * Add or remove margin from isolated position.
@@ -1137,20 +1133,20 @@ export const UpdateIsolatedMarginRequest = v.pipe(v.object({
1137
1133
  /** Type of action. */
1138
1134
  type: v.pipe(v.literal("updateIsolatedMargin"), v.description("Type of action.")),
1139
1135
  /** Asset ID. */
1140
- asset: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
1136
+ asset: v.pipe(UnsignedInteger, v.description("Asset ID.")),
1141
1137
  /** Position side (`true` for long, `false` for short). */
1142
1138
  isBuy: v.pipe(v.boolean(), v.description("Position side (`true` for long, `false` for short).")),
1143
1139
  /** Amount to adjust (float * 1e6). */
1144
- ntli: v.pipe(UnsignedIntegerMayInputString, v.description("Amount to adjust (float * 1e6).")),
1140
+ ntli: v.pipe(UnsignedInteger, v.description("Amount to adjust (float * 1e6).")),
1145
1141
  }), v.description("Action to perform.")),
1146
1142
  /** Unique request identifier (current timestamp in ms). */
1147
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1143
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1148
1144
  /** Cryptographic signature. */
1149
1145
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1150
1146
  /** Vault address (for vault trading). */
1151
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1147
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
1152
1148
  /** Expiration time of the action. */
1153
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1149
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1154
1150
  }), v.transform(removeUndefinedKeys), v.description("Add or remove margin from isolated position."));
1155
1151
  /**
1156
1152
  * Update cross or isolated leverage on a coin.
@@ -1163,20 +1159,20 @@ export const UpdateLeverageRequest = v.pipe(v.object({
1163
1159
  /** Type of action. */
1164
1160
  type: v.pipe(v.literal("updateLeverage"), v.description("Type of action.")),
1165
1161
  /** Asset ID. */
1166
- asset: v.pipe(UnsignedIntegerMayInputString, v.description("Asset ID.")),
1162
+ asset: v.pipe(UnsignedInteger, v.description("Asset ID.")),
1167
1163
  /** `true` for cross leverage, `false` for isolated leverage. */
1168
1164
  isCross: v.pipe(v.boolean(), v.description("`true` for cross leverage, `false` for isolated leverage.")),
1169
1165
  /** New leverage value. */
1170
- leverage: v.pipe(v.pipe(UnsignedIntegerMayInputString, v.minValue(1)), v.description("New leverage value.")),
1166
+ leverage: v.pipe(v.pipe(UnsignedInteger, v.minValue(1)), v.description("New leverage value.")),
1171
1167
  }), v.description("Action to perform.")),
1172
1168
  /** Unique request identifier (current timestamp in ms). */
1173
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1169
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1174
1170
  /** Cryptographic signature. */
1175
1171
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1176
1172
  /** Vault address (for vault trading). */
1177
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1173
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
1178
1174
  /** Expiration time of the action. */
1179
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1175
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1180
1176
  }), v.transform(removeUndefinedKeys), v.description("Update cross or isolated leverage on a coin."));
1181
1177
  /**
1182
1178
  * Transfer funds between Spot account and Perp account.
@@ -1193,14 +1189,14 @@ export const UsdClassTransferRequest = v.pipe(v.object({
1193
1189
  /** HyperLiquid network. */
1194
1190
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
1195
1191
  /** Amount to transfer (1 = 1$). */
1196
- amount: v.pipe(UnsignedDecimalMayInputNumber, v.description("Amount to transfer (1 = 1$).")),
1192
+ amount: v.pipe(UnsignedDecimal, v.description("Amount to transfer (1 = 1$).")),
1197
1193
  /** `true` for Spot to Perp, `false` for Perp to Spot. */
1198
1194
  toPerp: v.pipe(v.boolean(), v.description("`true` for Spot to Perp, `false` for Perp to Spot.")),
1199
1195
  /** Unique request identifier (current timestamp in ms). */
1200
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1196
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1201
1197
  }), v.description("Action to perform.")),
1202
1198
  /** Unique request identifier (current timestamp in ms). */
1203
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1199
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1204
1200
  /** Cryptographic signature. */
1205
1201
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1206
1202
  }), v.transform(removeUndefinedKeys), v.description("Transfer funds between Spot account and Perp account."));
@@ -1219,14 +1215,14 @@ export const UsdSendRequest = v.pipe(v.object({
1219
1215
  /** HyperLiquid network. */
1220
1216
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
1221
1217
  /** Destination address. */
1222
- destination: v.pipe(v.pipe(Hex, v.length(42)), v.description("Destination address.")),
1218
+ destination: v.pipe(Address, v.description("Destination address.")),
1223
1219
  /** Amount to send (1 = 1$). */
1224
- amount: v.pipe(UnsignedDecimalMayInputNumber, v.description("Amount to send (1 = 1$).")),
1220
+ amount: v.pipe(UnsignedDecimal, v.description("Amount to send (1 = 1$).")),
1225
1221
  /** Unique request identifier (current timestamp in ms). */
1226
- time: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1222
+ time: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1227
1223
  }), v.description("Action to perform.")),
1228
1224
  /** Unique request identifier (current timestamp in ms). */
1229
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1225
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1230
1226
  /** Cryptographic signature. */
1231
1227
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1232
1228
  }), v.transform(removeUndefinedKeys), v.description("Send usd to another address."));
@@ -1241,21 +1237,21 @@ export const VaultDistributeRequest = v.pipe(v.object({
1241
1237
  /** Type of action. */
1242
1238
  type: v.pipe(v.literal("vaultDistribute"), v.description("Type of action.")),
1243
1239
  /** Vault address. */
1244
- vaultAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
1240
+ vaultAddress: v.pipe(Address, v.description("Vault address.")),
1245
1241
  /**
1246
1242
  * Amount to distribute (float * 1e6).
1247
1243
  *
1248
1244
  * Set to 0 to close the vault.
1249
1245
  */
1250
- usd: v.pipe(UnsignedIntegerMayInputString, v.description("Amount to distribute (float * 1e6)." +
1246
+ usd: v.pipe(UnsignedInteger, v.description("Amount to distribute (float * 1e6)." +
1251
1247
  "\n\nSet to 0 to close the vault.")),
1252
1248
  }), v.description("Action to perform.")),
1253
1249
  /** Unique request identifier (current timestamp in ms). */
1254
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1250
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1255
1251
  /** Cryptographic signature. */
1256
1252
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1257
1253
  /** Expiration time of the action. */
1258
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1254
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1259
1255
  }), v.transform(removeUndefinedKeys), v.description("Distribute funds from a vault between followers."));
1260
1256
  /**
1261
1257
  * Modify a vault configuration.
@@ -1268,18 +1264,18 @@ export const VaultModifyRequest = v.pipe(v.object({
1268
1264
  /** Type of action. */
1269
1265
  type: v.pipe(v.literal("vaultModify"), v.description("Type of action.")),
1270
1266
  /** Vault address. */
1271
- vaultAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
1272
- /** Allow deposits from followers. */
1273
- allowDeposits: v.pipe(v.nullable(v.boolean()), v.description("Allow deposits from followers.")),
1274
- /** Always close positions on withdrawal. */
1275
- alwaysCloseOnWithdraw: v.pipe(v.nullable(v.boolean()), v.description("Always close positions on withdrawal.")),
1267
+ vaultAddress: v.pipe(Address, v.description("Vault address.")),
1268
+ /** Allow deposits from followers (default: null). */
1269
+ allowDeposits: v.pipe(v.optional(v.nullable(v.boolean()), null), v.description("Allow deposits from followers.")),
1270
+ /** Always close positions on withdrawal (default: null). */
1271
+ alwaysCloseOnWithdraw: v.pipe(v.optional(v.nullable(v.boolean()), null), v.description("Always close positions on withdrawal.")),
1276
1272
  }), v.description("Action to perform.")),
1277
1273
  /** Unique request identifier (current timestamp in ms). */
1278
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1274
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1279
1275
  /** Cryptographic signature. */
1280
1276
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1281
1277
  /** Expiration time of the action. */
1282
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1278
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1283
1279
  }), v.transform(removeUndefinedKeys), v.description("Modify a vault configuration."));
1284
1280
  /**
1285
1281
  * Deposit or withdraw from a vault.
@@ -1292,18 +1288,18 @@ export const VaultTransferRequest = v.pipe(v.object({
1292
1288
  /** Type of action. */
1293
1289
  type: v.pipe(v.literal("vaultTransfer"), v.description("Type of action.")),
1294
1290
  /** Vault address. */
1295
- vaultAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
1291
+ vaultAddress: v.pipe(Address, v.description("Vault address.")),
1296
1292
  /** `true` for deposit, `false` for withdrawal. */
1297
1293
  isDeposit: v.pipe(v.boolean(), v.description("`true` for deposit, `false` for withdrawal.")),
1298
1294
  /** Amount for deposit/withdrawal (float * 1e6). */
1299
- usd: v.pipe(UnsignedIntegerMayInputString, v.description("Amount for deposit/withdrawal (float * 1e6).")),
1295
+ usd: v.pipe(UnsignedInteger, v.description("Amount for deposit/withdrawal (float * 1e6).")),
1300
1296
  }), v.description("Action to perform.")),
1301
1297
  /** Unique request identifier (current timestamp in ms). */
1302
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1298
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1303
1299
  /** Cryptographic signature. */
1304
1300
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1305
1301
  /** Expiration time of the action. */
1306
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1302
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1307
1303
  }), v.transform(removeUndefinedKeys), v.description("Deposit or withdraw from a vault."));
1308
1304
  /**
1309
1305
  * Initiate a withdrawal request.
@@ -1320,14 +1316,14 @@ export const Withdraw3Request = v.pipe(v.object({
1320
1316
  /** HyperLiquid network. */
1321
1317
  hyperliquidChain: v.pipe(v.union([v.literal("Mainnet"), v.literal("Testnet")]), v.description("HyperLiquid network.")),
1322
1318
  /** Destination address. */
1323
- destination: v.pipe(v.pipe(Hex, v.length(42)), v.description("Destination address.")),
1319
+ destination: v.pipe(Address, v.description("Destination address.")),
1324
1320
  /** Amount to withdraw (1 = 1$). */
1325
- amount: v.pipe(UnsignedDecimalMayInputNumber, v.description("Amount to withdraw (1 = 1$).")),
1321
+ amount: v.pipe(UnsignedDecimal, v.description("Amount to withdraw (1 = 1$).")),
1326
1322
  /** Unique request identifier (current timestamp in ms). */
1327
- time: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1323
+ time: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1328
1324
  }), v.description("Action to perform.")),
1329
1325
  /** Unique request identifier (current timestamp in ms). */
1330
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1326
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1331
1327
  /** Cryptographic signature. */
1332
1328
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1333
1329
  }), v.transform(removeUndefinedKeys), v.description("Initiate a withdrawal request."));
@@ -1348,9 +1344,9 @@ export const MultiSigRequest = v.pipe(v.object({
1348
1344
  /** Multi-signature payload information. */
1349
1345
  payload: v.pipe(v.object({
1350
1346
  /** Address of the multi-signature user account. */
1351
- multiSigUser: v.pipe(v.pipe(Hex, v.length(42)), v.description("Address of the multi-signature user account.")),
1347
+ multiSigUser: v.pipe(Address, v.description("Address of the multi-signature user account.")),
1352
1348
  /** Address of the authorized user initiating the request (any authorized user). */
1353
- outerSigner: v.pipe(v.pipe(Hex, v.length(42)), v.description("Address of the authorized user initiating the request (any authorized user).")),
1349
+ outerSigner: v.pipe(Address, v.description("Address of the authorized user initiating the request (any authorized user).")),
1354
1350
  /** The underlying action to be executed through multi-sig. */
1355
1351
  action: v.pipe(v.union([
1356
1352
  ApproveAgentRequest.entries.action,
@@ -1398,12 +1394,12 @@ export const MultiSigRequest = v.pipe(v.object({
1398
1394
  }), v.description("Multi-signature payload information.")),
1399
1395
  }), v.description("Action to perform.")),
1400
1396
  /** Unique request identifier (current timestamp in ms). */
1401
- nonce: v.pipe(UnsignedIntegerMayInputString, v.description("Unique request identifier (current timestamp in ms).")),
1397
+ nonce: v.pipe(UnsignedInteger, v.description("Unique request identifier (current timestamp in ms).")),
1402
1398
  /** Cryptographic signature. */
1403
1399
  signature: v.pipe(Signature, v.description("Cryptographic signature.")),
1404
1400
  /** Vault address (for vault trading). */
1405
- vaultAddress: v.pipe(v.optional(v.pipe(Hex, v.length(42))), v.description("Vault address (for vault trading).")),
1401
+ vaultAddress: v.pipe(v.optional(Address), v.description("Vault address (for vault trading).")),
1406
1402
  /** Expiration time of the action. */
1407
- expiresAfter: v.pipe(v.optional(UnsignedIntegerMayInputString), v.description("Expiration time of the action.")),
1403
+ expiresAfter: v.pipe(v.optional(UnsignedInteger), v.description("Expiration time of the action.")),
1408
1404
  }), v.transform(removeUndefinedKeys), v.description("A multi-signature request."));
1409
1405
  //# sourceMappingURL=requests.js.map