@nktkas/hyperliquid 0.24.3 → 0.25.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/README.md +141 -32
  2. package/esm/mod.d.ts +11 -11
  3. package/esm/mod.d.ts.map +1 -1
  4. package/esm/mod.js +2 -1
  5. package/esm/mod.js.map +1 -0
  6. package/esm/src/clients/exchange.d.ts +29 -25
  7. package/esm/src/clients/exchange.d.ts.map +1 -1
  8. package/esm/src/clients/exchange.js +54 -53
  9. package/esm/src/clients/exchange.js.map +1 -0
  10. package/esm/src/clients/info.d.ts +80 -20
  11. package/esm/src/clients/info.d.ts.map +1 -1
  12. package/esm/src/clients/info.js +312 -73
  13. package/esm/src/clients/info.js.map +1 -0
  14. package/esm/src/clients/multiSign.d.ts +11 -7
  15. package/esm/src/clients/multiSign.d.ts.map +1 -1
  16. package/esm/src/clients/multiSign.js +2 -1
  17. package/esm/src/clients/multiSign.js.map +1 -0
  18. package/esm/src/clients/subscription.d.ts +9 -9
  19. package/esm/src/clients/subscription.d.ts.map +1 -1
  20. package/esm/src/clients/subscription.js +29 -27
  21. package/esm/src/clients/subscription.js.map +1 -0
  22. package/esm/src/{base.d.ts → errors.d.ts} +1 -1
  23. package/esm/src/errors.d.ts.map +1 -0
  24. package/esm/src/{base.js → errors.js} +1 -0
  25. package/esm/src/errors.js.map +1 -0
  26. package/esm/src/schemas/_base.d.ts +14 -0
  27. package/esm/src/schemas/_base.d.ts.map +1 -0
  28. package/esm/src/schemas/_base.js +15 -0
  29. package/esm/src/schemas/_base.js.map +1 -0
  30. package/esm/src/schemas/exchange/requests.d.ts +8953 -0
  31. package/esm/src/schemas/exchange/requests.d.ts.map +1 -0
  32. package/esm/src/schemas/exchange/requests.js +1414 -0
  33. package/esm/src/schemas/exchange/requests.js.map +1 -0
  34. package/esm/src/schemas/exchange/responses.d.ts +567 -0
  35. package/esm/src/schemas/exchange/responses.d.ts.map +1 -0
  36. package/esm/src/schemas/exchange/responses.js +244 -0
  37. package/esm/src/schemas/exchange/responses.js.map +1 -0
  38. package/esm/src/schemas/explorer/requests.d.ts +44 -0
  39. package/esm/src/schemas/explorer/requests.d.ts.map +1 -0
  40. package/esm/src/schemas/explorer/requests.js +33 -0
  41. package/esm/src/schemas/explorer/requests.js.map +1 -0
  42. package/esm/src/schemas/explorer/responses.d.ts +360 -0
  43. package/esm/src/schemas/explorer/responses.d.ts.map +1 -0
  44. package/esm/src/schemas/explorer/responses.js +57 -0
  45. package/esm/src/schemas/explorer/responses.js.map +1 -0
  46. package/esm/src/schemas/info/accounts.d.ts +2159 -0
  47. package/esm/src/schemas/info/accounts.d.ts.map +1 -0
  48. package/esm/src/schemas/info/accounts.js +623 -0
  49. package/esm/src/schemas/info/accounts.js.map +1 -0
  50. package/esm/src/schemas/info/assets.d.ts +974 -0
  51. package/esm/src/schemas/info/assets.d.ts.map +1 -0
  52. package/esm/src/schemas/info/assets.js +285 -0
  53. package/esm/src/schemas/info/assets.js.map +1 -0
  54. package/esm/src/schemas/info/markets.d.ts +155 -0
  55. package/esm/src/schemas/info/markets.d.ts.map +1 -0
  56. package/esm/src/schemas/info/markets.js +70 -0
  57. package/esm/src/schemas/info/markets.js.map +1 -0
  58. package/esm/src/schemas/info/orders.d.ts +957 -0
  59. package/esm/src/schemas/info/orders.d.ts.map +1 -0
  60. package/esm/src/schemas/info/orders.js +298 -0
  61. package/esm/src/schemas/info/orders.js.map +1 -0
  62. package/esm/src/schemas/info/requests.d.ts +924 -0
  63. package/esm/src/schemas/info/requests.d.ts.map +1 -0
  64. package/esm/src/schemas/info/requests.js +687 -0
  65. package/esm/src/schemas/info/requests.js.map +1 -0
  66. package/esm/src/schemas/info/validators.d.ts +326 -0
  67. package/esm/src/schemas/info/validators.d.ts.map +1 -0
  68. package/esm/src/schemas/info/validators.js +126 -0
  69. package/esm/src/schemas/info/validators.js.map +1 -0
  70. package/esm/src/schemas/info/vaults.d.ts +447 -0
  71. package/esm/src/schemas/info/vaults.d.ts.map +1 -0
  72. package/esm/src/schemas/info/vaults.js +111 -0
  73. package/esm/src/schemas/info/vaults.js.map +1 -0
  74. package/esm/src/schemas/mod.d.ts +101 -0
  75. package/esm/src/schemas/mod.d.ts.map +1 -0
  76. package/esm/src/schemas/mod.js +115 -0
  77. package/esm/src/schemas/mod.js.map +1 -0
  78. package/esm/src/schemas/subscriptions/requests.d.ts +332 -0
  79. package/esm/src/schemas/subscriptions/requests.d.ts.map +1 -0
  80. package/esm/src/schemas/subscriptions/requests.js +259 -0
  81. package/esm/src/schemas/subscriptions/requests.js.map +1 -0
  82. package/esm/src/schemas/subscriptions/responses.d.ts +3643 -0
  83. package/esm/src/schemas/subscriptions/responses.d.ts.map +1 -0
  84. package/esm/src/schemas/subscriptions/responses.js +234 -0
  85. package/esm/src/schemas/subscriptions/responses.js.map +1 -0
  86. package/esm/src/signing/_signTypedData/ethers.js +1 -0
  87. package/esm/src/signing/_signTypedData/ethers.js.map +1 -0
  88. package/esm/src/signing/_signTypedData/mod.js +1 -0
  89. package/esm/src/signing/_signTypedData/mod.js.map +1 -0
  90. package/esm/src/signing/_signTypedData/private_key.js +1 -0
  91. package/esm/src/signing/_signTypedData/private_key.js.map +1 -0
  92. package/esm/src/signing/_signTypedData/viem.js +1 -0
  93. package/esm/src/signing/_signTypedData/viem.js.map +1 -0
  94. package/esm/src/signing/mod.d.ts +109 -29
  95. package/esm/src/signing/mod.d.ts.map +1 -1
  96. package/esm/src/signing/mod.js +136 -29
  97. package/esm/src/signing/mod.js.map +1 -0
  98. package/esm/src/transports/base.d.ts +4 -4
  99. package/esm/src/transports/base.d.ts.map +1 -1
  100. package/esm/src/transports/base.js +3 -2
  101. package/esm/src/transports/base.js.map +1 -0
  102. package/esm/src/transports/http/http_transport.d.ts +3 -2
  103. package/esm/src/transports/http/http_transport.d.ts.map +1 -1
  104. package/esm/src/transports/http/http_transport.js +1 -0
  105. package/esm/src/transports/http/http_transport.js.map +1 -0
  106. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
  107. package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  108. package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  109. package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  110. package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
  111. package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  112. package/esm/src/transports/websocket/_websocket_async_request.js +1 -0
  113. package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -0
  114. package/esm/src/transports/websocket/websocket_transport.d.ts +9 -1
  115. package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  116. package/esm/src/transports/websocket/websocket_transport.js +4 -0
  117. package/esm/src/transports/websocket/websocket_transport.js.map +1 -0
  118. package/package.json +6 -5
  119. package/script/mod.d.ts +11 -11
  120. package/script/mod.d.ts.map +1 -1
  121. package/script/mod.js +2 -1
  122. package/script/mod.js.map +1 -0
  123. package/script/src/clients/exchange.d.ts +29 -25
  124. package/script/src/clients/exchange.d.ts.map +1 -1
  125. package/script/src/clients/exchange.js +60 -59
  126. package/script/src/clients/exchange.js.map +1 -0
  127. package/script/src/clients/info.d.ts +80 -20
  128. package/script/src/clients/info.d.ts.map +1 -1
  129. package/script/src/clients/info.js +312 -73
  130. package/script/src/clients/info.js.map +1 -0
  131. package/script/src/clients/multiSign.d.ts +11 -7
  132. package/script/src/clients/multiSign.d.ts.map +1 -1
  133. package/script/src/clients/multiSign.js +2 -1
  134. package/script/src/clients/multiSign.js.map +1 -0
  135. package/script/src/clients/subscription.d.ts +9 -9
  136. package/script/src/clients/subscription.d.ts.map +1 -1
  137. package/script/src/clients/subscription.js +29 -27
  138. package/script/src/clients/subscription.js.map +1 -0
  139. package/script/src/{base.d.ts → errors.d.ts} +1 -1
  140. package/script/src/errors.d.ts.map +1 -0
  141. package/script/src/{base.js → errors.js} +1 -0
  142. package/script/src/errors.js.map +1 -0
  143. package/script/src/schemas/_base.d.ts +14 -0
  144. package/script/src/schemas/_base.d.ts.map +1 -0
  145. package/script/src/schemas/_base.js +51 -0
  146. package/script/src/schemas/_base.js.map +1 -0
  147. package/script/src/schemas/exchange/requests.d.ts +8953 -0
  148. package/script/src/schemas/exchange/requests.d.ts.map +1 -0
  149. package/script/src/schemas/exchange/requests.js +1450 -0
  150. package/script/src/schemas/exchange/requests.js.map +1 -0
  151. package/script/src/schemas/exchange/responses.d.ts +567 -0
  152. package/script/src/schemas/exchange/responses.d.ts.map +1 -0
  153. package/script/src/schemas/exchange/responses.js +280 -0
  154. package/script/src/schemas/exchange/responses.js.map +1 -0
  155. package/script/src/schemas/explorer/requests.d.ts +44 -0
  156. package/script/src/schemas/explorer/requests.d.ts.map +1 -0
  157. package/script/src/schemas/explorer/requests.js +69 -0
  158. package/script/src/schemas/explorer/requests.js.map +1 -0
  159. package/script/src/schemas/explorer/responses.d.ts +360 -0
  160. package/script/src/schemas/explorer/responses.d.ts.map +1 -0
  161. package/script/src/schemas/explorer/responses.js +93 -0
  162. package/script/src/schemas/explorer/responses.js.map +1 -0
  163. package/script/src/schemas/info/accounts.d.ts +2159 -0
  164. package/script/src/schemas/info/accounts.d.ts.map +1 -0
  165. package/script/src/schemas/info/accounts.js +659 -0
  166. package/script/src/schemas/info/accounts.js.map +1 -0
  167. package/script/src/schemas/info/assets.d.ts +974 -0
  168. package/script/src/schemas/info/assets.d.ts.map +1 -0
  169. package/script/src/schemas/info/assets.js +321 -0
  170. package/script/src/schemas/info/assets.js.map +1 -0
  171. package/script/src/schemas/info/markets.d.ts +155 -0
  172. package/script/src/schemas/info/markets.d.ts.map +1 -0
  173. package/script/src/schemas/info/markets.js +106 -0
  174. package/script/src/schemas/info/markets.js.map +1 -0
  175. package/script/src/schemas/info/orders.d.ts +957 -0
  176. package/script/src/schemas/info/orders.d.ts.map +1 -0
  177. package/script/src/schemas/info/orders.js +334 -0
  178. package/script/src/schemas/info/orders.js.map +1 -0
  179. package/script/src/schemas/info/requests.d.ts +924 -0
  180. package/script/src/schemas/info/requests.d.ts.map +1 -0
  181. package/script/src/schemas/info/requests.js +724 -0
  182. package/script/src/schemas/info/requests.js.map +1 -0
  183. package/script/src/schemas/info/validators.d.ts +326 -0
  184. package/script/src/schemas/info/validators.d.ts.map +1 -0
  185. package/script/src/schemas/info/validators.js +162 -0
  186. package/script/src/schemas/info/validators.js.map +1 -0
  187. package/script/src/schemas/info/vaults.d.ts +447 -0
  188. package/script/src/schemas/info/vaults.d.ts.map +1 -0
  189. package/script/src/schemas/info/vaults.js +147 -0
  190. package/script/src/schemas/info/vaults.js.map +1 -0
  191. package/script/src/schemas/mod.d.ts +101 -0
  192. package/script/src/schemas/mod.d.ts.map +1 -0
  193. package/script/src/schemas/mod.js +157 -0
  194. package/script/src/schemas/mod.js.map +1 -0
  195. package/script/src/schemas/subscriptions/requests.d.ts +332 -0
  196. package/script/src/schemas/subscriptions/requests.d.ts.map +1 -0
  197. package/script/src/schemas/subscriptions/requests.js +295 -0
  198. package/script/src/schemas/subscriptions/requests.js.map +1 -0
  199. package/script/src/schemas/subscriptions/responses.d.ts +3643 -0
  200. package/script/src/schemas/subscriptions/responses.d.ts.map +1 -0
  201. package/script/src/schemas/subscriptions/responses.js +270 -0
  202. package/script/src/schemas/subscriptions/responses.js.map +1 -0
  203. package/script/src/signing/_signTypedData/ethers.js +1 -0
  204. package/script/src/signing/_signTypedData/ethers.js.map +1 -0
  205. package/script/src/signing/_signTypedData/mod.js +1 -0
  206. package/script/src/signing/_signTypedData/mod.js.map +1 -0
  207. package/script/src/signing/_signTypedData/private_key.js +1 -0
  208. package/script/src/signing/_signTypedData/private_key.js.map +1 -0
  209. package/script/src/signing/_signTypedData/viem.js +1 -0
  210. package/script/src/signing/_signTypedData/viem.js.map +1 -0
  211. package/script/src/signing/mod.d.ts +109 -29
  212. package/script/src/signing/mod.d.ts.map +1 -1
  213. package/script/src/signing/mod.js +138 -33
  214. package/script/src/signing/mod.js.map +1 -0
  215. package/script/src/transports/base.d.ts +4 -4
  216. package/script/src/transports/base.d.ts.map +1 -1
  217. package/script/src/transports/base.js +4 -3
  218. package/script/src/transports/base.js.map +1 -0
  219. package/script/src/transports/http/http_transport.d.ts +3 -2
  220. package/script/src/transports/http/http_transport.d.ts.map +1 -1
  221. package/script/src/transports/http/http_transport.js +1 -0
  222. package/script/src/transports/http/http_transport.js.map +1 -0
  223. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
  224. package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
  225. package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -0
  226. package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
  227. package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
  228. package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
  229. package/script/src/transports/websocket/_websocket_async_request.js +1 -0
  230. package/script/src/transports/websocket/_websocket_async_request.js.map +1 -0
  231. package/script/src/transports/websocket/websocket_transport.d.ts +9 -1
  232. package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
  233. package/script/src/transports/websocket/websocket_transport.js +4 -0
  234. package/script/src/transports/websocket/websocket_transport.js.map +1 -0
  235. package/src/mod.ts +28 -0
  236. package/src/src/clients/exchange.ts +2246 -0
  237. package/src/src/clients/info.ts +2076 -0
  238. package/src/src/clients/multiSign.ts +183 -0
  239. package/src/src/clients/subscription.ts +841 -0
  240. package/src/src/errors.ts +7 -0
  241. package/src/src/schemas/_base.ts +43 -0
  242. package/src/src/schemas/exchange/requests.ts +3057 -0
  243. package/src/src/schemas/exchange/responses.ts +540 -0
  244. package/src/src/schemas/explorer/requests.ts +65 -0
  245. package/src/src/schemas/explorer/responses.ts +138 -0
  246. package/src/src/schemas/info/accounts.ts +1490 -0
  247. package/src/src/schemas/info/assets.ts +693 -0
  248. package/src/src/schemas/info/markets.ts +171 -0
  249. package/src/src/schemas/info/orders.ts +597 -0
  250. package/src/src/schemas/info/requests.ts +1369 -0
  251. package/src/src/schemas/info/validators.ts +299 -0
  252. package/src/src/schemas/info/vaults.ts +262 -0
  253. package/src/src/schemas/mod.ts +121 -0
  254. package/src/src/schemas/subscriptions/requests.ts +504 -0
  255. package/src/src/schemas/subscriptions/responses.ts +576 -0
  256. package/src/src/signing/_signTypedData/ethers.ts +59 -0
  257. package/src/src/signing/_signTypedData/mod.ts +121 -0
  258. package/src/src/signing/_signTypedData/private_key.ts +229 -0
  259. package/src/src/signing/_signTypedData/viem.ts +55 -0
  260. package/src/src/signing/mod.ts +572 -0
  261. package/src/src/transports/base.ts +54 -0
  262. package/src/src/transports/http/http_transport.ts +208 -0
  263. package/src/src/transports/websocket/_hyperliquid_event_target.ts +118 -0
  264. package/src/src/transports/websocket/_reconnecting_websocket.ts +404 -0
  265. package/src/src/transports/websocket/_websocket_async_request.ts +229 -0
  266. package/src/src/transports/websocket/websocket_transport.ts +394 -0
  267. package/esm/src/base.d.ts.map +0 -1
  268. package/esm/src/signing/_sorter.d.ts +0 -127
  269. package/esm/src/signing/_sorter.d.ts.map +0 -1
  270. package/esm/src/signing/_sorter.js +0 -693
  271. package/esm/src/types/exchange/requests.d.ts +0 -1345
  272. package/esm/src/types/exchange/requests.d.ts.map +0 -1
  273. package/esm/src/types/exchange/requests.js +0 -1
  274. package/esm/src/types/exchange/responses.d.ts +0 -233
  275. package/esm/src/types/exchange/responses.d.ts.map +0 -1
  276. package/esm/src/types/exchange/responses.js +0 -1
  277. package/esm/src/types/explorer/requests.d.ts +0 -32
  278. package/esm/src/types/explorer/requests.d.ts.map +0 -1
  279. package/esm/src/types/explorer/requests.js +0 -1
  280. package/esm/src/types/explorer/responses.d.ts +0 -58
  281. package/esm/src/types/explorer/responses.d.ts.map +0 -1
  282. package/esm/src/types/explorer/responses.js +0 -1
  283. package/esm/src/types/info/accounts.d.ts +0 -864
  284. package/esm/src/types/info/accounts.d.ts.map +0 -1
  285. package/esm/src/types/info/accounts.js +0 -1
  286. package/esm/src/types/info/assets.d.ts +0 -354
  287. package/esm/src/types/info/assets.d.ts.map +0 -1
  288. package/esm/src/types/info/assets.js +0 -1
  289. package/esm/src/types/info/markets.d.ts +0 -79
  290. package/esm/src/types/info/markets.d.ts.map +0 -1
  291. package/esm/src/types/info/markets.js +0 -1
  292. package/esm/src/types/info/orders.d.ts +0 -266
  293. package/esm/src/types/info/orders.d.ts.map +0 -1
  294. package/esm/src/types/info/orders.js +0 -1
  295. package/esm/src/types/info/requests.d.ts +0 -640
  296. package/esm/src/types/info/requests.d.ts.map +0 -1
  297. package/esm/src/types/info/requests.js +0 -1
  298. package/esm/src/types/info/validators.d.ts +0 -147
  299. package/esm/src/types/info/validators.d.ts.map +0 -1
  300. package/esm/src/types/info/validators.js +0 -1
  301. package/esm/src/types/info/vaults.d.ts +0 -119
  302. package/esm/src/types/info/vaults.d.ts.map +0 -1
  303. package/esm/src/types/info/vaults.js +0 -1
  304. package/esm/src/types/mod.d.ts +0 -38
  305. package/esm/src/types/mod.d.ts.map +0 -1
  306. package/esm/src/types/mod.js +0 -24
  307. package/esm/src/types/subscriptions/requests.d.ts +0 -154
  308. package/esm/src/types/subscriptions/requests.d.ts.map +0 -1
  309. package/esm/src/types/subscriptions/requests.js +0 -1
  310. package/esm/src/types/subscriptions/responses.d.ts +0 -238
  311. package/esm/src/types/subscriptions/responses.d.ts.map +0 -1
  312. package/esm/src/types/subscriptions/responses.js +0 -1
  313. package/script/src/base.d.ts.map +0 -1
  314. package/script/src/signing/_sorter.d.ts +0 -127
  315. package/script/src/signing/_sorter.d.ts.map +0 -1
  316. package/script/src/signing/_sorter.js +0 -696
  317. package/script/src/types/exchange/requests.d.ts +0 -1345
  318. package/script/src/types/exchange/requests.d.ts.map +0 -1
  319. package/script/src/types/exchange/requests.js +0 -2
  320. package/script/src/types/exchange/responses.d.ts +0 -233
  321. package/script/src/types/exchange/responses.d.ts.map +0 -1
  322. package/script/src/types/exchange/responses.js +0 -2
  323. package/script/src/types/explorer/requests.d.ts +0 -32
  324. package/script/src/types/explorer/requests.d.ts.map +0 -1
  325. package/script/src/types/explorer/requests.js +0 -2
  326. package/script/src/types/explorer/responses.d.ts +0 -58
  327. package/script/src/types/explorer/responses.d.ts.map +0 -1
  328. package/script/src/types/explorer/responses.js +0 -2
  329. package/script/src/types/info/accounts.d.ts +0 -864
  330. package/script/src/types/info/accounts.d.ts.map +0 -1
  331. package/script/src/types/info/accounts.js +0 -2
  332. package/script/src/types/info/assets.d.ts +0 -354
  333. package/script/src/types/info/assets.d.ts.map +0 -1
  334. package/script/src/types/info/assets.js +0 -2
  335. package/script/src/types/info/markets.d.ts +0 -79
  336. package/script/src/types/info/markets.d.ts.map +0 -1
  337. package/script/src/types/info/markets.js +0 -2
  338. package/script/src/types/info/orders.d.ts +0 -266
  339. package/script/src/types/info/orders.d.ts.map +0 -1
  340. package/script/src/types/info/orders.js +0 -2
  341. package/script/src/types/info/requests.d.ts +0 -640
  342. package/script/src/types/info/requests.d.ts.map +0 -1
  343. package/script/src/types/info/requests.js +0 -2
  344. package/script/src/types/info/validators.d.ts +0 -147
  345. package/script/src/types/info/validators.d.ts.map +0 -1
  346. package/script/src/types/info/validators.js +0 -2
  347. package/script/src/types/info/vaults.d.ts +0 -119
  348. package/script/src/types/info/vaults.d.ts.map +0 -1
  349. package/script/src/types/info/vaults.js +0 -2
  350. package/script/src/types/mod.d.ts +0 -38
  351. package/script/src/types/mod.d.ts.map +0 -1
  352. package/script/src/types/mod.js +0 -25
  353. package/script/src/types/subscriptions/requests.d.ts +0 -154
  354. package/script/src/types/subscriptions/requests.d.ts.map +0 -1
  355. package/script/src/types/subscriptions/requests.js +0 -2
  356. package/script/src/types/subscriptions/responses.d.ts +0 -238
  357. package/script/src/types/subscriptions/responses.d.ts.map +0 -1
  358. package/script/src/types/subscriptions/responses.js +0 -2
