@polyester/sdk 0.35.0-devnet-20261111031027 → 0.35.0-devnet-20261111161451

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 (271) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/dist/catalogs/snapshot-validation.js +2 -1
  3. package/dist/catalogs/snapshot-validation.js.map +1 -1
  4. package/dist/client.d.ts +6 -0
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +6 -0
  7. package/dist/client.js.map +1 -1
  8. package/dist/gen/ai/v1/assistant_pb.d.ts +4164 -0
  9. package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -0
  10. package/dist/gen/ai/v1/assistant_pb.js +1174 -0
  11. package/dist/gen/ai/v1/assistant_pb.js.map +1 -0
  12. package/dist/gen/alerts/v1/price_alerts_pb.d.ts +776 -0
  13. package/dist/gen/alerts/v1/price_alerts_pb.d.ts.map +1 -0
  14. package/dist/gen/alerts/v1/price_alerts_pb.js +378 -0
  15. package/dist/gen/alerts/v1/price_alerts_pb.js.map +1 -0
  16. package/dist/gen/auth/v1/address_book_pb.d.ts +6 -0
  17. package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
  18. package/dist/gen/auth/v1/address_book_pb.js +6 -0
  19. package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
  20. package/dist/gen/auth/v1/api_keys_pb.d.ts +242 -2
  21. package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
  22. package/dist/gen/auth/v1/api_keys_pb.js +81 -2
  23. package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
  24. package/dist/gen/auth/v1/auth_pb.d.ts +48 -6
  25. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  26. package/dist/gen/auth/v1/auth_pb.js +48 -6
  27. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  28. package/dist/gen/auth/v1/policies_pb.d.ts +83 -19
  29. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  30. package/dist/gen/auth/v1/policies_pb.js +74 -16
  31. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  32. package/dist/gen/auth/v1/social_verification_pb.d.ts +167 -11
  33. package/dist/gen/auth/v1/social_verification_pb.d.ts.map +1 -1
  34. package/dist/gen/auth/v1/social_verification_pb.js +41 -3
  35. package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
  36. package/dist/gen/auth/v1/subaccounts_pb.d.ts +17 -6
  37. package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
  38. package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
  39. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +4 -2
  40. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts.map +1 -1
  41. package/dist/gen/chain/deposit/v1/deposit_pb.js.map +1 -1
  42. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +5 -0
  43. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts.map +1 -1
  44. package/dist/gen/chain/guard/v1/guard_signer_pb.js.map +1 -1
  45. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +10 -0
  46. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
  47. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +1 -1
  48. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
  49. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +32 -4
  50. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts.map +1 -1
  51. package/dist/gen/chain/lifecycle/v1/types_pb.js +32 -4
  52. package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
  53. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +391 -42
  54. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts.map +1 -1
  55. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js +103 -17
  56. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js.map +1 -1
  57. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +170 -3
  58. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
  59. package/dist/gen/chain/withdraw/v1/withdraw_pb.js +63 -2
  60. package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
  61. package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
  62. package/dist/gen/claims/v1/claims_pb.js +1 -1
  63. package/dist/gen/claims/v1/claims_pb.js.map +1 -1
  64. package/dist/gen/index.d.ts +14 -10
  65. package/dist/gen/index.js +11 -7
  66. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +1 -1
  67. package/dist/gen/ledger/v1/catalog_pb.d.ts +9 -1
  68. package/dist/gen/ledger/v1/catalog_pb.d.ts.map +1 -1
  69. package/dist/gen/ledger/v1/catalog_pb.js +9 -1
  70. package/dist/gen/ledger/v1/catalog_pb.js.map +1 -1
  71. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +8 -0
  72. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  73. package/dist/gen/marketdata/v1/marketdata_pb.js +1 -1
  74. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  75. package/dist/gen/orders/v1/orders_pb.d.ts +4 -4
  76. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  77. package/dist/gen/orders/v1/orders_read_pb.d.ts +1 -1
  78. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +20 -1
  79. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts.map +1 -1
  80. package/dist/gen/polyester/ratelimit/v1/types_pb.js +20 -1
  81. package/dist/gen/polyester/ratelimit/v1/types_pb.js.map +1 -1
  82. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1186 -127
  83. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
  84. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +282 -5
  85. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
  86. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +253 -38
  87. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  88. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +180 -36
  89. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  90. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +933 -0
  91. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts.map +1 -0
  92. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js +292 -0
  93. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -0
  94. package/dist/gen/system/v1/system_pb.d.ts +77 -0
  95. package/dist/gen/system/v1/system_pb.d.ts.map +1 -0
  96. package/dist/gen/system/v1/system_pb.js +34 -0
  97. package/dist/gen/system/v1/system_pb.js.map +1 -0
  98. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +2 -2
  99. package/dist/gen/tradews/v1/trade_ws_pb.js.map +1 -1
  100. package/dist/index.d.ts +14 -6
  101. package/dist/services/api-keys/api-keys.codecs.js +10 -1
  102. package/dist/services/api-keys/api-keys.codecs.js.map +1 -1
  103. package/dist/services/api-keys/api-keys.d.ts +16 -1
  104. package/dist/services/api-keys/api-keys.d.ts.map +1 -1
  105. package/dist/services/api-keys/api-keys.js +25 -1
  106. package/dist/services/api-keys/api-keys.js.map +1 -1
  107. package/dist/services/api-keys/api-keys.schemas.d.ts +116 -1
  108. package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
  109. package/dist/services/api-keys/api-keys.schemas.js +29 -3
  110. package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
  111. package/dist/services/api-keys/api-keys.types.d.ts +2 -2
  112. package/dist/services/api-keys/index.d.ts +2 -2
  113. package/dist/services/assistant/assistant-events.schemas.d.ts +4618 -0
  114. package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -0
  115. package/dist/services/assistant/assistant-events.schemas.js +485 -0
  116. package/dist/services/assistant/assistant-events.schemas.js.map +1 -0
  117. package/dist/services/assistant/assistant.codecs.d.ts +24 -0
  118. package/dist/services/assistant/assistant.codecs.d.ts.map +1 -0
  119. package/dist/services/assistant/assistant.codecs.js +88 -0
  120. package/dist/services/assistant/assistant.codecs.js.map +1 -0
  121. package/dist/services/assistant/assistant.d.ts +76 -0
  122. package/dist/services/assistant/assistant.d.ts.map +1 -0
  123. package/dist/services/assistant/assistant.js +133 -0
  124. package/dist/services/assistant/assistant.js.map +1 -0
  125. package/dist/services/assistant/assistant.schemas.d.ts +184 -0
  126. package/dist/services/assistant/assistant.schemas.d.ts.map +1 -0
  127. package/dist/services/assistant/assistant.schemas.js +135 -0
  128. package/dist/services/assistant/assistant.schemas.js.map +1 -0
  129. package/dist/services/assistant/assistant.types.d.ts +4 -0
  130. package/dist/services/assistant/service.d.ts +8 -0
  131. package/dist/services/assistant/service.d.ts.map +1 -0
  132. package/dist/services/assistant/service.js +9 -0
  133. package/dist/services/assistant/service.js.map +1 -0
  134. package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts +9 -2
  135. package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts.map +1 -1
  136. package/dist/services/auto-withdraw/auto-withdraw.codecs.js +9 -1
  137. package/dist/services/auto-withdraw/auto-withdraw.codecs.js.map +1 -1
  138. package/dist/services/auto-withdraw/auto-withdraw.d.ts +15 -4
  139. package/dist/services/auto-withdraw/auto-withdraw.d.ts.map +1 -1
  140. package/dist/services/auto-withdraw/auto-withdraw.js +24 -8
  141. package/dist/services/auto-withdraw/auto-withdraw.js.map +1 -1
  142. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +394 -26
  143. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts.map +1 -1
  144. package/dist/services/auto-withdraw/auto-withdraw.schemas.js +67 -12
  145. package/dist/services/auto-withdraw/auto-withdraw.schemas.js.map +1 -1
  146. package/dist/services/auto-withdraw/auto-withdraw.types.d.ts +3 -3
  147. package/dist/services/balances/balances.js +1 -1
  148. package/dist/services/balances/balances.schemas.d.ts +3 -3
  149. package/dist/services/candles/candles.js +1 -1
  150. package/dist/services/candles/candles.schemas.d.ts +10 -10
  151. package/dist/services/candles/candles.schemas.js +5 -2
  152. package/dist/services/candles/candles.schemas.js.map +1 -1
  153. package/dist/services/changelog/changelog.schemas.d.ts +17 -17
  154. package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
  155. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  156. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +3 -3
  157. package/dist/services/lifecycle/lifecycle.codecs.d.ts +2 -2
  158. package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
  159. package/dist/services/lifecycle/lifecycle.codecs.js +3 -1
  160. package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
  161. package/dist/services/lifecycle/lifecycle.schemas.d.ts +210 -186
  162. package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
  163. package/dist/services/lifecycle/lifecycle.schemas.js +7 -1
  164. package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
  165. package/dist/services/market-data/market-data.js +1 -1
  166. package/dist/services/market-data/market-data.schemas.js +7 -2
  167. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  168. package/dist/services/market-overview/market-overview.schemas.d.ts +1 -1
  169. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  170. package/dist/services/orders/order-errors.schemas.d.ts +2 -2
  171. package/dist/services/orders/orders-batch.schemas.d.ts +54 -54
  172. package/dist/services/orders/orders-input.schemas.d.ts +6 -6
  173. package/dist/services/orders/orders-input.schemas.js +1 -1
  174. package/dist/services/orders/orders-modify.schemas.js +1 -1
  175. package/dist/services/orders/orders-output.schemas.d.ts +16 -16
  176. package/dist/services/orders/orders-output.schemas.js +3 -3
  177. package/dist/services/orders/orders-risk.schemas.js +1 -1
  178. package/dist/services/orders/orders.codecs.js +1 -1
  179. package/dist/services/orders/orders.js +3 -3
  180. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  181. package/dist/services/policies/shared.codecs.js +24 -3
  182. package/dist/services/policies/shared.codecs.js.map +1 -1
  183. package/dist/services/policies/shared.d.ts +1 -1
  184. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
  185. package/dist/services/price-alerts/price-alerts.codecs.d.ts +20 -0
  186. package/dist/services/price-alerts/price-alerts.codecs.d.ts.map +1 -0
  187. package/dist/services/price-alerts/price-alerts.codecs.js +66 -0
  188. package/dist/services/price-alerts/price-alerts.codecs.js.map +1 -0
  189. package/dist/services/price-alerts/price-alerts.d.ts +38 -0
  190. package/dist/services/price-alerts/price-alerts.d.ts.map +1 -0
  191. package/dist/services/price-alerts/price-alerts.js +60 -0
  192. package/dist/services/price-alerts/price-alerts.js.map +1 -0
  193. package/dist/services/price-alerts/price-alerts.schemas.d.ts +309 -0
  194. package/dist/services/price-alerts/price-alerts.schemas.d.ts.map +1 -0
  195. package/dist/services/price-alerts/price-alerts.schemas.js +130 -0
  196. package/dist/services/price-alerts/price-alerts.schemas.js.map +1 -0
  197. package/dist/services/price-alerts/price-alerts.types.d.ts +3 -0
  198. package/dist/services/price-alerts/service.d.ts +8 -0
  199. package/dist/services/price-alerts/service.d.ts.map +1 -0
  200. package/dist/services/price-alerts/service.js +9 -0
  201. package/dist/services/price-alerts/service.js.map +1 -0
  202. package/dist/services/social-verification/social-verification.codecs.js +13 -5
  203. package/dist/services/social-verification/social-verification.codecs.js.map +1 -1
  204. package/dist/services/social-verification/social-verification.d.ts +18 -3
  205. package/dist/services/social-verification/social-verification.d.ts.map +1 -1
  206. package/dist/services/social-verification/social-verification.js +26 -3
  207. package/dist/services/social-verification/social-verification.js.map +1 -1
  208. package/dist/services/social-verification/social-verification.schemas.d.ts +33 -7
  209. package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
  210. package/dist/services/social-verification/social-verification.schemas.js +35 -10
  211. package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
  212. package/dist/services/social-verification/social-verification.types.d.ts +2 -2
  213. package/dist/services/subaccounts/subaccounts.schemas.d.ts +8 -8
  214. package/dist/services/system/service.d.ts +8 -0
  215. package/dist/services/system/service.d.ts.map +1 -0
  216. package/dist/services/system/service.js +9 -0
  217. package/dist/services/system/service.js.map +1 -0
  218. package/dist/services/system/system.d.ts +25 -0
  219. package/dist/services/system/system.d.ts.map +1 -0
  220. package/dist/services/system/system.js +24 -0
  221. package/dist/services/system/system.js.map +1 -0
  222. package/dist/services/trades/trades.js +1 -1
  223. package/dist/services/trades/trades.schemas.d.ts +1 -1
  224. package/dist/services/trades/trades.schemas.js +1 -1
  225. package/dist/services/trading-withdraws/trading-withdraws.d.ts +7 -1
  226. package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
  227. package/dist/services/trading-withdraws/trading-withdraws.js +11 -1
  228. package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
  229. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +42 -1
  230. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
  231. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +19 -3
  232. package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
  233. package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +2 -2
  234. package/dist/services/transfers/transfers.schemas.d.ts +5 -5
  235. package/dist/services/triggers/trigger-child-order.schemas.js +1 -1
  236. package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
  237. package/dist/services/triggers/trigger-input.schemas.js +1 -1
  238. package/dist/services/triggers/triggers-output.schemas.d.ts +49 -49
  239. package/dist/services/triggers/triggers.codecs.js +1 -1
  240. package/dist/services/triggers/triggers.js +2 -2
  241. package/dist/shared/catalog-config.d.ts +5 -0
  242. package/dist/shared/catalog-config.d.ts.map +1 -1
  243. package/dist/shared/catalog-config.js.map +1 -1
  244. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  245. package/dist/shared/connect-error-mapping.js +1 -0
  246. package/dist/shared/connect-error-mapping.js.map +1 -1
  247. package/dist/shared/error-detail.d.ts +24 -10
  248. package/dist/shared/error-detail.d.ts.map +1 -1
  249. package/dist/shared/error-detail.js +2 -0
  250. package/dist/shared/error-detail.js.map +1 -1
  251. package/dist/shared/error-details/alerts.js +15 -0
  252. package/dist/shared/error-details/alerts.js.map +1 -0
  253. package/dist/shared/error-details/assistant.js +15 -0
  254. package/dist/shared/error-details/assistant.js.map +1 -0
  255. package/dist/shared/error-details/withdraw.js +11 -2
  256. package/dist/shared/error-details/withdraw.js.map +1 -1
  257. package/dist/shared/ledger-codes.d.ts +4 -2
  258. package/dist/shared/ledger-codes.d.ts.map +1 -1
  259. package/dist/shared/ledger-codes.js +6 -3
  260. package/dist/shared/ledger-codes.js.map +1 -1
  261. package/dist/shared/rate-limit.schemas.d.ts +3 -3
  262. package/dist/shared/rate-limit.schemas.d.ts.map +1 -1
  263. package/dist/shared/rate-limit.schemas.js +4 -1
  264. package/dist/shared/rate-limit.schemas.js.map +1 -1
  265. package/dist/shared/transports.d.ts +2 -1
  266. package/dist/shared/transports.d.ts.map +1 -1
  267. package/dist/shared/transports.js.map +1 -1
  268. package/dist/wired-services.d.ts.map +1 -1
  269. package/dist/wired-services.js +11 -5
  270. package/dist/wired-services.js.map +1 -1
  271. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"trade_ws_pb.js","names":[],"sources":["../../../../src/gen/tradews/v1/trade_ws_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file tradews/v1/trade_ws.proto (package tradews.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { BatchCancelOrdersRequest, BatchCancelOrdersResponse, BatchCreateOrdersRequest, BatchCreateOrdersResponse, BatchReplaceOrdersRequest, BatchReplaceOrdersResponse, CancelAllAfterRequest, CancelAllAfterResponse, CancelAllOrdersRequest, CancelAllOrdersResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, ErrorDetail, ModifyOrderRequest, ModifyOrderResponse } from \"../../orders/v1/orders_pb.js\";\nimport { file_orders_v1_orders } from \"../../orders/v1/orders_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file tradews/v1/trade_ws.proto.\n */\nexport const file_tradews_v1_trade_ws: GenFile = /*@__PURE__*/\n fileDesc(\"Chl0cmFkZXdzL3YxL3RyYWRlX3dzLnByb3RvEgp0cmFkZXdzLnYxIoUFCgtDbGllbnRGcmFtZRILCgNzZXEYASABKAQSFgoOY29ycmVsYXRpb25faWQYAiABKAkSFAoMdGltZXN0YW1wX21zGAMgASgDEhYKDnJlY3Zfd2luZG93X21zGAQgASgNEicKBHBpbmcYCiABKAsyFy50cmFkZXdzLnYxLlBpbmdSZXF1ZXN0SAASNQoMY3JlYXRlX29yZGVyGAsgASgLMh0ub3JkZXJzLnYxLkNyZWF0ZU9yZGVyUmVxdWVzdEgAEjUKDGNhbmNlbF9vcmRlchgMIAEoCzIdLm9yZGVycy52MS5DYW5jZWxPcmRlclJlcXVlc3RIABI1Cgxtb2RpZnlfb3JkZXIYDSABKAsyHS5vcmRlcnMudjEuTW9kaWZ5T3JkZXJSZXF1ZXN0SAASPgoRY2FuY2VsX2FsbF9vcmRlcnMYDiABKAsyIS5vcmRlcnMudjEuQ2FuY2VsQWxsT3JkZXJzUmVxdWVzdEgAEkIKE2JhdGNoX2NyZWF0ZV9vcmRlcnMYDyABKAsyIy5vcmRlcnMudjEuQmF0Y2hDcmVhdGVPcmRlcnNSZXF1ZXN0SAASRAoUYmF0Y2hfcmVwbGFjZV9vcmRlcnMYECABKAsyJC5vcmRlcnMudjEuQmF0Y2hSZXBsYWNlT3JkZXJzUmVxdWVzdEgAEkIKE2JhdGNoX2NhbmNlbF9vcmRlcnMYESABKAsyIy5vcmRlcnMudjEuQmF0Y2hDYW5jZWxPcmRlcnNSZXF1ZXN0SAASPAoQY2FuY2VsX2FsbF9hZnRlchgSIAEoCzIgLm9yZGVycy52MS5DYW5jZWxBbGxBZnRlclJlcXVlc3RIAEIJCgdwYXlsb2FkIh4KC1BpbmdSZXF1ZXN0Eg8KB3BheWxvYWQYASABKAwipAIKC1NlcnZlckZyYW1lEgsKA3NlcRgBIAEoBBIWCg5jb3JyZWxhdGlvbl9pZBgCIAEoCRIoCgRwb25nGAogASgLMhgudHJhZGV3cy52MS5Qb25nUmVzcG9uc2VIABImCgNhY2sYCyABKAsyFy50cmFkZXdzLnYxLkFja1Jlc3BvbnNlSAASKwoGcmVqZWN0GAwgASgLMhkudHJhZGV3cy52MS5Db21tYW5kUmVqZWN0SAASMAoIb3ZlcmxvYWQYDSABKAsyHC50cmFkZXdzLnYxLk92ZXJsb2FkUmVzcG9uc2VIABI0Cgh0ZXJtaW5hbBgOIAEoCzIgLnRyYWRld3MudjEuVGVybWluYWxTZXNzaW9uRXZlbnRIAEIJCgdwYXlsb2FkIh8KDFBvbmdSZXNwb25zZRIPCgdwYXlsb2FkGAEgASgMIpAECgtBY2tSZXNwb25zZRI2CgxjcmVhdGVfb3JkZXIYASABKAsyHi5vcmRlcnMudjEuQ3JlYXRlT3JkZXJSZXNwb25zZUgAEjYKDGNhbmNlbF9vcmRlchgCIAEoCzIeLm9yZGVycy52MS5DYW5jZWxPcmRlclJlc3BvbnNlSAASNgoMbW9kaWZ5X29yZGVyGAMgASgLMh4ub3JkZXJzLnYxLk1vZGlmeU9yZGVyUmVzcG9uc2VIABI/ChFjYW5jZWxfYWxsX29yZGVycxgEIAEoCzIiLm9yZGVycy52MS5DYW5jZWxBbGxPcmRlcnNSZXNwb25zZUgAEkMKE2JhdGNoX2NyZWF0ZV9vcmRlcnMYBSABKAsyJC5vcmRlcnMudjEuQmF0Y2hDcmVhdGVPcmRlcnNSZXNwb25zZUgAEkUKFGJhdGNoX3JlcGxhY2Vfb3JkZXJzGAYgASgLMiUub3JkZXJzLnYxLkJhdGNoUmVwbGFjZU9yZGVyc1Jlc3BvbnNlSAASQwoTYmF0Y2hfY2FuY2VsX29yZGVycxgHIAEoCzIkLm9yZGVycy52MS5CYXRjaENhbmNlbE9yZGVyc1Jlc3BvbnNlSAASPQoQY2FuY2VsX2FsbF9hZnRlchgIIAEoCzIhLm9yZGVycy52MS5DYW5jZWxBbGxBZnRlclJlc3BvbnNlSABCCAoGcmVzdWx0IlQKDUNvbW1hbmRSZWplY3QSDAoEY29kZRgBIAEoCRIOCgZkZXRhaWwYAiABKAkSJQoFZXJyb3IYAyABKAsyFi5vcmRlcnMudjEuRXJyb3JEZXRhaWwiMAoQT3ZlcmxvYWRSZXNwb25zZRIMCgRjb2RlGAEgASgJEg4KBmRldGFpbBgCIAEoCSI0ChRUZXJtaW5hbFNlc3Npb25FdmVudBIMCgRjb2RlGAEgASgJEg4KBmRldGFpbBgCIAEoCUJCWkBnaXRodWIuY29tL0ZhYnJpYy1MYWJzL3BvbHllc3Rlci1zZGstZ28vZ2VuL3RyYWRld3MvdjE7dHJhZGV3c3YxYgZwcm90bzM=\", [file_orders_v1_orders]);\n\n/**\n * ClientFrame is the protobuf write-websocket envelope. Its payloads reuse the\n * public Orders API request contracts so every transport shares one order model.\n *\n * @generated from message tradews.v1.ClientFrame\n */\nexport type ClientFrame = Message<\"tradews.v1.ClientFrame\"> & {\n /**\n * Monotonic per-connection client sequence number, starting at 1.\n *\n * @generated from field: uint64 seq = 1;\n */\n seq: bigint;\n\n /**\n * Client correlation token echoed in every server response.\n *\n * @generated from field: string correlation_id = 2;\n */\n correlationId: string;\n\n /**\n * Optional client time the command was sent, in milliseconds since the Unix\n * epoch. When set, the command is processed only until timestamp_ms plus\n * recv_window_ms: a command that arrives, or waits to be sent on for\n * admission, past then is rejected with REQUEST_DEADLINE_EXCEEDED and\n * changes nothing, but it has taken its seq, so the next command uses the\n * next seq. A timestamp more than 10 seconds ahead of the server clock is\n * rejected with BAD_REQUEST, without taking the seq. Zero sets no\n * deadline. Ping ignores it.\n *\n * @generated from field: int64 timestamp_ms = 3;\n */\n timestampMs: bigint;\n\n /**\n * Optional receive window in milliseconds, from 1 to 60000, applied to\n * timestamp_ms. Zero uses 10000. Setting it without timestamp_ms is\n * rejected with BAD_REQUEST.\n *\n * @generated from field: uint32 recv_window_ms = 4;\n */\n recvWindowMs: number;\n\n /**\n * @generated from oneof tradews.v1.ClientFrame.payload\n */\n payload: {\n /**\n * Liveness request that does not submit an order command.\n *\n * @generated from field: tradews.v1.PingRequest ping = 10;\n */\n value: PingRequest;\n case: \"ping\";\n } | {\n /**\n * Create-order command using the public Orders API request contract,\n * including its required base-quantity or maximum-quote-debit sizing choice.\n *\n * @generated from field: orders.v1.CreateOrderRequest create_order = 11;\n */\n value: CreateOrderRequest;\n case: \"createOrder\";\n } | {\n /**\n * Cancel-order command using the public Orders API request contract.\n *\n * @generated from field: orders.v1.CancelOrderRequest cancel_order = 12;\n */\n value: CancelOrderRequest;\n case: \"cancelOrder\";\n } | {\n /**\n * Modify-order command using the public Orders API request contract.\n *\n * @generated from field: orders.v1.ModifyOrderRequest modify_order = 13;\n */\n value: ModifyOrderRequest;\n case: \"modifyOrder\";\n } | {\n /**\n * Cancel-all command using the public Orders API request contract.\n *\n * @generated from field: orders.v1.CancelAllOrdersRequest cancel_all_orders = 14;\n */\n value: CancelAllOrdersRequest;\n case: \"cancelAllOrders\";\n } | {\n /**\n * Batch create command using the public Orders API request contract: up\n * to 20 orders, each admitted or rejected on its own. request_id is the\n * same account-scoped idempotency key as the Orders API's: resending the\n * same request_id and items, over this WebSocket or the Orders API,\n * replays the original per-item results instead of creating orders again.\n *\n * @generated from field: orders.v1.BatchCreateOrdersRequest batch_create_orders = 15;\n */\n value: BatchCreateOrdersRequest;\n case: \"batchCreateOrders\";\n } | {\n /**\n * Batch replace command using the public Orders API request contract: up\n * to 50 orders on one trading pair, each amended in place or replaced as\n * the Orders API decides, under the same request_id idempotency as the\n * Orders API.\n *\n * @generated from field: orders.v1.BatchReplaceOrdersRequest batch_replace_orders = 16;\n */\n value: BatchReplaceOrdersRequest;\n case: \"batchReplaceOrders\";\n } | {\n /**\n * Batch cancel command using the public Orders API request contract: up\n * to 50 cancellations, each accepted or rejected on its own, under the\n * same request_id idempotency as the Orders API.\n *\n * @generated from field: orders.v1.BatchCancelOrdersRequest batch_cancel_orders = 17;\n */\n value: BatchCancelOrdersRequest;\n case: \"batchCancelOrders\";\n } | {\n /**\n * Cancel-all-after command using the public Orders API request\n * contract: arms, refreshes or disarms the account's dead-man switch,\n * the same switch as the Orders API's CancelAllAfter, with the same\n * symbol and side scope and the same timeout rule (0 disarms; 10 to 120\n * seconds arms or refreshes). On expiry it cancels the account's open\n * orders in scope, including orders that triggers placed, and no\n * trigger. The switch belongs to the account, not to this connection:\n * closing the connection neither disarms nor fires it. Refresh it well\n * within the timeout, for example every 15 to 30 seconds with a\n * 60-second timeout. Resending a request is safe: an arm restarts the\n * timer from when it applies, and a disarm is idempotent. request_id is\n * required, as on the Orders API; subaccount_id must be omitted.\n *\n * @generated from field: orders.v1.CancelAllAfterRequest cancel_all_after = 18;\n */\n value: CancelAllAfterRequest;\n case: \"cancelAllAfter\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message tradews.v1.ClientFrame.\n * Use `create(ClientFrameSchema)` to create a new message.\n */\nexport const ClientFrameSchema: GenMessage<ClientFrame> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 0);\n\n/**\n * PingRequest carries an opaque payload that is echoed by PongResponse.\n *\n * @generated from message tradews.v1.PingRequest\n */\nexport type PingRequest = Message<\"tradews.v1.PingRequest\"> & {\n /**\n * Opaque client payload echoed by the server.\n *\n * @generated from field: bytes payload = 1;\n */\n payload: Uint8Array;\n};\n\n/**\n * Describes the message tradews.v1.PingRequest.\n * Use `create(PingRequestSchema)` to create a new message.\n */\nexport const PingRequestSchema: GenMessage<PingRequest> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 1);\n\n/**\n * ServerFrame is the protobuf write-websocket response envelope.\n *\n * @generated from message tradews.v1.ServerFrame\n */\nexport type ServerFrame = Message<\"tradews.v1.ServerFrame\"> & {\n /**\n * Client sequence number copied from the accepted or rejected frame.\n *\n * @generated from field: uint64 seq = 1;\n */\n seq: bigint;\n\n /**\n * Client correlation token copied from the accepted or rejected frame.\n *\n * @generated from field: string correlation_id = 2;\n */\n correlationId: string;\n\n /**\n * @generated from oneof tradews.v1.ServerFrame.payload\n */\n payload: {\n /**\n * Liveness response for PingRequest.\n *\n * @generated from field: tradews.v1.PongResponse pong = 10;\n */\n value: PongResponse;\n case: \"pong\";\n } | {\n /**\n * Successful command acknowledgement. A batch acknowledgement carries\n * each item's own result, accepted or rejected.\n *\n * @generated from field: tradews.v1.AckResponse ack = 11;\n */\n value: AckResponse;\n case: \"ack\";\n } | {\n /**\n * Command-level reject with a stable machine-readable code. A batch\n * rejected as busy (ENGINE_BUSY or UNAVAILABLE), or one whose\n * acknowledgement never arrived, may have taken effect for some items:\n * resend it with the same request_id and items to resolve or replay it,\n * and do not assume it placed or canceled no orders.\n *\n * @generated from field: tradews.v1.CommandReject reject = 12;\n */\n value: CommandReject;\n case: \"reject\";\n } | {\n /**\n * Server overload response when the session cannot admit more work.\n *\n * @generated from field: tradews.v1.OverloadResponse overload = 13;\n */\n value: OverloadResponse;\n case: \"overload\";\n } | {\n /**\n * Terminal session-level response after which the server closes the stream.\n *\n * @generated from field: tradews.v1.TerminalSessionEvent terminal = 14;\n */\n value: TerminalSessionEvent;\n case: \"terminal\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message tradews.v1.ServerFrame.\n * Use `create(ServerFrameSchema)` to create a new message.\n */\nexport const ServerFrameSchema: GenMessage<ServerFrame> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 2);\n\n/**\n * PongResponse echoes a PingRequest payload.\n *\n * @generated from message tradews.v1.PongResponse\n */\nexport type PongResponse = Message<\"tradews.v1.PongResponse\"> & {\n /**\n * Opaque payload copied from PingRequest.\n *\n * @generated from field: bytes payload = 1;\n */\n payload: Uint8Array;\n};\n\n/**\n * Describes the message tradews.v1.PongResponse.\n * Use `create(PongResponseSchema)` to create a new message.\n */\nexport const PongResponseSchema: GenMessage<PongResponse> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 3);\n\n/**\n * AckResponse carries the command-specific public Orders API acknowledgement.\n *\n * @generated from message tradews.v1.AckResponse\n */\nexport type AckResponse = Message<\"tradews.v1.AckResponse\"> & {\n /**\n * @generated from oneof tradews.v1.AckResponse.result\n */\n result: {\n /**\n * Accepted create-order response.\n *\n * @generated from field: orders.v1.CreateOrderResponse create_order = 1;\n */\n value: CreateOrderResponse;\n case: \"createOrder\";\n } | {\n /**\n * Accepted cancel-order response.\n *\n * @generated from field: orders.v1.CancelOrderResponse cancel_order = 2;\n */\n value: CancelOrderResponse;\n case: \"cancelOrder\";\n } | {\n /**\n * Accepted modify-order response.\n *\n * @generated from field: orders.v1.ModifyOrderResponse modify_order = 3;\n */\n value: ModifyOrderResponse;\n case: \"modifyOrder\";\n } | {\n /**\n * Accepted cancel-all response.\n *\n * @generated from field: orders.v1.CancelAllOrdersResponse cancel_all_orders = 4;\n */\n value: CancelAllOrdersResponse;\n case: \"cancelAllOrders\";\n } | {\n /**\n * Batch create response with one result per requested order, in request\n * order. A rejected item carries its typed error; the others still count.\n *\n * @generated from field: orders.v1.BatchCreateOrdersResponse batch_create_orders = 5;\n */\n value: BatchCreateOrdersResponse;\n case: \"batchCreateOrders\";\n } | {\n /**\n * Batch replace admission receipt with one result per requested\n * replacement, in request order.\n *\n * @generated from field: orders.v1.BatchReplaceOrdersResponse batch_replace_orders = 6;\n */\n value: BatchReplaceOrdersResponse;\n case: \"batchReplaceOrders\";\n } | {\n /**\n * Batch cancel response with one result per requested cancellation, in\n * request order.\n *\n * @generated from field: orders.v1.BatchCancelOrdersResponse batch_cancel_orders = 7;\n */\n value: BatchCancelOrdersResponse;\n case: \"batchCancelOrders\";\n } | {\n /**\n * Cancel-all-after response: the account's dead-man switch after the\n * request applied, its deadline and its recorded scope.\n *\n * @generated from field: orders.v1.CancelAllAfterResponse cancel_all_after = 8;\n */\n value: CancelAllAfterResponse;\n case: \"cancelAllAfter\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message tradews.v1.AckResponse.\n * Use `create(AckResponseSchema)` to create a new message.\n */\nexport const AckResponseSchema: GenMessage<AckResponse> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 4);\n\n/**\n * CommandReject reports a command-level failure without closing the session.\n *\n * @generated from message tradews.v1.CommandReject\n */\nexport type CommandReject = Message<\"tradews.v1.CommandReject\"> & {\n /**\n * Stable machine-readable reject code.\n *\n * @generated from field: string code = 1;\n */\n code: string;\n\n /**\n * Client-safe diagnostic detail.\n *\n * @generated from field: string detail = 2;\n */\n detail: string;\n\n /**\n * Structured error details, including retry guidance for rate-limit rejections.\n *\n * @generated from field: orders.v1.ErrorDetail error = 3;\n */\n error?: ErrorDetail | undefined;\n};\n\n/**\n * Describes the message tradews.v1.CommandReject.\n * Use `create(CommandRejectSchema)` to create a new message.\n */\nexport const CommandRejectSchema: GenMessage<CommandReject> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 5);\n\n/**\n * OverloadResponse reports that the session exceeded server admission limits.\n *\n * @generated from message tradews.v1.OverloadResponse\n */\nexport type OverloadResponse = Message<\"tradews.v1.OverloadResponse\"> & {\n /**\n * Stable machine-readable overload code.\n *\n * @generated from field: string code = 1;\n */\n code: string;\n\n /**\n * Client-safe diagnostic detail.\n *\n * @generated from field: string detail = 2;\n */\n detail: string;\n};\n\n/**\n * Describes the message tradews.v1.OverloadResponse.\n * Use `create(OverloadResponseSchema)` to create a new message.\n */\nexport const OverloadResponseSchema: GenMessage<OverloadResponse> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 6);\n\n/**\n * TerminalSessionEvent reports a terminal session condition.\n *\n * @generated from message tradews.v1.TerminalSessionEvent\n */\nexport type TerminalSessionEvent = Message<\"tradews.v1.TerminalSessionEvent\"> & {\n /**\n * Stable machine-readable terminal code.\n *\n * @generated from field: string code = 1;\n */\n code: string;\n\n /**\n * Client-safe diagnostic detail.\n *\n * @generated from field: string detail = 2;\n */\n detail: string;\n};\n\n/**\n * Describes the message tradews.v1.TerminalSessionEvent.\n * Use `create(TerminalSessionEventSchema)` to create a new message.\n */\nexport const TerminalSessionEventSchema: GenMessage<TerminalSessionEvent> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 7);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,MAAa,2BACX,uBAAS,g6EAAg6E,CAAC,qBAAqB,CAAC;;;;;AAqJl8E,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AAoBzC,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AA6EzC,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AAoBzC,MAAa,qBACX,0BAAY,0BAA0B,CAAC;;;;;AAsFzC,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AAkCzC,MAAa,sBACX,0BAAY,0BAA0B,CAAC;;;;;AA2BzC,MAAa,yBACX,0BAAY,0BAA0B,CAAC;;;;;AA2BzC,MAAa,6BACX,0BAAY,0BAA0B,CAAC"}
