@kya-os/contracts 1.3.1-canary.0 → 1.3.1-canary.1

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 (85) hide show
  1. package/dist/cli.d.ts +9 -9
  2. package/dist/cli.js +5 -5
  3. package/dist/handshake.d.ts +2 -2
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +3 -0
  6. package/dist/proof.d.ts +16 -16
  7. package/dist/registry.d.ts +15 -15
  8. package/dist/registry.js +3 -2
  9. package/dist/test.d.ts +19 -19
  10. package/dist/test.js +5 -5
  11. package/dist/utils/validation.d.ts +1 -1
  12. package/dist/utils/validation.js +1 -1
  13. package/dist/verifier.d.ts +39 -25
  14. package/dist/verifier.js +18 -2
  15. package/package.json +3 -5
  16. package/dist/cli.d.ts.map +0 -1
  17. package/dist/delegation/constraints.d.ts +0 -992
  18. package/dist/delegation/constraints.d.ts.map +0 -1
  19. package/dist/delegation/constraints.js +0 -210
  20. package/dist/delegation/index.d.ts +0 -8
  21. package/dist/delegation/index.d.ts.map +0 -1
  22. package/dist/delegation/index.js +0 -24
  23. package/dist/delegation/schemas.d.ts +0 -4081
  24. package/dist/delegation/schemas.d.ts.map +0 -1
  25. package/dist/delegation/schemas.js +0 -230
  26. package/dist/did/index.d.ts +0 -8
  27. package/dist/did/index.d.ts.map +0 -1
  28. package/dist/did/index.js +0 -24
  29. package/dist/did/resolve-contract.d.ts +0 -220
  30. package/dist/did/resolve-contract.d.ts.map +0 -1
  31. package/dist/did/resolve-contract.js +0 -32
  32. package/dist/did/types.d.ts +0 -164
  33. package/dist/did/types.d.ts.map +0 -1
  34. package/dist/did/types.js +0 -71
  35. package/dist/env/constants.d.ts +0 -58
  36. package/dist/env/constants.d.ts.map +0 -1
  37. package/dist/env/constants.js +0 -60
  38. package/dist/env/index.d.ts +0 -5
  39. package/dist/env/index.d.ts.map +0 -1
  40. package/dist/env/index.js +0 -21
  41. package/dist/handshake.d.ts.map +0 -1
  42. package/dist/index.d.ts.map +0 -1
  43. package/dist/proof/index.d.ts +0 -9
  44. package/dist/proof/index.d.ts.map +0 -1
  45. package/dist/proof/index.js +0 -25
  46. package/dist/proof/proof-record.d.ts +0 -838
  47. package/dist/proof/proof-record.d.ts.map +0 -1
  48. package/dist/proof/proof-record.js +0 -134
  49. package/dist/proof/signing-spec.d.ts +0 -147
  50. package/dist/proof/signing-spec.d.ts.map +0 -1
  51. package/dist/proof/signing-spec.js +0 -123
  52. package/dist/proof.d.ts.map +0 -1
  53. package/dist/registry.d.ts.map +0 -1
  54. package/dist/runtime/errors.d.ts +0 -348
  55. package/dist/runtime/errors.d.ts.map +0 -1
  56. package/dist/runtime/errors.js +0 -120
  57. package/dist/runtime/headers.d.ts +0 -84
  58. package/dist/runtime/headers.d.ts.map +0 -1
  59. package/dist/runtime/headers.js +0 -82
  60. package/dist/runtime/index.d.ts +0 -6
  61. package/dist/runtime/index.d.ts.map +0 -1
  62. package/dist/runtime/index.js +0 -22
  63. package/dist/test.d.ts.map +0 -1
  64. package/dist/tlkrc/index.d.ts +0 -5
  65. package/dist/tlkrc/index.d.ts.map +0 -1
  66. package/dist/tlkrc/index.js +0 -21
  67. package/dist/tlkrc/rotation.d.ts +0 -246
  68. package/dist/tlkrc/rotation.d.ts.map +0 -1
  69. package/dist/tlkrc/rotation.js +0 -127
  70. package/dist/utils/validation.d.ts.map +0 -1
  71. package/dist/vc/index.d.ts +0 -8
  72. package/dist/vc/index.d.ts.map +0 -1
  73. package/dist/vc/index.js +0 -24
  74. package/dist/vc/schemas.d.ts +0 -2484
  75. package/dist/vc/schemas.d.ts.map +0 -1
  76. package/dist/vc/schemas.js +0 -225
  77. package/dist/vc/statuslist.d.ts +0 -494
  78. package/dist/vc/statuslist.d.ts.map +0 -1
  79. package/dist/vc/statuslist.js +0 -133
  80. package/dist/verifier.d.ts.map +0 -1
  81. package/schemas/cli/register-output/v1.0.0.json +0 -69
  82. package/schemas/proof/v1.0.0.json +0 -80
  83. package/schemas/registry/receipt-v1.0.0.json +0 -60
  84. package/schemas/verifier/verify-page/v1.0.0.json +0 -94
  85. package/schemas/well-known/agent/v1.0.0.json +0 -49
