@polyester/sdk 0.36.0-devnet-20261119184734 → 0.36.0-devnet-20261120015159

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 (199) hide show
  1. package/CHANGELOG.md +18 -2
  2. package/dist/client.d.ts +2 -0
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +2 -0
  5. package/dist/client.js.map +1 -1
  6. package/dist/gen/ai/v1/assistant_pb.d.ts +55 -3
  7. package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -1
  8. package/dist/gen/ai/v1/assistant_pb.js +8 -1
  9. package/dist/gen/ai/v1/assistant_pb.js.map +1 -1
  10. package/dist/gen/auth/v1/account_scope_pb.d.ts +40 -0
  11. package/dist/gen/auth/v1/account_scope_pb.d.ts.map +1 -0
  12. package/dist/gen/auth/v1/account_scope_pb.js +46 -0
  13. package/dist/gen/auth/v1/account_scope_pb.js.map +1 -0
  14. package/dist/gen/auth/v1/address_book_pb.d.ts +3 -31
  15. package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
  16. package/dist/gen/auth/v1/address_book_pb.js +8 -38
  17. package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
  18. package/dist/gen/auth/v1/auth_pb.d.ts +15 -14
  19. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  20. package/dist/gen/auth/v1/auth_pb.js +16 -15
  21. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  22. package/dist/gen/auth/v1/connected_apps_pb.d.ts +59 -58
  23. package/dist/gen/auth/v1/connected_apps_pb.d.ts.map +1 -1
  24. package/dist/gen/auth/v1/connected_apps_pb.js +38 -37
  25. package/dist/gen/auth/v1/connected_apps_pb.js.map +1 -1
  26. package/dist/gen/auth/v1/policies_pb.d.ts +27 -1
  27. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  28. package/dist/gen/auth/v1/policies_pb.js +27 -1
  29. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  30. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +228 -2
  31. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
  32. package/dist/gen/chain/withdraw/v1/withdraw_pb.js +32 -8
  33. package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
  34. package/dist/gen/changelog/v1/changelog_pb.d.ts +16 -4
  35. package/dist/gen/changelog/v1/changelog_pb.d.ts.map +1 -1
  36. package/dist/gen/changelog/v1/changelog_pb.js.map +1 -1
  37. package/dist/gen/index.d.ts +7 -5
  38. package/dist/gen/index.js +7 -5
  39. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +288 -2
  40. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  41. package/dist/gen/marketdata/v1/marketdata_pb.js +115 -2
  42. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  43. package/dist/gen/orders/v1/orders_pb.d.ts +78 -25
  44. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  45. package/dist/gen/orders/v1/orders_pb.js +36 -7
  46. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  47. package/dist/gen/orders/v1/orders_read_pb.d.ts +35 -1
  48. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  49. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  50. package/dist/gen/strategies/v1/strategies_pb.d.ts +2928 -0
  51. package/dist/gen/strategies/v1/strategies_pb.d.ts.map +1 -0
  52. package/dist/gen/strategies/v1/strategies_pb.js +818 -0
  53. package/dist/gen/strategies/v1/strategies_pb.js.map +1 -0
  54. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +38 -17
  55. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
  56. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +4 -1
  57. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
  58. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts +312 -132
  59. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.d.ts.map +1 -1
  60. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js +31 -26
  61. package/dist/gen/swap/quickswap/v1/quickswap_explorer_pb.js.map +1 -1
  62. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +28 -13
  63. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  64. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +2 -2
  65. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  66. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +109 -2
  67. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts.map +1 -1
  68. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js +23 -3
  69. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -1
  70. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +3 -2
  71. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
  72. package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
  73. package/dist/gen/triggers/v1/triggers_pb.d.ts +61 -11
  74. package/dist/gen/triggers/v1/triggers_pb.d.ts.map +1 -1
  75. package/dist/gen/triggers/v1/triggers_pb.js +4 -2
  76. package/dist/gen/triggers/v1/triggers_pb.js.map +1 -1
  77. package/dist/index.d.ts +9 -6
  78. package/dist/services/account-activity/account-activity.schemas.d.ts +6 -6
  79. package/dist/services/address-book/address-book.codecs.js +1 -0
  80. package/dist/services/address-book/address-book.codecs.js.map +1 -1
  81. package/dist/services/address-book/address-book.js +1 -1
  82. package/dist/services/api-keys/api-keys.js +1 -1
  83. package/dist/services/assistant/assistant-events.schemas.d.ts +141 -43
  84. package/dist/services/assistant/assistant-events.schemas.d.ts.map +1 -1
  85. package/dist/services/assistant/assistant-events.schemas.js +15 -5
  86. package/dist/services/assistant/assistant-events.schemas.js.map +1 -1
  87. package/dist/services/assistant/assistant.codecs.d.ts +5 -2
  88. package/dist/services/assistant/assistant.codecs.d.ts.map +1 -1
  89. package/dist/services/assistant/assistant.codecs.js +10 -2
  90. package/dist/services/assistant/assistant.codecs.js.map +1 -1
  91. package/dist/services/assistant/assistant.schemas.d.ts +2 -2
  92. package/dist/services/auth/auth.js +1 -1
  93. package/dist/services/auth/auth.js.map +1 -1
  94. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +16 -16
  95. package/dist/services/balances/balances.js +1 -1
  96. package/dist/services/balances/balances.schemas.d.ts +3 -3
  97. package/dist/services/candles/candles.schemas.d.ts +10 -10
  98. package/dist/services/changelog/changelog.schemas.d.ts +38 -38
  99. package/dist/services/checkpoints/checkpoints.schemas.d.ts +1 -1
  100. package/dist/services/claims/claims.schemas.d.ts +2 -2
  101. package/dist/services/connected-apps/connected-apps.d.ts +4 -4
  102. package/dist/services/connected-apps/connected-apps.d.ts.map +1 -1
  103. package/dist/services/connected-apps/connected-apps.js +13 -13
  104. package/dist/services/connected-apps/connected-apps.js.map +1 -1
  105. package/dist/services/connected-apps/connected-apps.schemas.d.ts +7 -7
  106. package/dist/services/connected-apps/connected-apps.schemas.d.ts.map +1 -1
  107. package/dist/services/connected-apps/connected-apps.schemas.js +10 -10
  108. package/dist/services/connected-apps/connected-apps.schemas.js.map +1 -1
  109. package/dist/services/connected-apps/connected-apps.types.d.ts +2 -2
  110. package/dist/services/dust-conversion/dust-conversion.schemas.d.ts +8 -8
  111. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  112. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +6 -6
  113. package/dist/services/lifecycle/lifecycle.schemas.d.ts +94 -94
  114. package/dist/services/market-data/market-data.codecs.d.ts +9 -1
  115. package/dist/services/market-data/market-data.codecs.d.ts.map +1 -1
  116. package/dist/services/market-data/market-data.codecs.js +14 -1
  117. package/dist/services/market-data/market-data.codecs.js.map +1 -1
  118. package/dist/services/market-data/market-data.d.ts +9 -1
  119. package/dist/services/market-data/market-data.d.ts.map +1 -1
  120. package/dist/services/market-data/market-data.js +14 -1
  121. package/dist/services/market-data/market-data.js.map +1 -1
  122. package/dist/services/market-data/market-data.schemas.d.ts +40 -2
  123. package/dist/services/market-data/market-data.schemas.d.ts.map +1 -1
  124. package/dist/services/market-data/market-data.schemas.js +43 -8
  125. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  126. package/dist/services/market-data/market-data.types.d.ts +3 -3
  127. package/dist/services/notifications/notifications.schemas.d.ts +4 -4
  128. package/dist/services/orderbook/orderbook.d.ts.map +1 -1
  129. package/dist/services/orderbook/orderbook.js +5 -19
  130. package/dist/services/orderbook/orderbook.js.map +1 -1
  131. package/dist/services/orders/order-errors.schemas.d.ts +6 -6
  132. package/dist/services/orders/orders-batch.schemas.d.ts +72 -72
  133. package/dist/services/orders/orders-input.schemas.d.ts +10 -10
  134. package/dist/services/orders/orders-output.schemas.d.ts +16 -16
  135. package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
  136. package/dist/services/orders/orders-output.schemas.js +1 -1
  137. package/dist/services/orders/orders-output.schemas.js.map +1 -1
  138. package/dist/services/orders/orders.d.ts +5 -0
  139. package/dist/services/orders/orders.d.ts.map +1 -1
  140. package/dist/services/orders/orders.js +5 -0
  141. package/dist/services/orders/orders.js.map +1 -1
  142. package/dist/services/policies/api-key-policies/api-key-policies.js +1 -1
  143. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  144. package/dist/services/policies/shared.codecs.js +13 -4
  145. package/dist/services/policies/shared.codecs.js.map +1 -1
  146. package/dist/services/policies/shared.d.ts +1 -1
  147. package/dist/services/policies/subaccount-policies/subaccount-policies.js +1 -1
  148. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
  149. package/dist/services/rewards/rewards.schemas.d.ts +4 -4
  150. package/dist/services/statement-exports/statement-exports.schemas.d.ts +6 -6
  151. package/dist/services/strategies/service.d.ts +8 -0
  152. package/dist/services/strategies/service.d.ts.map +1 -0
  153. package/dist/services/strategies/service.js +9 -0
  154. package/dist/services/strategies/service.js.map +1 -0
  155. package/dist/services/strategies/strategies.codecs.d.ts +15 -0
  156. package/dist/services/strategies/strategies.codecs.d.ts.map +1 -0
  157. package/dist/services/strategies/strategies.codecs.js +50 -0
  158. package/dist/services/strategies/strategies.codecs.js.map +1 -0
  159. package/dist/services/strategies/strategies.d.ts +75 -0
  160. package/dist/services/strategies/strategies.d.ts.map +1 -0
  161. package/dist/services/strategies/strategies.js +135 -0
  162. package/dist/services/strategies/strategies.js.map +1 -0
  163. package/dist/services/strategies/strategies.schemas.d.ts +568 -0
  164. package/dist/services/strategies/strategies.schemas.d.ts.map +1 -0
  165. package/dist/services/strategies/strategies.schemas.js +408 -0
  166. package/dist/services/strategies/strategies.schemas.js.map +1 -0
  167. package/dist/services/strategies/strategies.types.d.ts +3 -0
  168. package/dist/services/subaccounts/subaccounts.js +2 -2
  169. package/dist/services/subaccounts/subaccounts.schemas.d.ts +8 -8
  170. package/dist/services/system/system.schemas.d.ts +13 -13
  171. package/dist/services/trades/trades.schemas.d.ts +1 -1
  172. package/dist/services/trading-withdraws/trading-withdraws.d.ts +29 -2
  173. package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
  174. package/dist/services/trading-withdraws/trading-withdraws.js +74 -11
  175. package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
  176. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +85 -1
  177. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
  178. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +56 -1
  179. package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
  180. package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +3 -3
  181. package/dist/services/trading-withdraws/wallet-message.js +29 -1
  182. package/dist/services/trading-withdraws/wallet-message.js.map +1 -1
  183. package/dist/services/transfers/transfers.js +1 -1
  184. package/dist/services/transfers/transfers.schemas.d.ts +1 -1
  185. package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
  186. package/dist/services/triggers/triggers-output.schemas.d.ts +44 -44
  187. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  188. package/dist/shared/connect-error-mapping.js +5 -0
  189. package/dist/shared/connect-error-mapping.js.map +1 -1
  190. package/dist/shared/error-detail.d.ts +25 -2
  191. package/dist/shared/error-detail.d.ts.map +1 -1
  192. package/dist/shared/error-detail.js +1 -0
  193. package/dist/shared/error-detail.js.map +1 -1
  194. package/dist/shared/error-details/strategies.js +36 -0
  195. package/dist/shared/error-details/strategies.js.map +1 -0
  196. package/dist/wired-services.d.ts.map +1 -1
  197. package/dist/wired-services.js +6 -4
  198. package/dist/wired-services.js.map +1 -1
  199. 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[]>]>;
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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[]>]>;
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
  /** Template revision this policy was copied at; `"0"` when it is not a copy. */
