@coinbase/cdp-sdk 1.6.0 → 1.8.0

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 (257) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +284 -1
  3. package/_cjs/accounts/evm/toEvmServerAccount.js +4 -2
  4. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  5. package/_cjs/accounts/evm/toEvmSmartAccount.js +7 -0
  6. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  7. package/_cjs/accounts/evm/types.js.map +1 -0
  8. package/_cjs/accounts/solana/toSolanaAccount.js +42 -0
  9. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -0
  10. package/_cjs/accounts/solana/types.js +3 -0
  11. package/_cjs/accounts/solana/types.js.map +1 -0
  12. package/_cjs/actions/evm/getUserOperation.js +36 -0
  13. package/_cjs/actions/evm/getUserOperation.js.map +1 -0
  14. package/_cjs/actions/evm/transfer/accountTransferStrategy.js +11 -7
  15. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  16. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +9 -6
  17. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  18. package/_cjs/actions/evm/transfer/transfer.js +7 -3
  19. package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
  20. package/_cjs/actions/solana/requestFaucet.js +29 -0
  21. package/_cjs/actions/solana/requestFaucet.js.map +1 -0
  22. package/_cjs/actions/solana/signMessage.js +29 -0
  23. package/_cjs/actions/solana/signMessage.js.map +1 -0
  24. package/_cjs/actions/solana/signTransaction.js +46 -0
  25. package/_cjs/actions/solana/signTransaction.js.map +1 -0
  26. package/_cjs/actions/solana/types.js +3 -0
  27. package/_cjs/actions/solana/types.js.map +1 -0
  28. package/_cjs/analytics.js +68 -8
  29. package/_cjs/analytics.js.map +1 -1
  30. package/_cjs/client/cdp.js +9 -3
  31. package/_cjs/client/cdp.js.map +1 -1
  32. package/_cjs/client/evm/evm.js +135 -27
  33. package/_cjs/client/evm/evm.js.map +1 -1
  34. package/_cjs/client/policies/index.js +6 -0
  35. package/_cjs/client/policies/index.js.map +1 -0
  36. package/_cjs/client/policies/policies.js +232 -0
  37. package/_cjs/client/policies/policies.js.map +1 -0
  38. package/_cjs/client/policies/policies.types.js +3 -0
  39. package/_cjs/client/policies/policies.types.js.map +1 -0
  40. package/_cjs/client/solana/solana.js +84 -22
  41. package/_cjs/client/solana/solana.js.map +1 -1
  42. package/_cjs/index.js +4 -1
  43. package/_cjs/index.js.map +1 -1
  44. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +59 -1
  45. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  46. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js +27 -1
  47. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  48. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js +56 -1
  49. package/_cjs/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
  50. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +3 -1
  51. package/_cjs/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  52. package/_cjs/openapi-client/generated/index.msw.js +3 -2
  53. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  54. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js +56 -0
  55. package/_cjs/openapi-client/generated/policy-engine/policy-engine.js.map +1 -0
  56. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +284 -0
  57. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -0
  58. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js +14 -1
  59. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
  60. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js +42 -1
  61. package/_cjs/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -1
  62. package/_cjs/openapi-client/index.js +7 -1
  63. package/_cjs/openapi-client/index.js.map +1 -1
  64. package/_cjs/policies/schema.js +186 -0
  65. package/_cjs/policies/schema.js.map +1 -0
  66. package/_cjs/policies/types.js +3 -0
  67. package/_cjs/{accounts → policies}/types.js.map +1 -1
  68. package/_cjs/version.js +1 -1
  69. package/_esm/accounts/evm/toEvmServerAccount.js +4 -2
  70. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  71. package/_esm/accounts/evm/toEvmSmartAccount.js +7 -0
  72. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  73. package/_esm/accounts/evm/types.js.map +1 -0
  74. package/_esm/accounts/solana/toSolanaAccount.js +39 -0
  75. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -0
  76. package/_esm/accounts/solana/types.js +2 -0
  77. package/_esm/accounts/solana/types.js.map +1 -0
  78. package/_esm/actions/evm/getUserOperation.js +33 -0
  79. package/_esm/actions/evm/getUserOperation.js.map +1 -0
  80. package/_esm/actions/evm/transfer/accountTransferStrategy.js +11 -7
  81. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  82. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +9 -6
  83. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  84. package/_esm/actions/evm/transfer/transfer.js +7 -3
  85. package/_esm/actions/evm/transfer/transfer.js.map +1 -1
  86. package/_esm/actions/solana/requestFaucet.js +26 -0
  87. package/_esm/actions/solana/requestFaucet.js.map +1 -0
  88. package/_esm/actions/solana/signMessage.js +26 -0
  89. package/_esm/actions/solana/signMessage.js.map +1 -0
  90. package/_esm/actions/solana/signTransaction.js +43 -0
  91. package/_esm/actions/solana/signTransaction.js.map +1 -0
  92. package/_esm/actions/solana/types.js +2 -0
  93. package/_esm/actions/solana/types.js.map +1 -0
  94. package/_esm/analytics.js +68 -7
  95. package/_esm/analytics.js.map +1 -1
  96. package/_esm/client/cdp.js +10 -4
  97. package/_esm/client/cdp.js.map +1 -1
  98. package/_esm/client/evm/evm.js +135 -27
  99. package/_esm/client/evm/evm.js.map +1 -1
  100. package/_esm/client/policies/index.js +2 -0
  101. package/_esm/client/policies/index.js.map +1 -0
  102. package/_esm/client/policies/policies.js +228 -0
  103. package/_esm/client/policies/policies.js.map +1 -0
  104. package/_esm/client/policies/policies.types.js +2 -0
  105. package/_esm/client/policies/policies.types.js.map +1 -0
  106. package/_esm/client/solana/solana.js +84 -22
  107. package/_esm/client/solana/solana.js.map +1 -1
  108. package/_esm/index.js +1 -0
  109. package/_esm/index.js.map +1 -1
  110. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +58 -0
  111. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  112. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js +24 -0
  113. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.js.map +1 -1
  114. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js +51 -0
  115. package/_esm/openapi-client/generated/evm-accounts/evm-accounts.msw.js.map +1 -1
  116. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js +3 -1
  117. package/_esm/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.js.map +1 -1
  118. package/_esm/openapi-client/generated/index.msw.js +3 -2
  119. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  120. package/_esm/openapi-client/generated/policy-engine/policy-engine.js +48 -0
  121. package/_esm/openapi-client/generated/policy-engine/policy-engine.js.map +1 -0
  122. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +259 -0
  123. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -0
  124. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js +12 -0
  125. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.js.map +1 -1
  126. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js +39 -0
  127. package/_esm/openapi-client/generated/solana-accounts/solana-accounts.msw.js.map +1 -1
  128. package/_esm/openapi-client/index.js +6 -0
  129. package/_esm/openapi-client/index.js.map +1 -1
  130. package/_esm/policies/schema.js +183 -0
  131. package/_esm/policies/schema.js.map +1 -0
  132. package/_esm/policies/types.js +2 -0
  133. package/_esm/{accounts → policies}/types.js.map +1 -1
  134. package/_esm/version.js +1 -1
  135. package/_types/accounts/evm/toEvmServerAccount.d.ts +1 -1
  136. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  137. package/_types/accounts/evm/toEvmSmartAccount.d.ts +1 -1
  138. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  139. package/_types/accounts/{types.d.ts → evm/types.d.ts} +10 -7
  140. package/_types/accounts/evm/types.d.ts.map +1 -0
  141. package/_types/accounts/solana/toSolanaAccount.d.ts +20 -0
  142. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -0
  143. package/_types/accounts/solana/types.d.ts +12 -0
  144. package/_types/accounts/solana/types.d.ts.map +1 -0
  145. package/_types/actions/evm/getUserOperation.d.ts +22 -0
  146. package/_types/actions/evm/getUserOperation.d.ts.map +1 -0
  147. package/_types/actions/evm/sendUserOperation.d.ts +1 -1
  148. package/_types/actions/evm/sendUserOperation.d.ts.map +1 -1
  149. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +1 -1
  150. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
  151. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +1 -1
  152. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
  153. package/_types/actions/evm/transfer/transfer.d.ts +3 -3
  154. package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
  155. package/_types/actions/evm/transfer/types.d.ts +39 -6
  156. package/_types/actions/evm/transfer/types.d.ts.map +1 -1
  157. package/_types/actions/evm/types.d.ts +28 -5
  158. package/_types/actions/evm/types.d.ts.map +1 -1
  159. package/_types/actions/solana/requestFaucet.d.ts +23 -0
  160. package/_types/actions/solana/requestFaucet.d.ts.map +1 -0
  161. package/_types/actions/solana/signMessage.d.ts +23 -0
  162. package/_types/actions/solana/signMessage.d.ts.map +1 -0
  163. package/_types/actions/solana/signTransaction.d.ts +38 -0
  164. package/_types/actions/solana/signTransaction.d.ts.map +1 -0
  165. package/_types/actions/solana/types.d.ts +80 -0
  166. package/_types/actions/solana/types.d.ts.map +1 -0
  167. package/_types/analytics.d.ts +14 -5
  168. package/_types/analytics.d.ts.map +1 -1
  169. package/_types/client/cdp.d.ts +3 -0
  170. package/_types/client/cdp.d.ts.map +1 -1
  171. package/_types/client/evm/evm.d.ts +89 -1
  172. package/_types/client/evm/evm.d.ts.map +1 -1
  173. package/_types/client/evm/evm.types.d.ts +36 -6
  174. package/_types/client/evm/evm.types.d.ts.map +1 -1
  175. package/_types/client/policies/index.d.ts +2 -0
  176. package/_types/client/policies/index.d.ts.map +1 -0
  177. package/_types/client/policies/policies.d.ts +216 -0
  178. package/_types/client/policies/policies.d.ts.map +1 -0
  179. package/_types/client/policies/policies.types.d.ts +96 -0
  180. package/_types/client/policies/policies.types.d.ts.map +1 -0
  181. package/_types/client/solana/solana.d.ts +47 -4
  182. package/_types/client/solana/solana.d.ts.map +1 -1
  183. package/_types/client/solana/solana.types.d.ts +21 -12
  184. package/_types/client/solana/solana.types.d.ts.map +1 -1
  185. package/_types/index.d.ts +3 -1
  186. package/_types/index.d.ts.map +1 -1
  187. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +299 -0
  188. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  189. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts +13 -1
  190. package/_types/openapi-client/generated/evm-accounts/evm-accounts.d.ts.map +1 -1
  191. package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts +5 -1
  192. package/_types/openapi-client/generated/evm-accounts/evm-accounts.msw.d.ts.map +1 -1
  193. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts +3 -1
  194. package/_types/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.d.ts.map +1 -1
  195. package/_types/openapi-client/generated/index.msw.d.ts +3 -2
  196. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  197. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts +43 -0
  198. package/_types/openapi-client/generated/policy-engine/policy-engine.d.ts.map +1 -0
  199. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +25 -0
  200. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -0
  201. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts +7 -1
  202. package/_types/openapi-client/generated/solana-accounts/solana-accounts.d.ts.map +1 -1
  203. package/_types/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts +2 -0
  204. package/_types/openapi-client/generated/solana-accounts/solana-accounts.msw.d.ts.map +1 -1
  205. package/_types/openapi-client/index.d.ts +19 -0
  206. package/_types/openapi-client/index.d.ts.map +1 -1
  207. package/_types/policies/schema.d.ts +922 -0
  208. package/_types/policies/schema.d.ts.map +1 -0
  209. package/_types/policies/types.d.ts +19 -0
  210. package/_types/policies/types.d.ts.map +1 -0
  211. package/_types/types/misc.d.ts +39 -0
  212. package/_types/types/misc.d.ts.map +1 -1
  213. package/_types/version.d.ts +1 -1
  214. package/accounts/evm/toEvmServerAccount.ts +7 -4
  215. package/accounts/evm/toEvmSmartAccount.ts +11 -1
  216. package/accounts/{types.ts → evm/types.ts} +10 -12
  217. package/accounts/solana/toSolanaAccount.ts +60 -0
  218. package/accounts/solana/types.ts +13 -0
  219. package/actions/evm/getUserOperation.ts +40 -0
  220. package/actions/evm/sendUserOperation.ts +1 -1
  221. package/actions/evm/transfer/accountTransferStrategy.ts +12 -8
  222. package/actions/evm/transfer/smartAccountTransferStrategy.ts +10 -7
  223. package/actions/evm/transfer/transfer.ts +17 -6
  224. package/actions/evm/transfer/types.ts +54 -11
  225. package/actions/evm/types.ts +37 -5
  226. package/actions/solana/requestFaucet.ts +35 -0
  227. package/actions/solana/signMessage.ts +36 -0
  228. package/actions/solana/signTransaction.ts +53 -0
  229. package/actions/solana/types.ts +87 -0
  230. package/analytics.ts +84 -11
  231. package/client/cdp.ts +11 -4
  232. package/client/evm/evm.ts +162 -33
  233. package/client/evm/evm.types.ts +42 -4
  234. package/client/policies/index.ts +1 -0
  235. package/client/policies/policies.ts +246 -0
  236. package/client/policies/policies.types.ts +109 -0
  237. package/client/solana/solana.ts +107 -38
  238. package/client/solana/solana.types.ts +25 -15
  239. package/index.ts +8 -1
  240. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +360 -0
  241. package/openapi-client/generated/evm-accounts/evm-accounts.msw.ts +102 -0
  242. package/openapi-client/generated/evm-accounts/evm-accounts.ts +43 -0
  243. package/openapi-client/generated/evm-smart-accounts/evm-smart-accounts.ts +3 -1
  244. package/openapi-client/generated/index.msw.ts +3 -2
  245. package/openapi-client/generated/policy-engine/policy-engine.msw.ts +404 -0
  246. package/openapi-client/generated/policy-engine/policy-engine.ts +95 -0
  247. package/openapi-client/generated/solana-accounts/solana-accounts.msw.ts +75 -0
  248. package/openapi-client/generated/solana-accounts/solana-accounts.ts +23 -0
  249. package/openapi-client/index.ts +7 -0
  250. package/package.json +3 -2
  251. package/policies/schema.ts +266 -0
  252. package/policies/types.ts +19 -0
  253. package/types/misc.ts +41 -0
  254. package/version.ts +1 -1
  255. package/_types/accounts/types.d.ts.map +0 -1
  256. /package/_cjs/accounts/{types.js → evm/types.js} +0 -0
  257. /package/_esm/accounts/{types.js → evm/types.js} +0 -0
