@polyester/sdk 0.36.0-devnet-20261118184607 → 0.36.0-devnet-20261119050221

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 (328) hide show
  1. package/CHANGELOG.md +30 -2
  2. package/dist/client.d.ts +2 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +2 -0
  5. package/dist/client.js.map +1 -1
  6. package/dist/gen/ai/v1/assistant_pb.d.ts +6 -7
  7. package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
  8. package/dist/gen/ai/v1/assistant_pb.js +1 -1
  9. package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
  10. package/dist/gen/alerts/v1/price_alerts_pb.d.ts +1 -1
  11. package/dist/gen/auth/v1/activity_pb.d.ts +1 -1
  12. package/dist/gen/auth/v1/address_book_pb.d.ts +2 -2
  13. package/dist/gen/auth/v1/address_book_pb.js +1 -1
  14. package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
  15. package/dist/gen/auth/v1/api_keys_pb.d.ts +71 -10
  16. package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
  17. package/dist/gen/auth/v1/api_keys_pb.js +16 -1
  18. package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
  19. package/dist/gen/auth/v1/auth_pb.d.ts +75 -6
  20. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  21. package/dist/gen/auth/v1/auth_pb.js +58 -6
  22. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  23. package/dist/gen/auth/v1/connected_apps_pb.d.ts +382 -0
  24. package/dist/gen/auth/v1/connected_apps_pb.d.ts.map +1 -0
  25. package/dist/gen/auth/v1/connected_apps_pb.js +107 -0
  26. package/dist/gen/auth/v1/connected_apps_pb.js.map +1 -0
  27. package/dist/gen/auth/v1/mfa_pb.d.ts +3 -141
  28. package/dist/gen/auth/v1/mfa_pb.d.ts.map +1 -1
  29. package/dist/gen/auth/v1/mfa_pb.js +8 -80
  30. package/dist/gen/auth/v1/mfa_pb.js.map +1 -1
  31. package/dist/gen/auth/v1/policies_pb.d.ts +165 -42
  32. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  33. package/dist/gen/auth/v1/policies_pb.js +36 -3
  34. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  35. package/dist/gen/auth/v1/profile_pb.d.ts +1 -1
  36. package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
  37. package/dist/gen/auth/v1/social_verification_pb.d.ts +5 -5
  38. package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
  39. package/dist/gen/auth/v1/subaccounts_pb.d.ts +1 -1
  40. package/dist/gen/auth/v1/subaccounts_pb.js +1 -1
  41. package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
  42. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
  43. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
  44. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +18 -11
  45. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
  46. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
  47. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +1 -1
  48. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +1 -1
  49. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +4 -2
  50. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
  51. package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
  52. package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
  53. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +1 -1
  54. package/dist/gen/changelog/v1/changelog_pb.d.ts +1 -1
  55. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1 -1
  56. package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
  57. package/dist/gen/fees/v1/fees_pb.d.ts +3 -2
  58. package/dist/gen/fees/v1/fees_pb.d.ts.map +1 -1
  59. package/dist/gen/fees/v1/fees_pb.js.map +1 -1
  60. package/dist/gen/index.d.ts +8 -5
  61. package/dist/gen/index.js +26 -23
  62. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +4 -3
  63. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
  64. package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
  65. package/dist/gen/ledger/read/v1/statement_export_pb.d.ts +1 -1
  66. package/dist/gen/marketdata/v1/asset_info_pb.d.ts +1 -1
  67. package/dist/gen/marketdata/v1/heatmap_pb.d.ts +10 -59
  68. package/dist/gen/marketdata/v1/heatmap_pb.d.ts.map +1 -1
  69. package/dist/gen/marketdata/v1/heatmap_pb.js +8 -57
  70. package/dist/gen/marketdata/v1/heatmap_pb.js.map +1 -1
  71. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +1 -1
  72. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
  73. package/dist/gen/notifications/v1/notifications_pb.d.ts +142 -5
  74. package/dist/gen/notifications/v1/notifications_pb.d.ts.map +1 -1
  75. package/dist/gen/notifications/v1/notifications_pb.js +94 -16
  76. package/dist/gen/notifications/v1/notifications_pb.js.map +1 -1
  77. package/dist/gen/orderbook/v1/orderbook_pb.d.ts +15 -13
  78. package/dist/gen/orderbook/v1/orderbook_pb.d.ts.map +1 -1
  79. package/dist/gen/orderbook/v1/orderbook_pb.js +6 -1
  80. package/dist/gen/orderbook/v1/orderbook_pb.js.map +1 -1
  81. package/dist/gen/orders/v1/orders_pb.d.ts +67 -19
  82. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  83. package/dist/gen/orders/v1/orders_pb.js +1 -1
  84. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  85. package/dist/gen/orders/v1/orders_read_pb.d.ts +9 -1
  86. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  87. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  88. package/dist/gen/polyester/api/options_pb.d.ts +2 -1
  89. package/dist/gen/polyester/api/options_pb.d.ts.map +1 -1
  90. package/dist/gen/polyester/api/options_pb.js +2 -1
  91. package/dist/gen/polyester/api/options_pb.js.map +1 -1
  92. package/dist/gen/polyester/api/v1/request_error_pb.d.ts +66 -0
  93. package/dist/gen/polyester/api/v1/request_error_pb.d.ts.map +1 -0
  94. package/dist/gen/polyester/api/v1/request_error_pb.js +49 -0
  95. package/dist/gen/polyester/api/v1/request_error_pb.js.map +1 -0
  96. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +1 -1
  97. package/dist/gen/polyester/type/v1/depth_tier_pb.d.ts +98 -0
  98. package/dist/gen/polyester/type/v1/depth_tier_pb.d.ts.map +1 -0
  99. package/dist/gen/polyester/type/v1/depth_tier_pb.js +104 -0
  100. package/dist/gen/polyester/type/v1/depth_tier_pb.js.map +1 -0
  101. package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
  102. package/dist/gen/privatews/v1/private_ws_pb.d.ts +1 -1
  103. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +43 -24
  104. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts.map +1 -1
  105. package/dist/gen/ratelimit/v1/ratelimit_pb.js +14 -2
  106. package/dist/gen/ratelimit/v1/ratelimit_pb.js.map +1 -1
  107. package/dist/gen/rewards/v1/rewards_pb.d.ts +1 -1
  108. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1 -1
  109. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +1 -1
  110. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +127 -14
  111. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  112. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +100 -28
  113. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  114. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +1 -1
  115. package/dist/gen/swap/v1/swap_pb.d.ts +1 -1
  116. package/dist/gen/system/v1/system_pb.d.ts +1 -1
  117. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +1 -1
  118. package/dist/gen/transfer/v1/dust_conversion_pb.d.ts +1 -1
  119. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +6 -4
  120. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
  121. package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
  122. package/dist/gen/triggers/v1/triggers_pb.d.ts +26 -4
  123. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  124. package/dist/gen/triggers/v1/triggers_pb.js +18 -1
  125. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  126. package/dist/gen/vip/v1/vip_pb.d.ts +1 -1
  127. package/dist/index.d.ts +5 -3
  128. package/dist/services/account-activity/account-activity.js +1 -1
  129. package/dist/services/account-activity/account-activity.schemas.d.ts +4 -4
  130. package/dist/services/accounts/accounts.js +1 -1
  131. package/dist/services/accounts/accounts.schemas.js +1 -1
  132. package/dist/services/address-book/address-book.js +1 -1
  133. package/dist/services/api-keys/api-keys.codecs.d.ts +6 -1
  134. package/dist/services/api-keys/api-keys.codecs.d.ts.map +1 -1
  135. package/dist/services/api-keys/api-keys.codecs.js +19 -7
  136. package/dist/services/api-keys/api-keys.codecs.js.map +1 -1
  137. package/dist/services/api-keys/api-keys.js +1 -1
  138. package/dist/services/api-keys/api-keys.schemas.d.ts +12 -4
  139. package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
  140. package/dist/services/api-keys/api-keys.schemas.js +15 -6
  141. package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
  142. package/dist/services/api-keys/api-keys.types.d.ts +2 -2
  143. package/dist/services/assistant/assistant-events.schemas.d.ts +30 -30
  144. package/dist/services/assistant/assistant.js +1 -1
  145. package/dist/services/assistant/assistant.schemas.d.ts +1 -1
  146. package/dist/services/auth/auth.d.ts +4 -0
  147. package/dist/services/auth/auth.d.ts.map +1 -1
  148. package/dist/services/auth/auth.js +12 -2
  149. package/dist/services/auth/auth.js.map +1 -1
  150. package/dist/services/auth/profile/profile.js +1 -1
  151. package/dist/services/auto-withdraw/auto-withdraw.js +1 -1
  152. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +16 -16
  153. package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -1
  154. package/dist/services/balances/balances.js +1 -1
  155. package/dist/services/candles/candles.js +1 -1
  156. package/dist/services/chain-analytics/chain-analytics.js +1 -1
  157. package/dist/services/changelog/changelog.js +1 -1
  158. package/dist/services/changelog/changelog.schemas.d.ts +45 -40
  159. package/dist/services/changelog/changelog.schemas.d.ts.map +1 -1
  160. package/dist/services/changelog/changelog.schemas.js +6 -1
  161. package/dist/services/changelog/changelog.schemas.js.map +1 -1
  162. package/dist/services/checkpoints/checkpoints.js +1 -1
  163. package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
  164. package/dist/services/claims/claims.js +1 -1
  165. package/dist/services/claims/claims.schemas.d.ts +2 -2
  166. package/dist/services/claims/claims.schemas.js +1 -1
  167. package/dist/services/connected-apps/connected-apps.d.ts +46 -0
  168. package/dist/services/connected-apps/connected-apps.d.ts.map +1 -0
  169. package/dist/services/connected-apps/connected-apps.js +69 -0
  170. package/dist/services/connected-apps/connected-apps.js.map +1 -0
  171. package/dist/services/connected-apps/connected-apps.schemas.d.ts +132 -0
  172. package/dist/services/connected-apps/connected-apps.schemas.d.ts.map +1 -0
  173. package/dist/services/connected-apps/connected-apps.schemas.js +68 -0
  174. package/dist/services/connected-apps/connected-apps.schemas.js.map +1 -0
  175. package/dist/services/connected-apps/connected-apps.types.d.ts +2 -0
  176. package/dist/services/connected-apps/service.d.ts +8 -0
  177. package/dist/services/connected-apps/service.d.ts.map +1 -0
  178. package/dist/services/connected-apps/service.js +9 -0
  179. package/dist/services/connected-apps/service.js.map +1 -0
  180. package/dist/services/deposit/deposit.js +1 -1
  181. package/dist/services/dust-conversion/dust-conversion.js +1 -1
  182. package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +8 -8
  183. package/dist/services/dust-conversion/dust-conversion.schemas.js +1 -1
  184. package/dist/services/fees/fees.js +1 -1
  185. package/dist/services/guard-signer/guard-signer.js +1 -1
  186. package/dist/services/heatmap/heatmap.codecs.d.ts +1 -0
  187. package/dist/services/heatmap/heatmap.codecs.d.ts.map +1 -1
  188. package/dist/services/heatmap/heatmap.codecs.js +2 -27
  189. package/dist/services/heatmap/heatmap.codecs.js.map +1 -1
  190. package/dist/services/heatmap/heatmap.js +1 -1
  191. package/dist/services/heatmap/heatmap.schemas.d.ts +9 -8
  192. package/dist/services/heatmap/heatmap.schemas.d.ts.map +1 -1
  193. package/dist/services/heatmap/heatmap.schemas.js +4 -3
  194. package/dist/services/heatmap/heatmap.schemas.js.map +1 -1
  195. package/dist/services/internal-transfers/internal-transfers.d.ts +4 -3
  196. package/dist/services/internal-transfers/internal-transfers.d.ts.map +1 -1
  197. package/dist/services/internal-transfers/internal-transfers.js +5 -4
  198. package/dist/services/internal-transfers/internal-transfers.js.map +1 -1
  199. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
  200. package/dist/services/lifecycle/lifecycle.js +1 -1
  201. package/dist/services/lifecycle/lifecycle.schemas.d.ts +39 -39
  202. package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
  203. package/dist/services/market-data/market-data.js +1 -1
  204. package/dist/services/market-overview/market-overview.js +1 -1
  205. package/dist/services/market-overview/market-overview.schemas.js +1 -1
  206. package/dist/services/notifications/notifications.codecs.d.ts +6 -3
  207. package/dist/services/notifications/notifications.codecs.d.ts.map +1 -1
  208. package/dist/services/notifications/notifications.codecs.js +14 -3
  209. package/dist/services/notifications/notifications.codecs.js.map +1 -1
  210. package/dist/services/notifications/notifications.js +1 -1
  211. package/dist/services/notifications/notifications.schemas.d.ts +97 -3
  212. package/dist/services/notifications/notifications.schemas.d.ts.map +1 -1
  213. package/dist/services/notifications/notifications.schemas.js +18 -1
  214. package/dist/services/notifications/notifications.schemas.js.map +1 -1
  215. package/dist/services/notifications/notifications.types.d.ts +2 -2
  216. package/dist/services/orderbook/orderbook.codecs.js +1 -1
  217. package/dist/services/orderbook/orderbook.codecs.js.map +1 -1
  218. package/dist/services/orderbook/orderbook.d.ts +2 -2
  219. package/dist/services/orderbook/orderbook.d.ts.map +1 -1
  220. package/dist/services/orderbook/orderbook.js +8 -10
  221. package/dist/services/orderbook/orderbook.js.map +1 -1
  222. package/dist/services/orderbook/orderbook.schemas.d.ts +3 -6
  223. package/dist/services/orderbook/orderbook.schemas.d.ts.map +1 -1
  224. package/dist/services/orderbook/orderbook.schemas.js +5 -5
  225. package/dist/services/orderbook/orderbook.schemas.js.map +1 -1
  226. package/dist/services/orders/order-errors.schemas.d.ts +9 -9
  227. package/dist/services/orders/order-errors.schemas.js +1 -1
  228. package/dist/services/orders/orders-batch.schemas.d.ts +101 -97
  229. package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
  230. package/dist/services/orders/orders-batch.schemas.js +3 -1
  231. package/dist/services/orders/orders-batch.schemas.js.map +1 -1
  232. package/dist/services/orders/orders-input.schemas.d.ts +23 -15
  233. package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
  234. package/dist/services/orders/orders-input.schemas.js +8 -3
  235. package/dist/services/orders/orders-input.schemas.js.map +1 -1
  236. package/dist/services/orders/orders-modify.schemas.js +1 -1
  237. package/dist/services/orders/orders-output.schemas.d.ts +14 -14
  238. package/dist/services/orders/orders-risk.schemas.js +2 -2
  239. package/dist/services/orders/orders.js +2 -2
  240. package/dist/services/policies/api-key-policies/api-key-policies.d.ts +4 -1
  241. package/dist/services/policies/api-key-policies/api-key-policies.d.ts.map +1 -1
  242. package/dist/services/policies/api-key-policies/api-key-policies.js +5 -2
  243. package/dist/services/policies/api-key-policies/api-key-policies.js.map +1 -1
  244. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +25 -15
  245. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts.map +1 -1
  246. package/dist/services/policies/api-key-policies/api-key-policies.schemas.js +3 -0
  247. package/dist/services/policies/api-key-policies/api-key-policies.schemas.js.map +1 -1
  248. package/dist/services/policies/shared.codecs.js +25 -5
  249. package/dist/services/policies/shared.codecs.js.map +1 -1
  250. package/dist/services/policies/shared.d.ts +1 -1
  251. package/dist/services/policies/subaccount-policies/subaccount-policies.d.ts +4 -1
  252. package/dist/services/policies/subaccount-policies/subaccount-policies.d.ts.map +1 -1
  253. package/dist/services/policies/subaccount-policies/subaccount-policies.js +5 -2
  254. package/dist/services/policies/subaccount-policies/subaccount-policies.js.map +1 -1
  255. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +11 -3
  256. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts.map +1 -1
  257. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js +4 -0
  258. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js.map +1 -1
  259. package/dist/services/price-alerts/price-alerts.js +1 -1
  260. package/dist/services/price-alerts/price-alerts.schemas.d.ts +10 -10
  261. package/dist/services/rate-limits/rate-limits.codecs.d.ts +1 -1
  262. package/dist/services/rate-limits/rate-limits.codecs.js +2 -1
  263. package/dist/services/rate-limits/rate-limits.codecs.js.map +1 -1
  264. package/dist/services/rate-limits/rate-limits.js +1 -1
  265. package/dist/services/rate-limits/rate-limits.schemas.d.ts +4 -4
  266. package/dist/services/rewards/rewards.js +1 -1
  267. package/dist/services/social-verification/social-verification.js +1 -1
  268. package/dist/services/social-verification/social-verification.schemas.js +1 -1
  269. package/dist/services/statement-exports/statement-exports.js +1 -1
  270. package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
  271. package/dist/services/subaccounts/subaccounts.js +2 -2
  272. package/dist/services/subaccounts/subaccounts.schemas.d.ts +13 -13
  273. package/dist/services/system/system.js +1 -1
  274. package/dist/services/system/system.schemas.d.ts +13 -13
  275. package/dist/services/trades/trades.js +1 -1
  276. package/dist/services/trades/trades.schemas.d.ts +1 -1
  277. package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
  278. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -1
  279. package/dist/services/trading-withdraws/wallet-message.js +1 -1
  280. package/dist/services/transfers/transfers.js +1 -1
  281. package/dist/services/triggers/trigger-child-order.schemas.js +2 -2
  282. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  283. package/dist/services/triggers/trigger-input.schemas.js +2 -2
  284. package/dist/services/triggers/triggers-output.schemas.d.ts +52 -52
  285. package/dist/services/triggers/triggers.codecs.d.ts.map +1 -1
  286. package/dist/services/triggers/triggers.codecs.js +2 -0
  287. package/dist/services/triggers/triggers.codecs.js.map +1 -1
  288. package/dist/services/triggers/triggers.js +1 -1
  289. package/dist/services/vip/vip.js +1 -1
  290. package/dist/services/vip/vip.schemas.js +1 -1
  291. package/dist/services/zipper/zipper.js +1 -1
  292. package/dist/services/zipper/zipper.schemas.js +1 -1
  293. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  294. package/dist/shared/connect-error-mapping.js +1 -1
  295. package/dist/shared/connect-error-mapping.js.map +1 -1
  296. package/dist/shared/depth-tier.js +46 -0
  297. package/dist/shared/depth-tier.js.map +1 -0
  298. package/dist/shared/error-detail.d.ts +6 -0
  299. package/dist/shared/error-detail.d.ts.map +1 -1
  300. package/dist/shared/error-detail.js +2 -1
  301. package/dist/shared/error-detail.js.map +1 -1
  302. package/dist/shared/error-details/alerts.js +1 -1
  303. package/dist/shared/error-details/assistant.js +1 -1
  304. package/dist/shared/error-details/auth.js +1 -1
  305. package/dist/shared/error-details/claims.js +1 -1
  306. package/dist/shared/error-details/internal-transfer.js +1 -1
  307. package/dist/shared/error-details/ledger.js +1 -1
  308. package/dist/shared/error-details/market-overview.js +1 -1
  309. package/dist/shared/error-details/notifications.js +1 -1
  310. package/dist/shared/error-details/orders.js +1 -1
  311. package/dist/shared/error-details/profile.js +1 -1
  312. package/dist/shared/error-details/rate-limit.js +1 -1
  313. package/dist/shared/error-details/request.js +16 -0
  314. package/dist/shared/error-details/request.js.map +1 -0
  315. package/dist/shared/error-details/withdraw.js +1 -1
  316. package/dist/shared/errors.d.ts +4 -1
  317. package/dist/shared/errors.d.ts.map +1 -1
  318. package/dist/shared/errors.js +4 -1
  319. package/dist/shared/errors.js.map +1 -1
  320. package/dist/shared/rate-limit.schemas.d.ts +1 -1
  321. package/dist/shared/rate-limit.schemas.js +1 -1
  322. package/dist/utils/connect-mfa-errors.d.ts +2 -2
  323. package/dist/utils/connect-mfa-errors.js +2 -2
  324. package/dist/utils/connect-mfa-errors.js.map +1 -1
  325. package/dist/wired-services.d.ts.map +1 -1
  326. package/dist/wired-services.js +21 -19
  327. package/dist/wired-services.js.map +1 -1
  328. package/package.json +1 -1