@@ -52,7 +52,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
52
52
  symbolId: number;
53
53
  }[];
54
54
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
55
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
55
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
56
56
  isTemplate: boolean;
57
57
  sourceTemplateId?: string | undefined;
58
58
  sourceTemplateRevision: string;
@@ -72,7 +72,7 @@ declare const ApiKeyPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
72
72
  symbolId: number;
73
73
  }[];
74
74
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
75
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
75
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
76
76
  isTemplate: boolean;
77
77
  sourceTemplateId?: string | undefined;
78
78
  sourceTemplateRevision: string;
@@ -89,7 +89,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
89
89
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
90
90
  }, undefined>, undefined>, readonly []>;
91
91
  readonly spotMarketScope: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, DecodedEnum<"all" | "allowlist">>]>;
92
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[]>]>;
92
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[]>]>;
93
93
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
94
94
  readonly sourceTemplateId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BigintSchema<undefined>, undefined>, v.TransformAction<bigint | undefined, string | undefined>]>;
95
95
  /** Template revision this policy was copied at; `"0"` when it is not a copy. */
@@ -114,7 +114,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
114
114
  symbolId: number;
115
115
  }[];
116
116
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
117
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
117
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
118
118
  isTemplate: boolean;
119
119
  sourceTemplateId?: string | undefined;
