@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
@@ -31,7 +31,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
31
31
  }, undefined>, v.CheckAction<{
32
32
  categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
33
33
  actionRequired?: boolean | undefined;
34
- surfaces: ("rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
34
+ surfaces: ("rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
35
35
  audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
36
36
  startTime?: number | undefined;
37
37
  endTime?: number | undefined;
@@ -42,7 +42,7 @@ declare const ListChangelogChangesInputSchema: v.SchemaWithPipe<readonly [v.Stri
42
42
  }, "endTime: must be after startTime">, v.TransformAction<{
43
43
  categories: ("breaking_change" | "new_feature" | "improvement" | "bug_fix")[];
44
44
  actionRequired?: boolean | undefined;
45
- surfaces: ("rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
45
+ surfaces: ("rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
46
46
  audiences: ("all_users" | "traders" | "market_makers" | "developers")[];
47
47
  startTime?: number | undefined;
48
48
  endTime?: number | undefined;
@@ -73,14 +73,14 @@ declare const ChangelogChangeSchema: v.ObjectSchema<{
73
73
  readonly actionRequired: v.BooleanSchema<undefined>;
74
74
  readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
75
75
  readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
76
- readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
76
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
77
77
  }, undefined>;
78
78
  type ChangelogChange = v.InferOutput<typeof ChangelogChangeSchema>;
79
79
  /** `surface` is the product area the section covers, `"unspecified"` when it spans several. */
80
80
  declare const ChangelogSectionSchema: v.ObjectSchema<{
81
81
  readonly heading: v.StringSchema<undefined>;
82
82
  readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
83
- readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
83
+ readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
84
84
  readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
85
85
  readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
86
86
  readonly title: v.StringSchema<undefined>;
@@ -90,7 +90,7 @@ declare const ChangelogSectionSchema: v.ObjectSchema<{
90
90
  readonly actionRequired: v.BooleanSchema<undefined>;
91
91
  readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
92
92
  readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
93
- readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
93
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
94
94
  }, undefined>, undefined>, readonly []>;
95
95
  }, undefined>;
96
96
  type ChangelogSection = v.InferOutput<typeof ChangelogSectionSchema>;
@@ -209,7 +209,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
209
209
  readonly sections: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
210
210
  readonly heading: v.StringSchema<undefined>;
211
211
  readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
212
- readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
212
+ readonly surface: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>;
213
213
  readonly changes: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
214
214
  readonly id: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
215
215
  readonly title: v.StringSchema<undefined>;
@@ -219,7 +219,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
219
219
  readonly actionRequired: v.BooleanSchema<undefined>;
220
220
  readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
221
221
  readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
222
- readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
222
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
223
223
  }, undefined>, undefined>, readonly []>;
224
224
  }, undefined>, undefined>, readonly []>;
225
225
  }, undefined>, v.TransformAction<{
@@ -241,7 +241,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
241
241
  sections: {
242
242
  heading: string;
243
243
  summary?: string | undefined;
244
- surface: "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
244
+ surface: "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
245
245
  changes: {
246
246
  id: string;
247
247
  title: string;
@@ -251,14 +251,14 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
251
251
  actionRequired: boolean;
252
252
  migrationGuidance?: string | undefined;
253
253
  audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
254
- surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
254
+ surfaces: ("unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
255
255
  }[];
256
256
  }[];
257
257
  }, {
258
258
  sections: {
259
259
  heading: string;
260
260
  summary?: string | undefined;
261
- surface: "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
261
+ surface: "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap";
262
262
  changes: {
263
263
  id: string;
264
264
  title: string;
@@ -268,7 +268,7 @@ declare const ChangelogPostSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
268
268
  actionRequired: boolean;
269
269
  migrationGuidance?: string | undefined;
270
270
  audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
271
- surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
271
+ surfaces: ("unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
272
272
  }[];
273
273
  }[];
274
274
  slug: string;
@@ -296,7 +296,7 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
296
296
  readonly actionRequired: v.BooleanSchema<undefined>;
297
297
  readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
298
298
  readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
299
- readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
299
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
300
300
  }, undefined>;
301
301
  readonly postSlug: v.StringSchema<undefined>;
302
302
  readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -317,7 +317,7 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
317
317
  actionRequired: boolean;
318
318
  migrationGuidance?: string | undefined;
319
319
  audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
320
- surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
320
+ surfaces: ("unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
321
321
  };
322
322
  postSlug: string;
323
323
  publishedAt: number;
@@ -334,7 +334,7 @@ declare const ChangelogChangeEntrySchema: v.SchemaWithPipe<readonly [v.ObjectSch
334
334
  actionRequired: boolean;
335
335
  migrationGuidance?: string | undefined;
336
336
  audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
337
- surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
337
+ surfaces: ("unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
338
338
  }>]>;
339
339
  /** A change with the slug, first publication time and section heading of the post that announced it. */
340
340
  type ChangelogChangeEntry = v.InferOutput<typeof ChangelogChangeEntrySchema>;
@@ -349,7 +349,7 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
349
349
  readonly actionRequired: v.BooleanSchema<undefined>;
350
350
  readonly migrationGuidance: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
351
351
  readonly audiences: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "all_users" | "traders" | "market_makers" | "developers">]>, undefined>, readonly []>;
352
- readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
352
+ readonly surfaces: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap">]>, undefined>, readonly []>;
353
353
  }, undefined>;
354
354
  readonly postSlug: v.StringSchema<undefined>;
355
355
  readonly publishedAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -370,7 +370,7 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
370
370
  actionRequired: boolean;
371
371
  migrationGuidance?: string | undefined;
372
372
  audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
373
- surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
373
+ surfaces: ("unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
374
374
  };
375
375
  postSlug: string;
376
376
  publishedAt: number;
@@ -387,7 +387,7 @@ declare const ListChangelogChangesResultSchema: v.ObjectSchema<{
387
387
  actionRequired: boolean;
388
388
  migrationGuidance?: string | undefined;
389
389
  audiences: ("unspecified" | "all_users" | "traders" | "market_makers" | "developers")[];
390
- surfaces: ("unspecified" | "rewards" | "trading" | "funding" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
390
+ surfaces: ("unspecified" | "rewards" | "funding" | "trading" | "accounts" | "api" | "explorer" | "documentation" | "platform" | "market_data" | "quickswap")[];
391
391
  }>]>, undefined>, readonly []>;
392
392
  readonly nextPageToken: v.StringSchema<undefined>;
393
393
  }, undefined>;
@@ -427,7 +427,7 @@ declare const CheckpointSchema: v.ObjectSchema<{
427
427
  readonly seasonResultUsd: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
428
428
  readonly subaccounts: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.MaxValueAction<bigint, bigint, undefined>, v.TransformAction<any, number>]>;
429
429
  /** Values computed from partial evidence; show them with an approximation marker. */
430
- readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "tools" | "deposits" | "withdrawals" | "volume" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "transfers" | "season_result">]>, undefined>, readonly []>;
430
+ readonly incomplete: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "transfers" | "tools" | "deposits" | "withdrawals" | "volume" | "top_pairs" | "order_types" | "time_in_force" | "order_status" | "median_limit_rest" | "internal_transfers" | "daily_claim_amounts" | "portfolio_value" | "trading_balances" | "funding_balances" | "season_result">]>, undefined>, readonly []>;
431
431
  }, undefined>;
