@coinbase/cdp-sdk 1.8.0 → 1.9.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 (113) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +182 -105
  3. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  4. package/_cjs/accounts/evm/toEvmSmartAccount.js.map +1 -1
  5. package/_cjs/accounts/solana/toSolanaAccount.js +7 -0
  6. package/_cjs/accounts/solana/toSolanaAccount.js.map +1 -1
  7. package/_cjs/actions/evm/transfer/accountTransferStrategy.js +30 -63
  8. package/_cjs/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  9. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js +39 -56
  10. package/_cjs/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  11. package/_cjs/actions/evm/transfer/transfer.js +2 -39
  12. package/_cjs/actions/evm/transfer/transfer.js.map +1 -1
  13. package/_cjs/actions/evm/transfer/utils.js +0 -12
  14. package/_cjs/actions/evm/transfer/utils.js.map +1 -1
  15. package/_cjs/actions/solana/constants.js +9 -0
  16. package/_cjs/actions/solana/constants.js.map +1 -0
  17. package/_cjs/actions/solana/transfer.js +117 -0
  18. package/_cjs/actions/solana/transfer.js.map +1 -0
  19. package/_cjs/actions/solana/utils.js +66 -0
  20. package/_cjs/actions/solana/utils.js.map +1 -0
  21. package/_cjs/analytics.js +2 -0
  22. package/_cjs/analytics.js.map +1 -1
  23. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +35 -4
  24. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  25. package/_cjs/openapi-client/generated/index.msw.js +3 -3
  26. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  27. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +121 -36
  28. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
  29. package/_cjs/policies/schema.js +60 -1
  30. package/_cjs/policies/schema.js.map +1 -1
  31. package/_cjs/version.js +1 -1
  32. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  33. package/_esm/accounts/evm/toEvmSmartAccount.js.map +1 -1
  34. package/_esm/accounts/solana/toSolanaAccount.js +7 -0
  35. package/_esm/accounts/solana/toSolanaAccount.js.map +1 -1
  36. package/_esm/actions/evm/transfer/accountTransferStrategy.js +31 -64
  37. package/_esm/actions/evm/transfer/accountTransferStrategy.js.map +1 -1
  38. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js +39 -56
  39. package/_esm/actions/evm/transfer/smartAccountTransferStrategy.js.map +1 -1
  40. package/_esm/actions/evm/transfer/transfer.js +2 -39
  41. package/_esm/actions/evm/transfer/transfer.js.map +1 -1
  42. package/_esm/actions/evm/transfer/utils.js +0 -11
  43. package/_esm/actions/evm/transfer/utils.js.map +1 -1
  44. package/_esm/actions/solana/constants.js +6 -0
  45. package/_esm/actions/solana/constants.js.map +1 -0
  46. package/_esm/actions/solana/transfer.js +114 -0
  47. package/_esm/actions/solana/transfer.js.map +1 -0
  48. package/_esm/actions/solana/utils.js +61 -0
  49. package/_esm/actions/solana/utils.js.map +1 -0
  50. package/_esm/analytics.js +2 -0
  51. package/_esm/analytics.js.map +1 -1
  52. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +34 -3
  53. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  54. package/_esm/openapi-client/generated/index.msw.js +3 -3
  55. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  56. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +116 -35
  57. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
  58. package/_esm/policies/schema.js +59 -0
  59. package/_esm/policies/schema.js.map +1 -1
  60. package/_esm/version.js +1 -1
  61. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  62. package/_types/accounts/evm/toEvmSmartAccount.d.ts.map +1 -1
  63. package/_types/accounts/solana/toSolanaAccount.d.ts.map +1 -1
  64. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts +2 -2
  65. package/_types/actions/evm/transfer/accountTransferStrategy.d.ts.map +1 -1
  66. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts +2 -2
  67. package/_types/actions/evm/transfer/smartAccountTransferStrategy.d.ts.map +1 -1
  68. package/_types/actions/evm/transfer/transfer.d.ts +6 -4
  69. package/_types/actions/evm/transfer/transfer.d.ts.map +1 -1
  70. package/_types/actions/evm/transfer/types.d.ts +7 -52
  71. package/_types/actions/evm/transfer/types.d.ts.map +1 -1
  72. package/_types/actions/evm/transfer/utils.d.ts +0 -619
  73. package/_types/actions/evm/transfer/utils.d.ts.map +1 -1
  74. package/_types/actions/evm/types.d.ts +140 -68
  75. package/_types/actions/evm/types.d.ts.map +1 -1
  76. package/_types/actions/solana/constants.d.ts +6 -0
  77. package/_types/actions/solana/constants.d.ts.map +1 -0
  78. package/_types/actions/solana/transfer.d.ts +36 -0
  79. package/_types/actions/solana/transfer.d.ts.map +1 -0
  80. package/_types/actions/solana/types.d.ts +27 -0
  81. package/_types/actions/solana/types.d.ts.map +1 -1
  82. package/_types/actions/solana/utils.d.ts +34 -0
  83. package/_types/actions/solana/utils.d.ts.map +1 -0
  84. package/_types/analytics.d.ts.map +1 -1
  85. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +95 -17
  86. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  87. package/_types/openapi-client/generated/index.msw.d.ts +3 -3
  88. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  89. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +5 -1
  90. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -1
  91. package/_types/policies/schema.d.ts +630 -0
  92. package/_types/policies/schema.d.ts.map +1 -1
  93. package/_types/version.d.ts +1 -1
  94. package/accounts/evm/toEvmServerAccount.ts +7 -6
  95. package/accounts/evm/toEvmSmartAccount.ts +1 -2
  96. package/accounts/solana/toSolanaAccount.ts +7 -0
  97. package/actions/evm/transfer/accountTransferStrategy.ts +38 -78
  98. package/actions/evm/transfer/smartAccountTransferStrategy.ts +43 -63
  99. package/actions/evm/transfer/transfer.ts +10 -51
  100. package/actions/evm/transfer/types.ts +8 -66
  101. package/actions/evm/transfer/utils.ts +0 -13
  102. package/actions/evm/types.ts +143 -78
  103. package/actions/solana/constants.ts +6 -0
  104. package/actions/solana/transfer.ts +219 -0
  105. package/actions/solana/types.ts +28 -0
  106. package/actions/solana/utils.ts +79 -0
  107. package/analytics.ts +2 -0
  108. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +134 -18
  109. package/openapi-client/generated/index.msw.ts +3 -3
  110. package/openapi-client/generated/policy-engine/policy-engine.msw.ts +199 -56
  111. package/package.json +2 -1
  112. package/policies/schema.ts +83 -0
  113. package/version.ts +1 -1