1
+ {"version":3,"file":"trade_ws_pb.js","names":[],"sources":["../../../../src/gen/tradews/v1/trade_ws_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file tradews/v1/trade_ws.proto (package tradews.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { BatchCancelOrdersRequest, BatchCancelOrdersResponse, BatchCreateOrdersRequest, BatchCreateOrdersResponse, BatchReplaceOrdersRequest, BatchReplaceOrdersResponse, CancelAllAfterRequest, CancelAllAfterResponse, CancelAllOrdersRequest, CancelAllOrdersResponse, CancelOrderRequest, CancelOrderResponse, CreateOrderRequest, CreateOrderResponse, ErrorDetail, ModifyOrderRequest, ModifyOrderResponse } from \"../../orders/v1/orders_pb.js\";\nimport { file_orders_v1_orders } from \"../../orders/v1/orders_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file tradews/v1/trade_ws.proto.\n */\nexport const file_tradews_v1_trade_ws: GenFile = /*@__PURE__*/\n fileDesc(\"Chl0cmFkZXdzL3YxL3RyYWRlX3dzLnByb3RvEgp0cmFkZXdzLnYxIoUFCgtDbGllbnRGcmFtZRILCgNzZXEYASABKAQSFgoOY29ycmVsYXRpb25faWQYAiABKAkSFAoMdGltZXN0YW1wX21zGAMgASgDEhYKDnJlY3Zfd2luZG93X21zGAQgASgNEicKBHBpbmcYCiABKAsyFy50cmFkZXdzLnYxLlBpbmdSZXF1ZXN0SAASNQoMY3JlYXRlX29yZGVyGAsgASgLMh0ub3JkZXJzLnYxLkNyZWF0ZU9yZGVyUmVxdWVzdEgAEjUKDGNhbmNlbF9vcmRlchgMIAEoCzIdLm9yZGVycy52MS5DYW5jZWxPcmRlclJlcXVlc3RIABI1Cgxtb2RpZnlfb3JkZXIYDSABKAsyHS5vcmRlcnMudjEuTW9kaWZ5T3JkZXJSZXF1ZXN0SAASPgoRY2FuY2VsX2FsbF9vcmRlcnMYDiABKAsyIS5vcmRlcnMudjEuQ2FuY2VsQWxsT3JkZXJzUmVxdWVzdEgAEkIKE2JhdGNoX2NyZWF0ZV9vcmRlcnMYDyABKAsyIy5vcmRlcnMudjEuQmF0Y2hDcmVhdGVPcmRlcnNSZXF1ZXN0SAASRAoUYmF0Y2hfcmVwbGFjZV9vcmRlcnMYECABKAsyJC5vcmRlcnMudjEuQmF0Y2hSZXBsYWNlT3JkZXJzUmVxdWVzdEgAEkIKE2JhdGNoX2NhbmNlbF9vcmRlcnMYESABKAsyIy5vcmRlcnMudjEuQmF0Y2hDYW5jZWxPcmRlcnNSZXF1ZXN0SAASPAoQY2FuY2VsX2FsbF9hZnRlchgSIAEoCzIgLm9yZGVycy52MS5DYW5jZWxBbGxBZnRlclJlcXVlc3RIAEIJCgdwYXlsb2FkIh4KC1BpbmdSZXF1ZXN0Eg8KB3BheWxvYWQYASABKAwipAIKC1NlcnZlckZyYW1lEgsKA3NlcRgBIAEoBBIWCg5jb3JyZWxhdGlvbl9pZBgCIAEoCRIoCgRwb25nGAogASgLMhgudHJhZGV3cy52MS5Qb25nUmVzcG9uc2VIABImCgNhY2sYCyABKAsyFy50cmFkZXdzLnYxLkFja1Jlc3BvbnNlSAASKwoGcmVqZWN0GAwgASgLMhkudHJhZGV3cy52MS5Db21tYW5kUmVqZWN0SAASMAoIb3ZlcmxvYWQYDSABKAsyHC50cmFkZXdzLnYxLk92ZXJsb2FkUmVzcG9uc2VIABI0Cgh0ZXJtaW5hbBgOIAEoCzIgLnRyYWRld3MudjEuVGVybWluYWxTZXNzaW9uRXZlbnRIAEIJCgdwYXlsb2FkIh8KDFBvbmdSZXNwb25zZRIPCgdwYXlsb2FkGAEgASgMIpAECgtBY2tSZXNwb25zZRI2CgxjcmVhdGVfb3JkZXIYASABKAsyHi5vcmRlcnMudjEuQ3JlYXRlT3JkZXJSZXNwb25zZUgAEjYKDGNhbmNlbF9vcmRlchgCIAEoCzIeLm9yZGVycy52MS5DYW5jZWxPcmRlclJlc3BvbnNlSAASNgoMbW9kaWZ5X29yZGVyGAMgASgLMh4ub3JkZXJzLnYxLk1vZGlmeU9yZGVyUmVzcG9uc2VIABI/ChFjYW5jZWxfYWxsX29yZGVycxgEIAEoCzIiLm9yZGVycy52MS5DYW5jZWxBbGxPcmRlcnNSZXNwb25zZUgAEkMKE2JhdGNoX2NyZWF0ZV9vcmRlcnMYBSABKAsyJC5vcmRlcnMudjEuQmF0Y2hDcmVhdGVPcmRlcnNSZXNwb25zZUgAEkUKFGJhdGNoX3JlcGxhY2Vfb3JkZXJzGAYgASgLMiUub3JkZXJzLnYxLkJhdGNoUmVwbGFjZU9yZGVyc1Jlc3BvbnNlSAASQwoTYmF0Y2hfY2FuY2VsX29yZGVycxgHIAEoCzIkLm9yZGVycy52MS5CYXRjaENhbmNlbE9yZGVyc1Jlc3BvbnNlSAASPQoQY2FuY2VsX2FsbF9hZnRlchgIIAEoCzIhLm9yZGVycy52MS5DYW5jZWxBbGxBZnRlclJlc3BvbnNlSABCCAoGcmVzdWx0IlQKDUNvbW1hbmRSZWplY3QSDAoEY29kZRgBIAEoCRIOCgZkZXRhaWwYAiABKAkSJQoFZXJyb3IYAyABKAsyFi5vcmRlcnMudjEuRXJyb3JEZXRhaWwiMAoQT3ZlcmxvYWRSZXNwb25zZRIMCgRjb2RlGAEgASgJEg4KBmRldGFpbBgCIAEoCSI0ChRUZXJtaW5hbFNlc3Npb25FdmVudBIMCgRjb2RlGAEgASgJEg4KBmRldGFpbBgCIAEoCUJCWkBnaXRodWIuY29tL0ZhYnJpYy1MYWJzL3BvbHllc3Rlci1zZGstZ28vZ2VuL3RyYWRld3MvdjE7dHJhZGV3c3YxYgZwcm90bzM=\", [file_orders_v1_orders]);\n\n/**\n * ClientFrame is the protobuf write-websocket envelope. Its payloads reuse the\n * public Orders API request contracts so every transport shares one order model.\n *\n * @generated from message tradews.v1.ClientFrame\n */\nexport type ClientFrame = Message<\"tradews.v1.ClientFrame\"> & {\n /**\n * Monotonic per-connection client sequence number, starting at 1.\n *\n * @generated from field: uint64 seq = 1;\n */\n seq: bigint;\n\n /**\n * Client correlation token echoed in every server response.\n *\n * @generated from field: string correlation_id = 2;\n */\n correlationId: string;\n\n /**\n * Optional client time the command was sent, in milliseconds since the Unix\n * epoch. When set, the command is processed only until timestamp_ms plus\n * recv_window_ms: a command that arrives, or waits to be sent on for\n * admission, past then is rejected with REQUEST_DEADLINE_EXCEEDED and\n * changes nothing, but it has taken its seq, so the next command uses the\n * next seq. A timestamp more than 1 second ahead of the server clock is\n * rejected with BAD_REQUEST, without taking the seq. Zero sets no\n * deadline. Ping ignores it.\n *\n * @generated from field: int64 timestamp_ms = 3;\n */\n timestampMs: bigint;\n\n /**\n * Optional receive window in milliseconds, from 1 to 60000, applied to\n * timestamp_ms. Zero uses 5000. Setting it without timestamp_ms is\n * rejected with BAD_REQUEST.\n *\n * @generated from field: uint32 recv_window_ms = 4;\n */\n recvWindowMs: number;\n\n /**\n * @generated from oneof tradews.v1.ClientFrame.payload\n */\n payload: {\n /**\n * Liveness request that does not submit an order command.\n *\n * @generated from field: tradews.v1.PingRequest ping = 10;\n */\n value: PingRequest;\n case: \"ping\";\n } | {\n /**\n * Create-order command using the public Orders API request contract,\n * including its required base-quantity or maximum-quote-debit sizing choice.\n *\n * @generated from field: orders.v1.CreateOrderRequest create_order = 11;\n */\n value: CreateOrderRequest;\n case: \"createOrder\";\n } | {\n /**\n * Cancel-order command using the public Orders API request contract.\n *\n * @generated from field: orders.v1.CancelOrderRequest cancel_order = 12;\n */\n value: CancelOrderRequest;\n case: \"cancelOrder\";\n } | {\n /**\n * Modify-order command using the public Orders API request contract.\n *\n * @generated from field: orders.v1.ModifyOrderRequest modify_order = 13;\n */\n value: ModifyOrderRequest;\n case: \"modifyOrder\";\n } | {\n /**\n * Cancel-all command using the public Orders API request contract.\n *\n * @generated from field: orders.v1.CancelAllOrdersRequest cancel_all_orders = 14;\n */\n value: CancelAllOrdersRequest;\n case: \"cancelAllOrders\";\n } | {\n /**\n * Batch create command using the public Orders API request contract: up\n * to 20 orders, each admitted or rejected on its own. request_id is the\n * same account-scoped idempotency key as the Orders API's: resending the\n * same request_id and items, over this WebSocket or the Orders API,\n * replays the original per-item results instead of creating orders again.\n *\n * @generated from field: orders.v1.BatchCreateOrdersRequest batch_create_orders = 15;\n */\n value: BatchCreateOrdersRequest;\n case: \"batchCreateOrders\";\n } | {\n /**\n * Batch replace command using the public Orders API request contract: up\n * to 50 orders on one trading pair, each amended in place or replaced as\n * the Orders API decides, under the same request_id idempotency as the\n * Orders API.\n *\n * @generated from field: orders.v1.BatchReplaceOrdersRequest batch_replace_orders = 16;\n */\n value: BatchReplaceOrdersRequest;\n case: \"batchReplaceOrders\";\n } | {\n /**\n * Batch cancel command using the public Orders API request contract: up\n * to 50 cancellations, each accepted or rejected on its own, under the\n * same request_id idempotency as the Orders API.\n *\n * @generated from field: orders.v1.BatchCancelOrdersRequest batch_cancel_orders = 17;\n */\n value: BatchCancelOrdersRequest;\n case: \"batchCancelOrders\";\n } | {\n /**\n * Cancel-all-after command using the public Orders API request\n * contract: arms, refreshes or disarms the account's dead-man switch,\n * the same switch as the Orders API's CancelAllAfter, with the same\n * symbol and side scope and the same timeout rule (0 disarms; 10 to 120\n * seconds arms or refreshes). On expiry it cancels the account's open\n * orders in scope, including orders that triggers placed, and no\n * trigger. The switch belongs to the account, not to this connection:\n * closing the connection neither disarms nor fires it. Refresh it well\n * within the timeout, for example every 15 to 30 seconds with a\n * 60-second timeout. Resending a request is safe: an arm restarts the\n * timer from when it applies, and a disarm is idempotent. request_id is\n * required, as on the Orders API; subaccount_id must be omitted.\n *\n * @generated from field: orders.v1.CancelAllAfterRequest cancel_all_after = 18;\n */\n value: CancelAllAfterRequest;\n case: \"cancelAllAfter\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message tradews.v1.ClientFrame.\n * Use `create(ClientFrameSchema)` to create a new message.\n */\nexport const ClientFrameSchema: GenMessage<ClientFrame> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 0);\n\n/**\n * PingRequest carries an opaque payload that is echoed by PongResponse.\n *\n * @generated from message tradews.v1.PingRequest\n */\nexport type PingRequest = Message<\"tradews.v1.PingRequest\"> & {\n /**\n * Opaque client payload echoed by the server.\n *\n * @generated from field: bytes payload = 1;\n */\n payload: Uint8Array;\n};\n\n/**\n * Describes the message tradews.v1.PingRequest.\n * Use `create(PingRequestSchema)` to create a new message.\n */\nexport const PingRequestSchema: GenMessage<PingRequest> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 1);\n\n/**\n * ServerFrame is the protobuf write-websocket response envelope.\n *\n * @generated from message tradews.v1.ServerFrame\n */\nexport type ServerFrame = Message<\"tradews.v1.ServerFrame\"> & {\n /**\n * Client sequence number copied from the accepted or rejected frame.\n *\n * @generated from field: uint64 seq = 1;\n */\n seq: bigint;\n\n /**\n * Client correlation token copied from the accepted or rejected frame.\n *\n * @generated from field: string correlation_id = 2;\n */\n correlationId: string;\n\n /**\n * @generated from oneof tradews.v1.ServerFrame.payload\n */\n payload: {\n /**\n * Liveness response for PingRequest.\n *\n * @generated from field: tradews.v1.PongResponse pong = 10;\n */\n value: PongResponse;\n case: \"pong\";\n } | {\n /**\n * Successful command acknowledgement. A batch acknowledgement carries\n * each item's own result, accepted or rejected.\n *\n * @generated from field: tradews.v1.AckResponse ack = 11;\n */\n value: AckResponse;\n case: \"ack\";\n } | {\n /**\n * Command-level reject with a stable machine-readable code. A batch\n * rejected as busy (ENGINE_BUSY or UNAVAILABLE), or one whose\n * acknowledgement never arrived, may have taken effect for some items:\n * resend it with the same request_id and items to resolve or replay it,\n * and do not assume it placed or canceled no orders.\n *\n * @generated from field: tradews.v1.CommandReject reject = 12;\n */\n value: CommandReject;\n case: \"reject\";\n } | {\n /**\n * Server overload response when the session cannot admit more work.\n *\n * @generated from field: tradews.v1.OverloadResponse overload = 13;\n */\n value: OverloadResponse;\n case: \"overload\";\n } | {\n /**\n * Terminal session-level response after which the server closes the stream.\n *\n * @generated from field: tradews.v1.TerminalSessionEvent terminal = 14;\n */\n value: TerminalSessionEvent;\n case: \"terminal\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message tradews.v1.ServerFrame.\n * Use `create(ServerFrameSchema)` to create a new message.\n */\nexport const ServerFrameSchema: GenMessage<ServerFrame> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 2);\n\n/**\n * PongResponse echoes a PingRequest payload.\n *\n * @generated from message tradews.v1.PongResponse\n */\nexport type PongResponse = Message<\"tradews.v1.PongResponse\"> & {\n /**\n * Opaque payload copied from PingRequest.\n *\n * @generated from field: bytes payload = 1;\n */\n payload: Uint8Array;\n};\n\n/**\n * Describes the message tradews.v1.PongResponse.\n * Use `create(PongResponseSchema)` to create a new message.\n */\nexport const PongResponseSchema: GenMessage<PongResponse> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 3);\n\n/**\n * AckResponse carries the command-specific public Orders API acknowledgement.\n *\n * @generated from message tradews.v1.AckResponse\n */\nexport type AckResponse = Message<\"tradews.v1.AckResponse\"> & {\n /**\n * @generated from oneof tradews.v1.AckResponse.result\n */\n result: {\n /**\n * Accepted create-order response.\n *\n * @generated from field: orders.v1.CreateOrderResponse create_order = 1;\n */\n value: CreateOrderResponse;\n case: \"createOrder\";\n } | {\n /**\n * Accepted cancel-order response.\n *\n * @generated from field: orders.v1.CancelOrderResponse cancel_order = 2;\n */\n value: CancelOrderResponse;\n case: \"cancelOrder\";\n } | {\n /**\n * Accepted modify-order response.\n *\n * @generated from field: orders.v1.ModifyOrderResponse modify_order = 3;\n */\n value: ModifyOrderResponse;\n case: \"modifyOrder\";\n } | {\n /**\n * Accepted cancel-all response.\n *\n * @generated from field: orders.v1.CancelAllOrdersResponse cancel_all_orders = 4;\n */\n value: CancelAllOrdersResponse;\n case: \"cancelAllOrders\";\n } | {\n /**\n * Batch create response with one result per requested order, in request\n * order. A rejected item carries its typed error; the others still count.\n *\n * @generated from field: orders.v1.BatchCreateOrdersResponse batch_create_orders = 5;\n */\n value: BatchCreateOrdersResponse;\n case: \"batchCreateOrders\";\n } | {\n /**\n * Batch replace admission receipt with one result per requested\n * replacement, in request order.\n *\n * @generated from field: orders.v1.BatchReplaceOrdersResponse batch_replace_orders = 6;\n */\n value: BatchReplaceOrdersResponse;\n case: \"batchReplaceOrders\";\n } | {\n /**\n * Batch cancel response with one result per requested cancellation, in\n * request order.\n *\n * @generated from field: orders.v1.BatchCancelOrdersResponse batch_cancel_orders = 7;\n */\n value: BatchCancelOrdersResponse;\n case: \"batchCancelOrders\";\n } | {\n /**\n * Cancel-all-after response: the account's dead-man switch after the\n * request applied, its deadline and its recorded scope.\n *\n * @generated from field: orders.v1.CancelAllAfterResponse cancel_all_after = 8;\n */\n value: CancelAllAfterResponse;\n case: \"cancelAllAfter\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message tradews.v1.AckResponse.\n * Use `create(AckResponseSchema)` to create a new message.\n */\nexport const AckResponseSchema: GenMessage<AckResponse> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 4);\n\n/**\n * CommandReject reports a command-level failure without closing the session.\n *\n * @generated from message tradews.v1.CommandReject\n */\nexport type CommandReject = Message<\"tradews.v1.CommandReject\"> & {\n /**\n * Stable machine-readable reject code.\n *\n * @generated from field: string code = 1;\n */\n code: string;\n\n /**\n * Client-safe diagnostic detail.\n *\n * @generated from field: string detail = 2;\n */\n detail: string;\n\n /**\n * Structured error details, including retry guidance for rate-limit rejections.\n *\n * @generated from field: orders.v1.ErrorDetail error = 3;\n */\n error?: ErrorDetail | undefined;\n};\n\n/**\n * Describes the message tradews.v1.CommandReject.\n * Use `create(CommandRejectSchema)` to create a new message.\n */\nexport const CommandRejectSchema: GenMessage<CommandReject> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 5);\n\n/**\n * OverloadResponse reports that the session exceeded server admission limits.\n *\n * @generated from message tradews.v1.OverloadResponse\n */\nexport type OverloadResponse = Message<\"tradews.v1.OverloadResponse\"> & {\n /**\n * Stable machine-readable overload code.\n *\n * @generated from field: string code = 1;\n */\n code: string;\n\n /**\n * Client-safe diagnostic detail.\n *\n * @generated from field: string detail = 2;\n */\n detail: string;\n};\n\n/**\n * Describes the message tradews.v1.OverloadResponse.\n * Use `create(OverloadResponseSchema)` to create a new message.\n */\nexport const OverloadResponseSchema: GenMessage<OverloadResponse> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 6);\n\n/**\n * TerminalSessionEvent reports a terminal session condition.\n *\n * @generated from message tradews.v1.TerminalSessionEvent\n */\nexport type TerminalSessionEvent = Message<\"tradews.v1.TerminalSessionEvent\"> & {\n /**\n * Stable machine-readable terminal code.\n *\n * @generated from field: string code = 1;\n */\n code: string;\n\n /**\n * Client-safe diagnostic detail.\n *\n * @generated from field: string detail = 2;\n */\n detail: string;\n};\n\n/**\n * Describes the message tradews.v1.TerminalSessionEvent.\n * Use `create(TerminalSessionEventSchema)` to create a new message.\n */\nexport const TerminalSessionEventSchema: GenMessage<TerminalSessionEvent> = /*@__PURE__*/\n messageDesc(file_tradews_v1_trade_ws, 7);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,MAAa,2BACX,uBAAS,g6EAAg6E,CAAC,qBAAqB,CAAC;;;;;AAqJl8E,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AAoBzC,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AA6EzC,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AAoBzC,MAAa,qBACX,0BAAY,0BAA0B,CAAC;;;;;AAsFzC,MAAa,oBACX,0BAAY,0BAA0B,CAAC;;;;;AAkCzC,MAAa,sBACX,0BAAY,0BAA0B,CAAC;;;;;AA2BzC,MAAa,yBACX,0BAAY,0BAA0B,CAAC;;;;;AA2BzC,MAAa,6BACX,0BAAY,0BAA0B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ import { ConnectPrivateOrdersParams, PrivateOrdersEvent } from "./realtime/priva
16
16
  import { ConnectChannelParams, PolyesterRealtime, RealtimeConnection, RealtimeConnectionState, RealtimeConnectionStatus, SubscribeHandlers } from "./realtime/types.js";
17
17
  import "./realtime/index.js";
18
18
  import { ApiKeyPolicy, ApiKeyPolicyApplyInput, ApiKeyPolicyCreateInput, ApiKeyPolicyUpdateInput, ListApiKeyPoliciesResponse } from "./services/policies/api-key-policies/api-key-policies.schemas.js";
19
- import { ApiKey, ApiKeyIdInput, ApiKeyStatus, ApiKeysCreateInput, ApiKeysListInput, ApiKeysUpdateInput } from "./services/api-keys/api-keys.schemas.js";
19
+ import { ApiKey, ApiKeyIdInput, ApiKeyStatus, ApiKeysCreateInput, ApiKeysListInput, ApiKeysUpdateInput, AssistantKeySpecInput, SetAssistantKeysInput } from "./services/api-keys/api-keys.schemas.js";
20
20
  import { SubaccountPolicy, SubaccountPolicyApplyInput, SubaccountPolicyCreateInput, SubaccountPolicyUpdateInput } from "./services/policies/subaccount-policies/subaccount-policies.schemas.js";
21
21
  import { AccountCodeValue, TransferCodeValue } from "./shared/ledger-codes.js";
22
22
  import { BalanceHistoryInput, BalanceHistoryResponse, BalanceRange, EquityGroupBy, EquityHistoryInput, EquityHistoryResponse, EquitySeries, EquitySeriesGrouping, LedgerBalance, PortfolioEquityHistoryInput, PortfolioEquityHistoryResponse, PortfolioEquitySeries, PortfolioEquitySeriesGrouping, PortfolioEquitySnapshotResponse, formatLedgerBalance } from "./services/balances/balances.schemas.js";
@@ -40,22 +40,27 @@ import { OrderLineage } from "./services/orders/order-lineage.schemas.js";
40
40
  import { CancelTriggerInput, CreateTriggerInput, GetTriggerInput, ListTriggerEventsInput, ListTriggersInput, ModifyTriggerInput, PauseTriggerInput, ResumeTriggerInput } from "./services/triggers/trigger-input.schemas.js";
41
41
  import { CancelTriggerResult, CreateTriggerResult, LadderDetailsOutput, ListTriggerEventsResult, ModifyTriggerResult, PauseTriggerResult, ResumeTriggerResult, StopDetailsOutput, TrailingDetailsOutput, Trigger, TriggerDetailsOutput, TriggerEvent, TwapDetailsOutput } from "./services/triggers/triggers-output.schemas.js";
42
42
  import { ListTriggersResult } from "./services/triggers/triggers.js";
43
+ import { CancelPriceAlertInput, CreatePriceAlertInput, ListPriceAlertsInput, ListPriceAlertsResult, PriceAlert, UpdatePriceAlertInput, UpdatePriceAlertResult } from "./services/price-alerts/price-alerts.schemas.js";
44
+ import { AssistantApprovalPreview, AssistantOrderPreview, AssistantRunEvent, AssistantView } from "./services/assistant/assistant-events.schemas.js";
45
+ import { AssistantApprovalDecision, AssistantApprovalStatus, AssistantFailureCategory, AssistantKeyState, AssistantMemoryKind, AssistantMessageRole, AssistantOrderPriceField, AssistantPriceOffsetDirection, AssistantPriceRounding, AssistantReferencePriceSource, AssistantTriggerChangeAction, AssistantTriggerDirection, AssistantUnfilledSlicePolicy } from "./services/assistant/assistant.codecs.js";
46
+ import { AssistantConversation, AssistantKey, AssistantMemory, AssistantMessage, AssistantRunIdInput, CompleteAssistantKeysInput, DecideAssistantApprovalInput, DeleteAssistantMemoryInput, ListAssistantConversationsInput, ListAssistantConversationsResult, ListAssistantMemoriesInput, ListAssistantMemoriesResult, ListAssistantMessagesInput, ListAssistantMessagesResult, PrepareAssistantKeysInput, PrepareAssistantKeysResult, PreparedAssistantKey, SendAssistantMessageInput, WatchAssistantRunInput } from "./services/assistant/assistant.schemas.js";
43
47
  import { LedgerTransfer, LedgerTransferSide, ListTransfersInput } from "./services/transfers/transfers.schemas.js";
44
48
  import { CreateInternalTransferInput, CreateInternalTransferResult, GetInternalTransferInput, GetInternalTransferResult, InternalTransferDestination, ResolvedInternalTransferDestination } from "./services/internal-transfers/internal-transfers.schemas.js";
45
- import { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult } from "./services/trading-withdraws/trading-withdraws.schemas.js";
49
+ import { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, GetWalletBalancesInput, GetWalletBalancesResult, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult } from "./services/trading-withdraws/trading-withdraws.schemas.js";
46
50
  import { CreateTradingWithdrawToExternalChainServiceInput, CreateTradingWithdrawToFundingServiceInput, PreparedTradingWithdraw, TradingWithdrawSigningConfig, TradingWithdrawWalletSigner } from "./services/trading-withdraws/trading-withdraws.js";
47
- import { AutoWithdrawCadence, AutoWithdrawPauseReason, AutoWithdrawRunReason, AutoWithdrawRunState, AutoWithdrawStepReason, AutoWithdrawStepState, AutoWithdrawWeekday } from "./services/auto-withdraw/auto-withdraw.codecs.js";
48
- import { AutoWithdrawDestination, AutoWithdrawDestinationInput, AutoWithdrawPause, AutoWithdrawRule, AutoWithdrawRun, AutoWithdrawSchedule, AutoWithdrawScheduleInput, AutoWithdrawScopedInput, AutoWithdrawStep, DisableAutoWithdrawRuleInput, ListAutoWithdrawRunsInput, ListAutoWithdrawRunsResult, SetAutoWithdrawRuleInput } from "./services/auto-withdraw/auto-withdraw.schemas.js";
51
+ import { AutoWithdrawCadence, AutoWithdrawHoldReason, AutoWithdrawPauseReason, AutoWithdrawPreviewStatus, AutoWithdrawRunReason, AutoWithdrawRunState, AutoWithdrawStepReason, AutoWithdrawStepState, AutoWithdrawWeekday } from "./services/auto-withdraw/auto-withdraw.codecs.js";
52
+ import { AutoWithdrawDestination, AutoWithdrawDestinationInput, AutoWithdrawPause, AutoWithdrawPreview, AutoWithdrawPreviewAsset, AutoWithdrawRule, AutoWithdrawRun, AutoWithdrawSchedule, AutoWithdrawScheduleInput, AutoWithdrawScopedInput, AutoWithdrawStep, ListAutoWithdrawRunsInput, ListAutoWithdrawRunsResult, SetAutoWithdrawRuleEnabledInput, SetAutoWithdrawRuleInput } from "./services/auto-withdraw/auto-withdraw.schemas.js";
49
53
  import { CreateDepositAddressInput, DepositAddress, ListDepositAddressesInput } from "./services/deposit/deposit.schemas.js";
50
54
  import { AddressBook, AddressBookAccountScope, AddressBookEntries, AddressBookEntriesView, AddressBookEntry, AddressBookRecentDestinationsView, AddressBookTag, AddressBookTagSummary, AddressBookView, AddressBookViewInvalidated, CopyAddressBookEntryInput, CreateAddressBookEntryInput, CreateAddressBookTagInput, DeleteAddressBookEntryInput, DeleteAddressBookTagInput, GetAddressBookViewInput, InternalTransferWhitelistEntries, InternalTransferWhitelistEntry, ListAddressBookEntriesInput, ListInternalTransferWhitelistEntriesInput, ListTransferCounterpartiesInput, ListTransferDestinationsInput, MirroredWithdrawWhitelistEntry, SubaccountScopedInput, TransferCounterparties, TransferCounterparty, TransferDestination, TransferDestinations, UpdateAddressBookEntryInput, UpdateAddressBookTagInput, WithdrawWhitelistView, validateCreateAddressBookEntryInput } from "./services/address-book/address-book.schemas.js";
51
55
  import { BatchGuardApprovals, BatchSignProtectedActionInput, CreateGuardSignerWalletResult, ExportGuardSignerWalletResult, GuardApproval, GuardSignerScopedInput, GuardSignerStatus, RotateGuardSignerWalletResult, SignProtectedActionInput } from "./services/guard-signer/guard-signer.schemas.js";
52
- import { GetVerificationResponse, SocialProvider, SocialProviderInput, SocialVerification, SocialVerificationErrorCode, SocialVerificationMethod, SocialVerificationStatus, StartVerificationInput, StartVerificationResponse, VerificationReadyResponse } from "./services/social-verification/social-verification.schemas.js";
56
+ import { ConfirmVerificationInput, GetVerificationResponse, SocialProvider, SocialProviderInput, SocialVerification, SocialVerificationErrorCode, SocialVerificationMethod, SocialVerificationStatus, StartVerificationInput, StartVerificationResponse, UnlinkSocialAccountInput, VerificationReadyResponse } from "./services/social-verification/social-verification.schemas.js";
53
57
  import { ZippedAssetSupplyBatch, ZippedAssetSupplyUpdate } from "./services/zipper/zipper.schemas.js";
54
58
  import { SubscribeZippedAssetSupplyInput } from "./services/zipper/zipper.js";
55
59
  import { BeginMfaChallengeInput, BeginMfaChallengeResult, BeginPasskeyEnrollmentInput, BeginPasskeyEnrollmentResult, BeginTotpEnrollmentInput, BeginTotpEnrollmentResult, ClaimFreshStepUpInput, ClaimFreshStepUpResult, CompleteMfaChallengeResult, ConsumeFreshStepUpInput, DeleteMfaFactorInput, FinishPasskeyChallengeInput, FinishPasskeyEnrollmentInput, FinishPasskeyEnrollmentResult, FinishTotpEnrollmentInput, FinishTotpEnrollmentResult, ListMfaFactorsResult, MfaFactor, MfaSessionInfo, RegenerateRecoveryCodesInput, RegenerateRecoveryCodesResult, ReleaseFreshStepUpInput, UpdateMfaFactorInput, UpdateMfaFactorResult, VerifyRecoveryCodeChallengeInput, VerifyTotpChallengeInput } from "./services/mfa/mfa.schemas.js";
56
60
  import { ClaimCampaign, ClaimDailyRewardInput, ClaimDailyRewardResult, ClaimPayoutDelayReason, DailyClaimReward, DailyClaimStatus, DailyClaimTransfer } from "./services/claims/claims.schemas.js";
57
61
  import { Checkpoint, CheckpointAssetAmount, CheckpointBiggestTrade, CheckpointChainFlow, CheckpointEarnedBadge, CheckpointFlowTotal, CheckpointFundingDay, CheckpointFundingFlowSummary, CheckpointOrderToolCounts, CheckpointOrderTypeCounts, CheckpointPairActivity, CheckpointPortfolioValuePoint, CheckpointTimeInForceCounts, CheckpointVipTierChange, CheckpointVolumePoint, ListCheckpointsInput } from "./services/checkpoints/checkpoints.schemas.js";
58
62
  import { ChangelogChange, ChangelogChangeEntry, ChangelogPost, ChangelogPostSummary, ChangelogSection, GetChangelogPostInput, ListChangelogChangesInput, ListChangelogChangesResult, ListChangelogPostsInput, ListChangelogPostsResult } from "./services/changelog/changelog.schemas.js";
63
+ import { SystemVersion } from "./services/system/system.js";
59
64
  import { AcknowledgeRewardAwardInput, AcknowledgeRewardAwardResult, ListRewardAwardsInput, ListRewardAwardsResult, RewardAward, SetRewardDestinationInput, SetRewardDestinationResult } from "./services/rewards/rewards.schemas.js";
60
65
  import { NextVipTierThresholds, VipMetricQuality, VipMetricStatus, VipStatus, VipTier, VipTierCatalog } from "./services/vip/vip.schemas.js";
61
66
  import { GetSpotFeeRatesInput, SpotFeeDiscount, SpotFeeRate, SpotFeeRateBreakdown } from "./services/fees/fees.schemas.js";
@@ -85,6 +90,7 @@ import { EvmHex, checksumEvmAddress, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex
85
90
  import "./services/accounts/accounts.types.js";
86
91
  import "./services/address-book/address-book.types.js";
87
92
  import "./services/api-keys/api-keys.types.js";
93
+ import "./services/assistant/assistant.types.js";
88
94
  import "./services/auth/auth.types.js";
89
95
  import "./services/auth/profile/profile.types.js";
90
96
  import "./services/auto-withdraw/auto-withdraw.types.js";
@@ -113,6 +119,8 @@ import "./services/policies/api-key-policies/api-key-policies.types.js";
113
119
  import { PolicyAction, PolicyMarketScope } from "./services/policies/shared.js";
114
120
  import "./services/policies/policies.types.js";
115
121
  import "./services/policies/subaccount-policies/subaccount-policies.types.js";
122
+ import { PriceAlertChannel, PriceAlertDirection, PriceAlertPriceSource, PriceAlertStatus, PriceAlertUpdateOutcome } from "./services/price-alerts/price-alerts.codecs.js";
123
+ import "./services/price-alerts/price-alerts.types.js";
116
124
  import "./services/rate-limits/rate-limits.types.js";
117
125
  import { RewardFulfillmentMethod, RewardFulfillmentState } from "./services/rewards/rewards.codecs.js";
118
126
  import "./services/rewards/rewards.types.js";
@@ -125,4 +133,4 @@ import "./services/transfers/transfers.types.js";
125
133
  import "./services/triggers/triggers.types.js";
126
134
  import "./services/vip/vip.types.js";
127
135
  import "./services/zipper/zipper.types.js";
128
- export { type AccountCodeValue, type AccountIdentity, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type AcknowledgeRewardAwardInput, type AcknowledgeRewardAwardResult, type ActiveAccountInfo, type AddressBook, type AddressBookAccountScope, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type AssetConfig, type AuthCookieLocation, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type AutoWithdrawCadence, type AutoWithdrawDestination, type AutoWithdrawDestinationInput, type AutoWithdrawPause, type AutoWithdrawPauseReason, type AutoWithdrawRule, type AutoWithdrawRun, type AutoWithdrawRunReason, type AutoWithdrawRunState, type AutoWithdrawSchedule, type AutoWithdrawScheduleInput, type AutoWithdrawScopedInput, type AutoWithdrawStep, type AutoWithdrawStepReason, type AutoWithdrawStepState, type AutoWithdrawWeekday, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOrderInput, type CancelOrderResult, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ChangelogAudience, type ChangelogChange, type ChangelogChangeCategory, type ChangelogChangeEntry, type ChangelogPost, type ChangelogPostSummary, type ChangelogSection, type ChangelogSort, type ChangelogSurface, type Checkpoint, type CheckpointAssetAmount, type CheckpointBadge, type CheckpointBiggestTrade, type CheckpointChainFlow, type CheckpointEarnedBadge, type CheckpointField, type CheckpointFlowTotal, type CheckpointFundingDay, type CheckpointFundingFlowSummary, type CheckpointOrderToolCounts, type CheckpointOrderTypeCounts, type CheckpointPairActivity, type CheckpointPortfolioValuePoint, type CheckpointTimeInForceCounts, type CheckpointVipTierChange, type CheckpointVolumePoint, type ClaimCampaign, type ClaimDailyRewardInput, type ClaimDailyRewardResult, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, ClaimOutcomeUnknownError, type ClaimOutcomeUnknownErrorOptions, type ClaimPayoutDelayReason, type ClaimPolicy, type ColumnarTimeWindow, type CompleteMfaChallengeResult, ConfigurationError, type ConnectChannelParams, type ConnectPrivateOrdersParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateSubaccountChallengeInput, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWalletChallengeInput, type CurrencyConversionConfig, type CurrencyConversionRates, type CurrencyMetadata, type DailyClaimReward, type DailyClaimState, type DailyClaimStatus, type DailyClaimTransfer, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type DisableAutoWithdrawRuleInput, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FiatConversionRate, type FiatConversionSnapshot, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetChangelogPostInput, type GetInternalTransferInput, type GetInternalTransferResult, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetSubaccountInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferDestination, type InternalTransferStatus, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListAutoWithdrawRunsInput, type ListAutoWithdrawRunsResult, type ListChangelogChangesInput, type ListChangelogChangesResult, type ListChangelogPostsInput, type ListChangelogPostsResult, type ListCheckpointsInput, type ListDepositAddressesInput, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListRewardAwardsInput, type ListRewardAwardsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, NotImplementedError, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderLineage, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, OutcomeUnknownError, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterBrowserCore, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, PolyesterCore, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorDetail, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, PolyesterServerCore, type PolyesterServices, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PreparedTradingWithdraw, type PreviewOrderResult, type PrivateOrdersEvent, type Profile, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RealtimeConnection, type RealtimeConnectionState, type RealtimeConnectionStatus, RealtimeError, type RealtimeErrorOptions, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestDeadlineExceededError, RequestError, RequestTooLargeError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RewardAward, type RewardFulfillmentMethod, type RewardFulfillmentState, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type ServerSessionCookieOptions, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetAutoWithdrawRuleInput, type SetRewardDestinationInput, type SetRewardDestinationResult, type SetSubaccountMemberMfaRequirementInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationErrorCode, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeDiscount, type SpotFeeRate, type SpotFeeRateBreakdown, type SpotPairVolumeSeries, type SpotVolumeHistoryInput, type SpotVolumeHistoryResponse, type StablecoinConversionRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountChallenge, SubaccountChallengeInvalidError, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type TakeProfitInput, type Timeframe, TimeoutError, TimestampSkewError, type Trade, type TradeBackfill, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, UserOperationAlreadyKnownError, UserOperationNotExecutedError, UserOperationSendTimeoutError, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipMetricQuality, type VipMetricStatus, type VipStatus, type VipTier, type VipTierCatalog, type WalletChallenge, WithdrawDeadlineExpiredError, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, type ZipperMemoRequirement, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, createPolyesterServerCoreFromCookies, createPolyesterServerCoreFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatLedgerBalance, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, isTimeoutAbortError, keccak256Hex, loadErrorDetailDecoders, mergeLedgerBalances, normalizeErrorMessage, resolveAuthCookieName, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
136
+ export { type AccountCodeValue, type AccountIdentity, type AccountScope, type AccountScopedInput, type AccountSigner, type AccountSignerAuthEvents, type AccountSignerConfig, type CreateSubaccountResult as AccountSignerCreateSubaccountResult, type AccountSignerFactory, type AcknowledgeRewardAwardInput, type AcknowledgeRewardAwardResult, type ActiveAccountInfo, type AddressBook, type AddressBookAccountScope, type AddressBookEntries, type AddressBookEntriesView, type AddressBookEntry, type AddressBookRecentDestinationsView, type AddressBookTag, type AddressBookTagSummary, type AddressBookView, type AddressBookViewInvalidated, AlreadyExistsError, type ApiKey, type ApiKeyEd25519AuthProvider, type ApiKeyIdInput, type ApiKeyPolicy, type ApiKeyPolicyApplyInput, type ApiKeyPolicyCreateInput, type ApiKeyPolicyUpdateInput, type ApiKeyStatus, type ApiKeysCreateInput, type ApiKeysListInput, type ApiKeysUpdateInput, type AssetConfig, type AssistantApprovalDecision, type AssistantApprovalPreview, type AssistantApprovalStatus, type AssistantConversation, type AssistantFailureCategory, type AssistantKey, type AssistantKeySpecInput, type AssistantKeyState, type AssistantMemory, type AssistantMemoryKind, type AssistantMessage, type AssistantMessageRole, type AssistantOrderPreview, type AssistantOrderPriceField, type AssistantPriceOffsetDirection, type AssistantPriceRounding, type AssistantReferencePriceSource, type AssistantRunEvent, type AssistantRunIdInput, type AssistantTriggerChangeAction, type AssistantTriggerDirection, type AssistantUnfilledSlicePolicy, type AssistantView, type AuthCookieLocation, type AuthHydrationData, type AuthLoginMethod, type AuthState, type AuthTokenStorage, type AuthTokenStorageSetOptions, AuthenticationError, type AutoWithdrawCadence, type AutoWithdrawDestination, type AutoWithdrawDestinationInput, type AutoWithdrawHoldReason, type AutoWithdrawPause, type AutoWithdrawPauseReason, type AutoWithdrawPreview, type AutoWithdrawPreviewAsset, type AutoWithdrawPreviewStatus, type AutoWithdrawRule, type AutoWithdrawRun, type AutoWithdrawRunReason, type AutoWithdrawRunState, type AutoWithdrawSchedule, type AutoWithdrawScheduleInput, type AutoWithdrawScopedInput, type AutoWithdrawStep, type AutoWithdrawStepReason, type AutoWithdrawStepState, type AutoWithdrawWeekday, type BalanceHistoryInput, type BalanceHistoryResponse, type BalanceRange, type BatchCancelOrderInput, type BatchCancelOrderResult, type BatchCancelOrdersInput, type BatchCancelOrdersResult, type BatchCreateOrderResult, type BatchCreateOrdersInput, type BatchCreateOrdersResult, type BatchGuardApprovals, type BatchReplaceAdmissionItem, type BatchReplaceOrdersInput, type BatchReplaceOrdersResult, type BatchSignProtectedActionInput, type BeginMfaChallengeInput, type BeginMfaChallengeResult, type BeginPasskeyEnrollmentInput, type BeginPasskeyEnrollmentResult, type BeginTotpEnrollmentInput, type BeginTotpEnrollmentResult, type CancelAllAfterInput, type CancelAllAfterResult, type CancelAllOrdersInput, type CancelAllOrdersResponse, type CancelOrderInput, type CancelOrderResult, type CancelPriceAlertInput, type CancelTriggerInput, type CancelTriggerResult, type Candle, type CandleColumnar, type CandleColumnarInt, type CandleInt, type ChainAnalyticsRange, type ChangelogAudience, type ChangelogChange, type ChangelogChangeCategory, type ChangelogChangeEntry, type ChangelogPost, type ChangelogPostSummary, type ChangelogSection, type ChangelogSort, type ChangelogSurface, type Checkpoint, type CheckpointAssetAmount, type CheckpointBadge, type CheckpointBiggestTrade, type CheckpointChainFlow, type CheckpointEarnedBadge, type CheckpointField, type CheckpointFlowTotal, type CheckpointFundingDay, type CheckpointFundingFlowSummary, type CheckpointOrderToolCounts, type CheckpointOrderTypeCounts, type CheckpointPairActivity, type CheckpointPortfolioValuePoint, type CheckpointTimeInForceCounts, type CheckpointVipTierChange, type CheckpointVolumePoint, type ClaimCampaign, type ClaimDailyRewardInput, type ClaimDailyRewardResult, type ClaimFreshStepUpInput, type ClaimFreshStepUpResult, type ClaimGeneratedUsernameInput, ClaimOutcomeUnknownError, type ClaimOutcomeUnknownErrorOptions, type ClaimPayoutDelayReason, type ClaimPolicy, type ColumnarTimeWindow, type CompleteAssistantKeysInput, type CompleteMfaChallengeResult, ConfigurationError, type ConfirmVerificationInput, type ConnectChannelParams, type ConnectPrivateOrdersParams, type ConsumeFreshStepUpInput, type CookieAuthTokenStorageOptions, type CopyAddressBookEntryInput, type CreateAddressBookEntryInput, type CreateAddressBookTagInput, type CreateDepositAddressInput, type CreateGuardSignerWalletResult, type CreateInternalTransferInput, type CreateInternalTransferResult, type CreateOrderResult, type CreateOrderbookSubscriptionInput, type CreatePolyesterAccountSignerParams, type CreatePolyesterEnvironmentParams, type CreatePriceAlertInput, type CreateServerClientFromCookiesParams, type CreateServerClientFromRequestParams, type CreateSubaccountChallengeInput, type CreateSubaccountInput, type CreateSubaccountParams, type CreateSubaccountResult$1 as CreateSubaccountResult, type CreateSubaccountResult$1 as CreateSubaccountServiceResult, type CreateTradingWithdrawResult, type CreateTradingWithdrawToExternalChainInput, type CreateTradingWithdrawToExternalChainServiceInput, type CreateTradingWithdrawToFundingInput, type CreateTradingWithdrawToFundingServiceInput, type CreateTriggerInput, type CreateTriggerResult, type CreateWalletChallengeInput, type CurrencyConversionConfig, type CurrencyConversionRates, type CurrencyMetadata, type DailyClaimReward, type DailyClaimState, type DailyClaimStatus, type DailyClaimTransfer, type DecideAssistantApprovalInput, type DeleteAddressBookEntryInput, type DeleteAddressBookTagInput, type DeleteAssistantMemoryInput, type DeleteMfaFactorInput, type DepositAddress, type DepositWithdrawConfig, type EffectiveSubaccountPermissions, type EquityGroupBy, type EquityHistoryInput, type EquityHistoryResponse, type EquitySeries, type EquitySeriesGrouping, type EvmHex, type ExportGuardSignerWalletResult, type FiatConversionRate, type FiatConversionSnapshot, type FinishPasskeyChallengeInput, type FinishPasskeyEnrollmentInput, type FinishPasskeyEnrollmentResult, type FinishTotpEnrollmentInput, type FinishTotpEnrollmentResult, type GeneratedUsernameOffer, type GetAddressBookViewInput, type GetBatchReplaceStatusInput, type GetBatchReplaceStatusResult, type GetCandlesColumnsInput, type GetCandlesInput, type GetChangelogPostInput, type GetInternalTransferInput, type GetInternalTransferResult, type GetLifecycleFlowInput, type GetLifecycleFlowOutput, type GetMarketTradesInput, type GetOrderDetailsInput, type GetOrderbookHeatmapInput, type GetOrderbookInput, type GetSpotFeeRatesInput, type GetSubaccountInput, type GetTriggerInput, type GetUnifiedAssetBalancesInput, type GetUserTradesInput, type GetVerificationResponse, type GetWalletBalancesInput, type GetWalletBalancesResult, type GetZippedAssetSupplyGroupInput, type GetZippedAssetSupplyInput, type GuardApproval, type GuardSignerScopedInput, type GuardSignerStatus, type HeatmapDepthValue, type HeatmapIntervalValue, type HeatmapQuantityModeValue, type HexAddress, InternalServerError, type InternalTransferDestination, type InternalTransferStatus, type InternalTransferWhitelistEntries, type InternalTransferWhitelistEntry, type InviteSubaccountMemberInput, type JwtAuthProvider, type LadderDetailsOutput, type LedgerBalance, type LedgerTransfer, type LedgerTransferSide, type LifecycleAssetIds, type LifecycleFlowDetail, type LifecycleFlowState, type LifecycleFlowStep, type LifecycleFlowStepActivity, type LifecycleFlowSummary, type LifecycleFlowSummaryProgress, type LifecycleFlowTimelineItem, type LifecycleFlowTxMatch, type LifecycleListOrderBy, type LifecycleListScope, type LifecycleReason, type LifecycleRequestFee, type LifecycleRequestFeeStatus, type LifecycleSort, type LifecycleTxLookupKind, type LifecycleZipperReason, type ListAddressBookEntriesInput, type ListApiKeyPoliciesResponse, type ListAssistantConversationsInput, type ListAssistantConversationsResult, type ListAssistantMemoriesInput, type ListAssistantMemoriesResult, type ListAssistantMessagesInput, type ListAssistantMessagesResult, type ListAutoWithdrawRunsInput, type ListAutoWithdrawRunsResult, type ListChangelogChangesInput, type ListChangelogChangesResult, type ListChangelogPostsInput, type ListChangelogPostsResult, type ListCheckpointsInput, type ListDepositAddressesInput, type ListInternalTransferWhitelistEntriesInput, type ListLifecycleFlowsByTxInput, type ListLifecycleFlowsByTxOutput, type ListLifecycleFlowsInput, type ListLifecycleFlowsOutput, type ListMarketOverviewInput, type ListMfaFactorsResult, type ListPriceAlertsInput, type ListPriceAlertsResult, type ListRewardAwardsInput, type ListRewardAwardsResult, type ListSubaccountInvitesInput, type ListTransferCounterpartiesInput, type ListTransferDestinationsInput, type ListTransfersInput, type ListTriggerEventsInput, type ListTriggerEventsResult, type ListTriggersInput, type ListTriggersResult, type LoginOptions, type LoginResult, type LoginWithWalletInput, type LoginWithWalletResponse, type MarketOverview, type MarketOverviewOrderBy, type MarketOverviewSort, type MarketOverviewSparkline, type MarketTrade, type Me, MfaEnrollmentRequiredError, type MfaFactor, MfaLastFactorRequiredError, MfaRequiredError, type MfaSessionInfo, MfaVerificationError, type MfaVerificationFailureReason, type MirroredWithdrawWhitelistEntry, type ModifyOrderInput, type ModifyOrderResult, type ModifyTriggerInput, type ModifyTriggerResult, NetworkError, type NewOrderInput, type NextVipTierThresholds, NotImplementedError, type OpenOrdersInput, type Order, type OrderDetails, type OrderErrorCode, type OrderErrorDetail, type OrderHistoryInput, type OrderIntentInput, type OrderLineage, type OrderTransfer, type OrderbookData, type OrderbookHeatmapDeltaBucket, type OrderbookHeatmapDeltaChain, type OrderbookHeatmapDeltaLevels, type OrderbookHeatmapKeyframe, type OrderbookHeatmapLevels, type OrderbookHeatmapLiveBucket, type OrderbookHeatmapResponse, type OrderbookLevel, type OrderbookStreamHandlers, type OrderbookSubscription, OutcomeUnknownError, POLYESTER_AUTH_TOKEN_COOKIE_NAME, POLYESTER_DEVNET_ENVIRONMENT, POLYESTER_SESSION_COOKIE_NAME, POLYESTER_TESTNET_ENVIRONMENT, type PairConfig, type PairStatus, type PauseTriggerInput, type PauseTriggerResult, PermissionError, type PolicyAction, PolicyInUseError, PolicyLockedError, type PolicyMarketScope, PolicyScopeMismatchError, type PolyesterAccountAbstractionEnvironment, PolyesterBrowserClient, type PolyesterBrowserClientConfig, PolyesterBrowserCore, PolyesterClient, type PolyesterClientBaseConfig, type PolyesterClientConfig, type PolyesterContractsEnvironment, PolyesterCore, type PolyesterEntryPointConfig, type PolyesterEnvironment, PolyesterError, type PolyesterErrorCode, type PolyesterErrorDetail, type PolyesterErrorOptions, type PolyesterMutationOptions, type PolyesterRealtime, type PolyesterRealtimeAuthConfig, type PolyesterRequestOptions, type PolyesterSafeDeploymentConfig, PolyesterServerClient, type PolyesterServerClientConfig, PolyesterServerCore, type PolyesterServices, type PortfolioEquityHistoryInput, type PortfolioEquityHistoryResponse, type PortfolioEquitySeries, type PortfolioEquitySeriesGrouping, type PortfolioEquitySnapshotResponse, PreconditionFailedError, type PrepareAssistantKeysInput, type PrepareAssistantKeysResult, type PreparedAssistantKey, type PreparedTradingWithdraw, type PreviewOrderResult, type PriceAlert, type PriceAlertChannel, type PriceAlertDirection, type PriceAlertPriceSource, type PriceAlertStatus, type PriceAlertUpdateOutcome, type PrivateOrdersEvent, type Profile, type RateLimitConfig, type RateLimitDetail, RateLimitError, type RateLimitErrorOptions, type RateLimitFailureReason, type RateLimitPolicyClass, type RateLimitRefillModel, type RateLimitScope, type RealtimeConnection, type RealtimeConnectionState, type RealtimeConnectionStatus, RealtimeError, type RealtimeErrorOptions, type RegenerateRecoveryCodesInput, type RegenerateRecoveryCodesResult, type ReleaseFreshStepUpInput, type RemoveSubaccountMemberInput, RequestDeadlineExceededError, RequestError, RequestTooLargeError, type ResolveAccountInput, type ResolvedAccount, type ResolvedInternalTransferDestination, ResourceNotFoundError, type RespondSubaccountInviteInput, type ResumeTriggerInput, type ResumeTriggerResult, RevisionConflictError, type RewardAward, type RewardFulfillmentMethod, type RewardFulfillmentState, type RiskPolicyInput, type RotateGuardSignerWalletResult, type SdkSubscriptionErrorContext, type SendAssistantMessageInput, type ServerSessionCookieOptions, type ServerSessionSnapshot, ServiceUnavailableError, type SessionData, SessionElevationRequiredError, type SetAssistantKeysInput, type SetAutoWithdrawRuleEnabledInput, type SetAutoWithdrawRuleInput, type SetRewardDestinationInput, type SetRewardDestinationResult, type SetSubaccountMemberMfaRequirementInput, type SignProtectedActionInput, type SocialProvider, type SocialProviderInput, type SocialVerification, type SocialVerificationErrorCode, type SocialVerificationMethod, type SocialVerificationStatus, type SparklineIntervalName, type SpotConfig, type SpotFeeDiscount, type SpotFeeRate, type SpotFeeRateBreakdown, type SpotPairVolumeSeries, type SpotVolumeHistoryInput, type SpotVolumeHistoryResponse, type StablecoinConversionRate, StaleQuoteError, type StartVerificationInput, type StartVerificationResponse, StepUpRequiredError, type StopDetailsOutput, type StopLossInput, type Subaccount, type SubaccountActivityInput, type SubaccountChallenge, SubaccountChallengeInvalidError, type SubaccountEvent, type SubaccountIdInput, type SubaccountInvite, type SubaccountInviteStatus, type SubaccountMember, type SubaccountPermission, type SubaccountPermissionDefinition, type SubaccountPolicy, type SubaccountPolicyApplyInput, type SubaccountPolicyCreateInput, type SubaccountPolicyUpdateInput, type SubaccountRole, type SubaccountRoleCatalog, type SubaccountRoleDefinition, type SubaccountScopedInput, type SubaccountStatus, type SubscribeHandlers, type SubscribeZippedAssetSupplyInput, type SystemVersion, type TakeProfitInput, type Timeframe, TimeoutError, TimestampSkewError, type Trade, type TradeBackfill, type TradingRateLimitClass, type TradingRateLimitRule, type TradingRateLimits, type TradingWithdrawSigningConfig, type TradingWithdrawWalletSigner, type TrailingDetailsOutput, type TrailingStopInput, type TransferCodeValue, type TransferCounterparties, type TransferCounterparty, type TransferDestination, type TransferDestinations, type TransferSideKind, TransientError, type Transports, type Trigger, type TriggerDetailsOutput, type TriggerEvent, type TwapDetailsOutput, type UnifiedAssetBalancesResponse, type UnlinkSocialAccountInput, type UpdateAddressBookEntryInput, type UpdateAddressBookTagInput, type UpdateMfaFactorInput, type UpdateMfaFactorResult, type UpdatePriceAlertInput, type UpdatePriceAlertResult, type UpdateProfileInput, type UpdateSubaccountInput, type UpdateSubaccountMemberRoleInput, UserOperationAlreadyKnownError, UserOperationNotExecutedError, UserOperationSendTimeoutError, type UsernameHistoryEntry, type ValidateWithdrawDestinationInput, type ValidateWithdrawDestinationResult, ValidationError, type VerificationReadyResponse, type VerifyRecoveryCodeChallengeInput, type VerifyTotpChallengeInput, type VipMetricQuality, type VipMetricStatus, type VipStatus, type VipTier, type VipTierCatalog, type WalletChallenge, type WatchAssistantRunInput, WithdrawDeadlineExpiredError, type WithdrawWhitelistView, type ZippedAssetSupplyBatch, type ZippedAssetSupplyGroupResponse, type ZippedAssetSupplyResponse, type ZippedAssetSupplySeries, type ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, type ZipperMemoRequirement, checksumEvmAddress, columnarTimestampSecAt, compareUnsignedIntegerStrings, connectErrorToPolyesterError, createCookieAuthTokenStorage, createErrorMappingInterceptor, createMemoryAuthTokenStorage, createPolyesterEnvironment, createPolyesterServerClientFromCookies, createPolyesterServerClientFromRequest, createPolyesterServerCoreFromCookies, createPolyesterServerCoreFromRequest, errorFromHttpStatus, evmHexToBytes, evmUtf8ToBytes, evmUtf8ToHex, expandColumnarTimestampsSec, formatConnectError, formatLedgerBalance, formatUserFacingError, isAbortError, isEvmAddress, isEvmAddressStrict, isFreshStepUpRequiredError, isMfaEnrollmentRequiredError, isMfaLastFactorRequiredError, isPolicyInUseError, isPolicyLockedError, isPolicyScopeMismatchError, isResourceNotFoundError, isRetryableError, isRevisionConflictError, isSessionElevationRequiredError, isTimeoutAbortError, keccak256Hex, loadErrorDetailDecoders, mergeLedgerBalances, normalizeErrorMessage, resolveAuthCookieName, shouldApplyReconciliationUpdate, tsObjToNsString as timestampToNanoseconds, toPolyesterError, validateCreateAddressBookEntryInput };
@@ -6,6 +6,15 @@ const API_KEY_STATUS_VALUES = [
6
6
  "disabled"
7
7
  ];
8
8
  const API_KEY_UPDATE_STATUS_VALUES = ["active", "disabled"];
9
+ /**
10
+ * `assistant` keys belong to the Polyester AI assistant: their policy can never move value out
11
+ * of the account. They are listed, updated and revoked like any key.
12
+ */
13
+ const ApiKeyPurposeCodec = { protoToOutput: {
14
+ [0]: "unspecified",
15
+ [1]: "standard",
16
+ [2]: "assistant"
17
+ } };
9
18
  const ApiKeyStatusCodec = {
10
19
  inputToProto: {
11
20
  active: 1,
@@ -19,6 +28,6 @@ const ApiKeyStatusCodec = {
19
28
  }
20
29
  };
21
30
  //#endregion
22
- export { API_KEY_STATUS_VALUES, API_KEY_UPDATE_STATUS_VALUES, ApiKeyStatusCodec };
31
+ export { API_KEY_STATUS_VALUES, API_KEY_UPDATE_STATUS_VALUES, ApiKeyPurposeCodec, ApiKeyStatusCodec };
23
32
 
24
33
  //# sourceMappingURL=api-keys.codecs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.codecs.js","names":[],"sources":["../../../src/services/api-keys/api-keys.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/api_keys_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const API_KEY_STATUS_VALUES = [\"active\", \"revoked\", \"disabled\"] as const;\nexport type ApiKeyStatusLabel = (typeof API_KEY_STATUS_VALUES)[number];\nexport const API_KEY_UPDATE_STATUS_VALUES = [\"active\", \"disabled\"] as const;\nexport type ApiKeyUpdateStatusLabel = (typeof API_KEY_UPDATE_STATUS_VALUES)[number];\n\nexport const ApiKeyStatusCodec = {\n inputToProto: {\n active: Proto.ApiKeyStatus.ACTIVE,\n disabled: Proto.ApiKeyStatus.DISABLED,\n } satisfies InputToProto<ApiKeyUpdateStatusLabel, Proto.ApiKeyStatus>,\n protoToOutput: {\n [Proto.ApiKeyStatus.API_KEY_STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.ApiKeyStatus.ACTIVE]: \"active\",\n [Proto.ApiKeyStatus.REVOKED]: \"revoked\",\n [Proto.ApiKeyStatus.DISABLED]: \"disabled\",\n } satisfies ProtoToOutput<Proto.ApiKeyStatus, ApiKeyStatusLabel>,\n} as const;\n"],"mappings":";;AAGA,MAAa,wBAAwB;CAAC;CAAU;CAAW;AAAU;AAErE,MAAa,+BAA+B,CAAC,UAAU,UAAU;AAGjE,MAAa,oBAAoB;CAC7B,cAAc;EACV,QAAA;EACA,UAAA;CACJ;CACA,eAAe;GACsC,IAAA;GACpB,IAAA;GACC,IAAA;GACC,IAAA;CACnC;AACJ"}
1
+ {"version":3,"file":"api-keys.codecs.js","names":[],"sources":["../../../src/services/api-keys/api-keys.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/api_keys_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const API_KEY_STATUS_VALUES = [\"active\", \"revoked\", \"disabled\"] as const;\nexport type ApiKeyStatusLabel = (typeof API_KEY_STATUS_VALUES)[number];\nexport const API_KEY_UPDATE_STATUS_VALUES = [\"active\", \"disabled\"] as const;\nexport type ApiKeyUpdateStatusLabel = (typeof API_KEY_UPDATE_STATUS_VALUES)[number];\nexport const API_KEY_PURPOSE_VALUES = [\"standard\", \"assistant\"] as const;\nexport type ApiKeyPurposeLabel = (typeof API_KEY_PURPOSE_VALUES)[number];\n\n/**\n * `assistant` keys belong to the Polyester AI assistant: their policy can never move value out\n * of the account. They are listed, updated and revoked like any key.\n */\nexport const ApiKeyPurposeCodec = {\n protoToOutput: {\n [Proto.ApiKeyPurpose.PURPOSE_UNSPECIFIED]: \"unspecified\",\n [Proto.ApiKeyPurpose.STANDARD]: \"standard\",\n [Proto.ApiKeyPurpose.ASSISTANT]: \"assistant\",\n } satisfies ProtoToOutput<Proto.ApiKeyPurpose, ApiKeyPurposeLabel>,\n} as const;\n\nexport const ApiKeyStatusCodec = {\n inputToProto: {\n active: Proto.ApiKeyStatus.ACTIVE,\n disabled: Proto.ApiKeyStatus.DISABLED,\n } satisfies InputToProto<ApiKeyUpdateStatusLabel, Proto.ApiKeyStatus>,\n protoToOutput: {\n [Proto.ApiKeyStatus.API_KEY_STATUS_UNSPECIFIED]: \"unspecified\",\n [Proto.ApiKeyStatus.ACTIVE]: \"active\",\n [Proto.ApiKeyStatus.REVOKED]: \"revoked\",\n [Proto.ApiKeyStatus.DISABLED]: \"disabled\",\n } satisfies ProtoToOutput<Proto.ApiKeyStatus, ApiKeyStatusLabel>,\n} as const;\n"],"mappings":";;AAGA,MAAa,wBAAwB;CAAC;CAAU;CAAW;AAAU;AAErE,MAAa,+BAA+B,CAAC,UAAU,UAAU;;;;;AASjE,MAAa,qBAAqB,EAC9B,eAAe;EACgC,IAAA;EACX,IAAA;EACC,IAAA;AACrC,EACJ;AAEA,MAAa,oBAAoB;CAC7B,cAAc;EACV,QAAA;EACA,UAAA;CACJ;CACA,eAAe;GACsC,IAAA;GACpB,IAAA;GACC,IAAA;GACC,IAAA;CACnC;AACJ"}
@@ -6,7 +6,7 @@ import "../../realtime/index.js";
6
6
  import { BaseSubscribeInput } from "../../shared/types.js";
7
7
  import { ApiKeyPoliciesService } from "../policies/api-key-policies/api-key-policies.js";
8
8
  import "../policies/api-key-policies/index.js";
9
- import { ApiKey, ApiKeyIdInputSchema, ApiKeysCreateInputSchema, ApiKeysListInputSchema, ApiKeysUpdateInputSchema } from "./api-keys.schemas.js";
9
+ import { ApiKey, ApiKeyIdInputSchema, ApiKeysCreateInputSchema, ApiKeysListInputSchema, ApiKeysUpdateInputSchema, SetAssistantKeysInput } from "./api-keys.schemas.js";
10
10
  import * as v from "valibot";
11
11
  //#region src/services/api-keys/api-keys.d.ts
12
12
  interface SubscribeApiKeysInput extends BaseSubscribeInput<ApiKey> {
@@ -39,6 +39,21 @@ declare class ApiKeysService {
39
39
  * Updates mutable key metadata, ACTIVE/DISABLED status, IP whitelist replacement/clearing, and optional expiry; revocation must use delete.
40
40
  */
41
41
  update(payload: v.InferInput<typeof ApiKeysUpdateInputSchema>, options?: PolyesterMutationOptions): Promise<ApiKey | null>;
42
+ /**
43
+ * Replaces the caller's Polyester AI assistant key set: one `assistant` key per account,
44
+ * each bounded by its API policy, all or nothing. Register the keys `assistant.prepareKeys`
45
+ * returned before their deadline, then call `assistant.completeKeys`. Needs a fresh
46
+ * `stepUpToken` for the whole set. A policy that allows moving value out throws
47
+ * `PreconditionFailedError` (`AUTH_ASSISTANT_KEY_ACTION_NOT_ALLOWED`).
48
+ */
49
+ setAssistantKeys(input: SetAssistantKeysInput, options?: PolyesterMutationOptions): Promise<ApiKey[]>;
50
+ /** Lists the caller's non-revoked assistant keys, newest first. */
51
+ listAssistantKeys(options?: PolyesterRequestOptions): Promise<ApiKey[]>;
52
+ /**
53
+ * Permanently revokes the caller's whole assistant key set; needs no step-up. Returns the
54
+ * revoked key IDs, empty when the set was already empty.
55
+ */
56
+ deleteAssistantKeys(options?: PolyesterMutationOptions): Promise<string[]>;
42
57
  /**
43
58
  * Generates an Ed25519 keypair locally and returns public and secret key material as both hex strings and byte arrays; only the public key should be sent to the API.
44
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.d.ts","names":[],"sources":["../../../src/services/api-keys/api-keys.ts"],"mappings":";;;;;;;;;;;UA2BU,8BAA8B,mBAAmB;EACvD;;;;;cAMS;;WACA,UAAU;EAOf,YAAA,YAAY,mBACZ,UAAU,mBACV,WAAW;;;;EAWT,KACF,SAAQ,EAAE,kBAAkB,yBAC5B,UAAU,0BACX,QAAQ;;;;EAcL,IACF,OAAO,EAAE,kBAAkB,sBAC3B,UAAU,0BACX,QAAQ;;;;EASL,OACF,SAAS,EAAE,kBAAkB,2BAC7B,UAAU,2BACX,QAAQ;;;;EAaL,OACF,OAAO,EAAE,kBAAkB,sBAC3B,UAAU,2BACX;;;;EAQG,OACF,SAAS,EAAE,kBAAkB,2BAC7B,UAAU,2BACX,QAAQ;;;;EAYL,mBAAmB;IACrB;MAAa;MAAa,OAAO;;IACjC;MAAa;MAAa,OAAO;;;;;;EAkBrC,UAAU,OAAO"}
1
+ {"version":3,"file":"api-keys.d.ts","names":[],"sources":["../../../src/services/api-keys/api-keys.ts"],"mappings":";;;;;;;;;;;UA6BU,8BAA8B,mBAAmB;EACvD;;;;;cAMS;;WACA,UAAU;EAOf,YAAA,YAAY,mBACZ,UAAU,mBACV,WAAW;;;;EAWT,KACF,SAAQ,EAAE,kBAAkB,yBAC5B,UAAU,0BACX,QAAQ;;;;EAcL,IACF,OAAO,EAAE,kBAAkB,sBAC3B,UAAU,0BACX,QAAQ;;;;EASL,OACF,SAAS,EAAE,kBAAkB,2BAC7B,UAAU,2BACX,QAAQ;;;;EAaL,OACF,OAAO,EAAE,kBAAkB,sBAC3B,UAAU,2BACX;;;;EAQG,OACF,SAAS,EAAE,kBAAkB,2BAC7B,UAAU,2BACX,QAAQ;;;;;;;;EAgBL,iBACF,OAAO,uBACP,UAAU,2BACX,QAAQ;;EAUL,kBAAkB,UAAU,0BAA0B,QAAQ;;;;;EAS9D,oBAAoB,UAAU,2BAA2B;;;;EAQzD,mBAAmB;IACrB;MAAa;MAAa,OAAO;;IACjC;MAAa;MAAa,OAAO;;;;;;EAkBrC,UAAU,OAAO"}
@@ -4,7 +4,7 @@ import { toConnectCallOptions } from "../../shared/request-options.js";
4
4
  import { ApiKeySchema, ApiKeyService } from "../../gen/auth/v1/api_keys_pb.js";
5
5
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
6
6
  import { ApiKeyPoliciesService } from "../policies/api-key-policies/api-key-policies.js";
7
- import { ApiKeyIdInputSchema, ApiKeySchema as ApiKeySchema$1, ApiKeysCreateInputSchema, ApiKeysListInputSchema, ApiKeysSchema, ApiKeysUpdateInputSchema } from "./api-keys.schemas.js";
7
+ import { ApiKeyIdInputSchema, ApiKeySchema as ApiKeySchema$1, ApiKeysCreateInputSchema, ApiKeysListInputSchema, ApiKeysSchema, ApiKeysUpdateInputSchema, SetAssistantKeysInputSchema } from "./api-keys.schemas.js";
8
8
  import { createClient } from "@connectrpc/connect";
9
9
  import { bytesToHex } from "@noble/hashes/utils.js";
10
10
  import { keygenAsync } from "@noble/ed25519";
@@ -65,6 +65,30 @@ var ApiKeysService = class {
65
65
  return res.apiKey ? parse(ApiKeySchema$1, res.apiKey) : null;
66
66
  }
67
67
  /**
68
+ * Replaces the caller's Polyester AI assistant key set: one `assistant` key per account,
69
+ * each bounded by its API policy, all or nothing. Register the keys `assistant.prepareKeys`
70
+ * returned before their deadline, then call `assistant.completeKeys`. Needs a fresh
71
+ * `stepUpToken` for the whole set. A policy that allows moving value out throws
72
+ * `PreconditionFailedError` (`AUTH_ASSISTANT_KEY_ACTION_NOT_ALLOWED`).
73
+ */
74
+ async setAssistantKeys(input, options) {
75
+ const request = parse(SetAssistantKeysInputSchema, input);
76
+ const res = await this.#client.setAssistantKeys({ keys: request.keys.map((key) => removeUndefined(key)) }, toConnectCallOptions(options));
77
+ return parse(ApiKeysSchema, res.apiKeys);
78
+ }
79
+ /** Lists the caller's non-revoked assistant keys, newest first. */
80
+ async listAssistantKeys(options) {
81
+ const res = await this.#client.listAssistantKeys({}, toConnectCallOptions(options));
82
+ return parse(ApiKeysSchema, res.apiKeys);
83
+ }
84
+ /**
85
+ * Permanently revokes the caller's whole assistant key set; needs no step-up. Returns the
86
+ * revoked key IDs, empty when the set was already empty.
87
+ */
88
+ async deleteAssistantKeys(options) {
89
+ return (await this.#client.deleteAssistantKeys({}, toConnectCallOptions(options))).revokedKeyIds;
90
+ }
91
+ /**
68
92
  * Generates an Ed25519 keypair locally and returns public and secret key material as both hex strings and byte arrays; only the public key should be sent to the API.
69
93
  */
70
94
  async generateKeypair() {
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.js","names":["#client","Proto.ApiKeyService","#realtime","#resolver","ApiKeySchema","Proto.ApiKeySchema"],"sources":["../../../src/services/api-keys/api-keys.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/api_keys_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport type * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport { bytesToHex } from \"@noble/hashes/utils.js\";\nimport { keygenAsync } from \"@noble/ed25519\";\nimport type { PolyesterRealtime } from \"../../realtime/index.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport { ApiKeyPoliciesService } from \"../policies/api-key-policies/index.js\";\nimport {\n ApiKeyIdInputSchema,\n ApiKeysListInputSchema,\n ApiKeysCreateInputSchema,\n ApiKeysUpdateInputSchema,\n ApiKeySchema,\n ApiKeysSchema,\n type ApiKey,\n} from \"./api-keys.schemas.js\";\n\ninterface SubscribeApiKeysInput extends BaseSubscribeInput<ApiKey> {\n accountId: string;\n}\n\n/**\n * Manages API key metadata, client-generated Ed25519 keypairs, policies, and realtime API key updates.\n */\nexport class ApiKeysService {\n readonly policies: ApiKeyPoliciesService;\n\n #client: Client<typeof Proto.ApiKeyService>;\n #realtime: PolyesterRealtime;\n #resolver?: SubaccountResolver;\n\n constructor(\n transports: AuthApiTransports,\n realtime: PolyesterRealtime,\n resolver?: SubaccountResolver,\n ) {\n this.policies = new ApiKeyPoliciesService(transports);\n this.#client = createClient(Proto.ApiKeyService, transports.authApi);\n this.#realtime = realtime;\n this.#resolver = resolver;\n }\n\n /**\n * Returns non-revoked API keys owned by the caller, newest first, optionally scoped through an explicit or resolver-provided subaccount ID.\n */\n async list(\n params: v.InferInput<typeof ApiKeysListInputSchema> = {},\n options?: PolyesterRequestOptions,\n ): Promise<ApiKey[]> {\n const resolved = resolveAccountScopedInput(params, this.#resolver);\n const validatedParams = parse(ApiKeysListInputSchema, resolved);\n const res = await this.#client.listApiKeys(\n removeUndefined(validatedParams),\n toConnectCallOptions(options),\n );\n\n return parse(ApiKeysSchema, res.apiKeys);\n }\n\n /**\n * Fetches one caller-owned API key by ak_... key ID and returns null when no matching key is returned.\n */\n async get(\n input: v.InferInput<typeof ApiKeyIdInputSchema>,\n options?: PolyesterRequestOptions,\n ): Promise<ApiKey | null> {\n const validatedInput = parse(ApiKeyIdInputSchema, input);\n const res = await this.#client.getApiKey(validatedInput, toConnectCallOptions(options));\n return res.apiKey ? parse(ApiKeySchema, res.apiKey) : null;\n }\n\n /**\n * Creates API key metadata using a client-generated Ed25519 public key; security settings may require MFA fresh step-up and retrying with stepUpToken.\n */\n async create(\n payload: v.InferInput<typeof ApiKeysCreateInputSchema>,\n options?: PolyesterMutationOptions,\n ): Promise<ApiKey | null> {\n const resolved = resolveAccountScopedInput(payload, this.#resolver);\n const validatedPayload = parse(ApiKeysCreateInputSchema, resolved);\n const res = await this.#client.createApiKey(\n removeUndefined(validatedPayload),\n toConnectCallOptions(options),\n );\n return res.apiKey ? parse(ApiKeySchema, res.apiKey) : null;\n }\n\n /**\n * Permanently revokes the specified API key; revoked keys cannot authenticate again.\n */\n async delete(\n input: v.InferInput<typeof ApiKeyIdInputSchema>,\n options?: PolyesterMutationOptions,\n ): Promise<void> {\n const validatedInput = parse(ApiKeyIdInputSchema, input);\n await this.#client.deleteApiKey(validatedInput, toConnectCallOptions(options));\n }\n\n /**\n * Updates mutable key metadata, ACTIVE/DISABLED status, IP whitelist replacement/clearing, and optional expiry; revocation must use delete.\n */\n async update(\n payload: v.InferInput<typeof ApiKeysUpdateInputSchema>,\n options?: PolyesterMutationOptions,\n ): Promise<ApiKey | null> {\n const validatedPayload = parse(ApiKeysUpdateInputSchema, payload);\n const res = await this.#client.updateApiKey(\n removeUndefined(validatedPayload),\n toConnectCallOptions(options),\n );\n return res.apiKey ? parse(ApiKeySchema, res.apiKey) : null;\n }\n\n /**\n * Generates an Ed25519 keypair locally and returns public and secret key material as both hex strings and byte arrays; only the public key should be sent to the API.\n */\n async generateKeypair(): Promise<{\n publicKey: { hex: string; bytes: Uint8Array };\n secretKey: { hex: string; bytes: Uint8Array };\n }> {\n const { secretKey, publicKey } = await keygenAsync();\n return {\n publicKey: {\n hex: bytesToHex(publicKey),\n bytes: publicKey,\n },\n secretKey: {\n hex: bytesToHex(secretKey),\n bytes: secretKey,\n },\n };\n }\n\n /**\n * Subscribes to private API key updates for an account and emits normalized API key metadata from realtime protobuf publications.\n */\n subscribe(input: SubscribeApiKeysInput) {\n const channel = `private:auth:api-keys:${input.accountId}:proto`;\n\n return this.#realtime.connectProtoChannel({\n channel,\n schema: Proto.ApiKeySchema,\n onPublication: (data) => {\n const apiKey = parse(ApiKeySchema, data);\n input.onEvent(apiKey);\n },\n onConnected: () => input.onOpen?.(),\n onDisconnected: () => input.onClose?.(),\n onError: input.onError,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAkCA,IAAa,iBAAb,MAA4B;CACxB;CAEA;CACA;CACA;CAEA,YACI,YACA,UACA,UACF;EACE,KAAK,WAAW,IAAI,sBAAsB,UAAU;EACpD,KAAKA,UAAU,aAAaC,eAAqB,WAAW,OAAO;EACnE,KAAKC,YAAY;EACjB,KAAKC,YAAY;CACrB;;;;CAKA,MAAM,KACF,SAAsD,CAAC,GACvD,SACiB;EACjB,MAAM,WAAW,0BAA0B,QAAQ,KAAKA,SAAS;EACjE,MAAM,kBAAkB,MAAM,wBAAwB,QAAQ;EAC9D,MAAM,MAAM,MAAM,KAAKH,QAAQ,YAC3B,gBAAgB,eAAe,GAC/B,qBAAqB,OAAO,CAChC;EAEA,OAAO,MAAM,eAAe,IAAI,OAAO;CAC3C;;;;CAKA,MAAM,IACF,OACA,SACsB;EACtB,MAAM,iBAAiB,MAAM,qBAAqB,KAAK;EACvD,MAAM,MAAM,MAAM,KAAKA,QAAQ,UAAU,gBAAgB,qBAAqB,OAAO,CAAC;EACtF,OAAO,IAAI,SAAS,MAAMI,gBAAc,IAAI,MAAM,IAAI;CAC1D;;;;CAKA,MAAM,OACF,SACA,SACsB;EACtB,MAAM,WAAW,0BAA0B,SAAS,KAAKD,SAAS;EAClE,MAAM,mBAAmB,MAAM,0BAA0B,QAAQ;EACjE,MAAM,MAAM,MAAM,KAAKH,QAAQ,aAC3B,gBAAgB,gBAAgB,GAChC,qBAAqB,OAAO,CAChC;EACA,OAAO,IAAI,SAAS,MAAMI,gBAAc,IAAI,MAAM,IAAI;CAC1D;;;;CAKA,MAAM,OACF,OACA,SACa;EACb,MAAM,iBAAiB,MAAM,qBAAqB,KAAK;EACvD,MAAM,KAAKJ,QAAQ,aAAa,gBAAgB,qBAAqB,OAAO,CAAC;CACjF;;;;CAKA,MAAM,OACF,SACA,SACsB;EACtB,MAAM,mBAAmB,MAAM,0BAA0B,OAAO;EAChE,MAAM,MAAM,MAAM,KAAKA,QAAQ,aAC3B,gBAAgB,gBAAgB,GAChC,qBAAqB,OAAO,CAChC;EACA,OAAO,IAAI,SAAS,MAAMI,gBAAc,IAAI,MAAM,IAAI;CAC1D;;;;CAKA,MAAM,kBAGH;EACC,MAAM,EAAE,WAAW,cAAc,MAAM,YAAY;EACnD,OAAO;GACH,WAAW;IACP,KAAK,WAAW,SAAS;IACzB,OAAO;GACX;GACA,WAAW;IACP,KAAK,WAAW,SAAS;IACzB,OAAO;GACX;EACJ;CACJ;;;;CAKA,UAAU,OAA8B;EACpC,MAAM,UAAU,yBAAyB,MAAM,UAAU;EAEzD,OAAO,KAAKF,UAAU,oBAAoB;GACtC;GACA,QAAQG;GACR,gBAAgB,SAAS;IACrB,MAAM,SAAS,MAAMD,gBAAc,IAAI;IACvC,MAAM,QAAQ,MAAM;GACxB;GACA,mBAAmB,MAAM,SAAS;GAClC,sBAAsB,MAAM,UAAU;GACtC,SAAS,MAAM;EACnB,CAAC;CACL;AACJ"}
1
+ {"version":3,"file":"api-keys.js","names":["#client","Proto.ApiKeyService","#realtime","#resolver","ApiKeySchema","Proto.ApiKeySchema"],"sources":["../../../src/services/api-keys/api-keys.ts"],"sourcesContent":["import { createClient, type Client } from \"@connectrpc/connect\";\nimport * as Proto from \"../../gen/auth/v1/api_keys_pb.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport type * as v from \"valibot\";\nimport { parse } from \"../../shared/validation.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport { bytesToHex } from \"@noble/hashes/utils.js\";\nimport { keygenAsync } from \"@noble/ed25519\";\nimport type { PolyesterRealtime } from \"../../realtime/index.js\";\nimport type { BaseSubscribeInput } from \"../../shared/types.js\";\nimport { ApiKeyPoliciesService } from \"../policies/api-key-policies/index.js\";\nimport {\n ApiKeyIdInputSchema,\n ApiKeysListInputSchema,\n ApiKeysCreateInputSchema,\n ApiKeysUpdateInputSchema,\n ApiKeySchema,\n ApiKeysSchema,\n SetAssistantKeysInputSchema,\n type ApiKey,\n type SetAssistantKeysInput,\n} from \"./api-keys.schemas.js\";\n\ninterface SubscribeApiKeysInput extends BaseSubscribeInput<ApiKey> {\n accountId: string;\n}\n\n/**\n * Manages API key metadata, client-generated Ed25519 keypairs, policies, and realtime API key updates.\n */\nexport class ApiKeysService {\n readonly policies: ApiKeyPoliciesService;\n\n #client: Client<typeof Proto.ApiKeyService>;\n #realtime: PolyesterRealtime;\n #resolver?: SubaccountResolver;\n\n constructor(\n transports: AuthApiTransports,\n realtime: PolyesterRealtime,\n resolver?: SubaccountResolver,\n ) {\n this.policies = new ApiKeyPoliciesService(transports);\n this.#client = createClient(Proto.ApiKeyService, transports.authApi);\n this.#realtime = realtime;\n this.#resolver = resolver;\n }\n\n /**\n * Returns non-revoked API keys owned by the caller, newest first, optionally scoped through an explicit or resolver-provided subaccount ID.\n */\n async list(\n params: v.InferInput<typeof ApiKeysListInputSchema> = {},\n options?: PolyesterRequestOptions,\n ): Promise<ApiKey[]> {\n const resolved = resolveAccountScopedInput(params, this.#resolver);\n const validatedParams = parse(ApiKeysListInputSchema, resolved);\n const res = await this.#client.listApiKeys(\n removeUndefined(validatedParams),\n toConnectCallOptions(options),\n );\n\n return parse(ApiKeysSchema, res.apiKeys);\n }\n\n /**\n * Fetches one caller-owned API key by ak_... key ID and returns null when no matching key is returned.\n */\n async get(\n input: v.InferInput<typeof ApiKeyIdInputSchema>,\n options?: PolyesterRequestOptions,\n ): Promise<ApiKey | null> {\n const validatedInput = parse(ApiKeyIdInputSchema, input);\n const res = await this.#client.getApiKey(validatedInput, toConnectCallOptions(options));\n return res.apiKey ? parse(ApiKeySchema, res.apiKey) : null;\n }\n\n /**\n * Creates API key metadata using a client-generated Ed25519 public key; security settings may require MFA fresh step-up and retrying with stepUpToken.\n */\n async create(\n payload: v.InferInput<typeof ApiKeysCreateInputSchema>,\n options?: PolyesterMutationOptions,\n ): Promise<ApiKey | null> {\n const resolved = resolveAccountScopedInput(payload, this.#resolver);\n const validatedPayload = parse(ApiKeysCreateInputSchema, resolved);\n const res = await this.#client.createApiKey(\n removeUndefined(validatedPayload),\n toConnectCallOptions(options),\n );\n return res.apiKey ? parse(ApiKeySchema, res.apiKey) : null;\n }\n\n /**\n * Permanently revokes the specified API key; revoked keys cannot authenticate again.\n */\n async delete(\n input: v.InferInput<typeof ApiKeyIdInputSchema>,\n options?: PolyesterMutationOptions,\n ): Promise<void> {\n const validatedInput = parse(ApiKeyIdInputSchema, input);\n await this.#client.deleteApiKey(validatedInput, toConnectCallOptions(options));\n }\n\n /**\n * Updates mutable key metadata, ACTIVE/DISABLED status, IP whitelist replacement/clearing, and optional expiry; revocation must use delete.\n */\n async update(\n payload: v.InferInput<typeof ApiKeysUpdateInputSchema>,\n options?: PolyesterMutationOptions,\n ): Promise<ApiKey | null> {\n const validatedPayload = parse(ApiKeysUpdateInputSchema, payload);\n const res = await this.#client.updateApiKey(\n removeUndefined(validatedPayload),\n toConnectCallOptions(options),\n );\n return res.apiKey ? parse(ApiKeySchema, res.apiKey) : null;\n }\n\n /**\n * Replaces the caller's Polyester AI assistant key set: one `assistant` key per account,\n * each bounded by its API policy, all or nothing. Register the keys `assistant.prepareKeys`\n * returned before their deadline, then call `assistant.completeKeys`. Needs a fresh\n * `stepUpToken` for the whole set. A policy that allows moving value out throws\n * `PreconditionFailedError` (`AUTH_ASSISTANT_KEY_ACTION_NOT_ALLOWED`).\n */\n async setAssistantKeys(\n input: SetAssistantKeysInput,\n options?: PolyesterMutationOptions,\n ): Promise<ApiKey[]> {\n const request = parse(SetAssistantKeysInputSchema, input);\n const res = await this.#client.setAssistantKeys(\n { keys: request.keys.map((key) => removeUndefined(key)) },\n toConnectCallOptions(options),\n );\n return parse(ApiKeysSchema, res.apiKeys);\n }\n\n /** Lists the caller's non-revoked assistant keys, newest first. */\n async listAssistantKeys(options?: PolyesterRequestOptions): Promise<ApiKey[]> {\n const res = await this.#client.listAssistantKeys({}, toConnectCallOptions(options));\n return parse(ApiKeysSchema, res.apiKeys);\n }\n\n /**\n * Permanently revokes the caller's whole assistant key set; needs no step-up. Returns the\n * revoked key IDs, empty when the set was already empty.\n */\n async deleteAssistantKeys(options?: PolyesterMutationOptions): Promise<string[]> {\n const res = await this.#client.deleteAssistantKeys({}, toConnectCallOptions(options));\n return res.revokedKeyIds;\n }\n\n /**\n * Generates an Ed25519 keypair locally and returns public and secret key material as both hex strings and byte arrays; only the public key should be sent to the API.\n */\n async generateKeypair(): Promise<{\n publicKey: { hex: string; bytes: Uint8Array };\n secretKey: { hex: string; bytes: Uint8Array };\n }> {\n const { secretKey, publicKey } = await keygenAsync();\n return {\n publicKey: {\n hex: bytesToHex(publicKey),\n bytes: publicKey,\n },\n secretKey: {\n hex: bytesToHex(secretKey),\n bytes: secretKey,\n },\n };\n }\n\n /**\n * Subscribes to private API key updates for an account and emits normalized API key metadata from realtime protobuf publications.\n */\n subscribe(input: SubscribeApiKeysInput) {\n const channel = `private:auth:api-keys:${input.accountId}:proto`;\n\n return this.#realtime.connectProtoChannel({\n channel,\n schema: Proto.ApiKeySchema,\n onPublication: (data) => {\n const apiKey = parse(ApiKeySchema, data);\n input.onEvent(apiKey);\n },\n onConnected: () => input.onOpen?.(),\n onDisconnected: () => input.onClose?.(),\n onError: input.onError,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAoCA,IAAa,iBAAb,MAA4B;CACxB;CAEA;CACA;CACA;CAEA,YACI,YACA,UACA,UACF;EACE,KAAK,WAAW,IAAI,sBAAsB,UAAU;EACpD,KAAKA,UAAU,aAAaC,eAAqB,WAAW,OAAO;EACnE,KAAKC,YAAY;EACjB,KAAKC,YAAY;CACrB;;;;CAKA,MAAM,KACF,SAAsD,CAAC,GACvD,SACiB;EACjB,MAAM,WAAW,0BAA0B,QAAQ,KAAKA,SAAS;EACjE,MAAM,kBAAkB,MAAM,wBAAwB,QAAQ;EAC9D,MAAM,MAAM,MAAM,KAAKH,QAAQ,YAC3B,gBAAgB,eAAe,GAC/B,qBAAqB,OAAO,CAChC;EAEA,OAAO,MAAM,eAAe,IAAI,OAAO;CAC3C;;;;CAKA,MAAM,IACF,OACA,SACsB;EACtB,MAAM,iBAAiB,MAAM,qBAAqB,KAAK;EACvD,MAAM,MAAM,MAAM,KAAKA,QAAQ,UAAU,gBAAgB,qBAAqB,OAAO,CAAC;EACtF,OAAO,IAAI,SAAS,MAAMI,gBAAc,IAAI,MAAM,IAAI;CAC1D;;;;CAKA,MAAM,OACF,SACA,SACsB;EACtB,MAAM,WAAW,0BAA0B,SAAS,KAAKD,SAAS;EAClE,MAAM,mBAAmB,MAAM,0BAA0B,QAAQ;EACjE,MAAM,MAAM,MAAM,KAAKH,QAAQ,aAC3B,gBAAgB,gBAAgB,GAChC,qBAAqB,OAAO,CAChC;EACA,OAAO,IAAI,SAAS,MAAMI,gBAAc,IAAI,MAAM,IAAI;CAC1D;;;;CAKA,MAAM,OACF,OACA,SACa;EACb,MAAM,iBAAiB,MAAM,qBAAqB,KAAK;EACvD,MAAM,KAAKJ,QAAQ,aAAa,gBAAgB,qBAAqB,OAAO,CAAC;CACjF;;;;CAKA,MAAM,OACF,SACA,SACsB;EACtB,MAAM,mBAAmB,MAAM,0BAA0B,OAAO;EAChE,MAAM,MAAM,MAAM,KAAKA,QAAQ,aAC3B,gBAAgB,gBAAgB,GAChC,qBAAqB,OAAO,CAChC;EACA,OAAO,IAAI,SAAS,MAAMI,gBAAc,IAAI,MAAM,IAAI;CAC1D;;;;;;;;CASA,MAAM,iBACF,OACA,SACiB;EACjB,MAAM,UAAU,MAAM,6BAA6B,KAAK;EACxD,MAAM,MAAM,MAAM,KAAKJ,QAAQ,iBAC3B,EAAE,MAAM,QAAQ,KAAK,KAAK,QAAQ,gBAAgB,GAAG,CAAC,EAAE,GACxD,qBAAqB,OAAO,CAChC;EACA,OAAO,MAAM,eAAe,IAAI,OAAO;CAC3C;;CAGA,MAAM,kBAAkB,SAAsD;EAC1E,MAAM,MAAM,MAAM,KAAKA,QAAQ,kBAAkB,CAAC,GAAG,qBAAqB,OAAO,CAAC;EAClF,OAAO,MAAM,eAAe,IAAI,OAAO;CAC3C;;;;;CAMA,MAAM,oBAAoB,SAAuD;EAE7E,QAAO,MADW,KAAKA,QAAQ,oBAAoB,CAAC,GAAG,qBAAqB,OAAO,CAAC,EAAA,CACzE;CACf;;;;CAKA,MAAM,kBAGH;EACC,MAAM,EAAE,WAAW,cAAc,MAAM,YAAY;EACnD,OAAO;GACH,WAAW;IACP,KAAK,WAAW,SAAS;IACzB,OAAO;GACX;GACA,WAAW;IACP,KAAK,WAAW,SAAS;IACzB,OAAO;GACX;EACJ;CACJ;;;;CAKA,UAAU,OAA8B;EACpC,MAAM,UAAU,yBAAyB,MAAM,UAAU;EAEzD,OAAO,KAAKE,UAAU,oBAAoB;GACtC;GACA,QAAQG;GACR,gBAAgB,SAAS;IACrB,MAAM,SAAS,MAAMD,gBAAc,IAAI;IACvC,MAAM,QAAQ,MAAM;GACxB;GACA,mBAAmB,MAAM,SAAS;GAClC,sBAAsB,MAAM,UAAU;GACtC,SAAS,MAAM;EACnB,CAAC;CACL;AACJ"}
@@ -134,6 +134,8 @@ declare const ApiKeySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
134
134
  nanos: number;
135
135
  } | undefined, string | undefined>]>;
136
136
  readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "active" | "disabled" | "revoked">]>;
137
+ /** `"standard"`, `"assistant"`, or `"unspecified"` from older servers. */
138
+ readonly purpose: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "standard" | "assistant">]>, 0>;
137
139
  readonly createdByActor: v.StringSchema<undefined>;
138
140
  readonly revision: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
139
141
  }, undefined>, v.TransformAction<{
@@ -153,6 +155,7 @@ declare const ApiKeySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
153
155
  publicKeyEd25519: Uint8Array<ArrayBufferLike>;
154
156
  expiresAt?: string | undefined;
155
157
  status: "unspecified" | "active" | "disabled" | "revoked";
158
+ purpose: "unspecified" | "standard" | "assistant";
156
159
  createdByActor: string;
157
160
  revision: string;
158
161
  }, {
@@ -171,10 +174,122 @@ declare const ApiKeySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
171
174
  publicKeyEd25519: Uint8Array<ArrayBufferLike>;
172
175
  expiresAt?: string | undefined;
173
176
  status: "unspecified" | "active" | "disabled" | "revoked";
177
+ purpose: "unspecified" | "standard" | "assistant";
174
178
  createdByActor: string;
175
179
  revision: string;
176
180
  }>]>;
177
181
  type ApiKey = v.InferOutput<typeof ApiKeySchema>;
182
+ /**
183
+ * One account's key in the assistant key set. Spread a key from `assistant.prepareKeys` and add
184
+ * its `policyId`; other fields (like `publicKeyHex`) are ignored.
185
+ */
186
+ declare const AssistantKeySpecInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
187
+ /** Subaccount the key acts for; omit for the main account. */
188
+ readonly subaccountId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
189
+ /** 32-byte Ed25519 public key from `assistant.prepareKeys`. */
190
+ readonly publicKeyEd25519: v.SchemaWithPipe<readonly [v.InstanceSchema<{
191
+ new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array<ArrayBufferLike>;
192
+ readonly prototype: Uint8Array<ArrayBufferLike>;
193
+ readonly BYTES_PER_ELEMENT: number;
194
+ of(...items: number[]): Uint8Array<ArrayBuffer>;
195
+ from(arrayLike: ArrayLike<number>): Uint8Array<ArrayBuffer>;
196
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
197
+ from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
198
+ from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
199
+ }, undefined>, v.LengthAction<Uint8Array<ArrayBufferLike>, 32, "publicKeyEd25519 must be 32 bytes">]>;
200
+ /** API policy that bounds the key. It must not allow moving value out of the account. */
201
+ readonly policyId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
202
+ /** Epoch ms from `assistant.prepareKeys`; needed for a new key, not for one already registered. */
203
+ readonly registrationDeadline: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
204
+ /** 64-byte proof from `assistant.prepareKeys`; needed for a new key, not for one already registered. */
205
+ readonly registrationProof: v.OptionalSchema<v.SchemaWithPipe<readonly [v.InstanceSchema<{
206
+ new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array<ArrayBufferLike>;
207
+ readonly prototype: Uint8Array<ArrayBufferLike>;
208
+ readonly BYTES_PER_ELEMENT: number;
209
+ of(...items: number[]): Uint8Array<ArrayBuffer>;
210
+ from(arrayLike: ArrayLike<number>): Uint8Array<ArrayBuffer>;
211
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
212
+ from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
213
+ from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
214
+ }, undefined>, v.LengthAction<Uint8Array<ArrayBufferLike>, 64, "registrationProof must be 64 bytes">]>, undefined>;
215
+ }, undefined>, v.TransformAction<{
216
+ subaccountId?: bigint | undefined;
217
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
218
+ policyId: bigint;
219
+ registrationDeadline?: number | undefined;
220
+ registrationProof?: Uint8Array<ArrayBufferLike> | undefined;
221
+ }, {
222
+ registrationDeadline: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
223
+ registrationProof: Uint8Array<ArrayBufferLike>;
224
+ subaccountId?: bigint | undefined;
225
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
226
+ policyId: bigint;
227
+ }>]>;
228
+ type AssistantKeySpecInput = v.InferInput<typeof AssistantKeySpecInputSchema>;
229
+ declare const SetAssistantKeysInputSchema: v.StrictObjectSchema<{
230
+ /** The complete set: at most one key per account, at most 64. An account left out loses its key. */
231
+ readonly keys: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
232
+ /** Subaccount the key acts for; omit for the main account. */
233
+ readonly subaccountId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
234
+ /** 32-byte Ed25519 public key from `assistant.prepareKeys`. */
235
+ readonly publicKeyEd25519: v.SchemaWithPipe<readonly [v.InstanceSchema<{
236
+ new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array<ArrayBufferLike>;
237
+ readonly prototype: Uint8Array<ArrayBufferLike>;
238
+ readonly BYTES_PER_ELEMENT: number;
239
+ of(...items: number[]): Uint8Array<ArrayBuffer>;
240
+ from(arrayLike: ArrayLike<number>): Uint8Array<ArrayBuffer>;
241
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
242
+ from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
243
+ from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
244
+ }, undefined>, v.LengthAction<Uint8Array<ArrayBufferLike>, 32, "publicKeyEd25519 must be 32 bytes">]>;
245
+ /** API policy that bounds the key. It must not allow moving value out of the account. */
246
+ readonly policyId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
247
+ /** Epoch ms from `assistant.prepareKeys`; needed for a new key, not for one already registered. */
248
+ readonly registrationDeadline: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>;
249
+ /** 64-byte proof from `assistant.prepareKeys`; needed for a new key, not for one already registered. */
250
+ readonly registrationProof: v.OptionalSchema<v.SchemaWithPipe<readonly [v.InstanceSchema<{
251
+ new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array<ArrayBufferLike>;
252
+ readonly prototype: Uint8Array<ArrayBufferLike>;
253
+ readonly BYTES_PER_ELEMENT: number;
254
+ of(...items: number[]): Uint8Array<ArrayBuffer>;
255
+ from(arrayLike: ArrayLike<number>): Uint8Array<ArrayBuffer>;
256
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
257
+ from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
258
+ from<T>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
259
+ }, undefined>, v.LengthAction<Uint8Array<ArrayBufferLike>, 64, "registrationProof must be 64 bytes">]>, undefined>;
260
+ }, undefined>, v.TransformAction<{
261
+ subaccountId?: bigint | undefined;
262
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
263
+ policyId: bigint;
264
+ registrationDeadline?: number | undefined;
265
+ registrationProof?: Uint8Array<ArrayBufferLike> | undefined;
266
+ }, {
267
+ registrationDeadline: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
268
+ registrationProof: Uint8Array<ArrayBufferLike>;
269
+ subaccountId?: bigint | undefined;
270
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
271
+ policyId: bigint;
272
+ }>]>, undefined>, v.MaxLengthAction<{
273
+ registrationDeadline: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
274
+ registrationProof: Uint8Array<ArrayBufferLike>;
275
+ subaccountId?: bigint | undefined;
276
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
277
+ policyId: bigint;
278
+ }[], 64, "At most 64 assistant keys are allowed.">, v.CheckAction<{
279
+ registrationDeadline: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
280
+ registrationProof: Uint8Array<ArrayBufferLike>;
281
+ subaccountId?: bigint | undefined;
282
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
283
+ policyId: bigint;
284
+ }[], "At most one assistant key per account is allowed.">, v.CheckAction<{
285
+ registrationDeadline: import("@bufbuild/protobuf/wkt").Timestamp | undefined;
286
+ registrationProof: Uint8Array<ArrayBufferLike>;
287
+ subaccountId?: bigint | undefined;
288
+ publicKeyEd25519: Uint8Array<ArrayBufferLike>;
289
+ policyId: bigint;
290
+ }[], "Assistant public keys must be distinct.">]>;
291
+ }, undefined>;
292
+ type SetAssistantKeysInput = v.InferInput<typeof SetAssistantKeysInputSchema>;
178
293
  //#endregion