120
120
  sourceTemplateRevision: string;
@@ -134,7 +134,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
134
134
  symbolId: number;
135
135
  }[];
136
136
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
137
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
137
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
138
138
  isTemplate: boolean;
139
139
  sourceTemplateId?: string | undefined;
140
140
  sourceTemplateRevision: string;
@@ -152,7 +152,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
152
152
  symbolId: number;
153
153
  }[];
154
154
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
155
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
155
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
156
156
  isTemplate: boolean;
157
157
  sourceTemplateId?: string | undefined;
158
158
  sourceTemplateRevision: string;
@@ -169,7 +169,7 @@ declare const ListApiKeyPoliciesResponseSchema: v.SchemaWithPipe<readonly [v.Obj
169
169
  symbolId: number;
170
170
  }[];
171
171
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
172
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
172
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
173
173
  isTemplate: boolean;
174
174
  sourceTemplateId?: string | undefined;
175
175
  sourceTemplateRevision: string;
@@ -184,7 +184,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
184
184
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
185
185
  }, undefined>, undefined>, readonly []>;
186
186
  readonly spotMarketScope: v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["all", "allowlist"], undefined>, v.TransformAction<"all" | "allowlist", MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST>]>;
187
- 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-statements", "convert-dust", "read-funding-flows", "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-notifications", "read-account-activity", "manage-api-keys", "manage-api-key-policies", "manage-subaccount-policies"], 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies")[], (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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES)[]>]>;
187
+ 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-statements", "convert-dust", "read-funding-flows", "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-notifications", "read-account-activity", "read-strategies", "draft-strategies", "propose-strategy-deploy", "manage-api-keys", "manage-api-key-policies", "manage-subaccount-policies"], 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies")[], (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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES | PolicyAction.READ_STRATEGIES | PolicyAction.DRAFT_STRATEGIES | PolicyAction.PROPOSE_STRATEGY_DEPLOY)[]>]>;
188
188
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
189
189
  readonly assignToKeyId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
