@coinbase/cdp-sdk 1.12.0 → 1.13.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 (44) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +10 -1
  3. package/_cjs/accounts/evm/toEvmServerAccount.js +1 -0
  4. package/_cjs/accounts/evm/toEvmServerAccount.js.map +1 -1
  5. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +23 -1
  6. package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  7. package/_cjs/openapi-client/generated/index.msw.js +4 -4
  8. package/_cjs/openapi-client/generated/index.msw.js.map +1 -1
  9. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +59 -1
  10. package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
  11. package/_cjs/policies/schema.js +59 -1
  12. package/_cjs/policies/schema.js.map +1 -1
  13. package/_cjs/version.js +1 -1
  14. package/_esm/accounts/evm/toEvmServerAccount.js +1 -0
  15. package/_esm/accounts/evm/toEvmServerAccount.js.map +1 -1
  16. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +22 -0
  17. package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
  18. package/_esm/openapi-client/generated/index.msw.js +4 -4
  19. package/_esm/openapi-client/generated/index.msw.js.map +1 -1
  20. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +54 -0
  21. package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
  22. package/_esm/policies/schema.js +58 -0
  23. package/_esm/policies/schema.js.map +1 -1
  24. package/_esm/version.js +1 -1
  25. package/_types/accounts/evm/toEvmServerAccount.d.ts.map +1 -1
  26. package/_types/actions/evm/swap/types.d.ts +40 -1
  27. package/_types/actions/evm/swap/types.d.ts.map +1 -1
  28. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +64 -1
  29. package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
  30. package/_types/openapi-client/generated/index.msw.d.ts +4 -4
  31. package/_types/openapi-client/generated/index.msw.d.ts.map +1 -1
  32. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +5 -1
  33. package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -1
  34. package/_types/policies/schema.d.ts +338 -0
  35. package/_types/policies/schema.d.ts.map +1 -1
  36. package/_types/version.d.ts +1 -1
  37. package/accounts/evm/toEvmServerAccount.ts +2 -2
  38. package/actions/evm/swap/types.ts +44 -1
  39. package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +93 -1
  40. package/openapi-client/generated/index.msw.ts +4 -4
  41. package/openapi-client/generated/policy-engine/policy-engine.msw.ts +87 -0
  42. package/package.json +1 -1
  43. package/policies/schema.ts +70 -0
  44. package/version.ts +1 -1
@@ -1,23 +1,27 @@
1
1
  import { http } from "msw";
2
- import type { EthValueCriterion, EvmAddressCriterion, EvmNetworkCriterion, ListPolicies200, Policy, SolAddressCriterion } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
2
+ import type { EthValueCriterion, EvmAddressCriterion, EvmMessageCriterion, EvmNetworkCriterion, ListPolicies200, Policy, SolAddressCriterion } from "../coinbaseDeveloperPlatformAPIs.schemas.js";
3
3
  export declare const getListPoliciesResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
4
4
  export declare const getListPoliciesResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
5
5
  export declare const getListPoliciesResponseEvmNetworkCriterionMock: (overrideResponse?: Partial<EvmNetworkCriterion>) => EvmNetworkCriterion;
6
+ export declare const getListPoliciesResponseEvmMessageCriterionMock: (overrideResponse?: Partial<EvmMessageCriterion>) => EvmMessageCriterion;
6
7
  export declare const getListPoliciesResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
7
8
  export declare const getListPoliciesResponseMock: () => ListPolicies200;
8
9
  export declare const getCreatePolicyResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
9
10
  export declare const getCreatePolicyResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
10
11
  export declare const getCreatePolicyResponseEvmNetworkCriterionMock: (overrideResponse?: Partial<EvmNetworkCriterion>) => EvmNetworkCriterion;
12
+ export declare const getCreatePolicyResponseEvmMessageCriterionMock: (overrideResponse?: Partial<EvmMessageCriterion>) => EvmMessageCriterion;
11
13
  export declare const getCreatePolicyResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
