@polyester/sdk 0.36.0-devnet-20261113022813 → 0.36.0-devnet-20261114152753

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 (237) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/browser-core.js +1 -1
  3. package/dist/catalogs/index.d.ts +2 -2
  4. package/dist/catalogs/snapshot-validation.js +3 -1
  5. package/dist/catalogs/snapshot-validation.js.map +1 -1
  6. package/dist/catalogs/zipper-catalog.d.ts +2 -0
  7. package/dist/catalogs/zipper-catalog.d.ts.map +1 -1
  8. package/dist/catalogs/zipper-catalog.js.map +1 -1
  9. package/dist/gen/ai/v1/assistant_pb.d.ts +1 -1
  10. package/dist/gen/ai/v1/assistant_pb.js +1 -1
  11. package/dist/gen/alerts/v1/price_alerts_pb.d.ts +1 -1
  12. package/dist/gen/auth/v1/address_book_pb.d.ts +1 -1
  13. package/dist/gen/auth/v1/api_keys_pb.d.ts +6 -6
  14. package/dist/gen/auth/v1/api_keys_pb.js +5 -5
  15. package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
  16. package/dist/gen/auth/v1/auth_pb.d.ts +1 -1
  17. package/dist/gen/auth/v1/mfa_pb.d.ts +1 -1
  18. package/dist/gen/auth/v1/policies_pb.d.ts +10 -2
  19. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  20. package/dist/gen/auth/v1/policies_pb.js +9 -1
  21. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  22. package/dist/gen/auth/v1/profile_pb.d.ts +1 -1
  23. package/dist/gen/auth/v1/resolve_pb.d.ts +1 -1
  24. package/dist/gen/auth/v1/social_verification_pb.d.ts +1 -1
  25. package/dist/gen/auth/v1/subaccounts_pb.d.ts +8 -2
  26. package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
  27. package/dist/gen/auth/v1/subaccounts_pb.js +8 -2
  28. package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
  29. package/dist/gen/chain/analytics/v1/analytics_read_pb.d.ts +1 -1
  30. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +1 -1
  31. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +1 -1
  32. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +1 -1
  33. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +1 -1
  34. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +1 -1
  35. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +1 -1
  36. package/dist/gen/chain/zipper/v1/reason_pb.d.ts +1 -1
  37. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +48 -3
  38. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts.map +1 -1
  39. package/dist/gen/chain/zipper/v1/zipper_pb.js +36 -2
  40. package/dist/gen/chain/zipper/v1/zipper_pb.js.map +1 -1
  41. package/dist/gen/changelog/v1/changelog_pb.d.ts +7 -4
  42. package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -1
  43. package/dist/gen/changelog/v1/changelog_pb.js +2 -1
  44. package/dist/gen/changelog/v1/changelog_pb.js.map +1 -1
  45. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +1 -1
  46. package/dist/gen/claims/v1/claims_pb.d.ts +1 -1
  47. package/dist/gen/fees/v1/fees_pb.d.ts +1 -1
  48. package/dist/gen/index.d.ts +2 -1
  49. package/dist/gen/index.js +22 -21
  50. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts +126 -3
  51. package/dist/gen/ledger/read/v1/ledger_read_pb.d.ts.map +1 -1
  52. package/dist/gen/ledger/read/v1/ledger_read_pb.js +17 -3
  53. package/dist/gen/ledger/read/v1/ledger_read_pb.js.map +1 -1
  54. package/dist/gen/marketdata/v1/asset_info_pb.d.ts +178 -0
  55. package/dist/gen/marketdata/v1/asset_info_pb.d.ts.map +1 -0
  56. package/dist/gen/marketdata/v1/asset_info_pb.js +45 -0
  57. package/dist/gen/marketdata/v1/asset_info_pb.js.map +1 -0
  58. package/dist/gen/marketdata/v1/heatmap_pb.d.ts +1 -1
  59. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +13 -1
  60. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  61. package/dist/gen/marketdata/v1/marketdata_pb.js +6 -1
  62. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  63. package/dist/gen/marketoverview/v1/marketoverview_pb.d.ts +1 -1
  64. package/dist/gen/notifications/v1/notifications_pb.d.ts +1 -1
  65. package/dist/gen/orderbook/v1/orderbook_pb.d.ts +1 -1
  66. package/dist/gen/orders/v1/orders_pb.d.ts +1 -1
  67. package/dist/gen/orders/v1/orders_read_pb.d.ts +1 -1
  68. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +1 -1
  69. package/dist/gen/polyester/type/v1/u128_pb.d.ts +1 -1
  70. package/dist/gen/privatews/v1/private_ws_pb.d.ts +1 -1
  71. package/dist/gen/ratelimit/v1/ratelimit_pb.d.ts +1 -1
  72. package/dist/gen/rewards/v1/rewards_pb.d.ts +1 -1
  73. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +13 -1
  74. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
  75. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +12 -0
  76. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
  77. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +14 -10
  78. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  79. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +10 -7
  80. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  81. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +3 -3
  82. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -1
  83. package/dist/gen/swap/v1/swap_pb.d.ts +1 -1
  84. package/dist/gen/system/v1/system_pb.d.ts +408 -3
  85. package/dist/gen/system/v1/system_pb.d.ts.map +1 -1
  86. package/dist/gen/system/v1/system_pb.js +221 -3
  87. package/dist/gen/system/v1/system_pb.js.map +1 -1
  88. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +1 -1
  89. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +1 -1
  90. package/dist/gen/triggers/v1/triggers_pb.d.ts +7 -5
  91. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  92. package/dist/gen/triggers/v1/triggers_pb.js +6 -4
  93. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  94. package/dist/gen/vip/v1/vip_pb.d.ts +1 -1
  95. package/dist/index.d.ts +7 -4
  96. package/dist/index.js +1 -1
  97. package/dist/realtime/snapshot-then-stream.js +1 -1
  98. package/dist/server-core.js +3 -3
  99. package/dist/services/accounts/accounts.js +1 -1
  100. package/dist/services/accounts/accounts.schemas.js +1 -1
  101. package/dist/services/address-book/address-book.js +1 -1
  102. package/dist/services/api-keys/api-keys.codecs.d.ts +2 -2
  103. package/dist/services/api-keys/api-keys.codecs.js +2 -2
  104. package/dist/services/api-keys/api-keys.codecs.js.map +1 -1
  105. package/dist/services/api-keys/api-keys.js +1 -1
  106. package/dist/services/api-keys/api-keys.schemas.js +1 -1
  107. package/dist/services/assistant/assistant-events.schemas.d.ts +96 -67
  108. package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
  109. package/dist/services/assistant/assistant.js +1 -1
  110. package/dist/services/assistant/assistant.schemas.d.ts +1 -1
  111. package/dist/services/assistant/assistant.schemas.js +1 -1
  112. package/dist/services/auth/account-signer-auth.js +2 -2
  113. package/dist/services/auth/auth.js +1 -1
  114. package/dist/services/auth/profile/profile.js +2 -2
  115. package/dist/services/auto-withdraw/auto-withdraw.js +1 -1
  116. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +6 -6
  117. package/dist/services/auto-withdraw/auto-withdraw.schemas.js +1 -1
  118. package/dist/services/balances/balances.d.ts +12 -1
  119. package/dist/services/balances/balances.d.ts.map +1 -1
  120. package/dist/services/balances/balances.js +38 -2
  121. package/dist/services/balances/balances.js.map +1 -1
  122. package/dist/services/balances/balances.schemas.d.ts +55 -1
  123. package/dist/services/balances/balances.schemas.d.ts.map +1 -1
  124. package/dist/services/balances/balances.schemas.js +22 -1
  125. package/dist/services/balances/balances.schemas.js.map +1 -1
  126. package/dist/services/balances/balances.types.d.ts +2 -2
  127. package/dist/services/candles/candles.js +2 -2
  128. package/dist/services/chain-analytics/chain-analytics.js +1 -1
  129. package/dist/services/changelog/changelog.js +1 -1
  130. package/dist/services/checkpoints/checkpoints.js +1 -1
  131. package/dist/services/checkpoints/checkpoints.schemas.d.ts +3 -3
  132. package/dist/services/claims/claims.js +1 -1
  133. package/dist/services/claims/claims.schemas.js +1 -1
  134. package/dist/services/deposit/deposit.js +1 -1
  135. package/dist/services/fees/fees.js +1 -1
  136. package/dist/services/guard-signer/guard-signer.js +1 -1
  137. package/dist/services/guard-signer/guard-signer.schemas.js +1 -1
  138. package/dist/services/heatmap/heatmap.js +2 -2
  139. package/dist/services/internal-transfers/internal-transfers.js +1 -1
  140. package/dist/services/lifecycle/lifecycle.js +3 -3
  141. package/dist/services/lifecycle/lifecycle.schemas.d.ts +53 -53
  142. package/dist/services/lifecycle/lifecycle.schemas.js +2 -2
  143. package/dist/services/market-data/market-data.d.ts +7 -1
  144. package/dist/services/market-data/market-data.d.ts.map +1 -1
  145. package/dist/services/market-data/market-data.js +14 -3
  146. package/dist/services/market-data/market-data.js.map +1 -1
  147. package/dist/services/market-data/market-data.schemas.d.ts +108 -1
  148. package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
  149. package/dist/services/market-data/market-data.schemas.js +42 -2
  150. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  151. package/dist/services/market-data/market-data.types.d.ts +2 -2
  152. package/dist/services/market-overview/market-overview.js +2 -2
  153. package/dist/services/market-overview/market-overview.schemas.js +1 -1
  154. package/dist/services/notifications/notifications.js +1 -1
  155. package/dist/services/notifications/notifications.schemas.d.ts +1 -1
  156. package/dist/services/orderbook/orderbook.js +1 -1
  157. package/dist/services/orders/order-errors.schemas.d.ts +2 -2
  158. package/dist/services/orders/order-errors.schemas.js +1 -1
  159. package/dist/services/orders/orders-batch.schemas.d.ts +40 -40
  160. package/dist/services/orders/orders-batch.schemas.js +2 -2
  161. package/dist/services/orders/orders-input.schemas.d.ts +6 -6
  162. package/dist/services/orders/orders-input.schemas.js +2 -2
  163. package/dist/services/orders/orders-modify.schemas.js +2 -2
  164. package/dist/services/orders/orders-output.schemas.d.ts +11 -11
  165. package/dist/services/orders/orders-output.schemas.js +1 -1
  166. package/dist/services/orders/orders-risk.schemas.js +3 -3
  167. package/dist/services/orders/orders.js +2 -2
  168. package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
  169. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  170. package/dist/services/policies/shared.codecs.js +7 -4
  171. package/dist/services/policies/shared.codecs.js.map +1 -1
  172. package/dist/services/policies/shared.d.ts +1 -1
  173. package/dist/services/policies/subaccount-policies/subaccount-policies.js +2 -2
  174. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
  175. package/dist/services/price-alerts/price-alerts.js +1 -1
  176. package/dist/services/rate-limits/rate-limits.js +1 -1
  177. package/dist/services/rewards/rewards.js +1 -1
  178. package/dist/services/social-verification/social-verification.js +1 -1
  179. package/dist/services/social-verification/social-verification.schemas.js +1 -1
  180. package/dist/services/subaccounts/subaccounts.codecs.js +2 -1
  181. package/dist/services/subaccounts/subaccounts.codecs.js.map +1 -1
  182. package/dist/services/subaccounts/subaccounts.js +3 -3
  183. package/dist/services/subaccounts/subaccounts.schemas.d.ts +10 -10
  184. package/dist/services/system/system.codecs.d.ts +20 -0
  185. package/dist/services/system/system.codecs.d.ts.map +1 -0
  186. package/dist/services/system/system.codecs.js +57 -0
  187. package/dist/services/system/system.codecs.js.map +1 -0
  188. package/dist/services/system/system.d.ts +7 -0
  189. package/dist/services/system/system.d.ts.map +1 -1
  190. package/dist/services/system/system.js +14 -1
  191. package/dist/services/system/system.js.map +1 -1
  192. package/dist/services/system/system.schemas.d.ts +234 -0
  193. package/dist/services/system/system.schemas.d.ts.map +1 -0
  194. package/dist/services/system/system.schemas.js +78 -0
  195. package/dist/services/system/system.schemas.js.map +1 -0
  196. package/dist/services/system/system.types.d.ts +4 -0
  197. package/dist/services/trades/trades.js +2 -2
  198. package/dist/services/trades/trades.schemas.d.ts +2 -2
  199. package/dist/services/trading-withdraws/trading-withdraws.js +1 -1
  200. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +1 -1
  201. package/dist/services/trading-withdraws/wallet-message.js +1 -1
  202. package/dist/services/transfers/transfers.js +2 -2
  203. package/dist/services/triggers/trigger-child-order.schemas.js +3 -3
  204. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  205. package/dist/services/triggers/trigger-input.schemas.js +2 -2
  206. package/dist/services/triggers/triggers-output.schemas.d.ts +47 -47
  207. package/dist/services/triggers/triggers.js +2 -2
  208. package/dist/services/vip/vip.js +1 -1
  209. package/dist/services/vip/vip.schemas.d.ts +3 -3
  210. package/dist/services/vip/vip.schemas.js +1 -1
  211. package/dist/services/zipper/zipper.js +1 -1
  212. package/dist/services/zipper/zipper.schemas.d.ts +2 -2
  213. package/dist/services/zipper/zipper.schemas.d.ts.map +1 -1
  214. package/dist/services/zipper/zipper.schemas.js +10 -3
  215. package/dist/services/zipper/zipper.schemas.js.map +1 -1
  216. package/dist/services/zipper/zipper.types.d.ts +2 -2
  217. package/dist/shared/catalog-config.d.ts +13 -1
  218. package/dist/shared/catalog-config.d.ts.map +1 -1
  219. package/dist/shared/catalog-config.js +6 -1
  220. package/dist/shared/catalog-config.js.map +1 -1
  221. package/dist/shared/error-details/alerts.js +1 -1
  222. package/dist/shared/error-details/assistant.js +1 -1
  223. package/dist/shared/error-details/auth.js +1 -1
  224. package/dist/shared/error-details/claims.js +1 -1
  225. package/dist/shared/error-details/internal-transfer.js +1 -1
  226. package/dist/shared/error-details/ledger.js +1 -1
  227. package/dist/shared/error-details/market-overview.js +1 -1
  228. package/dist/shared/error-details/notifications.js +1 -1
  229. package/dist/shared/error-details/orders.js +1 -1
  230. package/dist/shared/error-details/profile.js +1 -1
  231. package/dist/shared/error-details/rate-limit.js +1 -1
  232. package/dist/shared/error-details/withdraw.js +1 -1
  233. package/dist/shared/rate-limit.schemas.d.ts +1 -1
  234. package/dist/shared/rate-limit.schemas.js +1 -1
  235. package/dist/utils/cookies.js +1 -1
  236. package/dist/wired-services.js +17 -17
  237. package/package.json +1 -1