190
190
  }, undefined>, v.TransformAction<{
@@ -194,7 +194,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
194
194
  symbolId: number;
195
195
  }[];
196
196
  spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
197
- 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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES)[];
197
+ 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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES | PolicyAction.READ_STRATEGIES | PolicyAction.DRAFT_STRATEGIES | PolicyAction.PROPOSE_STRATEGY_DEPLOY)[];
198
198
  isTemplate: boolean;
199
199
  assignToKeyId?: string | undefined;
200
200
  }, {
@@ -205,7 +205,7 @@ declare const CreateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
205
205
  symbolId: number;
206
206
  }[];
207
207
  spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
208
- 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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES)[];
208
+ 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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES | PolicyAction.READ_STRATEGIES | PolicyAction.DRAFT_STRATEGIES | PolicyAction.PROPOSE_STRATEGY_DEPLOY)[];
209
209
  isTemplate: boolean;
210
210
  };
211
211
  assignToKeyId: string | undefined;
@@ -220,7 +220,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
220
220
  readonly symbolId: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>;
221
221
  }, undefined>, undefined>, undefined>;
222
222
  readonly spotMarketScope: v.OptionalSchema<v.PicklistSchema<readonly ["all", "allowlist"], undefined>, undefined>;
223
- 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-statements", "convert-dust", "read-funding-flows", "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-notifications", "read-account-activity", "manage-api-keys", "manage-api-key-policies", "manage-subaccount-policies"], undefined>, undefined>, undefined>;
223
+ 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-statements", "convert-dust", "read-funding-flows", "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-notifications", "read-account-activity", "read-strategies", "draft-strategies", "propose-strategy-deploy", "manage-api-keys", "manage-api-key-policies", "manage-subaccount-policies"], undefined>, undefined>, undefined>;
224
224
  readonly isTemplate: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
225
225
  }, undefined>, v.CheckAction<{
226
226
  policyId: bigint;
@@ -231,7 +231,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
231
231
  symbolId: number;
232
232
  }[] | undefined;
233
233
  spotMarketScope?: "all" | "allowlist" | undefined;
234
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies")[] | undefined;
234
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies")[] | undefined;
235
235
  isTemplate?: boolean | undefined;
236
236
  }, "At least one API key policy field must be provided">, v.TransformAction<{
237
237
  policyId: bigint;
@@ -242,7 +242,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
242
242
  symbolId: number;
243
243
  }[] | undefined;
244
244
  spotMarketScope?: "all" | "allowlist" | undefined;
245
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies")[] | undefined;
245
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies")[] | undefined;
246
246
  isTemplate?: boolean | undefined;
247
247
  }, {
248
248
  policyId: bigint;
@@ -257,7 +257,7 @@ declare const UpdateApiKeyPolicyInputSchema: v.SchemaWithPipe<readonly [v.Strict
257
257
  } & {
258
258
  spotMarketScope: MarketScope_Value.ALL | MarketScope_Value.ALLOWLIST;
259
259
  } & {
260
- 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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES)[];
260
+ 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 | PolicyAction.CONVERT_DUST | PolicyAction.READ_FUNDING_FLOWS | PolicyAction.READ_NOTIFICATIONS | PolicyAction.READ_ACCOUNT_ACTIVITY | PolicyAction.MANAGE_API_KEYS | PolicyAction.MANAGE_API_KEY_POLICIES | PolicyAction.MANAGE_SUBACCOUNT_POLICIES | PolicyAction.READ_STRATEGIES | PolicyAction.DRAFT_STRATEGIES | PolicyAction.PROPOSE_STRATEGY_DEPLOY)[];
261
261
  } & {
262
262
  isTemplate: boolean;
263
263
  }>;
@@ -1,5 +1,5 @@
1
- import "../../gen/auth/v1/policies_pb.js";
2
1
  import { enumLabel } from "../../shared/proto-enum-codec.js";
2
+ import "../../gen/auth/v1/policies_pb.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 = [
@@ -47,7 +47,10 @@ const ACCOUNT_PERMISSION_POLICY_ACTION_LABELS = [
47
47
  "read-price-alerts",
48
48
  "manage-price-alerts",
49
49
  "read-notifications",
50
- "read-account-activity"
50
+ "read-account-activity",
51
+ "read-strategies",
52
+ "draft-strategies",
53
+ "propose-strategy-deploy"
51
54
  ];