@@ -0,0 +1,447 @@
1
+ import * as v from "valibot";
2
+ /** Vault relationship configuration. */
3
+ export declare const VaultRelationship: v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
4
+ /** Relationship type. */
5
+ readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
6
+ }, undefined>, v.ObjectSchema<{
7
+ /** Relationship type. */
8
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
9
+ /** Child vault information. */
10
+ readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
11
+ /** Child vault addresses. */
12
+ readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
13
+ }, undefined>, v.DescriptionAction<{
14
+ childAddresses: `0x${string}`[];
15
+ }, "Child vault information.">]>;
16
+ }, undefined>], undefined>, v.DescriptionAction<{
17
+ type: "normal" | "child";
18
+ } | {
19
+ type: "parent";
20
+ data: {
21
+ childAddresses: `0x${string}`[];
22
+ };
23
+ }, "Vault relationship configuration.">]>;
24
+ export type VaultRelationship = v.InferOutput<typeof VaultRelationship>;
25
+ /** Vault follower state. */
26
+ export declare const VaultFollowerState: v.SchemaWithPipe<readonly [v.ObjectSchema<{
27
+ /** Follower address. */
28
+ readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Follower address.">]>;
29
+ /** Follower vault equity. */
30
+ readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
31
+ /** Current profit and loss. */
32
+ readonly pnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Current profit and loss.">]>;
33
+ /** All-time profit and loss. */
34
+ readonly allTimePnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "All-time profit and loss.">]>;
35
+ /** Subscription duration in days. */
36
+ readonly daysFollowing: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Subscription duration in days.">]>;
37
+ /** Vault entry timestamp. */
38
+ readonly vaultEntryTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Vault entry timestamp.">]>;
39
+ /** Timestamp when funds become unlocked. */
40
+ readonly lockupUntil: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when funds become unlocked.">]>;
41
+ }, undefined>, v.DescriptionAction<{
42
+ user: `0x${string}`;
43
+ vaultEquity: string;
44
+ pnl: string;
45
+ allTimePnl: string;
46
+ daysFollowing: number;
47
+ vaultEntryTime: number;
48
+ lockupUntil: number;
49
+ }, "Vault follower state.">]>;
50
+ export type VaultFollowerState = v.InferOutput<typeof VaultFollowerState>;
51
+ /** Details about a vault. */
52
+ export declare const VaultDetails: v.SchemaWithPipe<readonly [v.ObjectSchema<{
53
+ /** Vault name. */
54
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
55
+ /** Vault address. */
56
+ readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
57
+ /** Leader address. */
58
+ readonly leader: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Leader address.">]>;
59
+ /** Vault description. */
60
+ readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault description.">]>;
61
+ /** Vault portfolio metrics grouped by time periods. */
62
+ readonly portfolio: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.TupleSchema<[v.TupleSchema<[v.LiteralSchema<"day", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
63
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
64
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
65
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
66
+ }, undefined>, v.DescriptionAction<{
67
+ accountValueHistory: [number, string][];
68
+ pnlHistory: [number, string][];
69
+ vlm: string;
70
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"week", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
71
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
72
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
73
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
74
+ }, undefined>, v.DescriptionAction<{
75
+ accountValueHistory: [number, string][];
76
+ pnlHistory: [number, string][];
77
+ vlm: string;
78
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"month", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
79
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
80
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
81
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
82
+ }, undefined>, v.DescriptionAction<{
83
+ accountValueHistory: [number, string][];
84
+ pnlHistory: [number, string][];
85
+ vlm: string;
86
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"allTime", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
87
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
88
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
89
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
90
+ }, undefined>, v.DescriptionAction<{
91
+ accountValueHistory: [number, string][];
92
+ pnlHistory: [number, string][];
93
+ vlm: string;
94
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpDay", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
95
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
96
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
97
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
98
+ }, undefined>, v.DescriptionAction<{
99
+ accountValueHistory: [number, string][];
100
+ pnlHistory: [number, string][];
101
+ vlm: string;
102
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpWeek", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
103
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
104
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
105
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
106
+ }, undefined>, v.DescriptionAction<{
107
+ accountValueHistory: [number, string][];
108
+ pnlHistory: [number, string][];
109
+ vlm: string;
110
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpMonth", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
111
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
112
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
113
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
114
+ }, undefined>, v.DescriptionAction<{
115
+ accountValueHistory: [number, string][];
116
+ pnlHistory: [number, string][];
117
+ vlm: string;
118
+ }, "Portfolio metrics snapshot.">]>], undefined>, v.TupleSchema<[v.LiteralSchema<"perpAllTime", undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
119
+ readonly accountValueHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for account value as [timestamp, value].">]>;
120
+ readonly pnlHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>], undefined>, undefined>, v.DescriptionAction<[number, string][], "History entries for profit and loss as [timestamp, value].">]>;
121
+ readonly vlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Volume metric for the portfolio.">]>;
122
+ }, undefined>, v.DescriptionAction<{
123
+ accountValueHistory: [number, string][];
124
+ pnlHistory: [number, string][];
125
+ vlm: string;
126
+ }, "Portfolio metrics snapshot.">]>], undefined>], undefined>, v.DescriptionAction<[["day", {
127
+ accountValueHistory: [number, string][];
128
+ pnlHistory: [number, string][];
129
+ vlm: string;
130
+ }], ["week", {
131
+ accountValueHistory: [number, string][];
132
+ pnlHistory: [number, string][];
133
+ vlm: string;
134
+ }], ["month", {
135
+ accountValueHistory: [number, string][];
136
+ pnlHistory: [number, string][];
137
+ vlm: string;
138
+ }], ["allTime", {
139
+ accountValueHistory: [number, string][];
140
+ pnlHistory: [number, string][];
141
+ vlm: string;
142
+ }], ["perpDay", {
143
+ accountValueHistory: [number, string][];
144
+ pnlHistory: [number, string][];
145
+ vlm: string;
146
+ }], ["perpWeek", {
147
+ accountValueHistory: [number, string][];
148
+ pnlHistory: [number, string][];
149
+ vlm: string;
150
+ }], ["perpMonth", {
151
+ accountValueHistory: [number, string][];
152
+ pnlHistory: [number, string][];
153
+ vlm: string;
154
+ }], ["perpAllTime", {
155
+ accountValueHistory: [number, string][];
156
+ pnlHistory: [number, string][];
157
+ vlm: string;
158
+ }]], "Portfolio metrics grouped by time periods.">]>, v.DescriptionAction<[["day", {
159
+ accountValueHistory: [number, string][];
160
+ pnlHistory: [number, string][];
161
+ vlm: string;
162
+ }], ["week", {
163
+ accountValueHistory: [number, string][];
164
+ pnlHistory: [number, string][];
165
+ vlm: string;
166
+ }], ["month", {
167
+ accountValueHistory: [number, string][];
168
+ pnlHistory: [number, string][];
169
+ vlm: string;
170
+ }], ["allTime", {
171
+ accountValueHistory: [number, string][];
172
+ pnlHistory: [number, string][];
173
+ vlm: string;
174
+ }], ["perpDay", {
175
+ accountValueHistory: [number, string][];
176
+ pnlHistory: [number, string][];
177
+ vlm: string;
178
+ }], ["perpWeek", {
179
+ accountValueHistory: [number, string][];
180
+ pnlHistory: [number, string][];
181
+ vlm: string;
182
+ }], ["perpMonth", {
183
+ accountValueHistory: [number, string][];
184
+ pnlHistory: [number, string][];
185
+ vlm: string;
186
+ }], ["perpAllTime", {
187
+ accountValueHistory: [number, string][];
188
+ pnlHistory: [number, string][];
189
+ vlm: string;
190
+ }]], "Vault portfolio metrics grouped by time periods.">]>;
191
+ /** Annual percentage rate. */
192
+ readonly apr: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Annual percentage rate.">]>;
193
+ /** Current user follower state */
194
+ readonly followerState: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
195
+ /** Follower address. */
196
+ readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Follower address.">]>;
197
+ /** Follower vault equity. */
198
+ readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
199
+ /** Current profit and loss. */
200
+ readonly pnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Current profit and loss.">]>;
201
+ /** All-time profit and loss. */
202
+ readonly allTimePnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "All-time profit and loss.">]>;
203
+ /** Subscription duration in days. */
204
+ readonly daysFollowing: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Subscription duration in days.">]>;
205
+ /** Vault entry timestamp. */
206
+ readonly vaultEntryTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Vault entry timestamp.">]>;
207
+ /** Timestamp when funds become unlocked. */
208
+ readonly lockupUntil: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when funds become unlocked.">]>;
209
+ }, undefined>, v.DescriptionAction<{
210
+ user: `0x${string}`;
211
+ vaultEquity: string;
212
+ pnl: string;
213
+ allTimePnl: string;
214
+ daysFollowing: number;
215
+ vaultEntryTime: number;
216
+ lockupUntil: number;
217
+ }, "Vault follower state.">]>, undefined>, v.DescriptionAction<{
218
+ user: `0x${string}`;
219
+ vaultEquity: string;
220
+ pnl: string;
221
+ allTimePnl: string;
222
+ daysFollowing: number;
223
+ vaultEntryTime: number;
224
+ lockupUntil: number;
225
+ } | null, "Current user follower state">]>;
226
+ /** Ownership percentage held by leader. */
227
+ readonly leaderFraction: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Ownership percentage held by leader.">]>;
228
+ /** Leader commission percentage. */
229
+ readonly leaderCommission: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Leader commission percentage.">]>;
230
+ /** Vault followers list. */
231
+ readonly followers: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
232
+ /** Follower address or Leader. */
233
+ readonly user: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.LiteralSchema<"Leader", undefined>], undefined>, v.DescriptionAction<`0x${string}` | "Leader", "Follower address or Leader.">]>;
234
+ readonly vaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Follower vault equity.">]>;
235
+ readonly pnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Current profit and loss.">]>;
236
+ readonly allTimePnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "All-time profit and loss.">]>;
237
+ readonly daysFollowing: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Subscription duration in days.">]>;
238
+ readonly vaultEntryTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Vault entry timestamp.">]>;
239
+ readonly lockupUntil: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when funds become unlocked.">]>;
240
+ }, undefined>, undefined>, v.DescriptionAction<{
241
+ user: `0x${string}` | "Leader";
242
+ vaultEquity: string;
243
+ pnl: string;
244
+ allTimePnl: string;
245
+ daysFollowing: number;
246
+ vaultEntryTime: number;
247
+ lockupUntil: number;
248
+ }[], "Vault followers list.">]>;
249
+ /** Maximum distributable amount. */
250
+ readonly maxDistributable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Maximum distributable amount.">]>;
251
+ /** Maximum withdrawable amount. */
252
+ readonly maxWithdrawable: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.DescriptionAction<number, "Maximum withdrawable amount.">]>;
253
+ /** Vault closure status. */
254
+ readonly isClosed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Vault closure status.">]>;
255
+ /** Vault relationship type. */
256
+ readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
257
+ /** Relationship type. */
258
+ readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
259
+ }, undefined>, v.ObjectSchema<{
260
+ /** Relationship type. */
261
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
262
+ /** Child vault information. */
263
+ readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
264
+ /** Child vault addresses. */
265
+ readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
266
+ }, undefined>, v.DescriptionAction<{
267
+ childAddresses: `0x${string}`[];
268
+ }, "Child vault information.">]>;
269
+ }, undefined>], undefined>, v.DescriptionAction<{
270
+ type: "normal" | "child";
271
+ } | {
272
+ type: "parent";
273
+ data: {
274
+ childAddresses: `0x${string}`[];
275
+ };
276
+ }, "Vault relationship configuration.">]>, v.DescriptionAction<{
277
+ type: "normal" | "child";
278
+ } | {
279
+ type: "parent";
280
+ data: {
281
+ childAddresses: `0x${string}`[];
282
+ };
283
+ }, "Vault relationship type.">]>;
284
+ /** Deposit permission status. */
285
+ readonly allowDeposits: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Deposit permission status.">]>;
286
+ /** Position closure policy on withdrawal. */
287
+ readonly alwaysCloseOnWithdraw: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Position closure policy on withdrawal.">]>;
288
+ }, undefined>, v.DescriptionAction<{
289
+ name: string;
290
+ vaultAddress: `0x${string}`;
291
+ leader: `0x${string}`;
292
+ description: string;
293
+ portfolio: [["day", {
294
+ accountValueHistory: [number, string][];
295
+ pnlHistory: [number, string][];
296
+ vlm: string;
297
+ }], ["week", {
298
+ accountValueHistory: [number, string][];
299
+ pnlHistory: [number, string][];
300
+ vlm: string;
301
+ }], ["month", {
302
+ accountValueHistory: [number, string][];
303
+ pnlHistory: [number, string][];
304
+ vlm: string;
305
+ }], ["allTime", {
306
+ accountValueHistory: [number, string][];
307
+ pnlHistory: [number, string][];
308
+ vlm: string;
309
+ }], ["perpDay", {
310
+ accountValueHistory: [number, string][];
311
+ pnlHistory: [number, string][];
312
+ vlm: string;
313
+ }], ["perpWeek", {
314
+ accountValueHistory: [number, string][];
315
+ pnlHistory: [number, string][];
316
+ vlm: string;
317
+ }], ["perpMonth", {
318
+ accountValueHistory: [number, string][];
319
+ pnlHistory: [number, string][];
320
+ vlm: string;
321
+ }], ["perpAllTime", {
322
+ accountValueHistory: [number, string][];
323
+ pnlHistory: [number, string][];
324
+ vlm: string;
325
+ }]];
326
+ apr: number;
327
+ followerState: {
328
+ user: `0x${string}`;
329
+ vaultEquity: string;
330
+ pnl: string;
331
+ allTimePnl: string;
332
+ daysFollowing: number;
333
+ vaultEntryTime: number;
334
+ lockupUntil: number;
335
+ } | null;
336
+ leaderFraction: number;
337
+ leaderCommission: number;
338
+ followers: {
339
+ user: `0x${string}` | "Leader";
340
+ vaultEquity: string;
341
+ pnl: string;
342
+ allTimePnl: string;
343
+ daysFollowing: number;
344
+ vaultEntryTime: number;
345
+ lockupUntil: number;
346
+ }[];
347
+ maxDistributable: number;
348
+ maxWithdrawable: number;
349
+ isClosed: boolean;
350
+ relationship: {
351
+ type: "normal" | "child";
352
+ } | {
353
+ type: "parent";
354
+ data: {
355
+ childAddresses: `0x${string}`[];
356
+ };
357
+ };
358
+ allowDeposits: boolean;
359
+ alwaysCloseOnWithdraw: boolean;
360
+ }, "Details about a vault.">]>;
361
+ export type VaultDetails = v.InferOutput<typeof VaultDetails>;
362
+ /** User vault equity details. */
363
+ export declare const VaultEquity: v.SchemaWithPipe<readonly [v.ObjectSchema<{
364
+ /** Vault address. */
365
+ readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
366
+ /** User deposited equity. */
367
+ readonly equity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "User deposited equity.">]>;
368
+ /** Timestamp when the user can withdraw their equity. */
369
+ readonly lockedUntilTimestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the user can withdraw their equity.">]>;
370
+ }, undefined>, v.DescriptionAction<{
371
+ vaultAddress: `0x${string}`;
372
+ equity: string;
373
+ lockedUntilTimestamp: number;
374
+ }, "User vault equity details.">]>;
375
+ export type VaultEquity = v.InferOutput<typeof VaultEquity>;
376
+ /** Summary of a vault. */
377
+ export declare const VaultSummary: v.SchemaWithPipe<readonly [v.ObjectSchema<{
378
+ /** Vault name. */
379
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
380
+ /** Vault address. */
381
+ readonly vaultAddress: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
382
+ /** Leader address. */
383
+ readonly leader: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Leader address.">]>;
384
+ /** Total value locked. */
385
+ readonly tvl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total value locked.">]>;
386
+ /** Vault closure status. */
387
+ readonly isClosed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Vault closure status.">]>;
388
+ /** Vault relationship type. */
389
+ readonly relationship: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
390
+ /** Relationship type. */
391
+ readonly type: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"normal", undefined>, v.LiteralSchema<"child", undefined>], undefined>, v.DescriptionAction<"normal" | "child", "Relationship type.">]>;
392
+ }, undefined>, v.ObjectSchema<{
393
+ /** Relationship type. */
394
+ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"parent", undefined>, v.DescriptionAction<"parent", "Relationship type.">]>;
395
+ /** Child vault information. */
396
+ readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
397
+ /** Child vault addresses. */
398
+ readonly childAddresses: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}`[], "Child vault addresses.">]>;
399
+ }, undefined>, v.DescriptionAction<{
400
+ childAddresses: `0x${string}`[];
401
+ }, "Child vault information.">]>;
402
+ }, undefined>], undefined>, v.DescriptionAction<{
403
+ type: "normal" | "child";
404
+ } | {
405
+ type: "parent";
406
+ data: {
407
+ childAddresses: `0x${string}`[];
408
+ };
409
+ }, "Vault relationship configuration.">]>, v.DescriptionAction<{
410
+ type: "normal" | "child";
411
+ } | {
412
+ type: "parent";
413
+ data: {
414
+ childAddresses: `0x${string}`[];
415
+ };
416
+ }, "Vault relationship type.">]>;
417
+ /** Creation timestamp. */
418
+ readonly createTimeMillis: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Creation timestamp.">]>;
419
+ }, undefined>, v.DescriptionAction<{
420
+ name: string;
421
+ vaultAddress: `0x${string}`;
422
+ leader: `0x${string}`;
423
+ tvl: string;
424
+ isClosed: boolean;
425
+ relationship: {
426
+ type: "normal" | "child";
427
+ } | {
428
+ type: "parent";
429
+ data: {
430
+ childAddresses: `0x${string}`[];
431
+ };
432
+ };
433
+ createTimeMillis: number;
434
+ }, "Summary of a vault.">]>;
435
+ export type VaultSummary = v.InferOutput<typeof VaultSummary>;
436
+ /** Vault that a user is leading. */
437
+ export declare const VaultLeading: v.SchemaWithPipe<readonly [v.ObjectSchema<{
438
+ /** Vault address. */
439
+ readonly address: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
440
+ /** Vault name. */
441
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Vault name.">]>;
442
+ }, undefined>, v.DescriptionAction<{
443
+ address: `0x${string}`;
444
+ name: string;
445
+ }, "Vault that a user is leading.">]>;
446
+ export type VaultLeading = v.InferOutput<typeof VaultLeading>;
447
+ //# sourceMappingURL=vaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaults.d.ts","sourceRoot":"","sources":["../../../../src/src/schemas/info/vaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAI7B,wCAAwC;AACxC,eAAO,MAAM,iBAAiB;IAGlB,yBAAyB;;;IAOzB,yBAAyB;;IAKzB,+BAA+B;;QAGvB,6BAA6B;;;;;;;;;;;;yCAWhD,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAExE,4BAA4B;AAC5B,eAAO,MAAM,kBAAkB;IAEvB,wBAAwB;;IAKxB,6BAA6B;;IAK7B,+BAA+B;;IAK/B,gCAAgC;;IAKhC,qCAAqC;;IAKrC,6BAA6B;;IAK7B,4CAA4C;;;;;;;;;;6BAOnD,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE1E,6BAA6B;AAC7B,eAAO,MAAM,YAAY;IAEjB,kBAAkB;;IAKlB,qBAAqB;;IAKrB,sBAAsB;;IAKtB,yBAAyB;;IAKzB,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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qB;;IAKrB,kBAAkB;;;;;qCAOzB,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -0,0 +1,111 @@
1
+ import * as v from "valibot";
2
+ import { Decimal, Hex, UnsignedDecimal, UnsignedInteger } from "../_base.js";
3
+ import { PortfolioPeriods } from "./accounts.js";
4
+ /** Vault relationship configuration. */
5
+ export const VaultRelationship = v.pipe(v.union([
6
+ v.object({
7
+ /** Relationship type. */
8
+ type: v.pipe(v.union([v.literal("normal"), v.literal("child")]), v.description("Relationship type.")),
9
+ }),
10
+ v.object({
11
+ /** Relationship type. */
12
+ type: v.pipe(v.literal("parent"), v.description("Relationship type.")),
13
+ /** Child vault information. */
14
+ data: v.pipe(v.object({
15
+ /** Child vault addresses. */
16
+ childAddresses: v.pipe(v.array(v.pipe(Hex, v.length(42))), v.description("Child vault addresses.")),
17
+ }), v.description("Child vault information.")),
18
+ }),
19
+ ]), v.description("Vault relationship configuration."));
20
+ /** Vault follower state. */
21
+ export const VaultFollowerState = v.pipe(v.object({
22
+ /** Follower address. */
23
+ user: v.pipe(v.pipe(Hex, v.length(42)), v.description("Follower address.")),
24
+ /** Follower vault equity. */
25
+ vaultEquity: v.pipe(UnsignedDecimal, v.description("Follower vault equity.")),
26
+ /** Current profit and loss. */
27
+ pnl: v.pipe(Decimal, v.description("Current profit and loss.")),
28
+ /** All-time profit and loss. */
29
+ allTimePnl: v.pipe(Decimal, v.description("All-time profit and loss.")),
30
+ /** Subscription duration in days. */
31
+ daysFollowing: v.pipe(UnsignedInteger, v.description("Subscription duration in days.")),
32
+ /** Vault entry timestamp. */
33
+ vaultEntryTime: v.pipe(UnsignedInteger, v.description("Vault entry timestamp.")),
34
+ /** Timestamp when funds become unlocked. */
35
+ lockupUntil: v.pipe(UnsignedInteger, v.description("Timestamp when funds become unlocked.")),
36
+ }), v.description("Vault follower state."));
37
+ /** Details about a vault. */
38
+ export const VaultDetails = v.pipe(v.object({
39
+ /** Vault name. */
40
+ name: v.pipe(v.string(), v.description("Vault name.")),
41
+ /** Vault address. */
42
+ vaultAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
43
+ /** Leader address. */
44
+ leader: v.pipe(v.pipe(Hex, v.length(42)), v.description("Leader address.")),
45
+ /** Vault description. */
46
+ description: v.pipe(v.string(), v.description("Vault description.")),
47
+ /** Vault portfolio metrics grouped by time periods. */
48
+ portfolio: v.pipe(PortfolioPeriods, v.description("Vault portfolio metrics grouped by time periods.")),
49
+ /** Annual percentage rate. */
50
+ apr: v.pipe(v.number(), v.description("Annual percentage rate.")),
51
+ /** Current user follower state */
52
+ followerState: v.pipe(v.nullable(VaultFollowerState), v.description("Current user follower state")),
53
+ /** Ownership percentage held by leader. */
54
+ leaderFraction: v.pipe(v.number(), v.description("Ownership percentage held by leader.")),
55
+ /** Leader commission percentage. */
56
+ leaderCommission: v.pipe(v.number(), v.description("Leader commission percentage.")),
57
+ /** Vault followers list. */
58
+ followers: v.pipe(v.array(v.object({
59
+ ...v.omit(v.object(VaultFollowerState.entries), ["user"]).entries,
60
+ ...v.object({
61
+ /** Follower address or Leader. */
62
+ user: v.pipe(v.union([v.pipe(Hex, v.length(42)), v.literal("Leader")]), v.description("Follower address or Leader.")),
63
+ }).entries,
64
+ })), v.description("Vault followers list.")),
65
+ /** Maximum distributable amount. */
66
+ maxDistributable: v.pipe(v.number(), v.description("Maximum distributable amount.")),
67
+ /** Maximum withdrawable amount. */
68
+ maxWithdrawable: v.pipe(v.number(), v.description("Maximum withdrawable amount.")),
69
+ /** Vault closure status. */
70
+ isClosed: v.pipe(v.boolean(), v.description("Vault closure status.")),
71
+ /** Vault relationship type. */
72
+ relationship: v.pipe(VaultRelationship, v.description("Vault relationship type.")),
73
+ /** Deposit permission status. */
74
+ allowDeposits: v.pipe(v.boolean(), v.description("Deposit permission status.")),
75
+ /** Position closure policy on withdrawal. */
76
+ alwaysCloseOnWithdraw: v.pipe(v.boolean(), v.description("Position closure policy on withdrawal.")),
77
+ }), v.description("Details about a vault."));
78
+ /** User vault equity details. */
79
+ export const VaultEquity = v.pipe(v.object({
80
+ /** Vault address. */
81
+ vaultAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
82
+ /** User deposited equity. */
83
+ equity: v.pipe(UnsignedDecimal, v.description("User deposited equity.")),
84
+ /** Timestamp when the user can withdraw their equity. */
85
+ lockedUntilTimestamp: v.pipe(UnsignedInteger, v.description("Timestamp when the user can withdraw their equity.")),
86
+ }), v.description("User vault equity details."));
87
+ /** Summary of a vault. */
88
+ export const VaultSummary = v.pipe(v.object({
89
+ /** Vault name. */
90
+ name: v.pipe(v.string(), v.description("Vault name.")),
91
+ /** Vault address. */
92
+ vaultAddress: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
93
+ /** Leader address. */
94
+ leader: v.pipe(v.pipe(Hex, v.length(42)), v.description("Leader address.")),
95
+ /** Total value locked. */
96
+ tvl: v.pipe(UnsignedDecimal, v.description("Total value locked.")),
97
+ /** Vault closure status. */
98
+ isClosed: v.pipe(v.boolean(), v.description("Vault closure status.")),
99
+ /** Vault relationship type. */
100
+ relationship: v.pipe(VaultRelationship, v.description("Vault relationship type.")),
101
+ /** Creation timestamp. */
102
+ createTimeMillis: v.pipe(UnsignedInteger, v.description("Creation timestamp.")),
103
+ }), v.description("Summary of a vault."));
104
+ /** Vault that a user is leading. */
105
+ export const VaultLeading = v.pipe(v.object({
106
+ /** Vault address. */
107
+ address: v.pipe(v.pipe(Hex, v.length(42)), v.description("Vault address.")),
108
+ /** Vault name. */
109
+ name: v.pipe(v.string(), v.description("Vault name.")),
110
+ }), v.description("Vault that a user is leading."));
111
+ //# sourceMappingURL=vaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaults.js","sourceRoot":"","sources":["../../../../src/src/schemas/info/vaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B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