@@ -27,7 +27,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
27
27
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
28
28
  }, undefined>, undefined>, readonly []>;
29
29
  readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
30
- readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[]>]>;
30
+ readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[]>]>;
31
31
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
32
32
  readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
33
33
  readonly createdAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -50,7 +50,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
50
50
  symbolId: number;
51
51
  }[];
52
52
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
53
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
53
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
54
54
  isTemplate: boolean;
55
55
  sourceTemplateId?: string | undefined;
56
56
  createdAt: number;
@@ -69,7 +69,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
69
69
  symbolId: number;
70
70
  }[];
71
71
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
72
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
72
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
73
73
  isTemplate: boolean;
74
74
  sourceTemplateId?: string | undefined;
75
75
  createdAt: number;
@@ -85,7 +85,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
85
85
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
86
86
  }, undefined>, undefined>, readonly []>;
87
87
  readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
88
- readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[]>]>;
88
+ readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[]>]>;
89
89
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
90
90
  readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
91
91
  readonly createdAt: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -108,7 +108,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
108
108
  symbolId: number;
109
109
  }[];
110
110
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
111
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
111
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
112
112
  isTemplate: boolean;
113
113
  sourceTemplateId?: string | undefined;
114
114
  createdAt: number;
@@ -127,7 +127,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
127
127
  symbolId: number;
128
128
  }[];
129
129
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
130
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
130
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
131
131
  isTemplate: boolean;
132
132
  sourceTemplateId?: string | undefined;
133
133
  createdAt: number;
@@ -144,7 +144,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
144
144
  symbolId: number;
145
145
  }[];
146
146
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
147
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
147
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
148
148
  isTemplate: boolean;
149
149
  sourceTemplateId?: string | undefined;
150
150
  createdAt: number;
@@ -160,7 +160,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
160
160
  symbolId: number;
161
161
  }[];
162
162
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
163
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
163
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
164
164
  isTemplate: boolean;
165
165
  sourceTemplateId?: string | undefined;
166
166
  createdAt: number;
@@ -174,7 +174,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
174
174
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
175
175
  }, undefined>, undefined>, readonly []>;
176
176
  readonly spotMarketScope: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["all", "allowlist"], undefined>, v.TransformAction<"all" | "allowlist", MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST>]>;
177
- readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status", "read-price-alerts", "manage-price-alerts"], undefined>, undefined>, readonly []>, v.TransformAction<("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts")[], (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS)[]>]>;
177
+ readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status", "read-price-alerts", "manage-price-alerts", "read-statements"], undefined>, undefined>, readonly []>, v.TransformAction<("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements")[], (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS | PolicyAction.READ_STATEMENTS)[]>]>;
178
178
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
179
179
  readonly assignToKeyId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
180
180
  }, undefined>, v.TransformAction<{
@@ -184,7 +184,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
184
184
  symbolId: number;
185
185
  }[];
186
186
  spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
187
- actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS)[];
187
+ actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS | PolicyAction.READ_STATEMENTS)[];
188
188
  isTemplate: boolean;
189
189
  assignToKeyId?: string | undefined;
190
190
  }, {
@@ -195,7 +195,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
195
195
  symbolId: number;
196
196
  }[];
197
197
  spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
198
- actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS)[];
198
+ actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS | PolicyAction.READ_STATEMENTS)[];
199
199
  isTemplate: boolean;
200
200
  };
201
201
  assignToKeyId: string | undefined;
@@ -210,7 +210,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
210
210
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
211
211
  }, undefined>, undefined>, undefined>;
212
212
  readonly spotMarketScope: v.OptionalSchema<v.PicklistSchema<readonly ["all", "allowlist"], undefined>, undefined>;
213
- readonly actions: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status", "read-price-alerts", "manage-price-alerts"], undefined>, undefined>, undefined>;
213
+ readonly actions: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status", "read-price-alerts", "manage-price-alerts", "read-statements"], undefined>, undefined>, undefined>;
214
214
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
215
215
  }, undefined>, v.CheckAction<{
216
216
  policyId: bigint;
@@ -221,7 +221,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
221
221
  symbolId: number;
222
222
  }[] | undefined;
223
223
  spotMarketScope?: "all" | "allowlist" | undefined;
224
- actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts")[] | undefined;
224
+ actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements")[] | undefined;
225
225
  isTemplate?: boolean | undefined;
226
226
  }, "At least one API key policy field must be provided">, v.TransformAction<{
227
227
  policyId: bigint;
@@ -232,7 +232,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
232
232
  symbolId: number;
233
233
  }[] | undefined;
234
234
  spotMarketScope?: "all" | "allowlist" | undefined;
235
- actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts")[] | undefined;
235
+ actions?: ("swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements")[] | undefined;
236
236
  isTemplate?: boolean | undefined;
237
237
  }, {
238
238
  policyId: bigint;
@@ -247,7 +247,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
247
247
  } & {
248
248
  spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
249
249
  } & {
250
- actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS)[];
250
+ actions: (PolicyAction.TRADE_SPOT | PolicyAction.INTERNAL_TRANSFER | PolicyAction.EXTERNAL_WITHDRAW | PolicyAction.READ_BALANCES | PolicyAction.READ_SPOT | PolicyAction.READ_INTERNAL_TRANSFERS | PolicyAction.READ_ADDRESS_BOOK | PolicyAction.MANAGE_ADDRESS_BOOK | PolicyAction.READ_AUTO_WITHDRAW | PolicyAction.MANAGE_AUTO_WITHDRAW | PolicyAction.SWAP | PolicyAction.READ_API_KEYS | PolicyAction.READ_API_POLICIES | PolicyAction.READ_SUBACCOUNT_POLICIES | PolicyAction.READ_SUBACCOUNT_PERMISSIONS | PolicyAction.READ_VIP_STATUS | PolicyAction.READ_SOCIAL_VERIFICATION | PolicyAction.READ_PROFILE | PolicyAction.READ_ACCOUNT_DIRECTORY | PolicyAction.READ_WITHDRAW_VALIDATION | PolicyAction.READ_DAILY_CLAIMS | PolicyAction.CLAIM_DAILY_REWARD | PolicyAction.READ_CHECKPOINTS | PolicyAction.READ_REWARDS | PolicyAction.CREATE_DEPOSIT_ADDRESS | PolicyAction.READ_DEPOSIT_ADDRESSES | PolicyAction.READ_SUBACCOUNTS | PolicyAction.READ_SUBACCOUNT_ACTIVITY | PolicyAction.READ_SUBACCOUNT_MEMBERS | PolicyAction.READ_SUBACCOUNT_INVITES | PolicyAction.READ_GUARD_SIGNER_STATUS | PolicyAction.READ_PRICE_ALERTS | PolicyAction.MANAGE_PRICE_ALERTS | PolicyAction.READ_STATEMENTS)[];
251
251
  } & {
252
252
  isTemplate: boolean;
253
253
  }>;
@@ -1,5 +1,5 @@
1
- import { enumLabel } from "../../shared/proto-enum-codec.js";
2
1
  import "../../gen/auth/v1/policies_pb.js";
2
+ import { enumLabel } from "../../shared/proto-enum-codec.js";
3
3
  //#region src/services/policies/shared.codecs.ts
4
4
  /** Product actions, accepted by sub-account and API-key policies. */