@@ -1,4081 +0,0 @@
1
- /**
2
- * Delegation Record Schemas
3
- *
4
- * Types and schemas for delegation records that link VCs with CRISP constraints.
5
- * Delegations represent the transfer of authority from one DID to another.
6
- *
7
- * Related Spec: MCP-I §4.1, §4.2
8
- * Python Reference: Delegation-Documentation.md, Delegation-Service.md
9
- */
10
- import { z } from 'zod';
11
- /**
12
- * Delegation Status
13
- *
14
- * Lifecycle status of a delegation
15
- */
16
- export declare const DelegationStatusSchema: z.ZodEnum<["active", "revoked", "expired"]>;
17
- export type DelegationStatus = z.infer<typeof DelegationStatusSchema>;
18
- /**
19
- * Delegation Record Schema
20
- *
21
- * Complete delegation record linking issuer (delegator) to subject (delegatee)
22
- * with backing VC and CRISP constraints.
23
- *
24
- * **Key Invariants:**
25
- * - Delegation MUST reference a live VC via `vcId`
26
- * - Revocation of VC invalidates all linked delegations
27
- * - Chain: no cycles allowed
28
- * - Child `notAfter` ≤ parent `notAfter`
29
- * - Child scopes ⊆ parent scopes
30
- * - Child budgets ≤ parent budgets (same unit)
31
- */
32
- export declare const DelegationRecordSchema: z.ZodObject<{
33
- /** Unique identifier for the delegation */
34
- id: z.ZodString;
35
- /** DID of the delegator (issuer, e.g., merchant/user) */
36
- issuerDid: z.ZodString;
37
- /** DID of the delegatee (subject, e.g., agent) */
38
- subjectDid: z.ZodString;
39
- /** Optional controller (user account ID or DID) */
40
- controller: z.ZodOptional<z.ZodString>;
41
- /** ID of the backing Verifiable Credential */
42
- vcId: z.ZodString;
43
- /** Optional parent delegation ID for chain tracking */
44
- parentId: z.ZodOptional<z.ZodString>;
45
- /** CRISP constraints on this delegation */
46
- constraints: z.ZodObject<{
47
- notBefore: z.ZodOptional<z.ZodNumber>;
48
- notAfter: z.ZodOptional<z.ZodNumber>;
49
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
50
- crisp: z.ZodOptional<z.ZodObject<{
51
- budget: z.ZodOptional<z.ZodObject<{
52
- unit: z.ZodEnum<["USD", "ops", "points"]>;
53
- cap: z.ZodNumber;
54
- window: z.ZodOptional<z.ZodObject<{
55
- kind: z.ZodEnum<["rolling", "fixed"]>;
56
- durationSec: z.ZodNumber;
57
- }, "strip", z.ZodTypeAny, {
58
- kind: "rolling" | "fixed";
59
- durationSec: number;
60
- }, {
61
- kind: "rolling" | "fixed";
62
- durationSec: number;
63
- }>>;
64
- }, "strip", z.ZodTypeAny, {
65
- unit: "USD" | "ops" | "points";
66
- cap: number;
67
- window?: {
68
- kind: "rolling" | "fixed";
69
- durationSec: number;
70
- } | undefined;
71
- }, {
72
- unit: "USD" | "ops" | "points";
73
- cap: number;
74
- window?: {
75
- kind: "rolling" | "fixed";
76
- durationSec: number;
77
- } | undefined;
78
- }>>;
79
- scopes: z.ZodArray<z.ZodObject<{
80
- resource: z.ZodString;
81
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
82
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
83
- }, "strip", z.ZodTypeAny, {
84
- resource: string;
85
- matcher: "exact" | "prefix" | "regex";
86
- constraints?: Record<string, any> | undefined;
87
- }, {
88
- resource: string;
89
- matcher: "exact" | "prefix" | "regex";
90
- constraints?: Record<string, any> | undefined;
91
- }>, "many">;
92
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
93
- budget: z.ZodOptional<z.ZodObject<{
94
- unit: z.ZodEnum<["USD", "ops", "points"]>;
95
- cap: z.ZodNumber;
96
- window: z.ZodOptional<z.ZodObject<{
97
- kind: z.ZodEnum<["rolling", "fixed"]>;
98
- durationSec: z.ZodNumber;
99
- }, "strip", z.ZodTypeAny, {
100
- kind: "rolling" | "fixed";
101
- durationSec: number;
102
- }, {
103
- kind: "rolling" | "fixed";
104
- durationSec: number;
105
- }>>;
106
- }, "strip", z.ZodTypeAny, {
107
- unit: "USD" | "ops" | "points";
108
- cap: number;
109
- window?: {
110
- kind: "rolling" | "fixed";
111
- durationSec: number;
112
- } | undefined;
113
- }, {
114
- unit: "USD" | "ops" | "points";
115
- cap: number;
116
- window?: {
117
- kind: "rolling" | "fixed";
118
- durationSec: number;
119
- } | undefined;
120
- }>>;
121
- scopes: z.ZodArray<z.ZodObject<{
122
- resource: z.ZodString;
123
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
124
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
125
- }, "strip", z.ZodTypeAny, {
126
- resource: string;
127
- matcher: "exact" | "prefix" | "regex";
128
- constraints?: Record<string, any> | undefined;
129
- }, {
130
- resource: string;
131
- matcher: "exact" | "prefix" | "regex";
132
- constraints?: Record<string, any> | undefined;
133
- }>, "many">;
134
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
135
- budget: z.ZodOptional<z.ZodObject<{
136
- unit: z.ZodEnum<["USD", "ops", "points"]>;
137
- cap: z.ZodNumber;
138
- window: z.ZodOptional<z.ZodObject<{
139
- kind: z.ZodEnum<["rolling", "fixed"]>;
140
- durationSec: z.ZodNumber;
141
- }, "strip", z.ZodTypeAny, {
142
- kind: "rolling" | "fixed";
143
- durationSec: number;
144
- }, {
145
- kind: "rolling" | "fixed";
146
- durationSec: number;
147
- }>>;
148
- }, "strip", z.ZodTypeAny, {
149
- unit: "USD" | "ops" | "points";
150
- cap: number;
151
- window?: {
152
- kind: "rolling" | "fixed";
153
- durationSec: number;
154
- } | undefined;
155
- }, {
156
- unit: "USD" | "ops" | "points";
157
- cap: number;
158
- window?: {
159
- kind: "rolling" | "fixed";
160
- durationSec: number;
161
- } | undefined;
162
- }>>;
163
- scopes: z.ZodArray<z.ZodObject<{
164
- resource: z.ZodString;
165
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
166
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
167
- }, "strip", z.ZodTypeAny, {
168
- resource: string;
169
- matcher: "exact" | "prefix" | "regex";
170
- constraints?: Record<string, any> | undefined;
171
- }, {
172
- resource: string;
173
- matcher: "exact" | "prefix" | "regex";
174
- constraints?: Record<string, any> | undefined;
175
- }>, "many">;
176
- }, z.ZodTypeAny, "passthrough">>>;
177
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
178
- notBefore: z.ZodOptional<z.ZodNumber>;
179
- notAfter: z.ZodOptional<z.ZodNumber>;
180
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
181
- crisp: z.ZodOptional<z.ZodObject<{
182
- budget: z.ZodOptional<z.ZodObject<{
183
- unit: z.ZodEnum<["USD", "ops", "points"]>;
184
- cap: z.ZodNumber;
185
- window: z.ZodOptional<z.ZodObject<{
186
- kind: z.ZodEnum<["rolling", "fixed"]>;
187
- durationSec: z.ZodNumber;
188
- }, "strip", z.ZodTypeAny, {
189
- kind: "rolling" | "fixed";
190
- durationSec: number;
191
- }, {
192
- kind: "rolling" | "fixed";
193
- durationSec: number;
194
- }>>;
195
- }, "strip", z.ZodTypeAny, {
196
- unit: "USD" | "ops" | "points";
197
- cap: number;
198
- window?: {
199
- kind: "rolling" | "fixed";
200
- durationSec: number;
201
- } | undefined;
202
- }, {
203
- unit: "USD" | "ops" | "points";
204
- cap: number;
205
- window?: {
206
- kind: "rolling" | "fixed";
207
- durationSec: number;
208
- } | undefined;
209
- }>>;
210
- scopes: z.ZodArray<z.ZodObject<{
211
- resource: z.ZodString;
212
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
213
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
214
- }, "strip", z.ZodTypeAny, {
215
- resource: string;
216
- matcher: "exact" | "prefix" | "regex";
217
- constraints?: Record<string, any> | undefined;
218
- }, {
219
- resource: string;
220
- matcher: "exact" | "prefix" | "regex";
221
- constraints?: Record<string, any> | undefined;
222
- }>, "many">;
223
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
224
- budget: z.ZodOptional<z.ZodObject<{
225
- unit: z.ZodEnum<["USD", "ops", "points"]>;
226
- cap: z.ZodNumber;
227
- window: z.ZodOptional<z.ZodObject<{
228
- kind: z.ZodEnum<["rolling", "fixed"]>;
229
- durationSec: z.ZodNumber;
230
- }, "strip", z.ZodTypeAny, {
231
- kind: "rolling" | "fixed";
232
- durationSec: number;
233
- }, {
234
- kind: "rolling" | "fixed";
235
- durationSec: number;
236
- }>>;
237
- }, "strip", z.ZodTypeAny, {
238
- unit: "USD" | "ops" | "points";
239
- cap: number;
240
- window?: {
241
- kind: "rolling" | "fixed";
242
- durationSec: number;
243
- } | undefined;
244
- }, {
245
- unit: "USD" | "ops" | "points";
246
- cap: number;
247
- window?: {
248
- kind: "rolling" | "fixed";
249
- durationSec: number;
250
- } | undefined;
251
- }>>;
252
- scopes: z.ZodArray<z.ZodObject<{
253
- resource: z.ZodString;
254
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
255
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
256
- }, "strip", z.ZodTypeAny, {
257
- resource: string;
258
- matcher: "exact" | "prefix" | "regex";
259
- constraints?: Record<string, any> | undefined;
260
- }, {
261
- resource: string;
262
- matcher: "exact" | "prefix" | "regex";
263
- constraints?: Record<string, any> | undefined;
264
- }>, "many">;
265
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
266
- budget: z.ZodOptional<z.ZodObject<{
267
- unit: z.ZodEnum<["USD", "ops", "points"]>;
268
- cap: z.ZodNumber;
269
- window: z.ZodOptional<z.ZodObject<{
270
- kind: z.ZodEnum<["rolling", "fixed"]>;
271
- durationSec: z.ZodNumber;
272
- }, "strip", z.ZodTypeAny, {
273
- kind: "rolling" | "fixed";
274
- durationSec: number;
275
- }, {
276
- kind: "rolling" | "fixed";
277
- durationSec: number;
278
- }>>;
279
- }, "strip", z.ZodTypeAny, {
280
- unit: "USD" | "ops" | "points";
281
- cap: number;
282
- window?: {
283
- kind: "rolling" | "fixed";
284
- durationSec: number;
285
- } | undefined;
286
- }, {
287
- unit: "USD" | "ops" | "points";
288
- cap: number;
289
- window?: {
290
- kind: "rolling" | "fixed";
291
- durationSec: number;
292
- } | undefined;
293
- }>>;
294
- scopes: z.ZodArray<z.ZodObject<{
295
- resource: z.ZodString;
296
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
297
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
298
- }, "strip", z.ZodTypeAny, {
299
- resource: string;
300
- matcher: "exact" | "prefix" | "regex";
301
- constraints?: Record<string, any> | undefined;
302
- }, {
303
- resource: string;
304
- matcher: "exact" | "prefix" | "regex";
305
- constraints?: Record<string, any> | undefined;
306
- }>, "many">;
307
- }, z.ZodTypeAny, "passthrough">>>;
308
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
309
- notBefore: z.ZodOptional<z.ZodNumber>;
310
- notAfter: z.ZodOptional<z.ZodNumber>;
311
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
312
- crisp: z.ZodOptional<z.ZodObject<{
313
- budget: z.ZodOptional<z.ZodObject<{
314
- unit: z.ZodEnum<["USD", "ops", "points"]>;
315
- cap: z.ZodNumber;
316
- window: z.ZodOptional<z.ZodObject<{
317
- kind: z.ZodEnum<["rolling", "fixed"]>;
318
- durationSec: z.ZodNumber;
319
- }, "strip", z.ZodTypeAny, {
320
- kind: "rolling" | "fixed";
321
- durationSec: number;
322
- }, {
323
- kind: "rolling" | "fixed";
324
- durationSec: number;
325
- }>>;
326
- }, "strip", z.ZodTypeAny, {
327
- unit: "USD" | "ops" | "points";
328
- cap: number;
329
- window?: {
330
- kind: "rolling" | "fixed";
331
- durationSec: number;
332
- } | undefined;
333
- }, {
334
- unit: "USD" | "ops" | "points";
335
- cap: number;
336
- window?: {
337
- kind: "rolling" | "fixed";
338
- durationSec: number;
339
- } | undefined;
340
- }>>;
341
- scopes: z.ZodArray<z.ZodObject<{
342
- resource: z.ZodString;
343
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
344
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
345
- }, "strip", z.ZodTypeAny, {
346
- resource: string;
347
- matcher: "exact" | "prefix" | "regex";
348
- constraints?: Record<string, any> | undefined;
349
- }, {
350
- resource: string;
351
- matcher: "exact" | "prefix" | "regex";
352
- constraints?: Record<string, any> | undefined;
353
- }>, "many">;
354
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
355
- budget: z.ZodOptional<z.ZodObject<{
356
- unit: z.ZodEnum<["USD", "ops", "points"]>;
357
- cap: z.ZodNumber;
358
- window: z.ZodOptional<z.ZodObject<{
359
- kind: z.ZodEnum<["rolling", "fixed"]>;
360
- durationSec: z.ZodNumber;
361
- }, "strip", z.ZodTypeAny, {
362
- kind: "rolling" | "fixed";
363
- durationSec: number;
364
- }, {
365
- kind: "rolling" | "fixed";
366
- durationSec: number;
367
- }>>;
368
- }, "strip", z.ZodTypeAny, {
369
- unit: "USD" | "ops" | "points";
370
- cap: number;
371
- window?: {
372
- kind: "rolling" | "fixed";
373
- durationSec: number;
374
- } | undefined;
375
- }, {
376
- unit: "USD" | "ops" | "points";
377
- cap: number;
378
- window?: {
379
- kind: "rolling" | "fixed";
380
- durationSec: number;
381
- } | undefined;
382
- }>>;
383
- scopes: z.ZodArray<z.ZodObject<{
384
- resource: z.ZodString;
385
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
386
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
387
- }, "strip", z.ZodTypeAny, {
388
- resource: string;
389
- matcher: "exact" | "prefix" | "regex";
390
- constraints?: Record<string, any> | undefined;
391
- }, {
392
- resource: string;
393
- matcher: "exact" | "prefix" | "regex";
394
- constraints?: Record<string, any> | undefined;
395
- }>, "many">;
396
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
397
- budget: z.ZodOptional<z.ZodObject<{
398
- unit: z.ZodEnum<["USD", "ops", "points"]>;
399
- cap: z.ZodNumber;
400
- window: z.ZodOptional<z.ZodObject<{
401
- kind: z.ZodEnum<["rolling", "fixed"]>;
402
- durationSec: z.ZodNumber;
403
- }, "strip", z.ZodTypeAny, {
404
- kind: "rolling" | "fixed";
405
- durationSec: number;
406
- }, {
407
- kind: "rolling" | "fixed";
408
- durationSec: number;
409
- }>>;
410
- }, "strip", z.ZodTypeAny, {
411
- unit: "USD" | "ops" | "points";
412
- cap: number;
413
- window?: {
414
- kind: "rolling" | "fixed";
415
- durationSec: number;
416
- } | undefined;
417
- }, {
418
- unit: "USD" | "ops" | "points";
419
- cap: number;
420
- window?: {
421
- kind: "rolling" | "fixed";
422
- durationSec: number;
423
- } | undefined;
424
- }>>;
425
- scopes: z.ZodArray<z.ZodObject<{
426
- resource: z.ZodString;
427
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
428
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
429
- }, "strip", z.ZodTypeAny, {
430
- resource: string;
431
- matcher: "exact" | "prefix" | "regex";
432
- constraints?: Record<string, any> | undefined;
433
- }, {
434
- resource: string;
435
- matcher: "exact" | "prefix" | "regex";
436
- constraints?: Record<string, any> | undefined;
437
- }>, "many">;
438
- }, z.ZodTypeAny, "passthrough">>>;
439
- }, z.ZodTypeAny, "passthrough">>;
440
- /** Detached JWS signature over canonical delegation document */
441
- signature: z.ZodString;
442
- /** Current status of the delegation */
443
- status: z.ZodEnum<["active", "revoked", "expired"]>;
444
- /** Timestamp when created (milliseconds since epoch) */
445
- createdAt: z.ZodOptional<z.ZodNumber>;
446
- /** Timestamp when revoked (if status is revoked) */
447
- revokedAt: z.ZodOptional<z.ZodNumber>;
448
- /** Optional reason for revocation */
449
- revokedReason: z.ZodOptional<z.ZodString>;
450
- /** Optional metadata */
451
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
452
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
453
- /** Unique identifier for the delegation */
454
- id: z.ZodString;
455
- /** DID of the delegator (issuer, e.g., merchant/user) */
456
- issuerDid: z.ZodString;
457
- /** DID of the delegatee (subject, e.g., agent) */
458
- subjectDid: z.ZodString;
459
- /** Optional controller (user account ID or DID) */
460
- controller: z.ZodOptional<z.ZodString>;
461
- /** ID of the backing Verifiable Credential */
462
- vcId: z.ZodString;
463
- /** Optional parent delegation ID for chain tracking */
464
- parentId: z.ZodOptional<z.ZodString>;
465
- /** CRISP constraints on this delegation */
466
- constraints: z.ZodObject<{
467
- notBefore: z.ZodOptional<z.ZodNumber>;
468
- notAfter: z.ZodOptional<z.ZodNumber>;
469
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
470
- crisp: z.ZodOptional<z.ZodObject<{
471
- budget: z.ZodOptional<z.ZodObject<{
472
- unit: z.ZodEnum<["USD", "ops", "points"]>;
473
- cap: z.ZodNumber;
474
- window: z.ZodOptional<z.ZodObject<{
475
- kind: z.ZodEnum<["rolling", "fixed"]>;
476
- durationSec: z.ZodNumber;
477
- }, "strip", z.ZodTypeAny, {
478
- kind: "rolling" | "fixed";
479
- durationSec: number;
480
- }, {
481
- kind: "rolling" | "fixed";
482
- durationSec: number;
483
- }>>;
484
- }, "strip", z.ZodTypeAny, {
485
- unit: "USD" | "ops" | "points";
486
- cap: number;
487
- window?: {
488
- kind: "rolling" | "fixed";
489
- durationSec: number;
490
- } | undefined;
491
- }, {
492
- unit: "USD" | "ops" | "points";
493
- cap: number;
494
- window?: {
495
- kind: "rolling" | "fixed";
496
- durationSec: number;
497
- } | undefined;
498
- }>>;
499
- scopes: z.ZodArray<z.ZodObject<{
500
- resource: z.ZodString;
501
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
502
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
503
- }, "strip", z.ZodTypeAny, {
504
- resource: string;
505
- matcher: "exact" | "prefix" | "regex";
506
- constraints?: Record<string, any> | undefined;
507
- }, {
508
- resource: string;
509
- matcher: "exact" | "prefix" | "regex";
510
- constraints?: Record<string, any> | undefined;
511
- }>, "many">;
512
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
513
- budget: z.ZodOptional<z.ZodObject<{
514
- unit: z.ZodEnum<["USD", "ops", "points"]>;
515
- cap: z.ZodNumber;
516
- window: z.ZodOptional<z.ZodObject<{
517
- kind: z.ZodEnum<["rolling", "fixed"]>;
518
- durationSec: z.ZodNumber;
519
- }, "strip", z.ZodTypeAny, {
520
- kind: "rolling" | "fixed";
521
- durationSec: number;
522
- }, {
523
- kind: "rolling" | "fixed";
524
- durationSec: number;
525
- }>>;
526
- }, "strip", z.ZodTypeAny, {
527
- unit: "USD" | "ops" | "points";
528
- cap: number;
529
- window?: {
530
- kind: "rolling" | "fixed";
531
- durationSec: number;
532
- } | undefined;
533
- }, {
534
- unit: "USD" | "ops" | "points";
535
- cap: number;
536
- window?: {
537
- kind: "rolling" | "fixed";
538
- durationSec: number;
539
- } | undefined;
540
- }>>;
541
- scopes: z.ZodArray<z.ZodObject<{
542
- resource: z.ZodString;
543
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
544
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
545
- }, "strip", z.ZodTypeAny, {
546
- resource: string;
547
- matcher: "exact" | "prefix" | "regex";
548
- constraints?: Record<string, any> | undefined;
549
- }, {
550
- resource: string;
551
- matcher: "exact" | "prefix" | "regex";
552
- constraints?: Record<string, any> | undefined;
553
- }>, "many">;
554
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
555
- budget: z.ZodOptional<z.ZodObject<{
556
- unit: z.ZodEnum<["USD", "ops", "points"]>;
557
- cap: z.ZodNumber;
558
- window: z.ZodOptional<z.ZodObject<{
559
- kind: z.ZodEnum<["rolling", "fixed"]>;
560
- durationSec: z.ZodNumber;
561
- }, "strip", z.ZodTypeAny, {
562
- kind: "rolling" | "fixed";
563
- durationSec: number;
564
- }, {
565
- kind: "rolling" | "fixed";
566
- durationSec: number;
567
- }>>;
568
- }, "strip", z.ZodTypeAny, {
569
- unit: "USD" | "ops" | "points";
570
- cap: number;
571
- window?: {
572
- kind: "rolling" | "fixed";
573
- durationSec: number;
574
- } | undefined;
575
- }, {
576
- unit: "USD" | "ops" | "points";
577
- cap: number;
578
- window?: {
579
- kind: "rolling" | "fixed";
580
- durationSec: number;
581
- } | undefined;
582
- }>>;
583
- scopes: z.ZodArray<z.ZodObject<{
584
- resource: z.ZodString;
585
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
586
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
587
- }, "strip", z.ZodTypeAny, {
588
- resource: string;
589
- matcher: "exact" | "prefix" | "regex";
590
- constraints?: Record<string, any> | undefined;
591
- }, {
592
- resource: string;
593
- matcher: "exact" | "prefix" | "regex";
594
- constraints?: Record<string, any> | undefined;
595
- }>, "many">;
596
- }, z.ZodTypeAny, "passthrough">>>;
597
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
598
- notBefore: z.ZodOptional<z.ZodNumber>;
599
- notAfter: z.ZodOptional<z.ZodNumber>;
600
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
601
- crisp: z.ZodOptional<z.ZodObject<{
602
- budget: z.ZodOptional<z.ZodObject<{
603
- unit: z.ZodEnum<["USD", "ops", "points"]>;
604
- cap: z.ZodNumber;
605
- window: z.ZodOptional<z.ZodObject<{
606
- kind: z.ZodEnum<["rolling", "fixed"]>;
607
- durationSec: z.ZodNumber;
608
- }, "strip", z.ZodTypeAny, {
609
- kind: "rolling" | "fixed";
610
- durationSec: number;
611
- }, {
612
- kind: "rolling" | "fixed";
613
- durationSec: number;
614
- }>>;
615
- }, "strip", z.ZodTypeAny, {
616
- unit: "USD" | "ops" | "points";
617
- cap: number;
618
- window?: {
619
- kind: "rolling" | "fixed";
620
- durationSec: number;
621
- } | undefined;
622
- }, {
623
- unit: "USD" | "ops" | "points";
624
- cap: number;
625
- window?: {
626
- kind: "rolling" | "fixed";
627
- durationSec: number;
628
- } | undefined;
629
- }>>;
630
- scopes: z.ZodArray<z.ZodObject<{
631
- resource: z.ZodString;
632
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
633
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
634
- }, "strip", z.ZodTypeAny, {
635
- resource: string;
636
- matcher: "exact" | "prefix" | "regex";
637
- constraints?: Record<string, any> | undefined;
638
- }, {
639
- resource: string;
640
- matcher: "exact" | "prefix" | "regex";
641
- constraints?: Record<string, any> | undefined;
642
- }>, "many">;
643
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
644
- budget: z.ZodOptional<z.ZodObject<{
645
- unit: z.ZodEnum<["USD", "ops", "points"]>;
646
- cap: z.ZodNumber;
647
- window: z.ZodOptional<z.ZodObject<{
648
- kind: z.ZodEnum<["rolling", "fixed"]>;
649
- durationSec: z.ZodNumber;
650
- }, "strip", z.ZodTypeAny, {
651
- kind: "rolling" | "fixed";
652
- durationSec: number;
653
- }, {
654
- kind: "rolling" | "fixed";
655
- durationSec: number;
656
- }>>;
657
- }, "strip", z.ZodTypeAny, {
658
- unit: "USD" | "ops" | "points";
659
- cap: number;
660
- window?: {
661
- kind: "rolling" | "fixed";
662
- durationSec: number;
663
- } | undefined;
664
- }, {
665
- unit: "USD" | "ops" | "points";
666
- cap: number;
667
- window?: {
668
- kind: "rolling" | "fixed";
669
- durationSec: number;
670
- } | undefined;
671
- }>>;
672
- scopes: z.ZodArray<z.ZodObject<{
673
- resource: z.ZodString;
674
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
675
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
676
- }, "strip", z.ZodTypeAny, {
677
- resource: string;
678
- matcher: "exact" | "prefix" | "regex";
679
- constraints?: Record<string, any> | undefined;
680
- }, {
681
- resource: string;
682
- matcher: "exact" | "prefix" | "regex";
683
- constraints?: Record<string, any> | undefined;
684
- }>, "many">;
685
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
686
- budget: z.ZodOptional<z.ZodObject<{
687
- unit: z.ZodEnum<["USD", "ops", "points"]>;
688
- cap: z.ZodNumber;
689
- window: z.ZodOptional<z.ZodObject<{
690
- kind: z.ZodEnum<["rolling", "fixed"]>;
691
- durationSec: z.ZodNumber;
692
- }, "strip", z.ZodTypeAny, {
693
- kind: "rolling" | "fixed";
694
- durationSec: number;
695
- }, {
696
- kind: "rolling" | "fixed";
697
- durationSec: number;
698
- }>>;
699
- }, "strip", z.ZodTypeAny, {
700
- unit: "USD" | "ops" | "points";
701
- cap: number;
702
- window?: {
703
- kind: "rolling" | "fixed";
704
- durationSec: number;
705
- } | undefined;
706
- }, {
707
- unit: "USD" | "ops" | "points";
708
- cap: number;
709
- window?: {
710
- kind: "rolling" | "fixed";
711
- durationSec: number;
712
- } | undefined;
713
- }>>;
714
- scopes: z.ZodArray<z.ZodObject<{
715
- resource: z.ZodString;
716
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
717
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
718
- }, "strip", z.ZodTypeAny, {
719
- resource: string;
720
- matcher: "exact" | "prefix" | "regex";
721
- constraints?: Record<string, any> | undefined;
722
- }, {
723
- resource: string;
724
- matcher: "exact" | "prefix" | "regex";
725
- constraints?: Record<string, any> | undefined;
726
- }>, "many">;
727
- }, z.ZodTypeAny, "passthrough">>>;
728
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
729
- notBefore: z.ZodOptional<z.ZodNumber>;
730
- notAfter: z.ZodOptional<z.ZodNumber>;
731
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
732
- crisp: z.ZodOptional<z.ZodObject<{
733
- budget: z.ZodOptional<z.ZodObject<{
734
- unit: z.ZodEnum<["USD", "ops", "points"]>;
735
- cap: z.ZodNumber;
736
- window: z.ZodOptional<z.ZodObject<{
737
- kind: z.ZodEnum<["rolling", "fixed"]>;
738
- durationSec: z.ZodNumber;
739
- }, "strip", z.ZodTypeAny, {
740
- kind: "rolling" | "fixed";
741
- durationSec: number;
742
- }, {
743
- kind: "rolling" | "fixed";
744
- durationSec: number;
745
- }>>;
746
- }, "strip", z.ZodTypeAny, {
747
- unit: "USD" | "ops" | "points";
748
- cap: number;
749
- window?: {
750
- kind: "rolling" | "fixed";
751
- durationSec: number;
752
- } | undefined;
753
- }, {
754
- unit: "USD" | "ops" | "points";
755
- cap: number;
756
- window?: {
757
- kind: "rolling" | "fixed";
758
- durationSec: number;
759
- } | undefined;
760
- }>>;
761
- scopes: z.ZodArray<z.ZodObject<{
762
- resource: z.ZodString;
763
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
764
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
765
- }, "strip", z.ZodTypeAny, {
766
- resource: string;
767
- matcher: "exact" | "prefix" | "regex";
768
- constraints?: Record<string, any> | undefined;
769
- }, {
770
- resource: string;
771
- matcher: "exact" | "prefix" | "regex";
772
- constraints?: Record<string, any> | undefined;
773
- }>, "many">;
774
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
775
- budget: z.ZodOptional<z.ZodObject<{
776
- unit: z.ZodEnum<["USD", "ops", "points"]>;
777
- cap: z.ZodNumber;
778
- window: z.ZodOptional<z.ZodObject<{
779
- kind: z.ZodEnum<["rolling", "fixed"]>;
780
- durationSec: z.ZodNumber;
781
- }, "strip", z.ZodTypeAny, {
782
- kind: "rolling" | "fixed";
783
- durationSec: number;
784
- }, {
785
- kind: "rolling" | "fixed";
786
- durationSec: number;
787
- }>>;
788
- }, "strip", z.ZodTypeAny, {
789
- unit: "USD" | "ops" | "points";
790
- cap: number;
791
- window?: {
792
- kind: "rolling" | "fixed";
793
- durationSec: number;
794
- } | undefined;
795
- }, {
796
- unit: "USD" | "ops" | "points";
797
- cap: number;
798
- window?: {
799
- kind: "rolling" | "fixed";
800
- durationSec: number;
801
- } | undefined;
802
- }>>;
803
- scopes: z.ZodArray<z.ZodObject<{
804
- resource: z.ZodString;
805
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
806
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
807
- }, "strip", z.ZodTypeAny, {
808
- resource: string;
809
- matcher: "exact" | "prefix" | "regex";
810
- constraints?: Record<string, any> | undefined;
811
- }, {
812
- resource: string;
813
- matcher: "exact" | "prefix" | "regex";
814
- constraints?: Record<string, any> | undefined;
815
- }>, "many">;
816
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
817
- budget: z.ZodOptional<z.ZodObject<{
818
- unit: z.ZodEnum<["USD", "ops", "points"]>;
819
- cap: z.ZodNumber;
820
- window: z.ZodOptional<z.ZodObject<{
821
- kind: z.ZodEnum<["rolling", "fixed"]>;
822
- durationSec: z.ZodNumber;
823
- }, "strip", z.ZodTypeAny, {
824
- kind: "rolling" | "fixed";
825
- durationSec: number;
826
- }, {
827
- kind: "rolling" | "fixed";
828
- durationSec: number;
829
- }>>;
830
- }, "strip", z.ZodTypeAny, {
831
- unit: "USD" | "ops" | "points";
832
- cap: number;
833
- window?: {
834
- kind: "rolling" | "fixed";
835
- durationSec: number;
836
- } | undefined;
837
- }, {
838
- unit: "USD" | "ops" | "points";
839
- cap: number;
840
- window?: {
841
- kind: "rolling" | "fixed";
842
- durationSec: number;
843
- } | undefined;
844
- }>>;
845
- scopes: z.ZodArray<z.ZodObject<{
846
- resource: z.ZodString;
847
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
848
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
849
- }, "strip", z.ZodTypeAny, {
850
- resource: string;
851
- matcher: "exact" | "prefix" | "regex";
852
- constraints?: Record<string, any> | undefined;
853
- }, {
854
- resource: string;
855
- matcher: "exact" | "prefix" | "regex";
856
- constraints?: Record<string, any> | undefined;
857
- }>, "many">;
858
- }, z.ZodTypeAny, "passthrough">>>;
859
- }, z.ZodTypeAny, "passthrough">>;
860
- /** Detached JWS signature over canonical delegation document */
861
- signature: z.ZodString;
862
- /** Current status of the delegation */
863
- status: z.ZodEnum<["active", "revoked", "expired"]>;
864
- /** Timestamp when created (milliseconds since epoch) */
865
- createdAt: z.ZodOptional<z.ZodNumber>;
866
- /** Timestamp when revoked (if status is revoked) */
867
- revokedAt: z.ZodOptional<z.ZodNumber>;
868
- /** Optional reason for revocation */
869
- revokedReason: z.ZodOptional<z.ZodString>;
870
- /** Optional metadata */
871
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
872
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
873
- /** Unique identifier for the delegation */
874
- id: z.ZodString;
875
- /** DID of the delegator (issuer, e.g., merchant/user) */
876
- issuerDid: z.ZodString;
877
- /** DID of the delegatee (subject, e.g., agent) */
878
- subjectDid: z.ZodString;
879
- /** Optional controller (user account ID or DID) */
880
- controller: z.ZodOptional<z.ZodString>;
881
- /** ID of the backing Verifiable Credential */
882
- vcId: z.ZodString;
883
- /** Optional parent delegation ID for chain tracking */
884
- parentId: z.ZodOptional<z.ZodString>;
885
- /** CRISP constraints on this delegation */
886
- constraints: z.ZodObject<{
887
- notBefore: z.ZodOptional<z.ZodNumber>;
888
- notAfter: z.ZodOptional<z.ZodNumber>;
889
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
890
- crisp: z.ZodOptional<z.ZodObject<{
891
- budget: z.ZodOptional<z.ZodObject<{
892
- unit: z.ZodEnum<["USD", "ops", "points"]>;
893
- cap: z.ZodNumber;
894
- window: z.ZodOptional<z.ZodObject<{
895
- kind: z.ZodEnum<["rolling", "fixed"]>;
896
- durationSec: z.ZodNumber;
897
- }, "strip", z.ZodTypeAny, {
898
- kind: "rolling" | "fixed";
899
- durationSec: number;
900
- }, {
901
- kind: "rolling" | "fixed";
902
- durationSec: number;
903
- }>>;
904
- }, "strip", z.ZodTypeAny, {
905
- unit: "USD" | "ops" | "points";
906
- cap: number;
907
- window?: {
908
- kind: "rolling" | "fixed";
909
- durationSec: number;
910
- } | undefined;
911
- }, {
912
- unit: "USD" | "ops" | "points";
913
- cap: number;
914
- window?: {
915
- kind: "rolling" | "fixed";
916
- durationSec: number;
917
- } | undefined;
918
- }>>;
919
- scopes: z.ZodArray<z.ZodObject<{
920
- resource: z.ZodString;
921
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
922
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
923
- }, "strip", z.ZodTypeAny, {
924
- resource: string;
925
- matcher: "exact" | "prefix" | "regex";
926
- constraints?: Record<string, any> | undefined;
927
- }, {
928
- resource: string;
929
- matcher: "exact" | "prefix" | "regex";
930
- constraints?: Record<string, any> | undefined;
931
- }>, "many">;
932
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
933
- budget: z.ZodOptional<z.ZodObject<{
934
- unit: z.ZodEnum<["USD", "ops", "points"]>;
935
- cap: z.ZodNumber;
936
- window: z.ZodOptional<z.ZodObject<{
937
- kind: z.ZodEnum<["rolling", "fixed"]>;
938
- durationSec: z.ZodNumber;
939
- }, "strip", z.ZodTypeAny, {
940
- kind: "rolling" | "fixed";
941
- durationSec: number;
942
- }, {
943
- kind: "rolling" | "fixed";
944
- durationSec: number;
945
- }>>;
946
- }, "strip", z.ZodTypeAny, {
947
- unit: "USD" | "ops" | "points";
948
- cap: number;
949
- window?: {
950
- kind: "rolling" | "fixed";
951
- durationSec: number;
952
- } | undefined;
953
- }, {
954
- unit: "USD" | "ops" | "points";
955
- cap: number;
956
- window?: {
957
- kind: "rolling" | "fixed";
958
- durationSec: number;
959
- } | undefined;
960
- }>>;
961
- scopes: z.ZodArray<z.ZodObject<{
962
- resource: z.ZodString;
963
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
964
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
965
- }, "strip", z.ZodTypeAny, {
966
- resource: string;
967
- matcher: "exact" | "prefix" | "regex";
968
- constraints?: Record<string, any> | undefined;
969
- }, {
970
- resource: string;
971
- matcher: "exact" | "prefix" | "regex";
972
- constraints?: Record<string, any> | undefined;
973
- }>, "many">;
974
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
975
- budget: z.ZodOptional<z.ZodObject<{
976
- unit: z.ZodEnum<["USD", "ops", "points"]>;
977
- cap: z.ZodNumber;
978
- window: z.ZodOptional<z.ZodObject<{
979
- kind: z.ZodEnum<["rolling", "fixed"]>;
980
- durationSec: z.ZodNumber;
981
- }, "strip", z.ZodTypeAny, {
982
- kind: "rolling" | "fixed";
983
- durationSec: number;
984
- }, {
985
- kind: "rolling" | "fixed";
986
- durationSec: number;
987
- }>>;
988
- }, "strip", z.ZodTypeAny, {
989
- unit: "USD" | "ops" | "points";
990
- cap: number;
991
- window?: {
992
- kind: "rolling" | "fixed";
993
- durationSec: number;
994
- } | undefined;
995
- }, {
996
- unit: "USD" | "ops" | "points";
997
- cap: number;
998
- window?: {
999
- kind: "rolling" | "fixed";
1000
- durationSec: number;
1001
- } | undefined;
1002
- }>>;
1003
- scopes: z.ZodArray<z.ZodObject<{
1004
- resource: z.ZodString;
1005
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1006
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1007
- }, "strip", z.ZodTypeAny, {
1008
- resource: string;
1009
- matcher: "exact" | "prefix" | "regex";
1010
- constraints?: Record<string, any> | undefined;
1011
- }, {
1012
- resource: string;
1013
- matcher: "exact" | "prefix" | "regex";
1014
- constraints?: Record<string, any> | undefined;
1015
- }>, "many">;
1016
- }, z.ZodTypeAny, "passthrough">>>;
1017
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1018
- notBefore: z.ZodOptional<z.ZodNumber>;
1019
- notAfter: z.ZodOptional<z.ZodNumber>;
1020
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1021
- crisp: z.ZodOptional<z.ZodObject<{
1022
- budget: z.ZodOptional<z.ZodObject<{
1023
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1024
- cap: z.ZodNumber;
1025
- window: z.ZodOptional<z.ZodObject<{
1026
- kind: z.ZodEnum<["rolling", "fixed"]>;
1027
- durationSec: z.ZodNumber;
1028
- }, "strip", z.ZodTypeAny, {
1029
- kind: "rolling" | "fixed";
1030
- durationSec: number;
1031
- }, {
1032
- kind: "rolling" | "fixed";
1033
- durationSec: number;
1034
- }>>;
1035
- }, "strip", z.ZodTypeAny, {
1036
- unit: "USD" | "ops" | "points";
1037
- cap: number;
1038
- window?: {
1039
- kind: "rolling" | "fixed";
1040
- durationSec: number;
1041
- } | undefined;
1042
- }, {
1043
- unit: "USD" | "ops" | "points";
1044
- cap: number;
1045
- window?: {
1046
- kind: "rolling" | "fixed";
1047
- durationSec: number;
1048
- } | undefined;
1049
- }>>;
1050
- scopes: z.ZodArray<z.ZodObject<{
1051
- resource: z.ZodString;
1052
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1053
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1054
- }, "strip", z.ZodTypeAny, {
1055
- resource: string;
1056
- matcher: "exact" | "prefix" | "regex";
1057
- constraints?: Record<string, any> | undefined;
1058
- }, {
1059
- resource: string;
1060
- matcher: "exact" | "prefix" | "regex";
1061
- constraints?: Record<string, any> | undefined;
1062
- }>, "many">;
1063
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1064
- budget: z.ZodOptional<z.ZodObject<{
1065
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1066
- cap: z.ZodNumber;
1067
- window: z.ZodOptional<z.ZodObject<{
1068
- kind: z.ZodEnum<["rolling", "fixed"]>;
1069
- durationSec: z.ZodNumber;
1070
- }, "strip", z.ZodTypeAny, {
1071
- kind: "rolling" | "fixed";
1072
- durationSec: number;
1073
- }, {
1074
- kind: "rolling" | "fixed";
1075
- durationSec: number;
1076
- }>>;
1077
- }, "strip", z.ZodTypeAny, {
1078
- unit: "USD" | "ops" | "points";
1079
- cap: number;
1080
- window?: {
1081
- kind: "rolling" | "fixed";
1082
- durationSec: number;
1083
- } | undefined;
1084
- }, {
1085
- unit: "USD" | "ops" | "points";
1086
- cap: number;
1087
- window?: {
1088
- kind: "rolling" | "fixed";
1089
- durationSec: number;
1090
- } | undefined;
1091
- }>>;
1092
- scopes: z.ZodArray<z.ZodObject<{
1093
- resource: z.ZodString;
1094
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1095
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1096
- }, "strip", z.ZodTypeAny, {
1097
- resource: string;
1098
- matcher: "exact" | "prefix" | "regex";
1099
- constraints?: Record<string, any> | undefined;
1100
- }, {
1101
- resource: string;
1102
- matcher: "exact" | "prefix" | "regex";
1103
- constraints?: Record<string, any> | undefined;
1104
- }>, "many">;
1105
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1106
- budget: z.ZodOptional<z.ZodObject<{
1107
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1108
- cap: z.ZodNumber;
1109
- window: z.ZodOptional<z.ZodObject<{
1110
- kind: z.ZodEnum<["rolling", "fixed"]>;
1111
- durationSec: z.ZodNumber;
1112
- }, "strip", z.ZodTypeAny, {
1113
- kind: "rolling" | "fixed";
1114
- durationSec: number;
1115
- }, {
1116
- kind: "rolling" | "fixed";
1117
- durationSec: number;
1118
- }>>;
1119
- }, "strip", z.ZodTypeAny, {
1120
- unit: "USD" | "ops" | "points";
1121
- cap: number;
1122
- window?: {
1123
- kind: "rolling" | "fixed";
1124
- durationSec: number;
1125
- } | undefined;
1126
- }, {
1127
- unit: "USD" | "ops" | "points";
1128
- cap: number;
1129
- window?: {
1130
- kind: "rolling" | "fixed";
1131
- durationSec: number;
1132
- } | undefined;
1133
- }>>;
1134
- scopes: z.ZodArray<z.ZodObject<{
1135
- resource: z.ZodString;
1136
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1137
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1138
- }, "strip", z.ZodTypeAny, {
1139
- resource: string;
1140
- matcher: "exact" | "prefix" | "regex";
1141
- constraints?: Record<string, any> | undefined;
1142
- }, {
1143
- resource: string;
1144
- matcher: "exact" | "prefix" | "regex";
1145
- constraints?: Record<string, any> | undefined;
1146
- }>, "many">;
1147
- }, z.ZodTypeAny, "passthrough">>>;
1148
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1149
- notBefore: z.ZodOptional<z.ZodNumber>;
1150
- notAfter: z.ZodOptional<z.ZodNumber>;
1151
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1152
- crisp: z.ZodOptional<z.ZodObject<{
1153
- budget: z.ZodOptional<z.ZodObject<{
1154
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1155
- cap: z.ZodNumber;
1156
- window: z.ZodOptional<z.ZodObject<{
1157
- kind: z.ZodEnum<["rolling", "fixed"]>;
1158
- durationSec: z.ZodNumber;
1159
- }, "strip", z.ZodTypeAny, {
1160
- kind: "rolling" | "fixed";
1161
- durationSec: number;
1162
- }, {
1163
- kind: "rolling" | "fixed";
1164
- durationSec: number;
1165
- }>>;
1166
- }, "strip", z.ZodTypeAny, {
1167
- unit: "USD" | "ops" | "points";
1168
- cap: number;
1169
- window?: {
1170
- kind: "rolling" | "fixed";
1171
- durationSec: number;
1172
- } | undefined;
1173
- }, {
1174
- unit: "USD" | "ops" | "points";
1175
- cap: number;
1176
- window?: {
1177
- kind: "rolling" | "fixed";
1178
- durationSec: number;
1179
- } | undefined;
1180
- }>>;
1181
- scopes: z.ZodArray<z.ZodObject<{
1182
- resource: z.ZodString;
1183
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1184
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1185
- }, "strip", z.ZodTypeAny, {
1186
- resource: string;
1187
- matcher: "exact" | "prefix" | "regex";
1188
- constraints?: Record<string, any> | undefined;
1189
- }, {
1190
- resource: string;
1191
- matcher: "exact" | "prefix" | "regex";
1192
- constraints?: Record<string, any> | undefined;
1193
- }>, "many">;
1194
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1195
- budget: z.ZodOptional<z.ZodObject<{
1196
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1197
- cap: z.ZodNumber;
1198
- window: z.ZodOptional<z.ZodObject<{
1199
- kind: z.ZodEnum<["rolling", "fixed"]>;
1200
- durationSec: z.ZodNumber;
1201
- }, "strip", z.ZodTypeAny, {
1202
- kind: "rolling" | "fixed";
1203
- durationSec: number;
1204
- }, {
1205
- kind: "rolling" | "fixed";
1206
- durationSec: number;
1207
- }>>;
1208
- }, "strip", z.ZodTypeAny, {
1209
- unit: "USD" | "ops" | "points";
1210
- cap: number;
1211
- window?: {
1212
- kind: "rolling" | "fixed";
1213
- durationSec: number;
1214
- } | undefined;
1215
- }, {
1216
- unit: "USD" | "ops" | "points";
1217
- cap: number;
1218
- window?: {
1219
- kind: "rolling" | "fixed";
1220
- durationSec: number;
1221
- } | undefined;
1222
- }>>;
1223
- scopes: z.ZodArray<z.ZodObject<{
1224
- resource: z.ZodString;
1225
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1226
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1227
- }, "strip", z.ZodTypeAny, {
1228
- resource: string;
1229
- matcher: "exact" | "prefix" | "regex";
1230
- constraints?: Record<string, any> | undefined;
1231
- }, {
1232
- resource: string;
1233
- matcher: "exact" | "prefix" | "regex";
1234
- constraints?: Record<string, any> | undefined;
1235
- }>, "many">;
1236
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1237
- budget: z.ZodOptional<z.ZodObject<{
1238
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1239
- cap: z.ZodNumber;
1240
- window: z.ZodOptional<z.ZodObject<{
1241
- kind: z.ZodEnum<["rolling", "fixed"]>;
1242
- durationSec: z.ZodNumber;
1243
- }, "strip", z.ZodTypeAny, {
1244
- kind: "rolling" | "fixed";
1245
- durationSec: number;
1246
- }, {
1247
- kind: "rolling" | "fixed";
1248
- durationSec: number;
1249
- }>>;
1250
- }, "strip", z.ZodTypeAny, {
1251
- unit: "USD" | "ops" | "points";
1252
- cap: number;
1253
- window?: {
1254
- kind: "rolling" | "fixed";
1255
- durationSec: number;
1256
- } | undefined;
1257
- }, {
1258
- unit: "USD" | "ops" | "points";
1259
- cap: number;
1260
- window?: {
1261
- kind: "rolling" | "fixed";
1262
- durationSec: number;
1263
- } | undefined;
1264
- }>>;
1265
- scopes: z.ZodArray<z.ZodObject<{
1266
- resource: z.ZodString;
1267
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1268
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1269
- }, "strip", z.ZodTypeAny, {
1270
- resource: string;
1271
- matcher: "exact" | "prefix" | "regex";
1272
- constraints?: Record<string, any> | undefined;
1273
- }, {
1274
- resource: string;
1275
- matcher: "exact" | "prefix" | "regex";
1276
- constraints?: Record<string, any> | undefined;
1277
- }>, "many">;
1278
- }, z.ZodTypeAny, "passthrough">>>;
1279
- }, z.ZodTypeAny, "passthrough">>;
1280
- /** Detached JWS signature over canonical delegation document */
1281
- signature: z.ZodString;
1282
- /** Current status of the delegation */
1283
- status: z.ZodEnum<["active", "revoked", "expired"]>;
1284
- /** Timestamp when created (milliseconds since epoch) */
1285
- createdAt: z.ZodOptional<z.ZodNumber>;
1286
- /** Timestamp when revoked (if status is revoked) */
1287
- revokedAt: z.ZodOptional<z.ZodNumber>;
1288
- /** Optional reason for revocation */
1289
- revokedReason: z.ZodOptional<z.ZodString>;
1290
- /** Optional metadata */
1291
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1292
- }, z.ZodTypeAny, "passthrough">>;
1293
- export type DelegationRecord = z.infer<typeof DelegationRecordSchema>;
1294
- /**
1295
- * Delegation Chain Entry
1296
- *
1297
- * Represents a single link in a delegation chain
1298
- */
1299
- export declare const DelegationChainEntrySchema: z.ZodObject<{
1300
- /** Delegation ID */
1301
- delegationId: z.ZodString;
1302
- /** Issuer DID */
1303
- issuerDid: z.ZodString;
1304
- /** Subject DID */
1305
- subjectDid: z.ZodString;
1306
- /** VC ID */
1307
- vcId: z.ZodString;
1308
- /** Depth in chain (0 = root) */
1309
- depth: z.ZodNumber;
1310
- /** Constraints */
1311
- constraints: z.ZodObject<{
1312
- notBefore: z.ZodOptional<z.ZodNumber>;
1313
- notAfter: z.ZodOptional<z.ZodNumber>;
1314
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1315
- crisp: z.ZodOptional<z.ZodObject<{
1316
- budget: z.ZodOptional<z.ZodObject<{
1317
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1318
- cap: z.ZodNumber;
1319
- window: z.ZodOptional<z.ZodObject<{
1320
- kind: z.ZodEnum<["rolling", "fixed"]>;
1321
- durationSec: z.ZodNumber;
1322
- }, "strip", z.ZodTypeAny, {
1323
- kind: "rolling" | "fixed";
1324
- durationSec: number;
1325
- }, {
1326
- kind: "rolling" | "fixed";
1327
- durationSec: number;
1328
- }>>;
1329
- }, "strip", z.ZodTypeAny, {
1330
- unit: "USD" | "ops" | "points";
1331
- cap: number;
1332
- window?: {
1333
- kind: "rolling" | "fixed";
1334
- durationSec: number;
1335
- } | undefined;
1336
- }, {
1337
- unit: "USD" | "ops" | "points";
1338
- cap: number;
1339
- window?: {
1340
- kind: "rolling" | "fixed";
1341
- durationSec: number;
1342
- } | undefined;
1343
- }>>;
1344
- scopes: z.ZodArray<z.ZodObject<{
1345
- resource: z.ZodString;
1346
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1347
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1348
- }, "strip", z.ZodTypeAny, {
1349
- resource: string;
1350
- matcher: "exact" | "prefix" | "regex";
1351
- constraints?: Record<string, any> | undefined;
1352
- }, {
1353
- resource: string;
1354
- matcher: "exact" | "prefix" | "regex";
1355
- constraints?: Record<string, any> | undefined;
1356
- }>, "many">;
1357
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1358
- budget: z.ZodOptional<z.ZodObject<{
1359
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1360
- cap: z.ZodNumber;
1361
- window: z.ZodOptional<z.ZodObject<{
1362
- kind: z.ZodEnum<["rolling", "fixed"]>;
1363
- durationSec: z.ZodNumber;
1364
- }, "strip", z.ZodTypeAny, {
1365
- kind: "rolling" | "fixed";
1366
- durationSec: number;
1367
- }, {
1368
- kind: "rolling" | "fixed";
1369
- durationSec: number;
1370
- }>>;
1371
- }, "strip", z.ZodTypeAny, {
1372
- unit: "USD" | "ops" | "points";
1373
- cap: number;
1374
- window?: {
1375
- kind: "rolling" | "fixed";
1376
- durationSec: number;
1377
- } | undefined;
1378
- }, {
1379
- unit: "USD" | "ops" | "points";
1380
- cap: number;
1381
- window?: {
1382
- kind: "rolling" | "fixed";
1383
- durationSec: number;
1384
- } | undefined;
1385
- }>>;
1386
- scopes: z.ZodArray<z.ZodObject<{
1387
- resource: z.ZodString;
1388
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1389
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1390
- }, "strip", z.ZodTypeAny, {
1391
- resource: string;
1392
- matcher: "exact" | "prefix" | "regex";
1393
- constraints?: Record<string, any> | undefined;
1394
- }, {
1395
- resource: string;
1396
- matcher: "exact" | "prefix" | "regex";
1397
- constraints?: Record<string, any> | undefined;
1398
- }>, "many">;
1399
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1400
- budget: z.ZodOptional<z.ZodObject<{
1401
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1402
- cap: z.ZodNumber;
1403
- window: z.ZodOptional<z.ZodObject<{
1404
- kind: z.ZodEnum<["rolling", "fixed"]>;
1405
- durationSec: z.ZodNumber;
1406
- }, "strip", z.ZodTypeAny, {
1407
- kind: "rolling" | "fixed";
1408
- durationSec: number;
1409
- }, {
1410
- kind: "rolling" | "fixed";
1411
- durationSec: number;
1412
- }>>;
1413
- }, "strip", z.ZodTypeAny, {
1414
- unit: "USD" | "ops" | "points";
1415
- cap: number;
1416
- window?: {
1417
- kind: "rolling" | "fixed";
1418
- durationSec: number;
1419
- } | undefined;
1420
- }, {
1421
- unit: "USD" | "ops" | "points";
1422
- cap: number;
1423
- window?: {
1424
- kind: "rolling" | "fixed";
1425
- durationSec: number;
1426
- } | undefined;
1427
- }>>;
1428
- scopes: z.ZodArray<z.ZodObject<{
1429
- resource: z.ZodString;
1430
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1431
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1432
- }, "strip", z.ZodTypeAny, {
1433
- resource: string;
1434
- matcher: "exact" | "prefix" | "regex";
1435
- constraints?: Record<string, any> | undefined;
1436
- }, {
1437
- resource: string;
1438
- matcher: "exact" | "prefix" | "regex";
1439
- constraints?: Record<string, any> | undefined;
1440
- }>, "many">;
1441
- }, z.ZodTypeAny, "passthrough">>>;
1442
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1443
- notBefore: z.ZodOptional<z.ZodNumber>;
1444
- notAfter: z.ZodOptional<z.ZodNumber>;
1445
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1446
- crisp: z.ZodOptional<z.ZodObject<{
1447
- budget: z.ZodOptional<z.ZodObject<{
1448
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1449
- cap: z.ZodNumber;
1450
- window: z.ZodOptional<z.ZodObject<{
1451
- kind: z.ZodEnum<["rolling", "fixed"]>;
1452
- durationSec: z.ZodNumber;
1453
- }, "strip", z.ZodTypeAny, {
1454
- kind: "rolling" | "fixed";
1455
- durationSec: number;
1456
- }, {
1457
- kind: "rolling" | "fixed";
1458
- durationSec: number;
1459
- }>>;
1460
- }, "strip", z.ZodTypeAny, {
1461
- unit: "USD" | "ops" | "points";
1462
- cap: number;
1463
- window?: {
1464
- kind: "rolling" | "fixed";
1465
- durationSec: number;
1466
- } | undefined;
1467
- }, {
1468
- unit: "USD" | "ops" | "points";
1469
- cap: number;
1470
- window?: {
1471
- kind: "rolling" | "fixed";
1472
- durationSec: number;
1473
- } | undefined;
1474
- }>>;
1475
- scopes: z.ZodArray<z.ZodObject<{
1476
- resource: z.ZodString;
1477
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1478
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1479
- }, "strip", z.ZodTypeAny, {
1480
- resource: string;
1481
- matcher: "exact" | "prefix" | "regex";
1482
- constraints?: Record<string, any> | undefined;
1483
- }, {
1484
- resource: string;
1485
- matcher: "exact" | "prefix" | "regex";
1486
- constraints?: Record<string, any> | undefined;
1487
- }>, "many">;
1488
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1489
- budget: z.ZodOptional<z.ZodObject<{
1490
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1491
- cap: z.ZodNumber;
1492
- window: z.ZodOptional<z.ZodObject<{
1493
- kind: z.ZodEnum<["rolling", "fixed"]>;
1494
- durationSec: z.ZodNumber;
1495
- }, "strip", z.ZodTypeAny, {
1496
- kind: "rolling" | "fixed";
1497
- durationSec: number;
1498
- }, {
1499
- kind: "rolling" | "fixed";
1500
- durationSec: number;
1501
- }>>;
1502
- }, "strip", z.ZodTypeAny, {
1503
- unit: "USD" | "ops" | "points";
1504
- cap: number;
1505
- window?: {
1506
- kind: "rolling" | "fixed";
1507
- durationSec: number;
1508
- } | undefined;
1509
- }, {
1510
- unit: "USD" | "ops" | "points";
1511
- cap: number;
1512
- window?: {
1513
- kind: "rolling" | "fixed";
1514
- durationSec: number;
1515
- } | undefined;
1516
- }>>;
1517
- scopes: z.ZodArray<z.ZodObject<{
1518
- resource: z.ZodString;
1519
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1520
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1521
- }, "strip", z.ZodTypeAny, {
1522
- resource: string;
1523
- matcher: "exact" | "prefix" | "regex";
1524
- constraints?: Record<string, any> | undefined;
1525
- }, {
1526
- resource: string;
1527
- matcher: "exact" | "prefix" | "regex";
1528
- constraints?: Record<string, any> | undefined;
1529
- }>, "many">;
1530
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1531
- budget: z.ZodOptional<z.ZodObject<{
1532
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1533
- cap: z.ZodNumber;
1534
- window: z.ZodOptional<z.ZodObject<{
1535
- kind: z.ZodEnum<["rolling", "fixed"]>;
1536
- durationSec: z.ZodNumber;
1537
- }, "strip", z.ZodTypeAny, {
1538
- kind: "rolling" | "fixed";
1539
- durationSec: number;
1540
- }, {
1541
- kind: "rolling" | "fixed";
1542
- durationSec: number;
1543
- }>>;
1544
- }, "strip", z.ZodTypeAny, {
1545
- unit: "USD" | "ops" | "points";
1546
- cap: number;
1547
- window?: {
1548
- kind: "rolling" | "fixed";
1549
- durationSec: number;
1550
- } | undefined;
1551
- }, {
1552
- unit: "USD" | "ops" | "points";
1553
- cap: number;
1554
- window?: {
1555
- kind: "rolling" | "fixed";
1556
- durationSec: number;
1557
- } | undefined;
1558
- }>>;
1559
- scopes: z.ZodArray<z.ZodObject<{
1560
- resource: z.ZodString;
1561
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1562
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1563
- }, "strip", z.ZodTypeAny, {
1564
- resource: string;
1565
- matcher: "exact" | "prefix" | "regex";
1566
- constraints?: Record<string, any> | undefined;
1567
- }, {
1568
- resource: string;
1569
- matcher: "exact" | "prefix" | "regex";
1570
- constraints?: Record<string, any> | undefined;
1571
- }>, "many">;
1572
- }, z.ZodTypeAny, "passthrough">>>;
1573
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1574
- notBefore: z.ZodOptional<z.ZodNumber>;
1575
- notAfter: z.ZodOptional<z.ZodNumber>;
1576
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1577
- crisp: z.ZodOptional<z.ZodObject<{
1578
- budget: z.ZodOptional<z.ZodObject<{
1579
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1580
- cap: z.ZodNumber;
1581
- window: z.ZodOptional<z.ZodObject<{
1582
- kind: z.ZodEnum<["rolling", "fixed"]>;
1583
- durationSec: z.ZodNumber;
1584
- }, "strip", z.ZodTypeAny, {
1585
- kind: "rolling" | "fixed";
1586
- durationSec: number;
1587
- }, {
1588
- kind: "rolling" | "fixed";
1589
- durationSec: number;
1590
- }>>;
1591
- }, "strip", z.ZodTypeAny, {
1592
- unit: "USD" | "ops" | "points";
1593
- cap: number;
1594
- window?: {
1595
- kind: "rolling" | "fixed";
1596
- durationSec: number;
1597
- } | undefined;
1598
- }, {
1599
- unit: "USD" | "ops" | "points";
1600
- cap: number;
1601
- window?: {
1602
- kind: "rolling" | "fixed";
1603
- durationSec: number;
1604
- } | undefined;
1605
- }>>;
1606
- scopes: z.ZodArray<z.ZodObject<{
1607
- resource: z.ZodString;
1608
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1609
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1610
- }, "strip", z.ZodTypeAny, {
1611
- resource: string;
1612
- matcher: "exact" | "prefix" | "regex";
1613
- constraints?: Record<string, any> | undefined;
1614
- }, {
1615
- resource: string;
1616
- matcher: "exact" | "prefix" | "regex";
1617
- constraints?: Record<string, any> | undefined;
1618
- }>, "many">;
1619
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1620
- budget: z.ZodOptional<z.ZodObject<{
1621
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1622
- cap: z.ZodNumber;
1623
- window: z.ZodOptional<z.ZodObject<{
1624
- kind: z.ZodEnum<["rolling", "fixed"]>;
1625
- durationSec: z.ZodNumber;
1626
- }, "strip", z.ZodTypeAny, {
1627
- kind: "rolling" | "fixed";
1628
- durationSec: number;
1629
- }, {
1630
- kind: "rolling" | "fixed";
1631
- durationSec: number;
1632
- }>>;
1633
- }, "strip", z.ZodTypeAny, {
1634
- unit: "USD" | "ops" | "points";
1635
- cap: number;
1636
- window?: {
1637
- kind: "rolling" | "fixed";
1638
- durationSec: number;
1639
- } | undefined;
1640
- }, {
1641
- unit: "USD" | "ops" | "points";
1642
- cap: number;
1643
- window?: {
1644
- kind: "rolling" | "fixed";
1645
- durationSec: number;
1646
- } | undefined;
1647
- }>>;
1648
- scopes: z.ZodArray<z.ZodObject<{
1649
- resource: z.ZodString;
1650
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1651
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1652
- }, "strip", z.ZodTypeAny, {
1653
- resource: string;
1654
- matcher: "exact" | "prefix" | "regex";
1655
- constraints?: Record<string, any> | undefined;
1656
- }, {
1657
- resource: string;
1658
- matcher: "exact" | "prefix" | "regex";
1659
- constraints?: Record<string, any> | undefined;
1660
- }>, "many">;
1661
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1662
- budget: z.ZodOptional<z.ZodObject<{
1663
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1664
- cap: z.ZodNumber;
1665
- window: z.ZodOptional<z.ZodObject<{
1666
- kind: z.ZodEnum<["rolling", "fixed"]>;
1667
- durationSec: z.ZodNumber;
1668
- }, "strip", z.ZodTypeAny, {
1669
- kind: "rolling" | "fixed";
1670
- durationSec: number;
1671
- }, {
1672
- kind: "rolling" | "fixed";
1673
- durationSec: number;
1674
- }>>;
1675
- }, "strip", z.ZodTypeAny, {
1676
- unit: "USD" | "ops" | "points";
1677
- cap: number;
1678
- window?: {
1679
- kind: "rolling" | "fixed";
1680
- durationSec: number;
1681
- } | undefined;
1682
- }, {
1683
- unit: "USD" | "ops" | "points";
1684
- cap: number;
1685
- window?: {
1686
- kind: "rolling" | "fixed";
1687
- durationSec: number;
1688
- } | undefined;
1689
- }>>;
1690
- scopes: z.ZodArray<z.ZodObject<{
1691
- resource: z.ZodString;
1692
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1693
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1694
- }, "strip", z.ZodTypeAny, {
1695
- resource: string;
1696
- matcher: "exact" | "prefix" | "regex";
1697
- constraints?: Record<string, any> | undefined;
1698
- }, {
1699
- resource: string;
1700
- matcher: "exact" | "prefix" | "regex";
1701
- constraints?: Record<string, any> | undefined;
1702
- }>, "many">;
1703
- }, z.ZodTypeAny, "passthrough">>>;
1704
- }, z.ZodTypeAny, "passthrough">>;
1705
- /** Status */
1706
- status: z.ZodEnum<["active", "revoked", "expired"]>;
1707
- }, "strip", z.ZodTypeAny, {
1708
- status: "active" | "revoked" | "expired";
1709
- constraints: {
1710
- notBefore?: number | undefined;
1711
- notAfter?: number | undefined;
1712
- scopes?: string[] | undefined;
1713
- crisp?: z.objectOutputType<{
1714
- budget: z.ZodOptional<z.ZodObject<{
1715
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1716
- cap: z.ZodNumber;
1717
- window: z.ZodOptional<z.ZodObject<{
1718
- kind: z.ZodEnum<["rolling", "fixed"]>;
1719
- durationSec: z.ZodNumber;
1720
- }, "strip", z.ZodTypeAny, {
1721
- kind: "rolling" | "fixed";
1722
- durationSec: number;
1723
- }, {
1724
- kind: "rolling" | "fixed";
1725
- durationSec: number;
1726
- }>>;
1727
- }, "strip", z.ZodTypeAny, {
1728
- unit: "USD" | "ops" | "points";
1729
- cap: number;
1730
- window?: {
1731
- kind: "rolling" | "fixed";
1732
- durationSec: number;
1733
- } | undefined;
1734
- }, {
1735
- unit: "USD" | "ops" | "points";
1736
- cap: number;
1737
- window?: {
1738
- kind: "rolling" | "fixed";
1739
- durationSec: number;
1740
- } | undefined;
1741
- }>>;
1742
- scopes: z.ZodArray<z.ZodObject<{
1743
- resource: z.ZodString;
1744
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1745
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1746
- }, "strip", z.ZodTypeAny, {
1747
- resource: string;
1748
- matcher: "exact" | "prefix" | "regex";
1749
- constraints?: Record<string, any> | undefined;
1750
- }, {
1751
- resource: string;
1752
- matcher: "exact" | "prefix" | "regex";
1753
- constraints?: Record<string, any> | undefined;
1754
- }>, "many">;
1755
- }, z.ZodTypeAny, "passthrough"> | undefined;
1756
- } & {
1757
- [k: string]: unknown;
1758
- };
1759
- issuerDid: string;
1760
- subjectDid: string;
1761
- vcId: string;
1762
- delegationId: string;
1763
- depth: number;
1764
- }, {
1765
- status: "active" | "revoked" | "expired";
1766
- constraints: {
1767
- notBefore?: number | undefined;
1768
- notAfter?: number | undefined;
1769
- scopes?: string[] | undefined;
1770
- crisp?: z.objectInputType<{
1771
- budget: z.ZodOptional<z.ZodObject<{
1772
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1773
- cap: z.ZodNumber;
1774
- window: z.ZodOptional<z.ZodObject<{
1775
- kind: z.ZodEnum<["rolling", "fixed"]>;
1776
- durationSec: z.ZodNumber;
1777
- }, "strip", z.ZodTypeAny, {
1778
- kind: "rolling" | "fixed";
1779
- durationSec: number;
1780
- }, {
1781
- kind: "rolling" | "fixed";
1782
- durationSec: number;
1783
- }>>;
1784
- }, "strip", z.ZodTypeAny, {
1785
- unit: "USD" | "ops" | "points";
1786
- cap: number;
1787
- window?: {
1788
- kind: "rolling" | "fixed";
1789
- durationSec: number;
1790
- } | undefined;
1791
- }, {
1792
- unit: "USD" | "ops" | "points";
1793
- cap: number;
1794
- window?: {
1795
- kind: "rolling" | "fixed";
1796
- durationSec: number;
1797
- } | undefined;
1798
- }>>;
1799
- scopes: z.ZodArray<z.ZodObject<{
1800
- resource: z.ZodString;
1801
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1802
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1803
- }, "strip", z.ZodTypeAny, {
1804
- resource: string;
1805
- matcher: "exact" | "prefix" | "regex";
1806
- constraints?: Record<string, any> | undefined;
1807
- }, {
1808
- resource: string;
1809
- matcher: "exact" | "prefix" | "regex";
1810
- constraints?: Record<string, any> | undefined;
1811
- }>, "many">;
1812
- }, z.ZodTypeAny, "passthrough"> | undefined;
1813
- } & {
1814
- [k: string]: unknown;
1815
- };
1816
- issuerDid: string;
1817
- subjectDid: string;
1818
- vcId: string;
1819
- delegationId: string;
1820
- depth: number;
1821
- }>;
1822
- export type DelegationChainEntry = z.infer<typeof DelegationChainEntrySchema>;
1823
- /**
1824
- * Delegation Chain
1825
- *
1826
- * Represents a complete delegation chain from root to leaf
1827
- */
1828
- export declare const DelegationChainSchema: z.ZodObject<{
1829
- /** Root issuer DID */
1830
- rootIssuer: z.ZodString;
1831
- /** Leaf subject DID */
1832
- leafSubject: z.ZodString;
1833
- /** All delegations in the chain, ordered root to leaf */
1834
- chain: z.ZodArray<z.ZodObject<{
1835
- /** Delegation ID */
1836
- delegationId: z.ZodString;
1837
- /** Issuer DID */
1838
- issuerDid: z.ZodString;
1839
- /** Subject DID */
1840
- subjectDid: z.ZodString;
1841
- /** VC ID */
1842
- vcId: z.ZodString;
1843
- /** Depth in chain (0 = root) */
1844
- depth: z.ZodNumber;
1845
- /** Constraints */
1846
- constraints: z.ZodObject<{
1847
- notBefore: z.ZodOptional<z.ZodNumber>;
1848
- notAfter: z.ZodOptional<z.ZodNumber>;
1849
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1850
- crisp: z.ZodOptional<z.ZodObject<{
1851
- budget: z.ZodOptional<z.ZodObject<{
1852
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1853
- cap: z.ZodNumber;
1854
- window: z.ZodOptional<z.ZodObject<{
1855
- kind: z.ZodEnum<["rolling", "fixed"]>;
1856
- durationSec: z.ZodNumber;
1857
- }, "strip", z.ZodTypeAny, {
1858
- kind: "rolling" | "fixed";
1859
- durationSec: number;
1860
- }, {
1861
- kind: "rolling" | "fixed";
1862
- durationSec: number;
1863
- }>>;
1864
- }, "strip", z.ZodTypeAny, {
1865
- unit: "USD" | "ops" | "points";
1866
- cap: number;
1867
- window?: {
1868
- kind: "rolling" | "fixed";
1869
- durationSec: number;
1870
- } | undefined;
1871
- }, {
1872
- unit: "USD" | "ops" | "points";
1873
- cap: number;
1874
- window?: {
1875
- kind: "rolling" | "fixed";
1876
- durationSec: number;
1877
- } | undefined;
1878
- }>>;
1879
- scopes: z.ZodArray<z.ZodObject<{
1880
- resource: z.ZodString;
1881
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1882
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1883
- }, "strip", z.ZodTypeAny, {
1884
- resource: string;
1885
- matcher: "exact" | "prefix" | "regex";
1886
- constraints?: Record<string, any> | undefined;
1887
- }, {
1888
- resource: string;
1889
- matcher: "exact" | "prefix" | "regex";
1890
- constraints?: Record<string, any> | undefined;
1891
- }>, "many">;
1892
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1893
- budget: z.ZodOptional<z.ZodObject<{
1894
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1895
- cap: z.ZodNumber;
1896
- window: z.ZodOptional<z.ZodObject<{
1897
- kind: z.ZodEnum<["rolling", "fixed"]>;
1898
- durationSec: z.ZodNumber;
1899
- }, "strip", z.ZodTypeAny, {
1900
- kind: "rolling" | "fixed";
1901
- durationSec: number;
1902
- }, {
1903
- kind: "rolling" | "fixed";
1904
- durationSec: number;
1905
- }>>;
1906
- }, "strip", z.ZodTypeAny, {
1907
- unit: "USD" | "ops" | "points";
1908
- cap: number;
1909
- window?: {
1910
- kind: "rolling" | "fixed";
1911
- durationSec: number;
1912
- } | undefined;
1913
- }, {
1914
- unit: "USD" | "ops" | "points";
1915
- cap: number;
1916
- window?: {
1917
- kind: "rolling" | "fixed";
1918
- durationSec: number;
1919
- } | undefined;
1920
- }>>;
1921
- scopes: z.ZodArray<z.ZodObject<{
1922
- resource: z.ZodString;
1923
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1924
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1925
- }, "strip", z.ZodTypeAny, {
1926
- resource: string;
1927
- matcher: "exact" | "prefix" | "regex";
1928
- constraints?: Record<string, any> | undefined;
1929
- }, {
1930
- resource: string;
1931
- matcher: "exact" | "prefix" | "regex";
1932
- constraints?: Record<string, any> | undefined;
1933
- }>, "many">;
1934
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1935
- budget: z.ZodOptional<z.ZodObject<{
1936
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1937
- cap: z.ZodNumber;
1938
- window: z.ZodOptional<z.ZodObject<{
1939
- kind: z.ZodEnum<["rolling", "fixed"]>;
1940
- durationSec: z.ZodNumber;
1941
- }, "strip", z.ZodTypeAny, {
1942
- kind: "rolling" | "fixed";
1943
- durationSec: number;
1944
- }, {
1945
- kind: "rolling" | "fixed";
1946
- durationSec: number;
1947
- }>>;
1948
- }, "strip", z.ZodTypeAny, {
1949
- unit: "USD" | "ops" | "points";
1950
- cap: number;
1951
- window?: {
1952
- kind: "rolling" | "fixed";
1953
- durationSec: number;
1954
- } | undefined;
1955
- }, {
1956
- unit: "USD" | "ops" | "points";
1957
- cap: number;
1958
- window?: {
1959
- kind: "rolling" | "fixed";
1960
- durationSec: number;
1961
- } | undefined;
1962
- }>>;
1963
- scopes: z.ZodArray<z.ZodObject<{
1964
- resource: z.ZodString;
1965
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
1966
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1967
- }, "strip", z.ZodTypeAny, {
1968
- resource: string;
1969
- matcher: "exact" | "prefix" | "regex";
1970
- constraints?: Record<string, any> | undefined;
1971
- }, {
1972
- resource: string;
1973
- matcher: "exact" | "prefix" | "regex";
1974
- constraints?: Record<string, any> | undefined;
1975
- }>, "many">;
1976
- }, z.ZodTypeAny, "passthrough">>>;
1977
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1978
- notBefore: z.ZodOptional<z.ZodNumber>;
1979
- notAfter: z.ZodOptional<z.ZodNumber>;
1980
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1981
- crisp: z.ZodOptional<z.ZodObject<{
1982
- budget: z.ZodOptional<z.ZodObject<{
1983
- unit: z.ZodEnum<["USD", "ops", "points"]>;
1984
- cap: z.ZodNumber;
1985
- window: z.ZodOptional<z.ZodObject<{
1986
- kind: z.ZodEnum<["rolling", "fixed"]>;
1987
- durationSec: z.ZodNumber;
1988
- }, "strip", z.ZodTypeAny, {
1989
- kind: "rolling" | "fixed";
1990
- durationSec: number;
1991
- }, {
1992
- kind: "rolling" | "fixed";
1993
- durationSec: number;
1994
- }>>;
1995
- }, "strip", z.ZodTypeAny, {
1996
- unit: "USD" | "ops" | "points";
1997
- cap: number;
1998
- window?: {
1999
- kind: "rolling" | "fixed";
2000
- durationSec: number;
2001
- } | undefined;
2002
- }, {
2003
- unit: "USD" | "ops" | "points";
2004
- cap: number;
2005
- window?: {
2006
- kind: "rolling" | "fixed";
2007
- durationSec: number;
2008
- } | undefined;
2009
- }>>;
2010
- scopes: z.ZodArray<z.ZodObject<{
2011
- resource: z.ZodString;
2012
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2013
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2014
- }, "strip", z.ZodTypeAny, {
2015
- resource: string;
2016
- matcher: "exact" | "prefix" | "regex";
2017
- constraints?: Record<string, any> | undefined;
2018
- }, {
2019
- resource: string;
2020
- matcher: "exact" | "prefix" | "regex";
2021
- constraints?: Record<string, any> | undefined;
2022
- }>, "many">;
2023
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2024
- budget: z.ZodOptional<z.ZodObject<{
2025
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2026
- cap: z.ZodNumber;
2027
- window: z.ZodOptional<z.ZodObject<{
2028
- kind: z.ZodEnum<["rolling", "fixed"]>;
2029
- durationSec: z.ZodNumber;
2030
- }, "strip", z.ZodTypeAny, {
2031
- kind: "rolling" | "fixed";
2032
- durationSec: number;
2033
- }, {
2034
- kind: "rolling" | "fixed";
2035
- durationSec: number;
2036
- }>>;
2037
- }, "strip", z.ZodTypeAny, {
2038
- unit: "USD" | "ops" | "points";
2039
- cap: number;
2040
- window?: {
2041
- kind: "rolling" | "fixed";
2042
- durationSec: number;
2043
- } | undefined;
2044
- }, {
2045
- unit: "USD" | "ops" | "points";
2046
- cap: number;
2047
- window?: {
2048
- kind: "rolling" | "fixed";
2049
- durationSec: number;
2050
- } | undefined;
2051
- }>>;
2052
- scopes: z.ZodArray<z.ZodObject<{
2053
- resource: z.ZodString;
2054
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2055
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2056
- }, "strip", z.ZodTypeAny, {
2057
- resource: string;
2058
- matcher: "exact" | "prefix" | "regex";
2059
- constraints?: Record<string, any> | undefined;
2060
- }, {
2061
- resource: string;
2062
- matcher: "exact" | "prefix" | "regex";
2063
- constraints?: Record<string, any> | undefined;
2064
- }>, "many">;
2065
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2066
- budget: z.ZodOptional<z.ZodObject<{
2067
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2068
- cap: z.ZodNumber;
2069
- window: z.ZodOptional<z.ZodObject<{
2070
- kind: z.ZodEnum<["rolling", "fixed"]>;
2071
- durationSec: z.ZodNumber;
2072
- }, "strip", z.ZodTypeAny, {
2073
- kind: "rolling" | "fixed";
2074
- durationSec: number;
2075
- }, {
2076
- kind: "rolling" | "fixed";
2077
- durationSec: number;
2078
- }>>;
2079
- }, "strip", z.ZodTypeAny, {
2080
- unit: "USD" | "ops" | "points";
2081
- cap: number;
2082
- window?: {
2083
- kind: "rolling" | "fixed";
2084
- durationSec: number;
2085
- } | undefined;
2086
- }, {
2087
- unit: "USD" | "ops" | "points";
2088
- cap: number;
2089
- window?: {
2090
- kind: "rolling" | "fixed";
2091
- durationSec: number;
2092
- } | undefined;
2093
- }>>;
2094
- scopes: z.ZodArray<z.ZodObject<{
2095
- resource: z.ZodString;
2096
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2097
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2098
- }, "strip", z.ZodTypeAny, {
2099
- resource: string;
2100
- matcher: "exact" | "prefix" | "regex";
2101
- constraints?: Record<string, any> | undefined;
2102
- }, {
2103
- resource: string;
2104
- matcher: "exact" | "prefix" | "regex";
2105
- constraints?: Record<string, any> | undefined;
2106
- }>, "many">;
2107
- }, z.ZodTypeAny, "passthrough">>>;
2108
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2109
- notBefore: z.ZodOptional<z.ZodNumber>;
2110
- notAfter: z.ZodOptional<z.ZodNumber>;
2111
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2112
- crisp: z.ZodOptional<z.ZodObject<{
2113
- budget: z.ZodOptional<z.ZodObject<{
2114
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2115
- cap: z.ZodNumber;
2116
- window: z.ZodOptional<z.ZodObject<{
2117
- kind: z.ZodEnum<["rolling", "fixed"]>;
2118
- durationSec: z.ZodNumber;
2119
- }, "strip", z.ZodTypeAny, {
2120
- kind: "rolling" | "fixed";
2121
- durationSec: number;
2122
- }, {
2123
- kind: "rolling" | "fixed";
2124
- durationSec: number;
2125
- }>>;
2126
- }, "strip", z.ZodTypeAny, {
2127
- unit: "USD" | "ops" | "points";
2128
- cap: number;
2129
- window?: {
2130
- kind: "rolling" | "fixed";
2131
- durationSec: number;
2132
- } | undefined;
2133
- }, {
2134
- unit: "USD" | "ops" | "points";
2135
- cap: number;
2136
- window?: {
2137
- kind: "rolling" | "fixed";
2138
- durationSec: number;
2139
- } | undefined;
2140
- }>>;
2141
- scopes: z.ZodArray<z.ZodObject<{
2142
- resource: z.ZodString;
2143
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2144
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2145
- }, "strip", z.ZodTypeAny, {
2146
- resource: string;
2147
- matcher: "exact" | "prefix" | "regex";
2148
- constraints?: Record<string, any> | undefined;
2149
- }, {
2150
- resource: string;
2151
- matcher: "exact" | "prefix" | "regex";
2152
- constraints?: Record<string, any> | undefined;
2153
- }>, "many">;
2154
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2155
- budget: z.ZodOptional<z.ZodObject<{
2156
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2157
- cap: z.ZodNumber;
2158
- window: z.ZodOptional<z.ZodObject<{
2159
- kind: z.ZodEnum<["rolling", "fixed"]>;
2160
- durationSec: z.ZodNumber;
2161
- }, "strip", z.ZodTypeAny, {
2162
- kind: "rolling" | "fixed";
2163
- durationSec: number;
2164
- }, {
2165
- kind: "rolling" | "fixed";
2166
- durationSec: number;
2167
- }>>;
2168
- }, "strip", z.ZodTypeAny, {
2169
- unit: "USD" | "ops" | "points";
2170
- cap: number;
2171
- window?: {
2172
- kind: "rolling" | "fixed";
2173
- durationSec: number;
2174
- } | undefined;
2175
- }, {
2176
- unit: "USD" | "ops" | "points";
2177
- cap: number;
2178
- window?: {
2179
- kind: "rolling" | "fixed";
2180
- durationSec: number;
2181
- } | undefined;
2182
- }>>;
2183
- scopes: z.ZodArray<z.ZodObject<{
2184
- resource: z.ZodString;
2185
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2186
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2187
- }, "strip", z.ZodTypeAny, {
2188
- resource: string;
2189
- matcher: "exact" | "prefix" | "regex";
2190
- constraints?: Record<string, any> | undefined;
2191
- }, {
2192
- resource: string;
2193
- matcher: "exact" | "prefix" | "regex";
2194
- constraints?: Record<string, any> | undefined;
2195
- }>, "many">;
2196
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2197
- budget: z.ZodOptional<z.ZodObject<{
2198
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2199
- cap: z.ZodNumber;
2200
- window: z.ZodOptional<z.ZodObject<{
2201
- kind: z.ZodEnum<["rolling", "fixed"]>;
2202
- durationSec: z.ZodNumber;
2203
- }, "strip", z.ZodTypeAny, {
2204
- kind: "rolling" | "fixed";
2205
- durationSec: number;
2206
- }, {
2207
- kind: "rolling" | "fixed";
2208
- durationSec: number;
2209
- }>>;
2210
- }, "strip", z.ZodTypeAny, {
2211
- unit: "USD" | "ops" | "points";
2212
- cap: number;
2213
- window?: {
2214
- kind: "rolling" | "fixed";
2215
- durationSec: number;
2216
- } | undefined;
2217
- }, {
2218
- unit: "USD" | "ops" | "points";
2219
- cap: number;
2220
- window?: {
2221
- kind: "rolling" | "fixed";
2222
- durationSec: number;
2223
- } | undefined;
2224
- }>>;
2225
- scopes: z.ZodArray<z.ZodObject<{
2226
- resource: z.ZodString;
2227
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2228
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2229
- }, "strip", z.ZodTypeAny, {
2230
- resource: string;
2231
- matcher: "exact" | "prefix" | "regex";
2232
- constraints?: Record<string, any> | undefined;
2233
- }, {
2234
- resource: string;
2235
- matcher: "exact" | "prefix" | "regex";
2236
- constraints?: Record<string, any> | undefined;
2237
- }>, "many">;
2238
- }, z.ZodTypeAny, "passthrough">>>;
2239
- }, z.ZodTypeAny, "passthrough">>;
2240
- /** Status */
2241
- status: z.ZodEnum<["active", "revoked", "expired"]>;
2242
- }, "strip", z.ZodTypeAny, {
2243
- status: "active" | "revoked" | "expired";
2244
- constraints: {
2245
- notBefore?: number | undefined;
2246
- notAfter?: number | undefined;
2247
- scopes?: string[] | undefined;
2248
- crisp?: z.objectOutputType<{
2249
- budget: z.ZodOptional<z.ZodObject<{
2250
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2251
- cap: z.ZodNumber;
2252
- window: z.ZodOptional<z.ZodObject<{
2253
- kind: z.ZodEnum<["rolling", "fixed"]>;
2254
- durationSec: z.ZodNumber;
2255
- }, "strip", z.ZodTypeAny, {
2256
- kind: "rolling" | "fixed";
2257
- durationSec: number;
2258
- }, {
2259
- kind: "rolling" | "fixed";
2260
- durationSec: number;
2261
- }>>;
2262
- }, "strip", z.ZodTypeAny, {
2263
- unit: "USD" | "ops" | "points";
2264
- cap: number;
2265
- window?: {
2266
- kind: "rolling" | "fixed";
2267
- durationSec: number;
2268
- } | undefined;
2269
- }, {
2270
- unit: "USD" | "ops" | "points";
2271
- cap: number;
2272
- window?: {
2273
- kind: "rolling" | "fixed";
2274
- durationSec: number;
2275
- } | undefined;
2276
- }>>;
2277
- scopes: z.ZodArray<z.ZodObject<{
2278
- resource: z.ZodString;
2279
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2280
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2281
- }, "strip", z.ZodTypeAny, {
2282
- resource: string;
2283
- matcher: "exact" | "prefix" | "regex";
2284
- constraints?: Record<string, any> | undefined;
2285
- }, {
2286
- resource: string;
2287
- matcher: "exact" | "prefix" | "regex";
2288
- constraints?: Record<string, any> | undefined;
2289
- }>, "many">;
2290
- }, z.ZodTypeAny, "passthrough"> | undefined;
2291
- } & {
2292
- [k: string]: unknown;
2293
- };
2294
- issuerDid: string;
2295
- subjectDid: string;
2296
- vcId: string;
2297
- delegationId: string;
2298
- depth: number;
2299
- }, {
2300
- status: "active" | "revoked" | "expired";
2301
- constraints: {
2302
- notBefore?: number | undefined;
2303
- notAfter?: number | undefined;
2304
- scopes?: string[] | undefined;
2305
- crisp?: z.objectInputType<{
2306
- budget: z.ZodOptional<z.ZodObject<{
2307
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2308
- cap: z.ZodNumber;
2309
- window: z.ZodOptional<z.ZodObject<{
2310
- kind: z.ZodEnum<["rolling", "fixed"]>;
2311
- durationSec: z.ZodNumber;
2312
- }, "strip", z.ZodTypeAny, {
2313
- kind: "rolling" | "fixed";
2314
- durationSec: number;
2315
- }, {
2316
- kind: "rolling" | "fixed";
2317
- durationSec: number;
2318
- }>>;
2319
- }, "strip", z.ZodTypeAny, {
2320
- unit: "USD" | "ops" | "points";
2321
- cap: number;
2322
- window?: {
2323
- kind: "rolling" | "fixed";
2324
- durationSec: number;
2325
- } | undefined;
2326
- }, {
2327
- unit: "USD" | "ops" | "points";
2328
- cap: number;
2329
- window?: {
2330
- kind: "rolling" | "fixed";
2331
- durationSec: number;
2332
- } | undefined;
2333
- }>>;
2334
- scopes: z.ZodArray<z.ZodObject<{
2335
- resource: z.ZodString;
2336
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2337
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2338
- }, "strip", z.ZodTypeAny, {
2339
- resource: string;
2340
- matcher: "exact" | "prefix" | "regex";
2341
- constraints?: Record<string, any> | undefined;
2342
- }, {
2343
- resource: string;
2344
- matcher: "exact" | "prefix" | "regex";
2345
- constraints?: Record<string, any> | undefined;
2346
- }>, "many">;
2347
- }, z.ZodTypeAny, "passthrough"> | undefined;
2348
- } & {
2349
- [k: string]: unknown;
2350
- };
2351
- issuerDid: string;
2352
- subjectDid: string;
2353
- vcId: string;
2354
- delegationId: string;
2355
- depth: number;
2356
- }>, "many">;
2357
- /** Total chain depth */
2358
- depth: z.ZodNumber;
2359
- /** Whether the entire chain is valid */
2360
- valid: z.ZodBoolean;
2361
- /** Optional validation errors */
2362
- errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2363
- }, "strip", z.ZodTypeAny, {
2364
- valid: boolean;
2365
- depth: number;
2366
- rootIssuer: string;
2367
- leafSubject: string;
2368
- chain: {
2369
- status: "active" | "revoked" | "expired";
2370
- constraints: {
2371
- notBefore?: number | undefined;
2372
- notAfter?: number | undefined;
2373
- scopes?: string[] | undefined;
2374
- crisp?: z.objectOutputType<{
2375
- budget: z.ZodOptional<z.ZodObject<{
2376
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2377
- cap: z.ZodNumber;
2378
- window: z.ZodOptional<z.ZodObject<{
2379
- kind: z.ZodEnum<["rolling", "fixed"]>;
2380
- durationSec: z.ZodNumber;
2381
- }, "strip", z.ZodTypeAny, {
2382
- kind: "rolling" | "fixed";
2383
- durationSec: number;
2384
- }, {
2385
- kind: "rolling" | "fixed";
2386
- durationSec: number;
2387
- }>>;
2388
- }, "strip", z.ZodTypeAny, {
2389
- unit: "USD" | "ops" | "points";
2390
- cap: number;
2391
- window?: {
2392
- kind: "rolling" | "fixed";
2393
- durationSec: number;
2394
- } | undefined;
2395
- }, {
2396
- unit: "USD" | "ops" | "points";
2397
- cap: number;
2398
- window?: {
2399
- kind: "rolling" | "fixed";
2400
- durationSec: number;
2401
- } | undefined;
2402
- }>>;
2403
- scopes: z.ZodArray<z.ZodObject<{
2404
- resource: z.ZodString;
2405
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2406
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2407
- }, "strip", z.ZodTypeAny, {
2408
- resource: string;
2409
- matcher: "exact" | "prefix" | "regex";
2410
- constraints?: Record<string, any> | undefined;
2411
- }, {
2412
- resource: string;
2413
- matcher: "exact" | "prefix" | "regex";
2414
- constraints?: Record<string, any> | undefined;
2415
- }>, "many">;
2416
- }, z.ZodTypeAny, "passthrough"> | undefined;
2417
- } & {
2418
- [k: string]: unknown;
2419
- };
2420
- issuerDid: string;
2421
- subjectDid: string;
2422
- vcId: string;
2423
- delegationId: string;
2424
- depth: number;
2425
- }[];
2426
- errors?: string[] | undefined;
2427
- }, {
2428
- valid: boolean;
2429
- depth: number;
2430
- rootIssuer: string;
2431
- leafSubject: string;
2432
- chain: {
2433
- status: "active" | "revoked" | "expired";
2434
- constraints: {
2435
- notBefore?: number | undefined;
2436
- notAfter?: number | undefined;
2437
- scopes?: string[] | undefined;
2438
- crisp?: z.objectInputType<{
2439
- budget: z.ZodOptional<z.ZodObject<{
2440
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2441
- cap: z.ZodNumber;
2442
- window: z.ZodOptional<z.ZodObject<{
2443
- kind: z.ZodEnum<["rolling", "fixed"]>;
2444
- durationSec: z.ZodNumber;
2445
- }, "strip", z.ZodTypeAny, {
2446
- kind: "rolling" | "fixed";
2447
- durationSec: number;
2448
- }, {
2449
- kind: "rolling" | "fixed";
2450
- durationSec: number;
2451
- }>>;
2452
- }, "strip", z.ZodTypeAny, {
2453
- unit: "USD" | "ops" | "points";
2454
- cap: number;
2455
- window?: {
2456
- kind: "rolling" | "fixed";
2457
- durationSec: number;
2458
- } | undefined;
2459
- }, {
2460
- unit: "USD" | "ops" | "points";
2461
- cap: number;
2462
- window?: {
2463
- kind: "rolling" | "fixed";
2464
- durationSec: number;
2465
- } | undefined;
2466
- }>>;
2467
- scopes: z.ZodArray<z.ZodObject<{
2468
- resource: z.ZodString;
2469
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2470
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2471
- }, "strip", z.ZodTypeAny, {
2472
- resource: string;
2473
- matcher: "exact" | "prefix" | "regex";
2474
- constraints?: Record<string, any> | undefined;
2475
- }, {
2476
- resource: string;
2477
- matcher: "exact" | "prefix" | "regex";
2478
- constraints?: Record<string, any> | undefined;
2479
- }>, "many">;
2480
- }, z.ZodTypeAny, "passthrough"> | undefined;
2481
- } & {
2482
- [k: string]: unknown;
2483
- };
2484
- issuerDid: string;
2485
- subjectDid: string;
2486
- vcId: string;
2487
- delegationId: string;
2488
- depth: number;
2489
- }[];
2490
- errors?: string[] | undefined;
2491
- }>;
2492
- export type DelegationChain = z.infer<typeof DelegationChainSchema>;
2493
- /**
2494
- * Delegation Creation Request
2495
- *
2496
- * Input for creating a new delegation
2497
- */
2498
- export declare const DelegationCreationRequestSchema: z.ZodObject<{
2499
- /** Delegator DID */
2500
- issuerDid: z.ZodString;
2501
- /** Delegatee DID */
2502
- subjectDid: z.ZodString;
2503
- /** Optional controller */
2504
- controller: z.ZodOptional<z.ZodString>;
2505
- /** Constraints */
2506
- constraints: z.ZodObject<{
2507
- notBefore: z.ZodOptional<z.ZodNumber>;
2508
- notAfter: z.ZodOptional<z.ZodNumber>;
2509
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2510
- crisp: z.ZodOptional<z.ZodObject<{
2511
- budget: z.ZodOptional<z.ZodObject<{
2512
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2513
- cap: z.ZodNumber;
2514
- window: z.ZodOptional<z.ZodObject<{
2515
- kind: z.ZodEnum<["rolling", "fixed"]>;
2516
- durationSec: z.ZodNumber;
2517
- }, "strip", z.ZodTypeAny, {
2518
- kind: "rolling" | "fixed";
2519
- durationSec: number;
2520
- }, {
2521
- kind: "rolling" | "fixed";
2522
- durationSec: number;
2523
- }>>;
2524
- }, "strip", z.ZodTypeAny, {
2525
- unit: "USD" | "ops" | "points";
2526
- cap: number;
2527
- window?: {
2528
- kind: "rolling" | "fixed";
2529
- durationSec: number;
2530
- } | undefined;
2531
- }, {
2532
- unit: "USD" | "ops" | "points";
2533
- cap: number;
2534
- window?: {
2535
- kind: "rolling" | "fixed";
2536
- durationSec: number;
2537
- } | undefined;
2538
- }>>;
2539
- scopes: z.ZodArray<z.ZodObject<{
2540
- resource: z.ZodString;
2541
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2542
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2543
- }, "strip", z.ZodTypeAny, {
2544
- resource: string;
2545
- matcher: "exact" | "prefix" | "regex";
2546
- constraints?: Record<string, any> | undefined;
2547
- }, {
2548
- resource: string;
2549
- matcher: "exact" | "prefix" | "regex";
2550
- constraints?: Record<string, any> | undefined;
2551
- }>, "many">;
2552
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2553
- budget: z.ZodOptional<z.ZodObject<{
2554
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2555
- cap: z.ZodNumber;
2556
- window: z.ZodOptional<z.ZodObject<{
2557
- kind: z.ZodEnum<["rolling", "fixed"]>;
2558
- durationSec: z.ZodNumber;
2559
- }, "strip", z.ZodTypeAny, {
2560
- kind: "rolling" | "fixed";
2561
- durationSec: number;
2562
- }, {
2563
- kind: "rolling" | "fixed";
2564
- durationSec: number;
2565
- }>>;
2566
- }, "strip", z.ZodTypeAny, {
2567
- unit: "USD" | "ops" | "points";
2568
- cap: number;
2569
- window?: {
2570
- kind: "rolling" | "fixed";
2571
- durationSec: number;
2572
- } | undefined;
2573
- }, {
2574
- unit: "USD" | "ops" | "points";
2575
- cap: number;
2576
- window?: {
2577
- kind: "rolling" | "fixed";
2578
- durationSec: number;
2579
- } | undefined;
2580
- }>>;
2581
- scopes: z.ZodArray<z.ZodObject<{
2582
- resource: z.ZodString;
2583
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2584
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2585
- }, "strip", z.ZodTypeAny, {
2586
- resource: string;
2587
- matcher: "exact" | "prefix" | "regex";
2588
- constraints?: Record<string, any> | undefined;
2589
- }, {
2590
- resource: string;
2591
- matcher: "exact" | "prefix" | "regex";
2592
- constraints?: Record<string, any> | undefined;
2593
- }>, "many">;
2594
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2595
- budget: z.ZodOptional<z.ZodObject<{
2596
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2597
- cap: z.ZodNumber;
2598
- window: z.ZodOptional<z.ZodObject<{
2599
- kind: z.ZodEnum<["rolling", "fixed"]>;
2600
- durationSec: z.ZodNumber;
2601
- }, "strip", z.ZodTypeAny, {
2602
- kind: "rolling" | "fixed";
2603
- durationSec: number;
2604
- }, {
2605
- kind: "rolling" | "fixed";
2606
- durationSec: number;
2607
- }>>;
2608
- }, "strip", z.ZodTypeAny, {
2609
- unit: "USD" | "ops" | "points";
2610
- cap: number;
2611
- window?: {
2612
- kind: "rolling" | "fixed";
2613
- durationSec: number;
2614
- } | undefined;
2615
- }, {
2616
- unit: "USD" | "ops" | "points";
2617
- cap: number;
2618
- window?: {
2619
- kind: "rolling" | "fixed";
2620
- durationSec: number;
2621
- } | undefined;
2622
- }>>;
2623
- scopes: z.ZodArray<z.ZodObject<{
2624
- resource: z.ZodString;
2625
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2626
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2627
- }, "strip", z.ZodTypeAny, {
2628
- resource: string;
2629
- matcher: "exact" | "prefix" | "regex";
2630
- constraints?: Record<string, any> | undefined;
2631
- }, {
2632
- resource: string;
2633
- matcher: "exact" | "prefix" | "regex";
2634
- constraints?: Record<string, any> | undefined;
2635
- }>, "many">;
2636
- }, z.ZodTypeAny, "passthrough">>>;
2637
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2638
- notBefore: z.ZodOptional<z.ZodNumber>;
2639
- notAfter: z.ZodOptional<z.ZodNumber>;
2640
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2641
- crisp: z.ZodOptional<z.ZodObject<{
2642
- budget: z.ZodOptional<z.ZodObject<{
2643
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2644
- cap: z.ZodNumber;
2645
- window: z.ZodOptional<z.ZodObject<{
2646
- kind: z.ZodEnum<["rolling", "fixed"]>;
2647
- durationSec: z.ZodNumber;
2648
- }, "strip", z.ZodTypeAny, {
2649
- kind: "rolling" | "fixed";
2650
- durationSec: number;
2651
- }, {
2652
- kind: "rolling" | "fixed";
2653
- durationSec: number;
2654
- }>>;
2655
- }, "strip", z.ZodTypeAny, {
2656
- unit: "USD" | "ops" | "points";
2657
- cap: number;
2658
- window?: {
2659
- kind: "rolling" | "fixed";
2660
- durationSec: number;
2661
- } | undefined;
2662
- }, {
2663
- unit: "USD" | "ops" | "points";
2664
- cap: number;
2665
- window?: {
2666
- kind: "rolling" | "fixed";
2667
- durationSec: number;
2668
- } | undefined;
2669
- }>>;
2670
- scopes: z.ZodArray<z.ZodObject<{
2671
- resource: z.ZodString;
2672
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2673
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2674
- }, "strip", z.ZodTypeAny, {
2675
- resource: string;
2676
- matcher: "exact" | "prefix" | "regex";
2677
- constraints?: Record<string, any> | undefined;
2678
- }, {
2679
- resource: string;
2680
- matcher: "exact" | "prefix" | "regex";
2681
- constraints?: Record<string, any> | undefined;
2682
- }>, "many">;
2683
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2684
- budget: z.ZodOptional<z.ZodObject<{
2685
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2686
- cap: z.ZodNumber;
2687
- window: z.ZodOptional<z.ZodObject<{
2688
- kind: z.ZodEnum<["rolling", "fixed"]>;
2689
- durationSec: z.ZodNumber;
2690
- }, "strip", z.ZodTypeAny, {
2691
- kind: "rolling" | "fixed";
2692
- durationSec: number;
2693
- }, {
2694
- kind: "rolling" | "fixed";
2695
- durationSec: number;
2696
- }>>;
2697
- }, "strip", z.ZodTypeAny, {
2698
- unit: "USD" | "ops" | "points";
2699
- cap: number;
2700
- window?: {
2701
- kind: "rolling" | "fixed";
2702
- durationSec: number;
2703
- } | undefined;
2704
- }, {
2705
- unit: "USD" | "ops" | "points";
2706
- cap: number;
2707
- window?: {
2708
- kind: "rolling" | "fixed";
2709
- durationSec: number;
2710
- } | undefined;
2711
- }>>;
2712
- scopes: z.ZodArray<z.ZodObject<{
2713
- resource: z.ZodString;
2714
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2715
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2716
- }, "strip", z.ZodTypeAny, {
2717
- resource: string;
2718
- matcher: "exact" | "prefix" | "regex";
2719
- constraints?: Record<string, any> | undefined;
2720
- }, {
2721
- resource: string;
2722
- matcher: "exact" | "prefix" | "regex";
2723
- constraints?: Record<string, any> | undefined;
2724
- }>, "many">;
2725
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2726
- budget: z.ZodOptional<z.ZodObject<{
2727
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2728
- cap: z.ZodNumber;
2729
- window: z.ZodOptional<z.ZodObject<{
2730
- kind: z.ZodEnum<["rolling", "fixed"]>;
2731
- durationSec: z.ZodNumber;
2732
- }, "strip", z.ZodTypeAny, {
2733
- kind: "rolling" | "fixed";
2734
- durationSec: number;
2735
- }, {
2736
- kind: "rolling" | "fixed";
2737
- durationSec: number;
2738
- }>>;
2739
- }, "strip", z.ZodTypeAny, {
2740
- unit: "USD" | "ops" | "points";
2741
- cap: number;
2742
- window?: {
2743
- kind: "rolling" | "fixed";
2744
- durationSec: number;
2745
- } | undefined;
2746
- }, {
2747
- unit: "USD" | "ops" | "points";
2748
- cap: number;
2749
- window?: {
2750
- kind: "rolling" | "fixed";
2751
- durationSec: number;
2752
- } | undefined;
2753
- }>>;
2754
- scopes: z.ZodArray<z.ZodObject<{
2755
- resource: z.ZodString;
2756
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2757
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2758
- }, "strip", z.ZodTypeAny, {
2759
- resource: string;
2760
- matcher: "exact" | "prefix" | "regex";
2761
- constraints?: Record<string, any> | undefined;
2762
- }, {
2763
- resource: string;
2764
- matcher: "exact" | "prefix" | "regex";
2765
- constraints?: Record<string, any> | undefined;
2766
- }>, "many">;
2767
- }, z.ZodTypeAny, "passthrough">>>;
2768
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2769
- notBefore: z.ZodOptional<z.ZodNumber>;
2770
- notAfter: z.ZodOptional<z.ZodNumber>;
2771
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2772
- crisp: z.ZodOptional<z.ZodObject<{
2773
- budget: z.ZodOptional<z.ZodObject<{
2774
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2775
- cap: z.ZodNumber;
2776
- window: z.ZodOptional<z.ZodObject<{
2777
- kind: z.ZodEnum<["rolling", "fixed"]>;
2778
- durationSec: z.ZodNumber;
2779
- }, "strip", z.ZodTypeAny, {
2780
- kind: "rolling" | "fixed";
2781
- durationSec: number;
2782
- }, {
2783
- kind: "rolling" | "fixed";
2784
- durationSec: number;
2785
- }>>;
2786
- }, "strip", z.ZodTypeAny, {
2787
- unit: "USD" | "ops" | "points";
2788
- cap: number;
2789
- window?: {
2790
- kind: "rolling" | "fixed";
2791
- durationSec: number;
2792
- } | undefined;
2793
- }, {
2794
- unit: "USD" | "ops" | "points";
2795
- cap: number;
2796
- window?: {
2797
- kind: "rolling" | "fixed";
2798
- durationSec: number;
2799
- } | undefined;
2800
- }>>;
2801
- scopes: z.ZodArray<z.ZodObject<{
2802
- resource: z.ZodString;
2803
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2804
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2805
- }, "strip", z.ZodTypeAny, {
2806
- resource: string;
2807
- matcher: "exact" | "prefix" | "regex";
2808
- constraints?: Record<string, any> | undefined;
2809
- }, {
2810
- resource: string;
2811
- matcher: "exact" | "prefix" | "regex";
2812
- constraints?: Record<string, any> | undefined;
2813
- }>, "many">;
2814
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2815
- budget: z.ZodOptional<z.ZodObject<{
2816
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2817
- cap: z.ZodNumber;
2818
- window: z.ZodOptional<z.ZodObject<{
2819
- kind: z.ZodEnum<["rolling", "fixed"]>;
2820
- durationSec: z.ZodNumber;
2821
- }, "strip", z.ZodTypeAny, {
2822
- kind: "rolling" | "fixed";
2823
- durationSec: number;
2824
- }, {
2825
- kind: "rolling" | "fixed";
2826
- durationSec: number;
2827
- }>>;
2828
- }, "strip", z.ZodTypeAny, {
2829
- unit: "USD" | "ops" | "points";
2830
- cap: number;
2831
- window?: {
2832
- kind: "rolling" | "fixed";
2833
- durationSec: number;
2834
- } | undefined;
2835
- }, {
2836
- unit: "USD" | "ops" | "points";
2837
- cap: number;
2838
- window?: {
2839
- kind: "rolling" | "fixed";
2840
- durationSec: number;
2841
- } | undefined;
2842
- }>>;
2843
- scopes: z.ZodArray<z.ZodObject<{
2844
- resource: z.ZodString;
2845
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2846
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2847
- }, "strip", z.ZodTypeAny, {
2848
- resource: string;
2849
- matcher: "exact" | "prefix" | "regex";
2850
- constraints?: Record<string, any> | undefined;
2851
- }, {
2852
- resource: string;
2853
- matcher: "exact" | "prefix" | "regex";
2854
- constraints?: Record<string, any> | undefined;
2855
- }>, "many">;
2856
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2857
- budget: z.ZodOptional<z.ZodObject<{
2858
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2859
- cap: z.ZodNumber;
2860
- window: z.ZodOptional<z.ZodObject<{
2861
- kind: z.ZodEnum<["rolling", "fixed"]>;
2862
- durationSec: z.ZodNumber;
2863
- }, "strip", z.ZodTypeAny, {
2864
- kind: "rolling" | "fixed";
2865
- durationSec: number;
2866
- }, {
2867
- kind: "rolling" | "fixed";
2868
- durationSec: number;
2869
- }>>;
2870
- }, "strip", z.ZodTypeAny, {
2871
- unit: "USD" | "ops" | "points";
2872
- cap: number;
2873
- window?: {
2874
- kind: "rolling" | "fixed";
2875
- durationSec: number;
2876
- } | undefined;
2877
- }, {
2878
- unit: "USD" | "ops" | "points";
2879
- cap: number;
2880
- window?: {
2881
- kind: "rolling" | "fixed";
2882
- durationSec: number;
2883
- } | undefined;
2884
- }>>;
2885
- scopes: z.ZodArray<z.ZodObject<{
2886
- resource: z.ZodString;
2887
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2888
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2889
- }, "strip", z.ZodTypeAny, {
2890
- resource: string;
2891
- matcher: "exact" | "prefix" | "regex";
2892
- constraints?: Record<string, any> | undefined;
2893
- }, {
2894
- resource: string;
2895
- matcher: "exact" | "prefix" | "regex";
2896
- constraints?: Record<string, any> | undefined;
2897
- }>, "many">;
2898
- }, z.ZodTypeAny, "passthrough">>>;
2899
- }, z.ZodTypeAny, "passthrough">>;
2900
- /** Optional parent delegation ID */
2901
- parentId: z.ZodOptional<z.ZodString>;
2902
- /** Optional VC ID (if not provided, will be created) */
2903
- vcId: z.ZodOptional<z.ZodString>;
2904
- }, "strip", z.ZodTypeAny, {
2905
- constraints: {
2906
- notBefore?: number | undefined;
2907
- notAfter?: number | undefined;
2908
- scopes?: string[] | undefined;
2909
- crisp?: z.objectOutputType<{
2910
- budget: z.ZodOptional<z.ZodObject<{
2911
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2912
- cap: z.ZodNumber;
2913
- window: z.ZodOptional<z.ZodObject<{
2914
- kind: z.ZodEnum<["rolling", "fixed"]>;
2915
- durationSec: z.ZodNumber;
2916
- }, "strip", z.ZodTypeAny, {
2917
- kind: "rolling" | "fixed";
2918
- durationSec: number;
2919
- }, {
2920
- kind: "rolling" | "fixed";
2921
- durationSec: number;
2922
- }>>;
2923
- }, "strip", z.ZodTypeAny, {
2924
- unit: "USD" | "ops" | "points";
2925
- cap: number;
2926
- window?: {
2927
- kind: "rolling" | "fixed";
2928
- durationSec: number;
2929
- } | undefined;
2930
- }, {
2931
- unit: "USD" | "ops" | "points";
2932
- cap: number;
2933
- window?: {
2934
- kind: "rolling" | "fixed";
2935
- durationSec: number;
2936
- } | undefined;
2937
- }>>;
2938
- scopes: z.ZodArray<z.ZodObject<{
2939
- resource: z.ZodString;
2940
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2941
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2942
- }, "strip", z.ZodTypeAny, {
2943
- resource: string;
2944
- matcher: "exact" | "prefix" | "regex";
2945
- constraints?: Record<string, any> | undefined;
2946
- }, {
2947
- resource: string;
2948
- matcher: "exact" | "prefix" | "regex";
2949
- constraints?: Record<string, any> | undefined;
2950
- }>, "many">;
2951
- }, z.ZodTypeAny, "passthrough"> | undefined;
2952
- } & {
2953
- [k: string]: unknown;
2954
- };
2955
- issuerDid: string;
2956
- subjectDid: string;
2957
- controller?: string | undefined;
2958
- vcId?: string | undefined;
2959
- parentId?: string | undefined;
2960
- }, {
2961
- constraints: {
2962
- notBefore?: number | undefined;
2963
- notAfter?: number | undefined;
2964
- scopes?: string[] | undefined;
2965
- crisp?: z.objectInputType<{
2966
- budget: z.ZodOptional<z.ZodObject<{
2967
- unit: z.ZodEnum<["USD", "ops", "points"]>;
2968
- cap: z.ZodNumber;
2969
- window: z.ZodOptional<z.ZodObject<{
2970
- kind: z.ZodEnum<["rolling", "fixed"]>;
2971
- durationSec: z.ZodNumber;
2972
- }, "strip", z.ZodTypeAny, {
2973
- kind: "rolling" | "fixed";
2974
- durationSec: number;
2975
- }, {
2976
- kind: "rolling" | "fixed";
2977
- durationSec: number;
2978
- }>>;
2979
- }, "strip", z.ZodTypeAny, {
2980
- unit: "USD" | "ops" | "points";
2981
- cap: number;
2982
- window?: {
2983
- kind: "rolling" | "fixed";
2984
- durationSec: number;
2985
- } | undefined;
2986
- }, {
2987
- unit: "USD" | "ops" | "points";
2988
- cap: number;
2989
- window?: {
2990
- kind: "rolling" | "fixed";
2991
- durationSec: number;
2992
- } | undefined;
2993
- }>>;
2994
- scopes: z.ZodArray<z.ZodObject<{
2995
- resource: z.ZodString;
2996
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
2997
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2998
- }, "strip", z.ZodTypeAny, {
2999
- resource: string;
3000
- matcher: "exact" | "prefix" | "regex";
3001
- constraints?: Record<string, any> | undefined;
3002
- }, {
3003
- resource: string;
3004
- matcher: "exact" | "prefix" | "regex";
3005
- constraints?: Record<string, any> | undefined;
3006
- }>, "many">;
3007
- }, z.ZodTypeAny, "passthrough"> | undefined;
3008
- } & {
3009
- [k: string]: unknown;
3010
- };
3011
- issuerDid: string;
3012
- subjectDid: string;
3013
- controller?: string | undefined;
3014
- vcId?: string | undefined;
3015
- parentId?: string | undefined;
3016
- }>;
3017
- export type DelegationCreationRequest = z.infer<typeof DelegationCreationRequestSchema>;
3018
- /**
3019
- * Delegation Verification Result
3020
- *
3021
- * Result of delegation verification
3022
- */
3023
- export declare const DelegationVerificationResultSchema: z.ZodObject<{
3024
- /** Whether delegation is valid */
3025
- valid: z.ZodBoolean;
3026
- /** Delegation ID */
3027
- delegationId: z.ZodString;
3028
- /** Status */
3029
- status: z.ZodEnum<["active", "revoked", "expired"]>;
3030
- /** Optional reason for invalid status */
3031
- reason: z.ZodOptional<z.ZodString>;
3032
- /** Whether backing VC is valid */
3033
- credentialValid: z.ZodOptional<z.ZodBoolean>;
3034
- /** Whether chain is valid (if part of chain) */
3035
- chainValid: z.ZodOptional<z.ZodBoolean>;
3036
- /** Timestamp of verification */
3037
- verifiedAt: z.ZodNumber;
3038
- /** Optional verification details */
3039
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3040
- }, "strip", z.ZodTypeAny, {
3041
- valid: boolean;
3042
- status: "active" | "revoked" | "expired";
3043
- delegationId: string;
3044
- verifiedAt: number;
3045
- reason?: string | undefined;
3046
- credentialValid?: boolean | undefined;
3047
- chainValid?: boolean | undefined;
3048
- details?: Record<string, any> | undefined;
3049
- }, {
3050
- valid: boolean;
3051
- status: "active" | "revoked" | "expired";
3052
- delegationId: string;
3053
- verifiedAt: number;
3054
- reason?: string | undefined;
3055
- credentialValid?: boolean | undefined;
3056
- chainValid?: boolean | undefined;
3057
- details?: Record<string, any> | undefined;
3058
- }>;
3059
- export type DelegationVerificationResult = z.infer<typeof DelegationVerificationResultSchema>;
3060
- /**
3061
- * Validation Helpers
3062
- */
3063
- /**
3064
- * Validate a delegation record
3065
- *
3066
- * @param record - The delegation record to validate
3067
- * @returns Validation result
3068
- */
3069
- export declare function validateDelegationRecord(record: unknown): z.SafeParseReturnType<z.objectInputType<{
3070
- /** Unique identifier for the delegation */
3071
- id: z.ZodString;
3072
- /** DID of the delegator (issuer, e.g., merchant/user) */
3073
- issuerDid: z.ZodString;
3074
- /** DID of the delegatee (subject, e.g., agent) */
3075
- subjectDid: z.ZodString;
3076
- /** Optional controller (user account ID or DID) */
3077
- controller: z.ZodOptional<z.ZodString>;
3078
- /** ID of the backing Verifiable Credential */
3079
- vcId: z.ZodString;
3080
- /** Optional parent delegation ID for chain tracking */
3081
- parentId: z.ZodOptional<z.ZodString>;
3082
- /** CRISP constraints on this delegation */
3083
- constraints: z.ZodObject<{
3084
- notBefore: z.ZodOptional<z.ZodNumber>;
3085
- notAfter: z.ZodOptional<z.ZodNumber>;
3086
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3087
- crisp: z.ZodOptional<z.ZodObject<{
3088
- budget: z.ZodOptional<z.ZodObject<{
3089
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3090
- cap: z.ZodNumber;
3091
- window: z.ZodOptional<z.ZodObject<{
3092
- kind: z.ZodEnum<["rolling", "fixed"]>;
3093
- durationSec: z.ZodNumber;
3094
- }, "strip", z.ZodTypeAny, {
3095
- kind: "rolling" | "fixed";
3096
- durationSec: number;
3097
- }, {
3098
- kind: "rolling" | "fixed";
3099
- durationSec: number;
3100
- }>>;
3101
- }, "strip", z.ZodTypeAny, {
3102
- unit: "USD" | "ops" | "points";
3103
- cap: number;
3104
- window?: {
3105
- kind: "rolling" | "fixed";
3106
- durationSec: number;
3107
- } | undefined;
3108
- }, {
3109
- unit: "USD" | "ops" | "points";
3110
- cap: number;
3111
- window?: {
3112
- kind: "rolling" | "fixed";
3113
- durationSec: number;
3114
- } | undefined;
3115
- }>>;
3116
- scopes: z.ZodArray<z.ZodObject<{
3117
- resource: z.ZodString;
3118
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3119
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3120
- }, "strip", z.ZodTypeAny, {
3121
- resource: string;
3122
- matcher: "exact" | "prefix" | "regex";
3123
- constraints?: Record<string, any> | undefined;
3124
- }, {
3125
- resource: string;
3126
- matcher: "exact" | "prefix" | "regex";
3127
- constraints?: Record<string, any> | undefined;
3128
- }>, "many">;
3129
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3130
- budget: z.ZodOptional<z.ZodObject<{
3131
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3132
- cap: z.ZodNumber;
3133
- window: z.ZodOptional<z.ZodObject<{
3134
- kind: z.ZodEnum<["rolling", "fixed"]>;
3135
- durationSec: z.ZodNumber;
3136
- }, "strip", z.ZodTypeAny, {
3137
- kind: "rolling" | "fixed";
3138
- durationSec: number;
3139
- }, {
3140
- kind: "rolling" | "fixed";
3141
- durationSec: number;
3142
- }>>;
3143
- }, "strip", z.ZodTypeAny, {
3144
- unit: "USD" | "ops" | "points";
3145
- cap: number;
3146
- window?: {
3147
- kind: "rolling" | "fixed";
3148
- durationSec: number;
3149
- } | undefined;
3150
- }, {
3151
- unit: "USD" | "ops" | "points";
3152
- cap: number;
3153
- window?: {
3154
- kind: "rolling" | "fixed";
3155
- durationSec: number;
3156
- } | undefined;
3157
- }>>;
3158
- scopes: z.ZodArray<z.ZodObject<{
3159
- resource: z.ZodString;
3160
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3161
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3162
- }, "strip", z.ZodTypeAny, {
3163
- resource: string;
3164
- matcher: "exact" | "prefix" | "regex";
3165
- constraints?: Record<string, any> | undefined;
3166
- }, {
3167
- resource: string;
3168
- matcher: "exact" | "prefix" | "regex";
3169
- constraints?: Record<string, any> | undefined;
3170
- }>, "many">;
3171
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3172
- budget: z.ZodOptional<z.ZodObject<{
3173
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3174
- cap: z.ZodNumber;
3175
- window: z.ZodOptional<z.ZodObject<{
3176
- kind: z.ZodEnum<["rolling", "fixed"]>;
3177
- durationSec: z.ZodNumber;
3178
- }, "strip", z.ZodTypeAny, {
3179
- kind: "rolling" | "fixed";
3180
- durationSec: number;
3181
- }, {
3182
- kind: "rolling" | "fixed";
3183
- durationSec: number;
3184
- }>>;
3185
- }, "strip", z.ZodTypeAny, {
3186
- unit: "USD" | "ops" | "points";
3187
- cap: number;
3188
- window?: {
3189
- kind: "rolling" | "fixed";
3190
- durationSec: number;
3191
- } | undefined;
3192
- }, {
3193
- unit: "USD" | "ops" | "points";
3194
- cap: number;
3195
- window?: {
3196
- kind: "rolling" | "fixed";
3197
- durationSec: number;
3198
- } | undefined;
3199
- }>>;
3200
- scopes: z.ZodArray<z.ZodObject<{
3201
- resource: z.ZodString;
3202
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3203
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3204
- }, "strip", z.ZodTypeAny, {
3205
- resource: string;
3206
- matcher: "exact" | "prefix" | "regex";
3207
- constraints?: Record<string, any> | undefined;
3208
- }, {
3209
- resource: string;
3210
- matcher: "exact" | "prefix" | "regex";
3211
- constraints?: Record<string, any> | undefined;
3212
- }>, "many">;
3213
- }, z.ZodTypeAny, "passthrough">>>;
3214
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3215
- notBefore: z.ZodOptional<z.ZodNumber>;
3216
- notAfter: z.ZodOptional<z.ZodNumber>;
3217
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3218
- crisp: z.ZodOptional<z.ZodObject<{
3219
- budget: z.ZodOptional<z.ZodObject<{
3220
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3221
- cap: z.ZodNumber;
3222
- window: z.ZodOptional<z.ZodObject<{
3223
- kind: z.ZodEnum<["rolling", "fixed"]>;
3224
- durationSec: z.ZodNumber;
3225
- }, "strip", z.ZodTypeAny, {
3226
- kind: "rolling" | "fixed";
3227
- durationSec: number;
3228
- }, {
3229
- kind: "rolling" | "fixed";
3230
- durationSec: number;
3231
- }>>;
3232
- }, "strip", z.ZodTypeAny, {
3233
- unit: "USD" | "ops" | "points";
3234
- cap: number;
3235
- window?: {
3236
- kind: "rolling" | "fixed";
3237
- durationSec: number;
3238
- } | undefined;
3239
- }, {
3240
- unit: "USD" | "ops" | "points";
3241
- cap: number;
3242
- window?: {
3243
- kind: "rolling" | "fixed";
3244
- durationSec: number;
3245
- } | undefined;
3246
- }>>;
3247
- scopes: z.ZodArray<z.ZodObject<{
3248
- resource: z.ZodString;
3249
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3250
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3251
- }, "strip", z.ZodTypeAny, {
3252
- resource: string;
3253
- matcher: "exact" | "prefix" | "regex";
3254
- constraints?: Record<string, any> | undefined;
3255
- }, {
3256
- resource: string;
3257
- matcher: "exact" | "prefix" | "regex";
3258
- constraints?: Record<string, any> | undefined;
3259
- }>, "many">;
3260
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3261
- budget: z.ZodOptional<z.ZodObject<{
3262
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3263
- cap: z.ZodNumber;
3264
- window: z.ZodOptional<z.ZodObject<{
3265
- kind: z.ZodEnum<["rolling", "fixed"]>;
3266
- durationSec: z.ZodNumber;
3267
- }, "strip", z.ZodTypeAny, {
3268
- kind: "rolling" | "fixed";
3269
- durationSec: number;
3270
- }, {
3271
- kind: "rolling" | "fixed";
3272
- durationSec: number;
3273
- }>>;
3274
- }, "strip", z.ZodTypeAny, {
3275
- unit: "USD" | "ops" | "points";
3276
- cap: number;
3277
- window?: {
3278
- kind: "rolling" | "fixed";
3279
- durationSec: number;
3280
- } | undefined;
3281
- }, {
3282
- unit: "USD" | "ops" | "points";
3283
- cap: number;
3284
- window?: {
3285
- kind: "rolling" | "fixed";
3286
- durationSec: number;
3287
- } | undefined;
3288
- }>>;
3289
- scopes: z.ZodArray<z.ZodObject<{
3290
- resource: z.ZodString;
3291
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3292
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3293
- }, "strip", z.ZodTypeAny, {
3294
- resource: string;
3295
- matcher: "exact" | "prefix" | "regex";
3296
- constraints?: Record<string, any> | undefined;
3297
- }, {
3298
- resource: string;
3299
- matcher: "exact" | "prefix" | "regex";
3300
- constraints?: Record<string, any> | undefined;
3301
- }>, "many">;
3302
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3303
- budget: z.ZodOptional<z.ZodObject<{
3304
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3305
- cap: z.ZodNumber;
3306
- window: z.ZodOptional<z.ZodObject<{
3307
- kind: z.ZodEnum<["rolling", "fixed"]>;
3308
- durationSec: z.ZodNumber;
3309
- }, "strip", z.ZodTypeAny, {
3310
- kind: "rolling" | "fixed";
3311
- durationSec: number;
3312
- }, {
3313
- kind: "rolling" | "fixed";
3314
- durationSec: number;
3315
- }>>;
3316
- }, "strip", z.ZodTypeAny, {
3317
- unit: "USD" | "ops" | "points";
3318
- cap: number;
3319
- window?: {
3320
- kind: "rolling" | "fixed";
3321
- durationSec: number;
3322
- } | undefined;
3323
- }, {
3324
- unit: "USD" | "ops" | "points";
3325
- cap: number;
3326
- window?: {
3327
- kind: "rolling" | "fixed";
3328
- durationSec: number;
3329
- } | undefined;
3330
- }>>;
3331
- scopes: z.ZodArray<z.ZodObject<{
3332
- resource: z.ZodString;
3333
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3334
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3335
- }, "strip", z.ZodTypeAny, {
3336
- resource: string;
3337
- matcher: "exact" | "prefix" | "regex";
3338
- constraints?: Record<string, any> | undefined;
3339
- }, {
3340
- resource: string;
3341
- matcher: "exact" | "prefix" | "regex";
3342
- constraints?: Record<string, any> | undefined;
3343
- }>, "many">;
3344
- }, z.ZodTypeAny, "passthrough">>>;
3345
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3346
- notBefore: z.ZodOptional<z.ZodNumber>;
3347
- notAfter: z.ZodOptional<z.ZodNumber>;
3348
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3349
- crisp: z.ZodOptional<z.ZodObject<{
3350
- budget: z.ZodOptional<z.ZodObject<{
3351
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3352
- cap: z.ZodNumber;
3353
- window: z.ZodOptional<z.ZodObject<{
3354
- kind: z.ZodEnum<["rolling", "fixed"]>;
3355
- durationSec: z.ZodNumber;
3356
- }, "strip", z.ZodTypeAny, {
3357
- kind: "rolling" | "fixed";
3358
- durationSec: number;
3359
- }, {
3360
- kind: "rolling" | "fixed";
3361
- durationSec: number;
3362
- }>>;
3363
- }, "strip", z.ZodTypeAny, {
3364
- unit: "USD" | "ops" | "points";
3365
- cap: number;
3366
- window?: {
3367
- kind: "rolling" | "fixed";
3368
- durationSec: number;
3369
- } | undefined;
3370
- }, {
3371
- unit: "USD" | "ops" | "points";
3372
- cap: number;
3373
- window?: {
3374
- kind: "rolling" | "fixed";
3375
- durationSec: number;
3376
- } | undefined;
3377
- }>>;
3378
- scopes: z.ZodArray<z.ZodObject<{
3379
- resource: z.ZodString;
3380
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3381
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3382
- }, "strip", z.ZodTypeAny, {
3383
- resource: string;
3384
- matcher: "exact" | "prefix" | "regex";
3385
- constraints?: Record<string, any> | undefined;
3386
- }, {
3387
- resource: string;
3388
- matcher: "exact" | "prefix" | "regex";
3389
- constraints?: Record<string, any> | undefined;
3390
- }>, "many">;
3391
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3392
- budget: z.ZodOptional<z.ZodObject<{
3393
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3394
- cap: z.ZodNumber;
3395
- window: z.ZodOptional<z.ZodObject<{
3396
- kind: z.ZodEnum<["rolling", "fixed"]>;
3397
- durationSec: z.ZodNumber;
3398
- }, "strip", z.ZodTypeAny, {
3399
- kind: "rolling" | "fixed";
3400
- durationSec: number;
3401
- }, {
3402
- kind: "rolling" | "fixed";
3403
- durationSec: number;
3404
- }>>;
3405
- }, "strip", z.ZodTypeAny, {
3406
- unit: "USD" | "ops" | "points";
3407
- cap: number;
3408
- window?: {
3409
- kind: "rolling" | "fixed";
3410
- durationSec: number;
3411
- } | undefined;
3412
- }, {
3413
- unit: "USD" | "ops" | "points";
3414
- cap: number;
3415
- window?: {
3416
- kind: "rolling" | "fixed";
3417
- durationSec: number;
3418
- } | undefined;
3419
- }>>;
3420
- scopes: z.ZodArray<z.ZodObject<{
3421
- resource: z.ZodString;
3422
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3423
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3424
- }, "strip", z.ZodTypeAny, {
3425
- resource: string;
3426
- matcher: "exact" | "prefix" | "regex";
3427
- constraints?: Record<string, any> | undefined;
3428
- }, {
3429
- resource: string;
3430
- matcher: "exact" | "prefix" | "regex";
3431
- constraints?: Record<string, any> | undefined;
3432
- }>, "many">;
3433
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3434
- budget: z.ZodOptional<z.ZodObject<{
3435
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3436
- cap: z.ZodNumber;
3437
- window: z.ZodOptional<z.ZodObject<{
3438
- kind: z.ZodEnum<["rolling", "fixed"]>;
3439
- durationSec: z.ZodNumber;
3440
- }, "strip", z.ZodTypeAny, {
3441
- kind: "rolling" | "fixed";
3442
- durationSec: number;
3443
- }, {
3444
- kind: "rolling" | "fixed";
3445
- durationSec: number;
3446
- }>>;
3447
- }, "strip", z.ZodTypeAny, {
3448
- unit: "USD" | "ops" | "points";
3449
- cap: number;
3450
- window?: {
3451
- kind: "rolling" | "fixed";
3452
- durationSec: number;
3453
- } | undefined;
3454
- }, {
3455
- unit: "USD" | "ops" | "points";
3456
- cap: number;
3457
- window?: {
3458
- kind: "rolling" | "fixed";
3459
- durationSec: number;
3460
- } | undefined;
3461
- }>>;
3462
- scopes: z.ZodArray<z.ZodObject<{
3463
- resource: z.ZodString;
3464
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3465
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3466
- }, "strip", z.ZodTypeAny, {
3467
- resource: string;
3468
- matcher: "exact" | "prefix" | "regex";
3469
- constraints?: Record<string, any> | undefined;
3470
- }, {
3471
- resource: string;
3472
- matcher: "exact" | "prefix" | "regex";
3473
- constraints?: Record<string, any> | undefined;
3474
- }>, "many">;
3475
- }, z.ZodTypeAny, "passthrough">>>;
3476
- }, z.ZodTypeAny, "passthrough">>;
3477
- /** Detached JWS signature over canonical delegation document */
3478
- signature: z.ZodString;
3479
- /** Current status of the delegation */
3480
- status: z.ZodEnum<["active", "revoked", "expired"]>;
3481
- /** Timestamp when created (milliseconds since epoch) */
3482
- createdAt: z.ZodOptional<z.ZodNumber>;
3483
- /** Timestamp when revoked (if status is revoked) */
3484
- revokedAt: z.ZodOptional<z.ZodNumber>;
3485
- /** Optional reason for revocation */
3486
- revokedReason: z.ZodOptional<z.ZodString>;
3487
- /** Optional metadata */
3488
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3489
- }, z.ZodTypeAny, "passthrough">, z.objectOutputType<{
3490
- /** Unique identifier for the delegation */
3491
- id: z.ZodString;
3492
- /** DID of the delegator (issuer, e.g., merchant/user) */
3493
- issuerDid: z.ZodString;
3494
- /** DID of the delegatee (subject, e.g., agent) */
3495
- subjectDid: z.ZodString;
3496
- /** Optional controller (user account ID or DID) */
3497
- controller: z.ZodOptional<z.ZodString>;
3498
- /** ID of the backing Verifiable Credential */
3499
- vcId: z.ZodString;
3500
- /** Optional parent delegation ID for chain tracking */
3501
- parentId: z.ZodOptional<z.ZodString>;
3502
- /** CRISP constraints on this delegation */
3503
- constraints: z.ZodObject<{
3504
- notBefore: z.ZodOptional<z.ZodNumber>;
3505
- notAfter: z.ZodOptional<z.ZodNumber>;
3506
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3507
- crisp: z.ZodOptional<z.ZodObject<{
3508
- budget: z.ZodOptional<z.ZodObject<{
3509
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3510
- cap: z.ZodNumber;
3511
- window: z.ZodOptional<z.ZodObject<{
3512
- kind: z.ZodEnum<["rolling", "fixed"]>;
3513
- durationSec: z.ZodNumber;
3514
- }, "strip", z.ZodTypeAny, {
3515
- kind: "rolling" | "fixed";
3516
- durationSec: number;
3517
- }, {
3518
- kind: "rolling" | "fixed";
3519
- durationSec: number;
3520
- }>>;
3521
- }, "strip", z.ZodTypeAny, {
3522
- unit: "USD" | "ops" | "points";
3523
- cap: number;
3524
- window?: {
3525
- kind: "rolling" | "fixed";
3526
- durationSec: number;
3527
- } | undefined;
3528
- }, {
3529
- unit: "USD" | "ops" | "points";
3530
- cap: number;
3531
- window?: {
3532
- kind: "rolling" | "fixed";
3533
- durationSec: number;
3534
- } | undefined;
3535
- }>>;
3536
- scopes: z.ZodArray<z.ZodObject<{
3537
- resource: z.ZodString;
3538
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3539
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3540
- }, "strip", z.ZodTypeAny, {
3541
- resource: string;
3542
- matcher: "exact" | "prefix" | "regex";
3543
- constraints?: Record<string, any> | undefined;
3544
- }, {
3545
- resource: string;
3546
- matcher: "exact" | "prefix" | "regex";
3547
- constraints?: Record<string, any> | undefined;
3548
- }>, "many">;
3549
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3550
- budget: z.ZodOptional<z.ZodObject<{
3551
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3552
- cap: z.ZodNumber;
3553
- window: z.ZodOptional<z.ZodObject<{
3554
- kind: z.ZodEnum<["rolling", "fixed"]>;
3555
- durationSec: z.ZodNumber;
3556
- }, "strip", z.ZodTypeAny, {
3557
- kind: "rolling" | "fixed";
3558
- durationSec: number;
3559
- }, {
3560
- kind: "rolling" | "fixed";
3561
- durationSec: number;
3562
- }>>;
3563
- }, "strip", z.ZodTypeAny, {
3564
- unit: "USD" | "ops" | "points";
3565
- cap: number;
3566
- window?: {
3567
- kind: "rolling" | "fixed";
3568
- durationSec: number;
3569
- } | undefined;
3570
- }, {
3571
- unit: "USD" | "ops" | "points";
3572
- cap: number;
3573
- window?: {
3574
- kind: "rolling" | "fixed";
3575
- durationSec: number;
3576
- } | undefined;
3577
- }>>;
3578
- scopes: z.ZodArray<z.ZodObject<{
3579
- resource: z.ZodString;
3580
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3581
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3582
- }, "strip", z.ZodTypeAny, {
3583
- resource: string;
3584
- matcher: "exact" | "prefix" | "regex";
3585
- constraints?: Record<string, any> | undefined;
3586
- }, {
3587
- resource: string;
3588
- matcher: "exact" | "prefix" | "regex";
3589
- constraints?: Record<string, any> | undefined;
3590
- }>, "many">;
3591
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3592
- budget: z.ZodOptional<z.ZodObject<{
3593
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3594
- cap: z.ZodNumber;
3595
- window: z.ZodOptional<z.ZodObject<{
3596
- kind: z.ZodEnum<["rolling", "fixed"]>;
3597
- durationSec: z.ZodNumber;
3598
- }, "strip", z.ZodTypeAny, {
3599
- kind: "rolling" | "fixed";
3600
- durationSec: number;
3601
- }, {
3602
- kind: "rolling" | "fixed";
3603
- durationSec: number;
3604
- }>>;
3605
- }, "strip", z.ZodTypeAny, {
3606
- unit: "USD" | "ops" | "points";
3607
- cap: number;
3608
- window?: {
3609
- kind: "rolling" | "fixed";
3610
- durationSec: number;
3611
- } | undefined;
3612
- }, {
3613
- unit: "USD" | "ops" | "points";
3614
- cap: number;
3615
- window?: {
3616
- kind: "rolling" | "fixed";
3617
- durationSec: number;
3618
- } | undefined;
3619
- }>>;
3620
- scopes: z.ZodArray<z.ZodObject<{
3621
- resource: z.ZodString;
3622
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3623
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3624
- }, "strip", z.ZodTypeAny, {
3625
- resource: string;
3626
- matcher: "exact" | "prefix" | "regex";
3627
- constraints?: Record<string, any> | undefined;
3628
- }, {
3629
- resource: string;
3630
- matcher: "exact" | "prefix" | "regex";
3631
- constraints?: Record<string, any> | undefined;
3632
- }>, "many">;
3633
- }, z.ZodTypeAny, "passthrough">>>;
3634
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3635
- notBefore: z.ZodOptional<z.ZodNumber>;
3636
- notAfter: z.ZodOptional<z.ZodNumber>;
3637
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3638
- crisp: z.ZodOptional<z.ZodObject<{
3639
- budget: z.ZodOptional<z.ZodObject<{
3640
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3641
- cap: z.ZodNumber;
3642
- window: z.ZodOptional<z.ZodObject<{
3643
- kind: z.ZodEnum<["rolling", "fixed"]>;
3644
- durationSec: z.ZodNumber;
3645
- }, "strip", z.ZodTypeAny, {
3646
- kind: "rolling" | "fixed";
3647
- durationSec: number;
3648
- }, {
3649
- kind: "rolling" | "fixed";
3650
- durationSec: number;
3651
- }>>;
3652
- }, "strip", z.ZodTypeAny, {
3653
- unit: "USD" | "ops" | "points";
3654
- cap: number;
3655
- window?: {
3656
- kind: "rolling" | "fixed";
3657
- durationSec: number;
3658
- } | undefined;
3659
- }, {
3660
- unit: "USD" | "ops" | "points";
3661
- cap: number;
3662
- window?: {
3663
- kind: "rolling" | "fixed";
3664
- durationSec: number;
3665
- } | undefined;
3666
- }>>;
3667
- scopes: z.ZodArray<z.ZodObject<{
3668
- resource: z.ZodString;
3669
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3670
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3671
- }, "strip", z.ZodTypeAny, {
3672
- resource: string;
3673
- matcher: "exact" | "prefix" | "regex";
3674
- constraints?: Record<string, any> | undefined;
3675
- }, {
3676
- resource: string;
3677
- matcher: "exact" | "prefix" | "regex";
3678
- constraints?: Record<string, any> | undefined;
3679
- }>, "many">;
3680
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3681
- budget: z.ZodOptional<z.ZodObject<{
3682
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3683
- cap: z.ZodNumber;
3684
- window: z.ZodOptional<z.ZodObject<{
3685
- kind: z.ZodEnum<["rolling", "fixed"]>;
3686
- durationSec: z.ZodNumber;
3687
- }, "strip", z.ZodTypeAny, {
3688
- kind: "rolling" | "fixed";
3689
- durationSec: number;
3690
- }, {
3691
- kind: "rolling" | "fixed";
3692
- durationSec: number;
3693
- }>>;
3694
- }, "strip", z.ZodTypeAny, {
3695
- unit: "USD" | "ops" | "points";
3696
- cap: number;
3697
- window?: {
3698
- kind: "rolling" | "fixed";
3699
- durationSec: number;
3700
- } | undefined;
3701
- }, {
3702
- unit: "USD" | "ops" | "points";
3703
- cap: number;
3704
- window?: {
3705
- kind: "rolling" | "fixed";
3706
- durationSec: number;
3707
- } | undefined;
3708
- }>>;
3709
- scopes: z.ZodArray<z.ZodObject<{
3710
- resource: z.ZodString;
3711
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3712
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3713
- }, "strip", z.ZodTypeAny, {
3714
- resource: string;
3715
- matcher: "exact" | "prefix" | "regex";
3716
- constraints?: Record<string, any> | undefined;
3717
- }, {
3718
- resource: string;
3719
- matcher: "exact" | "prefix" | "regex";
3720
- constraints?: Record<string, any> | undefined;
3721
- }>, "many">;
3722
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3723
- budget: z.ZodOptional<z.ZodObject<{
3724
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3725
- cap: z.ZodNumber;
3726
- window: z.ZodOptional<z.ZodObject<{
3727
- kind: z.ZodEnum<["rolling", "fixed"]>;
3728
- durationSec: z.ZodNumber;
3729
- }, "strip", z.ZodTypeAny, {
3730
- kind: "rolling" | "fixed";
3731
- durationSec: number;
3732
- }, {
3733
- kind: "rolling" | "fixed";
3734
- durationSec: number;
3735
- }>>;
3736
- }, "strip", z.ZodTypeAny, {
3737
- unit: "USD" | "ops" | "points";
3738
- cap: number;
3739
- window?: {
3740
- kind: "rolling" | "fixed";
3741
- durationSec: number;
3742
- } | undefined;
3743
- }, {
3744
- unit: "USD" | "ops" | "points";
3745
- cap: number;
3746
- window?: {
3747
- kind: "rolling" | "fixed";
3748
- durationSec: number;
3749
- } | undefined;
3750
- }>>;
3751
- scopes: z.ZodArray<z.ZodObject<{
3752
- resource: z.ZodString;
3753
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3754
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3755
- }, "strip", z.ZodTypeAny, {
3756
- resource: string;
3757
- matcher: "exact" | "prefix" | "regex";
3758
- constraints?: Record<string, any> | undefined;
3759
- }, {
3760
- resource: string;
3761
- matcher: "exact" | "prefix" | "regex";
3762
- constraints?: Record<string, any> | undefined;
3763
- }>, "many">;
3764
- }, z.ZodTypeAny, "passthrough">>>;
3765
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3766
- notBefore: z.ZodOptional<z.ZodNumber>;
3767
- notAfter: z.ZodOptional<z.ZodNumber>;
3768
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3769
- crisp: z.ZodOptional<z.ZodObject<{
3770
- budget: z.ZodOptional<z.ZodObject<{
3771
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3772
- cap: z.ZodNumber;
3773
- window: z.ZodOptional<z.ZodObject<{
3774
- kind: z.ZodEnum<["rolling", "fixed"]>;
3775
- durationSec: z.ZodNumber;
3776
- }, "strip", z.ZodTypeAny, {
3777
- kind: "rolling" | "fixed";
3778
- durationSec: number;
3779
- }, {
3780
- kind: "rolling" | "fixed";
3781
- durationSec: number;
3782
- }>>;
3783
- }, "strip", z.ZodTypeAny, {
3784
- unit: "USD" | "ops" | "points";
3785
- cap: number;
3786
- window?: {
3787
- kind: "rolling" | "fixed";
3788
- durationSec: number;
3789
- } | undefined;
3790
- }, {
3791
- unit: "USD" | "ops" | "points";
3792
- cap: number;
3793
- window?: {
3794
- kind: "rolling" | "fixed";
3795
- durationSec: number;
3796
- } | undefined;
3797
- }>>;
3798
- scopes: z.ZodArray<z.ZodObject<{
3799
- resource: z.ZodString;
3800
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3801
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3802
- }, "strip", z.ZodTypeAny, {
3803
- resource: string;
3804
- matcher: "exact" | "prefix" | "regex";
3805
- constraints?: Record<string, any> | undefined;
3806
- }, {
3807
- resource: string;
3808
- matcher: "exact" | "prefix" | "regex";
3809
- constraints?: Record<string, any> | undefined;
3810
- }>, "many">;
3811
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3812
- budget: z.ZodOptional<z.ZodObject<{
3813
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3814
- cap: z.ZodNumber;
3815
- window: z.ZodOptional<z.ZodObject<{
3816
- kind: z.ZodEnum<["rolling", "fixed"]>;
3817
- durationSec: z.ZodNumber;
3818
- }, "strip", z.ZodTypeAny, {
3819
- kind: "rolling" | "fixed";
3820
- durationSec: number;
3821
- }, {
3822
- kind: "rolling" | "fixed";
3823
- durationSec: number;
3824
- }>>;
3825
- }, "strip", z.ZodTypeAny, {
3826
- unit: "USD" | "ops" | "points";
3827
- cap: number;
3828
- window?: {
3829
- kind: "rolling" | "fixed";
3830
- durationSec: number;
3831
- } | undefined;
3832
- }, {
3833
- unit: "USD" | "ops" | "points";
3834
- cap: number;
3835
- window?: {
3836
- kind: "rolling" | "fixed";
3837
- durationSec: number;
3838
- } | undefined;
3839
- }>>;
3840
- scopes: z.ZodArray<z.ZodObject<{
3841
- resource: z.ZodString;
3842
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3843
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3844
- }, "strip", z.ZodTypeAny, {
3845
- resource: string;
3846
- matcher: "exact" | "prefix" | "regex";
3847
- constraints?: Record<string, any> | undefined;
3848
- }, {
3849
- resource: string;
3850
- matcher: "exact" | "prefix" | "regex";
3851
- constraints?: Record<string, any> | undefined;
3852
- }>, "many">;
3853
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3854
- budget: z.ZodOptional<z.ZodObject<{
3855
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3856
- cap: z.ZodNumber;
3857
- window: z.ZodOptional<z.ZodObject<{
3858
- kind: z.ZodEnum<["rolling", "fixed"]>;
3859
- durationSec: z.ZodNumber;
3860
- }, "strip", z.ZodTypeAny, {
3861
- kind: "rolling" | "fixed";
3862
- durationSec: number;
3863
- }, {
3864
- kind: "rolling" | "fixed";
3865
- durationSec: number;
3866
- }>>;
3867
- }, "strip", z.ZodTypeAny, {
3868
- unit: "USD" | "ops" | "points";
3869
- cap: number;
3870
- window?: {
3871
- kind: "rolling" | "fixed";
3872
- durationSec: number;
3873
- } | undefined;
3874
- }, {
3875
- unit: "USD" | "ops" | "points";
3876
- cap: number;
3877
- window?: {
3878
- kind: "rolling" | "fixed";
3879
- durationSec: number;
3880
- } | undefined;
3881
- }>>;
3882
- scopes: z.ZodArray<z.ZodObject<{
3883
- resource: z.ZodString;
3884
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3885
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3886
- }, "strip", z.ZodTypeAny, {
3887
- resource: string;
3888
- matcher: "exact" | "prefix" | "regex";
3889
- constraints?: Record<string, any> | undefined;
3890
- }, {
3891
- resource: string;
3892
- matcher: "exact" | "prefix" | "regex";
3893
- constraints?: Record<string, any> | undefined;
3894
- }>, "many">;
3895
- }, z.ZodTypeAny, "passthrough">>>;
3896
- }, z.ZodTypeAny, "passthrough">>;
3897
- /** Detached JWS signature over canonical delegation document */
3898
- signature: z.ZodString;
3899
- /** Current status of the delegation */
3900
- status: z.ZodEnum<["active", "revoked", "expired"]>;
3901
- /** Timestamp when created (milliseconds since epoch) */
3902
- createdAt: z.ZodOptional<z.ZodNumber>;
3903
- /** Timestamp when revoked (if status is revoked) */
3904
- revokedAt: z.ZodOptional<z.ZodNumber>;
3905
- /** Optional reason for revocation */
3906
- revokedReason: z.ZodOptional<z.ZodString>;
3907
- /** Optional metadata */
3908
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3909
- }, z.ZodTypeAny, "passthrough">>;
3910
- /**
3911
- * Validate a delegation chain
3912
- *
3913
- * @param chain - The delegation chain to validate
3914
- * @returns Validation result
3915
- */
3916
- export declare function validateDelegationChain(chain: unknown): z.SafeParseReturnType<{
3917
- valid: boolean;
3918
- depth: number;
3919
- rootIssuer: string;
3920
- leafSubject: string;
3921
- chain: {
3922
- status: "active" | "revoked" | "expired";
3923
- constraints: {
3924
- notBefore?: number | undefined;
3925
- notAfter?: number | undefined;
3926
- scopes?: string[] | undefined;
3927
- crisp?: z.objectInputType<{
3928
- budget: z.ZodOptional<z.ZodObject<{
3929
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3930
- cap: z.ZodNumber;
3931
- window: z.ZodOptional<z.ZodObject<{
3932
- kind: z.ZodEnum<["rolling", "fixed"]>;
3933
- durationSec: z.ZodNumber;
3934
- }, "strip", z.ZodTypeAny, {
3935
- kind: "rolling" | "fixed";
3936
- durationSec: number;
3937
- }, {
3938
- kind: "rolling" | "fixed";
3939
- durationSec: number;
3940
- }>>;
3941
- }, "strip", z.ZodTypeAny, {
3942
- unit: "USD" | "ops" | "points";
3943
- cap: number;
3944
- window?: {
3945
- kind: "rolling" | "fixed";
3946
- durationSec: number;
3947
- } | undefined;
3948
- }, {
3949
- unit: "USD" | "ops" | "points";
3950
- cap: number;
3951
- window?: {
3952
- kind: "rolling" | "fixed";
3953
- durationSec: number;
3954
- } | undefined;
3955
- }>>;
3956
- scopes: z.ZodArray<z.ZodObject<{
3957
- resource: z.ZodString;
3958
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
3959
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3960
- }, "strip", z.ZodTypeAny, {
3961
- resource: string;
3962
- matcher: "exact" | "prefix" | "regex";
3963
- constraints?: Record<string, any> | undefined;
3964
- }, {
3965
- resource: string;
3966
- matcher: "exact" | "prefix" | "regex";
3967
- constraints?: Record<string, any> | undefined;
3968
- }>, "many">;
3969
- }, z.ZodTypeAny, "passthrough"> | undefined;
3970
- } & {
3971
- [k: string]: unknown;
3972
- };
3973
- issuerDid: string;
3974
- subjectDid: string;
3975
- vcId: string;
3976
- delegationId: string;
3977
- depth: number;
3978
- }[];
3979
- errors?: string[] | undefined;
3980
- }, {
3981
- valid: boolean;
3982
- depth: number;
3983
- rootIssuer: string;
3984
- leafSubject: string;
3985
- chain: {
3986
- status: "active" | "revoked" | "expired";
3987
- constraints: {
3988
- notBefore?: number | undefined;
3989
- notAfter?: number | undefined;
3990
- scopes?: string[] | undefined;
3991
- crisp?: z.objectOutputType<{
3992
- budget: z.ZodOptional<z.ZodObject<{
3993
- unit: z.ZodEnum<["USD", "ops", "points"]>;
3994
- cap: z.ZodNumber;
3995
- window: z.ZodOptional<z.ZodObject<{
3996
- kind: z.ZodEnum<["rolling", "fixed"]>;
3997
- durationSec: z.ZodNumber;
3998
- }, "strip", z.ZodTypeAny, {
3999
- kind: "rolling" | "fixed";
4000
- durationSec: number;
4001
- }, {
4002
- kind: "rolling" | "fixed";
4003
- durationSec: number;
4004
- }>>;
4005
- }, "strip", z.ZodTypeAny, {
4006
- unit: "USD" | "ops" | "points";
4007
- cap: number;
4008
- window?: {
4009
- kind: "rolling" | "fixed";
4010
- durationSec: number;
4011
- } | undefined;
4012
- }, {
4013
- unit: "USD" | "ops" | "points";
4014
- cap: number;
4015
- window?: {
4016
- kind: "rolling" | "fixed";
4017
- durationSec: number;
4018
- } | undefined;
4019
- }>>;
4020
- scopes: z.ZodArray<z.ZodObject<{
4021
- resource: z.ZodString;
4022
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
4023
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
4024
- }, "strip", z.ZodTypeAny, {
4025
- resource: string;
4026
- matcher: "exact" | "prefix" | "regex";
4027
- constraints?: Record<string, any> | undefined;
4028
- }, {
4029
- resource: string;
4030
- matcher: "exact" | "prefix" | "regex";
4031
- constraints?: Record<string, any> | undefined;
4032
- }>, "many">;
4033
- }, z.ZodTypeAny, "passthrough"> | undefined;
4034
- } & {
4035
- [k: string]: unknown;
4036
- };
4037
- issuerDid: string;
4038
- subjectDid: string;
4039
- vcId: string;
4040
- delegationId: string;
4041
- depth: number;
4042
- }[];
4043
- errors?: string[] | undefined;
4044
- }>;
4045
- /**
4046
- * Check if a delegation is expired based on constraints
4047
- *
4048
- * @param delegation - The delegation to check
4049
- * @returns true if expired
4050
- */
4051
- export declare function isDelegationExpired(delegation: DelegationRecord): boolean;
4052
- /**
4053
- * Check if a delegation is not yet valid based on constraints
4054
- *
4055
- * @param delegation - The delegation to check
4056
- * @returns true if not yet valid
4057
- */
4058
- export declare function isDelegationNotYetValid(delegation: DelegationRecord): boolean;
4059
- /**
4060
- * Check if a delegation is currently valid (active and within time bounds)
4061
- *
4062
- * @param delegation - The delegation to check
4063
- * @returns true if currently valid
4064
- */
4065
- export declare function isDelegationCurrentlyValid(delegation: DelegationRecord): boolean;
4066
- /**
4067
- * Constants
4068
- */
4069
- /**
4070
- * Maximum reasonable delegation chain depth
4071
- */
4072
- export declare const MAX_DELEGATION_CHAIN_DEPTH = 10;
4073
- /**
4074
- * Default delegation status for new delegations
4075
- */
4076
- export declare const DEFAULT_DELEGATION_STATUS: DelegationStatus;
4077
- /**
4078
- * Supported delegation statuses
4079
- */
4080
- export declare const DELEGATION_STATUSES: DelegationStatus[];
4081
- //# sourceMappingURL=schemas.d.ts.map