@coinbase/cdp-sdk 1.31.1 → 1.33.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.
- package/CHANGELOG.md +12 -0
- package/README.md +9 -7
- package/_cjs/client/policies/policies.js +72 -5
- package/_cjs/client/policies/policies.js.map +1 -1
- package/_cjs/index.js +3 -3
- package/_cjs/index.js.map +1 -1
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +65 -2
- package/_cjs/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js +259 -5
- package/_cjs/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_cjs/policies/{schema.js → evmSchema.js} +28 -112
- package/_cjs/policies/evmSchema.js.map +1 -0
- package/_cjs/policies/solanaSchema.js +183 -0
- package/_cjs/policies/solanaSchema.js.map +1 -0
- package/_cjs/policies/types.js +60 -0
- package/_cjs/policies/types.js.map +1 -1
- package/_cjs/version.js +1 -1
- package/_esm/client/policies/policies.js +70 -3
- package/_esm/client/policies/policies.js.map +1 -1
- package/_esm/index.js +1 -1
- package/_esm/index.js.map +1 -1
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js +63 -0
- package/_esm/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.js.map +1 -1
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js +237 -3
- package/_esm/openapi-client/generated/policy-engine/policy-engine.msw.js.map +1 -1
- package/_esm/policies/{schema.js → evmSchema.js} +27 -111
- package/_esm/policies/evmSchema.js.map +1 -0
- package/_esm/policies/solanaSchema.js +180 -0
- package/_esm/policies/solanaSchema.js.map +1 -0
- package/_esm/policies/types.js +59 -1
- package/_esm/policies/types.js.map +1 -1
- package/_esm/version.js +1 -1
- package/_types/client/policies/policies.d.ts +69 -2
- package/_types/client/policies/policies.d.ts.map +1 -1
- package/_types/client/policies/policies.types.d.ts +1 -2
- package/_types/client/policies/policies.types.d.ts.map +1 -1
- package/_types/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts +171 -4
- package/_types/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.d.ts.map +1 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts +21 -1
- package/_types/openapi-client/generated/policy-engine/policy-engine.msw.d.ts.map +1 -1
- package/_types/policies/evmSchema.d.ts +4519 -0
- package/_types/policies/evmSchema.d.ts.map +1 -0
- package/_types/policies/solanaSchema.d.ts +758 -0
- package/_types/policies/solanaSchema.d.ts.map +1 -0
- package/_types/policies/types.d.ts +6743 -1
- package/_types/policies/types.d.ts.map +1 -1
- package/_types/version.d.ts +1 -1
- package/client/policies/policies.ts +70 -4
- package/client/policies/policies.types.ts +1 -2
- package/index.ts +1 -1
- package/openapi-client/generated/coinbaseDeveloperPlatformAPIs.schemas.ts +240 -3
- package/openapi-client/generated/policy-engine/policy-engine.msw.ts +338 -3
- package/package.json +1 -1
- package/policies/{schema.ts → evmSchema.ts} +28 -158
- package/policies/solanaSchema.ts +251 -0
- package/policies/types.ts +94 -1
- package/version.ts +1 -1
- package/_cjs/policies/schema.js.map +0 -1
- package/_esm/policies/schema.js.map +0 -1
- package/_types/policies/schema.d.ts +0 -11599
- package/_types/policies/schema.d.ts.map +0 -1
|
@@ -0,0 +1,4519 @@
|
|
|
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 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>;
|
|
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 300 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
|
+
* Enum for EVM Network values
|
|
82
|
+
*/
|
|
83
|
+
export declare const EvmNetworkEnum: z.ZodEnum<["base", "base-sepolia"]>;
|
|
84
|
+
/**
|
|
85
|
+
* Type representing the valid networks used with CDP transaction API's.
|
|
86
|
+
*/
|
|
87
|
+
export type EvmNetwork = z.infer<typeof EvmNetworkEnum>;
|
|
88
|
+
/**
|
|
89
|
+
* Schema for EVM network criterions
|
|
90
|
+
*/
|
|
91
|
+
export declare const EvmNetworkCriterionSchema: z.ZodObject<{
|
|
92
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
93
|
+
type: z.ZodLiteral<"evmNetwork">;
|
|
94
|
+
/**
|
|
95
|
+
* Array of EVM network identifiers to compare against.
|
|
96
|
+
* Either "base" or "base-sepolia"
|
|
97
|
+
*/
|
|
98
|
+
networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
|
|
99
|
+
/**
|
|
100
|
+
* The operator to use for evaluating transaction network.
|
|
101
|
+
* "in" checks if a network is in the provided list.
|
|
102
|
+
* "not in" checks if a network is not in the provided list.
|
|
103
|
+
*/
|
|
104
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
type: "evmNetwork";
|
|
107
|
+
operator: "in" | "not in";
|
|
108
|
+
networks: ("base-sepolia" | "base")[];
|
|
109
|
+
}, {
|
|
110
|
+
type: "evmNetwork";
|
|
111
|
+
operator: "in" | "not in";
|
|
112
|
+
networks: ("base-sepolia" | "base")[];
|
|
113
|
+
}>;
|
|
114
|
+
export type EvmNetworkCriterion = z.infer<typeof EvmNetworkCriterionSchema>;
|
|
115
|
+
/**
|
|
116
|
+
* Schema for EVM message criterions
|
|
117
|
+
*/
|
|
118
|
+
export declare const EvmMessageCriterionSchema: z.ZodObject<{
|
|
119
|
+
/** The type of criterion, must be "evmMessage" for EVM message-based rules. */
|
|
120
|
+
type: z.ZodLiteral<"evmMessage">;
|
|
121
|
+
/**
|
|
122
|
+
* A regular expression the message is matched against.
|
|
123
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
124
|
+
*/
|
|
125
|
+
match: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
match: string;
|
|
128
|
+
type: "evmMessage";
|
|
129
|
+
}, {
|
|
130
|
+
match: string;
|
|
131
|
+
type: "evmMessage";
|
|
132
|
+
}>;
|
|
133
|
+
export type EvmMessageCriterion = z.infer<typeof EvmMessageCriterionSchema>;
|
|
134
|
+
/**
|
|
135
|
+
* Schema for Net USD change criterion
|
|
136
|
+
*/
|
|
137
|
+
export declare const NetUSDChangeCriterionSchema: z.ZodObject<{
|
|
138
|
+
/** The type of criterion, must be "netUSDChange" for USD denominated asset transfer rules. */
|
|
139
|
+
type: z.ZodLiteral<"netUSDChange">;
|
|
140
|
+
/**
|
|
141
|
+
* The amount of USD, in cents, that the total USD value of a transaction's asset transfer and exposure should be compared to.
|
|
142
|
+
*/
|
|
143
|
+
changeCents: z.ZodNumber;
|
|
144
|
+
/**
|
|
145
|
+
* The operator to use for the comparison. The total value of a transaction's asset transfer and exposure in USD will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
|
|
146
|
+
*/
|
|
147
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
148
|
+
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
type: "netUSDChange";
|
|
150
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
151
|
+
changeCents: number;
|
|
152
|
+
}, {
|
|
153
|
+
type: "netUSDChange";
|
|
154
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
155
|
+
changeCents: number;
|
|
156
|
+
}>;
|
|
157
|
+
export type NetUSDChangeCriterion = z.infer<typeof NetUSDChangeCriterionSchema>;
|
|
158
|
+
/**
|
|
159
|
+
* Schema for EVM typed address conditions
|
|
160
|
+
*/
|
|
161
|
+
export declare const EvmTypedAddressConditionSchema: z.ZodObject<{
|
|
162
|
+
/**
|
|
163
|
+
* Array of EVM addresses to compare against.
|
|
164
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
165
|
+
* Limited to a maximum of 300 addresses per condition.
|
|
166
|
+
*/
|
|
167
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
168
|
+
/**
|
|
169
|
+
* The operator to use for evaluating 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
|
+
/**
|
|
175
|
+
* The path to the field to compare against this criterion.
|
|
176
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.buyer").
|
|
177
|
+
*/
|
|
178
|
+
path: z.ZodString;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
path: string;
|
|
181
|
+
operator: "in" | "not in";
|
|
182
|
+
addresses: `0x${string}`[];
|
|
183
|
+
}, {
|
|
184
|
+
path: string;
|
|
185
|
+
operator: "in" | "not in";
|
|
186
|
+
addresses: string[];
|
|
187
|
+
}>;
|
|
188
|
+
export type EvmTypedAddressCondition = z.infer<typeof EvmTypedAddressConditionSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* Schema for EVM typed numerical conditions
|
|
191
|
+
*/
|
|
192
|
+
export declare const EvmTypedNumericalConditionSchema: z.ZodObject<{
|
|
193
|
+
/**
|
|
194
|
+
* The numerical value to compare against, as a string.
|
|
195
|
+
* Must contain only digits.
|
|
196
|
+
*/
|
|
197
|
+
value: z.ZodString;
|
|
198
|
+
/**
|
|
199
|
+
* The comparison operator to use.
|
|
200
|
+
*/
|
|
201
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
202
|
+
/**
|
|
203
|
+
* The path to the field to compare against this criterion.
|
|
204
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.price").
|
|
205
|
+
*/
|
|
206
|
+
path: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
value: string;
|
|
209
|
+
path: string;
|
|
210
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
211
|
+
}, {
|
|
212
|
+
value: string;
|
|
213
|
+
path: string;
|
|
214
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
215
|
+
}>;
|
|
216
|
+
export type EvmTypedNumericalCondition = z.infer<typeof EvmTypedNumericalConditionSchema>;
|
|
217
|
+
/**
|
|
218
|
+
* Schema for EVM typed string conditions
|
|
219
|
+
*/
|
|
220
|
+
export declare const EvmTypedStringConditionSchema: z.ZodObject<{
|
|
221
|
+
/**
|
|
222
|
+
* A regular expression the string field is matched against.
|
|
223
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
224
|
+
*/
|
|
225
|
+
match: z.ZodString;
|
|
226
|
+
/**
|
|
227
|
+
* The path to the field to compare against this criterion.
|
|
228
|
+
* To reference deeply nested fields, use dot notation (e.g., "metadata.description").
|
|
229
|
+
*/
|
|
230
|
+
path: z.ZodString;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
match: string;
|
|
233
|
+
path: string;
|
|
234
|
+
}, {
|
|
235
|
+
match: string;
|
|
236
|
+
path: string;
|
|
237
|
+
}>;
|
|
238
|
+
export type EvmTypedStringCondition = z.infer<typeof EvmTypedStringConditionSchema>;
|
|
239
|
+
/**
|
|
240
|
+
* Schema for SignEvmTypedData field criterion
|
|
241
|
+
*/
|
|
242
|
+
export declare const SignEvmTypedDataFieldCriterionSchema: z.ZodObject<{
|
|
243
|
+
/** The type of criterion, must be "evmTypedDataField" for typed data field-based rules. */
|
|
244
|
+
type: z.ZodLiteral<"evmTypedDataField">;
|
|
245
|
+
/**
|
|
246
|
+
* The EIP-712 type definitions for the typed data.
|
|
247
|
+
* Must include at minimum the primary type being signed.
|
|
248
|
+
*/
|
|
249
|
+
types: z.ZodObject<{
|
|
250
|
+
/**
|
|
251
|
+
* EIP-712 compliant map of model names to model definitions.
|
|
252
|
+
*/
|
|
253
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
254
|
+
name: z.ZodString;
|
|
255
|
+
type: z.ZodString;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
type: string;
|
|
258
|
+
name: string;
|
|
259
|
+
}, {
|
|
260
|
+
type: string;
|
|
261
|
+
name: string;
|
|
262
|
+
}>, "many">>;
|
|
263
|
+
/**
|
|
264
|
+
* The name of the root EIP-712 type. This value must be included in the `types` object.
|
|
265
|
+
*/
|
|
266
|
+
primaryType: z.ZodString;
|
|
267
|
+
}, "strip", z.ZodTypeAny, {
|
|
268
|
+
types: Record<string, {
|
|
269
|
+
type: string;
|
|
270
|
+
name: string;
|
|
271
|
+
}[]>;
|
|
272
|
+
primaryType: string;
|
|
273
|
+
}, {
|
|
274
|
+
types: Record<string, {
|
|
275
|
+
type: string;
|
|
276
|
+
name: string;
|
|
277
|
+
}[]>;
|
|
278
|
+
primaryType: string;
|
|
279
|
+
}>;
|
|
280
|
+
/**
|
|
281
|
+
* Array of conditions to apply against typed data fields.
|
|
282
|
+
* Each condition specifies how to validate a specific field within the typed data.
|
|
283
|
+
*/
|
|
284
|
+
conditions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
285
|
+
/**
|
|
286
|
+
* Array of EVM addresses to compare against.
|
|
287
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
288
|
+
* Limited to a maximum of 300 addresses per condition.
|
|
289
|
+
*/
|
|
290
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
291
|
+
/**
|
|
292
|
+
* The operator to use for evaluating addresses.
|
|
293
|
+
* "in" checks if an address is in the provided list.
|
|
294
|
+
* "not in" checks if an address is not in the provided list.
|
|
295
|
+
*/
|
|
296
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
297
|
+
/**
|
|
298
|
+
* The path to the field to compare against this criterion.
|
|
299
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.buyer").
|
|
300
|
+
*/
|
|
301
|
+
path: z.ZodString;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
path: string;
|
|
304
|
+
operator: "in" | "not in";
|
|
305
|
+
addresses: `0x${string}`[];
|
|
306
|
+
}, {
|
|
307
|
+
path: string;
|
|
308
|
+
operator: "in" | "not in";
|
|
309
|
+
addresses: string[];
|
|
310
|
+
}>, z.ZodObject<{
|
|
311
|
+
/**
|
|
312
|
+
* The numerical value to compare against, as a string.
|
|
313
|
+
* Must contain only digits.
|
|
314
|
+
*/
|
|
315
|
+
value: z.ZodString;
|
|
316
|
+
/**
|
|
317
|
+
* The comparison operator to use.
|
|
318
|
+
*/
|
|
319
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
320
|
+
/**
|
|
321
|
+
* The path to the field to compare against this criterion.
|
|
322
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.price").
|
|
323
|
+
*/
|
|
324
|
+
path: z.ZodString;
|
|
325
|
+
}, "strip", z.ZodTypeAny, {
|
|
326
|
+
value: string;
|
|
327
|
+
path: string;
|
|
328
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
329
|
+
}, {
|
|
330
|
+
value: string;
|
|
331
|
+
path: string;
|
|
332
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
333
|
+
}>, z.ZodObject<{
|
|
334
|
+
/**
|
|
335
|
+
* A regular expression the string field is matched against.
|
|
336
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
337
|
+
*/
|
|
338
|
+
match: z.ZodString;
|
|
339
|
+
/**
|
|
340
|
+
* The path to the field to compare against this criterion.
|
|
341
|
+
* To reference deeply nested fields, use dot notation (e.g., "metadata.description").
|
|
342
|
+
*/
|
|
343
|
+
path: z.ZodString;
|
|
344
|
+
}, "strip", z.ZodTypeAny, {
|
|
345
|
+
match: string;
|
|
346
|
+
path: string;
|
|
347
|
+
}, {
|
|
348
|
+
match: string;
|
|
349
|
+
path: string;
|
|
350
|
+
}>]>, "many">;
|
|
351
|
+
}, "strip", z.ZodTypeAny, {
|
|
352
|
+
type: "evmTypedDataField";
|
|
353
|
+
types: {
|
|
354
|
+
types: Record<string, {
|
|
355
|
+
type: string;
|
|
356
|
+
name: string;
|
|
357
|
+
}[]>;
|
|
358
|
+
primaryType: string;
|
|
359
|
+
};
|
|
360
|
+
conditions: ({
|
|
361
|
+
path: string;
|
|
362
|
+
operator: "in" | "not in";
|
|
363
|
+
addresses: `0x${string}`[];
|
|
364
|
+
} | {
|
|
365
|
+
value: string;
|
|
366
|
+
path: string;
|
|
367
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
368
|
+
} | {
|
|
369
|
+
match: string;
|
|
370
|
+
path: string;
|
|
371
|
+
})[];
|
|
372
|
+
}, {
|
|
373
|
+
type: "evmTypedDataField";
|
|
374
|
+
types: {
|
|
375
|
+
types: Record<string, {
|
|
376
|
+
type: string;
|
|
377
|
+
name: string;
|
|
378
|
+
}[]>;
|
|
379
|
+
primaryType: string;
|
|
380
|
+
};
|
|
381
|
+
conditions: ({
|
|
382
|
+
path: string;
|
|
383
|
+
operator: "in" | "not in";
|
|
384
|
+
addresses: string[];
|
|
385
|
+
} | {
|
|
386
|
+
value: string;
|
|
387
|
+
path: string;
|
|
388
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
389
|
+
} | {
|
|
390
|
+
match: string;
|
|
391
|
+
path: string;
|
|
392
|
+
})[];
|
|
393
|
+
}>;
|
|
394
|
+
export type SignEvmTypedDataFieldCriterion = z.infer<typeof SignEvmTypedDataFieldCriterionSchema>;
|
|
395
|
+
/**
|
|
396
|
+
* Schema for SignEvmTypedData verifying contract criterion
|
|
397
|
+
*/
|
|
398
|
+
export declare const SignEvmTypedDataVerifyingContractCriterionSchema: z.ZodObject<{
|
|
399
|
+
/** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */
|
|
400
|
+
type: z.ZodLiteral<"evmTypedDataVerifyingContract">;
|
|
401
|
+
/**
|
|
402
|
+
* Array of EVM addresses allowed or disallowed as verifying contracts.
|
|
403
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
404
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
405
|
+
*/
|
|
406
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
407
|
+
/**
|
|
408
|
+
* The operator to use for evaluating verifying contract addresses.
|
|
409
|
+
* "in" checks if the verifying contract is in the provided list.
|
|
410
|
+
* "not in" checks if the verifying contract is not in the provided list.
|
|
411
|
+
*/
|
|
412
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
413
|
+
}, "strip", z.ZodTypeAny, {
|
|
414
|
+
type: "evmTypedDataVerifyingContract";
|
|
415
|
+
operator: "in" | "not in";
|
|
416
|
+
addresses: `0x${string}`[];
|
|
417
|
+
}, {
|
|
418
|
+
type: "evmTypedDataVerifyingContract";
|
|
419
|
+
operator: "in" | "not in";
|
|
420
|
+
addresses: string[];
|
|
421
|
+
}>;
|
|
422
|
+
export type SignEvmTypedDataVerifyingContractCriterion = z.infer<typeof SignEvmTypedDataVerifyingContractCriterionSchema>;
|
|
423
|
+
/**
|
|
424
|
+
* Schema for criteria used in SignEvmTypedData operations
|
|
425
|
+
*/
|
|
426
|
+
export declare const SignEvmTypedDataCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
427
|
+
/** The type of criterion, must be "evmTypedDataField" for typed data field-based rules. */
|
|
428
|
+
type: z.ZodLiteral<"evmTypedDataField">;
|
|
429
|
+
/**
|
|
430
|
+
* The EIP-712 type definitions for the typed data.
|
|
431
|
+
* Must include at minimum the primary type being signed.
|
|
432
|
+
*/
|
|
433
|
+
types: z.ZodObject<{
|
|
434
|
+
/**
|
|
435
|
+
* EIP-712 compliant map of model names to model definitions.
|
|
436
|
+
*/
|
|
437
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
438
|
+
name: z.ZodString;
|
|
439
|
+
type: z.ZodString;
|
|
440
|
+
}, "strip", z.ZodTypeAny, {
|
|
441
|
+
type: string;
|
|
442
|
+
name: string;
|
|
443
|
+
}, {
|
|
444
|
+
type: string;
|
|
445
|
+
name: string;
|
|
446
|
+
}>, "many">>;
|
|
447
|
+
/**
|
|
448
|
+
* The name of the root EIP-712 type. This value must be included in the `types` object.
|
|
449
|
+
*/
|
|
450
|
+
primaryType: z.ZodString;
|
|
451
|
+
}, "strip", z.ZodTypeAny, {
|
|
452
|
+
types: Record<string, {
|
|
453
|
+
type: string;
|
|
454
|
+
name: string;
|
|
455
|
+
}[]>;
|
|
456
|
+
primaryType: string;
|
|
457
|
+
}, {
|
|
458
|
+
types: Record<string, {
|
|
459
|
+
type: string;
|
|
460
|
+
name: string;
|
|
461
|
+
}[]>;
|
|
462
|
+
primaryType: string;
|
|
463
|
+
}>;
|
|
464
|
+
/**
|
|
465
|
+
* Array of conditions to apply against typed data fields.
|
|
466
|
+
* Each condition specifies how to validate a specific field within the typed data.
|
|
467
|
+
*/
|
|
468
|
+
conditions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
469
|
+
/**
|
|
470
|
+
* Array of EVM addresses to compare against.
|
|
471
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
472
|
+
* Limited to a maximum of 300 addresses per condition.
|
|
473
|
+
*/
|
|
474
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
475
|
+
/**
|
|
476
|
+
* The operator to use for evaluating addresses.
|
|
477
|
+
* "in" checks if an address is in the provided list.
|
|
478
|
+
* "not in" checks if an address is not in the provided list.
|
|
479
|
+
*/
|
|
480
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
481
|
+
/**
|
|
482
|
+
* The path to the field to compare against this criterion.
|
|
483
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.buyer").
|
|
484
|
+
*/
|
|
485
|
+
path: z.ZodString;
|
|
486
|
+
}, "strip", z.ZodTypeAny, {
|
|
487
|
+
path: string;
|
|
488
|
+
operator: "in" | "not in";
|
|
489
|
+
addresses: `0x${string}`[];
|
|
490
|
+
}, {
|
|
491
|
+
path: string;
|
|
492
|
+
operator: "in" | "not in";
|
|
493
|
+
addresses: string[];
|
|
494
|
+
}>, z.ZodObject<{
|
|
495
|
+
/**
|
|
496
|
+
* The numerical value to compare against, as a string.
|
|
497
|
+
* Must contain only digits.
|
|
498
|
+
*/
|
|
499
|
+
value: z.ZodString;
|
|
500
|
+
/**
|
|
501
|
+
* The comparison operator to use.
|
|
502
|
+
*/
|
|
503
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
504
|
+
/**
|
|
505
|
+
* The path to the field to compare against this criterion.
|
|
506
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.price").
|
|
507
|
+
*/
|
|
508
|
+
path: z.ZodString;
|
|
509
|
+
}, "strip", z.ZodTypeAny, {
|
|
510
|
+
value: string;
|
|
511
|
+
path: string;
|
|
512
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
513
|
+
}, {
|
|
514
|
+
value: string;
|
|
515
|
+
path: string;
|
|
516
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
517
|
+
}>, z.ZodObject<{
|
|
518
|
+
/**
|
|
519
|
+
* A regular expression the string field is matched against.
|
|
520
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
521
|
+
*/
|
|
522
|
+
match: z.ZodString;
|
|
523
|
+
/**
|
|
524
|
+
* The path to the field to compare against this criterion.
|
|
525
|
+
* To reference deeply nested fields, use dot notation (e.g., "metadata.description").
|
|
526
|
+
*/
|
|
527
|
+
path: z.ZodString;
|
|
528
|
+
}, "strip", z.ZodTypeAny, {
|
|
529
|
+
match: string;
|
|
530
|
+
path: string;
|
|
531
|
+
}, {
|
|
532
|
+
match: string;
|
|
533
|
+
path: string;
|
|
534
|
+
}>]>, "many">;
|
|
535
|
+
}, "strip", z.ZodTypeAny, {
|
|
536
|
+
type: "evmTypedDataField";
|
|
537
|
+
types: {
|
|
538
|
+
types: Record<string, {
|
|
539
|
+
type: string;
|
|
540
|
+
name: string;
|
|
541
|
+
}[]>;
|
|
542
|
+
primaryType: string;
|
|
543
|
+
};
|
|
544
|
+
conditions: ({
|
|
545
|
+
path: string;
|
|
546
|
+
operator: "in" | "not in";
|
|
547
|
+
addresses: `0x${string}`[];
|
|
548
|
+
} | {
|
|
549
|
+
value: string;
|
|
550
|
+
path: string;
|
|
551
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
552
|
+
} | {
|
|
553
|
+
match: string;
|
|
554
|
+
path: string;
|
|
555
|
+
})[];
|
|
556
|
+
}, {
|
|
557
|
+
type: "evmTypedDataField";
|
|
558
|
+
types: {
|
|
559
|
+
types: Record<string, {
|
|
560
|
+
type: string;
|
|
561
|
+
name: string;
|
|
562
|
+
}[]>;
|
|
563
|
+
primaryType: string;
|
|
564
|
+
};
|
|
565
|
+
conditions: ({
|
|
566
|
+
path: string;
|
|
567
|
+
operator: "in" | "not in";
|
|
568
|
+
addresses: string[];
|
|
569
|
+
} | {
|
|
570
|
+
value: string;
|
|
571
|
+
path: string;
|
|
572
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
573
|
+
} | {
|
|
574
|
+
match: string;
|
|
575
|
+
path: string;
|
|
576
|
+
})[];
|
|
577
|
+
}>, z.ZodObject<{
|
|
578
|
+
/** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */
|
|
579
|
+
type: z.ZodLiteral<"evmTypedDataVerifyingContract">;
|
|
580
|
+
/**
|
|
581
|
+
* Array of EVM addresses allowed or disallowed as verifying contracts.
|
|
582
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
583
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
584
|
+
*/
|
|
585
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
586
|
+
/**
|
|
587
|
+
* The operator to use for evaluating verifying contract addresses.
|
|
588
|
+
* "in" checks if the verifying contract is in the provided list.
|
|
589
|
+
* "not in" checks if the verifying contract is not in the provided list.
|
|
590
|
+
*/
|
|
591
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
592
|
+
}, "strip", z.ZodTypeAny, {
|
|
593
|
+
type: "evmTypedDataVerifyingContract";
|
|
594
|
+
operator: "in" | "not in";
|
|
595
|
+
addresses: `0x${string}`[];
|
|
596
|
+
}, {
|
|
597
|
+
type: "evmTypedDataVerifyingContract";
|
|
598
|
+
operator: "in" | "not in";
|
|
599
|
+
addresses: string[];
|
|
600
|
+
}>]>, "many">;
|
|
601
|
+
/**
|
|
602
|
+
* Type representing a set of criteria for the signEvmTypedData operation.
|
|
603
|
+
* Can contain up to 10 individual criterion objects for typed data field or verifying contract checks.
|
|
604
|
+
*/
|
|
605
|
+
export type SignEvmTypedDataCriteria = z.infer<typeof SignEvmTypedDataCriteriaSchema>;
|
|
606
|
+
/**
|
|
607
|
+
* A list of comparables to apply against encoded arguments in the transaction's `data` field.
|
|
608
|
+
*/
|
|
609
|
+
export declare const EvmDataParameterConditionListSchema: z.ZodObject<{
|
|
610
|
+
/**
|
|
611
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
612
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
613
|
+
*/
|
|
614
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
615
|
+
/**
|
|
616
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
617
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
618
|
+
*/
|
|
619
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
620
|
+
/**
|
|
621
|
+
* Values to compare against the resolved `name` value.
|
|
622
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
623
|
+
* should be encoded, and which operators are supported for each type.
|
|
624
|
+
*/
|
|
625
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
626
|
+
}, "strip", z.ZodTypeAny, {
|
|
627
|
+
values: string[];
|
|
628
|
+
name: string;
|
|
629
|
+
operator: "in" | "not in";
|
|
630
|
+
}, {
|
|
631
|
+
values: string[];
|
|
632
|
+
name: string;
|
|
633
|
+
operator: "in" | "not in";
|
|
634
|
+
}>;
|
|
635
|
+
export type EvmDataParameterConditionList = z.infer<typeof EvmDataParameterConditionListSchema>;
|
|
636
|
+
/**
|
|
637
|
+
* A single condition to apply against encoded arguments in the transaction's `data` field.
|
|
638
|
+
*/
|
|
639
|
+
export declare const EvmDataParameterConditionSchema: z.ZodObject<{
|
|
640
|
+
/**
|
|
641
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
642
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
643
|
+
*/
|
|
644
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
645
|
+
/**
|
|
646
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
647
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
648
|
+
*/
|
|
649
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
650
|
+
/**
|
|
651
|
+
* A single value to compare the value resolved at `name` to.
|
|
652
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
653
|
+
* should be encoded, and which operators are supported for each type.
|
|
654
|
+
*/
|
|
655
|
+
value: z.ZodString;
|
|
656
|
+
}, "strip", z.ZodTypeAny, {
|
|
657
|
+
value: string;
|
|
658
|
+
name: string;
|
|
659
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
660
|
+
}, {
|
|
661
|
+
value: string;
|
|
662
|
+
name: string;
|
|
663
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
664
|
+
}>;
|
|
665
|
+
export type EvmDataParameterCondition = z.infer<typeof EvmDataParameterConditionSchema>;
|
|
666
|
+
/**
|
|
667
|
+
* A single condition to apply against the function and encoded arguments in the transaction's `data` field.
|
|
668
|
+
* Each `parameter` configuration must be successfully evaluated against the corresponding function argument
|
|
669
|
+
* in order for a policy to be accepted.
|
|
670
|
+
*/
|
|
671
|
+
export declare const EvmDataConditionSchema: z.ZodObject<{
|
|
672
|
+
/**
|
|
673
|
+
* The name of a smart contract function being called.
|
|
674
|
+
*/
|
|
675
|
+
function: z.ZodString;
|
|
676
|
+
/**
|
|
677
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
678
|
+
*/
|
|
679
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
680
|
+
/**
|
|
681
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
682
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
683
|
+
*/
|
|
684
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
685
|
+
/**
|
|
686
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
687
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
688
|
+
*/
|
|
689
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
690
|
+
/**
|
|
691
|
+
* A single value to compare the value resolved at `name` to.
|
|
692
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
693
|
+
* should be encoded, and which operators are supported for each type.
|
|
694
|
+
*/
|
|
695
|
+
value: z.ZodString;
|
|
696
|
+
}, "strip", z.ZodTypeAny, {
|
|
697
|
+
value: string;
|
|
698
|
+
name: string;
|
|
699
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
700
|
+
}, {
|
|
701
|
+
value: string;
|
|
702
|
+
name: string;
|
|
703
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
704
|
+
}>, z.ZodObject<{
|
|
705
|
+
/**
|
|
706
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
707
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
708
|
+
*/
|
|
709
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
710
|
+
/**
|
|
711
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
712
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
713
|
+
*/
|
|
714
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
715
|
+
/**
|
|
716
|
+
* Values to compare against the resolved `name` value.
|
|
717
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
718
|
+
* should be encoded, and which operators are supported for each type.
|
|
719
|
+
*/
|
|
720
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
721
|
+
}, "strip", z.ZodTypeAny, {
|
|
722
|
+
values: string[];
|
|
723
|
+
name: string;
|
|
724
|
+
operator: "in" | "not in";
|
|
725
|
+
}, {
|
|
726
|
+
values: string[];
|
|
727
|
+
name: string;
|
|
728
|
+
operator: "in" | "not in";
|
|
729
|
+
}>]>, "many">>;
|
|
730
|
+
}, "strip", z.ZodTypeAny, {
|
|
731
|
+
function: string;
|
|
732
|
+
params?: ({
|
|
733
|
+
values: string[];
|
|
734
|
+
name: string;
|
|
735
|
+
operator: "in" | "not in";
|
|
736
|
+
} | {
|
|
737
|
+
value: string;
|
|
738
|
+
name: string;
|
|
739
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
740
|
+
})[] | undefined;
|
|
741
|
+
}, {
|
|
742
|
+
function: string;
|
|
743
|
+
params?: ({
|
|
744
|
+
values: string[];
|
|
745
|
+
name: string;
|
|
746
|
+
operator: "in" | "not in";
|
|
747
|
+
} | {
|
|
748
|
+
value: string;
|
|
749
|
+
name: string;
|
|
750
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
751
|
+
})[] | undefined;
|
|
752
|
+
}>;
|
|
753
|
+
export type EvmDataCondition = z.infer<typeof EvmDataConditionSchema>;
|
|
754
|
+
/**
|
|
755
|
+
* Schema for EVM data criterion
|
|
756
|
+
*/
|
|
757
|
+
export declare const EvmDataCriterionSchema: z.ZodObject<{
|
|
758
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
759
|
+
type: z.ZodLiteral<"evmData">;
|
|
760
|
+
/**
|
|
761
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
762
|
+
*/
|
|
763
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
764
|
+
type: z.ZodLiteral<"error">;
|
|
765
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
766
|
+
/**
|
|
767
|
+
* Schema for SignEvmTypedData field criterion
|
|
768
|
+
*/
|
|
769
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
770
|
+
name: z.ZodString;
|
|
771
|
+
}, "strip", z.ZodTypeAny, {
|
|
772
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
773
|
+
type: "error";
|
|
774
|
+
name: string;
|
|
775
|
+
}, {
|
|
776
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
777
|
+
type: "error";
|
|
778
|
+
name: string;
|
|
779
|
+
}>, z.ZodObject<{
|
|
780
|
+
type: z.ZodLiteral<"event">;
|
|
781
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
782
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
783
|
+
name: z.ZodString;
|
|
784
|
+
}, "strip", z.ZodTypeAny, {
|
|
785
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
786
|
+
type: "event";
|
|
787
|
+
name: string;
|
|
788
|
+
anonymous?: boolean | undefined;
|
|
789
|
+
}, {
|
|
790
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
791
|
+
type: "event";
|
|
792
|
+
name: string;
|
|
793
|
+
anonymous?: boolean | undefined;
|
|
794
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
795
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
796
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
797
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
798
|
+
}, "strip", z.ZodTypeAny, {
|
|
799
|
+
payable?: boolean | undefined;
|
|
800
|
+
constant?: boolean | undefined;
|
|
801
|
+
gas?: number | undefined;
|
|
802
|
+
}, {
|
|
803
|
+
payable?: boolean | undefined;
|
|
804
|
+
constant?: boolean | undefined;
|
|
805
|
+
gas?: number | undefined;
|
|
806
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
807
|
+
type: z.ZodLiteral<"function">;
|
|
808
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
809
|
+
name: z.ZodString;
|
|
810
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
811
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
812
|
+
}, "strip", z.ZodTypeAny, {
|
|
813
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
814
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
815
|
+
type: "function";
|
|
816
|
+
name: string;
|
|
817
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
818
|
+
}, {
|
|
819
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
820
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
821
|
+
type: "function";
|
|
822
|
+
name: string;
|
|
823
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
824
|
+
}>, z.ZodObject<{
|
|
825
|
+
type: z.ZodLiteral<"constructor">;
|
|
826
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
827
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
828
|
+
}, "strip", z.ZodTypeAny, {
|
|
829
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
830
|
+
type: "constructor";
|
|
831
|
+
stateMutability: "nonpayable" | "payable";
|
|
832
|
+
}, {
|
|
833
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
834
|
+
type: "constructor";
|
|
835
|
+
stateMutability: "nonpayable" | "payable";
|
|
836
|
+
}>, z.ZodObject<{
|
|
837
|
+
type: z.ZodLiteral<"fallback">;
|
|
838
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
839
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
840
|
+
}, "strip", z.ZodTypeAny, {
|
|
841
|
+
type: "fallback";
|
|
842
|
+
stateMutability: "nonpayable" | "payable";
|
|
843
|
+
inputs?: [] | undefined;
|
|
844
|
+
}, {
|
|
845
|
+
type: "fallback";
|
|
846
|
+
stateMutability: "nonpayable" | "payable";
|
|
847
|
+
inputs?: [] | undefined;
|
|
848
|
+
}>, z.ZodObject<{
|
|
849
|
+
type: z.ZodLiteral<"receive">;
|
|
850
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
851
|
+
}, "strip", z.ZodTypeAny, {
|
|
852
|
+
type: "receive";
|
|
853
|
+
stateMutability: "payable";
|
|
854
|
+
}, {
|
|
855
|
+
type: "receive";
|
|
856
|
+
stateMutability: "payable";
|
|
857
|
+
}>]>>, {
|
|
858
|
+
payable?: boolean | undefined;
|
|
859
|
+
constant?: boolean | undefined;
|
|
860
|
+
gas?: number | undefined;
|
|
861
|
+
} & ({
|
|
862
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
863
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
864
|
+
type: "function";
|
|
865
|
+
name: string;
|
|
866
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
867
|
+
} | {
|
|
868
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
869
|
+
type: "constructor";
|
|
870
|
+
stateMutability: "nonpayable" | "payable";
|
|
871
|
+
} | {
|
|
872
|
+
type: "fallback";
|
|
873
|
+
stateMutability: "nonpayable" | "payable";
|
|
874
|
+
inputs?: [] | undefined;
|
|
875
|
+
} | {
|
|
876
|
+
type: "receive";
|
|
877
|
+
stateMutability: "payable";
|
|
878
|
+
}), unknown>]>, "many">>]>;
|
|
879
|
+
/**
|
|
880
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
881
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
882
|
+
*/
|
|
883
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
884
|
+
/**
|
|
885
|
+
* The name of a smart contract function being called.
|
|
886
|
+
*/
|
|
887
|
+
function: z.ZodString;
|
|
888
|
+
/**
|
|
889
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
890
|
+
*/
|
|
891
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
892
|
+
/**
|
|
893
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
894
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
895
|
+
*/
|
|
896
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
897
|
+
/**
|
|
898
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
899
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
900
|
+
*/
|
|
901
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
902
|
+
/**
|
|
903
|
+
* A single value to compare the value resolved at `name` to.
|
|
904
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
905
|
+
* should be encoded, and which operators are supported for each type.
|
|
906
|
+
*/
|
|
907
|
+
value: z.ZodString;
|
|
908
|
+
}, "strip", z.ZodTypeAny, {
|
|
909
|
+
value: string;
|
|
910
|
+
name: string;
|
|
911
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
912
|
+
}, {
|
|
913
|
+
value: string;
|
|
914
|
+
name: string;
|
|
915
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
916
|
+
}>, z.ZodObject<{
|
|
917
|
+
/**
|
|
918
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
919
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
920
|
+
*/
|
|
921
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
922
|
+
/**
|
|
923
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
924
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
925
|
+
*/
|
|
926
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
927
|
+
/**
|
|
928
|
+
* Values to compare against the resolved `name` value.
|
|
929
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
930
|
+
* should be encoded, and which operators are supported for each type.
|
|
931
|
+
*/
|
|
932
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
933
|
+
}, "strip", z.ZodTypeAny, {
|
|
934
|
+
values: string[];
|
|
935
|
+
name: string;
|
|
936
|
+
operator: "in" | "not in";
|
|
937
|
+
}, {
|
|
938
|
+
values: string[];
|
|
939
|
+
name: string;
|
|
940
|
+
operator: "in" | "not in";
|
|
941
|
+
}>]>, "many">>;
|
|
942
|
+
}, "strip", z.ZodTypeAny, {
|
|
943
|
+
function: string;
|
|
944
|
+
params?: ({
|
|
945
|
+
values: string[];
|
|
946
|
+
name: string;
|
|
947
|
+
operator: "in" | "not in";
|
|
948
|
+
} | {
|
|
949
|
+
value: string;
|
|
950
|
+
name: string;
|
|
951
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
952
|
+
})[] | undefined;
|
|
953
|
+
}, {
|
|
954
|
+
function: string;
|
|
955
|
+
params?: ({
|
|
956
|
+
values: string[];
|
|
957
|
+
name: string;
|
|
958
|
+
operator: "in" | "not in";
|
|
959
|
+
} | {
|
|
960
|
+
value: string;
|
|
961
|
+
name: string;
|
|
962
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
963
|
+
})[] | undefined;
|
|
964
|
+
}>, "many">;
|
|
965
|
+
}, "strip", z.ZodTypeAny, {
|
|
966
|
+
type: "evmData";
|
|
967
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
968
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
969
|
+
type: "error";
|
|
970
|
+
name: string;
|
|
971
|
+
} | {
|
|
972
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
973
|
+
type: "event";
|
|
974
|
+
name: string;
|
|
975
|
+
anonymous?: boolean | undefined;
|
|
976
|
+
} | ({
|
|
977
|
+
payable?: boolean | undefined;
|
|
978
|
+
constant?: boolean | undefined;
|
|
979
|
+
gas?: number | undefined;
|
|
980
|
+
} & ({
|
|
981
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
982
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
983
|
+
type: "function";
|
|
984
|
+
name: string;
|
|
985
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
986
|
+
} | {
|
|
987
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
988
|
+
type: "constructor";
|
|
989
|
+
stateMutability: "nonpayable" | "payable";
|
|
990
|
+
} | {
|
|
991
|
+
type: "fallback";
|
|
992
|
+
stateMutability: "nonpayable" | "payable";
|
|
993
|
+
inputs?: [] | undefined;
|
|
994
|
+
} | {
|
|
995
|
+
type: "receive";
|
|
996
|
+
stateMutability: "payable";
|
|
997
|
+
})))[];
|
|
998
|
+
conditions: {
|
|
999
|
+
function: string;
|
|
1000
|
+
params?: ({
|
|
1001
|
+
values: string[];
|
|
1002
|
+
name: string;
|
|
1003
|
+
operator: "in" | "not in";
|
|
1004
|
+
} | {
|
|
1005
|
+
value: string;
|
|
1006
|
+
name: string;
|
|
1007
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1008
|
+
})[] | undefined;
|
|
1009
|
+
}[];
|
|
1010
|
+
}, {
|
|
1011
|
+
type: "evmData";
|
|
1012
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
1013
|
+
conditions: {
|
|
1014
|
+
function: string;
|
|
1015
|
+
params?: ({
|
|
1016
|
+
values: string[];
|
|
1017
|
+
name: string;
|
|
1018
|
+
operator: "in" | "not in";
|
|
1019
|
+
} | {
|
|
1020
|
+
value: string;
|
|
1021
|
+
name: string;
|
|
1022
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1023
|
+
})[] | undefined;
|
|
1024
|
+
}[];
|
|
1025
|
+
}>;
|
|
1026
|
+
export type EvmDataCriterion = z.infer<typeof EvmDataCriterionSchema>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Schema for criteria used in SignEvmTransaction operations
|
|
1029
|
+
*/
|
|
1030
|
+
export declare const SignEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1031
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
1032
|
+
type: z.ZodLiteral<"ethValue">;
|
|
1033
|
+
/**
|
|
1034
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
1035
|
+
* Must contain only digits.
|
|
1036
|
+
*/
|
|
1037
|
+
ethValue: z.ZodString;
|
|
1038
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
1039
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1040
|
+
}, "strip", z.ZodTypeAny, {
|
|
1041
|
+
ethValue: string;
|
|
1042
|
+
type: "ethValue";
|
|
1043
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1044
|
+
}, {
|
|
1045
|
+
ethValue: string;
|
|
1046
|
+
type: "ethValue";
|
|
1047
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1048
|
+
}>, z.ZodObject<{
|
|
1049
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
1050
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
1051
|
+
/**
|
|
1052
|
+
* Array of EVM addresses to compare against.
|
|
1053
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
1054
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
1055
|
+
*/
|
|
1056
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
1057
|
+
/**
|
|
1058
|
+
* The operator to use for evaluating transaction addresses.
|
|
1059
|
+
* "in" checks if an address is in the provided list.
|
|
1060
|
+
* "not in" checks if an address is not in the provided list.
|
|
1061
|
+
*/
|
|
1062
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1063
|
+
}, "strip", z.ZodTypeAny, {
|
|
1064
|
+
type: "evmAddress";
|
|
1065
|
+
operator: "in" | "not in";
|
|
1066
|
+
addresses: `0x${string}`[];
|
|
1067
|
+
}, {
|
|
1068
|
+
type: "evmAddress";
|
|
1069
|
+
operator: "in" | "not in";
|
|
1070
|
+
addresses: string[];
|
|
1071
|
+
}>, z.ZodObject<{
|
|
1072
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
1073
|
+
type: z.ZodLiteral<"evmData">;
|
|
1074
|
+
/**
|
|
1075
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
1076
|
+
*/
|
|
1077
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1078
|
+
type: z.ZodLiteral<"error">;
|
|
1079
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
1080
|
+
/**
|
|
1081
|
+
* Schema for SignEvmTypedData field criterion
|
|
1082
|
+
*/
|
|
1083
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1084
|
+
name: z.ZodString;
|
|
1085
|
+
}, "strip", z.ZodTypeAny, {
|
|
1086
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1087
|
+
type: "error";
|
|
1088
|
+
name: string;
|
|
1089
|
+
}, {
|
|
1090
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1091
|
+
type: "error";
|
|
1092
|
+
name: string;
|
|
1093
|
+
}>, z.ZodObject<{
|
|
1094
|
+
type: z.ZodLiteral<"event">;
|
|
1095
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
1096
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
1097
|
+
name: z.ZodString;
|
|
1098
|
+
}, "strip", z.ZodTypeAny, {
|
|
1099
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1100
|
+
type: "event";
|
|
1101
|
+
name: string;
|
|
1102
|
+
anonymous?: boolean | undefined;
|
|
1103
|
+
}, {
|
|
1104
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1105
|
+
type: "event";
|
|
1106
|
+
name: string;
|
|
1107
|
+
anonymous?: boolean | undefined;
|
|
1108
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
1109
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
1110
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
1111
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
1112
|
+
}, "strip", z.ZodTypeAny, {
|
|
1113
|
+
payable?: boolean | undefined;
|
|
1114
|
+
constant?: boolean | undefined;
|
|
1115
|
+
gas?: number | undefined;
|
|
1116
|
+
}, {
|
|
1117
|
+
payable?: boolean | undefined;
|
|
1118
|
+
constant?: boolean | undefined;
|
|
1119
|
+
gas?: number | undefined;
|
|
1120
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1121
|
+
type: z.ZodLiteral<"function">;
|
|
1122
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1123
|
+
name: z.ZodString;
|
|
1124
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1125
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
1126
|
+
}, "strip", z.ZodTypeAny, {
|
|
1127
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1128
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1129
|
+
type: "function";
|
|
1130
|
+
name: string;
|
|
1131
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1132
|
+
}, {
|
|
1133
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1134
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1135
|
+
type: "function";
|
|
1136
|
+
name: string;
|
|
1137
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1138
|
+
}>, z.ZodObject<{
|
|
1139
|
+
type: z.ZodLiteral<"constructor">;
|
|
1140
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1141
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
1142
|
+
}, "strip", z.ZodTypeAny, {
|
|
1143
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1144
|
+
type: "constructor";
|
|
1145
|
+
stateMutability: "nonpayable" | "payable";
|
|
1146
|
+
}, {
|
|
1147
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1148
|
+
type: "constructor";
|
|
1149
|
+
stateMutability: "nonpayable" | "payable";
|
|
1150
|
+
}>, z.ZodObject<{
|
|
1151
|
+
type: z.ZodLiteral<"fallback">;
|
|
1152
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
1153
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
1154
|
+
}, "strip", z.ZodTypeAny, {
|
|
1155
|
+
type: "fallback";
|
|
1156
|
+
stateMutability: "nonpayable" | "payable";
|
|
1157
|
+
inputs?: [] | undefined;
|
|
1158
|
+
}, {
|
|
1159
|
+
type: "fallback";
|
|
1160
|
+
stateMutability: "nonpayable" | "payable";
|
|
1161
|
+
inputs?: [] | undefined;
|
|
1162
|
+
}>, z.ZodObject<{
|
|
1163
|
+
type: z.ZodLiteral<"receive">;
|
|
1164
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
1165
|
+
}, "strip", z.ZodTypeAny, {
|
|
1166
|
+
type: "receive";
|
|
1167
|
+
stateMutability: "payable";
|
|
1168
|
+
}, {
|
|
1169
|
+
type: "receive";
|
|
1170
|
+
stateMutability: "payable";
|
|
1171
|
+
}>]>>, {
|
|
1172
|
+
payable?: boolean | undefined;
|
|
1173
|
+
constant?: boolean | undefined;
|
|
1174
|
+
gas?: number | undefined;
|
|
1175
|
+
} & ({
|
|
1176
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1177
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1178
|
+
type: "function";
|
|
1179
|
+
name: string;
|
|
1180
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1181
|
+
} | {
|
|
1182
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1183
|
+
type: "constructor";
|
|
1184
|
+
stateMutability: "nonpayable" | "payable";
|
|
1185
|
+
} | {
|
|
1186
|
+
type: "fallback";
|
|
1187
|
+
stateMutability: "nonpayable" | "payable";
|
|
1188
|
+
inputs?: [] | undefined;
|
|
1189
|
+
} | {
|
|
1190
|
+
type: "receive";
|
|
1191
|
+
stateMutability: "payable";
|
|
1192
|
+
}), unknown>]>, "many">>]>;
|
|
1193
|
+
/**
|
|
1194
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
1195
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
1196
|
+
*/
|
|
1197
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1198
|
+
/**
|
|
1199
|
+
* The name of a smart contract function being called.
|
|
1200
|
+
*/
|
|
1201
|
+
function: z.ZodString;
|
|
1202
|
+
/**
|
|
1203
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
1204
|
+
*/
|
|
1205
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1206
|
+
/**
|
|
1207
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
1208
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
1209
|
+
*/
|
|
1210
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1211
|
+
/**
|
|
1212
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
1213
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
1214
|
+
*/
|
|
1215
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1216
|
+
/**
|
|
1217
|
+
* A single value to compare the value resolved at `name` to.
|
|
1218
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
1219
|
+
* should be encoded, and which operators are supported for each type.
|
|
1220
|
+
*/
|
|
1221
|
+
value: z.ZodString;
|
|
1222
|
+
}, "strip", z.ZodTypeAny, {
|
|
1223
|
+
value: string;
|
|
1224
|
+
name: string;
|
|
1225
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1226
|
+
}, {
|
|
1227
|
+
value: string;
|
|
1228
|
+
name: string;
|
|
1229
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1230
|
+
}>, z.ZodObject<{
|
|
1231
|
+
/**
|
|
1232
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
1233
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
1234
|
+
*/
|
|
1235
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1236
|
+
/**
|
|
1237
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
1238
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
1239
|
+
*/
|
|
1240
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1241
|
+
/**
|
|
1242
|
+
* Values to compare against the resolved `name` value.
|
|
1243
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
1244
|
+
* should be encoded, and which operators are supported for each type.
|
|
1245
|
+
*/
|
|
1246
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
1247
|
+
}, "strip", z.ZodTypeAny, {
|
|
1248
|
+
values: string[];
|
|
1249
|
+
name: string;
|
|
1250
|
+
operator: "in" | "not in";
|
|
1251
|
+
}, {
|
|
1252
|
+
values: string[];
|
|
1253
|
+
name: string;
|
|
1254
|
+
operator: "in" | "not in";
|
|
1255
|
+
}>]>, "many">>;
|
|
1256
|
+
}, "strip", z.ZodTypeAny, {
|
|
1257
|
+
function: string;
|
|
1258
|
+
params?: ({
|
|
1259
|
+
values: string[];
|
|
1260
|
+
name: string;
|
|
1261
|
+
operator: "in" | "not in";
|
|
1262
|
+
} | {
|
|
1263
|
+
value: string;
|
|
1264
|
+
name: string;
|
|
1265
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1266
|
+
})[] | undefined;
|
|
1267
|
+
}, {
|
|
1268
|
+
function: string;
|
|
1269
|
+
params?: ({
|
|
1270
|
+
values: string[];
|
|
1271
|
+
name: string;
|
|
1272
|
+
operator: "in" | "not in";
|
|
1273
|
+
} | {
|
|
1274
|
+
value: string;
|
|
1275
|
+
name: string;
|
|
1276
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1277
|
+
})[] | undefined;
|
|
1278
|
+
}>, "many">;
|
|
1279
|
+
}, "strip", z.ZodTypeAny, {
|
|
1280
|
+
type: "evmData";
|
|
1281
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
1282
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1283
|
+
type: "error";
|
|
1284
|
+
name: string;
|
|
1285
|
+
} | {
|
|
1286
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1287
|
+
type: "event";
|
|
1288
|
+
name: string;
|
|
1289
|
+
anonymous?: boolean | undefined;
|
|
1290
|
+
} | ({
|
|
1291
|
+
payable?: boolean | undefined;
|
|
1292
|
+
constant?: boolean | undefined;
|
|
1293
|
+
gas?: number | undefined;
|
|
1294
|
+
} & ({
|
|
1295
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1296
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1297
|
+
type: "function";
|
|
1298
|
+
name: string;
|
|
1299
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1300
|
+
} | {
|
|
1301
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1302
|
+
type: "constructor";
|
|
1303
|
+
stateMutability: "nonpayable" | "payable";
|
|
1304
|
+
} | {
|
|
1305
|
+
type: "fallback";
|
|
1306
|
+
stateMutability: "nonpayable" | "payable";
|
|
1307
|
+
inputs?: [] | undefined;
|
|
1308
|
+
} | {
|
|
1309
|
+
type: "receive";
|
|
1310
|
+
stateMutability: "payable";
|
|
1311
|
+
})))[];
|
|
1312
|
+
conditions: {
|
|
1313
|
+
function: string;
|
|
1314
|
+
params?: ({
|
|
1315
|
+
values: string[];
|
|
1316
|
+
name: string;
|
|
1317
|
+
operator: "in" | "not in";
|
|
1318
|
+
} | {
|
|
1319
|
+
value: string;
|
|
1320
|
+
name: string;
|
|
1321
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1322
|
+
})[] | undefined;
|
|
1323
|
+
}[];
|
|
1324
|
+
}, {
|
|
1325
|
+
type: "evmData";
|
|
1326
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
1327
|
+
conditions: {
|
|
1328
|
+
function: string;
|
|
1329
|
+
params?: ({
|
|
1330
|
+
values: string[];
|
|
1331
|
+
name: string;
|
|
1332
|
+
operator: "in" | "not in";
|
|
1333
|
+
} | {
|
|
1334
|
+
value: string;
|
|
1335
|
+
name: string;
|
|
1336
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1337
|
+
})[] | undefined;
|
|
1338
|
+
}[];
|
|
1339
|
+
}>, z.ZodObject<{
|
|
1340
|
+
/** The type of criterion, must be "netUSDChange" for USD denominated asset transfer rules. */
|
|
1341
|
+
type: z.ZodLiteral<"netUSDChange">;
|
|
1342
|
+
/**
|
|
1343
|
+
* The amount of USD, in cents, that the total USD value of a transaction's asset transfer and exposure should be compared to.
|
|
1344
|
+
*/
|
|
1345
|
+
changeCents: z.ZodNumber;
|
|
1346
|
+
/**
|
|
1347
|
+
* The operator to use for the comparison. The total value of a transaction's asset transfer and exposure in USD will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
|
|
1348
|
+
*/
|
|
1349
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1350
|
+
}, "strip", z.ZodTypeAny, {
|
|
1351
|
+
type: "netUSDChange";
|
|
1352
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1353
|
+
changeCents: number;
|
|
1354
|
+
}, {
|
|
1355
|
+
type: "netUSDChange";
|
|
1356
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1357
|
+
changeCents: number;
|
|
1358
|
+
}>]>, "many">;
|
|
1359
|
+
/**
|
|
1360
|
+
* Type representing a set of criteria for the signEvmTransaction operation.
|
|
1361
|
+
* Can contain up to 10 individual criterion objects of ETH value or EVM address types.
|
|
1362
|
+
*/
|
|
1363
|
+
export type SignEvmTransactionCriteria = z.infer<typeof SignEvmTransactionCriteriaSchema>;
|
|
1364
|
+
/**
|
|
1365
|
+
* Schema for criteria used in SignEvmMessage operations
|
|
1366
|
+
*/
|
|
1367
|
+
export declare const SignEvmMessageCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1368
|
+
/** The type of criterion, must be "evmMessage" for EVM message-based rules. */
|
|
1369
|
+
type: z.ZodLiteral<"evmMessage">;
|
|
1370
|
+
/**
|
|
1371
|
+
* A regular expression the message is matched against.
|
|
1372
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
1373
|
+
*/
|
|
1374
|
+
match: z.ZodString;
|
|
1375
|
+
}, "strip", z.ZodTypeAny, {
|
|
1376
|
+
match: string;
|
|
1377
|
+
type: "evmMessage";
|
|
1378
|
+
}, {
|
|
1379
|
+
match: string;
|
|
1380
|
+
type: "evmMessage";
|
|
1381
|
+
}>]>, "many">;
|
|
1382
|
+
/**
|
|
1383
|
+
* Type representing a set of criteria for the signEvmMessage operation.
|
|
1384
|
+
* Can contain up to 10 individual EVM message criterion objects.
|
|
1385
|
+
*/
|
|
1386
|
+
export type SignEvmMessageCriteria = z.infer<typeof SignEvmMessageCriteriaSchema>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Schema for criteria used in SendEvmTransaction operations
|
|
1389
|
+
*/
|
|
1390
|
+
export declare const SendEvmTransactionCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1391
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
1392
|
+
type: z.ZodLiteral<"ethValue">;
|
|
1393
|
+
/**
|
|
1394
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
1395
|
+
* Must contain only digits.
|
|
1396
|
+
*/
|
|
1397
|
+
ethValue: z.ZodString;
|
|
1398
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
1399
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1400
|
+
}, "strip", z.ZodTypeAny, {
|
|
1401
|
+
ethValue: string;
|
|
1402
|
+
type: "ethValue";
|
|
1403
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1404
|
+
}, {
|
|
1405
|
+
ethValue: string;
|
|
1406
|
+
type: "ethValue";
|
|
1407
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1408
|
+
}>, z.ZodObject<{
|
|
1409
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
1410
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
1411
|
+
/**
|
|
1412
|
+
* Array of EVM addresses to compare against.
|
|
1413
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
1414
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
1415
|
+
*/
|
|
1416
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
1417
|
+
/**
|
|
1418
|
+
* The operator to use for evaluating transaction addresses.
|
|
1419
|
+
* "in" checks if an address is in the provided list.
|
|
1420
|
+
* "not in" checks if an address is not in the provided list.
|
|
1421
|
+
*/
|
|
1422
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1423
|
+
}, "strip", z.ZodTypeAny, {
|
|
1424
|
+
type: "evmAddress";
|
|
1425
|
+
operator: "in" | "not in";
|
|
1426
|
+
addresses: `0x${string}`[];
|
|
1427
|
+
}, {
|
|
1428
|
+
type: "evmAddress";
|
|
1429
|
+
operator: "in" | "not in";
|
|
1430
|
+
addresses: string[];
|
|
1431
|
+
}>, z.ZodObject<{
|
|
1432
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
1433
|
+
type: z.ZodLiteral<"evmNetwork">;
|
|
1434
|
+
/**
|
|
1435
|
+
* Array of EVM network identifiers to compare against.
|
|
1436
|
+
* Either "base" or "base-sepolia"
|
|
1437
|
+
*/
|
|
1438
|
+
networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
|
|
1439
|
+
/**
|
|
1440
|
+
* The operator to use for evaluating transaction network.
|
|
1441
|
+
* "in" checks if a network is in the provided list.
|
|
1442
|
+
* "not in" checks if a network is not in the provided list.
|
|
1443
|
+
*/
|
|
1444
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1445
|
+
}, "strip", z.ZodTypeAny, {
|
|
1446
|
+
type: "evmNetwork";
|
|
1447
|
+
operator: "in" | "not in";
|
|
1448
|
+
networks: ("base-sepolia" | "base")[];
|
|
1449
|
+
}, {
|
|
1450
|
+
type: "evmNetwork";
|
|
1451
|
+
operator: "in" | "not in";
|
|
1452
|
+
networks: ("base-sepolia" | "base")[];
|
|
1453
|
+
}>, z.ZodObject<{
|
|
1454
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
1455
|
+
type: z.ZodLiteral<"evmData">;
|
|
1456
|
+
/**
|
|
1457
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
1458
|
+
*/
|
|
1459
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1460
|
+
type: z.ZodLiteral<"error">;
|
|
1461
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
1462
|
+
/**
|
|
1463
|
+
* Schema for SignEvmTypedData field criterion
|
|
1464
|
+
*/
|
|
1465
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1466
|
+
name: z.ZodString;
|
|
1467
|
+
}, "strip", z.ZodTypeAny, {
|
|
1468
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1469
|
+
type: "error";
|
|
1470
|
+
name: string;
|
|
1471
|
+
}, {
|
|
1472
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1473
|
+
type: "error";
|
|
1474
|
+
name: string;
|
|
1475
|
+
}>, z.ZodObject<{
|
|
1476
|
+
type: z.ZodLiteral<"event">;
|
|
1477
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
1478
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
1479
|
+
name: z.ZodString;
|
|
1480
|
+
}, "strip", z.ZodTypeAny, {
|
|
1481
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1482
|
+
type: "event";
|
|
1483
|
+
name: string;
|
|
1484
|
+
anonymous?: boolean | undefined;
|
|
1485
|
+
}, {
|
|
1486
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1487
|
+
type: "event";
|
|
1488
|
+
name: string;
|
|
1489
|
+
anonymous?: boolean | undefined;
|
|
1490
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
1491
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
1492
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
1493
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
1494
|
+
}, "strip", z.ZodTypeAny, {
|
|
1495
|
+
payable?: boolean | undefined;
|
|
1496
|
+
constant?: boolean | undefined;
|
|
1497
|
+
gas?: number | undefined;
|
|
1498
|
+
}, {
|
|
1499
|
+
payable?: boolean | undefined;
|
|
1500
|
+
constant?: boolean | undefined;
|
|
1501
|
+
gas?: number | undefined;
|
|
1502
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1503
|
+
type: z.ZodLiteral<"function">;
|
|
1504
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1505
|
+
name: z.ZodString;
|
|
1506
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1507
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
1508
|
+
}, "strip", z.ZodTypeAny, {
|
|
1509
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1510
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1511
|
+
type: "function";
|
|
1512
|
+
name: string;
|
|
1513
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1514
|
+
}, {
|
|
1515
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1516
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1517
|
+
type: "function";
|
|
1518
|
+
name: string;
|
|
1519
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1520
|
+
}>, z.ZodObject<{
|
|
1521
|
+
type: z.ZodLiteral<"constructor">;
|
|
1522
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1523
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
1524
|
+
}, "strip", z.ZodTypeAny, {
|
|
1525
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1526
|
+
type: "constructor";
|
|
1527
|
+
stateMutability: "nonpayable" | "payable";
|
|
1528
|
+
}, {
|
|
1529
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1530
|
+
type: "constructor";
|
|
1531
|
+
stateMutability: "nonpayable" | "payable";
|
|
1532
|
+
}>, z.ZodObject<{
|
|
1533
|
+
type: z.ZodLiteral<"fallback">;
|
|
1534
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
1535
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
1536
|
+
}, "strip", z.ZodTypeAny, {
|
|
1537
|
+
type: "fallback";
|
|
1538
|
+
stateMutability: "nonpayable" | "payable";
|
|
1539
|
+
inputs?: [] | undefined;
|
|
1540
|
+
}, {
|
|
1541
|
+
type: "fallback";
|
|
1542
|
+
stateMutability: "nonpayable" | "payable";
|
|
1543
|
+
inputs?: [] | undefined;
|
|
1544
|
+
}>, z.ZodObject<{
|
|
1545
|
+
type: z.ZodLiteral<"receive">;
|
|
1546
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
1547
|
+
}, "strip", z.ZodTypeAny, {
|
|
1548
|
+
type: "receive";
|
|
1549
|
+
stateMutability: "payable";
|
|
1550
|
+
}, {
|
|
1551
|
+
type: "receive";
|
|
1552
|
+
stateMutability: "payable";
|
|
1553
|
+
}>]>>, {
|
|
1554
|
+
payable?: boolean | undefined;
|
|
1555
|
+
constant?: boolean | undefined;
|
|
1556
|
+
gas?: number | undefined;
|
|
1557
|
+
} & ({
|
|
1558
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1559
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1560
|
+
type: "function";
|
|
1561
|
+
name: string;
|
|
1562
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1563
|
+
} | {
|
|
1564
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1565
|
+
type: "constructor";
|
|
1566
|
+
stateMutability: "nonpayable" | "payable";
|
|
1567
|
+
} | {
|
|
1568
|
+
type: "fallback";
|
|
1569
|
+
stateMutability: "nonpayable" | "payable";
|
|
1570
|
+
inputs?: [] | undefined;
|
|
1571
|
+
} | {
|
|
1572
|
+
type: "receive";
|
|
1573
|
+
stateMutability: "payable";
|
|
1574
|
+
}), unknown>]>, "many">>]>;
|
|
1575
|
+
/**
|
|
1576
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
1577
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
1578
|
+
*/
|
|
1579
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1580
|
+
/**
|
|
1581
|
+
* The name of a smart contract function being called.
|
|
1582
|
+
*/
|
|
1583
|
+
function: z.ZodString;
|
|
1584
|
+
/**
|
|
1585
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
1586
|
+
*/
|
|
1587
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1588
|
+
/**
|
|
1589
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
1590
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
1591
|
+
*/
|
|
1592
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1593
|
+
/**
|
|
1594
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
1595
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
1596
|
+
*/
|
|
1597
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1598
|
+
/**
|
|
1599
|
+
* A single value to compare the value resolved at `name` to.
|
|
1600
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
1601
|
+
* should be encoded, and which operators are supported for each type.
|
|
1602
|
+
*/
|
|
1603
|
+
value: z.ZodString;
|
|
1604
|
+
}, "strip", z.ZodTypeAny, {
|
|
1605
|
+
value: string;
|
|
1606
|
+
name: string;
|
|
1607
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1608
|
+
}, {
|
|
1609
|
+
value: string;
|
|
1610
|
+
name: string;
|
|
1611
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1612
|
+
}>, z.ZodObject<{
|
|
1613
|
+
/**
|
|
1614
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
1615
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
1616
|
+
*/
|
|
1617
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1618
|
+
/**
|
|
1619
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
1620
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
1621
|
+
*/
|
|
1622
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1623
|
+
/**
|
|
1624
|
+
* Values to compare against the resolved `name` value.
|
|
1625
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
1626
|
+
* should be encoded, and which operators are supported for each type.
|
|
1627
|
+
*/
|
|
1628
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
1629
|
+
}, "strip", z.ZodTypeAny, {
|
|
1630
|
+
values: string[];
|
|
1631
|
+
name: string;
|
|
1632
|
+
operator: "in" | "not in";
|
|
1633
|
+
}, {
|
|
1634
|
+
values: string[];
|
|
1635
|
+
name: string;
|
|
1636
|
+
operator: "in" | "not in";
|
|
1637
|
+
}>]>, "many">>;
|
|
1638
|
+
}, "strip", z.ZodTypeAny, {
|
|
1639
|
+
function: string;
|
|
1640
|
+
params?: ({
|
|
1641
|
+
values: string[];
|
|
1642
|
+
name: string;
|
|
1643
|
+
operator: "in" | "not in";
|
|
1644
|
+
} | {
|
|
1645
|
+
value: string;
|
|
1646
|
+
name: string;
|
|
1647
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1648
|
+
})[] | undefined;
|
|
1649
|
+
}, {
|
|
1650
|
+
function: string;
|
|
1651
|
+
params?: ({
|
|
1652
|
+
values: string[];
|
|
1653
|
+
name: string;
|
|
1654
|
+
operator: "in" | "not in";
|
|
1655
|
+
} | {
|
|
1656
|
+
value: string;
|
|
1657
|
+
name: string;
|
|
1658
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1659
|
+
})[] | undefined;
|
|
1660
|
+
}>, "many">;
|
|
1661
|
+
}, "strip", z.ZodTypeAny, {
|
|
1662
|
+
type: "evmData";
|
|
1663
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
1664
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1665
|
+
type: "error";
|
|
1666
|
+
name: string;
|
|
1667
|
+
} | {
|
|
1668
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1669
|
+
type: "event";
|
|
1670
|
+
name: string;
|
|
1671
|
+
anonymous?: boolean | undefined;
|
|
1672
|
+
} | ({
|
|
1673
|
+
payable?: boolean | undefined;
|
|
1674
|
+
constant?: boolean | undefined;
|
|
1675
|
+
gas?: number | undefined;
|
|
1676
|
+
} & ({
|
|
1677
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1678
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1679
|
+
type: "function";
|
|
1680
|
+
name: string;
|
|
1681
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1682
|
+
} | {
|
|
1683
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1684
|
+
type: "constructor";
|
|
1685
|
+
stateMutability: "nonpayable" | "payable";
|
|
1686
|
+
} | {
|
|
1687
|
+
type: "fallback";
|
|
1688
|
+
stateMutability: "nonpayable" | "payable";
|
|
1689
|
+
inputs?: [] | undefined;
|
|
1690
|
+
} | {
|
|
1691
|
+
type: "receive";
|
|
1692
|
+
stateMutability: "payable";
|
|
1693
|
+
})))[];
|
|
1694
|
+
conditions: {
|
|
1695
|
+
function: string;
|
|
1696
|
+
params?: ({
|
|
1697
|
+
values: string[];
|
|
1698
|
+
name: string;
|
|
1699
|
+
operator: "in" | "not in";
|
|
1700
|
+
} | {
|
|
1701
|
+
value: string;
|
|
1702
|
+
name: string;
|
|
1703
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1704
|
+
})[] | undefined;
|
|
1705
|
+
}[];
|
|
1706
|
+
}, {
|
|
1707
|
+
type: "evmData";
|
|
1708
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
1709
|
+
conditions: {
|
|
1710
|
+
function: string;
|
|
1711
|
+
params?: ({
|
|
1712
|
+
values: string[];
|
|
1713
|
+
name: string;
|
|
1714
|
+
operator: "in" | "not in";
|
|
1715
|
+
} | {
|
|
1716
|
+
value: string;
|
|
1717
|
+
name: string;
|
|
1718
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1719
|
+
})[] | undefined;
|
|
1720
|
+
}[];
|
|
1721
|
+
}>, z.ZodObject<{
|
|
1722
|
+
/** The type of criterion, must be "netUSDChange" for USD denominated asset transfer rules. */
|
|
1723
|
+
type: z.ZodLiteral<"netUSDChange">;
|
|
1724
|
+
/**
|
|
1725
|
+
* The amount of USD, in cents, that the total USD value of a transaction's asset transfer and exposure should be compared to.
|
|
1726
|
+
*/
|
|
1727
|
+
changeCents: z.ZodNumber;
|
|
1728
|
+
/**
|
|
1729
|
+
* The operator to use for the comparison. The total value of a transaction's asset transfer and exposure in USD will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
|
|
1730
|
+
*/
|
|
1731
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1732
|
+
}, "strip", z.ZodTypeAny, {
|
|
1733
|
+
type: "netUSDChange";
|
|
1734
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1735
|
+
changeCents: number;
|
|
1736
|
+
}, {
|
|
1737
|
+
type: "netUSDChange";
|
|
1738
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1739
|
+
changeCents: number;
|
|
1740
|
+
}>]>, "many">;
|
|
1741
|
+
export type SendEvmTransactionCriteria = z.infer<typeof SendEvmTransactionCriteriaSchema>;
|
|
1742
|
+
/**
|
|
1743
|
+
* Schema for criteria used in PrepareUserOperation operations
|
|
1744
|
+
*/
|
|
1745
|
+
export declare const PrepareUserOperationCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1746
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
1747
|
+
type: z.ZodLiteral<"ethValue">;
|
|
1748
|
+
/**
|
|
1749
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
1750
|
+
* Must contain only digits.
|
|
1751
|
+
*/
|
|
1752
|
+
ethValue: z.ZodString;
|
|
1753
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
1754
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1755
|
+
}, "strip", z.ZodTypeAny, {
|
|
1756
|
+
ethValue: string;
|
|
1757
|
+
type: "ethValue";
|
|
1758
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1759
|
+
}, {
|
|
1760
|
+
ethValue: string;
|
|
1761
|
+
type: "ethValue";
|
|
1762
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1763
|
+
}>, z.ZodObject<{
|
|
1764
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
1765
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
1766
|
+
/**
|
|
1767
|
+
* Array of EVM addresses to compare against.
|
|
1768
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
1769
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
1770
|
+
*/
|
|
1771
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
1772
|
+
/**
|
|
1773
|
+
* The operator to use for evaluating transaction addresses.
|
|
1774
|
+
* "in" checks if an address is in the provided list.
|
|
1775
|
+
* "not in" checks if an address is not in the provided list.
|
|
1776
|
+
*/
|
|
1777
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1778
|
+
}, "strip", z.ZodTypeAny, {
|
|
1779
|
+
type: "evmAddress";
|
|
1780
|
+
operator: "in" | "not in";
|
|
1781
|
+
addresses: `0x${string}`[];
|
|
1782
|
+
}, {
|
|
1783
|
+
type: "evmAddress";
|
|
1784
|
+
operator: "in" | "not in";
|
|
1785
|
+
addresses: string[];
|
|
1786
|
+
}>, z.ZodObject<{
|
|
1787
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
1788
|
+
type: z.ZodLiteral<"evmNetwork">;
|
|
1789
|
+
/**
|
|
1790
|
+
* Array of EVM network identifiers to compare against.
|
|
1791
|
+
* Either "base" or "base-sepolia"
|
|
1792
|
+
*/
|
|
1793
|
+
networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
|
|
1794
|
+
/**
|
|
1795
|
+
* The operator to use for evaluating transaction network.
|
|
1796
|
+
* "in" checks if a network is in the provided list.
|
|
1797
|
+
* "not in" checks if a network is not in the provided list.
|
|
1798
|
+
*/
|
|
1799
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1800
|
+
}, "strip", z.ZodTypeAny, {
|
|
1801
|
+
type: "evmNetwork";
|
|
1802
|
+
operator: "in" | "not in";
|
|
1803
|
+
networks: ("base-sepolia" | "base")[];
|
|
1804
|
+
}, {
|
|
1805
|
+
type: "evmNetwork";
|
|
1806
|
+
operator: "in" | "not in";
|
|
1807
|
+
networks: ("base-sepolia" | "base")[];
|
|
1808
|
+
}>, z.ZodObject<{
|
|
1809
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
1810
|
+
type: z.ZodLiteral<"evmData">;
|
|
1811
|
+
/**
|
|
1812
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
1813
|
+
*/
|
|
1814
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1815
|
+
type: z.ZodLiteral<"error">;
|
|
1816
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
1817
|
+
/**
|
|
1818
|
+
* Schema for SignEvmTypedData field criterion
|
|
1819
|
+
*/
|
|
1820
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1821
|
+
name: z.ZodString;
|
|
1822
|
+
}, "strip", z.ZodTypeAny, {
|
|
1823
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1824
|
+
type: "error";
|
|
1825
|
+
name: string;
|
|
1826
|
+
}, {
|
|
1827
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1828
|
+
type: "error";
|
|
1829
|
+
name: string;
|
|
1830
|
+
}>, z.ZodObject<{
|
|
1831
|
+
type: z.ZodLiteral<"event">;
|
|
1832
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
1833
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
1834
|
+
name: z.ZodString;
|
|
1835
|
+
}, "strip", z.ZodTypeAny, {
|
|
1836
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1837
|
+
type: "event";
|
|
1838
|
+
name: string;
|
|
1839
|
+
anonymous?: boolean | undefined;
|
|
1840
|
+
}, {
|
|
1841
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
1842
|
+
type: "event";
|
|
1843
|
+
name: string;
|
|
1844
|
+
anonymous?: boolean | undefined;
|
|
1845
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
1846
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
1847
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
1848
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
1849
|
+
}, "strip", z.ZodTypeAny, {
|
|
1850
|
+
payable?: boolean | undefined;
|
|
1851
|
+
constant?: boolean | undefined;
|
|
1852
|
+
gas?: number | undefined;
|
|
1853
|
+
}, {
|
|
1854
|
+
payable?: boolean | undefined;
|
|
1855
|
+
constant?: boolean | undefined;
|
|
1856
|
+
gas?: number | undefined;
|
|
1857
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1858
|
+
type: z.ZodLiteral<"function">;
|
|
1859
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1860
|
+
name: z.ZodString;
|
|
1861
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1862
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
1863
|
+
}, "strip", z.ZodTypeAny, {
|
|
1864
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1865
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1866
|
+
type: "function";
|
|
1867
|
+
name: string;
|
|
1868
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1869
|
+
}, {
|
|
1870
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1871
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1872
|
+
type: "function";
|
|
1873
|
+
name: string;
|
|
1874
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1875
|
+
}>, z.ZodObject<{
|
|
1876
|
+
type: z.ZodLiteral<"constructor">;
|
|
1877
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
1878
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
1879
|
+
}, "strip", z.ZodTypeAny, {
|
|
1880
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1881
|
+
type: "constructor";
|
|
1882
|
+
stateMutability: "nonpayable" | "payable";
|
|
1883
|
+
}, {
|
|
1884
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1885
|
+
type: "constructor";
|
|
1886
|
+
stateMutability: "nonpayable" | "payable";
|
|
1887
|
+
}>, z.ZodObject<{
|
|
1888
|
+
type: z.ZodLiteral<"fallback">;
|
|
1889
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
1890
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
1891
|
+
}, "strip", z.ZodTypeAny, {
|
|
1892
|
+
type: "fallback";
|
|
1893
|
+
stateMutability: "nonpayable" | "payable";
|
|
1894
|
+
inputs?: [] | undefined;
|
|
1895
|
+
}, {
|
|
1896
|
+
type: "fallback";
|
|
1897
|
+
stateMutability: "nonpayable" | "payable";
|
|
1898
|
+
inputs?: [] | undefined;
|
|
1899
|
+
}>, z.ZodObject<{
|
|
1900
|
+
type: z.ZodLiteral<"receive">;
|
|
1901
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
1902
|
+
}, "strip", z.ZodTypeAny, {
|
|
1903
|
+
type: "receive";
|
|
1904
|
+
stateMutability: "payable";
|
|
1905
|
+
}, {
|
|
1906
|
+
type: "receive";
|
|
1907
|
+
stateMutability: "payable";
|
|
1908
|
+
}>]>>, {
|
|
1909
|
+
payable?: boolean | undefined;
|
|
1910
|
+
constant?: boolean | undefined;
|
|
1911
|
+
gas?: number | undefined;
|
|
1912
|
+
} & ({
|
|
1913
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1914
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
1915
|
+
type: "function";
|
|
1916
|
+
name: string;
|
|
1917
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
1918
|
+
} | {
|
|
1919
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
1920
|
+
type: "constructor";
|
|
1921
|
+
stateMutability: "nonpayable" | "payable";
|
|
1922
|
+
} | {
|
|
1923
|
+
type: "fallback";
|
|
1924
|
+
stateMutability: "nonpayable" | "payable";
|
|
1925
|
+
inputs?: [] | undefined;
|
|
1926
|
+
} | {
|
|
1927
|
+
type: "receive";
|
|
1928
|
+
stateMutability: "payable";
|
|
1929
|
+
}), unknown>]>, "many">>]>;
|
|
1930
|
+
/**
|
|
1931
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
1932
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
1933
|
+
*/
|
|
1934
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
1935
|
+
/**
|
|
1936
|
+
* The name of a smart contract function being called.
|
|
1937
|
+
*/
|
|
1938
|
+
function: z.ZodString;
|
|
1939
|
+
/**
|
|
1940
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
1941
|
+
*/
|
|
1942
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
1943
|
+
/**
|
|
1944
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
1945
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
1946
|
+
*/
|
|
1947
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1948
|
+
/**
|
|
1949
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
1950
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
1951
|
+
*/
|
|
1952
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
1953
|
+
/**
|
|
1954
|
+
* A single value to compare the value resolved at `name` to.
|
|
1955
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
1956
|
+
* should be encoded, and which operators are supported for each type.
|
|
1957
|
+
*/
|
|
1958
|
+
value: z.ZodString;
|
|
1959
|
+
}, "strip", z.ZodTypeAny, {
|
|
1960
|
+
value: string;
|
|
1961
|
+
name: string;
|
|
1962
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1963
|
+
}, {
|
|
1964
|
+
value: string;
|
|
1965
|
+
name: string;
|
|
1966
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
1967
|
+
}>, z.ZodObject<{
|
|
1968
|
+
/**
|
|
1969
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
1970
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
1971
|
+
*/
|
|
1972
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
1973
|
+
/**
|
|
1974
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
1975
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
1976
|
+
*/
|
|
1977
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
1978
|
+
/**
|
|
1979
|
+
* Values to compare against the resolved `name` value.
|
|
1980
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
1981
|
+
* should be encoded, and which operators are supported for each type.
|
|
1982
|
+
*/
|
|
1983
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
1984
|
+
}, "strip", z.ZodTypeAny, {
|
|
1985
|
+
values: string[];
|
|
1986
|
+
name: string;
|
|
1987
|
+
operator: "in" | "not in";
|
|
1988
|
+
}, {
|
|
1989
|
+
values: string[];
|
|
1990
|
+
name: string;
|
|
1991
|
+
operator: "in" | "not in";
|
|
1992
|
+
}>]>, "many">>;
|
|
1993
|
+
}, "strip", z.ZodTypeAny, {
|
|
1994
|
+
function: string;
|
|
1995
|
+
params?: ({
|
|
1996
|
+
values: string[];
|
|
1997
|
+
name: string;
|
|
1998
|
+
operator: "in" | "not in";
|
|
1999
|
+
} | {
|
|
2000
|
+
value: string;
|
|
2001
|
+
name: string;
|
|
2002
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2003
|
+
})[] | undefined;
|
|
2004
|
+
}, {
|
|
2005
|
+
function: string;
|
|
2006
|
+
params?: ({
|
|
2007
|
+
values: string[];
|
|
2008
|
+
name: string;
|
|
2009
|
+
operator: "in" | "not in";
|
|
2010
|
+
} | {
|
|
2011
|
+
value: string;
|
|
2012
|
+
name: string;
|
|
2013
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2014
|
+
})[] | undefined;
|
|
2015
|
+
}>, "many">;
|
|
2016
|
+
}, "strip", z.ZodTypeAny, {
|
|
2017
|
+
type: "evmData";
|
|
2018
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
2019
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2020
|
+
type: "error";
|
|
2021
|
+
name: string;
|
|
2022
|
+
} | {
|
|
2023
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2024
|
+
type: "event";
|
|
2025
|
+
name: string;
|
|
2026
|
+
anonymous?: boolean | undefined;
|
|
2027
|
+
} | ({
|
|
2028
|
+
payable?: boolean | undefined;
|
|
2029
|
+
constant?: boolean | undefined;
|
|
2030
|
+
gas?: number | undefined;
|
|
2031
|
+
} & ({
|
|
2032
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2033
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2034
|
+
type: "function";
|
|
2035
|
+
name: string;
|
|
2036
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2037
|
+
} | {
|
|
2038
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2039
|
+
type: "constructor";
|
|
2040
|
+
stateMutability: "nonpayable" | "payable";
|
|
2041
|
+
} | {
|
|
2042
|
+
type: "fallback";
|
|
2043
|
+
stateMutability: "nonpayable" | "payable";
|
|
2044
|
+
inputs?: [] | undefined;
|
|
2045
|
+
} | {
|
|
2046
|
+
type: "receive";
|
|
2047
|
+
stateMutability: "payable";
|
|
2048
|
+
})))[];
|
|
2049
|
+
conditions: {
|
|
2050
|
+
function: string;
|
|
2051
|
+
params?: ({
|
|
2052
|
+
values: string[];
|
|
2053
|
+
name: string;
|
|
2054
|
+
operator: "in" | "not in";
|
|
2055
|
+
} | {
|
|
2056
|
+
value: string;
|
|
2057
|
+
name: string;
|
|
2058
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2059
|
+
})[] | undefined;
|
|
2060
|
+
}[];
|
|
2061
|
+
}, {
|
|
2062
|
+
type: "evmData";
|
|
2063
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
2064
|
+
conditions: {
|
|
2065
|
+
function: string;
|
|
2066
|
+
params?: ({
|
|
2067
|
+
values: string[];
|
|
2068
|
+
name: string;
|
|
2069
|
+
operator: "in" | "not in";
|
|
2070
|
+
} | {
|
|
2071
|
+
value: string;
|
|
2072
|
+
name: string;
|
|
2073
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2074
|
+
})[] | undefined;
|
|
2075
|
+
}[];
|
|
2076
|
+
}>]>, "many">;
|
|
2077
|
+
/**
|
|
2078
|
+
* Type representing a set of criteria for the prepareUserOperation operation.
|
|
2079
|
+
* Can contain up to 10 individual criterion objects of ETH value, EVM address, EVM network, or EVM data types.
|
|
2080
|
+
*/
|
|
2081
|
+
export type PrepareUserOperationCriteria = z.infer<typeof PrepareUserOperationCriteriaSchema>;
|
|
2082
|
+
/**
|
|
2083
|
+
* Schema for criteria used in SendUserOperation operations
|
|
2084
|
+
*/
|
|
2085
|
+
export declare const SendUserOperationCriteriaSchema: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2086
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
2087
|
+
type: z.ZodLiteral<"ethValue">;
|
|
2088
|
+
/**
|
|
2089
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
2090
|
+
* Must contain only digits.
|
|
2091
|
+
*/
|
|
2092
|
+
ethValue: z.ZodString;
|
|
2093
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
2094
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2095
|
+
}, "strip", z.ZodTypeAny, {
|
|
2096
|
+
ethValue: string;
|
|
2097
|
+
type: "ethValue";
|
|
2098
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2099
|
+
}, {
|
|
2100
|
+
ethValue: string;
|
|
2101
|
+
type: "ethValue";
|
|
2102
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2103
|
+
}>, z.ZodObject<{
|
|
2104
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
2105
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
2106
|
+
/**
|
|
2107
|
+
* Array of EVM addresses to compare against.
|
|
2108
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
2109
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
2110
|
+
*/
|
|
2111
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
2112
|
+
/**
|
|
2113
|
+
* The operator to use for evaluating transaction addresses.
|
|
2114
|
+
* "in" checks if an address is in the provided list.
|
|
2115
|
+
* "not in" checks if an address is not in the provided list.
|
|
2116
|
+
*/
|
|
2117
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2118
|
+
}, "strip", z.ZodTypeAny, {
|
|
2119
|
+
type: "evmAddress";
|
|
2120
|
+
operator: "in" | "not in";
|
|
2121
|
+
addresses: `0x${string}`[];
|
|
2122
|
+
}, {
|
|
2123
|
+
type: "evmAddress";
|
|
2124
|
+
operator: "in" | "not in";
|
|
2125
|
+
addresses: string[];
|
|
2126
|
+
}>, z.ZodObject<{
|
|
2127
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
2128
|
+
type: z.ZodLiteral<"evmData">;
|
|
2129
|
+
/**
|
|
2130
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
2131
|
+
*/
|
|
2132
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2133
|
+
type: z.ZodLiteral<"error">;
|
|
2134
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
2135
|
+
/**
|
|
2136
|
+
* Schema for SignEvmTypedData field criterion
|
|
2137
|
+
*/
|
|
2138
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2139
|
+
name: z.ZodString;
|
|
2140
|
+
}, "strip", z.ZodTypeAny, {
|
|
2141
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2142
|
+
type: "error";
|
|
2143
|
+
name: string;
|
|
2144
|
+
}, {
|
|
2145
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2146
|
+
type: "error";
|
|
2147
|
+
name: string;
|
|
2148
|
+
}>, z.ZodObject<{
|
|
2149
|
+
type: z.ZodLiteral<"event">;
|
|
2150
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
2151
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
2152
|
+
name: z.ZodString;
|
|
2153
|
+
}, "strip", z.ZodTypeAny, {
|
|
2154
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2155
|
+
type: "event";
|
|
2156
|
+
name: string;
|
|
2157
|
+
anonymous?: boolean | undefined;
|
|
2158
|
+
}, {
|
|
2159
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2160
|
+
type: "event";
|
|
2161
|
+
name: string;
|
|
2162
|
+
anonymous?: boolean | undefined;
|
|
2163
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
2164
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
2165
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
2166
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
2167
|
+
}, "strip", z.ZodTypeAny, {
|
|
2168
|
+
payable?: boolean | undefined;
|
|
2169
|
+
constant?: boolean | undefined;
|
|
2170
|
+
gas?: number | undefined;
|
|
2171
|
+
}, {
|
|
2172
|
+
payable?: boolean | undefined;
|
|
2173
|
+
constant?: boolean | undefined;
|
|
2174
|
+
gas?: number | undefined;
|
|
2175
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2176
|
+
type: z.ZodLiteral<"function">;
|
|
2177
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2178
|
+
name: z.ZodString;
|
|
2179
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2180
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
2181
|
+
}, "strip", z.ZodTypeAny, {
|
|
2182
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2183
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2184
|
+
type: "function";
|
|
2185
|
+
name: string;
|
|
2186
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2187
|
+
}, {
|
|
2188
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2189
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2190
|
+
type: "function";
|
|
2191
|
+
name: string;
|
|
2192
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2193
|
+
}>, z.ZodObject<{
|
|
2194
|
+
type: z.ZodLiteral<"constructor">;
|
|
2195
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2196
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
2197
|
+
}, "strip", z.ZodTypeAny, {
|
|
2198
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2199
|
+
type: "constructor";
|
|
2200
|
+
stateMutability: "nonpayable" | "payable";
|
|
2201
|
+
}, {
|
|
2202
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2203
|
+
type: "constructor";
|
|
2204
|
+
stateMutability: "nonpayable" | "payable";
|
|
2205
|
+
}>, z.ZodObject<{
|
|
2206
|
+
type: z.ZodLiteral<"fallback">;
|
|
2207
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
2208
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
2209
|
+
}, "strip", z.ZodTypeAny, {
|
|
2210
|
+
type: "fallback";
|
|
2211
|
+
stateMutability: "nonpayable" | "payable";
|
|
2212
|
+
inputs?: [] | undefined;
|
|
2213
|
+
}, {
|
|
2214
|
+
type: "fallback";
|
|
2215
|
+
stateMutability: "nonpayable" | "payable";
|
|
2216
|
+
inputs?: [] | undefined;
|
|
2217
|
+
}>, z.ZodObject<{
|
|
2218
|
+
type: z.ZodLiteral<"receive">;
|
|
2219
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
2220
|
+
}, "strip", z.ZodTypeAny, {
|
|
2221
|
+
type: "receive";
|
|
2222
|
+
stateMutability: "payable";
|
|
2223
|
+
}, {
|
|
2224
|
+
type: "receive";
|
|
2225
|
+
stateMutability: "payable";
|
|
2226
|
+
}>]>>, {
|
|
2227
|
+
payable?: boolean | undefined;
|
|
2228
|
+
constant?: boolean | undefined;
|
|
2229
|
+
gas?: number | undefined;
|
|
2230
|
+
} & ({
|
|
2231
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2232
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2233
|
+
type: "function";
|
|
2234
|
+
name: string;
|
|
2235
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2236
|
+
} | {
|
|
2237
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2238
|
+
type: "constructor";
|
|
2239
|
+
stateMutability: "nonpayable" | "payable";
|
|
2240
|
+
} | {
|
|
2241
|
+
type: "fallback";
|
|
2242
|
+
stateMutability: "nonpayable" | "payable";
|
|
2243
|
+
inputs?: [] | undefined;
|
|
2244
|
+
} | {
|
|
2245
|
+
type: "receive";
|
|
2246
|
+
stateMutability: "payable";
|
|
2247
|
+
}), unknown>]>, "many">>]>;
|
|
2248
|
+
/**
|
|
2249
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
2250
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
2251
|
+
*/
|
|
2252
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
2253
|
+
/**
|
|
2254
|
+
* The name of a smart contract function being called.
|
|
2255
|
+
*/
|
|
2256
|
+
function: z.ZodString;
|
|
2257
|
+
/**
|
|
2258
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
2259
|
+
*/
|
|
2260
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2261
|
+
/**
|
|
2262
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
2263
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
2264
|
+
*/
|
|
2265
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2266
|
+
/**
|
|
2267
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
2268
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
2269
|
+
*/
|
|
2270
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2271
|
+
/**
|
|
2272
|
+
* A single value to compare the value resolved at `name` to.
|
|
2273
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
2274
|
+
* should be encoded, and which operators are supported for each type.
|
|
2275
|
+
*/
|
|
2276
|
+
value: z.ZodString;
|
|
2277
|
+
}, "strip", z.ZodTypeAny, {
|
|
2278
|
+
value: string;
|
|
2279
|
+
name: string;
|
|
2280
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2281
|
+
}, {
|
|
2282
|
+
value: string;
|
|
2283
|
+
name: string;
|
|
2284
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2285
|
+
}>, z.ZodObject<{
|
|
2286
|
+
/**
|
|
2287
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
2288
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
2289
|
+
*/
|
|
2290
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2291
|
+
/**
|
|
2292
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
2293
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
2294
|
+
*/
|
|
2295
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2296
|
+
/**
|
|
2297
|
+
* Values to compare against the resolved `name` value.
|
|
2298
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
2299
|
+
* should be encoded, and which operators are supported for each type.
|
|
2300
|
+
*/
|
|
2301
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
2302
|
+
}, "strip", z.ZodTypeAny, {
|
|
2303
|
+
values: string[];
|
|
2304
|
+
name: string;
|
|
2305
|
+
operator: "in" | "not in";
|
|
2306
|
+
}, {
|
|
2307
|
+
values: string[];
|
|
2308
|
+
name: string;
|
|
2309
|
+
operator: "in" | "not in";
|
|
2310
|
+
}>]>, "many">>;
|
|
2311
|
+
}, "strip", z.ZodTypeAny, {
|
|
2312
|
+
function: string;
|
|
2313
|
+
params?: ({
|
|
2314
|
+
values: string[];
|
|
2315
|
+
name: string;
|
|
2316
|
+
operator: "in" | "not in";
|
|
2317
|
+
} | {
|
|
2318
|
+
value: string;
|
|
2319
|
+
name: string;
|
|
2320
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2321
|
+
})[] | undefined;
|
|
2322
|
+
}, {
|
|
2323
|
+
function: string;
|
|
2324
|
+
params?: ({
|
|
2325
|
+
values: string[];
|
|
2326
|
+
name: string;
|
|
2327
|
+
operator: "in" | "not in";
|
|
2328
|
+
} | {
|
|
2329
|
+
value: string;
|
|
2330
|
+
name: string;
|
|
2331
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2332
|
+
})[] | undefined;
|
|
2333
|
+
}>, "many">;
|
|
2334
|
+
}, "strip", z.ZodTypeAny, {
|
|
2335
|
+
type: "evmData";
|
|
2336
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
2337
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2338
|
+
type: "error";
|
|
2339
|
+
name: string;
|
|
2340
|
+
} | {
|
|
2341
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2342
|
+
type: "event";
|
|
2343
|
+
name: string;
|
|
2344
|
+
anonymous?: boolean | undefined;
|
|
2345
|
+
} | ({
|
|
2346
|
+
payable?: boolean | undefined;
|
|
2347
|
+
constant?: boolean | undefined;
|
|
2348
|
+
gas?: number | undefined;
|
|
2349
|
+
} & ({
|
|
2350
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2351
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2352
|
+
type: "function";
|
|
2353
|
+
name: string;
|
|
2354
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2355
|
+
} | {
|
|
2356
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2357
|
+
type: "constructor";
|
|
2358
|
+
stateMutability: "nonpayable" | "payable";
|
|
2359
|
+
} | {
|
|
2360
|
+
type: "fallback";
|
|
2361
|
+
stateMutability: "nonpayable" | "payable";
|
|
2362
|
+
inputs?: [] | undefined;
|
|
2363
|
+
} | {
|
|
2364
|
+
type: "receive";
|
|
2365
|
+
stateMutability: "payable";
|
|
2366
|
+
})))[];
|
|
2367
|
+
conditions: {
|
|
2368
|
+
function: string;
|
|
2369
|
+
params?: ({
|
|
2370
|
+
values: string[];
|
|
2371
|
+
name: string;
|
|
2372
|
+
operator: "in" | "not in";
|
|
2373
|
+
} | {
|
|
2374
|
+
value: string;
|
|
2375
|
+
name: string;
|
|
2376
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2377
|
+
})[] | undefined;
|
|
2378
|
+
}[];
|
|
2379
|
+
}, {
|
|
2380
|
+
type: "evmData";
|
|
2381
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
2382
|
+
conditions: {
|
|
2383
|
+
function: string;
|
|
2384
|
+
params?: ({
|
|
2385
|
+
values: string[];
|
|
2386
|
+
name: string;
|
|
2387
|
+
operator: "in" | "not in";
|
|
2388
|
+
} | {
|
|
2389
|
+
value: string;
|
|
2390
|
+
name: string;
|
|
2391
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2392
|
+
})[] | undefined;
|
|
2393
|
+
}[];
|
|
2394
|
+
}>]>, "many">;
|
|
2395
|
+
/**
|
|
2396
|
+
* Type representing a set of criteria for the sendUserOperation operation.
|
|
2397
|
+
* Can contain up to 10 individual criterion objects of ETH value, EVM address, or EVM data types.
|
|
2398
|
+
*/
|
|
2399
|
+
export type SendUserOperationCriteria = z.infer<typeof SendUserOperationCriteriaSchema>;
|
|
2400
|
+
/**
|
|
2401
|
+
* Enum for Evm Operation types
|
|
2402
|
+
*/
|
|
2403
|
+
export declare const EvmOperationEnum: z.ZodEnum<["signEvmTransaction", "sendEvmTransaction", "signEvmMessage", "signEvmTypedData", "signEvmHash", "prepareUserOperation", "sendUserOperation"]>;
|
|
2404
|
+
/**
|
|
2405
|
+
* Type representing the operations that can be governed by a policy.
|
|
2406
|
+
* Defines what EVM operations the policy applies to.
|
|
2407
|
+
*/
|
|
2408
|
+
export type EvmOperation = z.infer<typeof EvmOperationEnum>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Enum for Action types
|
|
2411
|
+
*/
|
|
2412
|
+
export declare const ActionEnum: z.ZodEnum<["reject", "accept"]>;
|
|
2413
|
+
/**
|
|
2414
|
+
* Type representing the possible policy actions.
|
|
2415
|
+
* Determines whether matching the rule will cause a request to be accepted or rejected.
|
|
2416
|
+
*/
|
|
2417
|
+
export type Action = z.infer<typeof ActionEnum>;
|
|
2418
|
+
/**
|
|
2419
|
+
* Type representing a 'signEvmTransaction' policy rule that can accept or reject specific operations
|
|
2420
|
+
* based on a set of criteria.
|
|
2421
|
+
*/
|
|
2422
|
+
export declare const SignEvmTransactionRuleSchema: z.ZodObject<{
|
|
2423
|
+
/**
|
|
2424
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
2425
|
+
* "accept" will allow the transaction, "reject" will block it.
|
|
2426
|
+
*/
|
|
2427
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
2428
|
+
/**
|
|
2429
|
+
* The operation to which this rule applies.
|
|
2430
|
+
* Must be "signEvmTransaction".
|
|
2431
|
+
*/
|
|
2432
|
+
operation: z.ZodLiteral<"signEvmTransaction">;
|
|
2433
|
+
/**
|
|
2434
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
2435
|
+
* Must be compatible with the specified operation type.
|
|
2436
|
+
*/
|
|
2437
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2438
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
2439
|
+
type: z.ZodLiteral<"ethValue">;
|
|
2440
|
+
/**
|
|
2441
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
2442
|
+
* Must contain only digits.
|
|
2443
|
+
*/
|
|
2444
|
+
ethValue: z.ZodString;
|
|
2445
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
2446
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2447
|
+
}, "strip", z.ZodTypeAny, {
|
|
2448
|
+
ethValue: string;
|
|
2449
|
+
type: "ethValue";
|
|
2450
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2451
|
+
}, {
|
|
2452
|
+
ethValue: string;
|
|
2453
|
+
type: "ethValue";
|
|
2454
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2455
|
+
}>, z.ZodObject<{
|
|
2456
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
2457
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
2458
|
+
/**
|
|
2459
|
+
* Array of EVM addresses to compare against.
|
|
2460
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
2461
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
2462
|
+
*/
|
|
2463
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
2464
|
+
/**
|
|
2465
|
+
* The operator to use for evaluating transaction addresses.
|
|
2466
|
+
* "in" checks if an address is in the provided list.
|
|
2467
|
+
* "not in" checks if an address is not in the provided list.
|
|
2468
|
+
*/
|
|
2469
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2470
|
+
}, "strip", z.ZodTypeAny, {
|
|
2471
|
+
type: "evmAddress";
|
|
2472
|
+
operator: "in" | "not in";
|
|
2473
|
+
addresses: `0x${string}`[];
|
|
2474
|
+
}, {
|
|
2475
|
+
type: "evmAddress";
|
|
2476
|
+
operator: "in" | "not in";
|
|
2477
|
+
addresses: string[];
|
|
2478
|
+
}>, z.ZodObject<{
|
|
2479
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
2480
|
+
type: z.ZodLiteral<"evmData">;
|
|
2481
|
+
/**
|
|
2482
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
2483
|
+
*/
|
|
2484
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2485
|
+
type: z.ZodLiteral<"error">;
|
|
2486
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
2487
|
+
/**
|
|
2488
|
+
* Schema for SignEvmTypedData field criterion
|
|
2489
|
+
*/
|
|
2490
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2491
|
+
name: z.ZodString;
|
|
2492
|
+
}, "strip", z.ZodTypeAny, {
|
|
2493
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2494
|
+
type: "error";
|
|
2495
|
+
name: string;
|
|
2496
|
+
}, {
|
|
2497
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2498
|
+
type: "error";
|
|
2499
|
+
name: string;
|
|
2500
|
+
}>, z.ZodObject<{
|
|
2501
|
+
type: z.ZodLiteral<"event">;
|
|
2502
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
2503
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
2504
|
+
name: z.ZodString;
|
|
2505
|
+
}, "strip", z.ZodTypeAny, {
|
|
2506
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2507
|
+
type: "event";
|
|
2508
|
+
name: string;
|
|
2509
|
+
anonymous?: boolean | undefined;
|
|
2510
|
+
}, {
|
|
2511
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2512
|
+
type: "event";
|
|
2513
|
+
name: string;
|
|
2514
|
+
anonymous?: boolean | undefined;
|
|
2515
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
2516
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
2517
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
2518
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
2519
|
+
}, "strip", z.ZodTypeAny, {
|
|
2520
|
+
payable?: boolean | undefined;
|
|
2521
|
+
constant?: boolean | undefined;
|
|
2522
|
+
gas?: number | undefined;
|
|
2523
|
+
}, {
|
|
2524
|
+
payable?: boolean | undefined;
|
|
2525
|
+
constant?: boolean | undefined;
|
|
2526
|
+
gas?: number | undefined;
|
|
2527
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2528
|
+
type: z.ZodLiteral<"function">;
|
|
2529
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2530
|
+
name: z.ZodString;
|
|
2531
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2532
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
2533
|
+
}, "strip", z.ZodTypeAny, {
|
|
2534
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2535
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2536
|
+
type: "function";
|
|
2537
|
+
name: string;
|
|
2538
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2539
|
+
}, {
|
|
2540
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2541
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2542
|
+
type: "function";
|
|
2543
|
+
name: string;
|
|
2544
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2545
|
+
}>, z.ZodObject<{
|
|
2546
|
+
type: z.ZodLiteral<"constructor">;
|
|
2547
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
2548
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
2549
|
+
}, "strip", z.ZodTypeAny, {
|
|
2550
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2551
|
+
type: "constructor";
|
|
2552
|
+
stateMutability: "nonpayable" | "payable";
|
|
2553
|
+
}, {
|
|
2554
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2555
|
+
type: "constructor";
|
|
2556
|
+
stateMutability: "nonpayable" | "payable";
|
|
2557
|
+
}>, z.ZodObject<{
|
|
2558
|
+
type: z.ZodLiteral<"fallback">;
|
|
2559
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
2560
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
2561
|
+
}, "strip", z.ZodTypeAny, {
|
|
2562
|
+
type: "fallback";
|
|
2563
|
+
stateMutability: "nonpayable" | "payable";
|
|
2564
|
+
inputs?: [] | undefined;
|
|
2565
|
+
}, {
|
|
2566
|
+
type: "fallback";
|
|
2567
|
+
stateMutability: "nonpayable" | "payable";
|
|
2568
|
+
inputs?: [] | undefined;
|
|
2569
|
+
}>, z.ZodObject<{
|
|
2570
|
+
type: z.ZodLiteral<"receive">;
|
|
2571
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
2572
|
+
}, "strip", z.ZodTypeAny, {
|
|
2573
|
+
type: "receive";
|
|
2574
|
+
stateMutability: "payable";
|
|
2575
|
+
}, {
|
|
2576
|
+
type: "receive";
|
|
2577
|
+
stateMutability: "payable";
|
|
2578
|
+
}>]>>, {
|
|
2579
|
+
payable?: boolean | undefined;
|
|
2580
|
+
constant?: boolean | undefined;
|
|
2581
|
+
gas?: number | undefined;
|
|
2582
|
+
} & ({
|
|
2583
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2584
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2585
|
+
type: "function";
|
|
2586
|
+
name: string;
|
|
2587
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2588
|
+
} | {
|
|
2589
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2590
|
+
type: "constructor";
|
|
2591
|
+
stateMutability: "nonpayable" | "payable";
|
|
2592
|
+
} | {
|
|
2593
|
+
type: "fallback";
|
|
2594
|
+
stateMutability: "nonpayable" | "payable";
|
|
2595
|
+
inputs?: [] | undefined;
|
|
2596
|
+
} | {
|
|
2597
|
+
type: "receive";
|
|
2598
|
+
stateMutability: "payable";
|
|
2599
|
+
}), unknown>]>, "many">>]>;
|
|
2600
|
+
/**
|
|
2601
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
2602
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
2603
|
+
*/
|
|
2604
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
2605
|
+
/**
|
|
2606
|
+
* The name of a smart contract function being called.
|
|
2607
|
+
*/
|
|
2608
|
+
function: z.ZodString;
|
|
2609
|
+
/**
|
|
2610
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
2611
|
+
*/
|
|
2612
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2613
|
+
/**
|
|
2614
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
2615
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
2616
|
+
*/
|
|
2617
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2618
|
+
/**
|
|
2619
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
2620
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
2621
|
+
*/
|
|
2622
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2623
|
+
/**
|
|
2624
|
+
* A single value to compare the value resolved at `name` to.
|
|
2625
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
2626
|
+
* should be encoded, and which operators are supported for each type.
|
|
2627
|
+
*/
|
|
2628
|
+
value: z.ZodString;
|
|
2629
|
+
}, "strip", z.ZodTypeAny, {
|
|
2630
|
+
value: string;
|
|
2631
|
+
name: string;
|
|
2632
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2633
|
+
}, {
|
|
2634
|
+
value: string;
|
|
2635
|
+
name: string;
|
|
2636
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2637
|
+
}>, z.ZodObject<{
|
|
2638
|
+
/**
|
|
2639
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
2640
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
2641
|
+
*/
|
|
2642
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
2643
|
+
/**
|
|
2644
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
2645
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
2646
|
+
*/
|
|
2647
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
2648
|
+
/**
|
|
2649
|
+
* Values to compare against the resolved `name` value.
|
|
2650
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
2651
|
+
* should be encoded, and which operators are supported for each type.
|
|
2652
|
+
*/
|
|
2653
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
2654
|
+
}, "strip", z.ZodTypeAny, {
|
|
2655
|
+
values: string[];
|
|
2656
|
+
name: string;
|
|
2657
|
+
operator: "in" | "not in";
|
|
2658
|
+
}, {
|
|
2659
|
+
values: string[];
|
|
2660
|
+
name: string;
|
|
2661
|
+
operator: "in" | "not in";
|
|
2662
|
+
}>]>, "many">>;
|
|
2663
|
+
}, "strip", z.ZodTypeAny, {
|
|
2664
|
+
function: string;
|
|
2665
|
+
params?: ({
|
|
2666
|
+
values: string[];
|
|
2667
|
+
name: string;
|
|
2668
|
+
operator: "in" | "not in";
|
|
2669
|
+
} | {
|
|
2670
|
+
value: string;
|
|
2671
|
+
name: string;
|
|
2672
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2673
|
+
})[] | undefined;
|
|
2674
|
+
}, {
|
|
2675
|
+
function: string;
|
|
2676
|
+
params?: ({
|
|
2677
|
+
values: string[];
|
|
2678
|
+
name: string;
|
|
2679
|
+
operator: "in" | "not in";
|
|
2680
|
+
} | {
|
|
2681
|
+
value: string;
|
|
2682
|
+
name: string;
|
|
2683
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2684
|
+
})[] | undefined;
|
|
2685
|
+
}>, "many">;
|
|
2686
|
+
}, "strip", z.ZodTypeAny, {
|
|
2687
|
+
type: "evmData";
|
|
2688
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
2689
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2690
|
+
type: "error";
|
|
2691
|
+
name: string;
|
|
2692
|
+
} | {
|
|
2693
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2694
|
+
type: "event";
|
|
2695
|
+
name: string;
|
|
2696
|
+
anonymous?: boolean | undefined;
|
|
2697
|
+
} | ({
|
|
2698
|
+
payable?: boolean | undefined;
|
|
2699
|
+
constant?: boolean | undefined;
|
|
2700
|
+
gas?: number | undefined;
|
|
2701
|
+
} & ({
|
|
2702
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2703
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2704
|
+
type: "function";
|
|
2705
|
+
name: string;
|
|
2706
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2707
|
+
} | {
|
|
2708
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2709
|
+
type: "constructor";
|
|
2710
|
+
stateMutability: "nonpayable" | "payable";
|
|
2711
|
+
} | {
|
|
2712
|
+
type: "fallback";
|
|
2713
|
+
stateMutability: "nonpayable" | "payable";
|
|
2714
|
+
inputs?: [] | undefined;
|
|
2715
|
+
} | {
|
|
2716
|
+
type: "receive";
|
|
2717
|
+
stateMutability: "payable";
|
|
2718
|
+
})))[];
|
|
2719
|
+
conditions: {
|
|
2720
|
+
function: string;
|
|
2721
|
+
params?: ({
|
|
2722
|
+
values: string[];
|
|
2723
|
+
name: string;
|
|
2724
|
+
operator: "in" | "not in";
|
|
2725
|
+
} | {
|
|
2726
|
+
value: string;
|
|
2727
|
+
name: string;
|
|
2728
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2729
|
+
})[] | undefined;
|
|
2730
|
+
}[];
|
|
2731
|
+
}, {
|
|
2732
|
+
type: "evmData";
|
|
2733
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
2734
|
+
conditions: {
|
|
2735
|
+
function: string;
|
|
2736
|
+
params?: ({
|
|
2737
|
+
values: string[];
|
|
2738
|
+
name: string;
|
|
2739
|
+
operator: "in" | "not in";
|
|
2740
|
+
} | {
|
|
2741
|
+
value: string;
|
|
2742
|
+
name: string;
|
|
2743
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2744
|
+
})[] | undefined;
|
|
2745
|
+
}[];
|
|
2746
|
+
}>, z.ZodObject<{
|
|
2747
|
+
/** The type of criterion, must be "netUSDChange" for USD denominated asset transfer rules. */
|
|
2748
|
+
type: z.ZodLiteral<"netUSDChange">;
|
|
2749
|
+
/**
|
|
2750
|
+
* The amount of USD, in cents, that the total USD value of a transaction's asset transfer and exposure should be compared to.
|
|
2751
|
+
*/
|
|
2752
|
+
changeCents: z.ZodNumber;
|
|
2753
|
+
/**
|
|
2754
|
+
* The operator to use for the comparison. The total value of a transaction's asset transfer and exposure in USD will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
|
|
2755
|
+
*/
|
|
2756
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
2757
|
+
}, "strip", z.ZodTypeAny, {
|
|
2758
|
+
type: "netUSDChange";
|
|
2759
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2760
|
+
changeCents: number;
|
|
2761
|
+
}, {
|
|
2762
|
+
type: "netUSDChange";
|
|
2763
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2764
|
+
changeCents: number;
|
|
2765
|
+
}>]>, "many">;
|
|
2766
|
+
}, "strip", z.ZodTypeAny, {
|
|
2767
|
+
action: "reject" | "accept";
|
|
2768
|
+
operation: "signEvmTransaction";
|
|
2769
|
+
criteria: ({
|
|
2770
|
+
ethValue: string;
|
|
2771
|
+
type: "ethValue";
|
|
2772
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2773
|
+
} | {
|
|
2774
|
+
type: "evmAddress";
|
|
2775
|
+
operator: "in" | "not in";
|
|
2776
|
+
addresses: `0x${string}`[];
|
|
2777
|
+
} | {
|
|
2778
|
+
type: "netUSDChange";
|
|
2779
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2780
|
+
changeCents: number;
|
|
2781
|
+
} | {
|
|
2782
|
+
type: "evmData";
|
|
2783
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
2784
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2785
|
+
type: "error";
|
|
2786
|
+
name: string;
|
|
2787
|
+
} | {
|
|
2788
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
2789
|
+
type: "event";
|
|
2790
|
+
name: string;
|
|
2791
|
+
anonymous?: boolean | undefined;
|
|
2792
|
+
} | ({
|
|
2793
|
+
payable?: boolean | undefined;
|
|
2794
|
+
constant?: boolean | undefined;
|
|
2795
|
+
gas?: number | undefined;
|
|
2796
|
+
} & ({
|
|
2797
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2798
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
2799
|
+
type: "function";
|
|
2800
|
+
name: string;
|
|
2801
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
2802
|
+
} | {
|
|
2803
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
2804
|
+
type: "constructor";
|
|
2805
|
+
stateMutability: "nonpayable" | "payable";
|
|
2806
|
+
} | {
|
|
2807
|
+
type: "fallback";
|
|
2808
|
+
stateMutability: "nonpayable" | "payable";
|
|
2809
|
+
inputs?: [] | undefined;
|
|
2810
|
+
} | {
|
|
2811
|
+
type: "receive";
|
|
2812
|
+
stateMutability: "payable";
|
|
2813
|
+
})))[];
|
|
2814
|
+
conditions: {
|
|
2815
|
+
function: string;
|
|
2816
|
+
params?: ({
|
|
2817
|
+
values: string[];
|
|
2818
|
+
name: string;
|
|
2819
|
+
operator: "in" | "not in";
|
|
2820
|
+
} | {
|
|
2821
|
+
value: string;
|
|
2822
|
+
name: string;
|
|
2823
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2824
|
+
})[] | undefined;
|
|
2825
|
+
}[];
|
|
2826
|
+
})[];
|
|
2827
|
+
}, {
|
|
2828
|
+
action: "reject" | "accept";
|
|
2829
|
+
operation: "signEvmTransaction";
|
|
2830
|
+
criteria: ({
|
|
2831
|
+
ethValue: string;
|
|
2832
|
+
type: "ethValue";
|
|
2833
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2834
|
+
} | {
|
|
2835
|
+
type: "evmAddress";
|
|
2836
|
+
operator: "in" | "not in";
|
|
2837
|
+
addresses: string[];
|
|
2838
|
+
} | {
|
|
2839
|
+
type: "netUSDChange";
|
|
2840
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2841
|
+
changeCents: number;
|
|
2842
|
+
} | {
|
|
2843
|
+
type: "evmData";
|
|
2844
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
2845
|
+
conditions: {
|
|
2846
|
+
function: string;
|
|
2847
|
+
params?: ({
|
|
2848
|
+
values: string[];
|
|
2849
|
+
name: string;
|
|
2850
|
+
operator: "in" | "not in";
|
|
2851
|
+
} | {
|
|
2852
|
+
value: string;
|
|
2853
|
+
name: string;
|
|
2854
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
2855
|
+
})[] | undefined;
|
|
2856
|
+
}[];
|
|
2857
|
+
})[];
|
|
2858
|
+
}>;
|
|
2859
|
+
export type SignEvmTransactionRule = z.infer<typeof SignEvmTransactionRuleSchema>;
|
|
2860
|
+
/**
|
|
2861
|
+
* Type representing a 'signEvmHash' policy rule that can accept or reject specific operations
|
|
2862
|
+
* based on a set of criteria.
|
|
2863
|
+
*/
|
|
2864
|
+
export declare const SignEvmHashRuleSchema: z.ZodObject<{
|
|
2865
|
+
/**
|
|
2866
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
2867
|
+
* "accept" will allow the signing, "reject" will block it.
|
|
2868
|
+
*/
|
|
2869
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
2870
|
+
/**
|
|
2871
|
+
* The operation to which this rule applies.
|
|
2872
|
+
* Must be "signEvmHash".
|
|
2873
|
+
*/
|
|
2874
|
+
operation: z.ZodLiteral<"signEvmHash">;
|
|
2875
|
+
}, "strip", z.ZodTypeAny, {
|
|
2876
|
+
action: "reject" | "accept";
|
|
2877
|
+
operation: "signEvmHash";
|
|
2878
|
+
}, {
|
|
2879
|
+
action: "reject" | "accept";
|
|
2880
|
+
operation: "signEvmHash";
|
|
2881
|
+
}>;
|
|
2882
|
+
export type SignEvmHashRule = z.infer<typeof SignEvmHashRuleSchema>;
|
|
2883
|
+
/**
|
|
2884
|
+
* Type representing a 'signEvmMessage' policy rule that can accept or reject specific operations
|
|
2885
|
+
* based on a set of criteria.
|
|
2886
|
+
*/
|
|
2887
|
+
export declare const SignEvmMessageRuleSchema: z.ZodObject<{
|
|
2888
|
+
/**
|
|
2889
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
2890
|
+
* "accept" will allow the signing, "reject" will block it.
|
|
2891
|
+
*/
|
|
2892
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
2893
|
+
/**
|
|
2894
|
+
* The operation to which this rule applies.
|
|
2895
|
+
* Must be "signEvmMessage".
|
|
2896
|
+
*/
|
|
2897
|
+
operation: z.ZodLiteral<"signEvmMessage">;
|
|
2898
|
+
/**
|
|
2899
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
2900
|
+
* Must be compatible with the specified operation type.
|
|
2901
|
+
*/
|
|
2902
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2903
|
+
/** The type of criterion, must be "evmMessage" for EVM message-based rules. */
|
|
2904
|
+
type: z.ZodLiteral<"evmMessage">;
|
|
2905
|
+
/**
|
|
2906
|
+
* A regular expression the message is matched against.
|
|
2907
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
2908
|
+
*/
|
|
2909
|
+
match: z.ZodString;
|
|
2910
|
+
}, "strip", z.ZodTypeAny, {
|
|
2911
|
+
match: string;
|
|
2912
|
+
type: "evmMessage";
|
|
2913
|
+
}, {
|
|
2914
|
+
match: string;
|
|
2915
|
+
type: "evmMessage";
|
|
2916
|
+
}>]>, "many">;
|
|
2917
|
+
}, "strip", z.ZodTypeAny, {
|
|
2918
|
+
action: "reject" | "accept";
|
|
2919
|
+
operation: "signEvmMessage";
|
|
2920
|
+
criteria: {
|
|
2921
|
+
match: string;
|
|
2922
|
+
type: "evmMessage";
|
|
2923
|
+
}[];
|
|
2924
|
+
}, {
|
|
2925
|
+
action: "reject" | "accept";
|
|
2926
|
+
operation: "signEvmMessage";
|
|
2927
|
+
criteria: {
|
|
2928
|
+
match: string;
|
|
2929
|
+
type: "evmMessage";
|
|
2930
|
+
}[];
|
|
2931
|
+
}>;
|
|
2932
|
+
export type SignEvmMessageRule = z.infer<typeof SignEvmMessageRuleSchema>;
|
|
2933
|
+
/**
|
|
2934
|
+
* Type representing a 'signEvmTypedData' policy rule that can accept or reject specific operations
|
|
2935
|
+
* based on a set of criteria.
|
|
2936
|
+
*/
|
|
2937
|
+
export declare const SignEvmTypedDataRuleSchema: z.ZodObject<{
|
|
2938
|
+
/**
|
|
2939
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
2940
|
+
* "accept" will allow the signing, "reject" will block it.
|
|
2941
|
+
*/
|
|
2942
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
2943
|
+
/**
|
|
2944
|
+
* The operation to which this rule applies.
|
|
2945
|
+
* Must be "signEvmTypedData".
|
|
2946
|
+
*/
|
|
2947
|
+
operation: z.ZodLiteral<"signEvmTypedData">;
|
|
2948
|
+
/**
|
|
2949
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
2950
|
+
* Must be compatible with the specified operation type.
|
|
2951
|
+
*/
|
|
2952
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2953
|
+
/** The type of criterion, must be "evmTypedDataField" for typed data field-based rules. */
|
|
2954
|
+
type: z.ZodLiteral<"evmTypedDataField">;
|
|
2955
|
+
/**
|
|
2956
|
+
* The EIP-712 type definitions for the typed data.
|
|
2957
|
+
* Must include at minimum the primary type being signed.
|
|
2958
|
+
*/
|
|
2959
|
+
types: z.ZodObject<{
|
|
2960
|
+
/**
|
|
2961
|
+
* EIP-712 compliant map of model names to model definitions.
|
|
2962
|
+
*/
|
|
2963
|
+
types: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
2964
|
+
name: z.ZodString;
|
|
2965
|
+
type: z.ZodString;
|
|
2966
|
+
}, "strip", z.ZodTypeAny, {
|
|
2967
|
+
type: string;
|
|
2968
|
+
name: string;
|
|
2969
|
+
}, {
|
|
2970
|
+
type: string;
|
|
2971
|
+
name: string;
|
|
2972
|
+
}>, "many">>;
|
|
2973
|
+
/**
|
|
2974
|
+
* The name of the root EIP-712 type. This value must be included in the `types` object.
|
|
2975
|
+
*/
|
|
2976
|
+
primaryType: z.ZodString;
|
|
2977
|
+
}, "strip", z.ZodTypeAny, {
|
|
2978
|
+
types: Record<string, {
|
|
2979
|
+
type: string;
|
|
2980
|
+
name: string;
|
|
2981
|
+
}[]>;
|
|
2982
|
+
primaryType: string;
|
|
2983
|
+
}, {
|
|
2984
|
+
types: Record<string, {
|
|
2985
|
+
type: string;
|
|
2986
|
+
name: string;
|
|
2987
|
+
}[]>;
|
|
2988
|
+
primaryType: string;
|
|
2989
|
+
}>;
|
|
2990
|
+
/**
|
|
2991
|
+
* Array of conditions to apply against typed data fields.
|
|
2992
|
+
* Each condition specifies how to validate a specific field within the typed data.
|
|
2993
|
+
*/
|
|
2994
|
+
conditions: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2995
|
+
/**
|
|
2996
|
+
* Array of EVM addresses to compare against.
|
|
2997
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
2998
|
+
* Limited to a maximum of 300 addresses per condition.
|
|
2999
|
+
*/
|
|
3000
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
3001
|
+
/**
|
|
3002
|
+
* The operator to use for evaluating addresses.
|
|
3003
|
+
* "in" checks if an address is in the provided list.
|
|
3004
|
+
* "not in" checks if an address is not in the provided list.
|
|
3005
|
+
*/
|
|
3006
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3007
|
+
/**
|
|
3008
|
+
* The path to the field to compare against this criterion.
|
|
3009
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.buyer").
|
|
3010
|
+
*/
|
|
3011
|
+
path: z.ZodString;
|
|
3012
|
+
}, "strip", z.ZodTypeAny, {
|
|
3013
|
+
path: string;
|
|
3014
|
+
operator: "in" | "not in";
|
|
3015
|
+
addresses: `0x${string}`[];
|
|
3016
|
+
}, {
|
|
3017
|
+
path: string;
|
|
3018
|
+
operator: "in" | "not in";
|
|
3019
|
+
addresses: string[];
|
|
3020
|
+
}>, z.ZodObject<{
|
|
3021
|
+
/**
|
|
3022
|
+
* The numerical value to compare against, as a string.
|
|
3023
|
+
* Must contain only digits.
|
|
3024
|
+
*/
|
|
3025
|
+
value: z.ZodString;
|
|
3026
|
+
/**
|
|
3027
|
+
* The comparison operator to use.
|
|
3028
|
+
*/
|
|
3029
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
3030
|
+
/**
|
|
3031
|
+
* The path to the field to compare against this criterion.
|
|
3032
|
+
* To reference deeply nested fields, use dot notation (e.g., "order.price").
|
|
3033
|
+
*/
|
|
3034
|
+
path: z.ZodString;
|
|
3035
|
+
}, "strip", z.ZodTypeAny, {
|
|
3036
|
+
value: string;
|
|
3037
|
+
path: string;
|
|
3038
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3039
|
+
}, {
|
|
3040
|
+
value: string;
|
|
3041
|
+
path: string;
|
|
3042
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3043
|
+
}>, z.ZodObject<{
|
|
3044
|
+
/**
|
|
3045
|
+
* A regular expression the string field is matched against.
|
|
3046
|
+
* Accepts valid regular expression syntax described by [RE2](https://github.com/google/re2/wiki/Syntax).
|
|
3047
|
+
*/
|
|
3048
|
+
match: z.ZodString;
|
|
3049
|
+
/**
|
|
3050
|
+
* The path to the field to compare against this criterion.
|
|
3051
|
+
* To reference deeply nested fields, use dot notation (e.g., "metadata.description").
|
|
3052
|
+
*/
|
|
3053
|
+
path: z.ZodString;
|
|
3054
|
+
}, "strip", z.ZodTypeAny, {
|
|
3055
|
+
match: string;
|
|
3056
|
+
path: string;
|
|
3057
|
+
}, {
|
|
3058
|
+
match: string;
|
|
3059
|
+
path: string;
|
|
3060
|
+
}>]>, "many">;
|
|
3061
|
+
}, "strip", z.ZodTypeAny, {
|
|
3062
|
+
type: "evmTypedDataField";
|
|
3063
|
+
types: {
|
|
3064
|
+
types: Record<string, {
|
|
3065
|
+
type: string;
|
|
3066
|
+
name: string;
|
|
3067
|
+
}[]>;
|
|
3068
|
+
primaryType: string;
|
|
3069
|
+
};
|
|
3070
|
+
conditions: ({
|
|
3071
|
+
path: string;
|
|
3072
|
+
operator: "in" | "not in";
|
|
3073
|
+
addresses: `0x${string}`[];
|
|
3074
|
+
} | {
|
|
3075
|
+
value: string;
|
|
3076
|
+
path: string;
|
|
3077
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3078
|
+
} | {
|
|
3079
|
+
match: string;
|
|
3080
|
+
path: string;
|
|
3081
|
+
})[];
|
|
3082
|
+
}, {
|
|
3083
|
+
type: "evmTypedDataField";
|
|
3084
|
+
types: {
|
|
3085
|
+
types: Record<string, {
|
|
3086
|
+
type: string;
|
|
3087
|
+
name: string;
|
|
3088
|
+
}[]>;
|
|
3089
|
+
primaryType: string;
|
|
3090
|
+
};
|
|
3091
|
+
conditions: ({
|
|
3092
|
+
path: string;
|
|
3093
|
+
operator: "in" | "not in";
|
|
3094
|
+
addresses: string[];
|
|
3095
|
+
} | {
|
|
3096
|
+
value: string;
|
|
3097
|
+
path: string;
|
|
3098
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3099
|
+
} | {
|
|
3100
|
+
match: string;
|
|
3101
|
+
path: string;
|
|
3102
|
+
})[];
|
|
3103
|
+
}>, z.ZodObject<{
|
|
3104
|
+
/** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */
|
|
3105
|
+
type: z.ZodLiteral<"evmTypedDataVerifyingContract">;
|
|
3106
|
+
/**
|
|
3107
|
+
* Array of EVM addresses allowed or disallowed as verifying contracts.
|
|
3108
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
3109
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
3110
|
+
*/
|
|
3111
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
3112
|
+
/**
|
|
3113
|
+
* The operator to use for evaluating verifying contract addresses.
|
|
3114
|
+
* "in" checks if the verifying contract is in the provided list.
|
|
3115
|
+
* "not in" checks if the verifying contract is not in the provided list.
|
|
3116
|
+
*/
|
|
3117
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3118
|
+
}, "strip", z.ZodTypeAny, {
|
|
3119
|
+
type: "evmTypedDataVerifyingContract";
|
|
3120
|
+
operator: "in" | "not in";
|
|
3121
|
+
addresses: `0x${string}`[];
|
|
3122
|
+
}, {
|
|
3123
|
+
type: "evmTypedDataVerifyingContract";
|
|
3124
|
+
operator: "in" | "not in";
|
|
3125
|
+
addresses: string[];
|
|
3126
|
+
}>]>, "many">;
|
|
3127
|
+
}, "strip", z.ZodTypeAny, {
|
|
3128
|
+
action: "reject" | "accept";
|
|
3129
|
+
operation: "signEvmTypedData";
|
|
3130
|
+
criteria: ({
|
|
3131
|
+
type: "evmTypedDataField";
|
|
3132
|
+
types: {
|
|
3133
|
+
types: Record<string, {
|
|
3134
|
+
type: string;
|
|
3135
|
+
name: string;
|
|
3136
|
+
}[]>;
|
|
3137
|
+
primaryType: string;
|
|
3138
|
+
};
|
|
3139
|
+
conditions: ({
|
|
3140
|
+
path: string;
|
|
3141
|
+
operator: "in" | "not in";
|
|
3142
|
+
addresses: `0x${string}`[];
|
|
3143
|
+
} | {
|
|
3144
|
+
value: string;
|
|
3145
|
+
path: string;
|
|
3146
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3147
|
+
} | {
|
|
3148
|
+
match: string;
|
|
3149
|
+
path: string;
|
|
3150
|
+
})[];
|
|
3151
|
+
} | {
|
|
3152
|
+
type: "evmTypedDataVerifyingContract";
|
|
3153
|
+
operator: "in" | "not in";
|
|
3154
|
+
addresses: `0x${string}`[];
|
|
3155
|
+
})[];
|
|
3156
|
+
}, {
|
|
3157
|
+
action: "reject" | "accept";
|
|
3158
|
+
operation: "signEvmTypedData";
|
|
3159
|
+
criteria: ({
|
|
3160
|
+
type: "evmTypedDataField";
|
|
3161
|
+
types: {
|
|
3162
|
+
types: Record<string, {
|
|
3163
|
+
type: string;
|
|
3164
|
+
name: string;
|
|
3165
|
+
}[]>;
|
|
3166
|
+
primaryType: string;
|
|
3167
|
+
};
|
|
3168
|
+
conditions: ({
|
|
3169
|
+
path: string;
|
|
3170
|
+
operator: "in" | "not in";
|
|
3171
|
+
addresses: string[];
|
|
3172
|
+
} | {
|
|
3173
|
+
value: string;
|
|
3174
|
+
path: string;
|
|
3175
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3176
|
+
} | {
|
|
3177
|
+
match: string;
|
|
3178
|
+
path: string;
|
|
3179
|
+
})[];
|
|
3180
|
+
} | {
|
|
3181
|
+
type: "evmTypedDataVerifyingContract";
|
|
3182
|
+
operator: "in" | "not in";
|
|
3183
|
+
addresses: string[];
|
|
3184
|
+
})[];
|
|
3185
|
+
}>;
|
|
3186
|
+
export type SignEvmTypedDataRule = z.infer<typeof SignEvmTypedDataRuleSchema>;
|
|
3187
|
+
/**
|
|
3188
|
+
* Type representing a 'sendEvmTransaction' policy rule that can accept or reject specific operations
|
|
3189
|
+
* based on a set of criteria.
|
|
3190
|
+
*/
|
|
3191
|
+
export declare const SendEvmTransactionRuleSchema: z.ZodObject<{
|
|
3192
|
+
/**
|
|
3193
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
3194
|
+
* "accept" will allow the transaction, "reject" will block it.
|
|
3195
|
+
*/
|
|
3196
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
3197
|
+
/**
|
|
3198
|
+
* The operation to which this rule applies.
|
|
3199
|
+
* Must be "sendEvmTransaction".
|
|
3200
|
+
*/
|
|
3201
|
+
operation: z.ZodLiteral<"sendEvmTransaction">;
|
|
3202
|
+
/**
|
|
3203
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
3204
|
+
* Must be compatible with the specified operation type.
|
|
3205
|
+
*/
|
|
3206
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3207
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
3208
|
+
type: z.ZodLiteral<"ethValue">;
|
|
3209
|
+
/**
|
|
3210
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
3211
|
+
* Must contain only digits.
|
|
3212
|
+
*/
|
|
3213
|
+
ethValue: z.ZodString;
|
|
3214
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
3215
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
3216
|
+
}, "strip", z.ZodTypeAny, {
|
|
3217
|
+
ethValue: string;
|
|
3218
|
+
type: "ethValue";
|
|
3219
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3220
|
+
}, {
|
|
3221
|
+
ethValue: string;
|
|
3222
|
+
type: "ethValue";
|
|
3223
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3224
|
+
}>, z.ZodObject<{
|
|
3225
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
3226
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
3227
|
+
/**
|
|
3228
|
+
* Array of EVM addresses to compare against.
|
|
3229
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
3230
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
3231
|
+
*/
|
|
3232
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
3233
|
+
/**
|
|
3234
|
+
* The operator to use for evaluating transaction addresses.
|
|
3235
|
+
* "in" checks if an address is in the provided list.
|
|
3236
|
+
* "not in" checks if an address is not in the provided list.
|
|
3237
|
+
*/
|
|
3238
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3239
|
+
}, "strip", z.ZodTypeAny, {
|
|
3240
|
+
type: "evmAddress";
|
|
3241
|
+
operator: "in" | "not in";
|
|
3242
|
+
addresses: `0x${string}`[];
|
|
3243
|
+
}, {
|
|
3244
|
+
type: "evmAddress";
|
|
3245
|
+
operator: "in" | "not in";
|
|
3246
|
+
addresses: string[];
|
|
3247
|
+
}>, z.ZodObject<{
|
|
3248
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
3249
|
+
type: z.ZodLiteral<"evmNetwork">;
|
|
3250
|
+
/**
|
|
3251
|
+
* Array of EVM network identifiers to compare against.
|
|
3252
|
+
* Either "base" or "base-sepolia"
|
|
3253
|
+
*/
|
|
3254
|
+
networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
|
|
3255
|
+
/**
|
|
3256
|
+
* The operator to use for evaluating transaction network.
|
|
3257
|
+
* "in" checks if a network is in the provided list.
|
|
3258
|
+
* "not in" checks if a network is not in the provided list.
|
|
3259
|
+
*/
|
|
3260
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3261
|
+
}, "strip", z.ZodTypeAny, {
|
|
3262
|
+
type: "evmNetwork";
|
|
3263
|
+
operator: "in" | "not in";
|
|
3264
|
+
networks: ("base-sepolia" | "base")[];
|
|
3265
|
+
}, {
|
|
3266
|
+
type: "evmNetwork";
|
|
3267
|
+
operator: "in" | "not in";
|
|
3268
|
+
networks: ("base-sepolia" | "base")[];
|
|
3269
|
+
}>, z.ZodObject<{
|
|
3270
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
3271
|
+
type: z.ZodLiteral<"evmData">;
|
|
3272
|
+
/**
|
|
3273
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
3274
|
+
*/
|
|
3275
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3276
|
+
type: z.ZodLiteral<"error">;
|
|
3277
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
3278
|
+
/**
|
|
3279
|
+
* Schema for SignEvmTypedData field criterion
|
|
3280
|
+
*/
|
|
3281
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3282
|
+
name: z.ZodString;
|
|
3283
|
+
}, "strip", z.ZodTypeAny, {
|
|
3284
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3285
|
+
type: "error";
|
|
3286
|
+
name: string;
|
|
3287
|
+
}, {
|
|
3288
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3289
|
+
type: "error";
|
|
3290
|
+
name: string;
|
|
3291
|
+
}>, z.ZodObject<{
|
|
3292
|
+
type: z.ZodLiteral<"event">;
|
|
3293
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
3294
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
3295
|
+
name: z.ZodString;
|
|
3296
|
+
}, "strip", z.ZodTypeAny, {
|
|
3297
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3298
|
+
type: "event";
|
|
3299
|
+
name: string;
|
|
3300
|
+
anonymous?: boolean | undefined;
|
|
3301
|
+
}, {
|
|
3302
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3303
|
+
type: "event";
|
|
3304
|
+
name: string;
|
|
3305
|
+
anonymous?: boolean | undefined;
|
|
3306
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
3307
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
3308
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
3309
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
3310
|
+
}, "strip", z.ZodTypeAny, {
|
|
3311
|
+
payable?: boolean | undefined;
|
|
3312
|
+
constant?: boolean | undefined;
|
|
3313
|
+
gas?: number | undefined;
|
|
3314
|
+
}, {
|
|
3315
|
+
payable?: boolean | undefined;
|
|
3316
|
+
constant?: boolean | undefined;
|
|
3317
|
+
gas?: number | undefined;
|
|
3318
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3319
|
+
type: z.ZodLiteral<"function">;
|
|
3320
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3321
|
+
name: z.ZodString;
|
|
3322
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3323
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
3324
|
+
}, "strip", z.ZodTypeAny, {
|
|
3325
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3326
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3327
|
+
type: "function";
|
|
3328
|
+
name: string;
|
|
3329
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3330
|
+
}, {
|
|
3331
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3332
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3333
|
+
type: "function";
|
|
3334
|
+
name: string;
|
|
3335
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3336
|
+
}>, z.ZodObject<{
|
|
3337
|
+
type: z.ZodLiteral<"constructor">;
|
|
3338
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3339
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
3340
|
+
}, "strip", z.ZodTypeAny, {
|
|
3341
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3342
|
+
type: "constructor";
|
|
3343
|
+
stateMutability: "nonpayable" | "payable";
|
|
3344
|
+
}, {
|
|
3345
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3346
|
+
type: "constructor";
|
|
3347
|
+
stateMutability: "nonpayable" | "payable";
|
|
3348
|
+
}>, z.ZodObject<{
|
|
3349
|
+
type: z.ZodLiteral<"fallback">;
|
|
3350
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
3351
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
3352
|
+
}, "strip", z.ZodTypeAny, {
|
|
3353
|
+
type: "fallback";
|
|
3354
|
+
stateMutability: "nonpayable" | "payable";
|
|
3355
|
+
inputs?: [] | undefined;
|
|
3356
|
+
}, {
|
|
3357
|
+
type: "fallback";
|
|
3358
|
+
stateMutability: "nonpayable" | "payable";
|
|
3359
|
+
inputs?: [] | undefined;
|
|
3360
|
+
}>, z.ZodObject<{
|
|
3361
|
+
type: z.ZodLiteral<"receive">;
|
|
3362
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
3363
|
+
}, "strip", z.ZodTypeAny, {
|
|
3364
|
+
type: "receive";
|
|
3365
|
+
stateMutability: "payable";
|
|
3366
|
+
}, {
|
|
3367
|
+
type: "receive";
|
|
3368
|
+
stateMutability: "payable";
|
|
3369
|
+
}>]>>, {
|
|
3370
|
+
payable?: boolean | undefined;
|
|
3371
|
+
constant?: boolean | undefined;
|
|
3372
|
+
gas?: number | undefined;
|
|
3373
|
+
} & ({
|
|
3374
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3375
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3376
|
+
type: "function";
|
|
3377
|
+
name: string;
|
|
3378
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3379
|
+
} | {
|
|
3380
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3381
|
+
type: "constructor";
|
|
3382
|
+
stateMutability: "nonpayable" | "payable";
|
|
3383
|
+
} | {
|
|
3384
|
+
type: "fallback";
|
|
3385
|
+
stateMutability: "nonpayable" | "payable";
|
|
3386
|
+
inputs?: [] | undefined;
|
|
3387
|
+
} | {
|
|
3388
|
+
type: "receive";
|
|
3389
|
+
stateMutability: "payable";
|
|
3390
|
+
}), unknown>]>, "many">>]>;
|
|
3391
|
+
/**
|
|
3392
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
3393
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
3394
|
+
*/
|
|
3395
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
3396
|
+
/**
|
|
3397
|
+
* The name of a smart contract function being called.
|
|
3398
|
+
*/
|
|
3399
|
+
function: z.ZodString;
|
|
3400
|
+
/**
|
|
3401
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
3402
|
+
*/
|
|
3403
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3404
|
+
/**
|
|
3405
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
3406
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
3407
|
+
*/
|
|
3408
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
3409
|
+
/**
|
|
3410
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
3411
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
3412
|
+
*/
|
|
3413
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
3414
|
+
/**
|
|
3415
|
+
* A single value to compare the value resolved at `name` to.
|
|
3416
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
3417
|
+
* should be encoded, and which operators are supported for each type.
|
|
3418
|
+
*/
|
|
3419
|
+
value: z.ZodString;
|
|
3420
|
+
}, "strip", z.ZodTypeAny, {
|
|
3421
|
+
value: string;
|
|
3422
|
+
name: string;
|
|
3423
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3424
|
+
}, {
|
|
3425
|
+
value: string;
|
|
3426
|
+
name: string;
|
|
3427
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3428
|
+
}>, z.ZodObject<{
|
|
3429
|
+
/**
|
|
3430
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
3431
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
3432
|
+
*/
|
|
3433
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
3434
|
+
/**
|
|
3435
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
3436
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
3437
|
+
*/
|
|
3438
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3439
|
+
/**
|
|
3440
|
+
* Values to compare against the resolved `name` value.
|
|
3441
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
3442
|
+
* should be encoded, and which operators are supported for each type.
|
|
3443
|
+
*/
|
|
3444
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
3445
|
+
}, "strip", z.ZodTypeAny, {
|
|
3446
|
+
values: string[];
|
|
3447
|
+
name: string;
|
|
3448
|
+
operator: "in" | "not in";
|
|
3449
|
+
}, {
|
|
3450
|
+
values: string[];
|
|
3451
|
+
name: string;
|
|
3452
|
+
operator: "in" | "not in";
|
|
3453
|
+
}>]>, "many">>;
|
|
3454
|
+
}, "strip", z.ZodTypeAny, {
|
|
3455
|
+
function: string;
|
|
3456
|
+
params?: ({
|
|
3457
|
+
values: string[];
|
|
3458
|
+
name: string;
|
|
3459
|
+
operator: "in" | "not in";
|
|
3460
|
+
} | {
|
|
3461
|
+
value: string;
|
|
3462
|
+
name: string;
|
|
3463
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3464
|
+
})[] | undefined;
|
|
3465
|
+
}, {
|
|
3466
|
+
function: string;
|
|
3467
|
+
params?: ({
|
|
3468
|
+
values: string[];
|
|
3469
|
+
name: string;
|
|
3470
|
+
operator: "in" | "not in";
|
|
3471
|
+
} | {
|
|
3472
|
+
value: string;
|
|
3473
|
+
name: string;
|
|
3474
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3475
|
+
})[] | undefined;
|
|
3476
|
+
}>, "many">;
|
|
3477
|
+
}, "strip", z.ZodTypeAny, {
|
|
3478
|
+
type: "evmData";
|
|
3479
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
3480
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3481
|
+
type: "error";
|
|
3482
|
+
name: string;
|
|
3483
|
+
} | {
|
|
3484
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3485
|
+
type: "event";
|
|
3486
|
+
name: string;
|
|
3487
|
+
anonymous?: boolean | undefined;
|
|
3488
|
+
} | ({
|
|
3489
|
+
payable?: boolean | undefined;
|
|
3490
|
+
constant?: boolean | undefined;
|
|
3491
|
+
gas?: number | undefined;
|
|
3492
|
+
} & ({
|
|
3493
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3494
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3495
|
+
type: "function";
|
|
3496
|
+
name: string;
|
|
3497
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3498
|
+
} | {
|
|
3499
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3500
|
+
type: "constructor";
|
|
3501
|
+
stateMutability: "nonpayable" | "payable";
|
|
3502
|
+
} | {
|
|
3503
|
+
type: "fallback";
|
|
3504
|
+
stateMutability: "nonpayable" | "payable";
|
|
3505
|
+
inputs?: [] | undefined;
|
|
3506
|
+
} | {
|
|
3507
|
+
type: "receive";
|
|
3508
|
+
stateMutability: "payable";
|
|
3509
|
+
})))[];
|
|
3510
|
+
conditions: {
|
|
3511
|
+
function: string;
|
|
3512
|
+
params?: ({
|
|
3513
|
+
values: string[];
|
|
3514
|
+
name: string;
|
|
3515
|
+
operator: "in" | "not in";
|
|
3516
|
+
} | {
|
|
3517
|
+
value: string;
|
|
3518
|
+
name: string;
|
|
3519
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3520
|
+
})[] | undefined;
|
|
3521
|
+
}[];
|
|
3522
|
+
}, {
|
|
3523
|
+
type: "evmData";
|
|
3524
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
3525
|
+
conditions: {
|
|
3526
|
+
function: string;
|
|
3527
|
+
params?: ({
|
|
3528
|
+
values: string[];
|
|
3529
|
+
name: string;
|
|
3530
|
+
operator: "in" | "not in";
|
|
3531
|
+
} | {
|
|
3532
|
+
value: string;
|
|
3533
|
+
name: string;
|
|
3534
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3535
|
+
})[] | undefined;
|
|
3536
|
+
}[];
|
|
3537
|
+
}>, z.ZodObject<{
|
|
3538
|
+
/** The type of criterion, must be "netUSDChange" for USD denominated asset transfer rules. */
|
|
3539
|
+
type: z.ZodLiteral<"netUSDChange">;
|
|
3540
|
+
/**
|
|
3541
|
+
* The amount of USD, in cents, that the total USD value of a transaction's asset transfer and exposure should be compared to.
|
|
3542
|
+
*/
|
|
3543
|
+
changeCents: z.ZodNumber;
|
|
3544
|
+
/**
|
|
3545
|
+
* The operator to use for the comparison. The total value of a transaction's asset transfer and exposure in USD will be on the left-hand side of the operator, and the `changeCents` field will be on the right-hand side.
|
|
3546
|
+
*/
|
|
3547
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
3548
|
+
}, "strip", z.ZodTypeAny, {
|
|
3549
|
+
type: "netUSDChange";
|
|
3550
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3551
|
+
changeCents: number;
|
|
3552
|
+
}, {
|
|
3553
|
+
type: "netUSDChange";
|
|
3554
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3555
|
+
changeCents: number;
|
|
3556
|
+
}>]>, "many">;
|
|
3557
|
+
}, "strip", z.ZodTypeAny, {
|
|
3558
|
+
action: "reject" | "accept";
|
|
3559
|
+
operation: "sendEvmTransaction";
|
|
3560
|
+
criteria: ({
|
|
3561
|
+
ethValue: string;
|
|
3562
|
+
type: "ethValue";
|
|
3563
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3564
|
+
} | {
|
|
3565
|
+
type: "evmAddress";
|
|
3566
|
+
operator: "in" | "not in";
|
|
3567
|
+
addresses: `0x${string}`[];
|
|
3568
|
+
} | {
|
|
3569
|
+
type: "evmNetwork";
|
|
3570
|
+
operator: "in" | "not in";
|
|
3571
|
+
networks: ("base-sepolia" | "base")[];
|
|
3572
|
+
} | {
|
|
3573
|
+
type: "netUSDChange";
|
|
3574
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3575
|
+
changeCents: number;
|
|
3576
|
+
} | {
|
|
3577
|
+
type: "evmData";
|
|
3578
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
3579
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3580
|
+
type: "error";
|
|
3581
|
+
name: string;
|
|
3582
|
+
} | {
|
|
3583
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3584
|
+
type: "event";
|
|
3585
|
+
name: string;
|
|
3586
|
+
anonymous?: boolean | undefined;
|
|
3587
|
+
} | ({
|
|
3588
|
+
payable?: boolean | undefined;
|
|
3589
|
+
constant?: boolean | undefined;
|
|
3590
|
+
gas?: number | undefined;
|
|
3591
|
+
} & ({
|
|
3592
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3593
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3594
|
+
type: "function";
|
|
3595
|
+
name: string;
|
|
3596
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3597
|
+
} | {
|
|
3598
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3599
|
+
type: "constructor";
|
|
3600
|
+
stateMutability: "nonpayable" | "payable";
|
|
3601
|
+
} | {
|
|
3602
|
+
type: "fallback";
|
|
3603
|
+
stateMutability: "nonpayable" | "payable";
|
|
3604
|
+
inputs?: [] | undefined;
|
|
3605
|
+
} | {
|
|
3606
|
+
type: "receive";
|
|
3607
|
+
stateMutability: "payable";
|
|
3608
|
+
})))[];
|
|
3609
|
+
conditions: {
|
|
3610
|
+
function: string;
|
|
3611
|
+
params?: ({
|
|
3612
|
+
values: string[];
|
|
3613
|
+
name: string;
|
|
3614
|
+
operator: "in" | "not in";
|
|
3615
|
+
} | {
|
|
3616
|
+
value: string;
|
|
3617
|
+
name: string;
|
|
3618
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3619
|
+
})[] | undefined;
|
|
3620
|
+
}[];
|
|
3621
|
+
})[];
|
|
3622
|
+
}, {
|
|
3623
|
+
action: "reject" | "accept";
|
|
3624
|
+
operation: "sendEvmTransaction";
|
|
3625
|
+
criteria: ({
|
|
3626
|
+
ethValue: string;
|
|
3627
|
+
type: "ethValue";
|
|
3628
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3629
|
+
} | {
|
|
3630
|
+
type: "evmAddress";
|
|
3631
|
+
operator: "in" | "not in";
|
|
3632
|
+
addresses: string[];
|
|
3633
|
+
} | {
|
|
3634
|
+
type: "evmNetwork";
|
|
3635
|
+
operator: "in" | "not in";
|
|
3636
|
+
networks: ("base-sepolia" | "base")[];
|
|
3637
|
+
} | {
|
|
3638
|
+
type: "netUSDChange";
|
|
3639
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3640
|
+
changeCents: number;
|
|
3641
|
+
} | {
|
|
3642
|
+
type: "evmData";
|
|
3643
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
3644
|
+
conditions: {
|
|
3645
|
+
function: string;
|
|
3646
|
+
params?: ({
|
|
3647
|
+
values: string[];
|
|
3648
|
+
name: string;
|
|
3649
|
+
operator: "in" | "not in";
|
|
3650
|
+
} | {
|
|
3651
|
+
value: string;
|
|
3652
|
+
name: string;
|
|
3653
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3654
|
+
})[] | undefined;
|
|
3655
|
+
}[];
|
|
3656
|
+
})[];
|
|
3657
|
+
}>;
|
|
3658
|
+
export type SendEvmTransactionRule = z.infer<typeof SendEvmTransactionRuleSchema>;
|
|
3659
|
+
/**
|
|
3660
|
+
* Type representing a 'prepareUserOperation' policy rule that can accept or reject specific operations
|
|
3661
|
+
* based on a set of criteria.
|
|
3662
|
+
*/
|
|
3663
|
+
export declare const PrepareUserOperationRuleSchema: z.ZodObject<{
|
|
3664
|
+
/**
|
|
3665
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
3666
|
+
* "accept" will allow the operation, "reject" will block it.
|
|
3667
|
+
*/
|
|
3668
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
3669
|
+
/**
|
|
3670
|
+
* The operation to which this rule applies.
|
|
3671
|
+
* Must be "prepareUserOperation".
|
|
3672
|
+
*/
|
|
3673
|
+
operation: z.ZodLiteral<"prepareUserOperation">;
|
|
3674
|
+
/**
|
|
3675
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
3676
|
+
* Must be compatible with the specified operation type.
|
|
3677
|
+
*/
|
|
3678
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3679
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
3680
|
+
type: z.ZodLiteral<"ethValue">;
|
|
3681
|
+
/**
|
|
3682
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
3683
|
+
* Must contain only digits.
|
|
3684
|
+
*/
|
|
3685
|
+
ethValue: z.ZodString;
|
|
3686
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
3687
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
3688
|
+
}, "strip", z.ZodTypeAny, {
|
|
3689
|
+
ethValue: string;
|
|
3690
|
+
type: "ethValue";
|
|
3691
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3692
|
+
}, {
|
|
3693
|
+
ethValue: string;
|
|
3694
|
+
type: "ethValue";
|
|
3695
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3696
|
+
}>, z.ZodObject<{
|
|
3697
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
3698
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
3699
|
+
/**
|
|
3700
|
+
* Array of EVM addresses to compare against.
|
|
3701
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
3702
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
3703
|
+
*/
|
|
3704
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
3705
|
+
/**
|
|
3706
|
+
* The operator to use for evaluating transaction addresses.
|
|
3707
|
+
* "in" checks if an address is in the provided list.
|
|
3708
|
+
* "not in" checks if an address is not in the provided list.
|
|
3709
|
+
*/
|
|
3710
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3711
|
+
}, "strip", z.ZodTypeAny, {
|
|
3712
|
+
type: "evmAddress";
|
|
3713
|
+
operator: "in" | "not in";
|
|
3714
|
+
addresses: `0x${string}`[];
|
|
3715
|
+
}, {
|
|
3716
|
+
type: "evmAddress";
|
|
3717
|
+
operator: "in" | "not in";
|
|
3718
|
+
addresses: string[];
|
|
3719
|
+
}>, z.ZodObject<{
|
|
3720
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
3721
|
+
type: z.ZodLiteral<"evmNetwork">;
|
|
3722
|
+
/**
|
|
3723
|
+
* Array of EVM network identifiers to compare against.
|
|
3724
|
+
* Either "base" or "base-sepolia"
|
|
3725
|
+
*/
|
|
3726
|
+
networks: z.ZodArray<z.ZodEnum<["base", "base-sepolia"]>, "many">;
|
|
3727
|
+
/**
|
|
3728
|
+
* The operator to use for evaluating transaction network.
|
|
3729
|
+
* "in" checks if a network is in the provided list.
|
|
3730
|
+
* "not in" checks if a network is not in the provided list.
|
|
3731
|
+
*/
|
|
3732
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3733
|
+
}, "strip", z.ZodTypeAny, {
|
|
3734
|
+
type: "evmNetwork";
|
|
3735
|
+
operator: "in" | "not in";
|
|
3736
|
+
networks: ("base-sepolia" | "base")[];
|
|
3737
|
+
}, {
|
|
3738
|
+
type: "evmNetwork";
|
|
3739
|
+
operator: "in" | "not in";
|
|
3740
|
+
networks: ("base-sepolia" | "base")[];
|
|
3741
|
+
}>, z.ZodObject<{
|
|
3742
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
3743
|
+
type: z.ZodLiteral<"evmData">;
|
|
3744
|
+
/**
|
|
3745
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
3746
|
+
*/
|
|
3747
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3748
|
+
type: z.ZodLiteral<"error">;
|
|
3749
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
3750
|
+
/**
|
|
3751
|
+
* Schema for SignEvmTypedData field criterion
|
|
3752
|
+
*/
|
|
3753
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3754
|
+
name: z.ZodString;
|
|
3755
|
+
}, "strip", z.ZodTypeAny, {
|
|
3756
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3757
|
+
type: "error";
|
|
3758
|
+
name: string;
|
|
3759
|
+
}, {
|
|
3760
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3761
|
+
type: "error";
|
|
3762
|
+
name: string;
|
|
3763
|
+
}>, z.ZodObject<{
|
|
3764
|
+
type: z.ZodLiteral<"event">;
|
|
3765
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
3766
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
3767
|
+
name: z.ZodString;
|
|
3768
|
+
}, "strip", z.ZodTypeAny, {
|
|
3769
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3770
|
+
type: "event";
|
|
3771
|
+
name: string;
|
|
3772
|
+
anonymous?: boolean | undefined;
|
|
3773
|
+
}, {
|
|
3774
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3775
|
+
type: "event";
|
|
3776
|
+
name: string;
|
|
3777
|
+
anonymous?: boolean | undefined;
|
|
3778
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
3779
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
3780
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
3781
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
3782
|
+
}, "strip", z.ZodTypeAny, {
|
|
3783
|
+
payable?: boolean | undefined;
|
|
3784
|
+
constant?: boolean | undefined;
|
|
3785
|
+
gas?: number | undefined;
|
|
3786
|
+
}, {
|
|
3787
|
+
payable?: boolean | undefined;
|
|
3788
|
+
constant?: boolean | undefined;
|
|
3789
|
+
gas?: number | undefined;
|
|
3790
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3791
|
+
type: z.ZodLiteral<"function">;
|
|
3792
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3793
|
+
name: z.ZodString;
|
|
3794
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3795
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
3796
|
+
}, "strip", z.ZodTypeAny, {
|
|
3797
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3798
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3799
|
+
type: "function";
|
|
3800
|
+
name: string;
|
|
3801
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3802
|
+
}, {
|
|
3803
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3804
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3805
|
+
type: "function";
|
|
3806
|
+
name: string;
|
|
3807
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3808
|
+
}>, z.ZodObject<{
|
|
3809
|
+
type: z.ZodLiteral<"constructor">;
|
|
3810
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
3811
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
3812
|
+
}, "strip", z.ZodTypeAny, {
|
|
3813
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3814
|
+
type: "constructor";
|
|
3815
|
+
stateMutability: "nonpayable" | "payable";
|
|
3816
|
+
}, {
|
|
3817
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3818
|
+
type: "constructor";
|
|
3819
|
+
stateMutability: "nonpayable" | "payable";
|
|
3820
|
+
}>, z.ZodObject<{
|
|
3821
|
+
type: z.ZodLiteral<"fallback">;
|
|
3822
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
3823
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
3824
|
+
}, "strip", z.ZodTypeAny, {
|
|
3825
|
+
type: "fallback";
|
|
3826
|
+
stateMutability: "nonpayable" | "payable";
|
|
3827
|
+
inputs?: [] | undefined;
|
|
3828
|
+
}, {
|
|
3829
|
+
type: "fallback";
|
|
3830
|
+
stateMutability: "nonpayable" | "payable";
|
|
3831
|
+
inputs?: [] | undefined;
|
|
3832
|
+
}>, z.ZodObject<{
|
|
3833
|
+
type: z.ZodLiteral<"receive">;
|
|
3834
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
3835
|
+
}, "strip", z.ZodTypeAny, {
|
|
3836
|
+
type: "receive";
|
|
3837
|
+
stateMutability: "payable";
|
|
3838
|
+
}, {
|
|
3839
|
+
type: "receive";
|
|
3840
|
+
stateMutability: "payable";
|
|
3841
|
+
}>]>>, {
|
|
3842
|
+
payable?: boolean | undefined;
|
|
3843
|
+
constant?: boolean | undefined;
|
|
3844
|
+
gas?: number | undefined;
|
|
3845
|
+
} & ({
|
|
3846
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3847
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3848
|
+
type: "function";
|
|
3849
|
+
name: string;
|
|
3850
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3851
|
+
} | {
|
|
3852
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3853
|
+
type: "constructor";
|
|
3854
|
+
stateMutability: "nonpayable" | "payable";
|
|
3855
|
+
} | {
|
|
3856
|
+
type: "fallback";
|
|
3857
|
+
stateMutability: "nonpayable" | "payable";
|
|
3858
|
+
inputs?: [] | undefined;
|
|
3859
|
+
} | {
|
|
3860
|
+
type: "receive";
|
|
3861
|
+
stateMutability: "payable";
|
|
3862
|
+
}), unknown>]>, "many">>]>;
|
|
3863
|
+
/**
|
|
3864
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
3865
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
3866
|
+
*/
|
|
3867
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
3868
|
+
/**
|
|
3869
|
+
* The name of a smart contract function being called.
|
|
3870
|
+
*/
|
|
3871
|
+
function: z.ZodString;
|
|
3872
|
+
/**
|
|
3873
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
3874
|
+
*/
|
|
3875
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3876
|
+
/**
|
|
3877
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
3878
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
3879
|
+
*/
|
|
3880
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
3881
|
+
/**
|
|
3882
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
3883
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
3884
|
+
*/
|
|
3885
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
3886
|
+
/**
|
|
3887
|
+
* A single value to compare the value resolved at `name` to.
|
|
3888
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
3889
|
+
* should be encoded, and which operators are supported for each type.
|
|
3890
|
+
*/
|
|
3891
|
+
value: z.ZodString;
|
|
3892
|
+
}, "strip", z.ZodTypeAny, {
|
|
3893
|
+
value: string;
|
|
3894
|
+
name: string;
|
|
3895
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3896
|
+
}, {
|
|
3897
|
+
value: string;
|
|
3898
|
+
name: string;
|
|
3899
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3900
|
+
}>, z.ZodObject<{
|
|
3901
|
+
/**
|
|
3902
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
3903
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
3904
|
+
*/
|
|
3905
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
3906
|
+
/**
|
|
3907
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
3908
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
3909
|
+
*/
|
|
3910
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
3911
|
+
/**
|
|
3912
|
+
* Values to compare against the resolved `name` value.
|
|
3913
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
3914
|
+
* should be encoded, and which operators are supported for each type.
|
|
3915
|
+
*/
|
|
3916
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
3917
|
+
}, "strip", z.ZodTypeAny, {
|
|
3918
|
+
values: string[];
|
|
3919
|
+
name: string;
|
|
3920
|
+
operator: "in" | "not in";
|
|
3921
|
+
}, {
|
|
3922
|
+
values: string[];
|
|
3923
|
+
name: string;
|
|
3924
|
+
operator: "in" | "not in";
|
|
3925
|
+
}>]>, "many">>;
|
|
3926
|
+
}, "strip", z.ZodTypeAny, {
|
|
3927
|
+
function: string;
|
|
3928
|
+
params?: ({
|
|
3929
|
+
values: string[];
|
|
3930
|
+
name: string;
|
|
3931
|
+
operator: "in" | "not in";
|
|
3932
|
+
} | {
|
|
3933
|
+
value: string;
|
|
3934
|
+
name: string;
|
|
3935
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3936
|
+
})[] | undefined;
|
|
3937
|
+
}, {
|
|
3938
|
+
function: string;
|
|
3939
|
+
params?: ({
|
|
3940
|
+
values: string[];
|
|
3941
|
+
name: string;
|
|
3942
|
+
operator: "in" | "not in";
|
|
3943
|
+
} | {
|
|
3944
|
+
value: string;
|
|
3945
|
+
name: string;
|
|
3946
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3947
|
+
})[] | undefined;
|
|
3948
|
+
}>, "many">;
|
|
3949
|
+
}, "strip", z.ZodTypeAny, {
|
|
3950
|
+
type: "evmData";
|
|
3951
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
3952
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3953
|
+
type: "error";
|
|
3954
|
+
name: string;
|
|
3955
|
+
} | {
|
|
3956
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
3957
|
+
type: "event";
|
|
3958
|
+
name: string;
|
|
3959
|
+
anonymous?: boolean | undefined;
|
|
3960
|
+
} | ({
|
|
3961
|
+
payable?: boolean | undefined;
|
|
3962
|
+
constant?: boolean | undefined;
|
|
3963
|
+
gas?: number | undefined;
|
|
3964
|
+
} & ({
|
|
3965
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3966
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
3967
|
+
type: "function";
|
|
3968
|
+
name: string;
|
|
3969
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
3970
|
+
} | {
|
|
3971
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
3972
|
+
type: "constructor";
|
|
3973
|
+
stateMutability: "nonpayable" | "payable";
|
|
3974
|
+
} | {
|
|
3975
|
+
type: "fallback";
|
|
3976
|
+
stateMutability: "nonpayable" | "payable";
|
|
3977
|
+
inputs?: [] | undefined;
|
|
3978
|
+
} | {
|
|
3979
|
+
type: "receive";
|
|
3980
|
+
stateMutability: "payable";
|
|
3981
|
+
})))[];
|
|
3982
|
+
conditions: {
|
|
3983
|
+
function: string;
|
|
3984
|
+
params?: ({
|
|
3985
|
+
values: string[];
|
|
3986
|
+
name: string;
|
|
3987
|
+
operator: "in" | "not in";
|
|
3988
|
+
} | {
|
|
3989
|
+
value: string;
|
|
3990
|
+
name: string;
|
|
3991
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
3992
|
+
})[] | undefined;
|
|
3993
|
+
}[];
|
|
3994
|
+
}, {
|
|
3995
|
+
type: "evmData";
|
|
3996
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
3997
|
+
conditions: {
|
|
3998
|
+
function: string;
|
|
3999
|
+
params?: ({
|
|
4000
|
+
values: string[];
|
|
4001
|
+
name: string;
|
|
4002
|
+
operator: "in" | "not in";
|
|
4003
|
+
} | {
|
|
4004
|
+
value: string;
|
|
4005
|
+
name: string;
|
|
4006
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4007
|
+
})[] | undefined;
|
|
4008
|
+
}[];
|
|
4009
|
+
}>]>, "many">;
|
|
4010
|
+
}, "strip", z.ZodTypeAny, {
|
|
4011
|
+
action: "reject" | "accept";
|
|
4012
|
+
operation: "prepareUserOperation";
|
|
4013
|
+
criteria: ({
|
|
4014
|
+
ethValue: string;
|
|
4015
|
+
type: "ethValue";
|
|
4016
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4017
|
+
} | {
|
|
4018
|
+
type: "evmAddress";
|
|
4019
|
+
operator: "in" | "not in";
|
|
4020
|
+
addresses: `0x${string}`[];
|
|
4021
|
+
} | {
|
|
4022
|
+
type: "evmNetwork";
|
|
4023
|
+
operator: "in" | "not in";
|
|
4024
|
+
networks: ("base-sepolia" | "base")[];
|
|
4025
|
+
} | {
|
|
4026
|
+
type: "evmData";
|
|
4027
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
4028
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4029
|
+
type: "error";
|
|
4030
|
+
name: string;
|
|
4031
|
+
} | {
|
|
4032
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
4033
|
+
type: "event";
|
|
4034
|
+
name: string;
|
|
4035
|
+
anonymous?: boolean | undefined;
|
|
4036
|
+
} | ({
|
|
4037
|
+
payable?: boolean | undefined;
|
|
4038
|
+
constant?: boolean | undefined;
|
|
4039
|
+
gas?: number | undefined;
|
|
4040
|
+
} & ({
|
|
4041
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4042
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
4043
|
+
type: "function";
|
|
4044
|
+
name: string;
|
|
4045
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
4046
|
+
} | {
|
|
4047
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4048
|
+
type: "constructor";
|
|
4049
|
+
stateMutability: "nonpayable" | "payable";
|
|
4050
|
+
} | {
|
|
4051
|
+
type: "fallback";
|
|
4052
|
+
stateMutability: "nonpayable" | "payable";
|
|
4053
|
+
inputs?: [] | undefined;
|
|
4054
|
+
} | {
|
|
4055
|
+
type: "receive";
|
|
4056
|
+
stateMutability: "payable";
|
|
4057
|
+
})))[];
|
|
4058
|
+
conditions: {
|
|
4059
|
+
function: string;
|
|
4060
|
+
params?: ({
|
|
4061
|
+
values: string[];
|
|
4062
|
+
name: string;
|
|
4063
|
+
operator: "in" | "not in";
|
|
4064
|
+
} | {
|
|
4065
|
+
value: string;
|
|
4066
|
+
name: string;
|
|
4067
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4068
|
+
})[] | undefined;
|
|
4069
|
+
}[];
|
|
4070
|
+
})[];
|
|
4071
|
+
}, {
|
|
4072
|
+
action: "reject" | "accept";
|
|
4073
|
+
operation: "prepareUserOperation";
|
|
4074
|
+
criteria: ({
|
|
4075
|
+
ethValue: string;
|
|
4076
|
+
type: "ethValue";
|
|
4077
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4078
|
+
} | {
|
|
4079
|
+
type: "evmAddress";
|
|
4080
|
+
operator: "in" | "not in";
|
|
4081
|
+
addresses: string[];
|
|
4082
|
+
} | {
|
|
4083
|
+
type: "evmNetwork";
|
|
4084
|
+
operator: "in" | "not in";
|
|
4085
|
+
networks: ("base-sepolia" | "base")[];
|
|
4086
|
+
} | {
|
|
4087
|
+
type: "evmData";
|
|
4088
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
4089
|
+
conditions: {
|
|
4090
|
+
function: string;
|
|
4091
|
+
params?: ({
|
|
4092
|
+
values: string[];
|
|
4093
|
+
name: string;
|
|
4094
|
+
operator: "in" | "not in";
|
|
4095
|
+
} | {
|
|
4096
|
+
value: string;
|
|
4097
|
+
name: string;
|
|
4098
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4099
|
+
})[] | undefined;
|
|
4100
|
+
}[];
|
|
4101
|
+
})[];
|
|
4102
|
+
}>;
|
|
4103
|
+
export type PrepareUserOperationRule = z.infer<typeof PrepareUserOperationRuleSchema>;
|
|
4104
|
+
/**
|
|
4105
|
+
* Type representing a 'sendUserOperation' policy rule that can accept or reject specific operations
|
|
4106
|
+
* based on a set of criteria.
|
|
4107
|
+
*/
|
|
4108
|
+
export declare const SendUserOperationRuleSchema: z.ZodObject<{
|
|
4109
|
+
/**
|
|
4110
|
+
* Determines whether matching the rule will cause a request to be rejected or accepted.
|
|
4111
|
+
* "accept" will allow the operation, "reject" will block it.
|
|
4112
|
+
*/
|
|
4113
|
+
action: z.ZodEnum<["reject", "accept"]>;
|
|
4114
|
+
/**
|
|
4115
|
+
* The operation to which this rule applies.
|
|
4116
|
+
* Must be "sendUserOperation".
|
|
4117
|
+
*/
|
|
4118
|
+
operation: z.ZodLiteral<"sendUserOperation">;
|
|
4119
|
+
/**
|
|
4120
|
+
* The set of criteria that must be matched for this rule to apply.
|
|
4121
|
+
* Must be compatible with the specified operation type.
|
|
4122
|
+
*/
|
|
4123
|
+
criteria: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
4124
|
+
/** The type of criterion, must be "ethValue" for Ethereum value-based rules. */
|
|
4125
|
+
type: z.ZodLiteral<"ethValue">;
|
|
4126
|
+
/**
|
|
4127
|
+
* The ETH value amount in wei to compare against, as a string.
|
|
4128
|
+
* Must contain only digits.
|
|
4129
|
+
*/
|
|
4130
|
+
ethValue: z.ZodString;
|
|
4131
|
+
/** The comparison operator to use for evaluating transaction values against the threshold. */
|
|
4132
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
4133
|
+
}, "strip", z.ZodTypeAny, {
|
|
4134
|
+
ethValue: string;
|
|
4135
|
+
type: "ethValue";
|
|
4136
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4137
|
+
}, {
|
|
4138
|
+
ethValue: string;
|
|
4139
|
+
type: "ethValue";
|
|
4140
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4141
|
+
}>, z.ZodObject<{
|
|
4142
|
+
/** The type of criterion, must be "evmAddress" for EVM address-based rules. */
|
|
4143
|
+
type: z.ZodLiteral<"evmAddress">;
|
|
4144
|
+
/**
|
|
4145
|
+
* Array of EVM addresses to compare against.
|
|
4146
|
+
* Each address must be a 0x-prefixed 40-character hexadecimal string.
|
|
4147
|
+
* Limited to a maximum of 300 addresses per criterion.
|
|
4148
|
+
*/
|
|
4149
|
+
addresses: z.ZodArray<z.ZodEffects<z.ZodString, `0x${string}`, string>, "many">;
|
|
4150
|
+
/**
|
|
4151
|
+
* The operator to use for evaluating transaction addresses.
|
|
4152
|
+
* "in" checks if an address is in the provided list.
|
|
4153
|
+
* "not in" checks if an address is not in the provided list.
|
|
4154
|
+
*/
|
|
4155
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
4156
|
+
}, "strip", z.ZodTypeAny, {
|
|
4157
|
+
type: "evmAddress";
|
|
4158
|
+
operator: "in" | "not in";
|
|
4159
|
+
addresses: `0x${string}`[];
|
|
4160
|
+
}, {
|
|
4161
|
+
type: "evmAddress";
|
|
4162
|
+
operator: "in" | "not in";
|
|
4163
|
+
addresses: string[];
|
|
4164
|
+
}>, z.ZodObject<{
|
|
4165
|
+
/** The type of criterion, must be "evmData" for EVM transaction rules. */
|
|
4166
|
+
type: z.ZodLiteral<"evmData">;
|
|
4167
|
+
/**
|
|
4168
|
+
* The ABI of the smart contract being called. This can be a partial structure with only specific functions.
|
|
4169
|
+
*/
|
|
4170
|
+
abi: z.ZodUnion<[z.ZodEnum<["erc20", "erc721", "erc1155"]>, z.ZodReadonly<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
4171
|
+
type: z.ZodLiteral<"error">;
|
|
4172
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.
|
|
4173
|
+
/**
|
|
4174
|
+
* Schema for SignEvmTypedData field criterion
|
|
4175
|
+
*/
|
|
4176
|
+
ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
4177
|
+
name: z.ZodString;
|
|
4178
|
+
}, "strip", z.ZodTypeAny, {
|
|
4179
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4180
|
+
type: "error";
|
|
4181
|
+
name: string;
|
|
4182
|
+
}, {
|
|
4183
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4184
|
+
type: "error";
|
|
4185
|
+
name: string;
|
|
4186
|
+
}>, z.ZodObject<{
|
|
4187
|
+
type: z.ZodLiteral<"event">;
|
|
4188
|
+
anonymous: z.ZodOptional<z.ZodBoolean>;
|
|
4189
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiEventParameter, z.ZodTypeDef, import("abitype").AbiEventParameter>, "many">>;
|
|
4190
|
+
name: z.ZodString;
|
|
4191
|
+
}, "strip", z.ZodTypeAny, {
|
|
4192
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
4193
|
+
type: "event";
|
|
4194
|
+
name: string;
|
|
4195
|
+
anonymous?: boolean | undefined;
|
|
4196
|
+
}, {
|
|
4197
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
4198
|
+
type: "event";
|
|
4199
|
+
name: string;
|
|
4200
|
+
anonymous?: boolean | undefined;
|
|
4201
|
+
}>, z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
4202
|
+
constant: z.ZodOptional<z.ZodBoolean>;
|
|
4203
|
+
gas: z.ZodOptional<z.ZodNumber>;
|
|
4204
|
+
payable: z.ZodOptional<z.ZodBoolean /** The type of criterion, must be "evmTypedDataVerifyingContract" for verifying contract-based rules. */>;
|
|
4205
|
+
}, "strip", z.ZodTypeAny, {
|
|
4206
|
+
payable?: boolean | undefined;
|
|
4207
|
+
constant?: boolean | undefined;
|
|
4208
|
+
gas?: number | undefined;
|
|
4209
|
+
}, {
|
|
4210
|
+
payable?: boolean | undefined;
|
|
4211
|
+
constant?: boolean | undefined;
|
|
4212
|
+
gas?: number | undefined;
|
|
4213
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
4214
|
+
type: z.ZodLiteral<"function">;
|
|
4215
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
4216
|
+
name: z.ZodString;
|
|
4217
|
+
outputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
4218
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"pure">, z.ZodLiteral<"view">, z.ZodLiteral<"nonpayable">, z.ZodLiteral<"payable">]>;
|
|
4219
|
+
}, "strip", z.ZodTypeAny, {
|
|
4220
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4221
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
4222
|
+
type: "function";
|
|
4223
|
+
name: string;
|
|
4224
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
4225
|
+
}, {
|
|
4226
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4227
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
4228
|
+
type: "function";
|
|
4229
|
+
name: string;
|
|
4230
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
4231
|
+
}>, z.ZodObject<{
|
|
4232
|
+
type: z.ZodLiteral<"constructor">;
|
|
4233
|
+
inputs: z.ZodReadonly<z.ZodArray<z.ZodType<import("abitype").AbiParameter, z.ZodTypeDef, import("abitype").AbiParameter>, "many">>;
|
|
4234
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
4235
|
+
}, "strip", z.ZodTypeAny, {
|
|
4236
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4237
|
+
type: "constructor";
|
|
4238
|
+
stateMutability: "nonpayable" | "payable";
|
|
4239
|
+
}, {
|
|
4240
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4241
|
+
type: "constructor";
|
|
4242
|
+
stateMutability: "nonpayable" | "payable";
|
|
4243
|
+
}>, z.ZodObject<{
|
|
4244
|
+
type: z.ZodLiteral<"fallback">;
|
|
4245
|
+
inputs: z.ZodOptional<z.ZodTuple<[], null>>;
|
|
4246
|
+
stateMutability: z.ZodUnion<[z.ZodLiteral<"payable">, z.ZodLiteral<"nonpayable">]>;
|
|
4247
|
+
}, "strip", z.ZodTypeAny, {
|
|
4248
|
+
type: "fallback";
|
|
4249
|
+
stateMutability: "nonpayable" | "payable";
|
|
4250
|
+
inputs?: [] | undefined;
|
|
4251
|
+
}, {
|
|
4252
|
+
type: "fallback";
|
|
4253
|
+
stateMutability: "nonpayable" | "payable";
|
|
4254
|
+
inputs?: [] | undefined;
|
|
4255
|
+
}>, z.ZodObject<{
|
|
4256
|
+
type: z.ZodLiteral<"receive">;
|
|
4257
|
+
stateMutability: z.ZodLiteral<"payable">;
|
|
4258
|
+
}, "strip", z.ZodTypeAny, {
|
|
4259
|
+
type: "receive";
|
|
4260
|
+
stateMutability: "payable";
|
|
4261
|
+
}, {
|
|
4262
|
+
type: "receive";
|
|
4263
|
+
stateMutability: "payable";
|
|
4264
|
+
}>]>>, {
|
|
4265
|
+
payable?: boolean | undefined;
|
|
4266
|
+
constant?: boolean | undefined;
|
|
4267
|
+
gas?: number | undefined;
|
|
4268
|
+
} & ({
|
|
4269
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4270
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
4271
|
+
type: "function";
|
|
4272
|
+
name: string;
|
|
4273
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
4274
|
+
} | {
|
|
4275
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4276
|
+
type: "constructor";
|
|
4277
|
+
stateMutability: "nonpayable" | "payable";
|
|
4278
|
+
} | {
|
|
4279
|
+
type: "fallback";
|
|
4280
|
+
stateMutability: "nonpayable" | "payable";
|
|
4281
|
+
inputs?: [] | undefined;
|
|
4282
|
+
} | {
|
|
4283
|
+
type: "receive";
|
|
4284
|
+
stateMutability: "payable";
|
|
4285
|
+
}), unknown>]>, "many">>]>;
|
|
4286
|
+
/**
|
|
4287
|
+
* A list of conditions to apply against the function and encoded arguments in the transaction's `data` field.
|
|
4288
|
+
* Each condition must be met in order for this policy to be accepted or rejected.
|
|
4289
|
+
*/
|
|
4290
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
4291
|
+
/**
|
|
4292
|
+
* The name of a smart contract function being called.
|
|
4293
|
+
*/
|
|
4294
|
+
function: z.ZodString;
|
|
4295
|
+
/**
|
|
4296
|
+
* An optional list of parameter conditions to apply against encoded arguments in the transaction's `data` field.
|
|
4297
|
+
*/
|
|
4298
|
+
params: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
4299
|
+
/**
|
|
4300
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
4301
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
4302
|
+
*/
|
|
4303
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
4304
|
+
/**
|
|
4305
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
4306
|
+
* left-hand side of the operator, and the `value` field will be on the right-hand side.
|
|
4307
|
+
*/
|
|
4308
|
+
operator: z.ZodEnum<[">", ">=", "<", "<=", "=="]>;
|
|
4309
|
+
/**
|
|
4310
|
+
* A single value to compare the value resolved at `name` to.
|
|
4311
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
4312
|
+
* should be encoded, and which operators are supported for each type.
|
|
4313
|
+
*/
|
|
4314
|
+
value: z.ZodString;
|
|
4315
|
+
}, "strip", z.ZodTypeAny, {
|
|
4316
|
+
value: string;
|
|
4317
|
+
name: string;
|
|
4318
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4319
|
+
}, {
|
|
4320
|
+
value: string;
|
|
4321
|
+
name: string;
|
|
4322
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4323
|
+
}>, z.ZodObject<{
|
|
4324
|
+
/**
|
|
4325
|
+
* The name of the parameter to check against a transaction's calldata.
|
|
4326
|
+
* If name is unknown, or is not named, you may supply an array index, e.g., `0` for first parameter.
|
|
4327
|
+
*/
|
|
4328
|
+
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
4329
|
+
/**
|
|
4330
|
+
* The operator to use for the comparison. The value resolved at the `name` will be on the
|
|
4331
|
+
* left-hand side of the operator, and the `values` field will be on the right-hand side.
|
|
4332
|
+
*/
|
|
4333
|
+
operator: z.ZodEnum<["in", "not in"]>;
|
|
4334
|
+
/**
|
|
4335
|
+
* Values to compare against the resolved `name` value.
|
|
4336
|
+
* All values are encoded as strings. Refer to the table in the documentation for how values
|
|
4337
|
+
* should be encoded, and which operators are supported for each type.
|
|
4338
|
+
*/
|
|
4339
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
4340
|
+
}, "strip", z.ZodTypeAny, {
|
|
4341
|
+
values: string[];
|
|
4342
|
+
name: string;
|
|
4343
|
+
operator: "in" | "not in";
|
|
4344
|
+
}, {
|
|
4345
|
+
values: string[];
|
|
4346
|
+
name: string;
|
|
4347
|
+
operator: "in" | "not in";
|
|
4348
|
+
}>]>, "many">>;
|
|
4349
|
+
}, "strip", z.ZodTypeAny, {
|
|
4350
|
+
function: string;
|
|
4351
|
+
params?: ({
|
|
4352
|
+
values: string[];
|
|
4353
|
+
name: string;
|
|
4354
|
+
operator: "in" | "not in";
|
|
4355
|
+
} | {
|
|
4356
|
+
value: string;
|
|
4357
|
+
name: string;
|
|
4358
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4359
|
+
})[] | undefined;
|
|
4360
|
+
}, {
|
|
4361
|
+
function: string;
|
|
4362
|
+
params?: ({
|
|
4363
|
+
values: string[];
|
|
4364
|
+
name: string;
|
|
4365
|
+
operator: "in" | "not in";
|
|
4366
|
+
} | {
|
|
4367
|
+
value: string;
|
|
4368
|
+
name: string;
|
|
4369
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4370
|
+
})[] | undefined;
|
|
4371
|
+
}>, "many">;
|
|
4372
|
+
}, "strip", z.ZodTypeAny, {
|
|
4373
|
+
type: "evmData";
|
|
4374
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
4375
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4376
|
+
type: "error";
|
|
4377
|
+
name: string;
|
|
4378
|
+
} | {
|
|
4379
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
4380
|
+
type: "event";
|
|
4381
|
+
name: string;
|
|
4382
|
+
anonymous?: boolean | undefined;
|
|
4383
|
+
} | ({
|
|
4384
|
+
payable?: boolean | undefined;
|
|
4385
|
+
constant?: boolean | undefined;
|
|
4386
|
+
gas?: number | undefined;
|
|
4387
|
+
} & ({
|
|
4388
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4389
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
4390
|
+
type: "function";
|
|
4391
|
+
name: string;
|
|
4392
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
4393
|
+
} | {
|
|
4394
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4395
|
+
type: "constructor";
|
|
4396
|
+
stateMutability: "nonpayable" | "payable";
|
|
4397
|
+
} | {
|
|
4398
|
+
type: "fallback";
|
|
4399
|
+
stateMutability: "nonpayable" | "payable";
|
|
4400
|
+
inputs?: [] | undefined;
|
|
4401
|
+
} | {
|
|
4402
|
+
type: "receive";
|
|
4403
|
+
stateMutability: "payable";
|
|
4404
|
+
})))[];
|
|
4405
|
+
conditions: {
|
|
4406
|
+
function: string;
|
|
4407
|
+
params?: ({
|
|
4408
|
+
values: string[];
|
|
4409
|
+
name: string;
|
|
4410
|
+
operator: "in" | "not in";
|
|
4411
|
+
} | {
|
|
4412
|
+
value: string;
|
|
4413
|
+
name: string;
|
|
4414
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4415
|
+
})[] | undefined;
|
|
4416
|
+
}[];
|
|
4417
|
+
}, {
|
|
4418
|
+
type: "evmData";
|
|
4419
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
4420
|
+
conditions: {
|
|
4421
|
+
function: string;
|
|
4422
|
+
params?: ({
|
|
4423
|
+
values: string[];
|
|
4424
|
+
name: string;
|
|
4425
|
+
operator: "in" | "not in";
|
|
4426
|
+
} | {
|
|
4427
|
+
value: string;
|
|
4428
|
+
name: string;
|
|
4429
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4430
|
+
})[] | undefined;
|
|
4431
|
+
}[];
|
|
4432
|
+
}>]>, "many">;
|
|
4433
|
+
}, "strip", z.ZodTypeAny, {
|
|
4434
|
+
action: "reject" | "accept";
|
|
4435
|
+
operation: "sendUserOperation";
|
|
4436
|
+
criteria: ({
|
|
4437
|
+
ethValue: string;
|
|
4438
|
+
type: "ethValue";
|
|
4439
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4440
|
+
} | {
|
|
4441
|
+
type: "evmAddress";
|
|
4442
|
+
operator: "in" | "not in";
|
|
4443
|
+
addresses: `0x${string}`[];
|
|
4444
|
+
} | {
|
|
4445
|
+
type: "evmData";
|
|
4446
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly ({
|
|
4447
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4448
|
+
type: "error";
|
|
4449
|
+
name: string;
|
|
4450
|
+
} | {
|
|
4451
|
+
inputs: readonly import("abitype").AbiEventParameter[];
|
|
4452
|
+
type: "event";
|
|
4453
|
+
name: string;
|
|
4454
|
+
anonymous?: boolean | undefined;
|
|
4455
|
+
} | ({
|
|
4456
|
+
payable?: boolean | undefined;
|
|
4457
|
+
constant?: boolean | undefined;
|
|
4458
|
+
gas?: number | undefined;
|
|
4459
|
+
} & ({
|
|
4460
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4461
|
+
outputs: readonly import("abitype").AbiParameter[];
|
|
4462
|
+
type: "function";
|
|
4463
|
+
name: string;
|
|
4464
|
+
stateMutability: "pure" | "view" | "nonpayable" | "payable";
|
|
4465
|
+
} | {
|
|
4466
|
+
inputs: readonly import("abitype").AbiParameter[];
|
|
4467
|
+
type: "constructor";
|
|
4468
|
+
stateMutability: "nonpayable" | "payable";
|
|
4469
|
+
} | {
|
|
4470
|
+
type: "fallback";
|
|
4471
|
+
stateMutability: "nonpayable" | "payable";
|
|
4472
|
+
inputs?: [] | undefined;
|
|
4473
|
+
} | {
|
|
4474
|
+
type: "receive";
|
|
4475
|
+
stateMutability: "payable";
|
|
4476
|
+
})))[];
|
|
4477
|
+
conditions: {
|
|
4478
|
+
function: string;
|
|
4479
|
+
params?: ({
|
|
4480
|
+
values: string[];
|
|
4481
|
+
name: string;
|
|
4482
|
+
operator: "in" | "not in";
|
|
4483
|
+
} | {
|
|
4484
|
+
value: string;
|
|
4485
|
+
name: string;
|
|
4486
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4487
|
+
})[] | undefined;
|
|
4488
|
+
}[];
|
|
4489
|
+
})[];
|
|
4490
|
+
}, {
|
|
4491
|
+
action: "reject" | "accept";
|
|
4492
|
+
operation: "sendUserOperation";
|
|
4493
|
+
criteria: ({
|
|
4494
|
+
ethValue: string;
|
|
4495
|
+
type: "ethValue";
|
|
4496
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4497
|
+
} | {
|
|
4498
|
+
type: "evmAddress";
|
|
4499
|
+
operator: "in" | "not in";
|
|
4500
|
+
addresses: string[];
|
|
4501
|
+
} | {
|
|
4502
|
+
type: "evmData";
|
|
4503
|
+
abi: "erc20" | "erc721" | "erc1155" | readonly unknown[];
|
|
4504
|
+
conditions: {
|
|
4505
|
+
function: string;
|
|
4506
|
+
params?: ({
|
|
4507
|
+
values: string[];
|
|
4508
|
+
name: string;
|
|
4509
|
+
operator: "in" | "not in";
|
|
4510
|
+
} | {
|
|
4511
|
+
value: string;
|
|
4512
|
+
name: string;
|
|
4513
|
+
operator: ">" | ">=" | "<" | "<=" | "==";
|
|
4514
|
+
})[] | undefined;
|
|
4515
|
+
}[];
|
|
4516
|
+
})[];
|
|
4517
|
+
}>;
|
|
4518
|
+
export type SendUserOperationRule = z.infer<typeof SendUserOperationRuleSchema>;
|
|
4519
|
+
//# sourceMappingURL=evmSchema.d.ts.map
|