5
5
  const PRODUCT_POLICY_ACTION_LABELS = [
@@ -42,7 +42,8 @@ const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [
42
42
  "read-subaccount-invites",
43
43
  "read-guard-signer-status",
44
44
  "read-price-alerts",
45
- "manage-price-alerts"
45
+ "manage-price-alerts",
46
+ "read-statements"
46
47
  ];
47
48
  const POLICY_ACTION_LABELS = [...PRODUCT_POLICY_ACTION_LABELS, ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS];
48
49
  const PolicyMarketScopeCodec = {
@@ -91,7 +92,8 @@ const PolicyActionCodec = {
91
92
  [34]: "read-subaccount-invites",
92
93
  [35]: "read-guard-signer-status",
93
94
  [36]: "read-price-alerts",
94
- [37]: "manage-price-alerts"
95
+ [37]: "manage-price-alerts",
96
+ [38]: "read-statements"
95
97
  },
96
98
  inputToProto: {
97
99
  "trade-spot": 1,
@@ -126,7 +128,8 @@ const PolicyActionCodec = {
126
128
  "read-subaccount-invites": 34,
127
129
  "read-guard-signer-status": 35,
128
130
  "read-price-alerts": 36,
129
- "manage-price-alerts": 37
131
+ "manage-price-alerts": 37,
132
+ "read-statements": 38
130
133
  }
131
134
  };
132
135
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shared.codecs.js","names":[],"sources":["../../../src/services/policies/shared.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/policies_pb.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum, ProtoToOutput } from \"../../utils/types.js\";\n\n/** Product actions, accepted by sub-account and API-key policies. */\nexport const PRODUCT_POLICY_ACTION_LABELS = [\n \"trade-spot\",\n \"internal-transfer\",\n \"external-withdraw\",\n \"read-balances\",\n \"read-spot\",\n \"read-internal-transfers\",\n \"read-address-book\",\n \"manage-address-book\",\n \"read-auto-withdraw\",\n \"manage-auto-withdraw\",\n \"swap\",\n] as const;\n\n/**\n * Account permissions, accepted by API-key policies only: a sub-account policy refuses them.\n * Each grants exactly the calls it names, and main-account permissions apply only to keys\n * scoped to the main account.\n */\nexport const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [\n \"read-api-keys\",\n \"read-api-policies\",\n \"read-subaccount-policies\",\n \"read-subaccount-permissions\",\n \"read-vip-status\",\n \"read-social-verification\",\n \"read-profile\",\n \"read-account-directory\",\n \"read-withdraw-validation\",\n \"read-daily-claims\",\n \"claim-daily-reward\",\n \"read-checkpoints\",\n \"read-rewards\",\n \"create-deposit-address\",\n \"read-deposit-addresses\",\n \"read-subaccounts\",\n \"read-subaccount-activity\",\n \"read-subaccount-members\",\n \"read-subaccount-invites\",\n \"read-guard-signer-status\",\n \"read-price-alerts\",\n \"manage-price-alerts\",\n] as const;\n\nexport const POLICY_ACTION_LABELS = [\n ...PRODUCT_POLICY_ACTION_LABELS,\n ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS,\n] as const;\nexport type PolicyActionLabel = (typeof POLICY_ACTION_LABELS)[number];\n\nexport const POLICY_MARKET_SCOPE_LABELS = [\"all\", \"allowlist\"] as const;\nexport type PolicyMarketScopeLabel = (typeof POLICY_MARKET_SCOPE_LABELS)[number];\n\nexport const PolicyMarketScopeCodec = {\n inputToProto: {\n all: Proto.MarketScope_Value.ALL,\n allowlist: Proto.MarketScope_Value.ALLOWLIST,\n } satisfies Record<PolicyMarketScopeLabel, Proto.MarketScope_Value>,\n protoToOutput: {\n [Proto.MarketScope_Value.UNSPECIFIED]: \"unspecified\",\n [Proto.MarketScope_Value.ALL]: \"all\",\n [Proto.MarketScope_Value.ALLOWLIST]: \"allowlist\",\n } satisfies ProtoToOutput<Proto.MarketScope_Value, PolicyMarketScopeLabel>,\n} as const;\n\nexport const PolicyActionCodec = {\n protoToOutput: {\n [Proto.PolicyAction.UNSPECIFIED]: \"unspecified\",\n [Proto.PolicyAction.TRADE_SPOT]: \"trade-spot\",\n [Proto.PolicyAction.INTERNAL_TRANSFER]: \"internal-transfer\",\n [Proto.PolicyAction.EXTERNAL_WITHDRAW]: \"external-withdraw\",\n [Proto.PolicyAction.READ_BALANCES]: \"read-balances\",\n [Proto.PolicyAction.READ_SPOT]: \"read-spot\",\n [Proto.PolicyAction.READ_INTERNAL_TRANSFERS]: \"read-internal-transfers\",\n [Proto.PolicyAction.READ_ADDRESS_BOOK]: \"read-address-book\",\n [Proto.PolicyAction.MANAGE_ADDRESS_BOOK]: \"manage-address-book\",\n [Proto.PolicyAction.READ_AUTO_WITHDRAW]: \"read-auto-withdraw\",\n [Proto.PolicyAction.MANAGE_AUTO_WITHDRAW]: \"manage-auto-withdraw\",\n [Proto.PolicyAction.SWAP]: \"swap\",\n [Proto.PolicyAction.READ_API_KEYS]: \"read-api-keys\",\n [Proto.PolicyAction.READ_API_POLICIES]: \"read-api-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_POLICIES]: \"read-subaccount-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS]: \"read-subaccount-permissions\",\n [Proto.PolicyAction.READ_VIP_STATUS]: \"read-vip-status\",\n [Proto.PolicyAction.READ_SOCIAL_VERIFICATION]: \"read-social-verification\",\n [Proto.PolicyAction.READ_PROFILE]: \"read-profile\",\n [Proto.PolicyAction.READ_ACCOUNT_DIRECTORY]: \"read-account-directory\",\n [Proto.PolicyAction.READ_WITHDRAW_VALIDATION]: \"read-withdraw-validation\",\n [Proto.PolicyAction.READ_DAILY_CLAIMS]: \"read-daily-claims\",\n [Proto.PolicyAction.CLAIM_DAILY_REWARD]: \"claim-daily-reward\",\n [Proto.PolicyAction.READ_CHECKPOINTS]: \"read-checkpoints\",\n [Proto.PolicyAction.READ_REWARDS]: \"read-rewards\",\n [Proto.PolicyAction.CREATE_DEPOSIT_ADDRESS]: \"create-deposit-address\",\n [Proto.PolicyAction.READ_DEPOSIT_ADDRESSES]: \"read-deposit-addresses\",\n [Proto.PolicyAction.READ_SUBACCOUNTS]: \"read-subaccounts\",\n [Proto.PolicyAction.READ_SUBACCOUNT_ACTIVITY]: \"read-subaccount-activity\",\n [Proto.PolicyAction.READ_SUBACCOUNT_MEMBERS]: \"read-subaccount-members\",\n [Proto.PolicyAction.READ_SUBACCOUNT_INVITES]: \"read-subaccount-invites\",\n [Proto.PolicyAction.READ_GUARD_SIGNER_STATUS]: \"read-guard-signer-status\",\n [Proto.PolicyAction.READ_PRICE_ALERTS]: \"read-price-alerts\",\n [Proto.PolicyAction.MANAGE_PRICE_ALERTS]: \"manage-price-alerts\",\n } satisfies ProtoToOutput<Proto.PolicyAction, PolicyActionLabel>,\n inputToProto: {\n \"trade-spot\": Proto.PolicyAction.TRADE_SPOT,\n \"internal-transfer\": Proto.PolicyAction.INTERNAL_TRANSFER,\n \"external-withdraw\": Proto.PolicyAction.EXTERNAL_WITHDRAW,\n \"read-balances\": Proto.PolicyAction.READ_BALANCES,\n \"read-spot\": Proto.PolicyAction.READ_SPOT,\n \"read-internal-transfers\": Proto.PolicyAction.READ_INTERNAL_TRANSFERS,\n \"read-address-book\": Proto.PolicyAction.READ_ADDRESS_BOOK,\n \"manage-address-book\": Proto.PolicyAction.MANAGE_ADDRESS_BOOK,\n \"read-auto-withdraw\": Proto.PolicyAction.READ_AUTO_WITHDRAW,\n \"manage-auto-withdraw\": Proto.PolicyAction.MANAGE_AUTO_WITHDRAW,\n swap: Proto.PolicyAction.SWAP,\n \"read-api-keys\": Proto.PolicyAction.READ_API_KEYS,\n \"read-api-policies\": Proto.PolicyAction.READ_API_POLICIES,\n \"read-subaccount-policies\": Proto.PolicyAction.READ_SUBACCOUNT_POLICIES,\n \"read-subaccount-permissions\": Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS,\n \"read-vip-status\": Proto.PolicyAction.READ_VIP_STATUS,\n \"read-social-verification\": Proto.PolicyAction.READ_SOCIAL_VERIFICATION,\n \"read-profile\": Proto.PolicyAction.READ_PROFILE,\n \"read-account-directory\": Proto.PolicyAction.READ_ACCOUNT_DIRECTORY,\n \"read-withdraw-validation\": Proto.PolicyAction.READ_WITHDRAW_VALIDATION,\n \"read-daily-claims\": Proto.PolicyAction.READ_DAILY_CLAIMS,\n \"claim-daily-reward\": Proto.PolicyAction.CLAIM_DAILY_REWARD,\n \"read-checkpoints\": Proto.PolicyAction.READ_CHECKPOINTS,\n \"read-rewards\": Proto.PolicyAction.READ_REWARDS,\n \"create-deposit-address\": Proto.PolicyAction.CREATE_DEPOSIT_ADDRESS,\n \"read-deposit-addresses\": Proto.PolicyAction.READ_DEPOSIT_ADDRESSES,\n \"read-subaccounts\": Proto.PolicyAction.READ_SUBACCOUNTS,\n \"read-subaccount-activity\": Proto.PolicyAction.READ_SUBACCOUNT_ACTIVITY,\n \"read-subaccount-members\": Proto.PolicyAction.READ_SUBACCOUNT_MEMBERS,\n \"read-subaccount-invites\": Proto.PolicyAction.READ_SUBACCOUNT_INVITES,\n \"read-guard-signer-status\": Proto.PolicyAction.READ_GUARD_SIGNER_STATUS,\n \"read-price-alerts\": Proto.PolicyAction.READ_PRICE_ALERTS,\n \"manage-price-alerts\": Proto.PolicyAction.MANAGE_PRICE_ALERTS,\n } satisfies Record<PolicyActionLabel, Proto.PolicyAction>,\n} as const;\n\n/**\n * Returns the display label for a policy market scope.\n */\nexport function policyMarketScopeLabelFor(value: number): DecodedEnum<PolicyMarketScopeLabel> {\n return enumLabel(PolicyMarketScopeCodec.protoToOutput, value);\n}\n\n/**\n * Returns the display label for a policy action.\n */\nexport function policyActionLabelFor(value: number): DecodedEnum<PolicyActionLabel> {\n return enumLabel(PolicyActionCodec.protoToOutput, value);\n}\n"],"mappings":";;;;AAKA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;;;;;AAOA,MAAa,0CAA0C;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAEA,MAAa,uBAAuB,CAChC,GAAG,8BACH,GAAG,uCACP;AAMA,MAAa,yBAAyB;CAClC,cAAc;EACV,KAAA;EACA,WAAA;CACJ;CACA,eAAe;GAC4B,IAAA;GACR,IAAA;GACM,IAAA;CACzC;AACJ;AAEA,MAAa,oBAAoB;CAC7B,eAAe;GACuB,IAAA;GACD,IAAA;GACO,IAAA;GACA,IAAA;GACJ,IAAA;GACJ,IAAA;GACc,IAAA;GACN,KAAA;GACE,KAAA;GACD,KAAA;GACE,KAAA;GAChB,KAAA;GACS,KAAA;GACI,KAAA;GACO,KAAA;GACG,KAAA;GACZ,KAAA;GACS,KAAA;GACZ,KAAA;GACU,KAAA;GACE,KAAA;GACP,KAAA;GACC,KAAA;GACF,KAAA;GACJ,KAAA;GACU,KAAA;GACA,KAAA;GACN,KAAA;GACQ,KAAA;GACD,KAAA;GACA,KAAA;GACC,KAAA;GACP,KAAA;GACE,KAAA;CAC9C;CACA,cAAc;EACV,cAAA;EACA,qBAAA;EACA,qBAAA;EACA,iBAAA;EACA,aAAA;EACA,2BAAA;EACA,qBAAA;EACA,uBAAA;EACA,sBAAA;EACA,wBAAA;EACA,MAAA;EACA,iBAAA;EACA,qBAAA;EACA,4BAAA;EACA,+BAAA;EACA,mBAAA;EACA,4BAAA;EACA,gBAAA;EACA,0BAAA;EACA,4BAAA;EACA,qBAAA;EACA,sBAAA;EACA,oBAAA;EACA,gBAAA;EACA,0BAAA;EACA,0BAAA;EACA,oBAAA;EACA,4BAAA;EACA,2BAAA;EACA,2BAAA;EACA,4BAAA;EACA,qBAAA;EACA,uBAAA;CACJ;AACJ;;;;AAKA,SAAgB,0BAA0B,OAAoD;CAC1F,OAAO,UAAU,uBAAuB,eAAe,KAAK;AAChE;;;;AAKA,SAAgB,qBAAqB,OAA+C;CAChF,OAAO,UAAU,kBAAkB,eAAe,KAAK;AAC3D"}
1
+ {"version":3,"file":"shared.codecs.js","names":[],"sources":["../../../src/services/policies/shared.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/policies_pb.js\";\nimport { enumLabel } from \"../../shared/proto-enum-codec.js\";\nimport type { DecodedEnum, ProtoToOutput } from \"../../utils/types.js\";\n\n/** Product actions, accepted by sub-account and API-key policies. */\nexport const PRODUCT_POLICY_ACTION_LABELS = [\n \"trade-spot\",\n \"internal-transfer\",\n \"external-withdraw\",\n \"read-balances\",\n \"read-spot\",\n \"read-internal-transfers\",\n \"read-address-book\",\n \"manage-address-book\",\n \"read-auto-withdraw\",\n \"manage-auto-withdraw\",\n \"swap\",\n] as const;\n\n/**\n * Account permissions, accepted by API-key policies only: a sub-account policy refuses them.\n * Each grants exactly the calls it names, and main-account permissions apply only to keys\n * scoped to the main account.\n */\nexport const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [\n \"read-api-keys\",\n \"read-api-policies\",\n \"read-subaccount-policies\",\n \"read-subaccount-permissions\",\n \"read-vip-status\",\n \"read-social-verification\",\n \"read-profile\",\n \"read-account-directory\",\n \"read-withdraw-validation\",\n \"read-daily-claims\",\n \"claim-daily-reward\",\n \"read-checkpoints\",\n \"read-rewards\",\n \"create-deposit-address\",\n \"read-deposit-addresses\",\n \"read-subaccounts\",\n \"read-subaccount-activity\",\n \"read-subaccount-members\",\n \"read-subaccount-invites\",\n \"read-guard-signer-status\",\n \"read-price-alerts\",\n \"manage-price-alerts\",\n \"read-statements\",\n] as const;\n\nexport const POLICY_ACTION_LABELS = [\n ...PRODUCT_POLICY_ACTION_LABELS,\n ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS,\n] as const;\nexport type PolicyActionLabel = (typeof POLICY_ACTION_LABELS)[number];\n\nexport const POLICY_MARKET_SCOPE_LABELS = [\"all\", \"allowlist\"] as const;\nexport type PolicyMarketScopeLabel = (typeof POLICY_MARKET_SCOPE_LABELS)[number];\n\nexport const PolicyMarketScopeCodec = {\n inputToProto: {\n all: Proto.MarketScope_Value.ALL,\n allowlist: Proto.MarketScope_Value.ALLOWLIST,\n } satisfies Record<PolicyMarketScopeLabel, Proto.MarketScope_Value>,\n protoToOutput: {\n [Proto.MarketScope_Value.UNSPECIFIED]: \"unspecified\",\n [Proto.MarketScope_Value.ALL]: \"all\",\n [Proto.MarketScope_Value.ALLOWLIST]: \"allowlist\",\n } satisfies ProtoToOutput<Proto.MarketScope_Value, PolicyMarketScopeLabel>,\n} as const;\n\nexport const PolicyActionCodec = {\n protoToOutput: {\n [Proto.PolicyAction.UNSPECIFIED]: \"unspecified\",\n [Proto.PolicyAction.TRADE_SPOT]: \"trade-spot\",\n [Proto.PolicyAction.INTERNAL_TRANSFER]: \"internal-transfer\",\n [Proto.PolicyAction.EXTERNAL_WITHDRAW]: \"external-withdraw\",\n [Proto.PolicyAction.READ_BALANCES]: \"read-balances\",\n [Proto.PolicyAction.READ_SPOT]: \"read-spot\",\n [Proto.PolicyAction.READ_INTERNAL_TRANSFERS]: \"read-internal-transfers\",\n [Proto.PolicyAction.READ_ADDRESS_BOOK]: \"read-address-book\",\n [Proto.PolicyAction.MANAGE_ADDRESS_BOOK]: \"manage-address-book\",\n [Proto.PolicyAction.READ_AUTO_WITHDRAW]: \"read-auto-withdraw\",\n [Proto.PolicyAction.MANAGE_AUTO_WITHDRAW]: \"manage-auto-withdraw\",\n [Proto.PolicyAction.SWAP]: \"swap\",\n [Proto.PolicyAction.READ_API_KEYS]: \"read-api-keys\",\n [Proto.PolicyAction.READ_API_POLICIES]: \"read-api-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_POLICIES]: \"read-subaccount-policies\",\n [Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS]: \"read-subaccount-permissions\",\n [Proto.PolicyAction.READ_VIP_STATUS]: \"read-vip-status\",\n [Proto.PolicyAction.READ_SOCIAL_VERIFICATION]: \"read-social-verification\",\n [Proto.PolicyAction.READ_PROFILE]: \"read-profile\",\n [Proto.PolicyAction.READ_ACCOUNT_DIRECTORY]: \"read-account-directory\",\n [Proto.PolicyAction.READ_WITHDRAW_VALIDATION]: \"read-withdraw-validation\",\n [Proto.PolicyAction.READ_DAILY_CLAIMS]: \"read-daily-claims\",\n [Proto.PolicyAction.CLAIM_DAILY_REWARD]: \"claim-daily-reward\",\n [Proto.PolicyAction.READ_CHECKPOINTS]: \"read-checkpoints\",\n [Proto.PolicyAction.READ_REWARDS]: \"read-rewards\",\n [Proto.PolicyAction.CREATE_DEPOSIT_ADDRESS]: \"create-deposit-address\",\n [Proto.PolicyAction.READ_DEPOSIT_ADDRESSES]: \"read-deposit-addresses\",\n [Proto.PolicyAction.READ_SUBACCOUNTS]: \"read-subaccounts\",\n [Proto.PolicyAction.READ_SUBACCOUNT_ACTIVITY]: \"read-subaccount-activity\",\n [Proto.PolicyAction.READ_SUBACCOUNT_MEMBERS]: \"read-subaccount-members\",\n [Proto.PolicyAction.READ_SUBACCOUNT_INVITES]: \"read-subaccount-invites\",\n [Proto.PolicyAction.READ_GUARD_SIGNER_STATUS]: \"read-guard-signer-status\",\n [Proto.PolicyAction.READ_PRICE_ALERTS]: \"read-price-alerts\",\n [Proto.PolicyAction.MANAGE_PRICE_ALERTS]: \"manage-price-alerts\",\n [Proto.PolicyAction.READ_STATEMENTS]: \"read-statements\",\n } satisfies ProtoToOutput<Proto.PolicyAction, PolicyActionLabel>,\n inputToProto: {\n \"trade-spot\": Proto.PolicyAction.TRADE_SPOT,\n \"internal-transfer\": Proto.PolicyAction.INTERNAL_TRANSFER,\n \"external-withdraw\": Proto.PolicyAction.EXTERNAL_WITHDRAW,\n \"read-balances\": Proto.PolicyAction.READ_BALANCES,\n \"read-spot\": Proto.PolicyAction.READ_SPOT,\n \"read-internal-transfers\": Proto.PolicyAction.READ_INTERNAL_TRANSFERS,\n \"read-address-book\": Proto.PolicyAction.READ_ADDRESS_BOOK,\n \"manage-address-book\": Proto.PolicyAction.MANAGE_ADDRESS_BOOK,\n \"read-auto-withdraw\": Proto.PolicyAction.READ_AUTO_WITHDRAW,\n \"manage-auto-withdraw\": Proto.PolicyAction.MANAGE_AUTO_WITHDRAW,\n swap: Proto.PolicyAction.SWAP,\n \"read-api-keys\": Proto.PolicyAction.READ_API_KEYS,\n \"read-api-policies\": Proto.PolicyAction.READ_API_POLICIES,\n \"read-subaccount-policies\": Proto.PolicyAction.READ_SUBACCOUNT_POLICIES,\n \"read-subaccount-permissions\": Proto.PolicyAction.READ_SUBACCOUNT_PERMISSIONS,\n \"read-vip-status\": Proto.PolicyAction.READ_VIP_STATUS,\n \"read-social-verification\": Proto.PolicyAction.READ_SOCIAL_VERIFICATION,\n \"read-profile\": Proto.PolicyAction.READ_PROFILE,\n \"read-account-directory\": Proto.PolicyAction.READ_ACCOUNT_DIRECTORY,\n \"read-withdraw-validation\": Proto.PolicyAction.READ_WITHDRAW_VALIDATION,\n \"read-daily-claims\": Proto.PolicyAction.READ_DAILY_CLAIMS,\n \"claim-daily-reward\": Proto.PolicyAction.CLAIM_DAILY_REWARD,\n \"read-checkpoints\": Proto.PolicyAction.READ_CHECKPOINTS,\n \"read-rewards\": Proto.PolicyAction.READ_REWARDS,\n \"create-deposit-address\": Proto.PolicyAction.CREATE_DEPOSIT_ADDRESS,\n \"read-deposit-addresses\": Proto.PolicyAction.READ_DEPOSIT_ADDRESSES,\n \"read-subaccounts\": Proto.PolicyAction.READ_SUBACCOUNTS,\n \"read-subaccount-activity\": Proto.PolicyAction.READ_SUBACCOUNT_ACTIVITY,\n \"read-subaccount-members\": Proto.PolicyAction.READ_SUBACCOUNT_MEMBERS,\n \"read-subaccount-invites\": Proto.PolicyAction.READ_SUBACCOUNT_INVITES,\n \"read-guard-signer-status\": Proto.PolicyAction.READ_GUARD_SIGNER_STATUS,\n \"read-price-alerts\": Proto.PolicyAction.READ_PRICE_ALERTS,\n \"manage-price-alerts\": Proto.PolicyAction.MANAGE_PRICE_ALERTS,\n \"read-statements\": Proto.PolicyAction.READ_STATEMENTS,\n } satisfies Record<PolicyActionLabel, Proto.PolicyAction>,\n} as const;\n\n/**\n * Returns the display label for a policy market scope.\n */\nexport function policyMarketScopeLabelFor(value: number): DecodedEnum<PolicyMarketScopeLabel> {\n return enumLabel(PolicyMarketScopeCodec.protoToOutput, value);\n}\n\n/**\n * Returns the display label for a policy action.\n */\nexport function policyActionLabelFor(value: number): DecodedEnum<PolicyActionLabel> {\n return enumLabel(PolicyActionCodec.protoToOutput, value);\n}\n"],"mappings":";;;;AAKA,MAAa,+BAA+B;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;;;;;AAOA,MAAa,0CAA0C;CACnD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAEA,MAAa,uBAAuB,CAChC,GAAG,8BACH,GAAG,uCACP;AAMA,MAAa,yBAAyB;CAClC,cAAc;EACV,KAAA;EACA,WAAA;CACJ;CACA,eAAe;GAC4B,IAAA;GACR,IAAA;GACM,IAAA;CACzC;AACJ;AAEA,MAAa,oBAAoB;CAC7B,eAAe;GACuB,IAAA;GACD,IAAA;GACO,IAAA;GACA,IAAA;GACJ,IAAA;GACJ,IAAA;GACc,IAAA;GACN,KAAA;GACE,KAAA;GACD,KAAA;GACE,KAAA;GAChB,KAAA;GACS,KAAA;GACI,KAAA;GACO,KAAA;GACG,KAAA;GACZ,KAAA;GACS,KAAA;GACZ,KAAA;GACU,KAAA;GACE,KAAA;GACP,KAAA;GACC,KAAA;GACF,KAAA;GACJ,KAAA;GACU,KAAA;GACA,KAAA;GACN,KAAA;GACQ,KAAA;GACD,KAAA;GACA,KAAA;GACC,KAAA;GACP,KAAA;GACE,KAAA;GACJ,KAAA;CAC1C;CACA,cAAc;EACV,cAAA;EACA,qBAAA;EACA,qBAAA;EACA,iBAAA;EACA,aAAA;EACA,2BAAA;EACA,qBAAA;EACA,uBAAA;EACA,sBAAA;EACA,wBAAA;EACA,MAAA;EACA,iBAAA;EACA,qBAAA;EACA,4BAAA;EACA,+BAAA;EACA,mBAAA;EACA,4BAAA;EACA,gBAAA;EACA,0BAAA;EACA,4BAAA;EACA,qBAAA;EACA,sBAAA;EACA,oBAAA;EACA,gBAAA;EACA,0BAAA;EACA,0BAAA;EACA,oBAAA;EACA,4BAAA;EACA,2BAAA;EACA,2BAAA;EACA,4BAAA;EACA,qBAAA;EACA,uBAAA;EACA,mBAAA;CACJ;AACJ;;;;AAKA,SAAgB,0BAA0B,OAAoD;CAC1F,OAAO,UAAU,uBAAuB,eAAe,KAAK;AAChE;;;;AAKA,SAAgB,qBAAqB,OAA+C;CAChF,OAAO,UAAU,kBAAkB,eAAe,KAAK;AAC3D"}
@@ -1,6 +1,6 @@
1
1
  import * as v from "valibot";