52
55
  /**
53
56
  * Admin permissions, accepted by API-key policies only. They take effect only on an admin key
@@ -118,7 +121,10 @@ const PolicyActionCodec = {
118
121
  [42]: "read-account-activity",
119
122
  [43]: "manage-api-keys",
120
123
  [44]: "manage-api-key-policies",
121
- [45]: "manage-subaccount-policies"
124
+ [45]: "manage-subaccount-policies",
125
+ [46]: "read-strategies",
126
+ [47]: "draft-strategies",
127
+ [48]: "propose-strategy-deploy"
122
128
  },
123
129
  inputToProto: {
124
130
  "trade-spot": 1,
@@ -161,7 +167,10 @@ const PolicyActionCodec = {
161
167
  "read-account-activity": 42,
162
168
  "manage-api-keys": 43,
163
169
  "manage-api-key-policies": 44,
164
- "manage-subaccount-policies": 45
170
+ "manage-subaccount-policies": 45,
171
+ "read-strategies": 46,
172
+ "draft-strategies": 47,
173
+ "propose-strategy-deploy": 48
165
174
  }
166
175
  };
167
176
  /**
@@ -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 \"read-statements\",\n \"convert-dust\",\n \"read-funding-flows\",\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-notifications\",\n \"read-account-activity\",\n] as const;\n\n/**\n * Admin permissions, accepted by API-key policies only. They take effect only on an admin key\n * (`purpose: \"admin\"`), letting it manage the main account's other keys and its sub-accounts'\n * policies without a session.\n */\nexport const ADMIN_POLICY_ACTION_LABELS = [\n \"manage-api-keys\",\n \"manage-api-key-policies\",\n \"manage-subaccount-policies\",\n] as const;\n\nexport const POLICY_ACTION_LABELS = [\n ...PRODUCT_POLICY_ACTION_LABELS,\n ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS,\n ...ADMIN_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 [Proto.PolicyAction.CONVERT_DUST]: \"convert-dust\",\n [Proto.PolicyAction.READ_FUNDING_FLOWS]: \"read-funding-flows\",\n [Proto.PolicyAction.READ_NOTIFICATIONS]: \"read-notifications\",\n [Proto.PolicyAction.READ_ACCOUNT_ACTIVITY]: \"read-account-activity\",\n [Proto.PolicyAction.MANAGE_API_KEYS]: \"manage-api-keys\",\n [Proto.PolicyAction.MANAGE_API_KEY_POLICIES]: \"manage-api-key-policies\",\n [Proto.PolicyAction.MANAGE_SUBACCOUNT_POLICIES]: \"manage-subaccount-policies\",\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 \"convert-dust\": Proto.PolicyAction.CONVERT_DUST,\n \"read-funding-flows\": Proto.PolicyAction.READ_FUNDING_FLOWS,\n \"read-notifications\": Proto.PolicyAction.READ_NOTIFICATIONS,\n \"read-account-activity\": Proto.PolicyAction.READ_ACCOUNT_ACTIVITY,\n \"manage-api-keys\": Proto.PolicyAction.MANAGE_API_KEYS,\n \"manage-api-key-policies\": Proto.PolicyAction.MANAGE_API_KEY_POLICIES,\n \"manage-subaccount-policies\": Proto.PolicyAction.MANAGE_SUBACCOUNT_POLICIES,\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;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;CACA;AACJ;;;;;;AAOA,MAAa,6BAA6B;CACtC;CACA;CACA;AACJ;AAEA,MAAa,uBAAuB;CAChC,GAAG;CACH,GAAG;CACH,GAAG;AACP;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;GACH,KAAA;GACM,KAAA;GACA,KAAA;GACG,KAAA;GACN,KAAA;GACQ,KAAA;GACG,KAAA;CACrD;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;EACA,gBAAA;EACA,sBAAA;EACA,sBAAA;EACA,yBAAA;EACA,mBAAA;EACA,2BAAA;EACA,8BAAA;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 \"read-statements\",\n \"convert-dust\",\n \"read-funding-flows\",\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-notifications\",\n \"read-account-activity\",\n \"read-strategies\",\n \"draft-strategies\",\n \"propose-strategy-deploy\",\n] as const;\n\n/**\n * Admin permissions, accepted by API-key policies only. They take effect only on an admin key\n * (`purpose: \"admin\"`), letting it manage the main account's other keys and its sub-accounts'\n * policies without a session.\n */\nexport const ADMIN_POLICY_ACTION_LABELS = [\n \"manage-api-keys\",\n \"manage-api-key-policies\",\n \"manage-subaccount-policies\",\n] as const;\n\nexport const POLICY_ACTION_LABELS = [\n ...PRODUCT_POLICY_ACTION_LABELS,\n ...ACCOUNT_PERMISSION_POLICY_ACTION_LABELS,\n ...ADMIN_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 [Proto.PolicyAction.CONVERT_DUST]: \"convert-dust\",\n [Proto.PolicyAction.READ_FUNDING_FLOWS]: \"read-funding-flows\",\n [Proto.PolicyAction.READ_NOTIFICATIONS]: \"read-notifications\",\n [Proto.PolicyAction.READ_ACCOUNT_ACTIVITY]: \"read-account-activity\",\n [Proto.PolicyAction.MANAGE_API_KEYS]: \"manage-api-keys\",\n [Proto.PolicyAction.MANAGE_API_KEY_POLICIES]: \"manage-api-key-policies\",\n [Proto.PolicyAction.MANAGE_SUBACCOUNT_POLICIES]: \"manage-subaccount-policies\",\n [Proto.PolicyAction.READ_STRATEGIES]: \"read-strategies\",\n [Proto.PolicyAction.DRAFT_STRATEGIES]: \"draft-strategies\",\n [Proto.PolicyAction.PROPOSE_STRATEGY_DEPLOY]: \"propose-strategy-deploy\",\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 \"convert-dust\": Proto.PolicyAction.CONVERT_DUST,\n \"read-funding-flows\": Proto.PolicyAction.READ_FUNDING_FLOWS,\n \"read-notifications\": Proto.PolicyAction.READ_NOTIFICATIONS,\n \"read-account-activity\": Proto.PolicyAction.READ_ACCOUNT_ACTIVITY,\n \"manage-api-keys\": Proto.PolicyAction.MANAGE_API_KEYS,\n \"manage-api-key-policies\": Proto.PolicyAction.MANAGE_API_KEY_POLICIES,\n \"manage-subaccount-policies\": Proto.PolicyAction.MANAGE_SUBACCOUNT_POLICIES,\n \"read-strategies\": Proto.PolicyAction.READ_STRATEGIES,\n \"draft-strategies\": Proto.PolicyAction.DRAFT_STRATEGIES,\n \"propose-strategy-deploy\": Proto.PolicyAction.PROPOSE_STRATEGY_DEPLOY,\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;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;CACA;CACA;CACA;CACA;AACJ;;;;;;AAOA,MAAa,6BAA6B;CACtC;CACA;CACA;AACJ;AAEA,MAAa,uBAAuB;CAChC,GAAG;CACH,GAAG;CACH,GAAG;AACP;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;GACH,KAAA;GACM,KAAA;GACA,KAAA;GACG,KAAA;GACN,KAAA;GACQ,KAAA;GACG,KAAA;GACX,KAAA;GACC,KAAA;GACO,KAAA;CAClD;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;EACA,gBAAA;EACA,sBAAA;EACA,sBAAA;EACA,yBAAA;EACA,mBAAA;EACA,2BAAA;EACA,8BAAA;EACA,mBAAA;EACA,oBAAA;EACA,2BAAA;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-statements", "convert-dust", "read-funding-flows", "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-notifications", "read-account-activity", "manage-api-keys", "manage-api-key-policies", "manage-subaccount-policies"], 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-statements", "convert-dust", "read-funding-flows", "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-notifications", "read-account-activity", "read-strategies", "draft-strategies", "propose-strategy-deploy", "manage-api-keys", "manage-api-key-policies", "manage-subaccount-policies"], 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,8 +1,8 @@
1
- import { PolicyService, SubaccountPolicyViewSchema } from "../../../gen/auth/v1/policies_pb.js";
2
1
  import { parse } from "../../../shared/validation.js";