12
14
  export declare const getCreatePolicyResponseMock: (overrideResponse?: Partial<Policy>) => Policy;
13
15
  export declare const getGetPolicyByIdResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
14
16
  export declare const getGetPolicyByIdResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
15
17
  export declare const getGetPolicyByIdResponseEvmNetworkCriterionMock: (overrideResponse?: Partial<EvmNetworkCriterion>) => EvmNetworkCriterion;
18
+ export declare const getGetPolicyByIdResponseEvmMessageCriterionMock: (overrideResponse?: Partial<EvmMessageCriterion>) => EvmMessageCriterion;
16
19
  export declare const getGetPolicyByIdResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
17
20
  export declare const getGetPolicyByIdResponseMock: (overrideResponse?: Partial<Policy>) => Policy;
18
21
  export declare const getUpdatePolicyResponseEthValueCriterionMock: (overrideResponse?: Partial<EthValueCriterion>) => EthValueCriterion;
19
22
  export declare const getUpdatePolicyResponseEvmAddressCriterionMock: (overrideResponse?: Partial<EvmAddressCriterion>) => EvmAddressCriterion;
20
23
  export declare const getUpdatePolicyResponseEvmNetworkCriterionMock: (overrideResponse?: Partial<EvmNetworkCriterion>) => EvmNetworkCriterion;
24
+ export declare const getUpdatePolicyResponseEvmMessageCriterionMock: (overrideResponse?: Partial<EvmMessageCriterion>) => EvmMessageCriterion;
21
25
  export declare const getUpdatePolicyResponseSolAddressCriterionMock: (overrideResponse?: Partial<SolAddressCriterion>) => SolAddressCriterion;
22
26
  export declare const getUpdatePolicyResponseMock: (overrideResponse?: Partial<Policy>) => Policy;
23
27
  export declare const getListPoliciesMockHandler: (overrideResponse?: ListPolicies200 | ((info: Parameters<Parameters<typeof http.get>[1]>[0]) => Promise<ListPolicies200> | ListPolicies200)) => import("msw").HttpHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"policy-engine.msw.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/policy-engine/policy-engine.msw.ts"],"names":[],"mappings":"AASA,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,KAAK,EACV,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,mBAAmB,EACpB,MAAM,6CAA6C,CAAC;AAErD,eAAO,MAAM,4CAA4C,GACvD,mBAAkB,OAAO,CAAC,iBAAiB,CAAM,KAChD,iBAOD,CAAC;AAEH,eAAO,MAAM,8CAA8C,GACzD,mBAAkB,OAAO,CAAC,mBAAmB,CAAM,KAClD,mBASD,CAAC;AAEH,eAAO,MAAM,8CAA8C,GACzD,mBAAkB,OAAO,CAAC,mBAAmB,CAAM,KAClD,mBAOD,CAAC;AAEH,eAAO,MAAM,8CAA8C,GACzD,mBAAkB,OAAO,CAAC,mBAAmB,CAAM,KAClD,mBASD,CAAC;AAEH,eAAO,MAAM,2BAA2B,QAAO,eA8D7C,CAAC;AAEH,eAAO,MAAM,4CAA4C,GACvD,mBAAkB,OAAO,CAAC,iBAAiB,CAAM,KAChD,iBAOD,CAAC;AAEH,eAAO,MAAM,8CAA8C,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C,CACC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAChD,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC,8BAgBrD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,mBACI,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,8BAgBzF,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,mBACI,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,8BAgBxF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,kCAEY,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,aAAC,8BASvF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,mBACI,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,8BAgBxF,CAAC;AACF,eAAO,MAAM,mBAAmB,mCAM/B,CAAC"}
1
+ {"version":3,"file":"policy-engine.msw.d.ts","sourceRoot":"","sources":["../../../../openapi-client/generated/policy-engine/policy-engine.msw.ts"],"names":[],"mappings":"AASA,OAAO,E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GACrC,mBACI,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,8BAgBzF,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,mBACI,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,8BAgBxF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,kCAEY,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,aAAC,8BASvF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,mBACI,MAAM,GACN,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,8BAgBxF,CAAC;AACF,eAAO,MAAM,mBAAmB,mCAM/B,CAAC"}
@@ -121,6 +121,25 @@ export declare const EvmNetworkCriterionSchema: z.ZodObject<{
121
121
  networks: ("base-sepolia" | "base")[];
122
122
  }>;