2
2
  //#region src/services/policies/shared.d.ts
3
- declare const PolicyActionEnumSchema: v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status", "read-price-alerts", "manage-price-alerts"], undefined>;
3
+ declare const PolicyActionEnumSchema: v.PicklistSchema<readonly ["trade-spot", "internal-transfer", "external-withdraw", "read-balances", "read-spot", "read-internal-transfers", "read-address-book", "manage-address-book", "read-auto-withdraw", "manage-auto-withdraw", "swap", "read-api-keys", "read-api-policies", "read-subaccount-policies", "read-subaccount-permissions", "read-vip-status", "read-social-verification", "read-profile", "read-account-directory", "read-withdraw-validation", "read-daily-claims", "claim-daily-reward", "read-checkpoints", "read-rewards", "create-deposit-address", "read-deposit-addresses", "read-subaccounts", "read-subaccount-activity", "read-subaccount-members", "read-subaccount-invites", "read-guard-signer-status", "read-price-alerts", "manage-price-alerts", "read-statements"], undefined>;
4
4
  declare const PolicyMarketScopeEnumSchema: v.PicklistSchema<readonly ["all", "allowlist"], undefined>;
5
5
  type PolicyMarketScope = v.InferOutput<typeof PolicyMarketScopeEnumSchema>;
