@polyester/sdk 0.30.2 → 0.32.0-devnet-20261101180406

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 (378) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +7 -0
  3. package/dist/browser-core.d.ts.map +1 -1
  4. package/dist/browser-core.js +24 -2
  5. package/dist/browser-core.js.map +1 -1
  6. package/dist/catalogs/market-data-catalog.d.ts +2 -0
  7. package/dist/catalogs/market-data-catalog.d.ts.map +1 -1
  8. package/dist/catalogs/market-data-catalog.js +1 -0
  9. package/dist/catalogs/market-data-catalog.js.map +1 -1
  10. package/dist/catalogs/snapshot-validation.js +6 -0
  11. package/dist/catalogs/snapshot-validation.js.map +1 -1
  12. package/dist/client.d.ts +2 -2
  13. package/dist/client.js +2 -2
  14. package/dist/client.js.map +1 -1
  15. package/dist/core-client.d.ts.map +1 -1
  16. package/dist/core-client.js +1 -0
  17. package/dist/core-client.js.map +1 -1
  18. package/dist/gen/auth/v1/api_keys_pb.d.ts +6 -3
  19. package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
  20. package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
  21. package/dist/gen/auth/v1/auth_pb.d.ts +9 -2
  22. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  23. package/dist/gen/auth/v1/auth_pb.js +9 -2
  24. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  25. package/dist/gen/auth/v1/policies_pb.d.ts +26 -2
  26. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  27. package/dist/gen/auth/v1/policies_pb.js +26 -2
  28. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  29. package/dist/gen/auth/v1/subaccounts_pb.d.ts +20 -14
  30. package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
  31. package/dist/gen/auth/v1/subaccounts_pb.js +20 -3
  32. package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
  33. package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts.map +1 -1
  34. package/dist/gen/chain/analytics/v1/analytics_read_pb.js +2 -1
  35. package/dist/gen/chain/analytics/v1/analytics_read_pb.js.map +1 -1
  36. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +10 -6
  37. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts.map +1 -1
  38. package/dist/gen/chain/deposit/v1/deposit_pb.js +2 -1
  39. package/dist/gen/chain/deposit/v1/deposit_pb.js.map +1 -1
  40. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +32 -2
  41. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
  42. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +2 -2
  43. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
  44. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +19 -3
  45. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts.map +1 -1
  46. package/dist/gen/chain/lifecycle/v1/types_pb.js +18 -2
  47. package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
  48. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +840 -0
  49. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts.map +1 -0
  50. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js +351 -0
  51. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js.map +1 -0
  52. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +22 -2
  53. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
  54. package/dist/gen/chain/withdraw/v1/withdraw_pb.js +17 -1
  55. package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
  56. package/dist/gen/chain/zipper/v1/reason_pb.d.ts +14 -0
  57. package/dist/gen/chain/zipper/v1/reason_pb.d.ts.map +1 -1
  58. package/dist/gen/chain/zipper/v1/reason_pb.js +15 -1
  59. package/dist/gen/chain/zipper/v1/reason_pb.js.map +1 -1
  60. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1121 -0
  61. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts.map +1 -0
  62. package/dist/gen/checkpoints/v1/checkpoints_pb.js +327 -0
  63. package/dist/gen/checkpoints/v1/checkpoints_pb.js.map +1 -0
  64. package/dist/gen/claims/v1/claims_pb.d.ts +61 -4
  65. package/dist/gen/claims/v1/claims_pb.d.ts.map +1 -1
  66. package/dist/gen/claims/v1/claims_pb.js +26 -1
  67. package/dist/gen/claims/v1/claims_pb.js.map +1 -1
  68. package/dist/gen/fees/v1/fees_pb.d.ts.map +1 -1
  69. package/dist/gen/fees/v1/fees_pb.js +2 -1
  70. package/dist/gen/fees/v1/fees_pb.js.map +1 -1
  71. package/dist/gen/index.d.ts +7 -5
  72. package/dist/gen/index.js +12 -10
  73. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +38 -2
  74. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
  75. package/dist/gen/ledger/read/v1/ledger_read_pb.js +13 -7
  76. package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
  77. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +248 -27
  78. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  79. package/dist/gen/marketdata/v1/marketdata_pb.js +73 -20
  80. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  81. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +2 -1
  82. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts.map +1 -1
  83. package/dist/gen/marketoverview/v1/marketoverview_pb.js.map +1 -1
  84. package/dist/gen/orderbook/v1/orderbook_pb.d.ts +16 -4
  85. package/dist/gen/orderbook/v1/orderbook_pb.d.ts.map +1 -1
  86. package/dist/gen/orderbook/v1/orderbook_pb.js +1 -1
  87. package/dist/gen/orderbook/v1/orderbook_pb.js.map +1 -1
  88. package/dist/gen/orders/v1/orders_pb.d.ts +1164 -53
  89. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  90. package/dist/gen/orders/v1/orders_pb.js +959 -42
  91. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  92. package/dist/gen/orders/v1/orders_read_pb.d.ts +205 -17
  93. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  94. package/dist/gen/orders/v1/orders_read_pb.js +156 -17
  95. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  96. package/dist/gen/polyester/api/options_pb.d.ts +8 -1
  97. package/dist/gen/polyester/api/options_pb.d.ts.map +1 -1
  98. package/dist/gen/polyester/api/options_pb.js +8 -1
  99. package/dist/gen/polyester/api/options_pb.js.map +1 -1
  100. package/dist/gen/privatews/v1/private_ws_pb.d.ts +1419 -0
  101. package/dist/gen/privatews/v1/private_ws_pb.d.ts.map +1 -0
  102. package/dist/gen/privatews/v1/private_ws_pb.js +551 -0
  103. package/dist/gen/privatews/v1/private_ws_pb.js.map +1 -0
  104. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +1 -0
  105. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts.map +1 -1
  106. package/dist/gen/ratelimit/v1/ratelimit_pb.js +1 -1
  107. package/dist/gen/ratelimit/v1/ratelimit_pb.js.map +1 -1
  108. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +2108 -0
  109. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -0
  110. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +522 -0
  111. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -0
  112. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +2296 -0
  113. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -0
  114. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +1014 -0
  115. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -0
  116. package/dist/gen/swap/v1/swap_pb.d.ts +945 -0
  117. package/dist/gen/swap/v1/swap_pb.d.ts.map +1 -0
  118. package/dist/gen/swap/v1/swap_pb.js +426 -0
  119. package/dist/gen/swap/v1/swap_pb.js.map +1 -0
  120. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +67 -3
  121. package/dist/gen/tradews/v1/trade_ws_pb.d.ts.map +1 -1
  122. package/dist/gen/tradews/v1/trade_ws_pb.js +1 -1
  123. package/dist/gen/tradews/v1/trade_ws_pb.js.map +1 -1
  124. package/dist/gen/triggers/v1/triggers_pb.d.ts +587 -29
  125. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  126. package/dist/gen/triggers/v1/triggers_pb.js +420 -19
  127. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  128. package/dist/gen/vip/v1/vip_pb.d.ts +95 -7
  129. package/dist/gen/vip/v1/vip_pb.d.ts.map +1 -1
  130. package/dist/gen/vip/v1/vip_pb.js +53 -5
  131. package/dist/gen/vip/v1/vip_pb.js.map +1 -1
  132. package/dist/index.d.ts +9 -7
  133. package/dist/index.js +2 -2
  134. package/dist/realtime/client.d.ts +3 -0
  135. package/dist/realtime/client.d.ts.map +1 -1
  136. package/dist/realtime/client.js +76 -24
  137. package/dist/realtime/client.js.map +1 -1
  138. package/dist/realtime/index.d.ts +2 -1
  139. package/dist/realtime/private-orders.d.ts +38 -0
  140. package/dist/realtime/private-orders.d.ts.map +1 -0
  141. package/dist/realtime/private-orders.js +594 -0
  142. package/dist/realtime/private-orders.js.map +1 -0
  143. package/dist/realtime/ready-gated-subscription.js +10 -4
  144. package/dist/realtime/ready-gated-subscription.js.map +1 -1
  145. package/dist/realtime/snapshot-then-stream.js +1 -1
  146. package/dist/realtime/snapshot-then-stream.js.map +1 -1
  147. package/dist/realtime/types.d.ts +3 -0
  148. package/dist/realtime/types.d.ts.map +1 -1
  149. package/dist/services/address-book/address-book.schemas.d.ts +2 -2
  150. package/dist/services/auth/account-signer-auth.d.ts +8 -0
  151. package/dist/services/auth/account-signer-auth.d.ts.map +1 -1
  152. package/dist/services/auth/account-signer-auth.js +37 -0
  153. package/dist/services/auth/account-signer-auth.js.map +1 -1
  154. package/dist/services/auth/profile/profile.schemas.js +1 -1
  155. package/dist/services/balances/balances.js +1 -1
  156. package/dist/services/candles/candles.codecs.js +15 -0
  157. package/dist/services/candles/candles.codecs.js.map +1 -1
  158. package/dist/services/candles/candles.schemas.d.ts +13 -13
  159. package/dist/services/checkpoints/checkpoints.codecs.d.ts +8 -0
  160. package/dist/services/checkpoints/checkpoints.codecs.d.ts.map +1 -0
  161. package/dist/services/checkpoints/checkpoints.codecs.js +36 -0
  162. package/dist/services/checkpoints/checkpoints.codecs.js.map +1 -0
  163. package/dist/services/checkpoints/checkpoints.d.ts +22 -0
  164. package/dist/services/checkpoints/checkpoints.d.ts.map +1 -0
  165. package/dist/services/checkpoints/checkpoints.js +31 -0
  166. package/dist/services/checkpoints/checkpoints.js.map +1 -0
  167. package/dist/services/checkpoints/checkpoints.schemas.d.ts +437 -0
  168. package/dist/services/checkpoints/checkpoints.schemas.d.ts.map +1 -0
  169. package/dist/services/checkpoints/checkpoints.schemas.js +176 -0
  170. package/dist/services/checkpoints/checkpoints.schemas.js.map +1 -0
  171. package/dist/services/checkpoints/checkpoints.types.d.ts +3 -0
  172. package/dist/services/checkpoints/service.d.ts +8 -0
  173. package/dist/services/checkpoints/service.d.ts.map +1 -0
  174. package/dist/services/checkpoints/service.js +9 -0
  175. package/dist/services/checkpoints/service.js.map +1 -0
  176. package/dist/services/claims/claims.codecs.d.ts +1 -1
  177. package/dist/services/claims/claims.codecs.d.ts.map +1 -1
  178. package/dist/services/claims/claims.codecs.js +2 -1
  179. package/dist/services/claims/claims.codecs.js.map +1 -1
  180. package/dist/services/claims/claims.d.ts +13 -5
  181. package/dist/services/claims/claims.d.ts.map +1 -1
  182. package/dist/services/claims/claims.js +15 -6
  183. package/dist/services/claims/claims.js.map +1 -1
  184. package/dist/services/claims/claims.schemas.d.ts +13 -3
  185. package/dist/services/claims/claims.schemas.d.ts.map +1 -1
  186. package/dist/services/claims/claims.schemas.js +10 -4
  187. package/dist/services/claims/claims.schemas.js.map +1 -1
  188. package/dist/services/claims/claims.types.d.ts +2 -2
  189. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  190. package/dist/services/lifecycle/lifecycle.codecs.d.ts +1 -1
  191. package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
  192. package/dist/services/lifecycle/lifecycle.codecs.js +4 -2
  193. package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
  194. package/dist/services/lifecycle/lifecycle.schemas.d.ts +89 -39
  195. package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
  196. package/dist/services/lifecycle/lifecycle.schemas.js +7 -1
  197. package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
  198. package/dist/services/market-data/market-data.codecs.js +2 -1
  199. package/dist/services/market-data/market-data.codecs.js.map +1 -1
  200. package/dist/services/market-data/market-data.d.ts +10 -1
  201. package/dist/services/market-data/market-data.d.ts.map +1 -1
  202. package/dist/services/market-data/market-data.js +21 -9
  203. package/dist/services/market-data/market-data.js.map +1 -1
  204. package/dist/services/market-data/market-data.schemas.d.ts +29 -2
  205. package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
  206. package/dist/services/market-data/market-data.schemas.js +53 -4
  207. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  208. package/dist/services/market-data/market-data.types.d.ts +2 -2
  209. package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
  210. package/dist/services/orderbook/orderbook.d.ts +2 -1
  211. package/dist/services/orderbook/orderbook.d.ts.map +1 -1
  212. package/dist/services/orderbook/orderbook.js +17 -2
  213. package/dist/services/orderbook/orderbook.js.map +1 -1
  214. package/dist/services/orderbook/orderbook.schemas.d.ts +5 -1
  215. package/dist/services/orderbook/orderbook.schemas.d.ts.map +1 -1
  216. package/dist/services/orderbook/orderbook.schemas.js +2 -0
  217. package/dist/services/orderbook/orderbook.schemas.js.map +1 -1
  218. package/dist/services/orders/order-enums.codecs.js +7 -1
  219. package/dist/services/orders/order-enums.codecs.js.map +1 -1
  220. package/dist/services/orders/order-errors.schemas.d.ts +3 -1
  221. package/dist/services/orders/order-errors.schemas.d.ts.map +1 -1
  222. package/dist/services/orders/order-errors.schemas.js +4 -1
  223. package/dist/services/orders/order-errors.schemas.js.map +1 -1
  224. package/dist/services/orders/orders-batch.schemas.d.ts +343 -22
  225. package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
  226. package/dist/services/orders/orders-batch.schemas.js +12 -2
  227. package/dist/services/orders/orders-batch.schemas.js.map +1 -1
  228. package/dist/services/orders/orders-input.schemas.d.ts +548 -6
  229. package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
  230. package/dist/services/orders/orders-input.schemas.js +23 -5
  231. package/dist/services/orders/orders-input.schemas.js.map +1 -1
  232. package/dist/services/orders/orders-modify.schemas.d.ts +106 -1
  233. package/dist/services/orders/orders-modify.schemas.d.ts.map +1 -1
  234. package/dist/services/orders/orders-modify.schemas.js +1 -1
  235. package/dist/services/orders/orders-output.schemas.d.ts +78 -59
  236. package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
  237. package/dist/services/orders/orders-output.schemas.js +15 -22
  238. package/dist/services/orders/orders-output.schemas.js.map +1 -1
  239. package/dist/services/orders/orders-risk.schemas.d.ts +69 -1
  240. package/dist/services/orders/orders-risk.schemas.d.ts.map +1 -1
  241. package/dist/services/orders/orders-risk.schemas.js +21 -11
  242. package/dist/services/orders/orders-risk.schemas.js.map +1 -1
  243. package/dist/services/orders/orders.codecs.js +26 -2
  244. package/dist/services/orders/orders.codecs.js.map +1 -1
  245. package/dist/services/orders/orders.d.ts +31 -5
  246. package/dist/services/orders/orders.d.ts.map +1 -1
  247. package/dist/services/orders/orders.js +53 -15
  248. package/dist/services/orders/orders.js.map +1 -1
  249. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  250. package/dist/services/policies/shared.codecs.js +8 -2
  251. package/dist/services/policies/shared.codecs.js.map +1 -1
  252. package/dist/services/policies/shared.d.ts +1 -1
  253. package/dist/services/policies/shared.d.ts.map +1 -1
  254. package/dist/services/policies/shared.js +4 -1
  255. package/dist/services/policies/shared.js.map +1 -1
  256. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +9 -9
  257. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js +1 -1
  258. package/dist/services/subaccounts/subaccounts.codecs.js +4 -1
  259. package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
  260. package/dist/services/subaccounts/subaccounts.d.ts +1 -1
  261. package/dist/services/subaccounts/subaccounts.d.ts.map +1 -1
  262. package/dist/services/subaccounts/subaccounts.js +1 -2
  263. package/dist/services/subaccounts/subaccounts.js.map +1 -1
  264. package/dist/services/subaccounts/subaccounts.schemas.d.ts +18 -18
  265. package/dist/services/trades/trades.d.ts +2 -0
  266. package/dist/services/trades/trades.d.ts.map +1 -1
  267. package/dist/services/trades/trades.js +6 -6
  268. package/dist/services/trades/trades.js.map +1 -1
  269. package/dist/services/trades/trades.schemas.d.ts +2 -2
  270. package/dist/services/trades/trades.schemas.js +1 -1
  271. package/dist/services/trading-withdraws/trading-withdraws.d.ts +13 -2
  272. package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
  273. package/dist/services/trading-withdraws/trading-withdraws.js +50 -22
  274. package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
  275. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +12 -0
  276. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
  277. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +26 -6
  278. package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
  279. package/dist/services/trailing-oneof-inputs.js +6 -1
  280. package/dist/services/trailing-oneof-inputs.js.map +1 -1
  281. package/dist/services/transfers/transfers.d.ts +2 -0
  282. package/dist/services/transfers/transfers.d.ts.map +1 -1
  283. package/dist/services/transfers/transfers.js +6 -11
  284. package/dist/services/transfers/transfers.js.map +1 -1
  285. package/dist/services/transfers/transfers.schemas.d.ts +3 -0
  286. package/dist/services/transfers/transfers.schemas.d.ts.map +1 -1
  287. package/dist/services/transfers/transfers.schemas.js +3 -1
  288. package/dist/services/transfers/transfers.schemas.js.map +1 -1
  289. package/dist/services/triggers/trigger-child-order.schemas.js +23 -18
  290. package/dist/services/triggers/trigger-child-order.schemas.js.map +1 -1
  291. package/dist/services/triggers/trigger-input.schemas.d.ts +288 -25
  292. package/dist/services/triggers/trigger-input.schemas.d.ts.map +1 -1
  293. package/dist/services/triggers/trigger-input.schemas.js +38 -22
  294. package/dist/services/triggers/trigger-input.schemas.js.map +1 -1
  295. package/dist/services/triggers/triggers-output.schemas.d.ts +180 -56
  296. package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
  297. package/dist/services/triggers/triggers-output.schemas.js +28 -20
  298. package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
  299. package/dist/services/triggers/triggers.codecs.js +60 -0
  300. package/dist/services/triggers/triggers.codecs.js.map +1 -1
  301. package/dist/services/triggers/triggers.d.ts +6 -2
  302. package/dist/services/triggers/triggers.d.ts.map +1 -1
  303. package/dist/services/triggers/triggers.js +10 -8
  304. package/dist/services/triggers/triggers.js.map +1 -1
  305. package/dist/services/vip/vip.js +1 -1
  306. package/dist/services/vip/vip.schemas.d.ts +23 -1
  307. package/dist/services/vip/vip.schemas.d.ts.map +1 -1
  308. package/dist/services/vip/vip.schemas.js +20 -2
  309. package/dist/services/vip/vip.schemas.js.map +1 -1
  310. package/dist/services/vip/vip.types.d.ts +2 -2
  311. package/dist/shared/catalog-config.d.ts +14 -2
  312. package/dist/shared/catalog-config.d.ts.map +1 -1
  313. package/dist/shared/catalog-config.js +2 -1
  314. package/dist/shared/catalog-config.js.map +1 -1
  315. package/dist/shared/connect-error-mapping.d.ts +3 -0
  316. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  317. package/dist/shared/connect-error-mapping.js +45 -6
  318. package/dist/shared/connect-error-mapping.js.map +1 -1
  319. package/dist/shared/errors.d.ts +98 -7
  320. package/dist/shared/errors.d.ts.map +1 -1
  321. package/dist/shared/errors.js +108 -4
  322. package/dist/shared/errors.js.map +1 -1
  323. package/dist/shared/request-options.d.ts +7 -0
  324. package/dist/shared/request-options.d.ts.map +1 -1
  325. package/dist/shared/request-options.js +6 -1
  326. package/dist/shared/request-options.js.map +1 -1
  327. package/dist/shared/schemas.js +1 -1
  328. package/dist/shared/subscription-errors.d.ts +6 -6
  329. package/dist/shared/subscription-errors.d.ts.map +1 -1
  330. package/dist/shared/subscription-errors.js +32 -30
  331. package/dist/shared/subscription-errors.js.map +1 -1
  332. package/dist/shared/transports.d.ts.map +1 -1
  333. package/dist/shared/transports.js +9 -2
  334. package/dist/shared/transports.js.map +1 -1
  335. package/dist/shared/wire-bounds.js +3 -1
  336. package/dist/shared/wire-bounds.js.map +1 -1
  337. package/dist/smart-account/index.d.ts +2 -1
  338. package/dist/smart-account/index.js +2 -1
  339. package/dist/smart-account/smart-account.d.ts +5 -4
  340. package/dist/smart-account/smart-account.d.ts.map +1 -1
  341. package/dist/smart-account/smart-account.js +37 -8
  342. package/dist/smart-account/smart-account.js.map +1 -1
  343. package/dist/utils/numbers.js +4 -1
  344. package/dist/utils/numbers.js.map +1 -1
  345. package/dist/wired-services.js +5 -5
  346. package/dist/wired-services.js.map +1 -1
  347. package/package.json +9 -4
  348. package/dist/gen/collab/v1/whiteboard_pb.d.ts +0 -829
  349. package/dist/gen/collab/v1/whiteboard_pb.d.ts.map +0 -1
  350. package/dist/gen/collab/v1/whiteboard_pb.js +0 -250
  351. package/dist/gen/collab/v1/whiteboard_pb.js.map +0 -1
  352. package/dist/gen/layout/v1/layout_pb.d.ts +0 -1289
  353. package/dist/gen/layout/v1/layout_pb.d.ts.map +0 -1
  354. package/dist/gen/layout/v1/layout_pb.js +0 -313
  355. package/dist/gen/layout/v1/layout_pb.js.map +0 -1
  356. package/dist/gen/polychart/events/v1/polychart_events_pb.d.ts +0 -192
  357. package/dist/gen/polychart/events/v1/polychart_events_pb.d.ts.map +0 -1
  358. package/dist/gen/polychart/events/v1/polychart_events_pb.js +0 -57
  359. package/dist/gen/polychart/events/v1/polychart_events_pb.js.map +0 -1
  360. package/dist/gen/polychart/v1/polychart_pb.d.ts +0 -1208
  361. package/dist/gen/polychart/v1/polychart_pb.d.ts.map +0 -1
  362. package/dist/gen/polychart/v1/polychart_pb.js +0 -244
  363. package/dist/gen/polychart/v1/polychart_pb.js.map +0 -1
  364. package/dist/services/whiteboard/service.d.ts +0 -8
  365. package/dist/services/whiteboard/service.d.ts.map +0 -1
  366. package/dist/services/whiteboard/service.js +0 -9
  367. package/dist/services/whiteboard/service.js.map +0 -1
  368. package/dist/services/whiteboard/whiteboard.codecs.js +0 -55
  369. package/dist/services/whiteboard/whiteboard.codecs.js.map +0 -1
  370. package/dist/services/whiteboard/whiteboard.d.ts +0 -42
  371. package/dist/services/whiteboard/whiteboard.d.ts.map +0 -1
  372. package/dist/services/whiteboard/whiteboard.js +0 -76
  373. package/dist/services/whiteboard/whiteboard.js.map +0 -1
  374. package/dist/services/whiteboard/whiteboard.schemas.d.ts +0 -771
  375. package/dist/services/whiteboard/whiteboard.schemas.d.ts.map +0 -1
  376. package/dist/services/whiteboard/whiteboard.schemas.js +0 -132
  377. package/dist/services/whiteboard/whiteboard.schemas.js.map +0 -1
  378. package/dist/services/whiteboard/whiteboard.types.d.ts +0 -2
