@getpara/shared 1.23.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/index.js +2 -0
  2. package/dist/cjs/schemas/permissionsV2.js +188 -0
  3. package/dist/cjs/types/assets.js +5 -1
  4. package/dist/cjs/types/auth.js +19 -1
  5. package/dist/cjs/types/authState.js +7 -2
  6. package/dist/cjs/types/index.js +2 -0
  7. package/dist/cjs/types/permissions.js +2 -0
  8. package/dist/cjs/types/signing.js +2 -0
  9. package/dist/cjs/types/wallet.js +8 -1
  10. package/dist/cjs/utils/index.js +3 -0
  11. package/dist/esm/index.js +2 -0
  12. package/dist/esm/schemas/permissionsV2.js +185 -0
  13. package/dist/esm/types/assets.js +4 -0
  14. package/dist/esm/types/auth.js +18 -0
  15. package/dist/esm/types/authState.js +7 -2
  16. package/dist/esm/types/index.js +2 -0
  17. package/dist/esm/types/permissions.js +1 -0
  18. package/dist/esm/types/signing.js +1 -0
  19. package/dist/esm/types/wallet.js +8 -1
  20. package/dist/esm/utils/index.js +3 -0
  21. package/dist/types/index.d.ts +2 -0
  22. package/dist/types/index.d.ts.map +1 -1
  23. package/dist/types/schemas/permissionsV2.d.ts +1642 -0
  24. package/dist/types/schemas/permissionsV2.d.ts.map +1 -0
  25. package/dist/types/types/assets.d.ts +7 -1
  26. package/dist/types/types/assets.d.ts.map +1 -1
  27. package/dist/types/types/auth.d.ts +8 -2
  28. package/dist/types/types/auth.d.ts.map +1 -1
  29. package/dist/types/types/authState.d.ts +48 -3
  30. package/dist/types/types/authState.d.ts.map +1 -1
  31. package/dist/types/types/index.d.ts +2 -0
  32. package/dist/types/types/index.d.ts.map +1 -1
  33. package/dist/types/types/partner.d.ts +5 -0
  34. package/dist/types/types/partner.d.ts.map +1 -1
  35. package/dist/types/types/permissions.d.ts +96 -0
  36. package/dist/types/types/permissions.d.ts.map +1 -0
  37. package/dist/types/types/signing.d.ts +27 -0
  38. package/dist/types/types/signing.d.ts.map +1 -0
  39. package/dist/types/types/transaction.d.ts +1 -1
  40. package/dist/types/types/transaction.d.ts.map +1 -1
  41. package/dist/types/types/wallet.d.ts +8 -4
  42. package/dist/types/types/wallet.d.ts.map +1 -1
  43. package/dist/types/utils/index.d.ts.map +1 -1
  44. package/package.json +5 -4