432
432
  /**
433
433
  * One frozen season recap of a root account and all of its subaccounts. An absent USD value
@@ -14,7 +14,7 @@ type TimestampInit = {
14
14
  declare const GetOrderbookHeatmapInputSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
15
15
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
16
16
  readonly interval: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["1s", "1m", "5m", "1h"], undefined>, "1s">, v.TransformAction<"1h" | "1m" | "1s" | "5m", HeatmapInterval>]>;
17
- readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 5 | 10 | 20 | 100 | 500 | 200 | 50 | 1000, HeatmapDepth>]>;
17
+ readonly depth: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly [1, 5, 10, 20, 50, 100, 200, 500, 1000], undefined>, 50>, v.TransformAction<1 | 10 | 5 | 20 | 200 | 100 | 1000 | 500 | 50, HeatmapDepth>]>;
18
18
  readonly quantityMode: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["close", "peak"], undefined>, "close">, v.TransformAction<"close" | "peak", HeatmapQuantityMode>]>;
19
19
  readonly limit: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 20000, undefined>]>;
20
20
  readonly startTsSec: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
@@ -227,7 +227,7 @@ type OrderbookHeatmapDeltaChain = ReturnType<typeof convertHeatmapDeltaChain>;
227
227
  declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.SchemaWithPipe<readonly [v.ObjectSchema<{
228
228
  readonly symbolId: v.NumberSchema<undefined>;
229
229
  readonly interval: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"1h" | "1m" | "1s" | "5m">>]>;
230
- readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 200 | 50 | 1000>]>;
230
+ readonly depth: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, 1 | "unspecified" | 10 | 5 | 20 | 200 | 100 | 1000 | 500 | 50>]>;
231
231
  readonly chain: v.OptionalSchema<v.ObjectSchema<{
232
232
  readonly baseKeyframe: v.OptionalSchema<v.ObjectSchema<{
233
233
  readonly tsSec: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, number>]>;
@@ -287,7 +287,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
287
287
  }, undefined>, v.TransformAction<{
288
288
  symbolId: number;
289
289
  interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
290
- depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 200 | 50 | 1000;
290
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 100 | 1000 | 500 | 50;
291
291
  chain?: {
292
292
  baseKeyframe?: {
293
293
  tsSec: number;
@@ -347,7 +347,7 @@ declare function createOrderbookHeatmapResponseSchema(scales: SdkScales): v.Sche
347
347
  }, {
348
348
  symbolId: number;
349
349
  interval: DecodedEnum<"1h" | "1m" | "1s" | "5m">;
350
- depth: 1 | 5 | 10 | 20 | "unspecified" | 100 | 500 | 200 | 50 | 1000;
350
+ depth: 1 | "unspecified" | 10 | 5 | 20 | 200 | 100 | 1000 | 500 | 50;
351
351
  chain: {
352
352
  baseKeyframe: {
353
353
  tsSec: number;
@@ -138,7 +138,7 @@ declare function createCreateInternalTransferResultSchema(): v.SchemaWithPipe<re
138
138
  subaccountId: string | undefined;
139
139
  smartAccountAddress: string | undefined;
140
140
  }>]>, undefined>;
141
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "accepted" | "rejected">]>;
141
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "accepted" | "rejected" | "failed">]>;
142
142
  /** Lifecycle flow ID for `lifecycle.getFlow`; empty when the server did not return one. */
143
143
  readonly flowId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
144
144
  }, undefined>, v.TransformAction<{
@@ -157,7 +157,7 @@ declare function createCreateInternalTransferResultSchema(): v.SchemaWithPipe<re
157
157
  subaccountId: string | undefined;
158
158
  smartAccountAddress: string | undefined;
159
159
  } | undefined;
160
- status: "unspecified" | "failed" | "accepted" | "rejected";
160
+ status: "unspecified" | "accepted" | "rejected" | "failed";
161
161
  flowId: string;
162
162
  }, {
163
163
  acceptedAtUnixMs: number;
@@ -172,7 +172,7 @@ declare function createCreateInternalTransferResultSchema(): v.SchemaWithPipe<re
172
172
  subaccountId: string | undefined;
173
173
  smartAccountAddress: string | undefined;
174
174
  } | undefined;
175
- status: "unspecified" | "failed" | "accepted" | "rejected";
175
+ status: "unspecified" | "accepted" | "rejected" | "failed";
176
176
  flowId: string;
177
177
  }>]>;
178
178
  type CreateInternalTransferResult = v.InferOutput<ReturnType<typeof createCreateInternalTransferResultSchema>>;
@@ -9,14 +9,14 @@ declare const LIFECYCLE_SORT_VALUES: readonly ["newest", "oldest"];
9
9
  type LifecycleSortValue = (typeof LIFECYCLE_SORT_VALUES)[number];
10
10
  declare const LIFECYCLE_LIST_ORDER_BY_VALUES: readonly ["last_activity", "started_at"];
11
11
  type LifecycleListOrderByValue = (typeof LIFECYCLE_LIST_ORDER_BY_VALUES)[number];
12
- declare const LIFECYCLE_REASON_VALUES: readonly ["unspecified", "zipper_validation_rejected", "zipper_execution_rejected", "zipper_withdraw_execution_failed", "zipper_deposit_refund_failed", "ledger_mirror_rejected", "ledger_mirror_transfer_exceeds_credits", "ledger_mirror_transfer_exists", "ledger_mirror_pending_transfer_not_found", "ledger_mirror_transfer_id_already_failed", "trading_withdraw_policy_denied", "trading_withdraw_contract_reverted", "trading_withdraw_execution_failed", "deposit_source_not_confirmed"];
12
+ declare const LIFECYCLE_REASON_VALUES: readonly ["unspecified", "zipper_validation_rejected", "zipper_execution_rejected", "zipper_withdraw_execution_failed", "zipper_deposit_refund_failed", "zipper_compliance_transferred", "ledger_mirror_rejected", "ledger_mirror_transfer_exceeds_credits", "ledger_mirror_transfer_exists", "ledger_mirror_pending_transfer_not_found", "ledger_mirror_transfer_id_already_failed", "trading_withdraw_policy_denied", "trading_withdraw_contract_reverted", "trading_withdraw_execution_failed", "deposit_source_not_confirmed"];
13
13
  /**
14
14
  * Catalog labels plus a code-preserving fallback for wire values the generated
15
15
  * enum does not know. Proto3 enums are open — the backend can emit codes ahead
16
16
  * of a contract update — and rejecting them froze flows out of the UI.
17
17
  */
18
18
  type LifecycleReasonValue = (typeof LIFECYCLE_REASON_VALUES)[number] | `unknown_reason_${number}`;
19
- declare const LIFECYCLE_REQUEST_FEE_STATUS_VALUES: readonly ["locked", "settled"];
19
+ declare const LIFECYCLE_REQUEST_FEE_STATUS_VALUES: readonly ["locked", "settled", "kept"];
20
20
  type LifecycleRequestFeeStatusValue = (typeof LIFECYCLE_REQUEST_FEE_STATUS_VALUES)[number];
21
21
  //#endregion