3
2
  import { removeUndefined } from "../../../utils/remove-undefined.js";
4
3
  import { toConnectCallOptions } from "../../../shared/request-options.js";
5
4
  import { formatId } from "../../../utils/base58-id.js";
5
+ import { PolicyService, SubaccountPolicyViewSchema } from "../../../gen/auth/v1/policies_pb.js";
6
6
  import { resolveAccountScopedInput } from "../../subaccount-resolver.js";
7
7
  import { ApplySubaccountPolicyInputSchema, CreateSubaccountPolicyInputSchema, GetSubaccountPolicyInputSchema, ListSubaccountPoliciesInputSchema, PolicyIdSchema, SubaccountPolicySchema, UpdateSubaccountPolicyInputSchema } from "./subaccount-policies.schemas.js";
8
8
  import { createClient } from "@connectrpc/connect";
@@ -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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[]>]>;
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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[]>]>;
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
  /** Template revision this policy was copied at; `"0"` when it is not a copy. */
@@ -81,7 +81,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
81
81
  symbolId: number;
82
82
  }[];
83
83
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
84
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
84
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
85
85
  isTemplate: boolean;
86
86
  sourceTemplateId?: string | undefined;
87
87
  sourceTemplateRevision: string;
@@ -107,7 +107,7 @@ declare const SubaccountPolicySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<
107
107
  symbolId: number;
108
108
  }[];
109
109
  spotMarketScope: DecodedEnum<"all" | "allowlist">;
110
- 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
110
+ 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-statements" | "convert-dust" | "read-funding-flows" | "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-notifications" | "read-account-activity" | "read-strategies" | "draft-strategies" | "propose-strategy-deploy" | "manage-api-keys" | "manage-api-key-policies" | "manage-subaccount-policies">[];
111
111
  isTemplate: boolean;
112
112
  sourceTemplateId?: string | undefined;
113
113
  sourceTemplateRevision: string;
@@ -29,7 +29,7 @@ declare const RewardAwardSchema: v.ObjectSchema<{
29
29
  readonly assetId: v.NumberSchema<undefined>;
30
30
  readonly amountBaseUnits: v.StringSchema<undefined>;
31
31
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
32
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "awaiting_destination" | "ready_for_payout" | "paid">]>;
32
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
33
33
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
34
34
  readonly seconds: v.BigintSchema<undefined>;
35
35
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -67,7 +67,7 @@ declare const ListRewardAwardsResultSchema: v.ObjectSchema<{
67
67
  readonly assetId: v.NumberSchema<undefined>;
68
68
  readonly amountBaseUnits: v.StringSchema<undefined>;
69
69
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
70
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "awaiting_destination" | "ready_for_payout" | "paid">]>;
70
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
71
71
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
72
72
  readonly seconds: v.BigintSchema<undefined>;
73
73
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -114,7 +114,7 @@ declare const SetRewardDestinationResultSchema: v.ObjectSchema<{
114
114
  readonly assetId: v.NumberSchema<undefined>;
115
115
  readonly amountBaseUnits: v.StringSchema<undefined>;
116
116
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
117
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "awaiting_destination" | "ready_for_payout" | "paid">]>;
117
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
118
118
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
119
119
  readonly seconds: v.BigintSchema<undefined>;