@@ -17,6 +17,15 @@ export declare const EvmAddressOperatorEnum: z.ZodEnum<["in", "not in"]>;
17
17
  * These operators determine how transaction recipient addresses are evaluated against a list.
18
18
  */
19
19
  export type EvmAddressOperator = z.infer<typeof EvmAddressOperatorEnum>;
20
+ /**
21
+ * Enum for EvmNetworkOperator values
22
+ */
23
+ export declare const EvmNetworkOperatorEnum: z.ZodEnum<["in", "not in"]>;
24
+ /**
25
+ * Type representing the operators that can be used for EVM network comparisons.
26
+ * These operators determine how the transaction's network is evaluated against a list.
27
+ */
28
+ export type EvmNetworkOperator = z.infer<typeof EvmNetworkOperatorEnum>;
20
29
  /**
21
30
  * Enum for SolAddressOperator values
22
31
  */
@@ -77,6 +86,41 @@ export declare const EvmAddressCriterionSchema: z.ZodObject<{
77
86
  addresses: string[];
78
87
  }>;
79
88
  export type EvmAddressCriterion = z.infer<typeof EvmAddressCriterionSchema>;
89
+ /**
90
+ * Enum for EVM Network values
91
+ */
92
+ export declare const EvmNetworkEnum: z.ZodEnum<["base", "base-sepolia"]>;
93
+ /**
94
+ * Type representing the valid networks used with CDP transaction API's.
95
+ */
96
+ export type EvmNetwork = z.infer<typeof EvmNetworkEnum>;
97
+ /**
98
+ * Schema for EVM network criterions
99
+ */
100
+ export declare const EvmNetworkCriterionSchema: z.ZodObject<{
101
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
102
+ type: z.ZodLiteral<"evmNetwork">;
103
+ /**
104
+ * Array of EVM network identifiers to compare against.
105
+ * Either "base" or "base-sepolia"
106
+ */
107
+ networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
108
+ /**
109
+ * The operator to use for evaluating transaction network.
110
+ * "in" checks if a network is in the provided list.
111
+ * "not in" checks if a network is not in the provided list.
112
+ */
113
+ operator: z.ZodEnum<["in", "not in"]>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ type: "evmNetwork";
116
+ operator: "in" | "not in";
117
+ networks: ("base-sepolia" | "base")[];
118
+ }, {
119
+ type: "evmNetwork";
120
+ operator: "in" | "not in";
121
+ networks: ("base-sepolia" | "base")[];
122
+ }>;
123
+ export type EvmNetworkCriterion = z.infer<typeof EvmNetworkCriterionSchema>;
80
124
  /**
81
125
  * Schema for Solana address criterions
82
126
  */