123
123
  export type EvmNetworkCriterion = z.infer<typeof EvmNetworkCriterionSchema>;
124
+ /**
125
+ * Schema for EVM message criterions
126
+ */
127
+ export declare const EvmMessageCriterionSchema: z.ZodObject<{
128
+ /** The type of criterion, must be "evmMessage" for EVM message-based rules. */
129
+ type: z.ZodLiteral<"evmMessage">;
130
+ /**
131
+ * A regular expression the message is matched against.
132
+ * Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
133
+ */
134
+ match: z.ZodString;
135
+ }, "strip", z.ZodTypeAny, {
136
+ type: "evmMessage";
137
+ match: string;
138
+ }, {
139
+ type: "evmMessage";
140
+ match: string;
141
+ }>;
142
+ export type EvmMessageCriterion = z.infer<typeof EvmMessageCriterionSchema>;
124
143
  /**
125
144
  * Schema for Solana address criterions
126
145
  */
@@ -198,6 +217,29 @@ export declare const SignEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscrimin
198
217
  * Can contain up to 10 individual criterion objects of ETH value or EVM address types.
199
218
  */
200
219
  export type SignEvmTransactionCriteria = z.infer<typeof SignEvmTransactionCriteriaSchema>;
220
+ /**
221
+ * Schema for criteria used in SignEvmMessage operations
222
+ */
223
+ export declare const SignEvmMessageCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
224
+ /** The type of criterion, must be "evmMessage" for EVM message-based rules. */
225
+ type: z.ZodLiteral<"evmMessage">;
226
+ /**
227
+ * A regular expression the message is matched against.
228
+ * Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
229
+ */
230
+ match: z.ZodString;
231
+ }, "strip", z.ZodTypeAny, {
232
+ type: "evmMessage";
233
+ match: string;
234
+ }, {
235
+ type: "evmMessage";
236
+ match: string;
237
+ }>]>, "many">;
238
+ /**
239
+ * Type representing a set of criteria for the signEvmMessage operation.
240
+ * Can contain up to 10 individual EVM message criterion objects.
241
+ */
242
+ export type SignEvmMessageCriteria = z.infer<typeof SignEvmMessageCriteriaSchema>;
201
243
  /**
202
244
  * Schema for criteria used in SendEvmTransaction operations
203
245
  */
@@ -415,6 +457,79 @@ export declare const SignEvmTransactionRuleSchema: z.ZodObject<{
415
457
  })[];
416
458
  }>;
417
459
  export type SignEvmTransactionRule = z.infer<typeof SignEvmTransactionRuleSchema>;