@@ -0,0 +1,922 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Enum for EthValueOperator values
4
+ */
5
+ export declare const EthValueOperatorEnum: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
6
+ /**
7
+ * Type representing the operators that can be used for ETH value comparisons.
8
+ * These operators determine how transaction values are compared against thresholds.
9
+ */
10
+ export type EthValueOperator = z.infer<typeof EthValueOperatorEnum>;
11
+ /**
12
+ * Enum for EvmAddressOperator values
13
+ */
14
+ export declare const EvmAddressOperatorEnum: z.ZodEnum<["in", "not in"]>;
15
+ /**
16
+ * Type representing the operators that can be used for EVM address comparisons.
17
+ * These operators determine how transaction recipient addresses are evaluated against a list.
18
+ */
19
+ export type EvmAddressOperator = z.infer<typeof EvmAddressOperatorEnum>;
20
+ /**
21
+ * Enum for SolAddressOperator values
22
+ */
23
+ export declare const SolAddressOperatorEnum: z.ZodEnum<["in", "not in"]>;
24
+ /**
25
+ * Type representing the operators that can be used for Solana address comparisons.
26
+ * These operators determine how transaction addresses are evaluated against a list.
27
+ */
28
+ export type SolAddressOperator = z.infer<typeof SolAddressOperatorEnum>;
29
+ /**
30
+ * Schema for ETH value criterions
31
+ */
32
+ export declare const EthValueCriterionSchema: z.ZodObject<{
33
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
34
+ type: z.ZodLiteral<"ethValue">;
35
+ /**
36
+ * The ETH value amount in wei to compare against, as a string.
37
+ * Must contain only digits.
38
+ */
39
+ ethValue: z.ZodString;
40
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
41
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ ethValue: string;
44
+ type: "ethValue";
45
+ operator: ">" | ">=" | "<" | "<=" | "==";
46
+ }, {
47
+ ethValue: string;
48
+ type: "ethValue";
49
+ operator: ">" | ">=" | "<" | "<=" | "==";
50
+ }>;
51
+ export type EthValueCriterion = z.infer<typeof EthValueCriterionSchema>;
52
+ /**
53
+ * Schema for EVM address criterions
54
+ */
55
+ export declare const EvmAddressCriterionSchema: z.ZodObject<{
56
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
57
+ type: z.ZodLiteral<"evmAddress">;
58
+ /**
59
+ * Array of EVM addresses to compare against.
60
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
61
+ * Limited to a maximum of 100 addresses per criterion.
62
+ */
63
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
64
+ /**
65
+ * The operator to use for evaluating transaction addresses.
66
+ * "in" checks if an address is in the provided list.
67
+ * "not in" checks if an address is not in the provided list.
68
+ */
69
+ operator: z.ZodEnum<["in", "not in"]>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ type: "evmAddress";
72
+ operator: "in" | "not in";
73
+ addresses: `0x${string}`[];
74
+ }, {
75
+ type: "evmAddress";
76
+ operator: "in" | "not in";
77
+ addresses: string[];
78
+ }>;
79
+ export type EvmAddressCriterion = z.infer<typeof EvmAddressCriterionSchema>;
80
+ /**
81
+ * Schema for Solana address criterions
82
+ */
83
+ export declare const SolAddressCriterionSchema: z.ZodObject<{
84
+ /** The type of criterion, must be "solAddress" for Solana address-based rules. */
85
+ type: z.ZodLiteral<"solAddress">;
86
+ /**
87
+ * Array of Solana addresses to compare against.
88
+ * Each address must be a valid Base58-encoded Solana address (32-44 characters).
89
+ */
90
+ addresses: z.ZodArray<z.ZodString, "many">;
91
+ /**
92
+ * The operator to use for evaluating transaction addresses.
93
+ * "in" checks if an address is in the provided list.
94
+ * "not in" checks if an address is not in the provided list.
95
+ */
96
+ operator: z.ZodEnum<["in", "not in"]>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ type: "solAddress";
99
+ operator: "in" | "not in";
100
+ addresses: string[];
101
+ }, {
102
+ type: "solAddress";
103
+ operator: "in" | "not in";
104
+ addresses: string[];
105
+ }>;
106
+ export type SolAddressCriterion = z.infer<typeof SolAddressCriterionSchema>;
107
+ /**
108
+ * Schema for criteria used in SignEvmTransaction operations
109
+ */
110
+ export declare const SignEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
111
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
112
+ type: z.ZodLiteral<"ethValue">;
113
+ /**
114
+ * The ETH value amount in wei to compare against, as a string.
115
+ * Must contain only digits.
116
+ */
117
+ ethValue: z.ZodString;
118
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
119
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ ethValue: string;
122
+ type: "ethValue";
123
+ operator: ">" | ">=" | "<" | "<=" | "==";
124
+ }, {
125
+ ethValue: string;
126
+ type: "ethValue";
127
+ operator: ">" | ">=" | "<" | "<=" | "==";
128
+ }>, z.ZodObject<{
129
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
130
+ type: z.ZodLiteral<"evmAddress">;
131
+ /**
132
+ * Array of EVM addresses to compare against.
133
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
134
+ * Limited to a maximum of 100 addresses per criterion.
135
+ */
136
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
137
+ /**
138
+ * The operator to use for evaluating transaction addresses.
139
+ * "in" checks if an address is in the provided list.
140
+ * "not in" checks if an address is not in the provided list.
141
+ */
142
+ operator: z.ZodEnum<["in", "not in"]>;
143
+ }, "strip", z.ZodTypeAny, {
144
+ type: "evmAddress";
145
+ operator: "in" | "not in";
146
+ addresses: `0x${string}`[];
147
+ }, {
148
+ type: "evmAddress";
149
+ operator: "in" | "not in";
150
+ addresses: string[];
151
+ }>]>, "many">;
152
+ /**
153
+ * Type representing a set of criteria for the signEvmTransaction operation.
154
+ * Can contain up to 10 individual criterion objects of ETH value or EVM address types.
155
+ */
156
+ export type SignEvmTransactionCriteria = z.infer<typeof SignEvmTransactionCriteriaSchema>;
157
+ /**
158
+ * Schema for criteria used in SignSolTransaction operations
159
+ */
160
+ export declare const SignSolTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
161
+ /** The type of criterion, must be "solAddress" for Solana address-based rules. */
162
+ type: z.ZodLiteral<"solAddress">;
163
+ /**
164
+ * Array of Solana addresses to compare against.
165
+ * Each address must be a valid Base58-encoded Solana address (32-44 characters).
166
+ */
167
+ addresses: z.ZodArray<z.ZodString, "many">;
168
+ /**
169
+ * The operator to use for evaluating transaction addresses.
170
+ * "in" checks if an address is in the provided list.
171
+ * "not in" checks if an address is not in the provided list.
172
+ */
173
+ operator: z.ZodEnum<["in", "not in"]>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ type: "solAddress";
176
+ operator: "in" | "not in";
177
+ addresses: string[];
178
+ }, {
179
+ type: "solAddress";
180
+ operator: "in" | "not in";
181
+ addresses: string[];
182
+ }>]>, "many">;
183
+ /**
184
+ * Type representing a set of criteria for the signSolTransaction operation.
185
+ * Can contain up to 10 individual Solana address criterion objects.
186
+ */
187
+ export type SignSolTransactionCriteria = z.infer<typeof SignSolTransactionCriteriaSchema>;
188
+ /**
189
+ * Enum for Solana Operation types
190
+ */
191
+ export declare const SolOperationEnum: z.ZodEnum<["signSolTransaction"]>;
192
+ /**
193
+ * Type representing the operations that can be governed by a policy.
194
+ * Defines what Solana operations the policy applies to.
195
+ */
196
+ export type SolOperation = z.infer<typeof SolOperationEnum>;
197
+ /**
198
+ * Enum for Evm Operation types
199
+ */
200
+ export declare const EvmOperationEnum: z.ZodEnum<["signEvmTransaction"]>;
201
+ /**
202
+ * Type representing the operations that can be governed by a policy.
203
+ * Defines what EVM operations the policy applies to.
204
+ */
205
+ export type EvmOperation = z.infer<typeof EvmOperationEnum>;
206
+ /**
207
+ * Enum for Action types
208
+ */
209
+ export declare const ActionEnum: z.ZodEnum<["reject", "accept"]>;
210
+ /**
211
+ * Type representing the possible policy actions.
212
+ * Determines whether matching the rule will cause a request to be accepted or rejected.
213
+ */
214
+ export type Action = z.infer<typeof ActionEnum>;
215
+ /**
216
+ * Type representing a 'signEvmTransaction' policy rule that can accept or reject specific operations
217
+ * based on a set of criteria.
218
+ */
219
+ export declare const SignEvmTransactionRuleSchema: z.ZodObject<{
220
+ /**
221
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
222
+ * "accept" will allow the transaction, "reject" will block it.
223
+ */
224
+ action: z.ZodEnum<["reject", "accept"]>;
225
+ /**
226
+ * The operation to which this rule applies.
227
+ * Must be "signEvmTransaction".
228
+ */
229
+ operation: z.ZodLiteral<"signEvmTransaction">;
230
+ /**
231
+ * The set of criteria that must be matched for this rule to apply.
232
+ * Must be compatible with the specified operation type.
233
+ */
234
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
235
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
236
+ type: z.ZodLiteral<"ethValue">;
237
+ /**
238
+ * The ETH value amount in wei to compare against, as a string.
239
+ * Must contain only digits.
240
+ */
241
+ ethValue: z.ZodString;
242
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
243
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
244
+ }, "strip", z.ZodTypeAny, {
245
+ ethValue: string;
246
+ type: "ethValue";
247
+ operator: ">" | ">=" | "<" | "<=" | "==";
248
+ }, {
249
+ ethValue: string;
250
+ type: "ethValue";
251
+ operator: ">" | ">=" | "<" | "<=" | "==";
252
+ }>, z.ZodObject<{
253
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
254
+ type: z.ZodLiteral<"evmAddress">;
255
+ /**
256
+ * Array of EVM addresses to compare against.
257
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
258
+ * Limited to a maximum of 100 addresses per criterion.
259
+ */
260
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
261
+ /**
262
+ * The operator to use for evaluating transaction addresses.
263
+ * "in" checks if an address is in the provided list.
264
+ * "not in" checks if an address is not in the provided list.
265
+ */
266
+ operator: z.ZodEnum<["in", "not in"]>;
267
+ }, "strip", z.ZodTypeAny, {
268
+ type: "evmAddress";
269
+ operator: "in" | "not in";
270
+ addresses: `0x${string}`[];
271
+ }, {
272
+ type: "evmAddress";
273
+ operator: "in" | "not in";
274
+ addresses: string[];
275
+ }>]>, "many">;
276
+ }, "strip", z.ZodTypeAny, {
277
+ action: "reject" | "accept";
278
+ operation: "signEvmTransaction";
279
+ criteria: ({
280
+ ethValue: string;
281
+ type: "ethValue";
282
+ operator: ">" | ">=" | "<" | "<=" | "==";
283
+ } | {
284
+ type: "evmAddress";
285
+ operator: "in" | "not in";
286
+ addresses: `0x${string}`[];
287
+ })[];
288
+ }, {
289
+ action: "reject" | "accept";
290
+ operation: "signEvmTransaction";
291
+ criteria: ({
292
+ ethValue: string;
293
+ type: "ethValue";
294
+ operator: ">" | ">=" | "<" | "<=" | "==";
295
+ } | {
296
+ type: "evmAddress";
297
+ operator: "in" | "not in";
298
+ addresses: string[];
299
+ })[];
300
+ }>;
301
+ export type SignEvmTransactionRule = z.infer<typeof SignEvmTransactionRuleSchema>;
302
+ /**
303
+ * Type representing a 'signSolTransaction' policy rule that can accept or reject specific operations
304
+ * based on a set of criteria.
305
+ */
306
+ export declare const SignSolTransactionRuleSchema: z.ZodObject<{
307
+ /**
308
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
309
+ * "accept" will allow the transaction, "reject" will block it.
310
+ */
311
+ action: z.ZodEnum<["reject", "accept"]>;
312
+ /**
313
+ * The operation to which this rule applies.
314
+ * Must be "signSolTransaction".
315
+ */
316
+ operation: z.ZodLiteral<"signSolTransaction">;
317
+ /**
318
+ * The set of criteria that must be matched for this rule to apply.
319
+ * Must be compatible with the specified operation type.
320
+ */
321
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
322
+ /** The type of criterion, must be "solAddress" for Solana address-based rules. */
323
+ type: z.ZodLiteral<"solAddress">;
324
+ /**
325
+ * Array of Solana addresses to compare against.
326
+ * Each address must be a valid Base58-encoded Solana address (32-44 characters).
327
+ */
328
+ addresses: z.ZodArray<z.ZodString, "many">;
329
+ /**
330
+ * The operator to use for evaluating transaction addresses.
331
+ * "in" checks if an address is in the provided list.
332
+ * "not in" checks if an address is not in the provided list.
333
+ */
334
+ operator: z.ZodEnum<["in", "not in"]>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ type: "solAddress";
337
+ operator: "in" | "not in";
338
+ addresses: string[];
339
+ }, {
340
+ type: "solAddress";
341
+ operator: "in" | "not in";
342
+ addresses: string[];
343
+ }>]>, "many">;
344
+ }, "strip", z.ZodTypeAny, {
345
+ action: "reject" | "accept";
346
+ operation: "signSolTransaction";
347
+ criteria: {
348
+ type: "solAddress";
349
+ operator: "in" | "not in";
350
+ addresses: string[];
351
+ }[];
352
+ }, {
353
+ action: "reject" | "accept";
354
+ operation: "signSolTransaction";
355
+ criteria: {
356
+ type: "solAddress";
357
+ operator: "in" | "not in";
358
+ addresses: string[];
359
+ }[];
360
+ }>;
361
+ export type SignSolTransactionRule = z.infer<typeof SignSolTransactionRuleSchema>;
362
+ /**
363
+ * Schema for policy rules
364
+ */
365
+ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
366
+ /**
367
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
368
+ * "accept" will allow the transaction, "reject" will block it.
369
+ */
370
+ action: z.ZodEnum<["reject", "accept"]>;
371
+ /**
372
+ * The operation to which this rule applies.
373
+ * Must be "signEvmTransaction".
374
+ */
375
+ operation: z.ZodLiteral<"signEvmTransaction">;
376
+ /**
377
+ * The set of criteria that must be matched for this rule to apply.
378
+ * Must be compatible with the specified operation type.
379
+ */
380
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
381
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
382
+ type: z.ZodLiteral<"ethValue">;
383
+ /**
384
+ * The ETH value amount in wei to compare against, as a string.
385
+ * Must contain only digits.
386
+ */
387
+ ethValue: z.ZodString;
388
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
389
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ ethValue: string;
392
+ type: "ethValue";
393
+ operator: ">" | ">=" | "<" | "<=" | "==";
394
+ }, {
395
+ ethValue: string;
396
+ type: "ethValue";
397
+ operator: ">" | ">=" | "<" | "<=" | "==";
398
+ }>, z.ZodObject<{
399
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
400
+ type: z.ZodLiteral<"evmAddress">;
401
+ /**
402
+ * Array of EVM addresses to compare against.
403
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
404
+ * Limited to a maximum of 100 addresses per criterion.
405
+ */
406
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
407
+ /**
408
+ * The operator to use for evaluating transaction addresses.
409
+ * "in" checks if an address is in the provided list.
410
+ * "not in" checks if an address is not in the provided list.
411
+ */
412
+ operator: z.ZodEnum<["in", "not in"]>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ type: "evmAddress";
415
+ operator: "in" | "not in";
416
+ addresses: `0x${string}`[];
417
+ }, {
418
+ type: "evmAddress";
419
+ operator: "in" | "not in";
420
+ addresses: string[];
421
+ }>]>, "many">;
422
+ }, "strip", z.ZodTypeAny, {
423
+ action: "reject" | "accept";
424
+ operation: "signEvmTransaction";
425
+ criteria: ({
426
+ ethValue: string;
427
+ type: "ethValue";
428
+ operator: ">" | ">=" | "<" | "<=" | "==";
429
+ } | {
430
+ type: "evmAddress";
431
+ operator: "in" | "not in";
432
+ addresses: `0x${string}`[];
433
+ })[];
434
+ }, {
435
+ action: "reject" | "accept";
436
+ operation: "signEvmTransaction";
437
+ criteria: ({
438
+ ethValue: string;
439
+ type: "ethValue";
440
+ operator: ">" | ">=" | "<" | "<=" | "==";
441
+ } | {
442
+ type: "evmAddress";
443
+ operator: "in" | "not in";
444
+ addresses: string[];
445
+ })[];
446
+ }>, z.ZodObject<{
447
+ /**
448
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
449
+ * "accept" will allow the transaction, "reject" will block it.
450
+ */
451
+ action: z.ZodEnum<["reject", "accept"]>;
452
+ /**
453
+ * The operation to which this rule applies.
454
+ * Must be "signSolTransaction".
455
+ */
456
+ operation: z.ZodLiteral<"signSolTransaction">;
457
+ /**
458
+ * The set of criteria that must be matched for this rule to apply.
459
+ * Must be compatible with the specified operation type.
460
+ */
461
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
462
+ /** The type of criterion, must be "solAddress" for Solana address-based rules. */
463
+ type: z.ZodLiteral<"solAddress">;
464
+ /**
465
+ * Array of Solana addresses to compare against.
466
+ * Each address must be a valid Base58-encoded Solana address (32-44 characters).
467
+ */
468
+ addresses: z.ZodArray<z.ZodString, "many">;
469
+ /**
470
+ * The operator to use for evaluating transaction addresses.
471
+ * "in" checks if an address is in the provided list.
472
+ * "not in" checks if an address is not in the provided list.
473
+ */
474
+ operator: z.ZodEnum<["in", "not in"]>;
475
+ }, "strip", z.ZodTypeAny, {
476
+ type: "solAddress";
477
+ operator: "in" | "not in";
478
+ addresses: string[];
479
+ }, {
480
+ type: "solAddress";
481
+ operator: "in" | "not in";
482
+ addresses: string[];
483
+ }>]>, "many">;
484
+ }, "strip", z.ZodTypeAny, {
485
+ action: "reject" | "accept";
486
+ operation: "signSolTransaction";
487
+ criteria: {
488
+ type: "solAddress";
489
+ operator: "in" | "not in";
490
+ addresses: string[];
491
+ }[];
492
+ }, {
493
+ action: "reject" | "accept";
494
+ operation: "signSolTransaction";
495
+ criteria: {
496
+ type: "solAddress";
497
+ operator: "in" | "not in";
498
+ addresses: string[];
499
+ }[];
500
+ }>]>;
501
+ /**
502
+ * Type representing a policy rule that can accept or reject specific operations
503
+ * based on a set of criteria.
504
+ */
505
+ export type Rule = z.infer<typeof RuleSchema>;
506
+ /**
507
+ * Enum for policy scopes
508
+ */
509
+ export declare const PolicyScopeEnum: z.ZodEnum<["project", "account"]>;
510
+ /**
511
+ * Type representing the scope of a policy.
512
+ * Determines whether the policy applies at the project level or account level.
513
+ */
514
+ export type PolicyScope = z.infer<typeof PolicyScopeEnum>;
515
+ /**
516
+ * Schema for creating or updating a Policy.
517
+ */
518
+ export declare const CreatePolicyBodySchema: z.ZodObject<{
519
+ /**
520
+ * The scope of the policy.
521
+ * "project" applies to the entire project, "account" applies to specific accounts.
522
+ */
523
+ scope: z.ZodEnum<["project", "account"]>;
524
+ /**
525
+ * An optional human-readable description for the policy.
526
+ * Limited to 50 characters of alphanumeric characters, spaces, commas, and periods.
527
+ */
528
+ description: z.ZodOptional<z.ZodString>;
529
+ /**
530
+ * Array of rules that comprise the policy.
531
+ * Limited to a maximum of 10 rules per policy.
532
+ */
533
+ rules: z.ZodArray<z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
534
+ /**
535
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
536
+ * "accept" will allow the transaction, "reject" will block it.
537
+ */
538
+ action: z.ZodEnum<["reject", "accept"]>;
539
+ /**
540
+ * The operation to which this rule applies.
541
+ * Must be "signEvmTransaction".
542
+ */
543
+ operation: z.ZodLiteral<"signEvmTransaction">;
544
+ /**
545
+ * The set of criteria that must be matched for this rule to apply.
546
+ * Must be compatible with the specified operation type.
547
+ */
548
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
549
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
550
+ type: z.ZodLiteral<"ethValue">;
551
+ /**
552
+ * The ETH value amount in wei to compare against, as a string.
553
+ * Must contain only digits.
554
+ */
555
+ ethValue: z.ZodString;
556
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
557
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
558
+ }, "strip", z.ZodTypeAny, {
559
+ ethValue: string;
560
+ type: "ethValue";
561
+ operator: ">" | ">=" | "<" | "<=" | "==";
562
+ }, {
563
+ ethValue: string;
564
+ type: "ethValue";
565
+ operator: ">" | ">=" | "<" | "<=" | "==";
566
+ }>, z.ZodObject<{
567
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
568
+ type: z.ZodLiteral<"evmAddress">;
569
+ /**
570
+ * Array of EVM addresses to compare against.
571
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
572
+ * Limited to a maximum of 100 addresses per criterion.
573
+ */
574
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
575
+ /**
576
+ * The operator to use for evaluating transaction addresses.
577
+ * "in" checks if an address is in the provided list.
578
+ * "not in" checks if an address is not in the provided list.
579
+ */
580
+ operator: z.ZodEnum<["in", "not in"]>;
581
+ }, "strip", z.ZodTypeAny, {
582
+ type: "evmAddress";
583
+ operator: "in" | "not in";
584
+ addresses: `0x${string}`[];
585
+ }, {
586
+ type: "evmAddress";
587
+ operator: "in" | "not in";
588
+ addresses: string[];
589
+ }>]>, "many">;
590
+ }, "strip", z.ZodTypeAny, {
591
+ action: "reject" | "accept";
592
+ operation: "signEvmTransaction";
593
+ criteria: ({
594
+ ethValue: string;
595
+ type: "ethValue";
596
+ operator: ">" | ">=" | "<" | "<=" | "==";
597
+ } | {
598
+ type: "evmAddress";
599
+ operator: "in" | "not in";
600
+ addresses: `0x${string}`[];
601
+ })[];
602
+ }, {
603
+ action: "reject" | "accept";
604
+ operation: "signEvmTransaction";
605
+ criteria: ({
606
+ ethValue: string;
607
+ type: "ethValue";
608
+ operator: ">" | ">=" | "<" | "<=" | "==";
609
+ } | {
610
+ type: "evmAddress";
611
+ operator: "in" | "not in";
612
+ addresses: string[];
613
+ })[];
614
+ }>, z.ZodObject<{
615
+ /**
616
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
617
+ * "accept" will allow the transaction, "reject" will block it.
618
+ */
619
+ action: z.ZodEnum<["reject", "accept"]>;
620
+ /**
621
+ * The operation to which this rule applies.
622
+ * Must be "signSolTransaction".
623
+ */
624
+ operation: z.ZodLiteral<"signSolTransaction">;
625
+ /**
626
+ * The set of criteria that must be matched for this rule to apply.
627
+ * Must be compatible with the specified operation type.
628
+ */
629
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
630
+ /** The type of criterion, must be "solAddress" for Solana address-based rules. */
631
+ type: z.ZodLiteral<"solAddress">;
632
+ /**
633
+ * Array of Solana addresses to compare against.
634
+ * Each address must be a valid Base58-encoded Solana address (32-44 characters).
635
+ */
636
+ addresses: z.ZodArray<z.ZodString, "many">;
637
+ /**
638
+ * The operator to use for evaluating transaction addresses.
639
+ * "in" checks if an address is in the provided list.
640
+ * "not in" checks if an address is not in the provided list.
641
+ */
642
+ operator: z.ZodEnum<["in", "not in"]>;
643
+ }, "strip", z.ZodTypeAny, {
644
+ type: "solAddress";
645
+ operator: "in" | "not in";
646
+ addresses: string[];
647
+ }, {
648
+ type: "solAddress";
649
+ operator: "in" | "not in";
650
+ addresses: string[];
651
+ }>]>, "many">;
652
+ }, "strip", z.ZodTypeAny, {
653
+ action: "reject" | "accept";
654
+ operation: "signSolTransaction";
655
+ criteria: {
656
+ type: "solAddress";
657
+ operator: "in" | "not in";
658
+ addresses: string[];
659
+ }[];
660
+ }, {
661
+ action: "reject" | "accept";
662
+ operation: "signSolTransaction";
663
+ criteria: {
664
+ type: "solAddress";
665
+ operator: "in" | "not in";
666
+ addresses: string[];
667
+ }[];
668
+ }>]>, "many">;
669
+ }, "strip", z.ZodTypeAny, {
670
+ scope: "project" | "account";
671
+ rules: ({
672
+ action: "reject" | "accept";
673
+ operation: "signEvmTransaction";
674
+ criteria: ({
675
+ ethValue: string;
676
+ type: "ethValue";
677
+ operator: ">" | ">=" | "<" | "<=" | "==";
678
+ } | {
679
+ type: "evmAddress";
680
+ operator: "in" | "not in";
681
+ addresses: `0x${string}`[];
682
+ })[];
683
+ } | {
684
+ action: "reject" | "accept";
685
+ operation: "signSolTransaction";
686
+ criteria: {
687
+ type: "solAddress";
688
+ operator: "in" | "not in";
689
+ addresses: string[];
690
+ }[];
691
+ })[];
692
+ description?: string | undefined;
693
+ }, {
694
+ scope: "project" | "account";
695
+ rules: ({
696
+ action: "reject" | "accept";
697
+ operation: "signEvmTransaction";
698
+ criteria: ({
699
+ ethValue: string;
700
+ type: "ethValue";
701
+ operator: ">" | ">=" | "<" | "<=" | "==";
702
+ } | {
703
+ type: "evmAddress";
704
+ operator: "in" | "not in";
705
+ addresses: string[];
706
+ })[];
707
+ } | {
708
+ action: "reject" | "accept";
709
+ operation: "signSolTransaction";
710
+ criteria: {
711
+ type: "solAddress";
712
+ operator: "in" | "not in";
713
+ addresses: string[];
714
+ }[];
715
+ })[];
716
+ description?: string | undefined;
717
+ }>;
718
+ /**
719
+ * Type representing the request body for creating a new policy.
720
+ * Contains the scope, optional description, and rules for the policy.
721
+ */
722
+ export type CreatePolicyBody = z.infer<typeof CreatePolicyBodySchema>;
723
+ export declare const UpdatePolicyBodySchema: z.ZodObject<{
724
+ /**
725
+ * An optional human-readable description for the policy.
726
+ * Limited to 50 characters of alphanumeric characters, spaces, commas, and periods.
727
+ */
728
+ description: z.ZodOptional<z.ZodString>;
729
+ /**
730
+ * Array of rules that comprise the policy.
731
+ * Limited to a maximum of 10 rules per policy.
732
+ */
733
+ rules: z.ZodArray<z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{
734
+ /**
735
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
736
+ * "accept" will allow the transaction, "reject" will block it.
737
+ */
738
+ action: z.ZodEnum<["reject", "accept"]>;
739
+ /**
740
+ * The operation to which this rule applies.
741
+ * Must be "signEvmTransaction".
742
+ */
743
+ operation: z.ZodLiteral<"signEvmTransaction">;
744
+ /**
745
+ * The set of criteria that must be matched for this rule to apply.
746
+ * Must be compatible with the specified operation type.
747
+ */
748
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
749
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
750
+ type: z.ZodLiteral<"ethValue">;
751
+ /**
752
+ * The ETH value amount in wei to compare against, as a string.
753
+ * Must contain only digits.
754
+ */
755
+ ethValue: z.ZodString;
756
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
757
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
758
+ }, "strip", z.ZodTypeAny, {
759
+ ethValue: string;
760
+ type: "ethValue";
761
+ operator: ">" | ">=" | "<" | "<=" | "==";
762
+ }, {
763
+ ethValue: string;
764
+ type: "ethValue";
765
+ operator: ">" | ">=" | "<" | "<=" | "==";
766
+ }>, z.ZodObject<{
767
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
768
+ type: z.ZodLiteral<"evmAddress">;
769
+ /**
770
+ * Array of EVM addresses to compare against.
771
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
772
+ * Limited to a maximum of 100 addresses per criterion.
773
+ */
774
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
775
+ /**
776
+ * The operator to use for evaluating transaction addresses.
777
+ * "in" checks if an address is in the provided list.
778
+ * "not in" checks if an address is not in the provided list.
779
+ */
780
+ operator: z.ZodEnum<["in", "not in"]>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ type: "evmAddress";
783
+ operator: "in" | "not in";
784
+ addresses: `0x${string}`[];
785
+ }, {
786
+ type: "evmAddress";
787
+ operator: "in" | "not in";
788
+ addresses: string[];
789
+ }>]>, "many">;
790
+ }, "strip", z.ZodTypeAny, {
791
+ action: "reject" | "accept";
792
+ operation: "signEvmTransaction";
793
+ criteria: ({
794
+ ethValue: string;
795
+ type: "ethValue";
796
+ operator: ">" | ">=" | "<" | "<=" | "==";
797
+ } | {
798
+ type: "evmAddress";
799
+ operator: "in" | "not in";
800
+ addresses: `0x${string}`[];
801
+ })[];
802
+ }, {
803
+ action: "reject" | "accept";
804
+ operation: "signEvmTransaction";
805
+ criteria: ({
806
+ ethValue: string;
807
+ type: "ethValue";
808
+ operator: ">" | ">=" | "<" | "<=" | "==";
809
+ } | {
810
+ type: "evmAddress";
811
+ operator: "in" | "not in";
812
+ addresses: string[];
813
+ })[];
814
+ }>, z.ZodObject<{
815
+ /**
816
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
817
+ * "accept" will allow the transaction, "reject" will block it.
818
+ */
819
+ action: z.ZodEnum<["reject", "accept"]>;
820
+ /**
821
+ * The operation to which this rule applies.
822
+ * Must be "signSolTransaction".
823
+ */
824
+ operation: z.ZodLiteral<"signSolTransaction">;
825
+ /**
826
+ * The set of criteria that must be matched for this rule to apply.
827
+ * Must be compatible with the specified operation type.
828
+ */
829
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
830
+ /** The type of criterion, must be "solAddress" for Solana address-based rules. */
831
+ type: z.ZodLiteral<"solAddress">;
832
+ /**
833
+ * Array of Solana addresses to compare against.
834
+ * Each address must be a valid Base58-encoded Solana address (32-44 characters).
835
+ */
836
+ addresses: z.ZodArray<z.ZodString, "many">;
837
+ /**
838
+ * The operator to use for evaluating transaction addresses.
839
+ * "in" checks if an address is in the provided list.
840
+ * "not in" checks if an address is not in the provided list.
841
+ */
842
+ operator: z.ZodEnum<["in", "not in"]>;
843
+ }, "strip", z.ZodTypeAny, {
844
+ type: "solAddress";
845
+ operator: "in" | "not in";
846
+ addresses: string[];
847
+ }, {
848
+ type: "solAddress";
849
+ operator: "in" | "not in";
850
+ addresses: string[];
851
+ }>]>, "many">;
852
+ }, "strip", z.ZodTypeAny, {
853
+ action: "reject" | "accept";
854
+ operation: "signSolTransaction";
855
+ criteria: {
856
+ type: "solAddress";
857
+ operator: "in" | "not in";
858
+ addresses: string[];
859
+ }[];
860
+ }, {
861
+ action: "reject" | "accept";
862
+ operation: "signSolTransaction";
863
+ criteria: {
864
+ type: "solAddress";
865
+ operator: "in" | "not in";
866
+ addresses: string[];
867
+ }[];
868
+ }>]>, "many">;
869
+ }, "strip", z.ZodTypeAny, {
870
+ rules: ({
871
+ action: "reject" | "accept";
872
+ operation: "signEvmTransaction";
873
+ criteria: ({
874
+ ethValue: string;
875
+ type: "ethValue";
876
+ operator: ">" | ">=" | "<" | "<=" | "==";
877
+ } | {
878
+ type: "evmAddress";
879
+ operator: "in" | "not in";
880
+ addresses: `0x${string}`[];
881
+ })[];
882
+ } | {
883
+ action: "reject" | "accept";
884
+ operation: "signSolTransaction";
885
+ criteria: {
886
+ type: "solAddress";
887
+ operator: "in" | "not in";
888
+ addresses: string[];
889
+ }[];
890
+ })[];
891
+ description?: string | undefined;
892
+ }, {
893
+ rules: ({
894
+ action: "reject" | "accept";
895
+ operation: "signEvmTransaction";
896
+ criteria: ({
897
+ ethValue: string;
898
+ type: "ethValue";
899
+ operator: ">" | ">=" | "<" | "<=" | "==";
900
+ } | {
901
+ type: "evmAddress";
902
+ operator: "in" | "not in";
903
+ addresses: string[];
904
+ })[];
905
+ } | {
906
+ action: "reject" | "accept";
907
+ operation: "signSolTransaction";
908
+ criteria: {
909
+ type: "solAddress";
910
+ operator: "in" | "not in";
911
+ addresses: string[];
912
+ }[];
913
+ })[];
914
+ description?: string | undefined;
915
+ }>;
916
+ /**
917
+ * Type representing the request body for updating an existing policy.
918
+ * Contains the optional description and rules for the updated policy.
919
+ * Note that the scope cannot be changed once a policy is created.
920
+ */
921
+ export type UpdatePolicyBody = z.infer<typeof UpdatePolicyBodySchema>;
922
+ //# sourceMappingURL=schema.d.ts.map