@@ -147,7 +147,7 @@ type DustAssetPrice = v.InferOutput<typeof DustAssetPriceSchema>;
147
147
  declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
148
148
  readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
149
149
  readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
150
- readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "completed" | "refused">]>;
150
+ readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "refused" | "completed">]>;
151
151
  readonly refusalCode: v.NumberSchema<undefined>;
152
152
  readonly targetAssetId: v.NumberSchema<undefined>;
153
153
  readonly sources: v.ArraySchema<v.ObjectSchema<{
@@ -187,7 +187,7 @@ declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
187
187
  }, undefined>, v.TransformAction<{
188
188
  conversionId: string;
189
189
  quoteId: string;
190
- state: "unspecified" | "processing" | "completed" | "refused";
190
+ state: "unspecified" | "processing" | "refused" | "completed";
191
191
  refusalCode: number;
192
192
  targetAssetId: number;
193
193
  sources: {
@@ -216,9 +216,9 @@ declare const DustConversionSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
216
216
  conversionId: string;
217
217
  /** The quote the conversion converted. */
218
218
  quoteId: string;
219
- state: "unspecified" | "processing" | "completed" | "refused";
219
+ state: "unspecified" | "processing" | "refused" | "completed";
220
220
  /** Why a `refused` conversion was refused; null otherwise. */
221
- refusalCode: "UNSPECIFIED" | "INSUFFICIENT_FUNDS" | "INVALID_REQUEST" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "RATE_LIMIT_EXCEEDED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "INVALID_SUBACCOUNT_ID" | "SUBACCOUNT_NOT_FOUND" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "FAILED_PRECONDITION" | "NOT_FOUND" | "CONFLICT" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
221
+ refusalCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "NOT_FOUND" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
222
222
  targetAssetId: number;
223
223
  /** Whole quoted balances moved, in asset id order. */
224
224
  sources: {
@@ -463,7 +463,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
463
463
  readonly conversions: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
464
464
  readonly conversionId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
465
465
  readonly quoteId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
466
- readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "completed" | "refused">]>;
466
+ readonly state: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "refused" | "completed">]>;
467
467
  readonly refusalCode: v.NumberSchema<undefined>;
468
468
  readonly targetAssetId: v.NumberSchema<undefined>;
469
469
  readonly sources: v.ArraySchema<v.ObjectSchema<{
@@ -503,7 +503,7 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
503
503
  }, undefined>, v.TransformAction<{
504
504
  conversionId: string;
505
505
  quoteId: string;
506
- state: "unspecified" | "processing" | "completed" | "refused";
506
+ state: "unspecified" | "processing" | "refused" | "completed";
507
507
  refusalCode: number;
508
508
  targetAssetId: number;
509
509
  sources: {
@@ -532,9 +532,9 @@ declare const ListDustConversionsResultSchema: v.ObjectSchema<{
532
532
  conversionId: string;
533
533
  /** The quote the conversion converted. */
534
534
  quoteId: string;
535
- state: "unspecified" | "processing" | "completed" | "refused";
535
+ state: "unspecified" | "processing" | "refused" | "completed";
536
536
  /** Why a `refused` conversion was refused; null otherwise. */
537
- refusalCode: "UNSPECIFIED" | "INSUFFICIENT_FUNDS" | "INVALID_REQUEST" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "RATE_LIMIT_EXCEEDED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "INVALID_SUBACCOUNT_ID" | "SUBACCOUNT_NOT_FOUND" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "FAILED_PRECONDITION" | "NOT_FOUND" | "CONFLICT" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
537
+ refusalCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "NOT_FOUND" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | null;
538
538
  targetAssetId: number;
539
539
  /** Whole quoted balances moved, in asset id order. */
540
540
  sources: {
@@ -1,3 +1,4 @@
1
+ import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
1
2
  import { codeName } from "../../shared/error-detail.js";
2
3
  import { OptionalTimestampMsSchema, U128Schema } from "../../shared/schemas.js";
3
4
  import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
@@ -5,7 +6,6 @@ import { fromU128 } from "../../utils/u128.js";
5
6
  import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
6
7
  import { PositiveUint32InputSchema } from "../shared.js";
7
8
  import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
8
- import { ErrorCode } from "../../gen/transfer/v1/internal_transfer_pb.js";
9
9
  import { DustAssetEligibilityCodec, DustConversionStateCodec } from "./dust-conversion.codecs.js";
10
10
  import * as v from "valibot";
11
11
  //#region src/services/dust-conversion/dust-conversion.schemas.ts
@@ -1,8 +1,8 @@
1
+ import { FeeService } from "../../gen/fees/v1/fees_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { FeeService } from "../../gen/fees/v1/fees_pb.js";
6
6
  import { GetSpotFeeRatesInputSchema, SpotFeeRatesSchema } from "./fees.schemas.js";
7
7
  import { createClient } from "@connectrpc/connect";
8
8
  //#region src/services/fees/fees.ts
@@ -1,8 +1,8 @@
1
+ import { GuardSignerService as GuardSignerService$1 } from "../../gen/chain/guard/v1/guard_signer_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { GuardSignerService as GuardSignerService$1 } from "../../gen/chain/guard/v1/guard_signer_pb.js";
6
6
  import { BatchGuardApprovalsSchema, BatchSignProtectedActionInputSchema, CreateGuardSignerWalletResultSchema, ExportGuardSignerWalletResultSchema, GuardApprovalSchema, GuardSignerScopedInputSchema, GuardSignerStatusSchema, RotateGuardSignerWalletResultSchema, SignProtectedActionInputSchema } from "./guard-signer.schemas.js";
7
7
  import { formatConnectError, isResourceNotFoundError } from "../../utils/errors.js";
8
8
  import { createClient } from "@connectrpc/connect";
@@ -2,6 +2,7 @@ import "../../gen/marketdata/v1/heatmap_pb.js";
2
2
  //#region src/services/heatmap/heatmap.codecs.d.ts
3
3
  declare const HEATMAP_INTERVAL_VALUES: readonly ["1s", "1m", "5m", "1h"];
4
4
  type HeatmapIntervalValue = (typeof HEATMAP_INTERVAL_VALUES)[number];
5
+ /** Every `DepthTier` except 5000, which the heatmap refuses. */
5
6
  declare const HEATMAP_DEPTH_VALUES: readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000];
6
7
  type HeatmapDepthValue = (typeof HEATMAP_DEPTH_VALUES)[number];
7
8
  declare const HEATMAP_QUANTITY_MODE_VALUES: readonly ["close", "peak"];
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap.codecs.d.ts","names":[],"sources":["../../../src/services/heatmap/heatmap.codecs.ts"],"mappings":";;cAOa;KACD,+BAA+B;cAE9B;KACD,4BAA4B;cAE3B;KACD,mCAAmC"}
1
+ {"version":3,"file":"heatmap.codecs.d.ts","names":[],"sources":["../../../src/services/heatmap/heatmap.codecs.ts"],"mappings":";;cAGa;KACD,+BAA+B;;cAG9B;KACD,4BAA4B;cAE3B;KACD,mCAAmC"}
@@ -6,6 +6,7 @@ const HEATMAP_INTERVAL_VALUES = [
6
6
  "5m",
7
7
  "1h"
8
8
  ];
9
+ /** Every `DepthTier` except 5000, which the heatmap refuses. */
9
10
  const HEATMAP_DEPTH_VALUES = [
10
11
  1,
11
12
  5,
@@ -33,32 +34,6 @@ const HeatmapIntervalCodec = {
33
34
  [4]: "1h"
34
35
  }
35
36
  };
36
- const HeatmapDepthCodec = {
37
- inputToProto: {
38
- 1: 1,
39
- 5: 2,
40
- 10: 3,
41
- 20: 4,
42
- 50: 5,
43
- 100: 6,
44
- 200: 7,
45
- 500: 8,
46
- 1e3: 9
47
- },
48
- protoToOutput: {
49
- [0]: "unspecified",
50
- [1]: 1,
51
- [2]: 5,
52
- [3]: 10,
53
- [4]: 20,
54
- [5]: 50,
55
- [6]: 100,
56
- [7]: 200,
57
- [8]: 500,
58
- [9]: 1e3
59
- },
60
- supportedDepths: HEATMAP_DEPTH_VALUES
61
- };
62
37
  const HeatmapQuantityModeCodec = {
63
38
  inputToProto: {
64
39
  close: 1,
@@ -71,6 +46,6 @@ const HeatmapQuantityModeCodec = {
71
46
  }
72
47
  };
73
48
  //#endregion
74
- export { HEATMAP_DEPTH_VALUES, HEATMAP_INTERVAL_VALUES, HEATMAP_QUANTITY_MODE_VALUES, HeatmapDepthCodec, HeatmapIntervalCodec, HeatmapQuantityModeCodec };
49
+ export { HEATMAP_DEPTH_VALUES, HEATMAP_INTERVAL_VALUES, HEATMAP_QUANTITY_MODE_VALUES, HeatmapIntervalCodec, HeatmapQuantityModeCodec };
75
50
 
76
51
  //# sourceMappingURL=heatmap.codecs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap.codecs.js","names":[],"sources":["../../../src/services/heatmap/heatmap.codecs.ts"],"sourcesContent":["import {\n HeatmapDepth,\n HeatmapInterval,\n HeatmapQuantityMode,\n} from \"../../gen/marketdata/v1/heatmap_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const HEATMAP_INTERVAL_VALUES = [\"1s\", \"1m\", \"5m\", \"1h\"] as const;\nexport type HeatmapIntervalValue = (typeof HEATMAP_INTERVAL_VALUES)[number];\n\nexport const HEATMAP_DEPTH_VALUES = [1, 5, 10, 20, 50, 100, 200, 500, 1000] as const;\nexport type HeatmapDepthValue = (typeof HEATMAP_DEPTH_VALUES)[number];\n\nexport const HEATMAP_QUANTITY_MODE_VALUES = [\"close\", \"peak\"] as const;\nexport type HeatmapQuantityModeValue = (typeof HEATMAP_QUANTITY_MODE_VALUES)[number];\n\nexport const HeatmapIntervalCodec = {\n inputToProto: {\n \"1s\": HeatmapInterval.INTERVAL_1S,\n \"1m\": HeatmapInterval.INTERVAL_1M,\n \"5m\": HeatmapInterval.INTERVAL_5M,\n \"1h\": HeatmapInterval.INTERVAL_1H,\n } satisfies InputToProto<HeatmapIntervalValue, HeatmapInterval>,\n protoToOutput: {\n [HeatmapInterval.INTERVAL_UNSPECIFIED]: \"unspecified\",\n [HeatmapInterval.INTERVAL_1S]: \"1s\",\n [HeatmapInterval.INTERVAL_1M]: \"1m\",\n [HeatmapInterval.INTERVAL_5M]: \"5m\",\n [HeatmapInterval.INTERVAL_1H]: \"1h\",\n } satisfies ProtoToOutput<HeatmapInterval, HeatmapIntervalValue>,\n} as const;\n\nexport const HeatmapDepthCodec = {\n inputToProto: {\n 1: HeatmapDepth.DEPTH_1,\n 5: HeatmapDepth.DEPTH_5,\n 10: HeatmapDepth.DEPTH_10,\n 20: HeatmapDepth.DEPTH_20,\n 50: HeatmapDepth.DEPTH_50,\n 100: HeatmapDepth.DEPTH_100,\n 200: HeatmapDepth.DEPTH_200,\n 500: HeatmapDepth.DEPTH_500,\n 1000: HeatmapDepth.DEPTH_1000,\n } satisfies InputToProto<HeatmapDepthValue, HeatmapDepth>,\n protoToOutput: {\n [HeatmapDepth.DEPTH_UNSPECIFIED]: \"unspecified\",\n [HeatmapDepth.DEPTH_1]: 1,\n [HeatmapDepth.DEPTH_5]: 5,\n [HeatmapDepth.DEPTH_10]: 10,\n [HeatmapDepth.DEPTH_20]: 20,\n [HeatmapDepth.DEPTH_50]: 50,\n [HeatmapDepth.DEPTH_100]: 100,\n [HeatmapDepth.DEPTH_200]: 200,\n [HeatmapDepth.DEPTH_500]: 500,\n [HeatmapDepth.DEPTH_1000]: 1000,\n } satisfies ProtoToOutput<HeatmapDepth, HeatmapDepthValue>,\n supportedDepths: HEATMAP_DEPTH_VALUES,\n} as const;\n\nexport const HeatmapQuantityModeCodec = {\n inputToProto: {\n close: HeatmapQuantityMode.CLOSE,\n peak: HeatmapQuantityMode.PEAK,\n } satisfies InputToProto<HeatmapQuantityModeValue, HeatmapQuantityMode>,\n protoToOutput: {\n [HeatmapQuantityMode.QTY_MODE_UNSPECIFIED]: \"unspecified\",\n [HeatmapQuantityMode.CLOSE]: \"close\",\n [HeatmapQuantityMode.PEAK]: \"peak\",\n } satisfies ProtoToOutput<HeatmapQuantityMode, HeatmapQuantityModeValue>,\n} as const;\n"],"mappings":";;AAOA,MAAa,0BAA0B;CAAC;CAAM;CAAM;CAAM;AAAI;AAG9D,MAAa,uBAAuB;CAAC;CAAG;CAAG;CAAI;CAAI;CAAI;CAAK;CAAK;CAAK;AAAI;AAG1E,MAAa,+BAA+B,CAAC,SAAS,MAAM;AAG5D,MAAa,uBAAuB;CAChC,cAAc;EACV,MAAA;EACA,MAAA;EACA,MAAA;EACA,MAAA;CACJ;CACA,eAAe;GAC6B,IAAA;GACT,IAAA;GACA,IAAA;GACA,IAAA;GACA,IAAA;CACnC;AACJ;AAEA,MAAa,oBAAoB;CAC7B,cAAc;EACV,GAAA;EACA,GAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACA,KAAA;EACA,KAAA;EACA,KAAA;EACA,KAAA;CACJ;CACA,eAAe;GACuB,IAAA;GACV,IAAA;GACA,IAAA;GACC,IAAA;GACA,IAAA;GACA,IAAA;GACC,IAAA;GACA,IAAA;GACA,IAAA;GACC,IAAA;CAC/B;CACA,iBAAiB;AACrB;AAEA,MAAa,2BAA2B;CACpC,cAAc;EACV,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACiC,IAAA;GACf,IAAA;GACD,IAAA;CAChC;AACJ"}
1
+ {"version":3,"file":"heatmap.codecs.js","names":[],"sources":["../../../src/services/heatmap/heatmap.codecs.ts"],"sourcesContent":["import { HeatmapInterval, HeatmapQuantityMode } from \"../../gen/marketdata/v1/heatmap_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const HEATMAP_INTERVAL_VALUES = [\"1s\", \"1m\", \"5m\", \"1h\"] as const;\nexport type HeatmapIntervalValue = (typeof HEATMAP_INTERVAL_VALUES)[number];\n\n/** Every `DepthTier` except 5000, which the heatmap refuses. */\nexport const HEATMAP_DEPTH_VALUES = [1, 5, 10, 20, 50, 100, 200, 500, 1000] as const;\nexport type HeatmapDepthValue = (typeof HEATMAP_DEPTH_VALUES)[number];\n\nexport const HEATMAP_QUANTITY_MODE_VALUES = [\"close\", \"peak\"] as const;\nexport type HeatmapQuantityModeValue = (typeof HEATMAP_QUANTITY_MODE_VALUES)[number];\n\nexport const HeatmapIntervalCodec = {\n inputToProto: {\n \"1s\": HeatmapInterval.INTERVAL_1S,\n \"1m\": HeatmapInterval.INTERVAL_1M,\n \"5m\": HeatmapInterval.INTERVAL_5M,\n \"1h\": HeatmapInterval.INTERVAL_1H,\n } satisfies InputToProto<HeatmapIntervalValue, HeatmapInterval>,\n protoToOutput: {\n [HeatmapInterval.INTERVAL_UNSPECIFIED]: \"unspecified\",\n [HeatmapInterval.INTERVAL_1S]: \"1s\",\n [HeatmapInterval.INTERVAL_1M]: \"1m\",\n [HeatmapInterval.INTERVAL_5M]: \"5m\",\n [HeatmapInterval.INTERVAL_1H]: \"1h\",\n } satisfies ProtoToOutput<HeatmapInterval, HeatmapIntervalValue>,\n} as const;\n\nexport const HeatmapQuantityModeCodec = {\n inputToProto: {\n close: HeatmapQuantityMode.CLOSE,\n peak: HeatmapQuantityMode.PEAK,\n } satisfies InputToProto<HeatmapQuantityModeValue, HeatmapQuantityMode>,\n protoToOutput: {\n [HeatmapQuantityMode.QTY_MODE_UNSPECIFIED]: \"unspecified\",\n [HeatmapQuantityMode.CLOSE]: \"close\",\n [HeatmapQuantityMode.PEAK]: \"peak\",\n } satisfies ProtoToOutput<HeatmapQuantityMode, HeatmapQuantityModeValue>,\n} as const;\n"],"mappings":";;AAGA,MAAa,0BAA0B;CAAC;CAAM;CAAM;CAAM;AAAI;;AAI9D,MAAa,uBAAuB;CAAC;CAAG;CAAG;CAAI;CAAI;CAAI;CAAK;CAAK;CAAK;AAAI;AAG1E,MAAa,+BAA+B,CAAC,SAAS,MAAM;AAG5D,MAAa,uBAAuB;CAChC,cAAc;EACV,MAAA;EACA,MAAA;EACA,MAAA;EACA,MAAA;CACJ;CACA,eAAe;GAC6B,IAAA;GACT,IAAA;GACA,IAAA;GACA,IAAA;GACA,IAAA;CACnC;AACJ;AAEA,MAAa,2BAA2B;CACpC,cAAc;EACV,OAAA;EACA,MAAA;CACJ;CACA,eAAe;GACiC,IAAA;GACf,IAAA;GACD,IAAA;CAChC;AACJ"}
@@ -1,8 +1,8 @@
1
+ import { HeatmapLiveBucketSchema, HeatmapService as HeatmapService$1, HeatmapTimeRangeSchema } from "../../gen/marketdata/v1/heatmap_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
4
  import { SymbolIdInputSchema } from "../shared.js";
4
5
  import { connectReadyGatedProtoChannel } from "../../realtime/ready-gated-subscription.js";
5
- import { HeatmapLiveBucketSchema, HeatmapService as HeatmapService$1, HeatmapTimeRangeSchema } from "../../gen/marketdata/v1/heatmap_pb.js";
6
6
  import { HEATMAP_INTERVAL_VALUES } from "./heatmap.codecs.js";
7
7
  import { GetOrderbookHeatmapInputSchema, createOrderbookHeatmapLiveBucketSchema, createOrderbookHeatmapResponseSchema } from "./heatmap.schemas.js";
8
8
  import { create } from "@bufbuild/protobuf";
@@ -1,4 +1,5 @@
1
- import { HeatmapDepth, HeatmapInterval, HeatmapQuantityMode } from "../../gen/marketdata/v1/heatmap_pb.js";
1
+ import { DepthTier } from "../../gen/polyester/type/v1/depth_tier_pb.js";
2
+ import { HeatmapInterval, HeatmapQuantityMode } from "../../gen/marketdata/v1/heatmap_pb.js";
2
3
  import { DecodedEnum } from "../../utils/types.js";
3
4
  import { SdkScales } from "../../shared/decimal-surface.js";
4
5
  import * as v from "valibot";
@@ -14,7 +15,7 @@ type TimestampInit = {
14
15
  declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
15
16
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
16
17
  readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1s" | "1m" | "5m" | "1h", HeatmapInterval>]>;
17
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 200 | 100 | 500 | 1000 | 50, HeatmapDepth>]>;
18
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50, DepthTier>]>;
18
19
  readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
19
20
  readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
20
21
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
@@ -23,7 +24,7 @@ declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.Objec
23
24
  }, undefined>, v.CheckAction<{
24
25
  symbolId: number;
25
26
  interval: HeatmapInterval;
26
- depth: HeatmapDepth;
27
+ depth: DepthTier;
27
28
  quantityMode: HeatmapQuantityMode;
28
29
  limit: number;
29
30
  startTsSec?: bigint | undefined;
@@ -32,7 +33,7 @@ declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.Objec
32
33
  }, "pageToken, startTsSec, or endTsSec is required">, v.TransformAction<{
33
34
  symbolId: number;
34
35
  interval: HeatmapInterval;
35
- depth: HeatmapDepth;
36
+ depth: DepthTier;
36
37
  quantityMode: HeatmapQuantityMode;
37
38
  limit: number;
38
39
  startTsSec?: bigint | undefined;
@@ -41,7 +42,7 @@ declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.Objec
41
42
  }, {
42
43
  symbolId: number;
43
44
  interval: HeatmapInterval;
44
- depth: HeatmapDepth;
45
+ depth: DepthTier;
45
46
  quantityMode: HeatmapQuantityMode;
46
47
  limit: number;
47
48
  pageToken: string;
@@ -227,7 +228,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
227
228
  declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
228
229
  readonly symbolId: v.NumberSchema<undefined>;
229
230
  readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1s" | "1m" | "5m" | "1h">>]>;
230
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | "unspecified" | 200 | 100 | 500 | 1000 | 50>]>;
231
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50 | 5000>]>;
231
232
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
232
233
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
233
234
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -287,7 +288,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
287
288
  }, undefined>, v.TransformAction<{
288
289
  symbolId: number;
289
290
  interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
290
- depth: 1 | 5 | 10 | 20 | "unspecified" | 200 | 100 | 500 | 1000 | 50;
291
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50 | 5000;
291
292
  chain?: {
292
293
  baseKeyframe?: {
293
294
  tsSec: number;
@@ -347,7 +348,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
347
348
  }, {
348
349
  symbolId: number;
349
350
  interval: DecodedEnum<"1s" | "1m" | "5m" | "1h">;
350
- depth: 1 | 5 | 10 | 20 | "unspecified" | 200 | 100 | 500 | 1000 | 50;
351
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 500 | 100 | 1000 | 50 | 5000;
351
352
  chain: {
352
353
  baseKeyframe: {
353
354
  tsSec: number;
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap.schemas.d.ts","names":[],"sources":["../../../src/services/heatmap/heatmap.schemas.ts"],"mappings":";;;;;KAsBK;EACD,YAAY;EACZ,UAAU;;KAGT;EAAkB;EAAiB;;cAqB3B,gCAA8B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0DrC,iCAA+B,EAAA;;;;KAKhC,4BAA4B,EAAE,mBAAmB;iBAE7C,qBACL,QAAQ,2BACR,oBACA;;;;KAQQ,yBAAyB,kBAAkB;KAE3C,8BAA8B;cAEpC,mCAAiC,EAAA;;;;;;;;;;;;;;;KAUlC,8BAA8B,EAAE,mBAAmB;iBAE/C,uBACL,UAAU,6BACV,oBACA;;;;;;;;;;;;;;;KAaQ,2BAA2B,kBAAkB;cAEnD,sCAAoC,EAAA;;;;;;;;;;;;;;KASrC,iCAAiC,EAAE,mBAAmB;iBAElD,0BACL,QAAQ,gCACR,oBACA;;;;;;;;;;;;;;KAYQ,8BAA8B,kBAAkB;cAEtD,qCAAmC,EAAA;;;;;;;;;;;;;;;;;;;KAcpC,gCAAgC,EAAE,mBAAmB;iBAEjD,yBAAyB,QAAQ,+BAA+B,QAAQ;;;;;;;;;;;;;;;;;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gC,EAAE,mBAAmB;iBAEjD,yBAAyB,QAAQ,+BAA+B,QAAQ;;;;;;;;;;;;;;;;;;;KAkBrE,6BAA6B,kBAAkB;cASrD,qCAAmC,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKpC,gCAAgC,EAAE,mBAAmB;iBAEjD,yBACL,OAAO,+BACP,oBACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAYQ,6BAA6B,kBAAkB;iBAmB3C,qCAAqC,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2B1D,2BAA2B,EAAE,kBAAkB;KAE/C,2BAA2B,EAAE,YACrC,kBAAkB"}
@@ -2,11 +2,12 @@ import { OptionalTimestampSecondsInputSchema } from "../../shared/schemas.js";
2
2
  import { enumLabel } from "../../shared/proto-enum-codec.js";
3
3
  import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
4
4
  import { SymbolIdInputSchema } from "../shared.js";
5
- import { HEATMAP_DEPTH_VALUES, HEATMAP_INTERVAL_VALUES, HEATMAP_QUANTITY_MODE_VALUES, HeatmapDepthCodec, HeatmapIntervalCodec, HeatmapQuantityModeCodec } from "./heatmap.codecs.js";
5
+ import { HEATMAP_DEPTH_VALUES, HEATMAP_INTERVAL_VALUES, HEATMAP_QUANTITY_MODE_VALUES, HeatmapIntervalCodec, HeatmapQuantityModeCodec } from "./heatmap.codecs.js";
6
+ import { DepthTierCodec } from "../../shared/depth-tier.js";
6
7
  import * as v from "valibot";
7
8
  //#region src/services/heatmap/heatmap.schemas.ts
8
9
  const IntervalInputSchema = v.pipe(v.optional(v.picklist(HEATMAP_INTERVAL_VALUES), "1s"), v.transform((value) => HeatmapIntervalCodec.inputToProto[value]));
9
- const DepthInputSchema = v.pipe(v.optional(v.picklist(HEATMAP_DEPTH_VALUES), 50), v.transform((value) => HeatmapDepthCodec.inputToProto[value]));
10
+ const DepthInputSchema = v.pipe(v.optional(v.picklist(HEATMAP_DEPTH_VALUES), 50), v.transform((value) => DepthTierCodec.inputToProto[value]));
10
11
  const QuantityModeInputSchema = v.pipe(v.optional(v.picklist(HEATMAP_QUANTITY_MODE_VALUES), "close"), v.transform((value) => HeatmapQuantityModeCodec.inputToProto[value]));
11
12
  function timestampFromTsSec(tsSec) {
12
13
  return {
@@ -140,7 +141,7 @@ function convertHeatmapDeltaChain(chain, priceScale, qtyScale) {
140
141
  const OrderbookHeatmapResponseRawSchema = v.object({
141
142
  symbolId: v.number(),
142
143
  interval: v.pipe(v.number(), v.transform(intervalLabelFor)),
143
- depth: v.pipe(v.number(), v.transform((value) => enumLabel(HeatmapDepthCodec.protoToOutput, value))),
144
+ depth: v.pipe(v.number(), v.transform((value) => enumLabel(DepthTierCodec.protoToOutput, value))),
144
145
  chain: v.optional(OrderbookHeatmapDeltaChainRawSchema),
145
146
  lastPersistedTsSec: TimestampSecondsSchema,
146
147
  liveFromBookSeqEnd: Uint64StringSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"heatmap.schemas.js","names":[],"sources":["../../../src/services/heatmap/heatmap.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport type {\n HeatmapDepth,\n HeatmapInterval,\n HeatmapQuantityMode,\n} from \"../../gen/marketdata/v1/heatmap_pb.js\";\nimport { OptionalTimestampSecondsInputSchema } from \"../../shared/schemas.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport {\n HEATMAP_DEPTH_VALUES,\n HEATMAP_INTERVAL_VALUES,\n HEATMAP_QUANTITY_MODE_VALUES,\n HeatmapDepthCodec,\n HeatmapIntervalCodec,\n HeatmapQuantityModeCodec,\n type HeatmapIntervalValue,\n type HeatmapQuantityModeValue,\n} from \"./heatmap.codecs.js\";\n\ntype HeatmapTimeRangeInit = {\n startTime?: TimestampInit;\n endTime?: TimestampInit;\n};\n\ntype TimestampInit = { seconds: bigint; nanos: number };\n\nconst IntervalInputSchema = v.pipe(\n v.optional(v.picklist(HEATMAP_INTERVAL_VALUES), \"1s\"),\n v.transform((value): HeatmapInterval => HeatmapIntervalCodec.inputToProto[value]),\n);\n\nconst DepthInputSchema = v.pipe(\n v.optional(v.picklist(HEATMAP_DEPTH_VALUES), 50),\n v.transform((value): HeatmapDepth => HeatmapDepthCodec.inputToProto[value]),\n);\n\nconst QuantityModeInputSchema = v.pipe(\n v.optional(v.picklist(HEATMAP_QUANTITY_MODE_VALUES), \"close\"),\n v.transform((value): HeatmapQuantityMode => HeatmapQuantityModeCodec.inputToProto[value]),\n);\n\nfunction timestampFromTsSec(tsSec: bigint): TimestampInit {\n return { seconds: tsSec, nanos: 0 };\n}\n\nexport const GetOrderbookHeatmapInputSchema = v.pipe(\n v.object({\n symbolId: SymbolIdInputSchema,\n interval: IntervalInputSchema,\n depth: DepthInputSchema,\n quantityMode: QuantityModeInputSchema,\n limit: v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(20_000)),\n startTsSec: OptionalTimestampSecondsInputSchema,\n endTsSec: OptionalTimestampSecondsInputSchema,\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.check(\n (value) => value.pageToken !== \"\" || value.startTsSec != null || value.endTsSec != null,\n \"pageToken, startTsSec, or endTsSec is required\",\n ),\n v.transform((value) => {\n const timeRange: HeatmapTimeRangeInit | undefined =\n value.pageToken !== \"\"\n ? undefined\n : {\n startTime:\n value.startTsSec != null\n ? timestampFromTsSec(value.startTsSec)\n : undefined,\n endTime:\n value.endTsSec != null ? timestampFromTsSec(value.endTsSec) : undefined,\n };\n\n return {\n symbolId: value.symbolId,\n interval: value.interval,\n depth: value.depth,\n quantityMode: value.quantityMode,\n limit: value.limit,\n pageToken: value.pageToken,\n timeRange,\n };\n }),\n);\n\nfunction intervalLabelFor(value: number): DecodedEnum<HeatmapIntervalValue> {\n return enumLabel(HeatmapIntervalCodec.protoToOutput, value);\n}\n\nfunction quantityModeLabelFor(value: number): DecodedEnum<HeatmapQuantityModeValue> {\n return enumLabel(HeatmapQuantityModeCodec.protoToOutput, value);\n}\n\nconst TimestampSecondsSchema = v.pipe(\n v.bigint(),\n v.transform((value) => Number(value)),\n);\n\nconst Uint64StringSchema = v.pipe(\n v.bigint(),\n v.transform((value) => value.toString()),\n);\n\nconst OrderbookHeatmapLevelsRawSchema = v.object({\n priceTicks: v.array(v.bigint()),\n qtyScaled: v.array(v.bigint()),\n});\n\ntype OrderbookHeatmapLevelsRaw = v.InferOutput<typeof OrderbookHeatmapLevelsRawSchema>;\n\nfunction convertHeatmapLevels(\n levels: OrderbookHeatmapLevelsRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n price: levels.priceTicks.map((tick) => scaledToDecimalOutput(tick, priceScale)),\n qty: levels.qtyScaled.map((qty) => scaledToDecimalOutput(qty, qtyScale)),\n };\n}\n\nexport type OrderbookHeatmapLevels = ReturnType<typeof convertHeatmapLevels>;\n\nexport type OrderbookHeatmapDeltaLevels = OrderbookHeatmapLevels;\n\nconst OrderbookHeatmapKeyframeRawSchema = v.object({\n tsSec: TimestampSecondsSchema,\n bestBidTicks: v.bigint(),\n bestAskTicks: v.bigint(),\n midTicks: v.bigint(),\n bids: v.optional(OrderbookHeatmapLevelsRawSchema),\n asks: v.optional(OrderbookHeatmapLevelsRawSchema),\n bookSeq: Uint64StringSchema,\n});\n\ntype OrderbookHeatmapKeyframeRaw = v.InferOutput<typeof OrderbookHeatmapKeyframeRawSchema>;\n\nfunction convertHeatmapKeyframe(\n keyframe: OrderbookHeatmapKeyframeRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n tsSec: keyframe.tsSec,\n bestBid: scaledToDecimalOutput(keyframe.bestBidTicks, priceScale),\n bestAsk: scaledToDecimalOutput(keyframe.bestAskTicks, priceScale),\n mid: scaledToDecimalOutput(keyframe.midTicks, priceScale),\n bids: keyframe.bids ? convertHeatmapLevels(keyframe.bids, priceScale, qtyScale) : undefined,\n asks: keyframe.asks ? convertHeatmapLevels(keyframe.asks, priceScale, qtyScale) : undefined,\n bookSeq: keyframe.bookSeq,\n };\n}\n\nexport type OrderbookHeatmapKeyframe = ReturnType<typeof convertHeatmapKeyframe>;\n\nconst OrderbookHeatmapDeltaBucketRawSchema = v.object({\n tsSec: TimestampSecondsSchema,\n bids: v.optional(OrderbookHeatmapLevelsRawSchema),\n asks: v.optional(OrderbookHeatmapLevelsRawSchema),\n updatesInBucket: v.number(),\n bookSeqStart: Uint64StringSchema,\n bookSeqEnd: Uint64StringSchema,\n});\n\ntype OrderbookHeatmapDeltaBucketRaw = v.InferOutput<typeof OrderbookHeatmapDeltaBucketRawSchema>;\n\nfunction convertHeatmapDeltaBucket(\n bucket: OrderbookHeatmapDeltaBucketRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n tsSec: bucket.tsSec,\n bids: bucket.bids ? convertHeatmapLevels(bucket.bids, priceScale, qtyScale) : undefined,\n asks: bucket.asks ? convertHeatmapLevels(bucket.asks, priceScale, qtyScale) : undefined,\n updatesInBucket: bucket.updatesInBucket,\n bookSeqStart: bucket.bookSeqStart,\n bookSeqEnd: bucket.bookSeqEnd,\n };\n}\n\nexport type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;\n\nconst OrderbookHeatmapLiveBucketRawSchema = v.object({\n symbolId: v.number(),\n interval: v.pipe(v.number(), v.transform(intervalLabelFor)),\n tsSec: TimestampSecondsSchema,\n isFinal: v.boolean(),\n bids: v.optional(OrderbookHeatmapLevelsRawSchema),\n asks: v.optional(OrderbookHeatmapLevelsRawSchema),\n updatesInBucket: v.number(),\n bookSeqStart: Uint64StringSchema,\n bookSeqEnd: Uint64StringSchema,\n quantityMode: v.pipe(v.number(), v.transform(quantityModeLabelFor)),\n effectiveBinTicks: v.bigint(),\n});\n\ntype OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;\n\nfunction convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales) {\n const priceScale = scales.price();\n const qtyScale = scales.baseQty(bucket.symbolId);\n return {\n symbolId: bucket.symbolId,\n interval: bucket.interval,\n tsSec: bucket.tsSec,\n isFinal: bucket.isFinal,\n bids: bucket.bids ? convertHeatmapLevels(bucket.bids, priceScale, qtyScale) : undefined,\n asks: bucket.asks ? convertHeatmapLevels(bucket.asks, priceScale, qtyScale) : undefined,\n updatesInBucket: bucket.updatesInBucket,\n bookSeqStart: bucket.bookSeqStart,\n bookSeqEnd: bucket.bookSeqEnd,\n quantityMode: bucket.quantityMode,\n effectiveBinSize: scaledToDecimalOutput(bucket.effectiveBinTicks, priceScale),\n };\n}\n\nexport type OrderbookHeatmapLiveBucket = ReturnType<typeof convertHeatmapLiveBucket>;\n\nexport function createOrderbookHeatmapLiveBucketSchema(scales: SdkScales) {\n return v.pipe(\n OrderbookHeatmapLiveBucketRawSchema,\n v.transform((bucket) => convertHeatmapLiveBucket(bucket, scales)),\n );\n}\n\nconst OrderbookHeatmapDeltaChainRawSchema = v.object({\n baseKeyframe: v.optional(OrderbookHeatmapKeyframeRawSchema),\n deltas: v.optional(v.array(OrderbookHeatmapDeltaBucketRawSchema), []),\n});\n\ntype OrderbookHeatmapDeltaChainRaw = v.InferOutput<typeof OrderbookHeatmapDeltaChainRawSchema>;\n\nfunction convertHeatmapDeltaChain(\n chain: OrderbookHeatmapDeltaChainRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n baseKeyframe: chain.baseKeyframe\n ? convertHeatmapKeyframe(chain.baseKeyframe, priceScale, qtyScale)\n : undefined,\n deltas: chain.deltas.map((bucket) =>\n convertHeatmapDeltaBucket(bucket, priceScale, qtyScale),\n ),\n };\n}\n\nexport type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;\n\nconst OrderbookHeatmapResponseRawSchema = v.object({\n symbolId: v.number(),\n interval: v.pipe(v.number(), v.transform(intervalLabelFor)),\n depth: v.pipe(\n v.number(),\n v.transform((value) => enumLabel(HeatmapDepthCodec.protoToOutput, value)),\n ),\n chain: v.optional(OrderbookHeatmapDeltaChainRawSchema),\n lastPersistedTsSec: TimestampSecondsSchema,\n liveFromBookSeqEnd: Uint64StringSchema,\n hasLiveAnchor: v.boolean(),\n nextPageToken: v.optional(v.string(), \"\"),\n serverTimeSec: TimestampSecondsSchema,\n quantityMode: v.pipe(v.number(), v.transform(quantityModeLabelFor)),\n liveBucket: v.optional(OrderbookHeatmapLiveBucketRawSchema),\n});\n\nexport function createOrderbookHeatmapResponseSchema(scales: SdkScales) {\n return v.pipe(\n OrderbookHeatmapResponseRawSchema,\n v.transform((res) => {\n const priceScale = scales.price();\n const qtyScale = scales.baseQty(res.symbolId);\n return {\n symbolId: res.symbolId,\n interval: res.interval,\n depth: res.depth,\n chain: res.chain\n ? convertHeatmapDeltaChain(res.chain, priceScale, qtyScale)\n : undefined,\n lastPersistedTsSec: res.lastPersistedTsSec,\n liveFromBookSeqEnd: res.liveFromBookSeqEnd,\n hasLiveAnchor: res.hasLiveAnchor,\n nextPageToken: res.nextPageToken,\n serverTimeSec: res.serverTimeSec,\n quantityMode: res.quantityMode,\n liveBucket: res.liveBucket\n ? convertHeatmapLiveBucket(res.liveBucket, scales)\n : undefined,\n };\n }),\n );\n}\n\nexport type GetOrderbookHeatmapInput = v.InferInput<typeof GetOrderbookHeatmapInputSchema>;\nexport type ParsedGetOrderbookHeatmapInput = v.InferOutput<typeof GetOrderbookHeatmapInputSchema>;\nexport type OrderbookHeatmapResponse = v.InferOutput<\n ReturnType<typeof createOrderbookHeatmapResponseSch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QACL,yBAAyB,IAAI,OAAO,YAAY,QAAQ,IACxD,KAAA;GACN,oBAAoB,IAAI;GACxB,oBAAoB,IAAI;GACxB,eAAe,IAAI;GACnB,eAAe,IAAI;GACnB,eAAe,IAAI;GACnB,cAAc,IAAI;GAClB,YAAY,IAAI,aACV,yBAAyB,IAAI,YAAY,MAAM,IAC/C,KAAA;EACV;CACJ,CAAC,CACL;AACJ"}
1
+ {"version":3,"file":"heatmap.schemas.js","names":[],"sources":["../../../src/services/heatmap/heatmap.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { SymbolIdInputSchema } from \"../shared.js\";\nimport type { HeatmapInterval, HeatmapQuantityMode } from \"../../gen/marketdata/v1/heatmap_pb.js\";\nimport type { DepthTier } from \"../../gen/polyester/type/v1/depth_tier_pb.js\";\nimport { DepthTierCodec } from \"../../shared/depth-tier.js\";\nimport { OptionalTimestampSecondsInputSchema } from \"../../shared/schemas.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum } from \"../../utils/types.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport {\n HEATMAP_DEPTH_VALUES,\n HEATMAP_INTERVAL_VALUES,\n HEATMAP_QUANTITY_MODE_VALUES,\n HeatmapIntervalCodec,\n HeatmapQuantityModeCodec,\n type HeatmapIntervalValue,\n type HeatmapQuantityModeValue,\n} from \"./heatmap.codecs.js\";\n\ntype HeatmapTimeRangeInit = {\n startTime?: TimestampInit;\n endTime?: TimestampInit;\n};\n\ntype TimestampInit = { seconds: bigint; nanos: number };\n\nconst IntervalInputSchema = v.pipe(\n v.optional(v.picklist(HEATMAP_INTERVAL_VALUES), \"1s\"),\n v.transform((value): HeatmapInterval => HeatmapIntervalCodec.inputToProto[value]),\n);\n\nconst DepthInputSchema = v.pipe(\n v.optional(v.picklist(HEATMAP_DEPTH_VALUES), 50),\n v.transform((value): DepthTier => DepthTierCodec.inputToProto[value]),\n);\n\nconst QuantityModeInputSchema = v.pipe(\n v.optional(v.picklist(HEATMAP_QUANTITY_MODE_VALUES), \"close\"),\n v.transform((value): HeatmapQuantityMode => HeatmapQuantityModeCodec.inputToProto[value]),\n);\n\nfunction timestampFromTsSec(tsSec: bigint): TimestampInit {\n return { seconds: tsSec, nanos: 0 };\n}\n\nexport const GetOrderbookHeatmapInputSchema = v.pipe(\n v.object({\n symbolId: SymbolIdInputSchema,\n interval: IntervalInputSchema,\n depth: DepthInputSchema,\n quantityMode: QuantityModeInputSchema,\n limit: v.pipe(v.number(), v.integer(), v.gtValue(0), v.maxValue(20_000)),\n startTsSec: OptionalTimestampSecondsInputSchema,\n endTsSec: OptionalTimestampSecondsInputSchema,\n pageToken: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n }),\n v.check(\n (value) => value.pageToken !== \"\" || value.startTsSec != null || value.endTsSec != null,\n \"pageToken, startTsSec, or endTsSec is required\",\n ),\n v.transform((value) => {\n const timeRange: HeatmapTimeRangeInit | undefined =\n value.pageToken !== \"\"\n ? undefined\n : {\n startTime:\n value.startTsSec != null\n ? timestampFromTsSec(value.startTsSec)\n : undefined,\n endTime:\n value.endTsSec != null ? timestampFromTsSec(value.endTsSec) : undefined,\n };\n\n return {\n symbolId: value.symbolId,\n interval: value.interval,\n depth: value.depth,\n quantityMode: value.quantityMode,\n limit: value.limit,\n pageToken: value.pageToken,\n timeRange,\n };\n }),\n);\n\nfunction intervalLabelFor(value: number): DecodedEnum<HeatmapIntervalValue> {\n return enumLabel(HeatmapIntervalCodec.protoToOutput, value);\n}\n\nfunction quantityModeLabelFor(value: number): DecodedEnum<HeatmapQuantityModeValue> {\n return enumLabel(HeatmapQuantityModeCodec.protoToOutput, value);\n}\n\nconst TimestampSecondsSchema = v.pipe(\n v.bigint(),\n v.transform((value) => Number(value)),\n);\n\nconst Uint64StringSchema = v.pipe(\n v.bigint(),\n v.transform((value) => value.toString()),\n);\n\nconst OrderbookHeatmapLevelsRawSchema = v.object({\n priceTicks: v.array(v.bigint()),\n qtyScaled: v.array(v.bigint()),\n});\n\ntype OrderbookHeatmapLevelsRaw = v.InferOutput<typeof OrderbookHeatmapLevelsRawSchema>;\n\nfunction convertHeatmapLevels(\n levels: OrderbookHeatmapLevelsRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n price: levels.priceTicks.map((tick) => scaledToDecimalOutput(tick, priceScale)),\n qty: levels.qtyScaled.map((qty) => scaledToDecimalOutput(qty, qtyScale)),\n };\n}\n\nexport type OrderbookHeatmapLevels = ReturnType<typeof convertHeatmapLevels>;\n\nexport type OrderbookHeatmapDeltaLevels = OrderbookHeatmapLevels;\n\nconst OrderbookHeatmapKeyframeRawSchema = v.object({\n tsSec: TimestampSecondsSchema,\n bestBidTicks: v.bigint(),\n bestAskTicks: v.bigint(),\n midTicks: v.bigint(),\n bids: v.optional(OrderbookHeatmapLevelsRawSchema),\n asks: v.optional(OrderbookHeatmapLevelsRawSchema),\n bookSeq: Uint64StringSchema,\n});\n\ntype OrderbookHeatmapKeyframeRaw = v.InferOutput<typeof OrderbookHeatmapKeyframeRawSchema>;\n\nfunction convertHeatmapKeyframe(\n keyframe: OrderbookHeatmapKeyframeRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n tsSec: keyframe.tsSec,\n bestBid: scaledToDecimalOutput(keyframe.bestBidTicks, priceScale),\n bestAsk: scaledToDecimalOutput(keyframe.bestAskTicks, priceScale),\n mid: scaledToDecimalOutput(keyframe.midTicks, priceScale),\n bids: keyframe.bids ? convertHeatmapLevels(keyframe.bids, priceScale, qtyScale) : undefined,\n asks: keyframe.asks ? convertHeatmapLevels(keyframe.asks, priceScale, qtyScale) : undefined,\n bookSeq: keyframe.bookSeq,\n };\n}\n\nexport type OrderbookHeatmapKeyframe = ReturnType<typeof convertHeatmapKeyframe>;\n\nconst OrderbookHeatmapDeltaBucketRawSchema = v.object({\n tsSec: TimestampSecondsSchema,\n bids: v.optional(OrderbookHeatmapLevelsRawSchema),\n asks: v.optional(OrderbookHeatmapLevelsRawSchema),\n updatesInBucket: v.number(),\n bookSeqStart: Uint64StringSchema,\n bookSeqEnd: Uint64StringSchema,\n});\n\ntype OrderbookHeatmapDeltaBucketRaw = v.InferOutput<typeof OrderbookHeatmapDeltaBucketRawSchema>;\n\nfunction convertHeatmapDeltaBucket(\n bucket: OrderbookHeatmapDeltaBucketRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n tsSec: bucket.tsSec,\n bids: bucket.bids ? convertHeatmapLevels(bucket.bids, priceScale, qtyScale) : undefined,\n asks: bucket.asks ? convertHeatmapLevels(bucket.asks, priceScale, qtyScale) : undefined,\n updatesInBucket: bucket.updatesInBucket,\n bookSeqStart: bucket.bookSeqStart,\n bookSeqEnd: bucket.bookSeqEnd,\n };\n}\n\nexport type OrderbookHeatmapDeltaBucket = ReturnType<typeof convertHeatmapDeltaBucket>;\n\nconst OrderbookHeatmapLiveBucketRawSchema = v.object({\n symbolId: v.number(),\n interval: v.pipe(v.number(), v.transform(intervalLabelFor)),\n tsSec: TimestampSecondsSchema,\n isFinal: v.boolean(),\n bids: v.optional(OrderbookHeatmapLevelsRawSchema),\n asks: v.optional(OrderbookHeatmapLevelsRawSchema),\n updatesInBucket: v.number(),\n bookSeqStart: Uint64StringSchema,\n bookSeqEnd: Uint64StringSchema,\n quantityMode: v.pipe(v.number(), v.transform(quantityModeLabelFor)),\n effectiveBinTicks: v.bigint(),\n});\n\ntype OrderbookHeatmapLiveBucketRaw = v.InferOutput<typeof OrderbookHeatmapLiveBucketRawSchema>;\n\nfunction convertHeatmapLiveBucket(bucket: OrderbookHeatmapLiveBucketRaw, scales: SdkScales) {\n const priceScale = scales.price();\n const qtyScale = scales.baseQty(bucket.symbolId);\n return {\n symbolId: bucket.symbolId,\n interval: bucket.interval,\n tsSec: bucket.tsSec,\n isFinal: bucket.isFinal,\n bids: bucket.bids ? convertHeatmapLevels(bucket.bids, priceScale, qtyScale) : undefined,\n asks: bucket.asks ? convertHeatmapLevels(bucket.asks, priceScale, qtyScale) : undefined,\n updatesInBucket: bucket.updatesInBucket,\n bookSeqStart: bucket.bookSeqStart,\n bookSeqEnd: bucket.bookSeqEnd,\n quantityMode: bucket.quantityMode,\n effectiveBinSize: scaledToDecimalOutput(bucket.effectiveBinTicks, priceScale),\n };\n}\n\nexport type OrderbookHeatmapLiveBucket = ReturnType<typeof convertHeatmapLiveBucket>;\n\nexport function createOrderbookHeatmapLiveBucketSchema(scales: SdkScales) {\n return v.pipe(\n OrderbookHeatmapLiveBucketRawSchema,\n v.transform((bucket) => convertHeatmapLiveBucket(bucket, scales)),\n );\n}\n\nconst OrderbookHeatmapDeltaChainRawSchema = v.object({\n baseKeyframe: v.optional(OrderbookHeatmapKeyframeRawSchema),\n deltas: v.optional(v.array(OrderbookHeatmapDeltaBucketRawSchema), []),\n});\n\ntype OrderbookHeatmapDeltaChainRaw = v.InferOutput<typeof OrderbookHeatmapDeltaChainRawSchema>;\n\nfunction convertHeatmapDeltaChain(\n chain: OrderbookHeatmapDeltaChainRaw,\n priceScale: number,\n qtyScale: number,\n) {\n return {\n baseKeyframe: chain.baseKeyframe\n ? convertHeatmapKeyframe(chain.baseKeyframe, priceScale, qtyScale)\n : undefined,\n deltas: chain.deltas.map((bucket) =>\n convertHeatmapDeltaBucket(bucket, priceScale, qtyScale),\n ),\n };\n}\n\nexport type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;\n\nconst OrderbookHeatmapResponseRawSchema = v.object({\n symbolId: v.number(),\n interval: v.pipe(v.number(), v.transform(intervalLabelFor)),\n depth: v.pipe(\n v.number(),\n v.transform((value) => enumLabel(DepthTierCodec.protoToOutput, value)),\n ),\n chain: v.optional(OrderbookHeatmapDeltaChainRawSchema),\n lastPersistedTsSec: TimestampSecondsSchema,\n liveFromBookSeqEnd: Uint64StringSchema,\n hasLiveAnchor: v.boolean(),\n nextPageToken: v.optional(v.string(), \"\"),\n serverTimeSec: TimestampSecondsSchema,\n quantityMode: v.pipe(v.number(), v.transform(quantityModeLabelFor)),\n liveBucket: v.optional(OrderbookHeatmapLiveBucketRawSchema),\n});\n\nexport function createOrderbookHeatmapResponseSchema(scales: SdkScales) {\n return v.pipe(\n OrderbookHeatmapResponseRawSchema,\n v.transform((res) => {\n const priceScale = scales.price();\n const qtyScale = scales.baseQty(res.symbolId);\n return {\n symbolId: res.symbolId,\n interval: res.interval,\n depth: res.depth,\n chain: res.chain\n ? convertHeatmapDeltaChain(res.chain, priceScale, qtyScale)\n : undefined,\n lastPersistedTsSec: res.lastPersistedTsSec,\n liveFromBookSeqEnd: res.liveFromBookSeqEnd,\n hasLiveAnchor: res.hasLiveAnchor,\n nextPageToken: res.nextPageToken,\n serverTimeSec: res.serverTimeSec,\n quantityMode: res.quantityMode,\n liveBucket: res.liveBucket\n ? convertHeatmapLiveBucket(res.liveBucket, scales)\n : undefined,\n };\n }),\n );\n}\n\nexport type GetOrderbookHeatmapInput = v.InferInput<typeof GetOrderbookHeatmapInputSchema>;\nexport type ParsedGetOrderbookHeatmapInput = v.InferOutput<typeof GetOrderbookHeatmapInputSchema>;\nexport type OrderbookHeatmapResponse = v.InferOutput<\n ReturnType<typeof createOrderbookHeatmapResponseSchema>\n>;\nexport type ParsedHeatmapTimeRange = HeatmapTimeRangeInit;\n"],"mappings":";;;;;;;;AA0BA,MAAM,sBAAsB,EAAE,KAC1B,EAAE,SAAS,EAAE,SAAS,uBAAuB,GAAG,IAAI,GACpD,EAAE,WAAW,UAA2B,qBAAqB,aAAa,MAAM,CACpF;AAEA,MAAM,mBAAmB,EAAE,KACvB,EAAE,SAAS,EAAE,SAAS,oBAAoB,GAAG,EAAE,GAC/C,EAAE,WAAW,UAAqB,eAAe,aAAa,MAAM,CACxE;AAEA,MAAM,0BAA0B,EAAE,KAC9B,EAAE,SAAS,EAAE,SAAS,4BAA4B,GAAG,OAAO,GAC5D,EAAE,WAAW,UAA+B,yBAAyB,aAAa,MAAM,CAC5F;AAEA,SAAS,mBAAmB,OAA8B;CACtD,OAA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AC1D;CACJ;AACJ;AAIA,MAAM,oCAAoC,EAAE,OAAO;CAC/C,UAAU,EAAE,OAAO;CACnB,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,UAAU,gBAAgB,CAAC;CAC1D,OAAO,EAAE,KACL,EAAE,OAAO,GACT,EAAE,WAAW,UAAU,UAAU,eAAe,eAAe,KAAK,CAAC,CACzE;CACA,OAAO,EAAE,SAAS,mCAAmC;CACrD,oBAAoB;CACpB,oBAAoB;CACpB,eAAe,EAAE,QAAQ;CACzB,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;CACxC,eAAe;CACf,cAAc,EAAE,KAAK,EAAE,OAAO,GAAG,EAAE,UAAU,oBAAoB,CAAC;CAClE,YAAY,EAAE,SAAS,mCAAmC;AAC9D,CAAC;AAED,SAAgB,qCAAqC,QAAmB;CACpE,OAAO,EAAE,KACL,mCACA,EAAE,WAAW,QAAQ;EACjB,MAAM,aAAa,OAAO,MAAM;EAChC,MAAM,WAAW,OAAO,QAAQ,IAAI,QAAQ;EAC5C,OAAO;GACH,UAAU,IAAI;GACd,UAAU,IAAI;GACd,OAAO,IAAI;GACX,OAAO,IAAI,QACL,yBAAyB,IAAI,OAAO,YAAY,QAAQ,IACxD,KAAA;GACN,oBAAoB,IAAI;GACxB,oBAAoB,IAAI;GACxB,eAAe,IAAI;GACnB,eAAe,IAAI;GACnB,eAAe,IAAI;GACnB,cAAc,IAAI;GAClB,YAAY,IAAI,aACV,yBAAyB,IAAI,YAAY,MAAM,IAC/C,KAAA;EACV;CACJ,CAAC,CACL;AACJ"}
@@ -21,9 +21,10 @@ declare class InternalTransfersService {
21
21
  * step-up is used, the legs that caused it carry their `errorCode` and the rest are
22
22
  * `"not_moved"`. `"accepted"` means every leg is credited. A batch whose outcome is not known
23
23
  * within the request is `"processing"` and completes on its own: read it with `getBatch` by
24
- * its `requestId`, or retry with the same key and legs. Recent MFA covers the root owner
25
- * moving funds between its own accounts or to allowlisted destinations; any other leg needs
26
- * one fresh step-up for the whole batch.
24
+ * its `requestId`, or retry with the same key and legs. An MFA-elevated session (an MFA
25
+ * challenge completed in the last 30 minutes) covers the root owner moving funds between its
26
+ * own accounts or to allowlisted destinations; any other leg needs one fresh step-up for the
27
+ * whole batch.
27
28
  */
28
29
  batchCreate(input: BatchCreateInternalTransfersInput, options?: PolyesterMutationOptions): Promise<BatchCreateInternalTransfersResult>;
29
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"internal-transfers.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"mappings":";;;;;;;;;cAoCa;;EASL,YAAA,YAAY,mBACZ,UAAU,gCACV,QAAQ;;;;EAaN,OACF,OAAO,6BACP,UAAU,2BACX,QAAQ;;;;;;;;;;;;EAsBL,YACF,OAAO,mCACP,UAAU,2BACX,QAAQ;;;;;;;EAsBL,SACF,OAAO,+BACP,UAAU,0BACX,QAAQ;;;;;;;;;EAiBL,IACF,OAAO,0BACP,UAAU,0BACX,QAAQ"}
1
+ {"version":3,"file":"internal-transfers.d.ts","names":[],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"mappings":";;;;;;;;;cAoCa;;EASL,YAAA,YAAY,mBACZ,UAAU,gCACV,QAAQ;;;;EAaN,OACF,OAAO,6BACP,UAAU,2BACX,QAAQ;;;;;;;;;;;;;EAuBL,YACF,OAAO,mCACP,UAAU,2BACX,QAAQ;;;;;;;EAsBL,SACF,OAAO,+BACP,UAAU,0BACX,QAAQ;;;;;;;;;EAiBL,IACF,OAAO,0BACP,UAAU,0BACX,QAAQ"}
@@ -1,8 +1,8 @@
1
+ import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScope, resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { InternalTransferService } from "../../gen/transfer/v1/internal_transfer_pb.js";
6
6
  import { BatchCreateInternalTransfersResultSchema, GetInternalTransferBatchInputSchema, GetInternalTransferInputSchema, GetInternalTransferResultSchema, createBatchCreateInternalTransfersInputSchema, createCreateInternalTransferInputSchema, createCreateInternalTransferResultSchema } from "./internal-transfers.schemas.js";
7
7
  import { createClient } from "@connectrpc/connect";
8
8
  //#region src/services/internal-transfers/internal-transfers.ts
@@ -41,9 +41,10 @@ var InternalTransfersService = class {
41
41
  * step-up is used, the legs that caused it carry their `errorCode` and the rest are
42
42
  * `"not_moved"`. `"accepted"` means every leg is credited. A batch whose outcome is not known
43
43
  * within the request is `"processing"` and completes on its own: read it with `getBatch` by
44
- * its `requestId`, or retry with the same key and legs. Recent MFA covers the root owner
45
- * moving funds between its own accounts or to allowlisted destinations; any other leg needs
46
- * one fresh step-up for the whole batch.
44
+ * its `requestId`, or retry with the same key and legs. An MFA-elevated session (an MFA
45
+ * challenge completed in the last 30 minutes) covers the root owner moving funds between its
46
+ * own accounts or to allowlisted destinations; any other leg needs one fresh step-up for the
47
+ * whole batch.
47
48
  */
48
49
  async batchCreate(input, options) {
49
50
  await this.#scales.ready();
@@ -1 +1 @@
1
- {"version":3,"file":"internal-transfers.js","names":["#client","Proto.InternalTransferService","#resolver","#scales","#inputSchema","#resultSchema","#batchInputSchema"],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport {\n type SubaccountResolver,\n resolveAccountScope,\n resolveAccountScopedInput,\n} from \"../subaccount-resolver.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n BatchCreateInternalTransfersResultSchema,\n createBatchCreateInternalTransfersInputSchema,\n type BatchCreateInternalTransfersInput,\n type BatchCreateInternalTransfersResult,\n createCreateInternalTransferInputSchema,\n createCreateInternalTransferResultSchema,\n type CreateInternalTransferInput,\n type CreateInternalTransferResult,\n GetInternalTransferBatchInputSchema,\n GetInternalTransferInputSchema,\n GetInternalTransferResultSchema,\n type GetInternalTransferBatchInput,\n type GetInternalTransferInput,\n type GetInternalTransferResult,\n} from \"./internal-transfers.schemas.js\";\n\n/**\n * Creates and reads authenticated Trading-to-Trading internal transfer requests.\n */\nexport class InternalTransfersService {\n #client: Client<typeof Proto.InternalTransferService>;\n #resolver?: SubaccountResolver;\n #scales: SdkScales;\n #inputSchema: ReturnType<typeof createCreateInternalTransferInputSchema>;\n #resultSchema: ReturnType<typeof createCreateInternalTransferResultSchema>;\n #batchInputSchema: ReturnType<typeof createBatchCreateInternalTransfersInputSchema>;\n\n constructor(\n transports: AuthApiTransports,\n resolver: SubaccountResolver | undefined,\n scales: SdkScales,\n ) {\n this.#client = createClient(Proto.InternalTransferService, transports.authApi);\n this.#resolver = resolver;\n this.#scales = scales;\n this.#inputSchema = createCreateInternalTransferInputSchema(scales);\n this.#resultSchema = createCreateInternalTransferResultSchema();\n this.#batchInputSchema = createBatchCreateInternalTransfersInputSchema(scales);\n }\n\n /**\n * Creates or returns an idempotent internal transfer from the resolved source account to a destination root account, subaccount, or smart-account address. The request carries asset id, a decimal quantity, and a stable idempotency key; the response includes request/transfer ids, the lifecycle `flowId`, resolved destination, and status. Rejections and failures, such as insufficient funds or a missing step-up, raise errors instead of returning a result.\n */\n async create(\n input: CreateInternalTransferInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateInternalTransferResult> {\n await this.#scales.ready();\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const validatedInput = parse(this.#inputSchema, resolvedInput);\n const res = await this.#client.createInternalTransfer(\n removeUndefined(validatedInput),\n toConnectCallOptions(options),\n );\n return parse(this.#resultSchema, res);\n }\n\n /**\n * Moves up to 500 transfers together under one idempotency key and one MFA check: every leg\n * is credited, or nothing moves. Every leg passes the same checks as `create` first; if one\n * fails, or a source cannot cover its legs, the batch is `\"refused\"`: nothing moves, no\n * step-up is used, the legs that caused it carry their `errorCode` and the rest are\n * `\"not_moved\"`. `\"accepted\"` means every leg is credited. A batch whose outcome is not known\n * within the request is `\"processing\"` and completes on its own: read it with `getBatch` by\n * its `requestId`, or retry with the same key and legs. Recent MFA covers the root owner\n * moving funds between its own accounts or to allowlisted destinations; any other leg needs\n * one fresh step-up for the whole batch.\n */\n async batchCreate(\n input: BatchCreateInternalTransfersInput,\n options?: PolyesterMutationOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n await this.#scales.ready();\n const legs = Array.isArray(input?.legs)\n ? input.legs.map((leg) => ({\n ...leg,\n account: resolveAccountScope(leg?.account, this.#resolver),\n }))\n : input?.legs;\n const request = parse(this.#batchInputSchema, { ...input, legs });\n const res = await this.#client.batchCreateInternalTransfers(\n request,\n toConnectCallOptions(options),\n );\n return parse(BatchCreateInternalTransfersResultSchema, res);\n }\n\n /**\n * Reads a batch's current status and every leg's state by the `requestId` `batchCreate`\n * returned, for example to follow a `\"processing\"` batch. The caller must be allowed to read\n * the transfers of every source account of the batch; any other batch is a\n * `ResourceNotFoundError`. Does not submit or retry the batch and needs no step-up.\n */\n async getBatch(\n input: GetInternalTransferBatchInput,\n options?: PolyesterRequestOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n const request = parse(GetInternalTransferBatchInputSchema, input);\n const res = await this.#client.getInternalTransferBatch(\n request,\n toConnectCallOptions(options),\n );\n return parse(BatchCreateInternalTransfersResultSchema, res);\n }\n\n /**\n * Reads an accepted transfer of the resolved source account by exactly one of `requestId` or\n * `transferId`, and returns both IDs, the lifecycle `flowId` and the acceptance time. Use it\n * to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.getAccountFlow`,\n * whose ledger settlement step carries the transfer ID. An unknown, pending or inaccessible\n * transfer is a `ResourceNotFoundError`, including briefly after a delegate is granted access.\n * Session JWT only; API keys are refused. Moves no money and needs no step-up.\n */\n async get(\n input: GetInternalTransferInput,\n options?: PolyesterRequestOptions,\n ): Promise<GetInternalTransferResult> {\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const request = parse(GetInternalTransferInputSchema, resolvedInput);\n const res = await this.#client.getInternalTransfer(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(GetInternalTransferResultSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;;;AAoCA,IAAa,2BAAb,MAAsC;CAClC;CACA;CACA;CACA;CACA;CACA;CAEA,YACI,YACA,UACA,QACF;EACE,KAAKA,UAAU,aAAaC,yBAA+B,WAAW,OAAO;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,eAAe,wCAAwC,MAAM;EAClE,KAAKC,gBAAgB,yCAAyC;EAC9D,KAAKC,oBAAoB,8CAA8C,MAAM;CACjF;;;;CAKA,MAAM,OACF,OACA,SACqC;EACrC,MAAM,KAAKH,QAAQ,MAAM;EACzB,MAAM,gBAAgB,0BAA0B,OAAO,KAAKD,SAAS;EACrE,MAAM,iBAAiB,MAAM,KAAKE,cAAc,aAAa;EAC7D,MAAM,MAAM,MAAM,KAAKJ,QAAQ,uBAC3B,gBAAgB,cAAc,GAC9B,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,KAAKK,eAAe,GAAG;CACxC;;;;;;;;;;;;CAaA,MAAM,YACF,OACA,SAC2C;EAC3C,MAAM,KAAKF,QAAQ,MAAM;EACzB,MAAM,OAAO,MAAM,QAAQ,OAAO,IAAI,IAChC,MAAM,KAAK,KAAK,SAAS;GACrB,GAAG;GACH,SAAS,oBAAoB,KAAK,SAAS,KAAKD,SAAS;EAC7D,EAAE,IACF,OAAO;EACb,MAAM,UAAU,MAAM,KAAKI,mBAAmB;GAAE,GAAG;GAAO;EAAK,CAAC;EAChE,MAAM,MAAM,MAAM,KAAKN,QAAQ,6BAC3B,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,0CAA0C,GAAG;CAC9D;;;;;;;CAQA,MAAM,SACF,OACA,SAC2C;EAC3C,MAAM,UAAU,MAAM,qCAAqC,KAAK;EAChE,MAAM,MAAM,MAAM,KAAKA,QAAQ,yBAC3B,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,0CAA0C,GAAG;CAC9D;;;;;;;;;CAUA,MAAM,IACF,OACA,SACkC;EAClC,MAAM,gBAAgB,0BAA0B,OAAO,KAAKE,SAAS;EACrE,MAAM,UAAU,MAAM,gCAAgC,aAAa;EACnE,MAAM,MAAM,MAAM,KAAKF,QAAQ,oBAC3B,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,GAAG;CACrD;AACJ"}
1
+ {"version":3,"file":"internal-transfers.js","names":["#client","Proto.InternalTransferService","#resolver","#scales","#inputSchema","#resultSchema","#batchInputSchema"],"sources":["../../../src/services/internal-transfers/internal-transfers.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/transfer/v1/internal_transfer_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport {\n type SubaccountResolver,\n resolveAccountScope,\n resolveAccountScopedInput,\n} from \"../subaccount-resolver.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n BatchCreateInternalTransfersResultSchema,\n createBatchCreateInternalTransfersInputSchema,\n type BatchCreateInternalTransfersInput,\n type BatchCreateInternalTransfersResult,\n createCreateInternalTransferInputSchema,\n createCreateInternalTransferResultSchema,\n type CreateInternalTransferInput,\n type CreateInternalTransferResult,\n GetInternalTransferBatchInputSchema,\n GetInternalTransferInputSchema,\n GetInternalTransferResultSchema,\n type GetInternalTransferBatchInput,\n type GetInternalTransferInput,\n type GetInternalTransferResult,\n} from \"./internal-transfers.schemas.js\";\n\n/**\n * Creates and reads authenticated Trading-to-Trading internal transfer requests.\n */\nexport class InternalTransfersService {\n #client: Client<typeof Proto.InternalTransferService>;\n #resolver?: SubaccountResolver;\n #scales: SdkScales;\n #inputSchema: ReturnType<typeof createCreateInternalTransferInputSchema>;\n #resultSchema: ReturnType<typeof createCreateInternalTransferResultSchema>;\n #batchInputSchema: ReturnType<typeof createBatchCreateInternalTransfersInputSchema>;\n\n constructor(\n transports: AuthApiTransports,\n resolver: SubaccountResolver | undefined,\n scales: SdkScales,\n ) {\n this.#client = createClient(Proto.InternalTransferService, transports.authApi);\n this.#resolver = resolver;\n this.#scales = scales;\n this.#inputSchema = createCreateInternalTransferInputSchema(scales);\n this.#resultSchema = createCreateInternalTransferResultSchema();\n this.#batchInputSchema = createBatchCreateInternalTransfersInputSchema(scales);\n }\n\n /**\n * Creates or returns an idempotent internal transfer from the resolved source account to a destination root account, subaccount, or smart-account address. The request carries asset id, a decimal quantity, and a stable idempotency key; the response includes request/transfer ids, the lifecycle `flowId`, resolved destination, and status. Rejections and failures, such as insufficient funds or a missing step-up, raise errors instead of returning a result.\n */\n async create(\n input: CreateInternalTransferInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateInternalTransferResult> {\n await this.#scales.ready();\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const validatedInput = parse(this.#inputSchema, resolvedInput);\n const res = await this.#client.createInternalTransfer(\n removeUndefined(validatedInput),\n toConnectCallOptions(options),\n );\n return parse(this.#resultSchema, res);\n }\n\n /**\n * Moves up to 500 transfers together under one idempotency key and one MFA check: every leg\n * is credited, or nothing moves. Every leg passes the same checks as `create` first; if one\n * fails, or a source cannot cover its legs, the batch is `\"refused\"`: nothing moves, no\n * step-up is used, the legs that caused it carry their `errorCode` and the rest are\n * `\"not_moved\"`. `\"accepted\"` means every leg is credited. A batch whose outcome is not known\n * within the request is `\"processing\"` and completes on its own: read it with `getBatch` by\n * its `requestId`, or retry with the same key and legs. An MFA-elevated session (an MFA\n * challenge completed in the last 30 minutes) covers the root owner moving funds between its\n * own accounts or to allowlisted destinations; any other leg needs one fresh step-up for the\n * whole batch.\n */\n async batchCreate(\n input: BatchCreateInternalTransfersInput,\n options?: PolyesterMutationOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n await this.#scales.ready();\n const legs = Array.isArray(input?.legs)\n ? input.legs.map((leg) => ({\n ...leg,\n account: resolveAccountScope(leg?.account, this.#resolver),\n }))\n : input?.legs;\n const request = parse(this.#batchInputSchema, { ...input, legs });\n const res = await this.#client.batchCreateInternalTransfers(\n request,\n toConnectCallOptions(options),\n );\n return parse(BatchCreateInternalTransfersResultSchema, res);\n }\n\n /**\n * Reads a batch's current status and every leg's state by the `requestId` `batchCreate`\n * returned, for example to follow a `\"processing\"` batch. The caller must be allowed to read\n * the transfers of every source account of the batch; any other batch is a\n * `ResourceNotFoundError`. Does not submit or retry the batch and needs no step-up.\n */\n async getBatch(\n input: GetInternalTransferBatchInput,\n options?: PolyesterRequestOptions,\n ): Promise<BatchCreateInternalTransfersResult> {\n const request = parse(GetInternalTransferBatchInputSchema, input);\n const res = await this.#client.getInternalTransferBatch(\n request,\n toConnectCallOptions(options),\n );\n return parse(BatchCreateInternalTransfersResultSchema, res);\n }\n\n /**\n * Reads an accepted transfer of the resolved source account by exactly one of `requestId` or\n * `transferId`, and returns both IDs, the lifecycle `flowId` and the acceptance time. Use it\n * to reconcile a transfer without resubmitting it; pass `flowId` to `lifecycle.getAccountFlow`,\n * whose ledger settlement step carries the transfer ID. An unknown, pending or inaccessible\n * transfer is a `ResourceNotFoundError`, including briefly after a delegate is granted access.\n * Session JWT only; API keys are refused. Moves no money and needs no step-up.\n */\n async get(\n input: GetInternalTransferInput,\n options?: PolyesterRequestOptions,\n ): Promise<GetInternalTransferResult> {\n const resolvedInput = resolveAccountScopedInput(input, this.#resolver);\n const request = parse(GetInternalTransferInputSchema, resolvedInput);\n const res = await this.#client.getInternalTransfer(\n removeUndefined(request),\n toConnectCallOptions(options),\n );\n return parse(GetInternalTransferResultSchema, res);\n }\n}\n"],"mappings":";;;;;;;;;;;AAoCA,IAAa,2BAAb,MAAsC;CAClC;CACA;CACA;CACA;CACA;CACA;CAEA,YACI,YACA,UACA,QACF;EACE,KAAKA,UAAU,aAAaC,yBAA+B,WAAW,OAAO;EAC7E,KAAKC,YAAY;EACjB,KAAKC,UAAU;EACf,KAAKC,eAAe,wCAAwC,MAAM;EAClE,KAAKC,gBAAgB,yCAAyC;EAC9D,KAAKC,oBAAoB,8CAA8C,MAAM;CACjF;;;;CAKA,MAAM,OACF,OACA,SACqC;EACrC,MAAM,KAAKH,QAAQ,MAAM;EACzB,MAAM,gBAAgB,0BAA0B,OAAO,KAAKD,SAAS;EACrE,MAAM,iBAAiB,MAAM,KAAKE,cAAc,aAAa;EAC7D,MAAM,MAAM,MAAM,KAAKJ,QAAQ,uBAC3B,gBAAgB,cAAc,GAC9B,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,KAAKK,eAAe,GAAG;CACxC;;;;;;;;;;;;;CAcA,MAAM,YACF,OACA,SAC2C;EAC3C,MAAM,KAAKF,QAAQ,MAAM;EACzB,MAAM,OAAO,MAAM,QAAQ,OAAO,IAAI,IAChC,MAAM,KAAK,KAAK,SAAS;GACrB,GAAG;GACH,SAAS,oBAAoB,KAAK,SAAS,KAAKD,SAAS;EAC7D,EAAE,IACF,OAAO;EACb,MAAM,UAAU,MAAM,KAAKI,mBAAmB;GAAE,GAAG;GAAO;EAAK,CAAC;EAChE,MAAM,MAAM,MAAM,KAAKN,QAAQ,6BAC3B,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,0CAA0C,GAAG;CAC9D;;;;;;;CAQA,MAAM,SACF,OACA,SAC2C;EAC3C,MAAM,UAAU,MAAM,qCAAqC,KAAK;EAChE,MAAM,MAAM,MAAM,KAAKA,QAAQ,yBAC3B,SACA,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,0CAA0C,GAAG;CAC9D;;;;;;;;;CAUA,MAAM,IACF,OACA,SACkC;EAClC,MAAM,gBAAgB,0BAA0B,OAAO,KAAKE,SAAS;EACrE,MAAM,UAAU,MAAM,gCAAgC,aAAa;EACnE,MAAM,MAAM,MAAM,KAAKF,QAAQ,oBAC3B,gBAAgB,OAAO,GACvB,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,iCAAiC,GAAG;CACrD;AACJ"}
@@ -349,7 +349,7 @@ declare const InternalTransferBatchLegResultSchema: v.SchemaWithPipe<readonly [v
349
349
  creditedAtNs: string | undefined;
350
350
  quantity: string | undefined;
351
351
  /** Why the leg caused its batch's refusal; unset for every other leg. */
352
- errorCode: "UNSPECIFIED" | "INSUFFICIENT_FUNDS" | "INVALID_REQUEST" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "RATE_LIMIT_EXCEEDED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "INVALID_SUBACCOUNT_ID" | "SUBACCOUNT_NOT_FOUND" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "FAILED_PRECONDITION" | "NOT_FOUND" | "CONFLICT" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | undefined;
352
+ errorCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "NOT_FOUND" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | undefined;
353
353
  legIndex: number;
354
354
  status: "unspecified" | "processing" | "credited" | "not_moved";
355
355
  transferId?: string | undefined;
@@ -370,7 +370,7 @@ declare const BatchCreateInternalTransfersResultSchema: v.ObjectSchema<{
370
370
  * it was accepted for processing.
371
371
  */
372
372
  readonly requestId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, string | undefined>]>;
373
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "refused" | "accepted">]>;
373
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "processing" | "accepted" | "refused">]>;
374
374
  /** One result per leg, in request order. */
375
375
  readonly legs: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
376
376
  readonly legIndex: v.NumberSchema<undefined>;
@@ -427,7 +427,7 @@ declare const BatchCreateInternalTransfersResultSchema: v.ObjectSchema<{
427
427
  creditedAtNs: string | undefined;
428
428
  quantity: string | undefined;
429
429
  /** Why the leg caused its batch's refusal; unset for every other leg. */
430
- errorCode: "UNSPECIFIED" | "INSUFFICIENT_FUNDS" | "INVALID_REQUEST" | "UNAUTHENTICATED" | "PERMISSION_DENIED" | "RATE_LIMIT_EXCEEDED" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "INVALID_SUBACCOUNT_ID" | "SUBACCOUNT_NOT_FOUND" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "FAILED_PRECONDITION" | "NOT_FOUND" | "CONFLICT" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | undefined;
430
+ errorCode: "UNSPECIFIED" | "UNAUTHENTICATED" | "RATE_LIMIT_EXCEEDED" | "CONFLICT" | "INVALID_REQUEST" | "SERVICE_UNAVAILABLE" | "INTERNAL_ERROR" | "PERMISSION_DENIED" | "FAILED_PRECONDITION" | "SUBACCOUNT_NOT_FOUND" | "INSUFFICIENT_FUNDS" | "INVALID_SUBACCOUNT_ID" | "SOURCE_ACCOUNT_INACTIVE" | "UNSUPPORTED_ASSET" | "INVALID_AMOUNT" | "INVALID_DESTINATION" | "DESTINATION_NOT_FOUND" | "DESTINATION_INACTIVE" | "SAME_SOURCE_DESTINATION" | "DESTINATION_NOT_WHITELISTED" | "SMART_ACCOUNT_UNAVAILABLE" | "STEP_UP_UNAVAILABLE" | "IDEMPOTENCY_CONFLICT" | "FUNDS_LOCK_CONFLICT" | "CAPITAL_VIEW_UNAVAILABLE" | "ACCOUNT_SHARD_UNAVAILABLE" | "POLICY_DENIED" | "NOT_FOUND" | "DUST_QUOTE_EXPIRED" | "DUST_PRICE_MOVED" | "DUST_NOT_ELIGIBLE" | "DUST_WINDOW_ACTIVE" | "DUST_DAILY_LIMIT" | "DUST_BUSY" | "DUST_TARGET_UNAVAILABLE" | "DUST_BALANCE_CHANGED" | "DUST_CONVERSION_FAILED" | "BATCH_TOO_MANY_SOURCES" | undefined;
431
431
  legIndex: number;
432
432
  status: "unspecified" | "processing" | "credited" | "not_moved";
433
433
  transferId?: string | undefined;
@@ -1,7 +1,7 @@
1
+ import { FlowDetailViewSchema, FlowSummaryViewSchema, GetFlowByIdRequestSchema, LifecycleReadService } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
4
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
4
- import { FlowDetailViewSchema, FlowSummaryViewSchema, GetFlowByIdRequestSchema, LifecycleReadService } from "../../gen/chain/lifecycle/v1/lifecycle_read_pb.js";
5
5
  import { isDev } from "../../utils/is-dev.js";
6
6
  import { GetLifecycleAccountFlowInputSchema, GetLifecycleFlowInputSchema, GetLifecycleFlowOutputSchema, LifecycleFlowDetailSchema, LifecycleFlowSummarySchema, ListLifecycleAccountFlowsInputSchema, ListLifecycleFlowsByTxInputSchema, ListLifecycleFlowsByTxOutputSchema, ListLifecycleFlowsInputSchema, ListLifecycleFlowsOutputSchema } from "./lifecycle.schemas.js";
7
7
  import { create } from "@bufbuild/protobuf";