6
6
  type PolicyAction = v.InferOutput<typeof PolicyActionEnumSchema>;
@@ -1,11 +1,11 @@
1
+ import { PolicyService, SubaccountPolicyViewSchema } from "../../../gen/auth/v1/policies_pb.js";
1
2
  import { parse } from "../../../shared/validation.js";
2
3
  import { removeUndefined } from "../../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../../shared/request-options.js";
4
- import { PolicyService, SubaccountPolicyViewSchema } from "../../../gen/auth/v1/policies_pb.js";
5
5
  import { resolveAccountScopedInput } from "../../subaccount-resolver.js";
6
6
  import { ApplySubaccountPolicyInputSchema, CreateSubaccountPolicyInputSchema, GetSubaccountPolicyInputSchema, ListSubaccountPoliciesInputSchema, PolicyIdSchema, SubaccountPolicySchema, UpdateSubaccountPolicyInputSchema } from "./subaccount-policies.schemas.js";
7
- import { createClient } from "@connectrpc/connect";
8
7
  import * as v from "valibot";
8
+ import { createClient } from "@connectrpc/connect";
9
9
  //#region src/services/policies/subaccount-policies/subaccount-policies.ts
10
10
  /**
11
11
  * Manages reusable subaccount policy templates, assignments, and realtime policy updates.
@@ -38,7 +38,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
38
38
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
39
39
  }, undefined>, undefined>, readonly []>;
40
40
  readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
41
- readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[]>]>;
41
+ readonly actions: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>, v.TransformAction<number[], DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[]>]>;
42
42
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
43
43
  readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
44
44
  readonly maxOrderNotional: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
@@ -79,7 +79,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
79
79
  symbolId: number;
80
80
  }[];
81
81
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
82
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
82
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
83
83
  isTemplate: boolean;
84
84
  sourceTemplateId?: string | undefined;
85
85
  maxOrderNotional: string;
@@ -104,7 +104,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
104
104
  symbolId: number;
105
105
  }[];
106
106
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
107
- actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts">[];
107
+ actions: DecodedEnum<"swap" | "trade-spot" | "internal-transfer" | "external-withdraw" | "read-balances" | "read-spot" | "read-internal-transfers" | "read-address-book" | "manage-address-book" | "read-auto-withdraw" | "manage-auto-withdraw" | "read-api-keys" | "read-api-policies" | "read-subaccount-policies" | "read-subaccount-permissions" | "read-vip-status" | "read-social-verification" | "read-profile" | "read-account-directory" | "read-withdraw-validation" | "read-daily-claims" | "claim-daily-reward" | "read-checkpoints" | "read-rewards" | "create-deposit-address" | "read-deposit-addresses" | "read-subaccounts" | "read-subaccount-activity" | "read-subaccount-members" | "read-subaccount-invites" | "read-guard-signer-status" | "read-price-alerts" | "manage-price-alerts" | "read-statements">[];
108
108
  isTemplate: boolean;
109
109
  sourceTemplateId?: string | undefined;
110
110
  maxOpenOrders: number;
@@ -1,7 +1,7 @@
1
+ import { PriceAlertService } from "../../gen/alerts/v1/price_alerts_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
- import { PriceAlertService } from "../../gen/alerts/v1/price_alerts_pb.js";
5
5
  import { CancelPriceAlertInputSchema, CreatePriceAlertInputSchema, ListPriceAlertsInputSchema, ListPriceAlertsResultSchema, PriceAlertSchema, UpdatePriceAlertInputSchema, UpdatePriceAlertResultSchema } from "./price-alerts.schemas.js";
6
6
  import { createClient } from "@connectrpc/connect";
7
7
  //#region src/services/price-alerts/price-alerts.ts
@@ -1,8 +1,8 @@
1
+ import { RateLimitService as RateLimitService$1 } from "../../gen/ratelimit/v1/ratelimit_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { removeUndefined } from "../../utils/remove-undefined.js";
3
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
4
5
  import { resolveAccountScopedInput } from "../subaccount-resolver.js";
5
- import { RateLimitService as RateLimitService$1 } from "../../gen/ratelimit/v1/ratelimit_pb.js";
6
6
  import { GetTradingRateLimitsInputSchema, RateLimitConfigSchema, TradingRateLimitsSchema } from "./rate-limits.schemas.js";
7
7
  import { createClient } from "@connectrpc/connect";
8
8
  //#region src/services/rate-limits/rate-limits.ts
@@ -1,6 +1,6 @@
1
+ import { RewardCampaignService } from "../../gen/rewards/v1/rewards_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
- import { RewardCampaignService } from "../../gen/rewards/v1/rewards_pb.js";
4
4
  import { AcknowledgeRewardAwardInputSchema, AcknowledgeRewardAwardResultSchema, ListRewardAwardsInputSchema, ListRewardAwardsResultSchema, SetRewardDestinationInputSchema, SetRewardDestinationResultSchema } from "./rewards.schemas.js";
5
5
  import { createClient } from "@connectrpc/connect";
6
6
  //#region src/services/rewards/rewards.ts
@@ -1,6 +1,6 @@
1
+ import { SocialVerificationService as SocialVerificationService$1 } from "../../gen/auth/v1/social_verification_pb.js";
1
2
  import { parse } from "../../shared/validation.js";
2
3
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
- import { SocialVerificationService as SocialVerificationService$1 } from "../../gen/auth/v1/social_verification_pb.js";
4
4
  import { ConfirmVerificationInputSchema, GetVerificationResponseSchema, SocialProviderInputSchema, StartVerificationInputSchema, StartVerificationResponseSchema, UnlinkSocialAccountInputSchema, VerificationReadyResponseSchema } from "./social-verification.schemas.js";
5
5
  import { createClient } from "@connectrpc/connect";
6
6
  //#region src/services/social-verification/social-verification.ts
@@ -1,6 +1,6 @@
1
+ import "../../gen/auth/v1/social_verification_pb.js";
1
2
  import { TimestampSchema } from "../../shared/schemas.js";
2
3
  import { enumLabel } from "../../shared/proto-enum-codec.js";
3
- import "../../gen/auth/v1/social_verification_pb.js";
4
4
  import { SOCIAL_PROVIDER_VALUES, SOCIAL_VERIFICATION_ERROR_CODE_VALUES, SOCIAL_VERIFICATION_METHOD_VALUES, SOCIAL_VERIFICATION_STATUS_VALUES, SocialProviderCodec, SocialVerificationErrorCodeCodec, SocialVerificationMethodCodec, SocialVerificationStatusCodec } from "./social-verification.codecs.js";
5
5
  import * as v from "valibot";
6
6
  //#region src/services/social-verification/social-verification.schemas.ts
@@ -54,7 +54,8 @@ const SubaccountPermissionCodec = { protoToOutput: {
54
54
  [25]: "manage_guard_signer",
55
55
  [26]: "read_auto_withdraw",
56
56
  [27]: "manage_auto_withdraw",
57
- [28]: "swap"
57
+ [28]: "swap",
58
+ [29]: "read_statements"
58
59
  } };
59
60
  const InviteActionCodec = { inputToProto: {
60
61
  accept: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"subaccounts.codecs.js","names":[],"sources":["../../../src/services/subaccounts/subaccounts.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/subaccounts_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const SUBACCOUNT_ROLE_VALUES = [\n \"owner\",\n \"admin\",\n \"treasury\",\n \"leveraged_trader\",\n \"trader\",\n \"viewer\",\n] as const;\nexport type SubaccountRoleValue = (typeof SUBACCOUNT_ROLE_VALUES)[number];\n\nexport const SUBACCOUNT_PERMISSION_VALUES = [\n \"read_subaccount\",\n \"update_subaccount\",\n \"read_balances\",\n \"read_spot\",\n \"trade_spot\",\n \"read_internal_transfers\",\n \"internal_transfer\",\n \"external_withdraw\",\n \"read_address_book\",\n \"manage_address_book\",\n \"read_members\",\n \"manage_members\",\n \"read_invites\",\n \"manage_invites\",\n \"read_api_keys\",\n \"manage_api_keys\",\n \"read_subaccount_policy\",\n \"manage_subaccount_policy\",\n \"read_activity\",\n \"read_activity_security_details\",\n \"manage_member_mfa_requirement\",\n \"create_deposit_address\",\n \"read_deposit_addresses\",\n \"read_guard_signer_status\",\n \"manage_guard_signer\",\n \"read_auto_withdraw\",\n \"manage_auto_withdraw\",\n \"swap\",\n] as const;\nexport type SubaccountPermissionValue = (typeof SUBACCOUNT_PERMISSION_VALUES)[number];\n\nexport const SUBACCOUNT_INVITE_ACTION_VALUES = [\"accept\", \"decline\", \"cancel\"] as const;\nexport type SubaccountInviteActionValue = (typeof SUBACCOUNT_INVITE_ACTION_VALUES)[number];\n\nexport const SUBACCOUNT_INVITE_STATUS_VALUES = [\n \"pending\",\n \"accepted\",\n \"declined\",\n \"canceled\",\n] as const;\nexport type SubaccountInviteStatusValue = (typeof SUBACCOUNT_INVITE_STATUS_VALUES)[number];\n\nexport const SUBACCOUNT_INVITE_DIRECTION_VALUES = [\"\", \"incoming\", \"outgoing\"] as const;\nexport type SubaccountInviteDirectionValue = (typeof SUBACCOUNT_INVITE_DIRECTION_VALUES)[number];\n\nexport const SUBACCOUNT_STATUS_VALUES = [\"active\", \"disabled\"] as const;\nexport type SubaccountStatusValue = (typeof SUBACCOUNT_STATUS_VALUES)[number];\n\nexport const ACTIVITY_ENTITY_KIND_VALUES = [\n \"account\",\n \"session\",\n \"api_key\",\n \"subaccount\",\n \"member\",\n \"policy\",\n \"invite\",\n \"security\",\n \"destination\",\n] as const;\nexport type ActivityEntityKindValue = (typeof ACTIVITY_ENTITY_KIND_VALUES)[number];\n\nexport const ACTIVITY_EVENT_ACTION_VALUES = [\n \"created\",\n \"updated\",\n \"deleted\",\n \"enabled\",\n \"disabled\",\n \"removed\",\n \"role_set\",\n \"received\",\n \"replied\",\n \"failed\",\n \"revoked\",\n \"blocked\",\n \"hold_placed\",\n \"hold_released\",\n \"requested\",\n \"applied\",\n] as const;\nexport type ActivityEventActionValue = (typeof ACTIVITY_EVENT_ACTION_VALUES)[number];\n\nexport const ACTIVITY_EVENT_SOURCE_VALUES = [\"web\", \"mobile\", \"api\"] as const;\nexport type ActivityEventSourceValue = (typeof ACTIVITY_EVENT_SOURCE_VALUES)[number];\n\nexport const SubaccountRoleCodec = {\n inputToProto: {\n owner: Proto.SubaccountRole.OWNER,\n admin: Proto.SubaccountRole.ADMIN,\n treasury: Proto.SubaccountRole.TREASURY,\n leveraged_trader: Proto.SubaccountRole.LEVERAGED_TRADER,\n trader: Proto.SubaccountRole.TRADER,\n viewer: Proto.SubaccountRole.VIEWER,\n } satisfies InputToProto<SubaccountRoleValue, Proto.SubaccountRole>,\n protoToOutput: {\n [Proto.SubaccountRole.SUBACCOUNT_ROLE_UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountRole.OWNER]: \"owner\",\n [Proto.SubaccountRole.ADMIN]: \"admin\",\n [Proto.SubaccountRole.TREASURY]: \"treasury\",\n [Proto.SubaccountRole.LEVERAGED_TRADER]: \"leveraged_trader\",\n [Proto.SubaccountRole.TRADER]: \"trader\",\n [Proto.SubaccountRole.VIEWER]: \"viewer\",\n } satisfies ProtoToOutput<Proto.SubaccountRole, SubaccountRoleValue>,\n} as const;\n\nexport const SubaccountPermissionCodec = {\n protoToOutput: {\n [Proto.SubaccountPermission.UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountPermission.READ_SUBACCOUNT]: \"read_subaccount\",\n [Proto.SubaccountPermission.UPDATE_SUBACCOUNT]: \"update_subaccount\",\n [Proto.SubaccountPermission.READ_BALANCES]: \"read_balances\",\n [Proto.SubaccountPermission.READ_SPOT]: \"read_spot\",\n [Proto.SubaccountPermission.TRADE_SPOT]: \"trade_spot\",\n [Proto.SubaccountPermission.READ_INTERNAL_TRANSFERS]: \"read_internal_transfers\",\n [Proto.SubaccountPermission.INTERNAL_TRANSFER]: \"internal_transfer\",\n [Proto.SubaccountPermission.EXTERNAL_WITHDRAW]: \"external_withdraw\",\n [Proto.SubaccountPermission.READ_ADDRESS_BOOK]: \"read_address_book\",\n [Proto.SubaccountPermission.MANAGE_ADDRESS_BOOK]: \"manage_address_book\",\n [Proto.SubaccountPermission.READ_MEMBERS]: \"read_members\",\n [Proto.SubaccountPermission.MANAGE_MEMBERS]: \"manage_members\",\n [Proto.SubaccountPermission.READ_INVITES]: \"read_invites\",\n [Proto.SubaccountPermission.MANAGE_INVITES]: \"manage_invites\",\n [Proto.SubaccountPermission.READ_API_KEYS]: \"read_api_keys\",\n [Proto.SubaccountPermission.MANAGE_API_KEYS]: \"manage_api_keys\",\n [Proto.SubaccountPermission.READ_SUBACCOUNT_POLICY]: \"read_subaccount_policy\",\n [Proto.SubaccountPermission.MANAGE_SUBACCOUNT_POLICY]: \"manage_subaccount_policy\",\n [Proto.SubaccountPermission.READ_ACTIVITY]: \"read_activity\",\n [Proto.SubaccountPermission.READ_ACTIVITY_SECURITY_DETAILS]:\n \"read_activity_security_details\",\n [Proto.SubaccountPermission.MANAGE_MEMBER_MFA_REQUIREMENT]: \"manage_member_mfa_requirement\",\n [Proto.SubaccountPermission.CREATE_DEPOSIT_ADDRESS]: \"create_deposit_address\",\n [Proto.SubaccountPermission.READ_DEPOSIT_ADDRESSES]: \"read_deposit_addresses\",\n [Proto.SubaccountPermission.READ_GUARD_SIGNER_STATUS]: \"read_guard_signer_status\",\n [Proto.SubaccountPermission.MANAGE_GUARD_SIGNER]: \"manage_guard_signer\",\n [Proto.SubaccountPermission.READ_AUTO_WITHDRAW]: \"read_auto_withdraw\",\n [Proto.SubaccountPermission.MANAGE_AUTO_WITHDRAW]: \"manage_auto_withdraw\",\n [Proto.SubaccountPermission.SWAP]: \"swap\",\n } satisfies ProtoToOutput<Proto.SubaccountPermission, SubaccountPermissionValue>,\n} as const;\n\nexport const InviteActionCodec = {\n inputToProto: {\n accept: Proto.SubaccountInviteAction.ACCEPT,\n decline: Proto.SubaccountInviteAction.DECLINE,\n cancel: Proto.SubaccountInviteAction.CANCEL,\n } satisfies InputToProto<SubaccountInviteActionValue, Proto.SubaccountInviteAction>,\n} as const;\n\nexport const InviteStatusCodec = {\n protoToOutput: {\n [Proto.SubaccountInviteStatus.UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountInviteStatus.PENDING]: \"pending\",\n [Proto.SubaccountInviteStatus.ACCEPTED]: \"accepted\",\n [Proto.SubaccountInviteStatus.DECLINED]: \"declined\",\n [Proto.SubaccountInviteStatus.CANCELLED]: \"canceled\",\n } satisfies ProtoToOutput<Proto.SubaccountInviteStatus, SubaccountInviteStatusValue>,\n} as const;\n\nexport const SubaccountInviteDirectionCodec = {\n inputToProto: {\n \"\": Proto.SubaccountInviteDirection.DIRECTION_UNSPECIFIED,\n incoming: Proto.SubaccountInviteDirection.INCOMING,\n outgoing: Proto.SubaccountInviteDirection.OUTGOING,\n } satisfies InputToProto<SubaccountInviteDirectionValue, Proto.SubaccountInviteDirection>,\n} as const;\n\nexport const SubaccountStatusCodec = {\n inputToProto: {\n active: Proto.SubaccountStatus.ACTIVE,\n disabled: Proto.SubaccountStatus.DISABLED,\n } satisfies InputToProto<SubaccountStatusValue, Proto.SubaccountStatus>,\n protoToOutput: {\n [Proto.SubaccountStatus.UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountStatus.ACTIVE]: \"active\",\n [Proto.SubaccountStatus.DISABLED]: \"disabled\",\n } satisfies ProtoToOutput<Proto.SubaccountStatus, SubaccountStatusValue>,\n} as const;\n\nexport const ActivityEntityKindCodec = {\n protoToOutput: {\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_UNSPECIFIED]: \"unspecified\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_ACCOUNT]: \"account\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_SESSION]: \"session\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_API_KEY]: \"api_key\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_SUBACCOUNT]: \"subaccount\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_MEMBER]: \"member\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_POLICY]: \"policy\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_INVITE]: \"invite\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_SECURITY]: \"security\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_DESTINATION]: \"destination\",\n } satisfies ProtoToOutput<Proto.ActivityEntityKind, ActivityEntityKindValue>,\n} as const;\n\nexport const ActivityEventActionCodec = {\n protoToOutput: {\n [Proto.ActivityEventAction.ACTIVITY_ACTION_UNSPECIFIED]: \"unspecified\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_CREATED]: \"created\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_UPDATED]: \"updated\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_DELETED]: \"deleted\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_ENABLED]: \"enabled\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_DISABLED]: \"disabled\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REMOVED]: \"removed\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_ROLE_SET]: \"role_set\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_RECEIVED]: \"received\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REPLIED]: \"replied\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_FAILED]: \"failed\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REVOKED]: \"revoked\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_BLOCKED]: \"blocked\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_HOLD_PLACED]: \"hold_placed\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_HOLD_RELEASED]: \"hold_released\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REQUESTED]: \"requested\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_APPLIED]: \"applied\",\n } satisfies ProtoToOutput<Proto.ActivityEventAction, ActivityEventActionValue>,\n} as const;\n\nexport const ActivityEventSourceCodec = {\n protoToOutput: {\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_UNSPECIFIED]: \"unspecified\",\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_WEB]: \"web\",\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_MOBILE]: \"mobile\",\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_API]: \"api\",\n } satisfies ProtoToOutput<Proto.ActivityEventSource, ActivityEventSourceValue>,\n} as const;\n"],"mappings":";;AAwDA,MAAa,qCAAqC;CAAC;CAAI;CAAY;AAAU;AAG7E,MAAa,2BAA2B,CAAC,UAAU,UAAU;AAuC7D,MAAa,sBAAsB;CAC/B,cAAc;EACV,OAAA;EACA,OAAA;EACA,UAAA;EACA,kBAAA;EACA,QAAA;EACA,QAAA;CACJ;CACA,eAAe;GACyC,IAAA;GACtB,IAAA;GACA,IAAA;GACG,IAAA;GACQ,IAAA;GACV,IAAA;GACA,IAAA;CACnC;AACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EAC+B,IAAA;EACI,IAAA;EACE,IAAA;EACJ,IAAA;EACJ,IAAA;EACC,IAAA;EACa,IAAA;EACN,IAAA;EACA,IAAA;EACA,IAAA;EACE,KAAA;EACP,KAAA;EACE,KAAA;EACF,KAAA;EACE,KAAA;EACD,KAAA;EACE,KAAA;EACO,KAAA;EACE,KAAA;EACX,KAAA;EAExC,KAAA;EACwD,KAAA;EACP,KAAA;EACA,KAAA;EACE,KAAA;EACL,KAAA;EACD,KAAA;EACE,KAAA;EAChB,KAAA;AACvC,EACJ;AAEA,MAAa,oBAAoB,EAC7B,cAAc;CACV,QAAA;CACA,SAAA;CACA,QAAA;AACJ,EACJ;AAEA,MAAa,oBAAoB,EAC7B,eAAe;EACiC,IAAA;EACJ,IAAA;EACC,IAAA;EACA,IAAA;EACC,IAAA;AAC9C,EACJ;AAEA,MAAa,iCAAiC,EAC1C,cAAc;CACV,IAAA;CACA,UAAA;CACA,UAAA;AACJ,EACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,QAAA;EACA,UAAA;CACJ;CACA,eAAe;GAC2B,IAAA;GACL,IAAA;GACE,IAAA;CACvC;AACJ;AAEA,MAAa,0BAA0B,EACnC,eAAe;EAC6C,IAAA;EACJ,IAAA;EACA,IAAA;EACA,IAAA;EACG,IAAA;EACJ,IAAA;EACA,IAAA;EACA,IAAA;EACE,IAAA;EACG,IAAA;AAC5D,EACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8C,IAAA;EACJ,IAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACC,IAAA;EACD,IAAA;EACC,IAAA;EACA,IAAA;EACD,IAAA;EACD,KAAA;EACC,KAAA;EACA,KAAA;EACI,KAAA;EACE,KAAA;EACJ,KAAA;EACF,KAAA;AACzD,EACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8C,IAAA;EACR,IAAA;EACG,IAAA;EACH,IAAA;AACrD,EACJ"}
1
+ {"version":3,"file":"subaccounts.codecs.js","names":[],"sources":["../../../src/services/subaccounts/subaccounts.codecs.ts"],"sourcesContent":["import * as Proto from \"../../gen/auth/v1/subaccounts_pb.js\";\nimport type { InputToProto, ProtoToOutput } from \"../../utils/types.js\";\n\nexport const SUBACCOUNT_ROLE_VALUES = [\n \"owner\",\n \"admin\",\n \"treasury\",\n \"leveraged_trader\",\n \"trader\",\n \"viewer\",\n] as const;\nexport type SubaccountRoleValue = (typeof SUBACCOUNT_ROLE_VALUES)[number];\n\nexport const SUBACCOUNT_PERMISSION_VALUES = [\n \"read_subaccount\",\n \"update_subaccount\",\n \"read_balances\",\n \"read_spot\",\n \"trade_spot\",\n \"read_internal_transfers\",\n \"internal_transfer\",\n \"external_withdraw\",\n \"read_address_book\",\n \"manage_address_book\",\n \"read_members\",\n \"manage_members\",\n \"read_invites\",\n \"manage_invites\",\n \"read_api_keys\",\n \"manage_api_keys\",\n \"read_subaccount_policy\",\n \"manage_subaccount_policy\",\n \"read_activity\",\n \"read_activity_security_details\",\n \"manage_member_mfa_requirement\",\n \"create_deposit_address\",\n \"read_deposit_addresses\",\n \"read_guard_signer_status\",\n \"manage_guard_signer\",\n \"read_auto_withdraw\",\n \"manage_auto_withdraw\",\n \"swap\",\n \"read_statements\",\n] as const;\nexport type SubaccountPermissionValue = (typeof SUBACCOUNT_PERMISSION_VALUES)[number];\n\nexport const SUBACCOUNT_INVITE_ACTION_VALUES = [\"accept\", \"decline\", \"cancel\"] as const;\nexport type SubaccountInviteActionValue = (typeof SUBACCOUNT_INVITE_ACTION_VALUES)[number];\n\nexport const SUBACCOUNT_INVITE_STATUS_VALUES = [\n \"pending\",\n \"accepted\",\n \"declined\",\n \"canceled\",\n] as const;\nexport type SubaccountInviteStatusValue = (typeof SUBACCOUNT_INVITE_STATUS_VALUES)[number];\n\nexport const SUBACCOUNT_INVITE_DIRECTION_VALUES = [\"\", \"incoming\", \"outgoing\"] as const;\nexport type SubaccountInviteDirectionValue = (typeof SUBACCOUNT_INVITE_DIRECTION_VALUES)[number];\n\nexport const SUBACCOUNT_STATUS_VALUES = [\"active\", \"disabled\"] as const;\nexport type SubaccountStatusValue = (typeof SUBACCOUNT_STATUS_VALUES)[number];\n\nexport const ACTIVITY_ENTITY_KIND_VALUES = [\n \"account\",\n \"session\",\n \"api_key\",\n \"subaccount\",\n \"member\",\n \"policy\",\n \"invite\",\n \"security\",\n \"destination\",\n] as const;\nexport type ActivityEntityKindValue = (typeof ACTIVITY_ENTITY_KIND_VALUES)[number];\n\nexport const ACTIVITY_EVENT_ACTION_VALUES = [\n \"created\",\n \"updated\",\n \"deleted\",\n \"enabled\",\n \"disabled\",\n \"removed\",\n \"role_set\",\n \"received\",\n \"replied\",\n \"failed\",\n \"revoked\",\n \"blocked\",\n \"hold_placed\",\n \"hold_released\",\n \"requested\",\n \"applied\",\n] as const;\nexport type ActivityEventActionValue = (typeof ACTIVITY_EVENT_ACTION_VALUES)[number];\n\nexport const ACTIVITY_EVENT_SOURCE_VALUES = [\"web\", \"mobile\", \"api\"] as const;\nexport type ActivityEventSourceValue = (typeof ACTIVITY_EVENT_SOURCE_VALUES)[number];\n\nexport const SubaccountRoleCodec = {\n inputToProto: {\n owner: Proto.SubaccountRole.OWNER,\n admin: Proto.SubaccountRole.ADMIN,\n treasury: Proto.SubaccountRole.TREASURY,\n leveraged_trader: Proto.SubaccountRole.LEVERAGED_TRADER,\n trader: Proto.SubaccountRole.TRADER,\n viewer: Proto.SubaccountRole.VIEWER,\n } satisfies InputToProto<SubaccountRoleValue, Proto.SubaccountRole>,\n protoToOutput: {\n [Proto.SubaccountRole.SUBACCOUNT_ROLE_UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountRole.OWNER]: \"owner\",\n [Proto.SubaccountRole.ADMIN]: \"admin\",\n [Proto.SubaccountRole.TREASURY]: \"treasury\",\n [Proto.SubaccountRole.LEVERAGED_TRADER]: \"leveraged_trader\",\n [Proto.SubaccountRole.TRADER]: \"trader\",\n [Proto.SubaccountRole.VIEWER]: \"viewer\",\n } satisfies ProtoToOutput<Proto.SubaccountRole, SubaccountRoleValue>,\n} as const;\n\nexport const SubaccountPermissionCodec = {\n protoToOutput: {\n [Proto.SubaccountPermission.UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountPermission.READ_SUBACCOUNT]: \"read_subaccount\",\n [Proto.SubaccountPermission.UPDATE_SUBACCOUNT]: \"update_subaccount\",\n [Proto.SubaccountPermission.READ_BALANCES]: \"read_balances\",\n [Proto.SubaccountPermission.READ_SPOT]: \"read_spot\",\n [Proto.SubaccountPermission.TRADE_SPOT]: \"trade_spot\",\n [Proto.SubaccountPermission.READ_INTERNAL_TRANSFERS]: \"read_internal_transfers\",\n [Proto.SubaccountPermission.INTERNAL_TRANSFER]: \"internal_transfer\",\n [Proto.SubaccountPermission.EXTERNAL_WITHDRAW]: \"external_withdraw\",\n [Proto.SubaccountPermission.READ_ADDRESS_BOOK]: \"read_address_book\",\n [Proto.SubaccountPermission.MANAGE_ADDRESS_BOOK]: \"manage_address_book\",\n [Proto.SubaccountPermission.READ_MEMBERS]: \"read_members\",\n [Proto.SubaccountPermission.MANAGE_MEMBERS]: \"manage_members\",\n [Proto.SubaccountPermission.READ_INVITES]: \"read_invites\",\n [Proto.SubaccountPermission.MANAGE_INVITES]: \"manage_invites\",\n [Proto.SubaccountPermission.READ_API_KEYS]: \"read_api_keys\",\n [Proto.SubaccountPermission.MANAGE_API_KEYS]: \"manage_api_keys\",\n [Proto.SubaccountPermission.READ_SUBACCOUNT_POLICY]: \"read_subaccount_policy\",\n [Proto.SubaccountPermission.MANAGE_SUBACCOUNT_POLICY]: \"manage_subaccount_policy\",\n [Proto.SubaccountPermission.READ_ACTIVITY]: \"read_activity\",\n [Proto.SubaccountPermission.READ_ACTIVITY_SECURITY_DETAILS]:\n \"read_activity_security_details\",\n [Proto.SubaccountPermission.MANAGE_MEMBER_MFA_REQUIREMENT]: \"manage_member_mfa_requirement\",\n [Proto.SubaccountPermission.CREATE_DEPOSIT_ADDRESS]: \"create_deposit_address\",\n [Proto.SubaccountPermission.READ_DEPOSIT_ADDRESSES]: \"read_deposit_addresses\",\n [Proto.SubaccountPermission.READ_GUARD_SIGNER_STATUS]: \"read_guard_signer_status\",\n [Proto.SubaccountPermission.MANAGE_GUARD_SIGNER]: \"manage_guard_signer\",\n [Proto.SubaccountPermission.READ_AUTO_WITHDRAW]: \"read_auto_withdraw\",\n [Proto.SubaccountPermission.MANAGE_AUTO_WITHDRAW]: \"manage_auto_withdraw\",\n [Proto.SubaccountPermission.SWAP]: \"swap\",\n [Proto.SubaccountPermission.READ_STATEMENTS]: \"read_statements\",\n } satisfies ProtoToOutput<Proto.SubaccountPermission, SubaccountPermissionValue>,\n} as const;\n\nexport const InviteActionCodec = {\n inputToProto: {\n accept: Proto.SubaccountInviteAction.ACCEPT,\n decline: Proto.SubaccountInviteAction.DECLINE,\n cancel: Proto.SubaccountInviteAction.CANCEL,\n } satisfies InputToProto<SubaccountInviteActionValue, Proto.SubaccountInviteAction>,\n} as const;\n\nexport const InviteStatusCodec = {\n protoToOutput: {\n [Proto.SubaccountInviteStatus.UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountInviteStatus.PENDING]: \"pending\",\n [Proto.SubaccountInviteStatus.ACCEPTED]: \"accepted\",\n [Proto.SubaccountInviteStatus.DECLINED]: \"declined\",\n [Proto.SubaccountInviteStatus.CANCELLED]: \"canceled\",\n } satisfies ProtoToOutput<Proto.SubaccountInviteStatus, SubaccountInviteStatusValue>,\n} as const;\n\nexport const SubaccountInviteDirectionCodec = {\n inputToProto: {\n \"\": Proto.SubaccountInviteDirection.DIRECTION_UNSPECIFIED,\n incoming: Proto.SubaccountInviteDirection.INCOMING,\n outgoing: Proto.SubaccountInviteDirection.OUTGOING,\n } satisfies InputToProto<SubaccountInviteDirectionValue, Proto.SubaccountInviteDirection>,\n} as const;\n\nexport const SubaccountStatusCodec = {\n inputToProto: {\n active: Proto.SubaccountStatus.ACTIVE,\n disabled: Proto.SubaccountStatus.DISABLED,\n } satisfies InputToProto<SubaccountStatusValue, Proto.SubaccountStatus>,\n protoToOutput: {\n [Proto.SubaccountStatus.UNSPECIFIED]: \"unspecified\",\n [Proto.SubaccountStatus.ACTIVE]: \"active\",\n [Proto.SubaccountStatus.DISABLED]: \"disabled\",\n } satisfies ProtoToOutput<Proto.SubaccountStatus, SubaccountStatusValue>,\n} as const;\n\nexport const ActivityEntityKindCodec = {\n protoToOutput: {\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_UNSPECIFIED]: \"unspecified\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_ACCOUNT]: \"account\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_SESSION]: \"session\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_API_KEY]: \"api_key\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_SUBACCOUNT]: \"subaccount\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_MEMBER]: \"member\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_POLICY]: \"policy\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_INVITE]: \"invite\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_SECURITY]: \"security\",\n [Proto.ActivityEntityKind.ACTIVITY_ENTITY_DESTINATION]: \"destination\",\n } satisfies ProtoToOutput<Proto.ActivityEntityKind, ActivityEntityKindValue>,\n} as const;\n\nexport const ActivityEventActionCodec = {\n protoToOutput: {\n [Proto.ActivityEventAction.ACTIVITY_ACTION_UNSPECIFIED]: \"unspecified\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_CREATED]: \"created\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_UPDATED]: \"updated\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_DELETED]: \"deleted\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_ENABLED]: \"enabled\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_DISABLED]: \"disabled\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REMOVED]: \"removed\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_ROLE_SET]: \"role_set\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_RECEIVED]: \"received\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REPLIED]: \"replied\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_FAILED]: \"failed\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REVOKED]: \"revoked\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_BLOCKED]: \"blocked\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_HOLD_PLACED]: \"hold_placed\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_HOLD_RELEASED]: \"hold_released\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_REQUESTED]: \"requested\",\n [Proto.ActivityEventAction.ACTIVITY_ACTION_APPLIED]: \"applied\",\n } satisfies ProtoToOutput<Proto.ActivityEventAction, ActivityEventActionValue>,\n} as const;\n\nexport const ActivityEventSourceCodec = {\n protoToOutput: {\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_UNSPECIFIED]: \"unspecified\",\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_WEB]: \"web\",\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_MOBILE]: \"mobile\",\n [Proto.ActivityEventSource.ACTIVITY_SOURCE_API]: \"api\",\n } satisfies ProtoToOutput<Proto.ActivityEventSource, ActivityEventSourceValue>,\n} as const;\n"],"mappings":";;AAyDA,MAAa,qCAAqC;CAAC;CAAI;CAAY;AAAU;AAG7E,MAAa,2BAA2B,CAAC,UAAU,UAAU;AAuC7D,MAAa,sBAAsB;CAC/B,cAAc;EACV,OAAA;EACA,OAAA;EACA,UAAA;EACA,kBAAA;EACA,QAAA;EACA,QAAA;CACJ;CACA,eAAe;GACyC,IAAA;GACtB,IAAA;GACA,IAAA;GACG,IAAA;GACQ,IAAA;GACV,IAAA;GACA,IAAA;CACnC;AACJ;AAEA,MAAa,4BAA4B,EACrC,eAAe;EAC+B,IAAA;EACI,IAAA;EACE,IAAA;EACJ,IAAA;EACJ,IAAA;EACC,IAAA;EACa,IAAA;EACN,IAAA;EACA,IAAA;EACA,IAAA;EACE,KAAA;EACP,KAAA;EACE,KAAA;EACF,KAAA;EACE,KAAA;EACD,KAAA;EACE,KAAA;EACO,KAAA;EACE,KAAA;EACX,KAAA;EAExC,KAAA;EACwD,KAAA;EACP,KAAA;EACA,KAAA;EACE,KAAA;EACL,KAAA;EACD,KAAA;EACE,KAAA;EAChB,KAAA;EACW,KAAA;AAClD,EACJ;AAEA,MAAa,oBAAoB,EAC7B,cAAc;CACV,QAAA;CACA,SAAA;CACA,QAAA;AACJ,EACJ;AAEA,MAAa,oBAAoB,EAC7B,eAAe;EACiC,IAAA;EACJ,IAAA;EACC,IAAA;EACA,IAAA;EACC,IAAA;AAC9C,EACJ;AAEA,MAAa,iCAAiC,EAC1C,cAAc;CACV,IAAA;CACA,UAAA;CACA,UAAA;AACJ,EACJ;AAEA,MAAa,wBAAwB;CACjC,cAAc;EACV,QAAA;EACA,UAAA;CACJ;CACA,eAAe;GAC2B,IAAA;GACL,IAAA;GACE,IAAA;CACvC;AACJ;AAEA,MAAa,0BAA0B,EACnC,eAAe;EAC6C,IAAA;EACJ,IAAA;EACA,IAAA;EACA,IAAA;EACG,IAAA;EACJ,IAAA;EACA,IAAA;EACA,IAAA;EACE,IAAA;EACG,IAAA;AAC5D,EACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8C,IAAA;EACJ,IAAA;EACA,IAAA;EACA,IAAA;EACA,IAAA;EACC,IAAA;EACD,IAAA;EACC,IAAA;EACA,IAAA;EACD,IAAA;EACD,KAAA;EACC,KAAA;EACA,KAAA;EACI,KAAA;EACE,KAAA;EACJ,KAAA;EACF,KAAA;AACzD,EACJ;AAEA,MAAa,2BAA2B,EACpC,eAAe;EAC8C,IAAA;EACR,IAAA;EACG,IAAA;EACH,IAAA;AACrD,EACJ"}
@@ -1,15 +1,15 @@
1
+ import { ApiKeySchema } from "../../gen/auth/v1/api_keys_pb.js";
2
+ import { SubaccountRoleService, SubaccountSchema, SubaccountService, SubaccountViewService } from "../../gen/auth/v1/subaccounts_pb.js";
1
3
  import { parse } from "../../shared/validation.js";
2
4
  import { toConnectCallOptions } from "../../shared/request-options.js";
3
5
  import { formatId } from "../../utils/base58-id.js";
4
- import { ApiKeySchema } from "../../gen/auth/v1/api_keys_pb.js";
5
- import { SubaccountRoleService, SubaccountSchema, SubaccountService, SubaccountViewService } from "../../gen/auth/v1/subaccounts_pb.js";
6
6
  import { ApiKeySchema as ApiKeySchema$1 } from "../api-keys/api-keys.schemas.js";
7
7
  import { createLedgerBalanceSchema } from "../balances/balances.schemas.js";
8
8
  import { DEFAULT_SUBACCOUNT_POLICY, SubaccountPolicySchema } from "../policies/subaccount-policies/subaccount-policies.schemas.js";
9
9
  import { SubaccountPoliciesService } from "../policies/subaccount-policies/subaccount-policies.js";
10
10
  import { CreateSubaccountChallengeInputSchema, CreateSubaccountInputSchema, CreateSubaccountResultSchema, EffectiveSubaccountPermissionsSchema, GetSubaccountInputSchema, InviteSubaccountMemberInputSchema, ListSubaccountInvitesInputSchema, RemoveSubaccountMemberInputSchema, RespondSubaccountInviteInputSchema, SetSubaccountMemberMfaRequirementInputSchema, SubaccountActivityEventSchema, SubaccountActivityInputSchema, SubaccountChallengeSchema, SubaccountIdInputSchema, SubaccountInviteSchema, SubaccountMemberSchema, SubaccountMutationResultSchema, SubaccountRoleCatalogSchema, SubaccountSchema as SubaccountSchema$1, UpdateSubaccountInputSchema, UpdateSubaccountMemberRoleInputSchema } from "./subaccounts.schemas.js";
11
- import { createClient } from "@connectrpc/connect";
12
11
  import * as v from "valibot";
12
+ import { createClient } from "@connectrpc/connect";
13
13
  //#region src/services/subaccounts/subaccounts.ts
14
14
  /**
15
15
  * Reads the public role catalog and creates, manages, shares, audits, and subscribes to subaccounts visible to the authenticated caller.