460
+ /**
461
+ * Type representing a 'signEvmHash' policy rule that can accept or reject specific operations
462
+ * based on a set of criteria.
463
+ */
464
+ export declare const SignEvmHashRuleSchema: z.ZodObject<{
465
+ /**
466
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
467
+ * "accept" will allow the signing, "reject" will block it.
468
+ */
469
+ action: z.ZodEnum<["reject", "accept"]>;
470
+ /**
471
+ * The operation to which this rule applies.
472
+ * Must be "signEvmHash".
473
+ */
474
+ operation: z.ZodLiteral<"signEvmHash">;
475
+ }, "strip", z.ZodTypeAny, {
476
+ action: "reject" | "accept";
477
+ operation: "signEvmHash";
478
+ }, {
479
+ action: "reject" | "accept";
480
+ operation: "signEvmHash";
481
+ }>;
482
+ export type SignEvmHashRule = z.infer<typeof SignEvmHashRuleSchema>;
483
+ /**
484
+ * Type representing a 'signEvmMessage' policy rule that can accept or reject specific operations
485
+ * based on a set of criteria.
486
+ */
487
+ export declare const SignEvmMessageRuleSchema: z.ZodObject<{
488
+ /**
489
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
490
+ * "accept" will allow the signing, "reject" will block it.
491
+ */
492
+ action: z.ZodEnum<["reject", "accept"]>;
493
+ /**
494
+ * The operation to which this rule applies.
495
+ * Must be "signEvmMessage".
496
+ */
497
+ operation: z.ZodLiteral<"signEvmMessage">;
498
+ /**
499
+ * The set of criteria that must be matched for this rule to apply.
500
+ * Must be compatible with the specified operation type.
501
+ */
502
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
503
+ /** The type of criterion, must be "evmMessage" for EVM message-based rules. */
504
+ type: z.ZodLiteral<"evmMessage">;
505
+ /**
506
+ * A regular expression the message is matched against.
507
+ * Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
508
+ */
509
+ match: z.ZodString;
510
+ }, "strip", z.ZodTypeAny, {
511
+ type: "evmMessage";
512
+ match: string;
513
+ }, {
514
+ type: "evmMessage";
515
+ match: string;
516
+ }>]>, "many">;
517
+ }, "strip", z.ZodTypeAny, {
518
+ action: "reject" | "accept";
519
+ operation: "signEvmMessage";
520
+ criteria: {
521
+ type: "evmMessage";
522
+ match: string;
523
+ }[];
524
+ }, {
525
+ action: "reject" | "accept";
526
+ operation: "signEvmMessage";
527
+ criteria: {
528
+ type: "evmMessage";
529
+ match: string;
530
+ }[];
531
+ }>;
532
+ export type SignEvmMessageRule = z.infer<typeof SignEvmMessageRuleSchema>;
418
533
  /**
419
534
  * Type representing a 'sendEvmTransaction' policy rule that can accept or reject specific operations
420
535
  * based on a set of criteria.
@@ -676,6 +791,67 @@ export declare const RuleSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObje
676
791
  operator: "in" | "not in";
677
792
  addresses: string[];
678
793
  })[];
794
+ }>, z.ZodObject<{
795
+ /**
796
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
797
+ * "accept" will allow the signing, "reject" will block it.
798
+ */
799
+ action: z.ZodEnum<["reject", "accept"]>;
800
+ /**
801
+ * The operation to which this rule applies.
802
+ * Must be "signEvmHash".
803
+ */
804
+ operation: z.ZodLiteral<"signEvmHash">;
805
+ }, "strip", z.ZodTypeAny, {
806
+ action: "reject" | "accept";
807
+ operation: "signEvmHash";
808
+ }, {
809
+ action: "reject" | "accept";
810
+ operation: "signEvmHash";
811
+ }>, z.ZodObject<{
812
+ /**
813
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
814
+ * "accept" will allow the signing, "reject" will block it.
815
+ */
816
+ action: z.ZodEnum<["reject", "accept"]>;
817
+ /**
818
+ * The operation to which this rule applies.
819
+ * Must be "signEvmMessage".
820
+ */
821
+ operation: z.ZodLiteral<"signEvmMessage">;
822
+ /**
823
+ * The set of criteria that must be matched for this rule to apply.
824
+ * Must be compatible with the specified operation type.
825
+ */
826
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
827
+ /** The type of criterion, must be "evmMessage" for EVM message-based rules. */
828
+ type: z.ZodLiteral<"evmMessage">;
829
+ /**
830
+ * A regular expression the message is matched against.
831
+ * Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
832
+ */
833
+ match: z.ZodString;
834
+ }, "strip", z.ZodTypeAny, {
835
+ type: "evmMessage";
836
+ match: string;
837
+ }, {
838
+ type: "evmMessage";
839
+ match: string;
840
+ }>]>, "many">;
841
+ }, "strip", z.ZodTypeAny, {
842
+ action: "reject" | "accept";
843
+ operation: "signEvmMessage";
844
+ criteria: {
845
+ type: "evmMessage";
846
+ match: string;
847
+ }[];
848
+ }, {
849
+ action: "reject" | "accept";
850
+ operation: "signEvmMessage";
851
+ criteria: {
852
+ type: "evmMessage";
853
+ match: string;
854
+ }[];
679
855
  }>, z.ZodObject<{
680
856
  /**
681
857
  * Determines whether matching the rule will cause a request to be rejected or accepted.
@@ -955,6 +1131,67 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
955
1131
  operator: "in" | "not in";
956
1132
  addresses: string[];
957
1133
  })[];
1134
+ }>, z.ZodObject<{
1135
+ /**
1136
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
1137
+ * "accept" will allow the signing, "reject" will block it.
1138
+ */
1139
+ action: z.ZodEnum<["reject", "accept"]>;
1140
+ /**
1141
+ * The operation to which this rule applies.
1142
+ * Must be "signEvmHash".
1143
+ */
1144
+ operation: z.ZodLiteral<"signEvmHash">;
1145
+ }, "strip", z.ZodTypeAny, {
1146
+ action: "reject" | "accept";
1147
+ operation: "signEvmHash";
1148
+ }, {
1149
+ action: "reject" | "accept";
1150
+ operation: "signEvmHash";
1151
+ }>, z.ZodObject<{
1152
+ /**
1153
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
1154
+ * "accept" will allow the signing, "reject" will block it.
1155
+ */
1156
+ action: z.ZodEnum<["reject", "accept"]>;
1157
+ /**
1158
+ * The operation to which this rule applies.
1159
+ * Must be "signEvmMessage".
1160
+ */
1161
+ operation: z.ZodLiteral<"signEvmMessage">;
1162
+ /**
1163
+ * The set of criteria that must be matched for this rule to apply.
1164
+ * Must be compatible with the specified operation type.
1165
+ */
1166
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1167
+ /** The type of criterion, must be "evmMessage" for EVM message-based rules. */
1168
+ type: z.ZodLiteral<"evmMessage">;
1169
+ /**
1170
+ * A regular expression the message is matched against.
1171
+ * Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
1172
+ */
1173
+ match: z.ZodString;
1174
+ }, "strip", z.ZodTypeAny, {
1175
+ type: "evmMessage";
1176
+ match: string;
1177
+ }, {
1178
+ type: "evmMessage";
1179
+ match: string;
1180
+ }>]>, "many">;
1181
+ }, "strip", z.ZodTypeAny, {
1182
+ action: "reject" | "accept";
1183
+ operation: "signEvmMessage";
1184
+ criteria: {
1185
+ type: "evmMessage";
1186
+ match: string;
1187
+ }[];
1188
+ }, {
1189
+ action: "reject" | "accept";
1190
+ operation: "signEvmMessage";
1191
+ criteria: {
1192
+ type: "evmMessage";
1193
+ match: string;
1194
+ }[];
958
1195
  }>, z.ZodObject<{
959
1196
  /**
960
1197
  * Determines whether matching the rule will cause a request to be rejected or accepted.
@@ -1135,6 +1372,16 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
1135
1372
  operator: "in" | "not in";
1136
1373
  addresses: `0x${string}`[];
1137
1374
  })[];
1375
+ } | {
1376
+ action: "reject" | "accept";
1377
+ operation: "signEvmHash";
1378
+ } | {
1379
+ action: "reject" | "accept";
1380
+ operation: "signEvmMessage";
1381
+ criteria: {
1382
+ type: "evmMessage";
1383
+ match: string;
1384
+ }[];
1138
1385
  } | {
1139
1386
  action: "reject" | "accept";
1140
1387
  operation: "sendEvmTransaction";
@@ -1175,6 +1422,16 @@ export declare const CreatePolicyBodySchema: z.ZodObject<{
1175
1422
  operator: "in" | "not in";
1176
1423
  addresses: string[];
1177
1424
  })[];
1425
+ } | {
1426
+ action: "reject" | "accept";
1427
+ operation: "signEvmHash";
1428
+ } | {
1429
+ action: "reject" | "accept";
1430
+ operation: "signEvmMessage";
1431
+ criteria: {
1432
+ type: "evmMessage";
1433
+ match: string;
1434
+ }[];
1178
1435
  } | {
1179
1436
  action: "reject" | "accept";
1180
1437
  operation: "sendEvmTransaction";
@@ -1298,6 +1555,67 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
1298
1555
  operator: "in" | "not in";
1299
1556
  addresses: string[];
1300
1557
  })[];
1558
+ }>, z.ZodObject<{
1559
+ /**
1560
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
1561
+ * "accept" will allow the signing, "reject" will block it.
1562
+ */
1563
+ action: z.ZodEnum<["reject", "accept"]>;
1564
+ /**
1565
+ * The operation to which this rule applies.
1566
+ * Must be "signEvmHash".
1567
+ */
1568
+ operation: z.ZodLiteral<"signEvmHash">;
1569
+ }, "strip", z.ZodTypeAny, {
1570
+ action: "reject" | "accept";
1571
+ operation: "signEvmHash";
1572
+ }, {
1573
+ action: "reject" | "accept";
1574
+ operation: "signEvmHash";
1575
+ }>, z.ZodObject<{
1576
+ /**
1577
+ * Determines whether matching the rule will cause a request to be rejected or accepted.
1578
+ * "accept" will allow the signing, "reject" will block it.
1579
+ */
1580
+ action: z.ZodEnum<["reject", "accept"]>;
1581
+ /**
1582
+ * The operation to which this rule applies.
1583
+ * Must be "signEvmMessage".
1584
+ */
1585
+ operation: z.ZodLiteral<"signEvmMessage">;
1586
+ /**
1587
+ * The set of criteria that must be matched for this rule to apply.
1588
+ * Must be compatible with the specified operation type.
1589
+ */
1590
+ criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1591
+ /** The type of criterion, must be "evmMessage" for EVM message-based rules. */
1592
+ type: z.ZodLiteral<"evmMessage">;
1593
+ /**
1594
+ * A regular expression the message is matched against.
1595
+ * Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
1596
+ */
1597
+ match: z.ZodString;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ type: "evmMessage";
1600
+ match: string;
1601
+ }, {
1602
+ type: "evmMessage";
1603
+ match: string;
1604
+ }>]>, "many">;
1605
+ }, "strip", z.ZodTypeAny, {
1606
+ action: "reject" | "accept";
1607
+ operation: "signEvmMessage";
1608
+ criteria: {
1609
+ type: "evmMessage";
1610
+ match: string;
1611
+ }[];
1612
+ }, {
1613
+ action: "reject" | "accept";
1614
+ operation: "signEvmMessage";
1615
+ criteria: {
1616
+ type: "evmMessage";
1617
+ match: string;
1618
+ }[];
1301
1619
  }>, z.ZodObject<{
1302
1620
  /**
1303
1621
  * Determines whether matching the rule will cause a request to be rejected or accepted.
@@ -1477,6 +1795,16 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
1477
1795
  operator: "in" | "not in";
1478
1796
  addresses: `0x${string}`[];
1479
1797
  })[];
1798
+ } | {
1799
+ action: "reject" | "accept";
1800
+ operation: "signEvmHash";
1801
+ } | {
1802
+ action: "reject" | "accept";
1803
+ operation: "signEvmMessage";
1804
+ criteria: {
1805
+ type: "evmMessage";
1806
+ match: string;
1807
+ }[];
1480
1808
  } | {
1481
1809
  action: "reject" | "accept";
1482
1810
  operation: "sendEvmTransaction";
@@ -1516,6 +1844,16 @@ export declare const UpdatePolicyBodySchema: z.ZodObject<{
1516
1844
  operator: "in" | "not in";
1517
1845
  addresses: string[];
1518
1846
  })[];
1847
+ } | {
1848
+ action: "reject" | "accept";
1849
+ operation: "signEvmHash";
1850
+ } | {
1851
+ action: "reject" | "accept";
1852
+ operation: "signEvmMessage";
1853
+ criteria: {
1854
+ type: "evmMessage";
1855
+ match: string;
1856
+ }[];
1519
1857
  } | {
1520
1858
  action: "reject" | "accept";
1521
1859
  operation: "sendEvmTransaction";
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../policies/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,oBAAoB,yCAAuC,CAAC;AACzE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAA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AA8F;;;;;;;;;;;YAS9F,+EAA+E;;YAE/E;;;;eAIG;;YAEH;;;;eAIG;;;;;;;;;;;YAkBH,+EAA+E;;YAE/E;;;eAGG;;YAEH;;;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4NH;;;WAGG;;QAEH;;;WAGG;;QAEH;;;WAGG;;YAlNH,kFAAkF;;YAElF;;;eAGG;;YAEH;;;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkRH,CAAC;AACH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "1.12.0";
1
+ export declare const version = "1.13.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -31,7 +31,6 @@ import type {
31
31
  TransactionResult,
32
32
  } from "../../actions/evm/sendTransaction.js";
33
33
  import type {
34
- SendSwapTransactionOptions,
35
34
  SwapOptions,
36
35
  SwapResult,
37
36
  QuoteSwapOptions,
@@ -140,7 +139,8 @@ export function toEvmServerAccount(
140
139
  return sendSwapTransaction(apiClient, {
141
140
  ...options,
142
141
  address: this.address,
143
- } as SendSwapTransactionOptions);
142
+ taker: this.address, // Always use account's address as taker
143
+ });
144
144
  },
145
145
  name: options.account.name,
146
146
  type: "evm-server",
@@ -83,10 +83,53 @@ export type QuoteSwapOptions = Omit<CreateSwapQuoteOptions, "taker">;
83
83
  */
84
84
  export type QuoteSwapResult = CreateSwapQuoteResult | SwapUnavailableResult;
85
85
 
86
+ /**
87
+ * Options when providing an already created swap quote (account-level).
88
+ */
89
+ interface AccountQuoteBasedSwapOptions {
90
+ /**
91
+ * The swap quote returned by the createSwapQuote method.
92
+ */
93
+ swapQuote: CreateSwapQuoteResult;
94
+
95
+ /**
96
+ * Optional idempotency key for the request.
97
+ */
98
+ idempotencyKey?: string;
99
+ }
100
+
101
+ /**
102
+ * Options when creating a swap quote inline (account-level).
103
+ */
104
+ interface AccountInlineSwapOptions {
105
+ /**
106
+ * The network to execute the swap on (e.g., "ethereum", "base").
107
+ */
108
+ network: SendEvmTransactionBodyNetwork;
109
+ /** The token to receive (destination token). */
110
+ toToken: Address;
111
+ /** The token to send (source token). */
112
+ fromToken: Address;
113
+ /** The amount to send in atomic units of the token. */
114
+ fromAmount: bigint;
115
+ /** The signer address (only needed if taker is a smart contract). */
116
+ signerAddress?: Address;
117
+ /** The gas price in Wei. */
118
+ gasPrice?: bigint;
119
+ /** The slippage tolerance in basis points (0-10000). */
120
+ slippageBps?: number;
121
+
122
+ /**
123
+ * Optional idempotency key for the request.
124
+ */
125
+ idempotencyKey?: string;
126
+ }
127
+
86
128
  /**
87
129
  * Options for executing a token swap (account-level).
130
+ * The taker is automatically set to the account's address.
88
131
  */
89
- export type SwapOptions = Omit<SendSwapTransactionOptions, "address">;
132
+ export type SwapOptions = AccountQuoteBasedSwapOptions | AccountInlineSwapOptions;
90
133
 
91
134
  /**
92
135
  * Result of executing a token swap (account-level).
@@ -727,6 +727,63 @@ export interface SendEvmTransactionRule {
727
727
  criteria: SendEvmTransactionCriteria;
728
728
  }
729
729
 
730
+ /**
731
+ * The type of criterion to use. This should be `evmMessage`.
732
+ */
733
+ export type EvmMessageCriterionType =
734
+ (typeof EvmMessageCriterionType)[keyof typeof EvmMessageCriterionType];
735
+
736
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
737
+ export const EvmMessageCriterionType = {
738
+ evmMessage: "evmMessage",
739
+ } as const;
740
+
741
+ /**
742
+ * A schema for specifying a criterion for the message being signed.
743
+ */
744
+ export interface EvmMessageCriterion {
745
+ /** The type of criterion to use. This should be `evmMessage`. */
746
+ type: EvmMessageCriterionType;
747
+ /** A regular expression the message is matched against. Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax). */
748
+ match: string;
749
+ }
750
+
751
+ /**
752
+ * A schema for specifying the rejection criteria for the SignEvmMessage operation.
753
+ */
754
+ export type SignEvmMessageCriteria = EvmMessageCriterion[];
755
+
756
+ /**
757
+ * Whether matching the rule will cause the request to be rejected or accepted.
758
+ */
759
+ export type SignEvmMessageRuleAction =
760
+ (typeof SignEvmMessageRuleAction)[keyof typeof SignEvmMessageRuleAction];
761
+
762
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
763
+ export const SignEvmMessageRuleAction = {
764
+ reject: "reject",
765
+ accept: "accept",
766
+ } as const;
767
+
768
+ /**
769
+ * The operation to which the rule applies. Every element of the `criteria` array must match the specified operation.
770
+ */
771
+ export type SignEvmMessageRuleOperation =
772
+ (typeof SignEvmMessageRuleOperation)[keyof typeof SignEvmMessageRuleOperation];
773
+
774
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
775
+ export const SignEvmMessageRuleOperation = {
776
+ signEvmMessage: "signEvmMessage",
777
+ } as const;
778
+
779
+ export interface SignEvmMessageRule {
780
+ /** Whether matching the rule will cause the request to be rejected or accepted. */
781
+ action: SignEvmMessageRuleAction;
782
+ /** The operation to which the rule applies. Every element of the `criteria` array must match the specified operation. */
783
+ operation: SignEvmMessageRuleOperation;
784
+ criteria: SignEvmMessageCriteria;
785
+ }
786
+
730
787
  /**
731
788
  * The type of criterion to use. This should be `solAddress`.
732
789
  */
@@ -798,10 +855,45 @@ export interface SignSolTransactionRule {
798
855
  criteria: SignSolTransactionCriteria;
799
856
  }
800
857
 
858
+ /**
859
+ * Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria.
860
+ */
861
+ export type SignEvmHashRuleAction =
862
+ (typeof SignEvmHashRuleAction)[keyof typeof SignEvmHashRuleAction];
863
+
864
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
865
+ export const SignEvmHashRuleAction = {
866
+ reject: "reject",
867
+ accept: "accept",
868
+ } as const;
869
+
870
+ /**
871
+ * The operation to which the rule applies.
872
+ */
873
+ export type SignEvmHashRuleOperation =
874
+ (typeof SignEvmHashRuleOperation)[keyof typeof SignEvmHashRuleOperation];
875
+
876
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
877
+ export const SignEvmHashRuleOperation = {
878
+ signEvmHash: "signEvmHash",
879
+ } as const;
880
+
881
+ export interface SignEvmHashRule {
882
+ /** Whether any attempts to sign a hash will be accepted or rejected. This rule does not accept any criteria. */
883
+ action: SignEvmHashRuleAction;
884
+ /** The operation to which the rule applies. */
885
+ operation: SignEvmHashRuleOperation;
886
+ }
887
+
801
888
  /**
802
889
  * A rule that limits the behavior of an account.
803
890
  */
804
- export type Rule = SignEvmTransactionRule | SendEvmTransactionRule | SignSolTransactionRule;
891
+ export type Rule =
892
+ | SignEvmTransactionRule
893
+ | SendEvmTransactionRule
894
+ | SignEvmMessageRule
895
+ | SignSolTransactionRule
896
+ | SignEvmHashRule;
805
897
 
806
898
  /**
807
899
  * The scope of the policy. Only one project-level policy can exist at any time.