120
120
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -153,7 +153,7 @@ declare const AcknowledgeRewardAwardResultSchema: v.ObjectSchema<{
153
153
  readonly assetId: v.NumberSchema<undefined>;
154
154
  readonly amountBaseUnits: v.StringSchema<undefined>;
155
155
  readonly fulfillmentMethod: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "external_testnet" | "internal_trading">]>;
156
- readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "awaiting_destination" | "ready_for_payout" | "paid">]>;
156
+ readonly fulfillmentState: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "awaiting_destination" | "ready_for_payout" | "paid" | "canceled">]>;
157
157
  readonly publishedAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
158
158
  readonly seconds: v.BigintSchema<undefined>;
159
159
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -90,7 +90,7 @@ declare const StatementExportSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
90
90
  }, number>]>;
91
91
  readonly assetId: v.NumberSchema<undefined>;
92
92
  readonly idempotencyKey: v.StringSchema<undefined>;
93
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "queued" | "processing" | "ready" | "failed" | "expired" | "canceled">]>;
93
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "processing" | "queued" | "expired" | "ready">]>;
94
94
  readonly completeThrough: v.SchemaWithPipe<readonly [v.ObjectSchema<{
95
95
  readonly seconds: v.BigintSchema<undefined>;
96
96
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -129,7 +129,7 @@ declare const StatementExportSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
129
129
  endTime: number;
130
130
  assetId: number;
131
131
  idempotencyKey: string;
132
- status: "unspecified" | "queued" | "processing" | "ready" | "failed" | "expired" | "canceled";
132
+ status: "unspecified" | "failed" | "canceled" | "processing" | "queued" | "expired" | "ready";
133
133
  completeThrough: number;
134
134
  movements: string;
135
135
  bytes: string;
@@ -148,7 +148,7 @@ declare const StatementExportSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
148
148
  /** Ledger asset ID the statement is limited to; 0 for every asset. */
149
149
  assetId: number;
150
150
  idempotencyKey: string;
151
- status: "unspecified" | "queued" | "processing" | "ready" | "failed" | "expired" | "canceled";
151
+ status: "unspecified" | "failed" | "canceled" | "processing" | "queued" | "expired" | "ready";
152
152
  /**
153
153
  * End of what the file covers, exclusive: the earlier of `endTime` and when the export
154
154
  * was created. Every movement recorded before both is in the file.
@@ -187,7 +187,7 @@ declare const ListStatementExportsResultSchema: v.ObjectSchema<{
187
187
  }, number>]>;
188
188
  readonly assetId: v.NumberSchema<undefined>;
189
189
  readonly idempotencyKey: v.StringSchema<undefined>;
190
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "queued" | "processing" | "ready" | "failed" | "expired" | "canceled">]>;
190
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "processing" | "queued" | "expired" | "ready">]>;
191
191
  readonly completeThrough: v.SchemaWithPipe<readonly [v.ObjectSchema<{
192
192
  readonly seconds: v.BigintSchema<undefined>;
193
193
  readonly nanos: v.OptionalSchema<v.NumberSchema<undefined>, 0>;
@@ -226,7 +226,7 @@ declare const ListStatementExportsResultSchema: v.ObjectSchema<{
226
226
  endTime: number;
227
227
  assetId: number;
228
228
  idempotencyKey: string;
229
- status: "unspecified" | "queued" | "processing" | "ready" | "failed" | "expired" | "canceled";
229
+ status: "unspecified" | "failed" | "canceled" | "processing" | "queued" | "expired" | "ready";
230
230
  completeThrough: number;
231
231
  movements: string;
232
232
  bytes: string;
@@ -245,7 +245,7 @@ declare const ListStatementExportsResultSchema: v.ObjectSchema<{
245
245
  /** Ledger asset ID the statement is limited to; 0 for every asset. */
246
246
  assetId: number;
247
247
  idempotencyKey: string;
248
- status: "unspecified" | "queued" | "processing" | "ready" | "failed" | "expired" | "canceled";
248
+ status: "unspecified" | "failed" | "canceled" | "processing" | "queued" | "expired" | "ready";
249
249
  /**
250
250
  * End of what the file covers, exclusive: the earlier of `endTime` and when the export
251
251
  * was created. Every movement recorded before both is in the file.
@@ -0,0 +1,8 @@
1
+ import { StrategiesService } from "./strategies.js";
2
+ import { PolyesterCore } from "../../core-client.js";
3
+ //#region src/services/strategies/service.d.ts
4
+ /** Returns the client's StrategiesService, creating it on first use. */
5
+ declare const strategiesService: (client: PolyesterCore) => StrategiesService;
6
+ //#endregion
7
+ export { strategiesService };
8
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","names":[],"sources":["../../../src/services/strategies/service.ts"],"mappings":";;;;cAIa,oBAAiB,QAAjB,kBAAiB"}
@@ -0,0 +1,9 @@
1
+ import { defineService } from "../../core-client.js";
2
+ import { StrategiesService } from "./strategies.js";
3
+ //#region src/services/strategies/service.ts
4
+ /** Returns the client's StrategiesService, creating it on first use. */
5
+ const strategiesService = defineService((context) => new StrategiesService(context.transports));
6
+ //#endregion
7
+ export { strategiesService };
8
+
9
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","names":[],"sources":["../../../src/services/strategies/service.ts"],"sourcesContent":["import { defineService } from \"../../core-client.js\";\nimport { StrategiesService } from \"./strategies.js\";\n\n/** Returns the client's StrategiesService, creating it on first use. */\nexport const strategiesService = defineService(\n (context) => new StrategiesService(context.transports),\n);\n"],"mappings":";;;;AAIA,MAAa,oBAAoB,eAC5B,YAAY,IAAI,kBAAkB,QAAQ,UAAU,CACzD"}
@@ -0,0 +1,15 @@
1
+ //#region src/services/strategies/strategies.codecs.d.ts
2
+ declare const STRATEGY_BACKTEST_STATUS_VALUES: readonly ["queued", "running", "done", "failed"];
3
+ type StrategyBacktestStatus = (typeof STRATEGY_BACKTEST_STATUS_VALUES)[number];
4
+ declare const STRATEGY_SCENARIO_OUTCOME_VALUES: readonly ["not_run", "passed", "failed"];
5
+ type StrategyScenarioOutcome = (typeof STRATEGY_SCENARIO_OUTCOME_VALUES)[number];
6
+ declare const STRATEGY_DEPLOY_STATE_VALUES: readonly ["proposed", "validating", "creating_subaccount", "funding", "deploying", "live", "failed", "expired"];
7
+ /** `live`, `failed` and `expired` are final. */
8
+ type StrategyDeployState = (typeof STRATEGY_DEPLOY_STATE_VALUES)[number];
9
+ declare const STRATEGY_BOT_STATUS_VALUES: readonly ["deploying", "running", "stopping", "stopped", "paused", "quarantined"];
10
+ type StrategyBotStatus = (typeof STRATEGY_BOT_STATUS_VALUES)[number];
11
+ declare const STRATEGY_BOT_LOG_KIND_VALUES: readonly ["log", "decision", "error"];
12
+ type StrategyBotLogKind = (typeof STRATEGY_BOT_LOG_KIND_VALUES)[number];
13
+ //#endregion
14
+ export { STRATEGY_BACKTEST_STATUS_VALUES, STRATEGY_BOT_LOG_KIND_VALUES, STRATEGY_BOT_STATUS_VALUES, STRATEGY_DEPLOY_STATE_VALUES, STRATEGY_SCENARIO_OUTCOME_VALUES, StrategyBacktestStatus, StrategyBotLogKind, StrategyBotStatus, StrategyDeployState, StrategyScenarioOutcome };
15
+ //# sourceMappingURL=strategies.codecs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategies.codecs.d.ts","names":[],"sources":["../../../src/services/strategies/strategies.codecs.ts"],"mappings":";cAGa;KACD,iCAAiC;cAYhC;KACD,kCAAkC;cAWjC;;KAWD,8BAA8B;cAgB7B;KAQD,4BAA4B;cAc3B;KACD,6BAA6B"}
@@ -0,0 +1,50 @@
1
+ import "../../gen/strategies/v1/strategies_pb.js";
2
+ //#region src/services/strategies/strategies.codecs.ts
3
+ const BacktestStatusCodec = { protoToOutput: {
4
+ [0]: "unspecified",
5
+ [1]: "queued",
6
+ [2]: "running",
7
+ [3]: "done",
8
+ [4]: "failed"
9
+ } };
10
+ const ScenarioOutcomeCodec = { protoToOutput: {
11
+ [0]: "unspecified",
12
+ [1]: "not_run",
13
+ [2]: "passed",
14
+ [3]: "failed"
15
+ } };
16
+ const DeployStateCodec = { protoToOutput: {
17
+ [0]: "unspecified",
18
+ [1]: "proposed",
19
+ [2]: "validating",
20
+ [3]: "creating_subaccount",
21
+ [4]: "funding",
22
+ [5]: "deploying",
23
+ [6]: "live",
24
+ [7]: "failed",
25
+ [8]: "expired"
26
+ } };
27
+ const BotStatusCodec = { protoToOutput: {
28
+ [0]: "unspecified",
29
+ [1]: "deploying",
30
+ [2]: "running",
31
+ [3]: "stopping",
32
+ [4]: "stopped",
33
+ [5]: "paused",
34
+ [6]: "quarantined"
35
+ } };
36
+ const BotLogKindCodec = { protoToOutput: {
37
+ [0]: "unspecified",
38
+ [1]: "log",
39
+ [2]: "decision",
40
+ [3]: "error"
41
+ } };
42
+ const StrategyOrderSideCodec = { protoToOutput: {
43
+ [0]: "unspecified",
44
+ [1]: "buy",
45
+ [2]: "sell"
46
+ } };
47
+ //#endregion
48
+ export { BacktestStatusCodec, BotLogKindCodec, BotStatusCodec, DeployStateCodec, ScenarioOutcomeCodec, StrategyOrderSideCodec };
49
+
50
+ //# sourceMappingURL=strategies.codecs.js.map