179
- export { ApiKey, ApiKeyIdInput, ApiKeyIdInputSchema, ApiKeySchema, ApiKeyStatus, ApiKeysCreateInput, ApiKeysCreateInputSchema, ApiKeysListInput, ApiKeysListInputSchema, ApiKeysUpdateInput, ApiKeysUpdateInputSchema };
294
+ export { ApiKey, ApiKeyIdInput, ApiKeyIdInputSchema, ApiKeySchema, ApiKeyStatus, ApiKeysCreateInput, ApiKeysCreateInputSchema, ApiKeysListInput, ApiKeysListInputSchema, ApiKeysUpdateInput, ApiKeysUpdateInputSchema, AssistantKeySpecInput, SetAssistantKeysInput, SetAssistantKeysInputSchema };
180
295
  //# sourceMappingURL=api-keys.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.schemas.d.ts","names":[],"sources":["../../../src/services/api-keys/api-keys.schemas.ts"],"mappings":";;cAyBM,oBAAkB,EAAA;KAGZ,eAAe,EAAE,mBAAmB;cAEnC,wBAAsB,EAAA,yBAAA,EAAA;;;;;;;;;;;KASvB,mBAAmB,EAAE,kBAAkB;cAEtC,qBAAmB,EAAA;;;KAIpB,gBAAgB,EAAE,kBAAkB;cAEnC,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAezB,qBAAqB,EAAE,kBAAkB;cAgCxC,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCzB,qBAAqB,EAAE,kBAAkB;cAExC,cAAY,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCb,SAAS,EAAE,mBAAmB"}
1
+ {"version":3,"file":"api-keys.schemas.d.ts","names":[],"sources":["../../../src/services/api-keys/api-keys.schemas.ts"],"mappings":";;cA4BM,oBAAkB,EAAA;KAGZ,eAAe,EAAE,mBAAmB;cAEnC,wBAAsB,EAAA,yBAAA,EAAA;;;;;;;;;;;KASvB,mBAAmB,EAAE,kBAAkB;cAEtC,qBAAmB,EAAA;;;KAIpB,gBAAgB,EAAE,kBAAkB;cAEnC,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAezB,qBAAqB,EAAE,kBAAkB;cAgCxC,0BAAwB,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCzB,qBAAqB,EAAE,kBAAkB;cAExC,cAAY,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuCb,SAAS,EAAE,mBAAmB;;;;;cAUpC,6BAA2B,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyBrB,wBAAwB,EAAE,kBAAkB;cAE3C,6BAA2B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgB5B,wBAAwB,EAAE,kBAAkB"}