@@ -0,0 +1,437 @@
1
+ import * as v from "valibot";
2
+ //#region src/services/checkpoints/checkpoints.schemas.d.ts
3
+ declare const CheckpointVolumePointSchema: v.ObjectSchema<{
4
+ readonly day: v.SchemaWithPipe<readonly [v.ObjectSchema<{
5
+ readonly seconds: v.BigintSchema<undefined>;
6
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
7
+ }, undefined>, v.TransformAction<{
8
+ seconds: bigint;
9
+ nanos: number;
10
+ }, number>]>;
11
+ readonly usd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
12
+ readonly approximate: v.BooleanSchema<undefined>;
13
+ readonly trades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
14
+ }, undefined>;
15
+ type CheckpointVolumePoint = v.InferOutput<typeof CheckpointVolumePointSchema>;
16
+ declare const CheckpointPortfolioValuePointSchema: v.ObjectSchema<{
17
+ readonly hour: v.SchemaWithPipe<readonly [v.ObjectSchema<{
18
+ readonly seconds: v.BigintSchema<undefined>;
19
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
20
+ }, undefined>, v.TransformAction<{
21
+ seconds: bigint;
22
+ nanos: number;
23
+ }, number>]>;
24
+ readonly usd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
25
+ readonly approximate: v.BooleanSchema<undefined>;
26
+ }, undefined>;
27
+ type CheckpointPortfolioValuePoint = v.InferOutput<typeof CheckpointPortfolioValuePointSchema>;
28
+ declare const CheckpointPairActivitySchema: v.ObjectSchema<{
29
+ readonly symbolId: v.NumberSchema<undefined>;
30
+ readonly symbol: v.StringSchema<undefined>;
31
+ readonly volumeUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
32
+ readonly trades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
33
+ }, undefined>;
34
+ type CheckpointPairActivity = v.InferOutput<typeof CheckpointPairActivitySchema>;
35
+ declare const CheckpointBiggestTradeSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
36
+ readonly symbolId: v.NumberSchema<undefined>;
37
+ readonly symbol: v.StringSchema<undefined>;
38
+ readonly side: v.NumberSchema<undefined>;
39
+ readonly at: v.SchemaWithPipe<readonly [v.ObjectSchema<{
40
+ readonly seconds: v.BigintSchema<undefined>;
41
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
42
+ }, undefined>, v.TransformAction<{
43
+ seconds: bigint;
44
+ nanos: number;
45
+ }, number>]>;
46
+ }, undefined>, v.TransformAction<{
47
+ symbolId: number;
48
+ symbol: string;
49
+ side: number;
50
+ at: number;
51
+ }, {
52
+ side: "buy" | "sell" | "unspecified";
53
+ symbolId: number;
54
+ symbol: string;
55
+ at: number;
56
+ }>]>;
57
+ type CheckpointBiggestTrade = v.InferOutput<typeof CheckpointBiggestTradeSchema>;
58
+ declare const CheckpointOrderTypeCountsSchema: v.ObjectSchema<{
59
+ readonly limit: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
60
+ readonly market: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
61
+ }, undefined>;
62
+ type CheckpointOrderTypeCounts = v.InferOutput<typeof CheckpointOrderTypeCountsSchema>;
63
+ declare const CheckpointTimeInForceCountsSchema: v.ObjectSchema<{
64
+ readonly gtc: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
65
+ readonly ioc: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
66
+ readonly fok: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
67
+ readonly gtd: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
68
+ }, undefined>;
69
+ type CheckpointTimeInForceCounts = v.InferOutput<typeof CheckpointTimeInForceCountsSchema>;
70
+ declare const CheckpointOrderToolCountsSchema: v.ObjectSchema<{
71
+ readonly stopLoss: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
72
+ readonly takeProfit: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
73
+ readonly trailingStop: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
74
+ readonly twap: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
75
+ readonly ladder: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
76
+ }, undefined>;
77
+ type CheckpointOrderToolCounts = v.InferOutput<typeof CheckpointOrderToolCountsSchema>;
78
+ declare const CheckpointVipTierChangeSchema: v.ObjectSchema<{
79
+ readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>;
80
+ readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 10, undefined>]>;
81
+ }, undefined>;
82
+ type CheckpointVipTierChange = v.InferOutput<typeof CheckpointVipTierChangeSchema>;
83
+ declare const CheckpointEarnedBadgeSchema: v.ObjectSchema<{
84
+ readonly badge: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "first_trade" | "seven_day_streak" | "three_markets" | "volume_1000_usd" | "hundred_trades" | "ten_markets" | "thirty_day_streak" | "every_order_tool">]>;
85
+ readonly earnedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
86
+ readonly seconds: v.BigintSchema<undefined>;
87
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
88
+ }, undefined>, v.TransformAction<{
89
+ seconds: bigint;
90
+ nanos: number;
91
+ }, number>]>;
92
+ }, undefined>;
93
+ type CheckpointEarnedBadge = v.InferOutput<typeof CheckpointEarnedBadgeSchema>;
94
+ /**
95
+ * `usd` is `undefined` when the asset had no USD price at the required time; it is not zero.
96
+ * `excludedFromValue` marks an asset that is not account equity, such as a testnet faucet
97
+ * token: it is listed by amount only, never has `usd`, and is left out of every USD total.
98
+ */
99
+ declare const CheckpointAssetAmountSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
100
+ readonly asset: v.StringSchema<undefined>;
101
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
102
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
103
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
104
+ }, undefined>, v.CheckAction<{
105
+ asset: string;
106
+ amount: string;
107
+ usd?: string | undefined;
108
+ excludedFromValue: boolean;
109
+ }, "usd: must be absent for an asset excluded from value">]>;
110
+ type CheckpointAssetAmount = v.InferOutput<typeof CheckpointAssetAmountSchema>;
111
+ /** `usd` is `undefined` when any operation had no USD value; it is not zero. */
112
+ declare const CheckpointFlowTotalSchema: v.ObjectSchema<{
113
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
114
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
115
+ }, undefined>;
116
+ type CheckpointFlowTotal = v.InferOutput<typeof CheckpointFlowTotalSchema>;
117
+ declare const CheckpointChainFlowSchema: v.ObjectSchema<{
118
+ readonly polyesterChainId: v.NumberSchema<undefined>;
119
+ readonly chainName: v.StringSchema<undefined>;
120
+ readonly total: v.OptionalSchema<v.ObjectSchema<{
121
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
122
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
123
+ }, undefined>, {
124
+ count: bigint;
125
+ }>;
126
+ }, undefined>;
127
+ type CheckpointChainFlow = v.InferOutput<typeof CheckpointChainFlowSchema>;
128
+ declare const CheckpointFundingFlowSummarySchema: v.ObjectSchema<{
129
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
130
+ readonly chains: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
131
+ readonly polyesterChainId: v.NumberSchema<undefined>;
132
+ readonly chainName: v.StringSchema<undefined>;
133
+ readonly total: v.OptionalSchema<v.ObjectSchema<{
134
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
135
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
136
+ }, undefined>, {
137
+ count: bigint;
138
+ }>;
139
+ }, undefined>, undefined>, readonly []>;
140
+ readonly amounts: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
141
+ readonly asset: v.StringSchema<undefined>;
142
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
143
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
144
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
145
+ }, undefined>, v.CheckAction<{
146
+ asset: string;
147
+ amount: string;
148
+ usd?: string | undefined;
149
+ excludedFromValue: boolean;
150
+ }, "usd: must be absent for an asset excluded from value">]>, undefined>, readonly []>;
151
+ }, undefined>;
152
+ type CheckpointFundingFlowSummary = v.InferOutput<typeof CheckpointFundingFlowSummarySchema>;
153
+ declare const CheckpointFundingDaySchema: v.ObjectSchema<{
154
+ readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>;
155
+ readonly depositUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
156
+ readonly withdrawalUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
157
+ }, undefined>;
158
+ type CheckpointFundingDay = v.InferOutput<typeof CheckpointFundingDaySchema>;
159
+ declare const CheckpointSchema: v.ObjectSchema<{
160
+ readonly number: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
161
+ readonly seasonStart: v.SchemaWithPipe<readonly [v.ObjectSchema<{
162
+ readonly seconds: v.BigintSchema<undefined>;
163
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
164
+ }, undefined>, v.TransformAction<{
165
+ seconds: bigint;
166
+ nanos: number;
167
+ }, number>]>;
168
+ readonly seasonEnd: v.SchemaWithPipe<readonly [v.ObjectSchema<{
169
+ readonly seconds: v.BigintSchema<undefined>;
170
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
171
+ }, undefined>, v.TransformAction<{
172
+ seconds: bigint;
173
+ nanos: number;
174
+ }, number>]>;
175
+ readonly takenAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
176
+ readonly seconds: v.BigintSchema<undefined>;
177
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
178
+ }, undefined>, v.TransformAction<{
179
+ seconds: bigint;
180
+ nanos: number;
181
+ }, number>]>;
182
+ readonly volumeUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
183
+ readonly trades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
184
+ readonly orders: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
185
+ readonly daysActive: v.NumberSchema<undefined>;
186
+ readonly longestStreak: v.NumberSchema<undefined>;
187
+ readonly topPairs: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
188
+ readonly symbolId: v.NumberSchema<undefined>;
189
+ readonly symbol: v.StringSchema<undefined>;
190
+ readonly volumeUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
191
+ readonly trades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
192
+ }, undefined>, undefined>, readonly []>;
193
+ readonly marketsTraded: v.NumberSchema<undefined>;
194
+ readonly makerTrades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
195
+ readonly takerTrades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
196
+ readonly selfTrades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
197
+ readonly tradesByWeekdayHour: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
198
+ readonly hours: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>, undefined>, v.LengthAction<number[], 24, undefined>]>;
199
+ }, undefined>, v.TransformAction<{
200
+ hours: number[];
201
+ }, number[]>]>, undefined>, v.LengthAction<number[][], 7, undefined>]>;
202
+ readonly dailyVolume: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
203
+ readonly day: v.SchemaWithPipe<readonly [v.ObjectSchema<{
204
+ readonly seconds: v.BigintSchema<undefined>;
205
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
206
+ }, undefined>, v.TransformAction<{
207
+ seconds: bigint;
208
+ nanos: number;
209
+ }, number>]>;
210
+ readonly usd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
211
+ readonly approximate: v.BooleanSchema<undefined>;
212
+ readonly trades: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
213
+ }, undefined>, undefined>, readonly []>;
214
+ readonly biggestTradeUsd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
215
+ readonly biggestTrade: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
216
+ readonly symbolId: v.NumberSchema<undefined>;
217
+ readonly symbol: v.StringSchema<undefined>;
218
+ readonly side: v.NumberSchema<undefined>;
219
+ readonly at: v.SchemaWithPipe<readonly [v.ObjectSchema<{
220
+ readonly seconds: v.BigintSchema<undefined>;
221
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
222
+ }, undefined>, v.TransformAction<{
223
+ seconds: bigint;
224
+ nanos: number;
225
+ }, number>]>;
226
+ }, undefined>, v.TransformAction<{
227
+ symbolId: number;
228
+ symbol: string;
229
+ side: number;
230
+ at: number;
231
+ }, {
232
+ side: "buy" | "sell" | "unspecified";
233
+ symbolId: number;
234
+ symbol: string;
235
+ at: number;
236
+ }>]>, undefined>;
237
+ readonly orderTypes: v.OptionalSchema<v.ObjectSchema<{
238
+ readonly limit: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
239
+ readonly market: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
240
+ }, undefined>, {
241
+ readonly limit: 0n;
242
+ readonly market: 0n;
243
+ }>;
244
+ readonly timeInForce: v.OptionalSchema<v.ObjectSchema<{
245
+ readonly gtc: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
246
+ readonly ioc: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
247
+ readonly fok: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
248
+ readonly gtd: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
249
+ }, undefined>, {
250
+ readonly gtc: 0n;
251
+ readonly ioc: 0n;
252
+ readonly fok: 0n;
253
+ readonly gtd: 0n;
254
+ }>;
255
+ readonly tools: v.OptionalSchema<v.ObjectSchema<{
256
+ readonly stopLoss: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
257
+ readonly takeProfit: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
258
+ readonly trailingStop: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
259
+ readonly twap: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
260
+ readonly ladder: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
261
+ }, undefined>, {
262
+ readonly stopLoss: 0n;
263
+ readonly takeProfit: 0n;
264
+ readonly trailingStop: 0n;
265
+ readonly twap: 0n;
266
+ readonly ladder: 0n;
267
+ }>;
268
+ readonly postOnly: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
269
+ readonly amends: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
270
+ readonly filledOrders: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
271
+ readonly partiallyFilledOrders: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
272
+ readonly canceledOrders: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
273
+ readonly rejectedOrders: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
274
+ readonly fillRate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
275
+ readonly cancelRatio: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
276
+ readonly medianLimitRestMs: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>, undefined>;
277
+ readonly firstTradeAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
278
+ readonly seconds: v.BigintSchema<undefined>;
279
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
280
+ }, undefined>, undefined>, v.TransformAction<{
281
+ seconds: bigint;
282
+ nanos: number;
283
+ } | undefined, number | undefined>]>;
284
+ readonly busiestDay: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>, undefined>;
285
+ readonly mostActiveHourUtc: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 23, undefined>]>, undefined>;
286
+ readonly vipTierAtCheckpoint: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 10, undefined>]>;
287
+ readonly peakVipTier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 10, undefined>]>;
288
+ readonly vipTimeline: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
289
+ readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>;
290
+ readonly tier: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 10, undefined>]>;
291
+ }, undefined>, undefined>, readonly []>;
292
+ readonly badges: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
293
+ readonly badge: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "first_trade" | "seven_day_streak" | "three_markets" | "volume_1000_usd" | "hundred_trades" | "ten_markets" | "thirty_day_streak" | "every_order_tool">]>;
294
+ readonly earnedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
295
+ readonly seconds: v.BigintSchema<undefined>;
296
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
297
+ }, undefined>, v.TransformAction<{
298
+ seconds: bigint;
299
+ nanos: number;
300
+ }, number>]>;
301
+ }, undefined>, undefined>, readonly []>;
302
+ readonly portfolioValue: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
303
+ readonly hour: v.SchemaWithPipe<readonly [v.ObjectSchema<{
304
+ readonly seconds: v.BigintSchema<undefined>;
305
+ readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
306
+ }, undefined>, v.TransformAction<{
307
+ seconds: bigint;
308
+ nanos: number;
309
+ }, number>]>;
310
+ readonly usd: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
311
+ readonly approximate: v.BooleanSchema<undefined>;
312
+ }, undefined>, undefined>, readonly []>;
313
+ readonly tradingBalances: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
314
+ readonly asset: v.StringSchema<undefined>;
315
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
316
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
317
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
318
+ }, undefined>, v.CheckAction<{
319
+ asset: string;
320
+ amount: string;
321
+ usd?: string | undefined;
322
+ excludedFromValue: boolean;
323
+ }, "usd: must be absent for an asset excluded from value">]>, undefined>, readonly []>;
324
+ readonly fundingBalances: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
325
+ readonly asset: v.StringSchema<undefined>;
326
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
327
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
328
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
329
+ }, undefined>, v.CheckAction<{
330
+ asset: string;
331
+ amount: string;
332
+ usd?: string | undefined;
333
+ excludedFromValue: boolean;
334
+ }, "usd: must be absent for an asset excluded from value">]>, undefined>, readonly []>;
335
+ readonly deposits: v.OptionalSchema<v.ObjectSchema<{
336
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
337
+ readonly chains: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
338
+ readonly polyesterChainId: v.NumberSchema<undefined>;
339
+ readonly chainName: v.StringSchema<undefined>;
340
+ readonly total: v.OptionalSchema<v.ObjectSchema<{
341
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
342
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
343
+ }, undefined>, {
344
+ count: bigint;
345
+ }>;
346
+ }, undefined>, undefined>, readonly []>;
347
+ readonly amounts: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
348
+ readonly asset: v.StringSchema<undefined>;
349
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
350
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
351
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
352
+ }, undefined>, v.CheckAction<{
353
+ asset: string;
354
+ amount: string;
355
+ usd?: string | undefined;
356
+ excludedFromValue: boolean;
357
+ }, "usd: must be absent for an asset excluded from value">]>, undefined>, readonly []>;
358
+ }, undefined>, {
359
+ count: bigint;
360
+ }>;
361
+ readonly withdrawals: v.OptionalSchema<v.ObjectSchema<{
362
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
363
+ readonly chains: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
364
+ readonly polyesterChainId: v.NumberSchema<undefined>;
365
+ readonly chainName: v.StringSchema<undefined>;
366
+ readonly total: v.OptionalSchema<v.ObjectSchema<{
367
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
368
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
369
+ }, undefined>, {
370
+ count: bigint;
371
+ }>;
372
+ }, undefined>, undefined>, readonly []>;
373
+ readonly amounts: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
374
+ readonly asset: v.StringSchema<undefined>;
375
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
376
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
377
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
378
+ }, undefined>, v.CheckAction<{
379
+ asset: string;
380
+ amount: string;
381
+ usd?: string | undefined;
382
+ excludedFromValue: boolean;
383
+ }, "usd: must be absent for an asset excluded from value">]>, undefined>, readonly []>;
384
+ }, undefined>, {
385
+ count: bigint;
386
+ }>;
387
+ readonly fundingByDay: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
388
+ readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>;
389
+ readonly depositUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
390
+ readonly withdrawalUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
391
+ }, undefined>, undefined>, readonly []>;
392
+ readonly transfersIn: v.OptionalSchema<v.ObjectSchema<{
393
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
394
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
395
+ }, undefined>, {
396
+ count: bigint;
397
+ }>;
398
+ readonly transfersOut: v.OptionalSchema<v.ObjectSchema<{
399
+ readonly count: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
400
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
401
+ }, undefined>, {
402
+ count: bigint;
403
+ }>;
404
+ readonly internalTransfers: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
405
+ readonly dailyClaims: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
406
+ readonly dailyClaimAmounts: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
407
+ readonly asset: v.StringSchema<undefined>;
408
+ readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
409
+ readonly usd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
410
+ readonly excludedFromValue: v.BooleanSchema<undefined>;
411
+ }, undefined>, v.CheckAction<{
412
+ asset: string;
413
+ amount: string;
414
+ usd?: string | undefined;
415
+ excludedFromValue: boolean;
416
+ }, "usd: must be absent for an asset excluded from value">]>, undefined>, readonly []>;
417
+ readonly inflowUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
418
+ readonly outflowUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
419
+ readonly netInflowUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
420
+ readonly finalValueUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
421
+ readonly seasonResultUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
422
+ readonly subaccounts: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
423
+ /** Values computed from partial evidence; show them with an approximation marker. */
424
+ readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "tools" | "deposits" | "withdrawals" | "volume" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "transfers" | "season_result">]>, undefined>, readonly []>;
425
+ }, undefined>;
426
+ /**
427
+ * One frozen season recap of a root account and all of its subaccounts. An absent USD value
428
+ * means the value was unavailable, not zero.
429
+ */
430
+ type Checkpoint = v.InferOutput<typeof CheckpointSchema>;
431
+ declare const ListCheckpointsInputSchema: v.StrictObjectSchema<{
432
+ readonly subaccountId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>, v.CheckAction<bigint | undefined, "subaccountId: must be greater than zero">]>;
433
+ }, undefined>;
434
+ type ListCheckpointsInput = v.InferInput<typeof ListCheckpointsInputSchema>;
435
+ //#endregion
436
+ export { Checkpoint, CheckpointAssetAmount, CheckpointAssetAmountSchema, CheckpointBiggestTrade, CheckpointBiggestTradeSchema, CheckpointChainFlow, CheckpointChainFlowSchema, CheckpointEarnedBadge, CheckpointEarnedBadgeSchema, CheckpointFlowTotal, CheckpointFlowTotalSchema, CheckpointFundingDay, CheckpointFundingDaySchema, CheckpointFundingFlowSummary, CheckpointFundingFlowSummarySchema, CheckpointOrderToolCounts, CheckpointOrderToolCountsSchema, CheckpointOrderTypeCounts, CheckpointOrderTypeCountsSchema, CheckpointPairActivity, CheckpointPairActivitySchema, CheckpointPortfolioValuePoint, CheckpointPortfolioValuePointSchema, CheckpointSchema, CheckpointTimeInForceCounts, CheckpointTimeInForceCountsSchema, CheckpointVipTierChange, CheckpointVipTierChangeSchema, CheckpointVolumePoint, CheckpointVolumePointSchema, ListCheckpointsInput, ListCheckpointsInputSchema };
437
+ //# sourceMappingURL=checkpoints.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoints.schemas.d.ts","names":[],"sources":["../../../src/services/checkpoints/checkpoints.schemas.ts"],"mappings":";;cA2Ba,6BAA2B,EAAA;;;;;;;;;;;;KAO5B,wBAAwB,EAAE,mBAAmB;cAE5C,qCAAmC,EAAA;;;;;;;;;;;KAMpC,gCAAgC,EAAE,mBACnC;cAcE,8BAA4B,EAAA;;;;;;KAO7B,yBAAyB,EAAE,mBAAmB;cAE7C,8BAA4B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;KAa7B,yBAAyB,EAAE,mBAAmB;cAE7C,iCAA+B,EAAA;;;;KAKhC,4BAA4B,EAAE,mBAAmB;cAEhD,mCAAiC,EAAA;;;;;;KAOlC,8BAA8B,EAAE,mBAAmB;cAElD,iCAA+B,EAAA;;;;;;;KAQhC,4BAA4B,EAAE,mBAAmB;cAEhD,+BAA6B,EAAA;;;;KAK9B,0BAA0B,EAAE,mBAAmB;cAE9C,6BAA2B,EAAA;;;;;;;;;;KAK5B,wBAAwB,EAAE,mBAAmB;;;;;;cAO5C,6BAA2B,EAAA,yBAAA,EAAA;;;;;;;;;;;KAa5B,wBAAwB,EAAE,mBAAmB;;cAG5C,2BAAyB,EAAA;;;;KAK1B,sBAAsB,EAAE,mBAAmB;cAI1C,2BAAyB,EAAA;;;;;;;;;;KAM1B,sBAAsB,EAAE,mBAAmB;cAE1C,oCAAkC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;KAMnC,+BAA+B,EAAE,mBAAmB;cAInD,4BAA0B,EAAA;;;;;KAM3B,uBAAuB,EAAE,mBAAmB;cAE3C,kBAAgB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0EjB,aAAa,EAAE,mBAAmB;cAOjC,4BAA0B,EAAA;;;KAO3B,uBAAuB,EAAE,kBAAkB"}
@@ -0,0 +1,176 @@
1
+ import { OptionalTimestampMsSchema, TimestampMsSchema, optionalSubaccountIdInputSchema } from "../../shared/schemas.js";
2
+ import { enumLabel, enumLabelSchema } from "../../shared/proto-enum-codec.js";
3
+ import { OrderSideCodec } from "../orders/order-enums.codecs.js";
4
+ import { CheckpointBadgeCodec, CheckpointFieldCodec } from "./checkpoints.codecs.js";
5
+ import * as v from "valibot";
6
+ //#region src/services/checkpoints/checkpoints.schemas.ts
7
+ const UnsignedDecimalSchema = v.pipe(v.string(), v.regex(/^\d+(\.\d+)?$/));
8
+ const SignedDecimalSchema = v.pipe(v.string(), v.regex(/^-?\d+(\.\d+)?$/));
9
+ const RatioSchema = v.pipe(v.string(), v.regex(/^(0(\.\d+)?|1(\.0+)?)$/));
10
+ const UtcDateSchema = v.pipe(v.string(), v.isoDate());
11
+ const CountSchema = v.pipe(v.bigint(), v.maxValue(BigInt(Number.MAX_SAFE_INTEGER)), v.transform(Number));
12
+ const VipTierSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(10));
13
+ const UtcHourSchema = v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(23));
14
+ const CheckpointVolumePointSchema = v.object({
15
+ day: TimestampMsSchema,
16
+ usd: UnsignedDecimalSchema,
17
+ approximate: v.boolean(),
18
+ trades: CountSchema
19
+ });
20
+ const CheckpointPortfolioValuePointSchema = v.object({
21
+ hour: TimestampMsSchema,
22
+ usd: SignedDecimalSchema,
23
+ approximate: v.boolean()
24
+ });
25
+ const TradesByWeekdayHourSchema = v.pipe(v.array(v.pipe(v.object({ hours: v.pipe(v.array(CountSchema), v.length(24)) }), v.transform(({ hours }) => hours))), v.length(7));
26
+ const CheckpointPairActivitySchema = v.object({
27
+ symbolId: v.number(),
28
+ symbol: v.string(),
29
+ volumeUsd: UnsignedDecimalSchema,
30
+ trades: CountSchema
31
+ });
32
+ const CheckpointBiggestTradeSchema = v.pipe(v.object({
33
+ symbolId: v.number(),
34
+ symbol: v.string(),
35
+ side: v.number(),
36
+ at: TimestampMsSchema
37
+ }), v.transform(({ side, ...trade }) => ({
38
+ ...trade,
39
+ side: enumLabel(OrderSideCodec.protoToOutput, side)
40
+ })));
41
+ const CheckpointOrderTypeCountsSchema = v.object({
42
+ limit: CountSchema,
43
+ market: CountSchema
44
+ });
45
+ const CheckpointTimeInForceCountsSchema = v.object({
46
+ gtc: CountSchema,
47
+ ioc: CountSchema,
48
+ fok: CountSchema,
49
+ gtd: CountSchema
50
+ });
51
+ const CheckpointOrderToolCountsSchema = v.object({
52
+ stopLoss: CountSchema,
53
+ takeProfit: CountSchema,
54
+ trailingStop: CountSchema,
55
+ twap: CountSchema,
56
+ ladder: CountSchema
57
+ });
58
+ const CheckpointVipTierChangeSchema = v.object({
59
+ date: UtcDateSchema,
60
+ tier: VipTierSchema
61
+ });
62
+ const CheckpointEarnedBadgeSchema = v.object({
63
+ badge: enumLabelSchema(CheckpointBadgeCodec.protoToOutput),
64
+ earnedAt: TimestampMsSchema
65
+ });
66
+ /**
67
+ * `usd` is `undefined` when the asset had no USD price at the required time; it is not zero.
68
+ * `excludedFromValue` marks an asset that is not account equity, such as a testnet faucet
69
+ * token: it is listed by amount only, never has `usd`, and is left out of every USD total.
70
+ */
71
+ const CheckpointAssetAmountSchema = v.pipe(v.object({
72
+ asset: v.string(),
73
+ amount: SignedDecimalSchema,
74
+ usd: v.optional(SignedDecimalSchema),
75
+ excludedFromValue: v.boolean()
76
+ }), v.check((amount) => !amount.excludedFromValue || amount.usd === void 0, "usd: must be absent for an asset excluded from value"));
77
+ /** `usd` is `undefined` when any operation had no USD value; it is not zero. */
78
+ const CheckpointFlowTotalSchema = v.object({
79
+ count: CountSchema,
80
+ usd: v.optional(UnsignedDecimalSchema)
81
+ });
82
+ const EmptyFlowTotal = { count: 0n };
83
+ const CheckpointChainFlowSchema = v.object({
84
+ polyesterChainId: v.number(),
85
+ chainName: v.string(),
86
+ total: v.optional(CheckpointFlowTotalSchema, EmptyFlowTotal)
87
+ });
88
+ const CheckpointFundingFlowSummarySchema = v.object({
89
+ count: CountSchema,
90
+ chains: v.optional(v.array(CheckpointChainFlowSchema), []),
91
+ amounts: v.optional(v.array(CheckpointAssetAmountSchema), [])
92
+ });
93
+ const EmptyFundingFlowSummary = { count: 0n };
94
+ const CheckpointFundingDaySchema = v.object({
95
+ date: UtcDateSchema,
96
+ depositUsd: v.optional(UnsignedDecimalSchema),
97
+ withdrawalUsd: v.optional(UnsignedDecimalSchema)
98
+ });
99
+ const CheckpointSchema = v.object({
100
+ number: v.pipe(v.number(), v.integer(), v.minValue(1)),
101
+ seasonStart: TimestampMsSchema,
102
+ seasonEnd: TimestampMsSchema,
103
+ takenAt: TimestampMsSchema,
104
+ volumeUsd: UnsignedDecimalSchema,
105
+ trades: CountSchema,
106
+ orders: CountSchema,
107
+ daysActive: v.number(),
108
+ longestStreak: v.number(),
109
+ topPairs: v.optional(v.array(CheckpointPairActivitySchema), []),
110
+ marketsTraded: v.number(),
111
+ makerTrades: CountSchema,
112
+ takerTrades: CountSchema,
113
+ selfTrades: CountSchema,
114
+ tradesByWeekdayHour: TradesByWeekdayHourSchema,
115
+ dailyVolume: v.optional(v.array(CheckpointVolumePointSchema), []),
116
+ biggestTradeUsd: UnsignedDecimalSchema,
117
+ biggestTrade: v.optional(CheckpointBiggestTradeSchema),
118
+ orderTypes: v.optional(CheckpointOrderTypeCountsSchema, {
119
+ limit: 0n,
120
+ market: 0n
121
+ }),
122
+ timeInForce: v.optional(CheckpointTimeInForceCountsSchema, {
123
+ gtc: 0n,
124
+ ioc: 0n,
125
+ fok: 0n,
126
+ gtd: 0n
127
+ }),
128
+ tools: v.optional(CheckpointOrderToolCountsSchema, {
129
+ stopLoss: 0n,
130
+ takeProfit: 0n,
131
+ trailingStop: 0n,
132
+ twap: 0n,
133
+ ladder: 0n
134
+ }),
135
+ postOnly: CountSchema,
136
+ amends: CountSchema,
137
+ filledOrders: CountSchema,
138
+ partiallyFilledOrders: CountSchema,
139
+ canceledOrders: CountSchema,
140
+ rejectedOrders: CountSchema,
141
+ fillRate: RatioSchema,
142
+ cancelRatio: RatioSchema,
143
+ medianLimitRestMs: v.optional(CountSchema),
144
+ firstTradeAt: OptionalTimestampMsSchema,
145
+ busiestDay: v.optional(UtcDateSchema),
146
+ mostActiveHourUtc: v.optional(UtcHourSchema),
147
+ vipTierAtCheckpoint: VipTierSchema,
148
+ peakVipTier: VipTierSchema,
149
+ vipTimeline: v.optional(v.array(CheckpointVipTierChangeSchema), []),
150
+ badges: v.optional(v.array(CheckpointEarnedBadgeSchema), []),
151
+ portfolioValue: v.optional(v.array(CheckpointPortfolioValuePointSchema), []),
152
+ tradingBalances: v.optional(v.array(CheckpointAssetAmountSchema), []),
153
+ fundingBalances: v.optional(v.array(CheckpointAssetAmountSchema), []),
154
+ deposits: v.optional(CheckpointFundingFlowSummarySchema, EmptyFundingFlowSummary),
155
+ withdrawals: v.optional(CheckpointFundingFlowSummarySchema, EmptyFundingFlowSummary),
156
+ fundingByDay: v.optional(v.array(CheckpointFundingDaySchema), []),
157
+ transfersIn: v.optional(CheckpointFlowTotalSchema, EmptyFlowTotal),
158
+ transfersOut: v.optional(CheckpointFlowTotalSchema, EmptyFlowTotal),
159
+ internalTransfers: CountSchema,
160
+ dailyClaims: CountSchema,
161
+ dailyClaimAmounts: v.optional(v.array(CheckpointAssetAmountSchema), []),
162
+ inflowUsd: v.optional(UnsignedDecimalSchema),
163
+ outflowUsd: v.optional(UnsignedDecimalSchema),
164
+ netInflowUsd: v.optional(SignedDecimalSchema),
165
+ finalValueUsd: v.optional(SignedDecimalSchema),
166
+ seasonResultUsd: v.optional(SignedDecimalSchema),
167
+ subaccounts: CountSchema,
168
+ /** Values computed from partial evidence; show them with an approximation marker. */
169
+ incomplete: v.optional(v.array(enumLabelSchema(CheckpointFieldCodec.protoToOutput)), [])
170
+ });
171
+ const ListCheckpointsResultSchema = v.object({ checkpoints: v.optional(v.array(CheckpointSchema), []) });
172
+ const ListCheckpointsInputSchema = v.strictObject({ subaccountId: v.pipe(optionalSubaccountIdInputSchema(), v.check((value) => value !== 0n, "subaccountId: must be greater than zero")) });
173
+ //#endregion
174
+ export { CheckpointAssetAmountSchema, CheckpointBiggestTradeSchema, CheckpointChainFlowSchema, CheckpointEarnedBadgeSchema, CheckpointFlowTotalSchema, CheckpointFundingDaySchema, CheckpointFundingFlowSummarySchema, CheckpointOrderToolCountsSchema, CheckpointOrderTypeCountsSchema, CheckpointPairActivitySchema, CheckpointPortfolioValuePointSchema, CheckpointSchema, CheckpointTimeInForceCountsSchema, CheckpointVipTierChangeSchema, CheckpointVolumePointSchema, ListCheckpointsInputSchema, ListCheckpointsResultSchema };
175
+
176
+ //# sourceMappingURL=checkpoints.schemas.js.map