22
22
  export { LIFECYCLE_LIST_ORDER_BY_VALUES, LIFECYCLE_LIST_SCOPE_VALUES, LIFECYCLE_REASON_VALUES, LIFECYCLE_REQUEST_FEE_STATUS_VALUES, LIFECYCLE_SORT_VALUES, LIFECYCLE_TX_LOOKUP_KIND_VALUES, LifecycleListOrderByValue, LifecycleListScopeValue, LifecycleReasonValue, LifecycleRequestFeeStatusValue, LifecycleSortValue, LifecycleTxLookupKindValue };
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.codecs.d.ts","names":[],"sources":["../../../src/services/lifecycle/lifecycle.codecs.ts"],"mappings":";;;cAkCa;KACD,kCAAkC;cAKjC;KACD,qCAAqC;cAEpC;KACD,6BAA6B;cAE5B;KACD,oCAAoC;cAEnC;;;;;;KAqBD,+BACE;cAyCD;KACD,yCAAyC"}
1
+ {"version":3,"file":"lifecycle.codecs.d.ts","names":[],"sources":["../../../src/services/lifecycle/lifecycle.codecs.ts"],"mappings":";;;cAkCa;KACD,kCAAkC;cAKjC;KACD,qCAAqC;cAEpC;KACD,6BAA6B;cAE5B;KACD,oCAAoC;cAEnC;;;;;;KAsBD,+BACE;cAyCD;KACD,yCAAyC"}
@@ -110,6 +110,7 @@ const LifecycleReasonCodec = { protoToOutput: {
110
110
  [102]: "zipper_execution_rejected",
111
111
  [103]: "zipper_withdraw_execution_failed",
112
112
  [104]: "zipper_deposit_refund_failed",
113
+ [105]: "zipper_compliance_transferred",
113
114
  [200]: "ledger_mirror_rejected",
114
115
  [201]: "ledger_mirror_transfer_exceeds_credits",
115
116
  [202]: "ledger_mirror_transfer_exists",
@@ -180,7 +181,8 @@ const LifecycleFlowTimelineStatusCodec = { protoToOutput: {
180
181
  const LifecycleRequestFeeStatusCodec = { protoToOutput: {
181
182
  [0]: "unspecified",
182
183
  [1]: "locked",
183
- [2]: "settled"
184
+ [2]: "settled",
185
+ [3]: "kept"
184
186
  } };
185
187
  //#endregion
186
188
  export { LIFECYCLE_FLOW_KIND_VALUES, LIFECYCLE_FLOW_PARTICIPATION_VALUES, LIFECYCLE_FLOW_STATE_VALUES, LIFECYCLE_LIST_ORDER_BY_VALUES, LIFECYCLE_LIST_SCOPE_VALUES, LIFECYCLE_SORT_VALUES, LIFECYCLE_TX_LOOKUP_KIND_VALUES, LifecycleFlowDomainCodec, LifecycleFlowKindCodec, LifecycleFlowParticipationCodec, LifecycleFlowStateCodec, LifecycleFlowStepActivityKindCodec, LifecycleFlowStepCodec, LifecycleFlowTimelineStatusCodec, LifecycleListOrderByCodec, LifecycleListScopeCodec, LifecycleReasonCodec, LifecycleRequestFeeStatusCodec, LifecycleSortCodec, LifecycleSourceCodec, LifecycleTxLookupKindCodec, lifecycleReasonFromCode };
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.codecs.js","names":[],"sources":["../../../src/services/lifecycle/lifecycle.codecs.ts"],"sourcesContent":["import {\n FlowDomain,\n FlowKind,\n FlowState,\n LifecycleReason,\n LifecycleSource,\n RequestFeeStatus,\n} from \"../../gen/chain/lifecycle/v1/types_pb.js\";\nimport {\n FlowParticipation,\n FlowStep,\n FlowStepActivityKind,\n FlowTimelineStatus,\n ListOrderBy,\n ListScope,\n Sort,\n TxLookupKind,\n} from \"../../gen/chain/lifecycle/v1/lifecycle_read_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const LIFECYCLE_FLOW_KIND_VALUES = [\"deposit\", \"withdraw\", \"transfer\"] as const;\nexport type LifecycleFlowKindValue = (typeof LIFECYCLE_FLOW_KIND_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_STATE_VALUES = [\n \"pending_source\",\n \"pending_polyester_chain\",\n \"pending_ledger\",\n \"completed\",\n \"failed\",\n \"dropped\",\n \"refunded\",\n] as const;\nexport type LifecycleFlowStateValue = (typeof LIFECYCLE_FLOW_STATE_VALUES)[number];\n\nexport const LIFECYCLE_LIST_SCOPE_VALUES = [\"all\", \"open\", \"terminal\"] as const;\nexport type LifecycleListScopeValue = (typeof LIFECYCLE_LIST_SCOPE_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_PARTICIPATION_VALUES = [\"owner\", \"recipient\"] as const;\nexport type LifecycleFlowParticipationValue = (typeof LIFECYCLE_FLOW_PARTICIPATION_VALUES)[number];\n\nexport const LIFECYCLE_TX_LOOKUP_KIND_VALUES = [\"source\", \"any\"] as const;\nexport type LifecycleTxLookupKindValue = (typeof LIFECYCLE_TX_LOOKUP_KIND_VALUES)[number];\n\nexport const LIFECYCLE_SORT_VALUES = [\"newest\", \"oldest\"] as const;\nexport type LifecycleSortValue = (typeof LIFECYCLE_SORT_VALUES)[number];\n\nexport const LIFECYCLE_LIST_ORDER_BY_VALUES = [\"last_activity\", \"started_at\"] as const;\nexport type LifecycleListOrderByValue = (typeof LIFECYCLE_LIST_ORDER_BY_VALUES)[number];\n\nexport const LIFECYCLE_REASON_VALUES = [\n \"unspecified\",\n \"zipper_validation_rejected\",\n \"zipper_execution_rejected\",\n \"zipper_withdraw_execution_failed\",\n \"zipper_deposit_refund_failed\",\n \"ledger_mirror_rejected\",\n \"ledger_mirror_transfer_exceeds_credits\",\n \"ledger_mirror_transfer_exists\",\n \"ledger_mirror_pending_transfer_not_found\",\n \"ledger_mirror_transfer_id_already_failed\",\n \"trading_withdraw_policy_denied\",\n \"trading_withdraw_contract_reverted\",\n \"trading_withdraw_execution_failed\",\n \"deposit_source_not_confirmed\",\n] as const;\n/**\n * Catalog labels plus a code-preserving fallback for wire values the generated\n * enum does not know. Proto3 enums are open — the backend can emit codes ahead\n * of a contract update — and rejecting them froze flows out of the UI.\n */\nexport type LifecycleReasonValue =\n | (typeof LIFECYCLE_REASON_VALUES)[number]\n | `unknown_reason_${number}`;\n\nexport const LIFECYCLE_FLOW_STEP_VALUES = [\n \"source\",\n \"transfer\",\n \"request\",\n \"validation\",\n \"execution\",\n \"bridge_fulfillment\",\n \"dropped\",\n \"failed\",\n \"refunded\",\n \"fulfilling\",\n \"settlement\",\n] as const;\nexport type LifecycleFlowStepValue = (typeof LIFECYCLE_FLOW_STEP_VALUES)[number];\n\nexport const LIFECYCLE_SOURCE_VALUES = [\n \"unspecified\",\n \"relayer\",\n \"polyester_chain\",\n \"executor\",\n \"ledger\",\n \"lifecycle\",\n] as const;\nexport type LifecycleSourceValue = (typeof LIFECYCLE_SOURCE_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_STEP_ACTIVITY_KIND_VALUES = [\n \"minted\",\n \"funding\",\n \"trading\",\n \"unspecified\",\n] as const;\nexport type LifecycleFlowStepActivityKindValue =\n (typeof LIFECYCLE_FLOW_STEP_ACTIVITY_KIND_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_TIMELINE_STATUS_VALUES = [\"completed\", \"current\", \"planned\"] as const;\nexport type LifecycleFlowTimelineStatusValue =\n (typeof LIFECYCLE_FLOW_TIMELINE_STATUS_VALUES)[number];\n\nexport const LIFECYCLE_REQUEST_FEE_STATUS_VALUES = [\"locked\", \"settled\"] as const;\nexport type LifecycleRequestFeeStatusValue = (typeof LIFECYCLE_REQUEST_FEE_STATUS_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_DOMAIN_VALUES = [\n \"external_chain\",\n \"zipper\",\n \"funding\",\n \"trading\",\n \"lending\",\n] as const;\nexport type LifecycleFlowDomainValue = (typeof LIFECYCLE_FLOW_DOMAIN_VALUES)[number];\n\nexport const LifecycleFlowDomainCodec = {\n protoToOutput: {\n [FlowDomain.DOMAIN_UNSPECIFIED]: \"unspecified\",\n [FlowDomain.DOMAIN_EXTERNAL_CHAIN]: \"external_chain\",\n [FlowDomain.DOMAIN_ZIPPER]: \"zipper\",\n [FlowDomain.DOMAIN_FUNDING]: \"funding\",\n [FlowDomain.DOMAIN_TRADING]: \"trading\",\n [FlowDomain.DOMAIN_LENDING]: \"lending\",\n } satisfies ProtoToOutput<FlowDomain, LifecycleFlowDomainValue>,\n} as const;\n\nexport const LifecycleFlowKindCodec = {\n inputToProto: {\n deposit: FlowKind.KIND_DEPOSIT,\n withdraw: FlowKind.KIND_WITHDRAW,\n transfer: FlowKind.KIND_TRANSFER,\n } satisfies InputToProto<LifecycleFlowKindValue, FlowKind>,\n protoToOutput: {\n [FlowKind.KIND_UNSPECIFIED]: \"unspecified\",\n [FlowKind.KIND_DEPOSIT]: \"deposit\",\n [FlowKind.KIND_WITHDRAW]: \"withdraw\",\n [FlowKind.KIND_TRANSFER]: \"transfer\",\n } satisfies ProtoToOutput<FlowKind, LifecycleFlowKindValue>,\n} as const;\n\nexport const LifecycleFlowStateCodec = {\n inputToProto: {\n pending_source: FlowState.STATE_PENDING_SOURCE,\n pending_polyester_chain: FlowState.STATE_PENDING_POLYESTER_CHAIN,\n pending_ledger: FlowState.STATE_PENDING_LEDGER,\n completed: FlowState.STATE_COMPLETED,\n failed: FlowState.STATE_FAILED,\n dropped: FlowState.STATE_DROPPED,\n refunded: FlowState.STATE_REFUNDED,\n } satisfies InputToProto<LifecycleFlowStateValue, FlowState>,\n protoToOutput: {\n [FlowState.STATE_UNSPECIFIED]: \"unspecified\",\n [FlowState.STATE_PENDING_SOURCE]: \"pending_source\",\n [FlowState.STATE_PENDING_POLYESTER_CHAIN]: \"pending_polyester_chain\",\n [FlowState.STATE_PENDING_LEDGER]: \"pending_ledger\",\n [FlowState.STATE_COMPLETED]: \"completed\",\n [FlowState.STATE_FAILED]: \"failed\",\n [FlowState.STATE_DROPPED]: \"dropped\",\n [FlowState.STATE_REFUNDED]: \"refunded\",\n } satisfies ProtoToOutput<FlowState, LifecycleFlowStateValue>,\n} as const;\n\nexport const LifecycleListScopeCodec = {\n inputToProto: {\n all: ListScope.LIST_ALL,\n open: ListScope.LIST_OPEN_ONLY,\n terminal: ListScope.LIST_TERMINAL_ONLY,\n } satisfies InputToProto<LifecycleListScopeValue, ListScope>,\n protoToOutput: {\n [ListScope.LIST_UNSPECIFIED]: \"unspecified\",\n [ListScope.LIST_ALL]: \"all\",\n [ListScope.LIST_OPEN_ONLY]: \"open\",\n [ListScope.LIST_TERMINAL_ONLY]: \"terminal\",\n } satisfies ProtoToOutput<ListScope, LifecycleListScopeValue>,\n} as const;\n\nexport const LifecycleFlowParticipationCodec = {\n inputToProto: {\n owner: FlowParticipation.PARTICIPATION_OWNER,\n recipient: FlowParticipation.PARTICIPATION_RECIPIENT,\n } satisfies InputToProto<LifecycleFlowParticipationValue, FlowParticipation>,\n protoToOutput: {\n [FlowParticipation.PARTICIPATION_UNSPECIFIED]: \"unspecified\",\n [FlowParticipation.PARTICIPATION_OWNER]: \"owner\",\n [FlowParticipation.PARTICIPATION_RECIPIENT]: \"recipient\",\n } satisfies ProtoToOutput<FlowParticipation, LifecycleFlowParticipationValue>,\n} as const;\n\nexport const LifecycleSortCodec = {\n inputToProto: {\n newest: Sort.NEWEST,\n oldest: Sort.OLDEST,\n } satisfies InputToProto<LifecycleSortValue, Sort>,\n} as const;\n\nexport const LifecycleListOrderByCodec = {\n inputToProto: {\n last_activity: ListOrderBy.ORDER_BY_LAST_ACTIVITY,\n started_at: ListOrderBy.ORDER_BY_STARTED_AT,\n } satisfies InputToProto<LifecycleListOrderByValue, ListOrderBy>,\n} as const;\n\n/**\n * LifecycleReason is a stable product-facing reason catalog. Unlike the other\n * lifecycle enums, `REASON_UNSPECIFIED` (0) is a valid wire value — it is\n * the normal state for flows without a notable reason — so the codec maps the\n * full enum including zero.\n */\nexport const LifecycleReasonCodec = {\n protoToOutput: {\n [LifecycleReason.REASON_UNSPECIFIED]: \"unspecified\",\n [LifecycleReason.ZIPPER_VALIDATION_REJECTED]: \"zipper_validation_rejected\",\n [LifecycleReason.ZIPPER_EXECUTION_REJECTED]: \"zipper_execution_rejected\",\n [LifecycleReason.ZIPPER_WITHDRAW_EXECUTION_FAILED]: \"zipper_withdraw_execution_failed\",\n [LifecycleReason.ZIPPER_DEPOSIT_REFUND_FAILED]: \"zipper_deposit_refund_failed\",\n [LifecycleReason.LEDGER_MIRROR_REJECTED]: \"ledger_mirror_rejected\",\n [LifecycleReason.LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS]:\n \"ledger_mirror_transfer_exceeds_credits\",\n [LifecycleReason.LEDGER_MIRROR_TRANSFER_EXISTS]: \"ledger_mirror_transfer_exists\",\n [LifecycleReason.LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND]:\n \"ledger_mirror_pending_transfer_not_found\",\n [LifecycleReason.LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED]:\n \"ledger_mirror_transfer_id_already_failed\",\n [LifecycleReason.TRADING_WITHDRAW_POLICY_DENIED]: \"trading_withdraw_policy_denied\",\n [LifecycleReason.TRADING_WITHDRAW_CONTRACT_REVERTED]: \"trading_withdraw_contract_reverted\",\n [LifecycleReason.TRADING_WITHDRAW_EXECUTION_FAILED]: \"trading_withdraw_execution_failed\",\n [LifecycleReason.DEPOSIT_SOURCE_NOT_CONFIRMED]: \"deposit_source_not_confirmed\",\n } satisfies Record<LifecycleReason, LifecycleReasonValue>,\n} as const;\n\n/**\n * Maps a wire reason code to its catalog label, preserving uncataloged codes\n * as `unknown_reason_${code}` instead of failing the whole flow payload.\n */\nexport function lifecycleReasonFromCode(code: number): LifecycleReasonValue {\n const known = LifecycleReasonCodec.protoToOutput as Partial<\n Record<number, LifecycleReasonValue>\n >;\n return known[code] ?? `unknown_reason_${code}`;\n}\n\nexport const LifecycleTxLookupKindCodec = {\n inputToProto: {\n source: TxLookupKind.TX_SOURCE,\n any: TxLookupKind.TX_ANY,\n } satisfies InputToProto<LifecycleTxLookupKindValue, TxLookupKind>,\n protoToOutput: {\n [TxLookupKind.TX_UNSPECIFIED]: \"unspecified\",\n [TxLookupKind.TX_SOURCE]: \"source\",\n [TxLookupKind.TX_ANY]: \"any\",\n } satisfies ProtoToOutput<TxLookupKind, LifecycleTxLookupKindValue>,\n} as const;\n\nexport const LifecycleFlowStepCodec = {\n protoToOutput: {\n [FlowStep.UNSPECIFIED]: \"unspecified\",\n [FlowStep.SOURCE]: \"source\",\n [FlowStep.TRANSFER]: \"transfer\",\n [FlowStep.REQUEST]: \"request\",\n [FlowStep.VALIDATION]: \"validation\",\n [FlowStep.EXECUTION]: \"execution\",\n [FlowStep.BRIDGE_FULFILLMENT]: \"bridge_fulfillment\",\n [FlowStep.DROPPED]: \"dropped\",\n [FlowStep.FAILED]: \"failed\",\n [FlowStep.REFUNDED]: \"refunded\",\n [FlowStep.FULFILLING]: \"fulfilling\",\n [FlowStep.SETTLEMENT]: \"settlement\",\n } satisfies ProtoToOutput<FlowStep, LifecycleFlowStepValue>,\n} as const;\n\nexport const LifecycleSourceCodec = {\n /**\n * In-progress flows may emit SOURCE_UNSPECIFIED (0) before a subsystem is\n * attributed, so zero must decode like other lifecycle \"unspecified\" enums.\n */\n protoToOutput: {\n [LifecycleSource.SOURCE_UNSPECIFIED]: \"unspecified\",\n [LifecycleSource.SOURCE_RELAYER]: \"relayer\",\n [LifecycleSource.SOURCE_POLYESTER_CHAIN]: \"polyester_chain\",\n [LifecycleSource.SOURCE_EXECUTOR]: \"executor\",\n [LifecycleSource.SOURCE_LEDGER]: \"ledger\",\n [LifecycleSource.SOURCE_LIFECYCLE]: \"lifecycle\",\n } satisfies Record<LifecycleSource, LifecycleSourceValue>,\n} as const;\n\nexport const LifecycleFlowStepActivityKindCodec = {\n protoToOutput: {\n [FlowStepActivityKind.ACTIVITY_MINTED]: \"minted\",\n [FlowStepActivityKind.ACTIVITY_FUNDING]: \"funding\",\n [FlowStepActivityKind.ACTIVITY_TRADING]: \"trading\",\n [FlowStepActivityKind.ACTIVITY_UNSPECIFIED]: \"unspecified\",\n } satisfies Record<FlowStepActivityKind, LifecycleFlowStepActivityKindValue>,\n} as const;\n\nexport const LifecycleFlowTimelineStatusCodec = {\n protoToOutput: {\n [FlowTimelineStatus.TIMELINE_STATUS_UNSPECIFIED]: \"unspecified\",\n [FlowTimelineStatus.TIMELINE_STATUS_COMPLETED]: \"completed\",\n [FlowTimelineStatus.TIMELINE_STATUS_CURRENT]: \"current\",\n [FlowTimelineStatus.TIMELINE_STATUS_PLANNED]: \"planned\",\n } satisfies ProtoToOutput<FlowTimelineStatus, LifecycleFlowTimelineStatusValue>,\n} as const;\n\nexport const LifecycleRequestFeeStatusCodec = {\n protoToOutput: {\n [RequestFeeStatus.UNSPECIFIED]: \"unspecified\",\n [RequestFeeStatus.LOCKED]: \"locked\",\n [RequestFeeStatus.SETTLED]: \"settled\",\n } satisfies ProtoToOutput<RequestFeeStatus, LifecycleRequestFeeStatusValue>,\n} as const;\n"],"mappings":";;;AAoBA,MAAa,6BAA6B;CAAC;CAAW;CAAY;AAAU;AAG5E,MAAa,8BAA8B;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAGA,MAAa,8BAA8B;CAAC;CAAO;CAAQ;AAAU;AAGrE,MAAa,sCAAsC,CAAC,SAAS,WAAW;AAGxE,MAAa,kCAAkC,CAAC,UAAU,KAAK;AAG/D,MAAa,wBAAwB,CAAC,UAAU,QAAQ;AAGxD,MAAa,iCAAiC,CAAC,iBAAiB,YAAY;AA8E5E,MAAa,2BAA2B,EACpC,eAAe;EACsB,IAAA;EACG,IAAA;EACR,IAAA;EACC,IAAA;EACA,IAAA;EACA,IAAA;AACjC,EACJ;AAEA,MAAa,yBAAyB;CAClC,cAAc;EACV,SAAA;EACA,UAAA;EACA,UAAA;CACJ;CACA,eAAe;GACkB,IAAA;GACJ,IAAA;GACC,IAAA;GACA,IAAA;CAC9B;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,gBAAA;EACA,yBAAA;EACA,gBAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;CACJ;CACA,eAAe;GACoB,IAAA;GACG,IAAA;GACS,IAAA;GACT,IAAA;GACL,IAAA;GACH,IAAA;GACC,IAAA;GACC,IAAA;CAChC;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,KAAA;EACA,MAAA;EACA,UAAA;CACJ;CACA,eAAe;GACmB,IAAA;GACR,IAAA;GACM,IAAA;GACI,IAAA;CACpC;AACJ;AAEA,MAAa,kCAAkC;CAC3C,cAAc;EACV,OAAA;EACA,WAAA;CACJ;CACA,eAAe;GACoC,IAAA;GACN,IAAA;GACI,IAAA;CACjD;AACJ;AAEA,MAAa,qBAAqB,EAC9B,cAAc;CACV,QAAA;CACA,QAAA;AACJ,EACJ;AAEA,MAAa,4BAA4B,EACrC,cAAc;CACV,eAAA;CACA,YAAA;AACJ,EACJ;;;;;;;AAQA,MAAa,uBAAuB,EAChC,eAAe;EAC2B,IAAA;EACQ,MAAA;EACD,MAAA;EACO,MAAA;EACJ,MAAA;EACN,MAAA;EAEtC,MAAA;EAC6C,MAAA;EAE7C,MAAA;EAEA,MAAA;EAC8C,MAAA;EACI,MAAA;EACD,MAAA;EACL,MAAA;AACpD,EACJ;;;;;AAMA,SAAgB,wBAAwB,MAAoC;CAIxE,OAHc,qBAAqB,cAGtB,SAAS,kBAAkB;AAC5C;AAEA,MAAa,6BAA6B;CACtC,cAAc;EACV,QAAA;EACA,KAAA;CACJ;CACA,eAAe;GACoB,IAAA;GACL,IAAA;GACH,IAAA;CAC3B;AACJ;AAEA,MAAa,yBAAyB,EAClC,eAAe;EACa,IAAA;EACL,IAAA;EACE,IAAA;EACD,IAAA;EACG,IAAA;EACD,IAAA;EACS,IAAA;EACX,IAAA;EACD,IAAA;EACE,IAAA;EACE,KAAA;EACA,KAAA;AAC3B,EACJ;AAEA,MAAa,uBAAuB;;;;;AAKhC,eAAe;EAC2B,IAAA;EACJ,IAAA;EACQ,IAAA;EACP,IAAA;EACF,IAAA;EACG,IAAA;AACxC,EACJ;AAEA,MAAa,qCAAqC,EAC9C,eAAe;EAC6B,IAAA;EACC,IAAA;EACA,IAAA;EACI,IAAA;AACjD,EACJ;AAEA,MAAa,mCAAmC,EAC5C,eAAe;EACuC,IAAA;EACF,IAAA;EACF,IAAA;EACA,IAAA;AAClD,EACJ;AAEA,MAAa,iCAAiC,EAC1C,eAAe;EACqB,IAAA;EACL,IAAA;EACC,IAAA;AAChC,EACJ"}
1
+ {"version":3,"file":"lifecycle.codecs.js","names":[],"sources":["../../../src/services/lifecycle/lifecycle.codecs.ts"],"sourcesContent":["import {\n FlowDomain,\n FlowKind,\n FlowState,\n LifecycleReason,\n LifecycleSource,\n RequestFeeStatus,\n} from \"../../gen/chain/lifecycle/v1/types_pb.js\";\nimport {\n FlowParticipation,\n FlowStep,\n FlowStepActivityKind,\n FlowTimelineStatus,\n ListOrderBy,\n ListScope,\n Sort,\n TxLookupKind,\n} from \"../../gen/chain/lifecycle/v1/lifecycle_read_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const LIFECYCLE_FLOW_KIND_VALUES = [\"deposit\", \"withdraw\", \"transfer\"] as const;\nexport type LifecycleFlowKindValue = (typeof LIFECYCLE_FLOW_KIND_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_STATE_VALUES = [\n \"pending_source\",\n \"pending_polyester_chain\",\n \"pending_ledger\",\n \"completed\",\n \"failed\",\n \"dropped\",\n \"refunded\",\n] as const;\nexport type LifecycleFlowStateValue = (typeof LIFECYCLE_FLOW_STATE_VALUES)[number];\n\nexport const LIFECYCLE_LIST_SCOPE_VALUES = [\"all\", \"open\", \"terminal\"] as const;\nexport type LifecycleListScopeValue = (typeof LIFECYCLE_LIST_SCOPE_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_PARTICIPATION_VALUES = [\"owner\", \"recipient\"] as const;\nexport type LifecycleFlowParticipationValue = (typeof LIFECYCLE_FLOW_PARTICIPATION_VALUES)[number];\n\nexport const LIFECYCLE_TX_LOOKUP_KIND_VALUES = [\"source\", \"any\"] as const;\nexport type LifecycleTxLookupKindValue = (typeof LIFECYCLE_TX_LOOKUP_KIND_VALUES)[number];\n\nexport const LIFECYCLE_SORT_VALUES = [\"newest\", \"oldest\"] as const;\nexport type LifecycleSortValue = (typeof LIFECYCLE_SORT_VALUES)[number];\n\nexport const LIFECYCLE_LIST_ORDER_BY_VALUES = [\"last_activity\", \"started_at\"] as const;\nexport type LifecycleListOrderByValue = (typeof LIFECYCLE_LIST_ORDER_BY_VALUES)[number];\n\nexport const LIFECYCLE_REASON_VALUES = [\n \"unspecified\",\n \"zipper_validation_rejected\",\n \"zipper_execution_rejected\",\n \"zipper_withdraw_execution_failed\",\n \"zipper_deposit_refund_failed\",\n \"zipper_compliance_transferred\",\n \"ledger_mirror_rejected\",\n \"ledger_mirror_transfer_exceeds_credits\",\n \"ledger_mirror_transfer_exists\",\n \"ledger_mirror_pending_transfer_not_found\",\n \"ledger_mirror_transfer_id_already_failed\",\n \"trading_withdraw_policy_denied\",\n \"trading_withdraw_contract_reverted\",\n \"trading_withdraw_execution_failed\",\n \"deposit_source_not_confirmed\",\n] as const;\n/**\n * Catalog labels plus a code-preserving fallback for wire values the generated\n * enum does not know. Proto3 enums are open — the backend can emit codes ahead\n * of a contract update — and rejecting them froze flows out of the UI.\n */\nexport type LifecycleReasonValue =\n | (typeof LIFECYCLE_REASON_VALUES)[number]\n | `unknown_reason_${number}`;\n\nexport const LIFECYCLE_FLOW_STEP_VALUES = [\n \"source\",\n \"transfer\",\n \"request\",\n \"validation\",\n \"execution\",\n \"bridge_fulfillment\",\n \"dropped\",\n \"failed\",\n \"refunded\",\n \"fulfilling\",\n \"settlement\",\n] as const;\nexport type LifecycleFlowStepValue = (typeof LIFECYCLE_FLOW_STEP_VALUES)[number];\n\nexport const LIFECYCLE_SOURCE_VALUES = [\n \"unspecified\",\n \"relayer\",\n \"polyester_chain\",\n \"executor\",\n \"ledger\",\n \"lifecycle\",\n] as const;\nexport type LifecycleSourceValue = (typeof LIFECYCLE_SOURCE_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_STEP_ACTIVITY_KIND_VALUES = [\n \"minted\",\n \"funding\",\n \"trading\",\n \"unspecified\",\n] as const;\nexport type LifecycleFlowStepActivityKindValue =\n (typeof LIFECYCLE_FLOW_STEP_ACTIVITY_KIND_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_TIMELINE_STATUS_VALUES = [\"completed\", \"current\", \"planned\"] as const;\nexport type LifecycleFlowTimelineStatusValue =\n (typeof LIFECYCLE_FLOW_TIMELINE_STATUS_VALUES)[number];\n\nexport const LIFECYCLE_REQUEST_FEE_STATUS_VALUES = [\"locked\", \"settled\", \"kept\"] as const;\nexport type LifecycleRequestFeeStatusValue = (typeof LIFECYCLE_REQUEST_FEE_STATUS_VALUES)[number];\n\nexport const LIFECYCLE_FLOW_DOMAIN_VALUES = [\n \"external_chain\",\n \"zipper\",\n \"funding\",\n \"trading\",\n \"lending\",\n] as const;\nexport type LifecycleFlowDomainValue = (typeof LIFECYCLE_FLOW_DOMAIN_VALUES)[number];\n\nexport const LifecycleFlowDomainCodec = {\n protoToOutput: {\n [FlowDomain.DOMAIN_UNSPECIFIED]: \"unspecified\",\n [FlowDomain.DOMAIN_EXTERNAL_CHAIN]: \"external_chain\",\n [FlowDomain.DOMAIN_ZIPPER]: \"zipper\",\n [FlowDomain.DOMAIN_FUNDING]: \"funding\",\n [FlowDomain.DOMAIN_TRADING]: \"trading\",\n [FlowDomain.DOMAIN_LENDING]: \"lending\",\n } satisfies ProtoToOutput<FlowDomain, LifecycleFlowDomainValue>,\n} as const;\n\nexport const LifecycleFlowKindCodec = {\n inputToProto: {\n deposit: FlowKind.KIND_DEPOSIT,\n withdraw: FlowKind.KIND_WITHDRAW,\n transfer: FlowKind.KIND_TRANSFER,\n } satisfies InputToProto<LifecycleFlowKindValue, FlowKind>,\n protoToOutput: {\n [FlowKind.KIND_UNSPECIFIED]: \"unspecified\",\n [FlowKind.KIND_DEPOSIT]: \"deposit\",\n [FlowKind.KIND_WITHDRAW]: \"withdraw\",\n [FlowKind.KIND_TRANSFER]: \"transfer\",\n } satisfies ProtoToOutput<FlowKind, LifecycleFlowKindValue>,\n} as const;\n\nexport const LifecycleFlowStateCodec = {\n inputToProto: {\n pending_source: FlowState.STATE_PENDING_SOURCE,\n pending_polyester_chain: FlowState.STATE_PENDING_POLYESTER_CHAIN,\n pending_ledger: FlowState.STATE_PENDING_LEDGER,\n completed: FlowState.STATE_COMPLETED,\n failed: FlowState.STATE_FAILED,\n dropped: FlowState.STATE_DROPPED,\n refunded: FlowState.STATE_REFUNDED,\n } satisfies InputToProto<LifecycleFlowStateValue, FlowState>,\n protoToOutput: {\n [FlowState.STATE_UNSPECIFIED]: \"unspecified\",\n [FlowState.STATE_PENDING_SOURCE]: \"pending_source\",\n [FlowState.STATE_PENDING_POLYESTER_CHAIN]: \"pending_polyester_chain\",\n [FlowState.STATE_PENDING_LEDGER]: \"pending_ledger\",\n [FlowState.STATE_COMPLETED]: \"completed\",\n [FlowState.STATE_FAILED]: \"failed\",\n [FlowState.STATE_DROPPED]: \"dropped\",\n [FlowState.STATE_REFUNDED]: \"refunded\",\n } satisfies ProtoToOutput<FlowState, LifecycleFlowStateValue>,\n} as const;\n\nexport const LifecycleListScopeCodec = {\n inputToProto: {\n all: ListScope.LIST_ALL,\n open: ListScope.LIST_OPEN_ONLY,\n terminal: ListScope.LIST_TERMINAL_ONLY,\n } satisfies InputToProto<LifecycleListScopeValue, ListScope>,\n protoToOutput: {\n [ListScope.LIST_UNSPECIFIED]: \"unspecified\",\n [ListScope.LIST_ALL]: \"all\",\n [ListScope.LIST_OPEN_ONLY]: \"open\",\n [ListScope.LIST_TERMINAL_ONLY]: \"terminal\",\n } satisfies ProtoToOutput<ListScope, LifecycleListScopeValue>,\n} as const;\n\nexport const LifecycleFlowParticipationCodec = {\n inputToProto: {\n owner: FlowParticipation.PARTICIPATION_OWNER,\n recipient: FlowParticipation.PARTICIPATION_RECIPIENT,\n } satisfies InputToProto<LifecycleFlowParticipationValue, FlowParticipation>,\n protoToOutput: {\n [FlowParticipation.PARTICIPATION_UNSPECIFIED]: \"unspecified\",\n [FlowParticipation.PARTICIPATION_OWNER]: \"owner\",\n [FlowParticipation.PARTICIPATION_RECIPIENT]: \"recipient\",\n } satisfies ProtoToOutput<FlowParticipation, LifecycleFlowParticipationValue>,\n} as const;\n\nexport const LifecycleSortCodec = {\n inputToProto: {\n newest: Sort.NEWEST,\n oldest: Sort.OLDEST,\n } satisfies InputToProto<LifecycleSortValue, Sort>,\n} as const;\n\nexport const LifecycleListOrderByCodec = {\n inputToProto: {\n last_activity: ListOrderBy.ORDER_BY_LAST_ACTIVITY,\n started_at: ListOrderBy.ORDER_BY_STARTED_AT,\n } satisfies InputToProto<LifecycleListOrderByValue, ListOrderBy>,\n} as const;\n\n/**\n * LifecycleReason is a stable product-facing reason catalog. Unlike the other\n * lifecycle enums, `REASON_UNSPECIFIED` (0) is a valid wire value — it is\n * the normal state for flows without a notable reason — so the codec maps the\n * full enum including zero.\n */\nexport const LifecycleReasonCodec = {\n protoToOutput: {\n [LifecycleReason.REASON_UNSPECIFIED]: \"unspecified\",\n [LifecycleReason.ZIPPER_VALIDATION_REJECTED]: \"zipper_validation_rejected\",\n [LifecycleReason.ZIPPER_EXECUTION_REJECTED]: \"zipper_execution_rejected\",\n [LifecycleReason.ZIPPER_WITHDRAW_EXECUTION_FAILED]: \"zipper_withdraw_execution_failed\",\n [LifecycleReason.ZIPPER_DEPOSIT_REFUND_FAILED]: \"zipper_deposit_refund_failed\",\n [LifecycleReason.ZIPPER_COMPLIANCE_TRANSFERRED]: \"zipper_compliance_transferred\",\n [LifecycleReason.LEDGER_MIRROR_REJECTED]: \"ledger_mirror_rejected\",\n [LifecycleReason.LEDGER_MIRROR_TRANSFER_EXCEEDS_CREDITS]:\n \"ledger_mirror_transfer_exceeds_credits\",\n [LifecycleReason.LEDGER_MIRROR_TRANSFER_EXISTS]: \"ledger_mirror_transfer_exists\",\n [LifecycleReason.LEDGER_MIRROR_PENDING_TRANSFER_NOT_FOUND]:\n \"ledger_mirror_pending_transfer_not_found\",\n [LifecycleReason.LEDGER_MIRROR_TRANSFER_ID_ALREADY_FAILED]:\n \"ledger_mirror_transfer_id_already_failed\",\n [LifecycleReason.TRADING_WITHDRAW_POLICY_DENIED]: \"trading_withdraw_policy_denied\",\n [LifecycleReason.TRADING_WITHDRAW_CONTRACT_REVERTED]: \"trading_withdraw_contract_reverted\",\n [LifecycleReason.TRADING_WITHDRAW_EXECUTION_FAILED]: \"trading_withdraw_execution_failed\",\n [LifecycleReason.DEPOSIT_SOURCE_NOT_CONFIRMED]: \"deposit_source_not_confirmed\",\n } satisfies Record<LifecycleReason, LifecycleReasonValue>,\n} as const;\n\n/**\n * Maps a wire reason code to its catalog label, preserving uncataloged codes\n * as `unknown_reason_${code}` instead of failing the whole flow payload.\n */\nexport function lifecycleReasonFromCode(code: number): LifecycleReasonValue {\n const known = LifecycleReasonCodec.protoToOutput as Partial<\n Record<number, LifecycleReasonValue>\n >;\n return known[code] ?? `unknown_reason_${code}`;\n}\n\nexport const LifecycleTxLookupKindCodec = {\n inputToProto: {\n source: TxLookupKind.TX_SOURCE,\n any: TxLookupKind.TX_ANY,\n } satisfies InputToProto<LifecycleTxLookupKindValue, TxLookupKind>,\n protoToOutput: {\n [TxLookupKind.TX_UNSPECIFIED]: \"unspecified\",\n [TxLookupKind.TX_SOURCE]: \"source\",\n [TxLookupKind.TX_ANY]: \"any\",\n } satisfies ProtoToOutput<TxLookupKind, LifecycleTxLookupKindValue>,\n} as const;\n\nexport const LifecycleFlowStepCodec = {\n protoToOutput: {\n [FlowStep.UNSPECIFIED]: \"unspecified\",\n [FlowStep.SOURCE]: \"source\",\n [FlowStep.TRANSFER]: \"transfer\",\n [FlowStep.REQUEST]: \"request\",\n [FlowStep.VALIDATION]: \"validation\",\n [FlowStep.EXECUTION]: \"execution\",\n [FlowStep.BRIDGE_FULFILLMENT]: \"bridge_fulfillment\",\n [FlowStep.DROPPED]: \"dropped\",\n [FlowStep.FAILED]: \"failed\",\n [FlowStep.REFUNDED]: \"refunded\",\n [FlowStep.FULFILLING]: \"fulfilling\",\n [FlowStep.SETTLEMENT]: \"settlement\",\n } satisfies ProtoToOutput<FlowStep, LifecycleFlowStepValue>,\n} as const;\n\nexport const LifecycleSourceCodec = {\n /**\n * In-progress flows may emit SOURCE_UNSPECIFIED (0) before a subsystem is\n * attributed, so zero must decode like other lifecycle \"unspecified\" enums.\n */\n protoToOutput: {\n [LifecycleSource.SOURCE_UNSPECIFIED]: \"unspecified\",\n [LifecycleSource.SOURCE_RELAYER]: \"relayer\",\n [LifecycleSource.SOURCE_POLYESTER_CHAIN]: \"polyester_chain\",\n [LifecycleSource.SOURCE_EXECUTOR]: \"executor\",\n [LifecycleSource.SOURCE_LEDGER]: \"ledger\",\n [LifecycleSource.SOURCE_LIFECYCLE]: \"lifecycle\",\n } satisfies Record<LifecycleSource, LifecycleSourceValue>,\n} as const;\n\nexport const LifecycleFlowStepActivityKindCodec = {\n protoToOutput: {\n [FlowStepActivityKind.ACTIVITY_MINTED]: \"minted\",\n [FlowStepActivityKind.ACTIVITY_FUNDING]: \"funding\",\n [FlowStepActivityKind.ACTIVITY_TRADING]: \"trading\",\n [FlowStepActivityKind.ACTIVITY_UNSPECIFIED]: \"unspecified\",\n } satisfies Record<FlowStepActivityKind, LifecycleFlowStepActivityKindValue>,\n} as const;\n\nexport const LifecycleFlowTimelineStatusCodec = {\n protoToOutput: {\n [FlowTimelineStatus.TIMELINE_STATUS_UNSPECIFIED]: \"unspecified\",\n [FlowTimelineStatus.TIMELINE_STATUS_COMPLETED]: \"completed\",\n [FlowTimelineStatus.TIMELINE_STATUS_CURRENT]: \"current\",\n [FlowTimelineStatus.TIMELINE_STATUS_PLANNED]: \"planned\",\n } satisfies ProtoToOutput<FlowTimelineStatus, LifecycleFlowTimelineStatusValue>,\n} as const;\n\nexport const LifecycleRequestFeeStatusCodec = {\n protoToOutput: {\n [RequestFeeStatus.UNSPECIFIED]: \"unspecified\",\n [RequestFeeStatus.LOCKED]: \"locked\",\n [RequestFeeStatus.SETTLED]: \"settled\",\n [RequestFeeStatus.KEPT]: \"kept\",\n } satisfies ProtoToOutput<RequestFeeStatus, LifecycleRequestFeeStatusValue>,\n} as const;\n"],"mappings":";;;AAoBA,MAAa,6BAA6B;CAAC;CAAW;CAAY;AAAU;AAG5E,MAAa,8BAA8B;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAGA,MAAa,8BAA8B;CAAC;CAAO;CAAQ;AAAU;AAGrE,MAAa,sCAAsC,CAAC,SAAS,WAAW;AAGxE,MAAa,kCAAkC,CAAC,UAAU,KAAK;AAG/D,MAAa,wBAAwB,CAAC,UAAU,QAAQ;AAGxD,MAAa,iCAAiC,CAAC,iBAAiB,YAAY;AA+E5E,MAAa,2BAA2B,EACpC,eAAe;EACsB,IAAA;EACG,IAAA;EACR,IAAA;EACC,IAAA;EACA,IAAA;EACA,IAAA;AACjC,EACJ;AAEA,MAAa,yBAAyB;CAClC,cAAc;EACV,SAAA;EACA,UAAA;EACA,UAAA;CACJ;CACA,eAAe;GACkB,IAAA;GACJ,IAAA;GACC,IAAA;GACA,IAAA;CAC9B;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,gBAAA;EACA,yBAAA;EACA,gBAAA;EACA,WAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;CACJ;CACA,eAAe;GACoB,IAAA;GACG,IAAA;GACS,IAAA;GACT,IAAA;GACL,IAAA;GACH,IAAA;GACC,IAAA;GACC,IAAA;CAChC;AACJ;AAEA,MAAa,0BAA0B;CACnC,cAAc;EACV,KAAA;EACA,MAAA;EACA,UAAA;CACJ;CACA,eAAe;GACmB,IAAA;GACR,IAAA;GACM,IAAA;GACI,IAAA;CACpC;AACJ;AAEA,MAAa,kCAAkC;CAC3C,cAAc;EACV,OAAA;EACA,WAAA;CACJ;CACA,eAAe;GACoC,IAAA;GACN,IAAA;GACI,IAAA;CACjD;AACJ;AAEA,MAAa,qBAAqB,EAC9B,cAAc;CACV,QAAA;CACA,QAAA;AACJ,EACJ;AAEA,MAAa,4BAA4B,EACrC,cAAc;CACV,eAAA;CACA,YAAA;AACJ,EACJ;;;;;;;AAQA,MAAa,uBAAuB,EAChC,eAAe;EAC2B,IAAA;EACQ,MAAA;EACD,MAAA;EACO,MAAA;EACJ,MAAA;EACC,MAAA;EACP,MAAA;EAEtC,MAAA;EAC6C,MAAA;EAE7C,MAAA;EAEA,MAAA;EAC8C,MAAA;EACI,MAAA;EACD,MAAA;EACL,MAAA;AACpD,EACJ;;;;;AAMA,SAAgB,wBAAwB,MAAoC;CAIxE,OAHc,qBAAqB,cAGtB,SAAS,kBAAkB;AAC5C;AAEA,MAAa,6BAA6B;CACtC,cAAc;EACV,QAAA;EACA,KAAA;CACJ;CACA,eAAe;GACoB,IAAA;GACL,IAAA;GACH,IAAA;CAC3B;AACJ;AAEA,MAAa,yBAAyB,EAClC,eAAe;EACa,IAAA;EACL,IAAA;EACE,IAAA;EACD,IAAA;EACG,IAAA;EACD,IAAA;EACS,IAAA;EACX,IAAA;EACD,IAAA;EACE,IAAA;EACE,KAAA;EACA,KAAA;AAC3B,EACJ;AAEA,MAAa,uBAAuB;;;;;AAKhC,eAAe;EAC2B,IAAA;EACJ,IAAA;EACQ,IAAA;EACP,IAAA;EACF,IAAA;EACG,IAAA;AACxC,EACJ;AAEA,MAAa,qCAAqC,EAC9C,eAAe;EAC6B,IAAA;EACC,IAAA;EACA,IAAA;EACI,IAAA;AACjD,EACJ;AAEA,MAAa,mCAAmC,EAC5C,eAAe;EACuC,IAAA;EACF,IAAA;EACF,IAAA;EACA,IAAA;AAClD,EACJ;AAEA,MAAa,iCAAiC,EAC1C,eAAe;EACqB,IAAA;EACL,IAAA;EACC,IAAA;EACH,IAAA;AAC7B,EACJ"}