@@ -154,6 +198,78 @@ export declare const SignEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscrimin
154
198
  * Can contain up to 10 individual criterion objects of ETH value or EVM address types.
155
199
  */
156
200
  export type SignEvmTransactionCriteria = z.infer<typeof SignEvmTransactionCriteriaSchema>;
201
+ /**
202
+ * Schema for criteria used in SendEvmTransaction operations
203
+ */
204
+ export declare const SendEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
205
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
206
+ type: z.ZodLiteral<"ethValue">;
207
+ /**
208
+ * The ETH value amount in wei to compare against, as a string.
209
+ * Must contain only digits.
210
+ */
211
+ ethValue: z.ZodString;
212
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
213
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ ethValue: string;
216
+ type: "ethValue";
217
+ operator: ">" | ">=" | "<" | "<=" | "==";
218
+ }, {
219
+ ethValue: string;
220
+ type: "ethValue";
221
+ operator: ">" | ">=" | "<" | "<=" | "==";
222
+ }>, z.ZodObject<{
223
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
224
+ type: z.ZodLiteral<"evmAddress">;
225
+ /**
226
+ * Array of EVM addresses to compare against.
227
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
228
+ * Limited to a maximum of 100 addresses per criterion.
229
+ */
230
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
231
+ /**
232
+ * The operator to use for evaluating transaction addresses.
233
+ * "in" checks if an address is in the provided list.
234
+ * "not in" checks if an address is not in the provided list.
235
+ */
236
+ operator: z.ZodEnum<["in", "not in"]>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ type: "evmAddress";
239
+ operator: "in" | "not in";
240
+ addresses: `0x${string}`[];
241
+ }, {
242
+ type: "evmAddress";
243
+ operator: "in" | "not in";
244
+ addresses: string[];
245
+ }>, z.ZodObject<{
246
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
247
+ type: z.ZodLiteral<"evmNetwork">;
248
+ /**
249
+ * Array of EVM network identifiers to compare against.
250
+ * Either "base" or "base-sepolia"
251
+ */
252
+ networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
253
+ /**
254
+ * The operator to use for evaluating transaction network.
255
+ * "in" checks if a network is in the provided list.
256
+ * "not in" checks if a network is not in the provided list.
257
+ */
258
+ operator: z.ZodEnum<["in", "not in"]>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ type: "evmNetwork";
261
+ operator: "in" | "not in";
262
+ networks: ("base-sepolia" | "base")[];
263
+ }, {
264
+ type: "evmNetwork";
265
+ operator: "in" | "not in";
266
+ networks: ("base-sepolia" | "base")[];
267
+ }>]>, "many">;
268
+ /**
269
+ * Type representing a set of criteria for the sendEvmTransaction operation.
270
+ * Can contain up to 10 individual criterion objects of ETH value or EVM address types.
271
+ */
272
+ export type SendEvmTransactionCriteria = z.infer<typeof SendEvmTransactionCriteriaSchema>;
157
273
  /**
158
274
  * Schema for criteria used in SignSolTransaction operations
159
275
  */
@@ -299,6 +415,123 @@ export declare const SignEvmTransactionRuleSchema: z.ZodObject<{
299
415
  })[];
300
416
  }>;
301
417
  export type SignEvmTransactionRule = z.infer<typeof SignEvmTransactionRuleSchema>;