@@ -0,0 +1,1642 @@
1
+ import { z } from 'zod';
2
+ export declare const policyAuthoringSigningWalletTypes: readonly ["EVM"];
3
+ export declare const policyAuthoringSigningRequestRoutes: readonly ["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"];
4
+ export declare const permissionsV2SigningRequestTypes: readonly ["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"];
5
+ export declare const permissionsV2PolicyLayerSchema: z.ZodEnum<["para", "partner"]>;
6
+ export declare const permissionsV2PolicyModeSchema: z.ZodEnum<["guardrail", "delegation"]>;
7
+ export declare const permissionsV2PolicyEffectSchema: z.ZodEnum<["allow", "deny", "require_approval"]>;
8
+ export declare const permissionsV2CompareOperatorSchema: z.ZodEnum<["eq", "ne", "lt", "lte", "gt", "gte", "in"]>;
9
+ export declare const permissionsV2AggregateOperatorSchema: z.ZodEnum<["lt", "lte", "gt", "gte"]>;
10
+ export declare const permissionsV2SigningWalletTypeSchema: z.ZodEnum<["EVM"]>;
11
+ export declare const permissionsV2SigningRequestRouteSchema: z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>;
12
+ export declare const permissionsV2SigningRequestTypeSchema: z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>;
13
+ type PolicyAuthoringJsonPrimitiveSchemaOutput = string | number | boolean | null;
14
+ type PolicyAuthoringJsonValueSchemaOutput = PolicyAuthoringJsonPrimitiveSchemaOutput | PolicyAuthoringJsonValueSchemaOutput[] | {
15
+ [key: string]: PolicyAuthoringJsonValueSchemaOutput;
16
+ };
17
+ export declare const policyAuthoringJsonPrimitiveSchema: z.ZodType<PolicyAuthoringJsonPrimitiveSchemaOutput>;
18
+ export declare const policyAuthoringJsonValueSchema: z.ZodType<PolicyAuthoringJsonValueSchemaOutput>;
19
+ export declare const policyAuthoringJsonObjectSchema: z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>;
20
+ type PermissionsV2ConditionSchemaOutput = {
21
+ kind: 'compare';
22
+ fact: string;
23
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
24
+ value: PolicyAuthoringJsonValueSchemaOutput;
25
+ } | {
26
+ kind: 'aggregate';
27
+ fact: string;
28
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
29
+ value: string;
30
+ window: string;
31
+ asset?: string;
32
+ } | {
33
+ kind: 'all';
34
+ of: PermissionsV2ConditionSchemaOutput[];
35
+ } | {
36
+ kind: 'any';
37
+ of: PermissionsV2ConditionSchemaOutput[];
38
+ } | {
39
+ kind: 'not';
40
+ of: PermissionsV2ConditionSchemaOutput;
41
+ };
42
+ export declare const permissionsV2ConditionSchema: z.ZodType<PermissionsV2ConditionSchemaOutput>;
43
+ export declare const permissionsV2PartnerAuthoredPolicySelectorSchema: z.ZodObject<{
44
+ walletId: z.ZodOptional<z.ZodString>;
45
+ chainId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>>;
46
+ walletType: z.ZodOptional<z.ZodEnum<["EVM"]>>;
47
+ requestRoute: z.ZodOptional<z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>>;
48
+ requestType: z.ZodOptional<z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>>;
49
+ }, "strict", z.ZodTypeAny, {
50
+ walletId?: string | undefined;
51
+ chainId?: string | string[] | undefined;
52
+ walletType?: "EVM" | undefined;
53
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
54
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
55
+ }, {
56
+ walletId?: string | undefined;
57
+ chainId?: string | string[] | undefined;
58
+ walletType?: "EVM" | undefined;
59
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
60
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
61
+ }>;
62
+ export declare const permissionsV2PolicyMetadataSchema: z.ZodObject<{
63
+ label: z.ZodOptional<z.ZodString>;
64
+ productMode: z.ZodOptional<z.ZodEnum<["guardrail", "delegation"]>>;
65
+ description: z.ZodOptional<z.ZodString>;
66
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
67
+ }, "strict", z.ZodTypeAny, {
68
+ label?: string | undefined;
69
+ productMode?: "guardrail" | "delegation" | undefined;
70
+ description?: string | undefined;
71
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
72
+ }, {
73
+ label?: string | undefined;
74
+ productMode?: "guardrail" | "delegation" | undefined;
75
+ description?: string | undefined;
76
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
77
+ }>;
78
+ export declare const permissionsV2PartnerPolicyMetadataSchema: z.ZodObject<{
79
+ label: z.ZodOptional<z.ZodString>;
80
+ description: z.ZodOptional<z.ZodString>;
81
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
82
+ productMode: z.ZodEnum<["guardrail", "delegation"]>;
83
+ }, "strict", z.ZodTypeAny, {
84
+ productMode: "guardrail" | "delegation";
85
+ label?: string | undefined;
86
+ description?: string | undefined;
87
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
88
+ }, {
89
+ productMode: "guardrail" | "delegation";
90
+ label?: string | undefined;
91
+ description?: string | undefined;
92
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
93
+ }>;
94
+ export declare const permissionsV2PolicyRuleSchema: z.ZodObject<{
95
+ id: z.ZodString;
96
+ effect: z.ZodEnum<["allow", "deny", "require_approval"]>;
97
+ when: z.ZodType<PermissionsV2ConditionSchemaOutput, z.ZodTypeDef, PermissionsV2ConditionSchemaOutput>;
98
+ }, "strict", z.ZodTypeAny, {
99
+ id: string;
100
+ effect: "allow" | "deny" | "require_approval";
101
+ when: {
102
+ kind: "compare";
103
+ fact: string;
104
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
105
+ value: PolicyAuthoringJsonValueSchemaOutput;
106
+ } | {
107
+ kind: "aggregate";
108
+ fact: string;
109
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
110
+ value: string;
111
+ window: string;
112
+ asset?: string;
113
+ } | {
114
+ kind: "all";
115
+ of: PermissionsV2ConditionSchemaOutput[];
116
+ } | {
117
+ kind: "any";
118
+ of: PermissionsV2ConditionSchemaOutput[];
119
+ } | {
120
+ kind: "not";
121
+ of: PermissionsV2ConditionSchemaOutput;
122
+ };
123
+ }, {
124
+ id: string;
125
+ effect: "allow" | "deny" | "require_approval";
126
+ when: {
127
+ kind: "compare";
128
+ fact: string;
129
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
130
+ value: PolicyAuthoringJsonValueSchemaOutput;
131
+ } | {
132
+ kind: "aggregate";
133
+ fact: string;
134
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
135
+ value: string;
136
+ window: string;
137
+ asset?: string;
138
+ } | {
139
+ kind: "all";
140
+ of: PermissionsV2ConditionSchemaOutput[];
141
+ } | {
142
+ kind: "any";
143
+ of: PermissionsV2ConditionSchemaOutput[];
144
+ } | {
145
+ kind: "not";
146
+ of: PermissionsV2ConditionSchemaOutput;
147
+ };
148
+ }>;
149
+ export declare const permissionsV2PartnerPolicyCandidateSchema: z.ZodObject<{
150
+ id: z.ZodString;
151
+ schemaVersion: z.ZodLiteral<"permissions.policy.v1">;
152
+ version: z.ZodString;
153
+ selector: z.ZodObject<{
154
+ walletId: z.ZodOptional<z.ZodString>;
155
+ chainId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>>;
156
+ walletType: z.ZodOptional<z.ZodEnum<["EVM"]>>;
157
+ requestRoute: z.ZodOptional<z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>>;
158
+ requestType: z.ZodOptional<z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>>;
159
+ }, "strict", z.ZodTypeAny, {
160
+ walletId?: string | undefined;
161
+ chainId?: string | string[] | undefined;
162
+ walletType?: "EVM" | undefined;
163
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
164
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
165
+ }, {
166
+ walletId?: string | undefined;
167
+ chainId?: string | string[] | undefined;
168
+ walletType?: "EVM" | undefined;
169
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
170
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
171
+ }>;
172
+ rules: z.ZodArray<z.ZodObject<{
173
+ id: z.ZodString;
174
+ effect: z.ZodEnum<["allow", "deny", "require_approval"]>;
175
+ when: z.ZodType<PermissionsV2ConditionSchemaOutput, z.ZodTypeDef, PermissionsV2ConditionSchemaOutput>;
176
+ }, "strict", z.ZodTypeAny, {
177
+ id: string;
178
+ effect: "allow" | "deny" | "require_approval";
179
+ when: {
180
+ kind: "compare";
181
+ fact: string;
182
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
183
+ value: PolicyAuthoringJsonValueSchemaOutput;
184
+ } | {
185
+ kind: "aggregate";
186
+ fact: string;
187
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
188
+ value: string;
189
+ window: string;
190
+ asset?: string;
191
+ } | {
192
+ kind: "all";
193
+ of: PermissionsV2ConditionSchemaOutput[];
194
+ } | {
195
+ kind: "any";
196
+ of: PermissionsV2ConditionSchemaOutput[];
197
+ } | {
198
+ kind: "not";
199
+ of: PermissionsV2ConditionSchemaOutput;
200
+ };
201
+ }, {
202
+ id: string;
203
+ effect: "allow" | "deny" | "require_approval";
204
+ when: {
205
+ kind: "compare";
206
+ fact: string;
207
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
208
+ value: PolicyAuthoringJsonValueSchemaOutput;
209
+ } | {
210
+ kind: "aggregate";
211
+ fact: string;
212
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
213
+ value: string;
214
+ window: string;
215
+ asset?: string;
216
+ } | {
217
+ kind: "all";
218
+ of: PermissionsV2ConditionSchemaOutput[];
219
+ } | {
220
+ kind: "any";
221
+ of: PermissionsV2ConditionSchemaOutput[];
222
+ } | {
223
+ kind: "not";
224
+ of: PermissionsV2ConditionSchemaOutput;
225
+ };
226
+ }>, "many">;
227
+ metadata: z.ZodOptional<z.ZodObject<{
228
+ label: z.ZodOptional<z.ZodString>;
229
+ productMode: z.ZodOptional<z.ZodEnum<["guardrail", "delegation"]>>;
230
+ description: z.ZodOptional<z.ZodString>;
231
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
232
+ }, "strict", z.ZodTypeAny, {
233
+ label?: string | undefined;
234
+ productMode?: "guardrail" | "delegation" | undefined;
235
+ description?: string | undefined;
236
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
237
+ }, {
238
+ label?: string | undefined;
239
+ productMode?: "guardrail" | "delegation" | undefined;
240
+ description?: string | undefined;
241
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
242
+ }>>;
243
+ }, "strict", z.ZodTypeAny, {
244
+ id: string;
245
+ schemaVersion: "permissions.policy.v1";
246
+ version: string;
247
+ selector: {
248
+ walletId?: string | undefined;
249
+ chainId?: string | string[] | undefined;
250
+ walletType?: "EVM" | undefined;
251
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
252
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
253
+ };
254
+ rules: {
255
+ id: string;
256
+ effect: "allow" | "deny" | "require_approval";
257
+ when: {
258
+ kind: "compare";
259
+ fact: string;
260
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
261
+ value: PolicyAuthoringJsonValueSchemaOutput;
262
+ } | {
263
+ kind: "aggregate";
264
+ fact: string;
265
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
266
+ value: string;
267
+ window: string;
268
+ asset?: string;
269
+ } | {
270
+ kind: "all";
271
+ of: PermissionsV2ConditionSchemaOutput[];
272
+ } | {
273
+ kind: "any";
274
+ of: PermissionsV2ConditionSchemaOutput[];
275
+ } | {
276
+ kind: "not";
277
+ of: PermissionsV2ConditionSchemaOutput;
278
+ };
279
+ }[];
280
+ metadata?: {
281
+ label?: string | undefined;
282
+ productMode?: "guardrail" | "delegation" | undefined;
283
+ description?: string | undefined;
284
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
285
+ } | undefined;
286
+ }, {
287
+ id: string;
288
+ schemaVersion: "permissions.policy.v1";
289
+ version: string;
290
+ selector: {
291
+ walletId?: string | undefined;
292
+ chainId?: string | string[] | undefined;
293
+ walletType?: "EVM" | undefined;
294
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
295
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
296
+ };
297
+ rules: {
298
+ id: string;
299
+ effect: "allow" | "deny" | "require_approval";
300
+ when: {
301
+ kind: "compare";
302
+ fact: string;
303
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
304
+ value: PolicyAuthoringJsonValueSchemaOutput;
305
+ } | {
306
+ kind: "aggregate";
307
+ fact: string;
308
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
309
+ value: string;
310
+ window: string;
311
+ asset?: string;
312
+ } | {
313
+ kind: "all";
314
+ of: PermissionsV2ConditionSchemaOutput[];
315
+ } | {
316
+ kind: "any";
317
+ of: PermissionsV2ConditionSchemaOutput[];
318
+ } | {
319
+ kind: "not";
320
+ of: PermissionsV2ConditionSchemaOutput;
321
+ };
322
+ }[];
323
+ metadata?: {
324
+ label?: string | undefined;
325
+ productMode?: "guardrail" | "delegation" | undefined;
326
+ description?: string | undefined;
327
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
328
+ } | undefined;
329
+ }>;
330
+ export declare const permissionsV2PartnerAuthoredPolicyDefinitionSchema: z.ZodObject<{
331
+ id: z.ZodString;
332
+ schemaVersion: z.ZodLiteral<"permissions.policy.v1">;
333
+ version: z.ZodString;
334
+ selector: z.ZodObject<{
335
+ walletId: z.ZodOptional<z.ZodString>;
336
+ chainId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>>;
337
+ walletType: z.ZodOptional<z.ZodEnum<["EVM"]>>;
338
+ requestRoute: z.ZodOptional<z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>>;
339
+ requestType: z.ZodOptional<z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>>;
340
+ }, "strict", z.ZodTypeAny, {
341
+ walletId?: string | undefined;
342
+ chainId?: string | string[] | undefined;
343
+ walletType?: "EVM" | undefined;
344
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
345
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
346
+ }, {
347
+ walletId?: string | undefined;
348
+ chainId?: string | string[] | undefined;
349
+ walletType?: "EVM" | undefined;
350
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
351
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
352
+ }>;
353
+ rules: z.ZodArray<z.ZodObject<{
354
+ id: z.ZodString;
355
+ effect: z.ZodEnum<["allow", "deny", "require_approval"]>;
356
+ when: z.ZodType<PermissionsV2ConditionSchemaOutput, z.ZodTypeDef, PermissionsV2ConditionSchemaOutput>;
357
+ }, "strict", z.ZodTypeAny, {
358
+ id: string;
359
+ effect: "allow" | "deny" | "require_approval";
360
+ when: {
361
+ kind: "compare";
362
+ fact: string;
363
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
364
+ value: PolicyAuthoringJsonValueSchemaOutput;
365
+ } | {
366
+ kind: "aggregate";
367
+ fact: string;
368
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
369
+ value: string;
370
+ window: string;
371
+ asset?: string;
372
+ } | {
373
+ kind: "all";
374
+ of: PermissionsV2ConditionSchemaOutput[];
375
+ } | {
376
+ kind: "any";
377
+ of: PermissionsV2ConditionSchemaOutput[];
378
+ } | {
379
+ kind: "not";
380
+ of: PermissionsV2ConditionSchemaOutput;
381
+ };
382
+ }, {
383
+ id: string;
384
+ effect: "allow" | "deny" | "require_approval";
385
+ when: {
386
+ kind: "compare";
387
+ fact: string;
388
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
389
+ value: PolicyAuthoringJsonValueSchemaOutput;
390
+ } | {
391
+ kind: "aggregate";
392
+ fact: string;
393
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
394
+ value: string;
395
+ window: string;
396
+ asset?: string;
397
+ } | {
398
+ kind: "all";
399
+ of: PermissionsV2ConditionSchemaOutput[];
400
+ } | {
401
+ kind: "any";
402
+ of: PermissionsV2ConditionSchemaOutput[];
403
+ } | {
404
+ kind: "not";
405
+ of: PermissionsV2ConditionSchemaOutput;
406
+ };
407
+ }>, "many">;
408
+ metadata: z.ZodObject<{
409
+ label: z.ZodOptional<z.ZodString>;
410
+ description: z.ZodOptional<z.ZodString>;
411
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
412
+ productMode: z.ZodEnum<["guardrail", "delegation"]>;
413
+ }, "strict", z.ZodTypeAny, {
414
+ productMode: "guardrail" | "delegation";
415
+ label?: string | undefined;
416
+ description?: string | undefined;
417
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
418
+ }, {
419
+ productMode: "guardrail" | "delegation";
420
+ label?: string | undefined;
421
+ description?: string | undefined;
422
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
423
+ }>;
424
+ }, "strict", z.ZodTypeAny, {
425
+ id: string;
426
+ schemaVersion: "permissions.policy.v1";
427
+ version: string;
428
+ selector: {
429
+ walletId?: string | undefined;
430
+ chainId?: string | string[] | undefined;
431
+ walletType?: "EVM" | undefined;
432
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
433
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
434
+ };
435
+ rules: {
436
+ id: string;
437
+ effect: "allow" | "deny" | "require_approval";
438
+ when: {
439
+ kind: "compare";
440
+ fact: string;
441
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
442
+ value: PolicyAuthoringJsonValueSchemaOutput;
443
+ } | {
444
+ kind: "aggregate";
445
+ fact: string;
446
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
447
+ value: string;
448
+ window: string;
449
+ asset?: string;
450
+ } | {
451
+ kind: "all";
452
+ of: PermissionsV2ConditionSchemaOutput[];
453
+ } | {
454
+ kind: "any";
455
+ of: PermissionsV2ConditionSchemaOutput[];
456
+ } | {
457
+ kind: "not";
458
+ of: PermissionsV2ConditionSchemaOutput;
459
+ };
460
+ }[];
461
+ metadata: {
462
+ productMode: "guardrail" | "delegation";
463
+ label?: string | undefined;
464
+ description?: string | undefined;
465
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
466
+ };
467
+ }, {
468
+ id: string;
469
+ schemaVersion: "permissions.policy.v1";
470
+ version: string;
471
+ selector: {
472
+ walletId?: string | undefined;
473
+ chainId?: string | string[] | undefined;
474
+ walletType?: "EVM" | undefined;
475
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
476
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
477
+ };
478
+ rules: {
479
+ id: string;
480
+ effect: "allow" | "deny" | "require_approval";
481
+ when: {
482
+ kind: "compare";
483
+ fact: string;
484
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
485
+ value: PolicyAuthoringJsonValueSchemaOutput;
486
+ } | {
487
+ kind: "aggregate";
488
+ fact: string;
489
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
490
+ value: string;
491
+ window: string;
492
+ asset?: string;
493
+ } | {
494
+ kind: "all";
495
+ of: PermissionsV2ConditionSchemaOutput[];
496
+ } | {
497
+ kind: "any";
498
+ of: PermissionsV2ConditionSchemaOutput[];
499
+ } | {
500
+ kind: "not";
501
+ of: PermissionsV2ConditionSchemaOutput;
502
+ };
503
+ }[];
504
+ metadata: {
505
+ productMode: "guardrail" | "delegation";
506
+ label?: string | undefined;
507
+ description?: string | undefined;
508
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
509
+ };
510
+ }>;
511
+ export declare const permissionsV2DelegationPolicyDefinitionSchema: z.ZodObject<{
512
+ id: z.ZodString;
513
+ schemaVersion: z.ZodLiteral<"permissions.policy.v1">;
514
+ version: z.ZodString;
515
+ rules: z.ZodArray<z.ZodObject<{
516
+ id: z.ZodString;
517
+ effect: z.ZodEnum<["allow", "deny", "require_approval"]>;
518
+ when: z.ZodType<PermissionsV2ConditionSchemaOutput, z.ZodTypeDef, PermissionsV2ConditionSchemaOutput>;
519
+ }, "strict", z.ZodTypeAny, {
520
+ id: string;
521
+ effect: "allow" | "deny" | "require_approval";
522
+ when: {
523
+ kind: "compare";
524
+ fact: string;
525
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
526
+ value: PolicyAuthoringJsonValueSchemaOutput;
527
+ } | {
528
+ kind: "aggregate";
529
+ fact: string;
530
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
531
+ value: string;
532
+ window: string;
533
+ asset?: string;
534
+ } | {
535
+ kind: "all";
536
+ of: PermissionsV2ConditionSchemaOutput[];
537
+ } | {
538
+ kind: "any";
539
+ of: PermissionsV2ConditionSchemaOutput[];
540
+ } | {
541
+ kind: "not";
542
+ of: PermissionsV2ConditionSchemaOutput;
543
+ };
544
+ }, {
545
+ id: string;
546
+ effect: "allow" | "deny" | "require_approval";
547
+ when: {
548
+ kind: "compare";
549
+ fact: string;
550
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
551
+ value: PolicyAuthoringJsonValueSchemaOutput;
552
+ } | {
553
+ kind: "aggregate";
554
+ fact: string;
555
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
556
+ value: string;
557
+ window: string;
558
+ asset?: string;
559
+ } | {
560
+ kind: "all";
561
+ of: PermissionsV2ConditionSchemaOutput[];
562
+ } | {
563
+ kind: "any";
564
+ of: PermissionsV2ConditionSchemaOutput[];
565
+ } | {
566
+ kind: "not";
567
+ of: PermissionsV2ConditionSchemaOutput;
568
+ };
569
+ }>, "many">;
570
+ layer: z.ZodLiteral<"partner">;
571
+ selector: z.ZodObject<{
572
+ walletId: z.ZodOptional<z.ZodString>;
573
+ walletType: z.ZodOptional<z.ZodEnum<["EVM"]>>;
574
+ chainId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>>;
575
+ requestRoute: z.ZodOptional<z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>>;
576
+ requestType: z.ZodOptional<z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>>;
577
+ partnerId: z.ZodString;
578
+ appId: z.ZodString;
579
+ }, "strict", z.ZodTypeAny, {
580
+ partnerId: string;
581
+ appId: string;
582
+ walletId?: string | undefined;
583
+ walletType?: "EVM" | undefined;
584
+ chainId?: string | string[] | undefined;
585
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
586
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
587
+ }, {
588
+ partnerId: string;
589
+ appId: string;
590
+ walletId?: string | undefined;
591
+ walletType?: "EVM" | undefined;
592
+ chainId?: string | string[] | undefined;
593
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
594
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
595
+ }>;
596
+ metadata: z.ZodObject<{
597
+ label: z.ZodOptional<z.ZodString>;
598
+ description: z.ZodOptional<z.ZodString>;
599
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
600
+ productMode: z.ZodLiteral<"delegation">;
601
+ }, "strict", z.ZodTypeAny, {
602
+ productMode: "delegation";
603
+ label?: string | undefined;
604
+ description?: string | undefined;
605
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
606
+ }, {
607
+ productMode: "delegation";
608
+ label?: string | undefined;
609
+ description?: string | undefined;
610
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
611
+ }>;
612
+ }, "strict", z.ZodTypeAny, {
613
+ id: string;
614
+ schemaVersion: "permissions.policy.v1";
615
+ version: string;
616
+ selector: {
617
+ partnerId: string;
618
+ appId: string;
619
+ walletId?: string | undefined;
620
+ walletType?: "EVM" | undefined;
621
+ chainId?: string | string[] | undefined;
622
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
623
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
624
+ };
625
+ rules: {
626
+ id: string;
627
+ effect: "allow" | "deny" | "require_approval";
628
+ when: {
629
+ kind: "compare";
630
+ fact: string;
631
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
632
+ value: PolicyAuthoringJsonValueSchemaOutput;
633
+ } | {
634
+ kind: "aggregate";
635
+ fact: string;
636
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
637
+ value: string;
638
+ window: string;
639
+ asset?: string;
640
+ } | {
641
+ kind: "all";
642
+ of: PermissionsV2ConditionSchemaOutput[];
643
+ } | {
644
+ kind: "any";
645
+ of: PermissionsV2ConditionSchemaOutput[];
646
+ } | {
647
+ kind: "not";
648
+ of: PermissionsV2ConditionSchemaOutput;
649
+ };
650
+ }[];
651
+ metadata: {
652
+ productMode: "delegation";
653
+ label?: string | undefined;
654
+ description?: string | undefined;
655
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
656
+ };
657
+ layer: "partner";
658
+ }, {
659
+ id: string;
660
+ schemaVersion: "permissions.policy.v1";
661
+ version: string;
662
+ selector: {
663
+ partnerId: string;
664
+ appId: string;
665
+ walletId?: string | undefined;
666
+ walletType?: "EVM" | undefined;
667
+ chainId?: string | string[] | undefined;
668
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
669
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
670
+ };
671
+ rules: {
672
+ id: string;
673
+ effect: "allow" | "deny" | "require_approval";
674
+ when: {
675
+ kind: "compare";
676
+ fact: string;
677
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
678
+ value: PolicyAuthoringJsonValueSchemaOutput;
679
+ } | {
680
+ kind: "aggregate";
681
+ fact: string;
682
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
683
+ value: string;
684
+ window: string;
685
+ asset?: string;
686
+ } | {
687
+ kind: "all";
688
+ of: PermissionsV2ConditionSchemaOutput[];
689
+ } | {
690
+ kind: "any";
691
+ of: PermissionsV2ConditionSchemaOutput[];
692
+ } | {
693
+ kind: "not";
694
+ of: PermissionsV2ConditionSchemaOutput;
695
+ };
696
+ }[];
697
+ metadata: {
698
+ productMode: "delegation";
699
+ label?: string | undefined;
700
+ description?: string | undefined;
701
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
702
+ };
703
+ layer: "partner";
704
+ }>;
705
+ export declare const permissionsV2DelegationConsentApiStatusSchema: z.ZodEnum<["pending", "standing", "manual_review", "revoked", "expired"]>;
706
+ export declare const permissionsV2DelegationConsentMutationSchema: z.ZodObject<{
707
+ partnerId: z.ZodString;
708
+ appId: z.ZodString;
709
+ walletId: z.ZodString;
710
+ policyVersion: z.ZodString;
711
+ policyHash: z.ZodString;
712
+ expiresAt: z.ZodOptional<z.ZodString>;
713
+ }, "strict", z.ZodTypeAny, {
714
+ walletId: string;
715
+ partnerId: string;
716
+ appId: string;
717
+ policyVersion: string;
718
+ policyHash: string;
719
+ expiresAt?: string | undefined;
720
+ }, {
721
+ walletId: string;
722
+ partnerId: string;
723
+ appId: string;
724
+ policyVersion: string;
725
+ policyHash: string;
726
+ expiresAt?: string | undefined;
727
+ }>;
728
+ export declare const permissionsV2DelegationConsentStandingMutationSchema: z.ZodObject<{
729
+ walletId: z.ZodString;
730
+ partnerId: z.ZodString;
731
+ appId: z.ZodString;
732
+ policyVersion: z.ZodString;
733
+ policyHash: z.ZodString;
734
+ expiresAt: z.ZodOptional<z.ZodString>;
735
+ pendingTransactionId: z.ZodString;
736
+ }, "strict", z.ZodTypeAny, {
737
+ walletId: string;
738
+ partnerId: string;
739
+ appId: string;
740
+ policyVersion: string;
741
+ policyHash: string;
742
+ pendingTransactionId: string;
743
+ expiresAt?: string | undefined;
744
+ }, {
745
+ walletId: string;
746
+ partnerId: string;
747
+ appId: string;
748
+ policyVersion: string;
749
+ policyHash: string;
750
+ pendingTransactionId: string;
751
+ expiresAt?: string | undefined;
752
+ }>;
753
+ export declare const permissionsV2DelegationConsentViewSchema: z.ZodObject<{
754
+ status: z.ZodEnum<["pending", "standing", "manual_review", "revoked", "expired"]>;
755
+ userId: z.ZodString;
756
+ partnerId: z.ZodString;
757
+ appId: z.ZodString;
758
+ walletId: z.ZodString;
759
+ policyId: z.ZodString;
760
+ policyVersion: z.ZodString;
761
+ policyHash: z.ZodString;
762
+ grantedAt: z.ZodOptional<z.ZodString>;
763
+ expiresAt: z.ZodOptional<z.ZodString>;
764
+ revokedAt: z.ZodOptional<z.ZodString>;
765
+ }, "strict", z.ZodTypeAny, {
766
+ userId: string;
767
+ walletId: string;
768
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
769
+ partnerId: string;
770
+ appId: string;
771
+ policyVersion: string;
772
+ policyHash: string;
773
+ policyId: string;
774
+ grantedAt?: string | undefined;
775
+ expiresAt?: string | undefined;
776
+ revokedAt?: string | undefined;
777
+ }, {
778
+ userId: string;
779
+ walletId: string;
780
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
781
+ partnerId: string;
782
+ appId: string;
783
+ policyVersion: string;
784
+ policyHash: string;
785
+ policyId: string;
786
+ grantedAt?: string | undefined;
787
+ expiresAt?: string | undefined;
788
+ revokedAt?: string | undefined;
789
+ }>;
790
+ export declare const permissionsV2DelegationConsentRequestSchema: z.ZodObject<{
791
+ policy: z.ZodObject<{
792
+ id: z.ZodString;
793
+ schemaVersion: z.ZodLiteral<"permissions.policy.v1">;
794
+ version: z.ZodString;
795
+ rules: z.ZodArray<z.ZodObject<{
796
+ id: z.ZodString;
797
+ effect: z.ZodEnum<["allow", "deny", "require_approval"]>;
798
+ when: z.ZodType<PermissionsV2ConditionSchemaOutput, z.ZodTypeDef, PermissionsV2ConditionSchemaOutput>;
799
+ }, "strict", z.ZodTypeAny, {
800
+ id: string;
801
+ effect: "allow" | "deny" | "require_approval";
802
+ when: {
803
+ kind: "compare";
804
+ fact: string;
805
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
806
+ value: PolicyAuthoringJsonValueSchemaOutput;
807
+ } | {
808
+ kind: "aggregate";
809
+ fact: string;
810
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
811
+ value: string;
812
+ window: string;
813
+ asset?: string;
814
+ } | {
815
+ kind: "all";
816
+ of: PermissionsV2ConditionSchemaOutput[];
817
+ } | {
818
+ kind: "any";
819
+ of: PermissionsV2ConditionSchemaOutput[];
820
+ } | {
821
+ kind: "not";
822
+ of: PermissionsV2ConditionSchemaOutput;
823
+ };
824
+ }, {
825
+ id: string;
826
+ effect: "allow" | "deny" | "require_approval";
827
+ when: {
828
+ kind: "compare";
829
+ fact: string;
830
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
831
+ value: PolicyAuthoringJsonValueSchemaOutput;
832
+ } | {
833
+ kind: "aggregate";
834
+ fact: string;
835
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
836
+ value: string;
837
+ window: string;
838
+ asset?: string;
839
+ } | {
840
+ kind: "all";
841
+ of: PermissionsV2ConditionSchemaOutput[];
842
+ } | {
843
+ kind: "any";
844
+ of: PermissionsV2ConditionSchemaOutput[];
845
+ } | {
846
+ kind: "not";
847
+ of: PermissionsV2ConditionSchemaOutput;
848
+ };
849
+ }>, "many">;
850
+ layer: z.ZodLiteral<"partner">;
851
+ selector: z.ZodObject<{
852
+ walletId: z.ZodOptional<z.ZodString>;
853
+ walletType: z.ZodOptional<z.ZodEnum<["EVM"]>>;
854
+ chainId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>>;
855
+ requestRoute: z.ZodOptional<z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>>;
856
+ requestType: z.ZodOptional<z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>>;
857
+ partnerId: z.ZodString;
858
+ appId: z.ZodString;
859
+ }, "strict", z.ZodTypeAny, {
860
+ partnerId: string;
861
+ appId: string;
862
+ walletId?: string | undefined;
863
+ walletType?: "EVM" | undefined;
864
+ chainId?: string | string[] | undefined;
865
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
866
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
867
+ }, {
868
+ partnerId: string;
869
+ appId: string;
870
+ walletId?: string | undefined;
871
+ walletType?: "EVM" | undefined;
872
+ chainId?: string | string[] | undefined;
873
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
874
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
875
+ }>;
876
+ metadata: z.ZodObject<{
877
+ label: z.ZodOptional<z.ZodString>;
878
+ description: z.ZodOptional<z.ZodString>;
879
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
880
+ productMode: z.ZodLiteral<"delegation">;
881
+ }, "strict", z.ZodTypeAny, {
882
+ productMode: "delegation";
883
+ label?: string | undefined;
884
+ description?: string | undefined;
885
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
886
+ }, {
887
+ productMode: "delegation";
888
+ label?: string | undefined;
889
+ description?: string | undefined;
890
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
891
+ }>;
892
+ }, "strict", z.ZodTypeAny, {
893
+ id: string;
894
+ schemaVersion: "permissions.policy.v1";
895
+ version: string;
896
+ selector: {
897
+ partnerId: string;
898
+ appId: string;
899
+ walletId?: string | undefined;
900
+ walletType?: "EVM" | undefined;
901
+ chainId?: string | string[] | undefined;
902
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
903
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
904
+ };
905
+ rules: {
906
+ id: string;
907
+ effect: "allow" | "deny" | "require_approval";
908
+ when: {
909
+ kind: "compare";
910
+ fact: string;
911
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
912
+ value: PolicyAuthoringJsonValueSchemaOutput;
913
+ } | {
914
+ kind: "aggregate";
915
+ fact: string;
916
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
917
+ value: string;
918
+ window: string;
919
+ asset?: string;
920
+ } | {
921
+ kind: "all";
922
+ of: PermissionsV2ConditionSchemaOutput[];
923
+ } | {
924
+ kind: "any";
925
+ of: PermissionsV2ConditionSchemaOutput[];
926
+ } | {
927
+ kind: "not";
928
+ of: PermissionsV2ConditionSchemaOutput;
929
+ };
930
+ }[];
931
+ metadata: {
932
+ productMode: "delegation";
933
+ label?: string | undefined;
934
+ description?: string | undefined;
935
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
936
+ };
937
+ layer: "partner";
938
+ }, {
939
+ id: string;
940
+ schemaVersion: "permissions.policy.v1";
941
+ version: string;
942
+ selector: {
943
+ partnerId: string;
944
+ appId: string;
945
+ walletId?: string | undefined;
946
+ walletType?: "EVM" | undefined;
947
+ chainId?: string | string[] | undefined;
948
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
949
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
950
+ };
951
+ rules: {
952
+ id: string;
953
+ effect: "allow" | "deny" | "require_approval";
954
+ when: {
955
+ kind: "compare";
956
+ fact: string;
957
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
958
+ value: PolicyAuthoringJsonValueSchemaOutput;
959
+ } | {
960
+ kind: "aggregate";
961
+ fact: string;
962
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
963
+ value: string;
964
+ window: string;
965
+ asset?: string;
966
+ } | {
967
+ kind: "all";
968
+ of: PermissionsV2ConditionSchemaOutput[];
969
+ } | {
970
+ kind: "any";
971
+ of: PermissionsV2ConditionSchemaOutput[];
972
+ } | {
973
+ kind: "not";
974
+ of: PermissionsV2ConditionSchemaOutput;
975
+ };
976
+ }[];
977
+ metadata: {
978
+ productMode: "delegation";
979
+ label?: string | undefined;
980
+ description?: string | undefined;
981
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
982
+ };
983
+ layer: "partner";
984
+ }>;
985
+ consent: z.ZodObject<{
986
+ status: z.ZodEnum<["pending", "standing", "manual_review", "revoked", "expired"]>;
987
+ userId: z.ZodString;
988
+ partnerId: z.ZodString;
989
+ appId: z.ZodString;
990
+ walletId: z.ZodString;
991
+ policyId: z.ZodString;
992
+ policyVersion: z.ZodString;
993
+ policyHash: z.ZodString;
994
+ grantedAt: z.ZodOptional<z.ZodString>;
995
+ expiresAt: z.ZodOptional<z.ZodString>;
996
+ revokedAt: z.ZodOptional<z.ZodString>;
997
+ }, "strict", z.ZodTypeAny, {
998
+ userId: string;
999
+ walletId: string;
1000
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1001
+ partnerId: string;
1002
+ appId: string;
1003
+ policyVersion: string;
1004
+ policyHash: string;
1005
+ policyId: string;
1006
+ grantedAt?: string | undefined;
1007
+ expiresAt?: string | undefined;
1008
+ revokedAt?: string | undefined;
1009
+ }, {
1010
+ userId: string;
1011
+ walletId: string;
1012
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1013
+ partnerId: string;
1014
+ appId: string;
1015
+ policyVersion: string;
1016
+ policyHash: string;
1017
+ policyId: string;
1018
+ grantedAt?: string | undefined;
1019
+ expiresAt?: string | undefined;
1020
+ revokedAt?: string | undefined;
1021
+ }>;
1022
+ }, "strict", z.ZodTypeAny, {
1023
+ policy: {
1024
+ id: string;
1025
+ schemaVersion: "permissions.policy.v1";
1026
+ version: string;
1027
+ selector: {
1028
+ partnerId: string;
1029
+ appId: string;
1030
+ walletId?: string | undefined;
1031
+ walletType?: "EVM" | undefined;
1032
+ chainId?: string | string[] | undefined;
1033
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1034
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1035
+ };
1036
+ rules: {
1037
+ id: string;
1038
+ effect: "allow" | "deny" | "require_approval";
1039
+ when: {
1040
+ kind: "compare";
1041
+ fact: string;
1042
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1043
+ value: PolicyAuthoringJsonValueSchemaOutput;
1044
+ } | {
1045
+ kind: "aggregate";
1046
+ fact: string;
1047
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1048
+ value: string;
1049
+ window: string;
1050
+ asset?: string;
1051
+ } | {
1052
+ kind: "all";
1053
+ of: PermissionsV2ConditionSchemaOutput[];
1054
+ } | {
1055
+ kind: "any";
1056
+ of: PermissionsV2ConditionSchemaOutput[];
1057
+ } | {
1058
+ kind: "not";
1059
+ of: PermissionsV2ConditionSchemaOutput;
1060
+ };
1061
+ }[];
1062
+ metadata: {
1063
+ productMode: "delegation";
1064
+ label?: string | undefined;
1065
+ description?: string | undefined;
1066
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1067
+ };
1068
+ layer: "partner";
1069
+ };
1070
+ consent: {
1071
+ userId: string;
1072
+ walletId: string;
1073
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1074
+ partnerId: string;
1075
+ appId: string;
1076
+ policyVersion: string;
1077
+ policyHash: string;
1078
+ policyId: string;
1079
+ grantedAt?: string | undefined;
1080
+ expiresAt?: string | undefined;
1081
+ revokedAt?: string | undefined;
1082
+ };
1083
+ }, {
1084
+ policy: {
1085
+ id: string;
1086
+ schemaVersion: "permissions.policy.v1";
1087
+ version: string;
1088
+ selector: {
1089
+ partnerId: string;
1090
+ appId: string;
1091
+ walletId?: string | undefined;
1092
+ walletType?: "EVM" | undefined;
1093
+ chainId?: string | string[] | undefined;
1094
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1095
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1096
+ };
1097
+ rules: {
1098
+ id: string;
1099
+ effect: "allow" | "deny" | "require_approval";
1100
+ when: {
1101
+ kind: "compare";
1102
+ fact: string;
1103
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1104
+ value: PolicyAuthoringJsonValueSchemaOutput;
1105
+ } | {
1106
+ kind: "aggregate";
1107
+ fact: string;
1108
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1109
+ value: string;
1110
+ window: string;
1111
+ asset?: string;
1112
+ } | {
1113
+ kind: "all";
1114
+ of: PermissionsV2ConditionSchemaOutput[];
1115
+ } | {
1116
+ kind: "any";
1117
+ of: PermissionsV2ConditionSchemaOutput[];
1118
+ } | {
1119
+ kind: "not";
1120
+ of: PermissionsV2ConditionSchemaOutput;
1121
+ };
1122
+ }[];
1123
+ metadata: {
1124
+ productMode: "delegation";
1125
+ label?: string | undefined;
1126
+ description?: string | undefined;
1127
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1128
+ };
1129
+ layer: "partner";
1130
+ };
1131
+ consent: {
1132
+ userId: string;
1133
+ walletId: string;
1134
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1135
+ partnerId: string;
1136
+ appId: string;
1137
+ policyVersion: string;
1138
+ policyHash: string;
1139
+ policyId: string;
1140
+ grantedAt?: string | undefined;
1141
+ expiresAt?: string | undefined;
1142
+ revokedAt?: string | undefined;
1143
+ };
1144
+ }>;
1145
+ export declare const permissionsV2DelegationConsentDiscoveryResponseSchema: z.ZodObject<{
1146
+ requests: z.ZodArray<z.ZodObject<{
1147
+ policy: z.ZodObject<{
1148
+ id: z.ZodString;
1149
+ schemaVersion: z.ZodLiteral<"permissions.policy.v1">;
1150
+ version: z.ZodString;
1151
+ rules: z.ZodArray<z.ZodObject<{
1152
+ id: z.ZodString;
1153
+ effect: z.ZodEnum<["allow", "deny", "require_approval"]>;
1154
+ when: z.ZodType<PermissionsV2ConditionSchemaOutput, z.ZodTypeDef, PermissionsV2ConditionSchemaOutput>;
1155
+ }, "strict", z.ZodTypeAny, {
1156
+ id: string;
1157
+ effect: "allow" | "deny" | "require_approval";
1158
+ when: {
1159
+ kind: "compare";
1160
+ fact: string;
1161
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1162
+ value: PolicyAuthoringJsonValueSchemaOutput;
1163
+ } | {
1164
+ kind: "aggregate";
1165
+ fact: string;
1166
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1167
+ value: string;
1168
+ window: string;
1169
+ asset?: string;
1170
+ } | {
1171
+ kind: "all";
1172
+ of: PermissionsV2ConditionSchemaOutput[];
1173
+ } | {
1174
+ kind: "any";
1175
+ of: PermissionsV2ConditionSchemaOutput[];
1176
+ } | {
1177
+ kind: "not";
1178
+ of: PermissionsV2ConditionSchemaOutput;
1179
+ };
1180
+ }, {
1181
+ id: string;
1182
+ effect: "allow" | "deny" | "require_approval";
1183
+ when: {
1184
+ kind: "compare";
1185
+ fact: string;
1186
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1187
+ value: PolicyAuthoringJsonValueSchemaOutput;
1188
+ } | {
1189
+ kind: "aggregate";
1190
+ fact: string;
1191
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1192
+ value: string;
1193
+ window: string;
1194
+ asset?: string;
1195
+ } | {
1196
+ kind: "all";
1197
+ of: PermissionsV2ConditionSchemaOutput[];
1198
+ } | {
1199
+ kind: "any";
1200
+ of: PermissionsV2ConditionSchemaOutput[];
1201
+ } | {
1202
+ kind: "not";
1203
+ of: PermissionsV2ConditionSchemaOutput;
1204
+ };
1205
+ }>, "many">;
1206
+ layer: z.ZodLiteral<"partner">;
1207
+ selector: z.ZodObject<{
1208
+ walletId: z.ZodOptional<z.ZodString>;
1209
+ walletType: z.ZodOptional<z.ZodEnum<["EVM"]>>;
1210
+ chainId: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>]>>;
1211
+ requestRoute: z.ZodOptional<z.ZodEnum<["evm.sign_transaction", "evm.sign_raw", "evm.sign_typed_data", "evm.sign_authorization", "evm.sign_message", "smart_account.user_operation"]>>;
1212
+ requestType: z.ZodOptional<z.ZodEnum<["evm_transaction", "evm_message", "evm_raw", "evm_typed_data", "evm_authorization", "smart_account_user_operation"]>>;
1213
+ partnerId: z.ZodString;
1214
+ appId: z.ZodString;
1215
+ }, "strict", z.ZodTypeAny, {
1216
+ partnerId: string;
1217
+ appId: string;
1218
+ walletId?: string | undefined;
1219
+ walletType?: "EVM" | undefined;
1220
+ chainId?: string | string[] | undefined;
1221
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1222
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1223
+ }, {
1224
+ partnerId: string;
1225
+ appId: string;
1226
+ walletId?: string | undefined;
1227
+ walletType?: "EVM" | undefined;
1228
+ chainId?: string | string[] | undefined;
1229
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1230
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1231
+ }>;
1232
+ metadata: z.ZodObject<{
1233
+ label: z.ZodOptional<z.ZodString>;
1234
+ description: z.ZodOptional<z.ZodString>;
1235
+ annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PolicyAuthoringJsonValueSchemaOutput, z.ZodTypeDef, PolicyAuthoringJsonValueSchemaOutput>>>;
1236
+ productMode: z.ZodLiteral<"delegation">;
1237
+ }, "strict", z.ZodTypeAny, {
1238
+ productMode: "delegation";
1239
+ label?: string | undefined;
1240
+ description?: string | undefined;
1241
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1242
+ }, {
1243
+ productMode: "delegation";
1244
+ label?: string | undefined;
1245
+ description?: string | undefined;
1246
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1247
+ }>;
1248
+ }, "strict", z.ZodTypeAny, {
1249
+ id: string;
1250
+ schemaVersion: "permissions.policy.v1";
1251
+ version: string;
1252
+ selector: {
1253
+ partnerId: string;
1254
+ appId: string;
1255
+ walletId?: string | undefined;
1256
+ walletType?: "EVM" | undefined;
1257
+ chainId?: string | string[] | undefined;
1258
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1259
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1260
+ };
1261
+ rules: {
1262
+ id: string;
1263
+ effect: "allow" | "deny" | "require_approval";
1264
+ when: {
1265
+ kind: "compare";
1266
+ fact: string;
1267
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1268
+ value: PolicyAuthoringJsonValueSchemaOutput;
1269
+ } | {
1270
+ kind: "aggregate";
1271
+ fact: string;
1272
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1273
+ value: string;
1274
+ window: string;
1275
+ asset?: string;
1276
+ } | {
1277
+ kind: "all";
1278
+ of: PermissionsV2ConditionSchemaOutput[];
1279
+ } | {
1280
+ kind: "any";
1281
+ of: PermissionsV2ConditionSchemaOutput[];
1282
+ } | {
1283
+ kind: "not";
1284
+ of: PermissionsV2ConditionSchemaOutput;
1285
+ };
1286
+ }[];
1287
+ metadata: {
1288
+ productMode: "delegation";
1289
+ label?: string | undefined;
1290
+ description?: string | undefined;
1291
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1292
+ };
1293
+ layer: "partner";
1294
+ }, {
1295
+ id: string;
1296
+ schemaVersion: "permissions.policy.v1";
1297
+ version: string;
1298
+ selector: {
1299
+ partnerId: string;
1300
+ appId: string;
1301
+ walletId?: string | undefined;
1302
+ walletType?: "EVM" | undefined;
1303
+ chainId?: string | string[] | undefined;
1304
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1305
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1306
+ };
1307
+ rules: {
1308
+ id: string;
1309
+ effect: "allow" | "deny" | "require_approval";
1310
+ when: {
1311
+ kind: "compare";
1312
+ fact: string;
1313
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1314
+ value: PolicyAuthoringJsonValueSchemaOutput;
1315
+ } | {
1316
+ kind: "aggregate";
1317
+ fact: string;
1318
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1319
+ value: string;
1320
+ window: string;
1321
+ asset?: string;
1322
+ } | {
1323
+ kind: "all";
1324
+ of: PermissionsV2ConditionSchemaOutput[];
1325
+ } | {
1326
+ kind: "any";
1327
+ of: PermissionsV2ConditionSchemaOutput[];
1328
+ } | {
1329
+ kind: "not";
1330
+ of: PermissionsV2ConditionSchemaOutput;
1331
+ };
1332
+ }[];
1333
+ metadata: {
1334
+ productMode: "delegation";
1335
+ label?: string | undefined;
1336
+ description?: string | undefined;
1337
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1338
+ };
1339
+ layer: "partner";
1340
+ }>;
1341
+ consent: z.ZodObject<{
1342
+ status: z.ZodEnum<["pending", "standing", "manual_review", "revoked", "expired"]>;
1343
+ userId: z.ZodString;
1344
+ partnerId: z.ZodString;
1345
+ appId: z.ZodString;
1346
+ walletId: z.ZodString;
1347
+ policyId: z.ZodString;
1348
+ policyVersion: z.ZodString;
1349
+ policyHash: z.ZodString;
1350
+ grantedAt: z.ZodOptional<z.ZodString>;
1351
+ expiresAt: z.ZodOptional<z.ZodString>;
1352
+ revokedAt: z.ZodOptional<z.ZodString>;
1353
+ }, "strict", z.ZodTypeAny, {
1354
+ userId: string;
1355
+ walletId: string;
1356
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1357
+ partnerId: string;
1358
+ appId: string;
1359
+ policyVersion: string;
1360
+ policyHash: string;
1361
+ policyId: string;
1362
+ grantedAt?: string | undefined;
1363
+ expiresAt?: string | undefined;
1364
+ revokedAt?: string | undefined;
1365
+ }, {
1366
+ userId: string;
1367
+ walletId: string;
1368
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1369
+ partnerId: string;
1370
+ appId: string;
1371
+ policyVersion: string;
1372
+ policyHash: string;
1373
+ policyId: string;
1374
+ grantedAt?: string | undefined;
1375
+ expiresAt?: string | undefined;
1376
+ revokedAt?: string | undefined;
1377
+ }>;
1378
+ }, "strict", z.ZodTypeAny, {
1379
+ policy: {
1380
+ id: string;
1381
+ schemaVersion: "permissions.policy.v1";
1382
+ version: string;
1383
+ selector: {
1384
+ partnerId: string;
1385
+ appId: string;
1386
+ walletId?: string | undefined;
1387
+ walletType?: "EVM" | undefined;
1388
+ chainId?: string | string[] | undefined;
1389
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1390
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1391
+ };
1392
+ rules: {
1393
+ id: string;
1394
+ effect: "allow" | "deny" | "require_approval";
1395
+ when: {
1396
+ kind: "compare";
1397
+ fact: string;
1398
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1399
+ value: PolicyAuthoringJsonValueSchemaOutput;
1400
+ } | {
1401
+ kind: "aggregate";
1402
+ fact: string;
1403
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1404
+ value: string;
1405
+ window: string;
1406
+ asset?: string;
1407
+ } | {
1408
+ kind: "all";
1409
+ of: PermissionsV2ConditionSchemaOutput[];
1410
+ } | {
1411
+ kind: "any";
1412
+ of: PermissionsV2ConditionSchemaOutput[];
1413
+ } | {
1414
+ kind: "not";
1415
+ of: PermissionsV2ConditionSchemaOutput;
1416
+ };
1417
+ }[];
1418
+ metadata: {
1419
+ productMode: "delegation";
1420
+ label?: string | undefined;
1421
+ description?: string | undefined;
1422
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1423
+ };
1424
+ layer: "partner";
1425
+ };
1426
+ consent: {
1427
+ userId: string;
1428
+ walletId: string;
1429
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1430
+ partnerId: string;
1431
+ appId: string;
1432
+ policyVersion: string;
1433
+ policyHash: string;
1434
+ policyId: string;
1435
+ grantedAt?: string | undefined;
1436
+ expiresAt?: string | undefined;
1437
+ revokedAt?: string | undefined;
1438
+ };
1439
+ }, {
1440
+ policy: {
1441
+ id: string;
1442
+ schemaVersion: "permissions.policy.v1";
1443
+ version: string;
1444
+ selector: {
1445
+ partnerId: string;
1446
+ appId: string;
1447
+ walletId?: string | undefined;
1448
+ walletType?: "EVM" | undefined;
1449
+ chainId?: string | string[] | undefined;
1450
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1451
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1452
+ };
1453
+ rules: {
1454
+ id: string;
1455
+ effect: "allow" | "deny" | "require_approval";
1456
+ when: {
1457
+ kind: "compare";
1458
+ fact: string;
1459
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1460
+ value: PolicyAuthoringJsonValueSchemaOutput;
1461
+ } | {
1462
+ kind: "aggregate";
1463
+ fact: string;
1464
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1465
+ value: string;
1466
+ window: string;
1467
+ asset?: string;
1468
+ } | {
1469
+ kind: "all";
1470
+ of: PermissionsV2ConditionSchemaOutput[];
1471
+ } | {
1472
+ kind: "any";
1473
+ of: PermissionsV2ConditionSchemaOutput[];
1474
+ } | {
1475
+ kind: "not";
1476
+ of: PermissionsV2ConditionSchemaOutput;
1477
+ };
1478
+ }[];
1479
+ metadata: {
1480
+ productMode: "delegation";
1481
+ label?: string | undefined;
1482
+ description?: string | undefined;
1483
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1484
+ };
1485
+ layer: "partner";
1486
+ };
1487
+ consent: {
1488
+ userId: string;
1489
+ walletId: string;
1490
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1491
+ partnerId: string;
1492
+ appId: string;
1493
+ policyVersion: string;
1494
+ policyHash: string;
1495
+ policyId: string;
1496
+ grantedAt?: string | undefined;
1497
+ expiresAt?: string | undefined;
1498
+ revokedAt?: string | undefined;
1499
+ };
1500
+ }>, "many">;
1501
+ }, "strict", z.ZodTypeAny, {
1502
+ requests: {
1503
+ policy: {
1504
+ id: string;
1505
+ schemaVersion: "permissions.policy.v1";
1506
+ version: string;
1507
+ selector: {
1508
+ partnerId: string;
1509
+ appId: string;
1510
+ walletId?: string | undefined;
1511
+ walletType?: "EVM" | undefined;
1512
+ chainId?: string | string[] | undefined;
1513
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1514
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1515
+ };
1516
+ rules: {
1517
+ id: string;
1518
+ effect: "allow" | "deny" | "require_approval";
1519
+ when: {
1520
+ kind: "compare";
1521
+ fact: string;
1522
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1523
+ value: PolicyAuthoringJsonValueSchemaOutput;
1524
+ } | {
1525
+ kind: "aggregate";
1526
+ fact: string;
1527
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1528
+ value: string;
1529
+ window: string;
1530
+ asset?: string;
1531
+ } | {
1532
+ kind: "all";
1533
+ of: PermissionsV2ConditionSchemaOutput[];
1534
+ } | {
1535
+ kind: "any";
1536
+ of: PermissionsV2ConditionSchemaOutput[];
1537
+ } | {
1538
+ kind: "not";
1539
+ of: PermissionsV2ConditionSchemaOutput;
1540
+ };
1541
+ }[];
1542
+ metadata: {
1543
+ productMode: "delegation";
1544
+ label?: string | undefined;
1545
+ description?: string | undefined;
1546
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1547
+ };
1548
+ layer: "partner";
1549
+ };
1550
+ consent: {
1551
+ userId: string;
1552
+ walletId: string;
1553
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1554
+ partnerId: string;
1555
+ appId: string;
1556
+ policyVersion: string;
1557
+ policyHash: string;
1558
+ policyId: string;
1559
+ grantedAt?: string | undefined;
1560
+ expiresAt?: string | undefined;
1561
+ revokedAt?: string | undefined;
1562
+ };
1563
+ }[];
1564
+ }, {
1565
+ requests: {
1566
+ policy: {
1567
+ id: string;
1568
+ schemaVersion: "permissions.policy.v1";
1569
+ version: string;
1570
+ selector: {
1571
+ partnerId: string;
1572
+ appId: string;
1573
+ walletId?: string | undefined;
1574
+ walletType?: "EVM" | undefined;
1575
+ chainId?: string | string[] | undefined;
1576
+ requestRoute?: "evm.sign_transaction" | "evm.sign_raw" | "evm.sign_typed_data" | "evm.sign_authorization" | "evm.sign_message" | "smart_account.user_operation" | undefined;
1577
+ requestType?: "evm_transaction" | "evm_message" | "evm_raw" | "evm_typed_data" | "evm_authorization" | "smart_account_user_operation" | undefined;
1578
+ };
1579
+ rules: {
1580
+ id: string;
1581
+ effect: "allow" | "deny" | "require_approval";
1582
+ when: {
1583
+ kind: "compare";
1584
+ fact: string;
1585
+ op: z.infer<typeof permissionsV2CompareOperatorSchema>;
1586
+ value: PolicyAuthoringJsonValueSchemaOutput;
1587
+ } | {
1588
+ kind: "aggregate";
1589
+ fact: string;
1590
+ op: z.infer<typeof permissionsV2AggregateOperatorSchema>;
1591
+ value: string;
1592
+ window: string;
1593
+ asset?: string;
1594
+ } | {
1595
+ kind: "all";
1596
+ of: PermissionsV2ConditionSchemaOutput[];
1597
+ } | {
1598
+ kind: "any";
1599
+ of: PermissionsV2ConditionSchemaOutput[];
1600
+ } | {
1601
+ kind: "not";
1602
+ of: PermissionsV2ConditionSchemaOutput;
1603
+ };
1604
+ }[];
1605
+ metadata: {
1606
+ productMode: "delegation";
1607
+ label?: string | undefined;
1608
+ description?: string | undefined;
1609
+ annotations?: Record<string, PolicyAuthoringJsonValueSchemaOutput> | undefined;
1610
+ };
1611
+ layer: "partner";
1612
+ };
1613
+ consent: {
1614
+ userId: string;
1615
+ walletId: string;
1616
+ status: "pending" | "standing" | "manual_review" | "revoked" | "expired";
1617
+ partnerId: string;
1618
+ appId: string;
1619
+ policyVersion: string;
1620
+ policyHash: string;
1621
+ policyId: string;
1622
+ grantedAt?: string | undefined;
1623
+ expiresAt?: string | undefined;
1624
+ revokedAt?: string | undefined;
1625
+ };
1626
+ }[];
1627
+ }>;
1628
+ export declare const permissionsV2ValidationErrorSchema: z.ZodObject<{
1629
+ code: z.ZodString;
1630
+ path: z.ZodString;
1631
+ message: z.ZodString;
1632
+ }, "strict", z.ZodTypeAny, {
1633
+ code: string;
1634
+ path: string;
1635
+ message: string;
1636
+ }, {
1637
+ code: string;
1638
+ path: string;
1639
+ message: string;
1640
+ }>;
1641
+ export {};
1642
+ //# sourceMappingURL=permissionsV2.d.ts.map