418
+ /**
419
+ * Type representing a 'sendEvmTransaction' policy rule that can accept or reject specific operations
420
+ * based on a set of criteria.
421
+ */
422
+ export declare const SendEvmTransactionRuleSchema: z.ZodObject<{
423
+ /**
424
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
425
+ * "accept" will allow the transaction, "reject" will block it.
426
+ */
427
+ action: z.ZodEnum<["reject", "accept"]>;
428
+ /**
429
+ * The operation to which this rule applies.
430
+ * Must be "sendEvmTransaction".
431
+ */
432
+ operation: z.ZodLiteral<"sendEvmTransaction">;
433
+ /**
434
+ * The set of criteria that must be matched for this rule to apply.
435
+ * Must be compatible with the specified operation type.
436
+ */
437
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
438
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
439
+ type: z.ZodLiteral<"ethValue">;
440
+ /**
441
+ * The ETH value amount in wei to compare against, as a string.
442
+ * Must contain only digits.
443
+ */
444
+ ethValue: z.ZodString;
445
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
446
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
447
+ }, "strip", z.ZodTypeAny, {
448
+ ethValue: string;
449
+ type: "ethValue";
450
+ operator: ">" | ">=" | "<" | "<=" | "==";
451
+ }, {
452
+ ethValue: string;
453
+ type: "ethValue";
454
+ operator: ">" | ">=" | "<" | "<=" | "==";
455
+ }>, z.ZodObject<{
456
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
457
+ type: z.ZodLiteral<"evmAddress">;
458
+ /**
459
+ * Array of EVM addresses to compare against.
460
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
461
+ * Limited to a maximum of 100 addresses per criterion.
462
+ */
463
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
464
+ /**
465
+ * The operator to use for evaluating transaction addresses.
466
+ * "in" checks if an address is in the provided list.
467
+ * "not in" checks if an address is not in the provided list.
468
+ */
469
+ operator: z.ZodEnum<["in", "not in"]>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ type: "evmAddress";
472
+ operator: "in" | "not in";
473
+ addresses: `0x${string}`[];
474
+ }, {
475
+ type: "evmAddress";
476
+ operator: "in" | "not in";
477
+ addresses: string[];
478
+ }>, z.ZodObject<{
479
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
480
+ type: z.ZodLiteral<"evmNetwork">;
481
+ /**
482
+ * Array of EVM network identifiers to compare against.
483
+ * Either "base" or "base-sepolia"
484
+ */
485
+ networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
486
+ /**
487
+ * The operator to use for evaluating transaction network.
488
+ * "in" checks if a network is in the provided list.
489
+ * "not in" checks if a network is not in the provided list.
490
+ */
491
+ operator: z.ZodEnum<["in", "not in"]>;
492
+ }, "strip", z.ZodTypeAny, {
493
+ type: "evmNetwork";
494
+ operator: "in" | "not in";
495
+ networks: ("base-sepolia" | "base")[];
496
+ }, {
497
+ type: "evmNetwork";
498
+ operator: "in" | "not in";
499
+ networks: ("base-sepolia" | "base")[];
500
+ }>]>, "many">;
501
+ }, "strip", z.ZodTypeAny, {
502
+ action: "reject" | "accept";
503
+ operation: "sendEvmTransaction";
504
+ criteria: ({
505
+ ethValue: string;
506
+ type: "ethValue";
507
+ operator: ">" | ">=" | "<" | "<=" | "==";
508
+ } | {
509
+ type: "evmAddress";
510
+ operator: "in" | "not in";
511
+ addresses: `0x${string}`[];
512
+ } | {
513
+ type: "evmNetwork";
514
+ operator: "in" | "not in";
515
+ networks: ("base-sepolia" | "base")[];
516
+ })[];
517
+ }, {
518
+ action: "reject" | "accept";
519
+ operation: "sendEvmTransaction";
520
+ criteria: ({
521
+ ethValue: string;
522
+ type: "ethValue";
523
+ operator: ">" | ">=" | "<" | "<=" | "==";
524
+ } | {
525
+ type: "evmAddress";
526
+ operator: "in" | "not in";
527
+ addresses: string[];
528
+ } | {
529
+ type: "evmNetwork";
530
+ operator: "in" | "not in";
531
+ networks: ("base-sepolia" | "base")[];
532
+ })[];
533
+ }>;
534
+ export type SendEvmTransactionRule = z.infer<typeof SendEvmTransactionRuleSchema>;
302
535
  /**
303
536
  * Type representing a 'signSolTransaction' policy rule that can accept or reject specific operations
304
537
  * based on a set of criteria.
@@ -443,6 +676,117 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
443
676
  operator: "in" | "not in";
444
677
  addresses: string[];
445
678
  })[];
679
+ }>, z.ZodObject<{
680
+ /**
681
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
682
+ * "accept" will allow the transaction, "reject" will block it.
683
+ */
684
+ action: z.ZodEnum<["reject", "accept"]>;
685
+ /**
686
+ * The operation to which this rule applies.
687
+ * Must be "sendEvmTransaction".
688
+ */
689
+ operation: z.ZodLiteral<"sendEvmTransaction">;
690
+ /**
691
+ * The set of criteria that must be matched for this rule to apply.
692
+ * Must be compatible with the specified operation type.
693
+ */
694
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
695
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
696
+ type: z.ZodLiteral<"ethValue">;
697
+ /**
698
+ * The ETH value amount in wei to compare against, as a string.
699
+ * Must contain only digits.
700
+ */
701
+ ethValue: z.ZodString;
702
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
703
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
704
+ }, "strip", z.ZodTypeAny, {
705
+ ethValue: string;
706
+ type: "ethValue";
707
+ operator: ">" | ">=" | "<" | "<=" | "==";
708
+ }, {
709
+ ethValue: string;
710
+ type: "ethValue";
711
+ operator: ">" | ">=" | "<" | "<=" | "==";
712
+ }>, z.ZodObject<{
713
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
714
+ type: z.ZodLiteral<"evmAddress">;
715
+ /**
716
+ * Array of EVM addresses to compare against.
717
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
718
+ * Limited to a maximum of 100 addresses per criterion.
719
+ */
720
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
721
+ /**
722
+ * The operator to use for evaluating transaction addresses.
723
+ * "in" checks if an address is in the provided list.
724
+ * "not in" checks if an address is not in the provided list.
725
+ */
726
+ operator: z.ZodEnum<["in", "not in"]>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ type: "evmAddress";
729
+ operator: "in" | "not in";
730
+ addresses: `0x${string}`[];
731
+ }, {
732
+ type: "evmAddress";
733
+ operator: "in" | "not in";
734
+ addresses: string[];
735
+ }>, z.ZodObject<{
736
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
737
+ type: z.ZodLiteral<"evmNetwork">;
738
+ /**
739
+ * Array of EVM network identifiers to compare against.
740
+ * Either "base" or "base-sepolia"
741
+ */
742
+ networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
743
+ /**
744
+ * The operator to use for evaluating transaction network.
745
+ * "in" checks if a network is in the provided list.
746
+ * "not in" checks if a network is not in the provided list.
747
+ */
748
+ operator: z.ZodEnum<["in", "not in"]>;
749
+ }, "strip", z.ZodTypeAny, {
750
+ type: "evmNetwork";
751
+ operator: "in" | "not in";
752
+ networks: ("base-sepolia" | "base")[];
753
+ }, {
754
+ type: "evmNetwork";
755
+ operator: "in" | "not in";
756
+ networks: ("base-sepolia" | "base")[];
757
+ }>]>, "many">;
758
+ }, "strip", z.ZodTypeAny, {
759
+ action: "reject" | "accept";
760
+ operation: "sendEvmTransaction";
761
+ criteria: ({
762
+ ethValue: string;
763
+ type: "ethValue";
764
+ operator: ">" | ">=" | "<" | "<=" | "==";
765
+ } | {
766
+ type: "evmAddress";
767
+ operator: "in" | "not in";
768
+ addresses: `0x${string}`[];
769
+ } | {
770
+ type: "evmNetwork";
771
+ operator: "in" | "not in";
772
+ networks: ("base-sepolia" | "base")[];
773
+ })[];
774
+ }, {
775
+ action: "reject" | "accept";
776
+ operation: "sendEvmTransaction";
777
+ criteria: ({
778
+ ethValue: string;
779
+ type: "ethValue";
780
+ operator: ">" | ">=" | "<" | "<=" | "==";
781
+ } | {
782
+ type: "evmAddress";
783
+ operator: "in" | "not in";
784
+ addresses: string[];
785
+ } | {
786
+ type: "evmNetwork";
787
+ operator: "in" | "not in";
788
+ networks: ("base-sepolia" | "base")[];
789
+ })[];
446
790
  }>, z.ZodObject<{
447
791
  /**
448
792
  * Determines whether matching the rule will cause a request to be rejected or accepted.
@@ -611,6 +955,117 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
611
955
  operator: "in" | "not in";
612
956
  addresses: string[];
613
957
  })[];
958
+ }>, z.ZodObject<{
959
+ /**
960
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
961
+ * "accept" will allow the transaction, "reject" will block it.
962
+ */
963
+ action: z.ZodEnum<["reject", "accept"]>;
964
+ /**
965
+ * The operation to which this rule applies.
966
+ * Must be "sendEvmTransaction".
967
+ */
968
+ operation: z.ZodLiteral<"sendEvmTransaction">;
969
+ /**
970
+ * The set of criteria that must be matched for this rule to apply.
971
+ * Must be compatible with the specified operation type.
972
+ */
973
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
974
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
975
+ type: z.ZodLiteral<"ethValue">;
976
+ /**
977
+ * The ETH value amount in wei to compare against, as a string.
978
+ * Must contain only digits.
979
+ */
980
+ ethValue: z.ZodString;
981
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
982
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
983
+ }, "strip", z.ZodTypeAny, {
984
+ ethValue: string;
985
+ type: "ethValue";
986
+ operator: ">" | ">=" | "<" | "<=" | "==";
987
+ }, {
988
+ ethValue: string;
989
+ type: "ethValue";
990
+ operator: ">" | ">=" | "<" | "<=" | "==";
991
+ }>, z.ZodObject<{
992
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
993
+ type: z.ZodLiteral<"evmAddress">;
994
+ /**
995
+ * Array of EVM addresses to compare against.
996
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
997
+ * Limited to a maximum of 100 addresses per criterion.
998
+ */
999
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
1000
+ /**
1001
+ * The operator to use for evaluating transaction addresses.
1002
+ * "in" checks if an address is in the provided list.
1003
+ * "not in" checks if an address is not in the provided list.
1004
+ */
1005
+ operator: z.ZodEnum<["in", "not in"]>;
1006
+ }, "strip", z.ZodTypeAny, {
1007
+ type: "evmAddress";
1008
+ operator: "in" | "not in";
1009
+ addresses: `0x${string}`[];
1010
+ }, {
1011
+ type: "evmAddress";
1012
+ operator: "in" | "not in";
1013
+ addresses: string[];
1014
+ }>, z.ZodObject<{
1015
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
1016
+ type: z.ZodLiteral<"evmNetwork">;
1017
+ /**
1018
+ * Array of EVM network identifiers to compare against.
1019
+ * Either "base" or "base-sepolia"
1020
+ */
1021
+ networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
1022
+ /**
1023
+ * The operator to use for evaluating transaction network.
1024
+ * "in" checks if a network is in the provided list.
1025
+ * "not in" checks if a network is not in the provided list.
1026
+ */
1027
+ operator: z.ZodEnum<["in", "not in"]>;
1028
+ }, "strip", z.ZodTypeAny, {
1029
+ type: "evmNetwork";
1030
+ operator: "in" | "not in";
1031
+ networks: ("base-sepolia" | "base")[];
1032
+ }, {
1033
+ type: "evmNetwork";
1034
+ operator: "in" | "not in";
1035
+ networks: ("base-sepolia" | "base")[];
1036
+ }>]>, "many">;
1037
+ }, "strip", z.ZodTypeAny, {
1038
+ action: "reject" | "accept";
1039
+ operation: "sendEvmTransaction";
1040
+ criteria: ({
1041
+ ethValue: string;
1042
+ type: "ethValue";
1043
+ operator: ">" | ">=" | "<" | "<=" | "==";
1044
+ } | {
1045
+ type: "evmAddress";
1046
+ operator: "in" | "not in";
1047
+ addresses: `0x${string}`[];
1048
+ } | {
1049
+ type: "evmNetwork";
1050
+ operator: "in" | "not in";
1051
+ networks: ("base-sepolia" | "base")[];
1052
+ })[];
1053
+ }, {
1054
+ action: "reject" | "accept";
1055
+ operation: "sendEvmTransaction";
1056
+ criteria: ({
1057
+ ethValue: string;
1058
+ type: "ethValue";
1059
+ operator: ">" | ">=" | "<" | "<=" | "==";
1060
+ } | {
1061
+ type: "evmAddress";
1062
+ operator: "in" | "not in";
1063
+ addresses: string[];
1064
+ } | {
1065
+ type: "evmNetwork";
1066
+ operator: "in" | "not in";
1067
+ networks: ("base-sepolia" | "base")[];
1068
+ })[];
614
1069
  }>, z.ZodObject<{
615
1070
  /**
616
1071
  * Determines whether matching the rule will cause a request to be rejected or accepted.
@@ -680,6 +1135,22 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
680
1135
  operator: "in" | "not in";
681
1136
  addresses: `0x${string}`[];
682
1137
  })[];
1138
+ } | {
1139
+ action: "reject" | "accept";
1140
+ operation: "sendEvmTransaction";
1141
+ criteria: ({
1142
+ ethValue: string;
1143
+ type: "ethValue";
1144
+ operator: ">" | ">=" | "<" | "<=" | "==";
1145
+ } | {
1146
+ type: "evmAddress";
1147
+ operator: "in" | "not in";
1148
+ addresses: `0x${string}`[];
1149
+ } | {
1150
+ type: "evmNetwork";
1151
+ operator: "in" | "not in";
1152
+ networks: ("base-sepolia" | "base")[];
1153
+ })[];
683
1154
  } | {
684
1155
  action: "reject" | "accept";
685
1156
  operation: "signSolTransaction";
@@ -704,6 +1175,22 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
704
1175
  operator: "in" | "not in";
705
1176
  addresses: string[];
706
1177
  })[];
1178
+ } | {
1179
+ action: "reject" | "accept";
1180
+ operation: "sendEvmTransaction";
1181
+ criteria: ({
1182
+ ethValue: string;
1183
+ type: "ethValue";
1184
+ operator: ">" | ">=" | "<" | "<=" | "==";
1185
+ } | {
1186
+ type: "evmAddress";
1187
+ operator: "in" | "not in";
1188
+ addresses: string[];
1189
+ } | {
1190
+ type: "evmNetwork";
1191
+ operator: "in" | "not in";
1192
+ networks: ("base-sepolia" | "base")[];
1193
+ })[];
707
1194
  } | {
708
1195
  action: "reject" | "accept";
709
1196
  operation: "signSolTransaction";
@@ -811,6 +1298,117 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
811
1298
  operator: "in" | "not in";
812
1299
  addresses: string[];
813
1300
  })[];
1301
+ }>, z.ZodObject<{
1302
+ /**
1303
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
1304
+ * "accept" will allow the transaction, "reject" will block it.
1305
+ */
1306
+ action: z.ZodEnum<["reject", "accept"]>;
1307
+ /**
1308
+ * The operation to which this rule applies.
1309
+ * Must be "sendEvmTransaction".
1310
+ */
1311
+ operation: z.ZodLiteral<"sendEvmTransaction">;
1312
+ /**
1313
+ * The set of criteria that must be matched for this rule to apply.
1314
+ * Must be compatible with the specified operation type.
1315
+ */
1316
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1317
+ /** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
1318
+ type: z.ZodLiteral<"ethValue">;
1319
+ /**
1320
+ * The ETH value amount in wei to compare against, as a string.
1321
+ * Must contain only digits.
1322
+ */
1323
+ ethValue: z.ZodString;
1324
+ /** The comparison operator to use for evaluating transaction values against the threshold. */
1325
+ operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
1326
+ }, "strip", z.ZodTypeAny, {
1327
+ ethValue: string;
1328
+ type: "ethValue";
1329
+ operator: ">" | ">=" | "<" | "<=" | "==";
1330
+ }, {
1331
+ ethValue: string;
1332
+ type: "ethValue";
1333
+ operator: ">" | ">=" | "<" | "<=" | "==";
1334
+ }>, z.ZodObject<{
1335
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
1336
+ type: z.ZodLiteral<"evmAddress">;
1337
+ /**
1338
+ * Array of EVM addresses to compare against.
1339
+ * Each address must be a 0x-prefixed 40-character hexadecimal string.
1340
+ * Limited to a maximum of 100 addresses per criterion.
1341
+ */
1342
+ addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
1343
+ /**
1344
+ * The operator to use for evaluating transaction addresses.
1345
+ * "in" checks if an address is in the provided list.
1346
+ * "not in" checks if an address is not in the provided list.
1347
+ */
1348
+ operator: z.ZodEnum<["in", "not in"]>;
1349
+ }, "strip", z.ZodTypeAny, {
1350
+ type: "evmAddress";
1351
+ operator: "in" | "not in";
1352
+ addresses: `0x${string}`[];
1353
+ }, {
1354
+ type: "evmAddress";
1355
+ operator: "in" | "not in";
1356
+ addresses: string[];
1357
+ }>, z.ZodObject<{
1358
+ /** The type of criterion, must be "evmAddress" for EVM address-based rules. */
1359
+ type: z.ZodLiteral<"evmNetwork">;
1360
+ /**
1361
+ * Array of EVM network identifiers to compare against.
1362
+ * Either "base" or "base-sepolia"
1363
+ */
1364
+ networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
1365
+ /**
1366
+ * The operator to use for evaluating transaction network.
1367
+ * "in" checks if a network is in the provided list.
1368
+ * "not in" checks if a network is not in the provided list.
1369
+ */
1370
+ operator: z.ZodEnum<["in", "not in"]>;
1371
+ }, "strip", z.ZodTypeAny, {
1372
+ type: "evmNetwork";
1373
+ operator: "in" | "not in";
1374
+ networks: ("base-sepolia" | "base")[];
1375
+ }, {
1376
+ type: "evmNetwork";
1377
+ operator: "in" | "not in";
1378
+ networks: ("base-sepolia" | "base")[];
1379
+ }>]>, "many">;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ action: "reject" | "accept";
1382
+ operation: "sendEvmTransaction";
1383
+ criteria: ({
1384
+ ethValue: string;
1385
+ type: "ethValue";
1386
+ operator: ">" | ">=" | "<" | "<=" | "==";
1387
+ } | {
1388
+ type: "evmAddress";
1389
+ operator: "in" | "not in";
1390
+ addresses: `0x${string}`[];
1391
+ } | {
1392
+ type: "evmNetwork";
1393
+ operator: "in" | "not in";
1394
+ networks: ("base-sepolia" | "base")[];
1395
+ })[];
1396
+ }, {
1397
+ action: "reject" | "accept";
1398
+ operation: "sendEvmTransaction";
1399
+ criteria: ({
1400
+ ethValue: string;
1401
+ type: "ethValue";
1402
+ operator: ">" | ">=" | "<" | "<=" | "==";
1403
+ } | {
1404
+ type: "evmAddress";
1405
+ operator: "in" | "not in";
1406
+ addresses: string[];
1407
+ } | {
1408
+ type: "evmNetwork";
1409
+ operator: "in" | "not in";
1410
+ networks: ("base-sepolia" | "base")[];
1411
+ })[];
814
1412
  }>, z.ZodObject<{
815
1413
  /**
816
1414
  * Determines whether matching the rule will cause a request to be rejected or accepted.
@@ -879,6 +1477,22 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
879
1477
  operator: "in" | "not in";
880
1478
  addresses: `0x${string}`[];
881
1479
  })[];
1480
+ } | {
1481
+ action: "reject" | "accept";
1482
+ operation: "sendEvmTransaction";
1483
+ criteria: ({
1484
+ ethValue: string;
1485
+ type: "ethValue";
1486
+ operator: ">" | ">=" | "<" | "<=" | "==";
1487
+ } | {
1488
+ type: "evmAddress";
1489
+ operator: "in" | "not in";
1490
+ addresses: `0x${string}`[];
1491
+ } | {
1492
+ type: "evmNetwork";
1493
+ operator: "in" | "not in";
1494
+ networks: ("base-sepolia" | "base")[];
1495
+ })[];
882
1496
  } | {
883
1497
  action: "reject" | "accept";
884
1498
  operation: "signSolTransaction";
@@ -902,6 +1516,22 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
902
1516
  operator: "in" | "not in";
903
1517
  addresses: string[];
904
1518
  })[];
1519
+ } | {
1520
+ action: "reject" | "accept";
1521
+ operation: "sendEvmTransaction";
1522
+ criteria: ({
1523
+ ethValue: string;
1524
+ type: "ethValue";
1525
+ operator: ">" | ">=" | "<" | "<=" | "==";
1526
+ } | {
1527
+ type: "evmAddress";
1528
+ operator: "in" | "not in";
1529
+ addresses: string[];
1530
+ } | {
1531
+ type: "evmNetwork";
1532
+ operator: "in" | "not in";
1533
+ networks: ("base-sepolia" | "base")[];
1534
+ })[];
905
1535
  } | {
906
1536
  action: "reject" | "accept";
907
1537
  operation: "signSolTransaction";