@openvtc/trust-tasks 0.18.3 → 0.18.4

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 (53) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/dist/_shared/components.d.ts +56 -0
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/index.d.ts +4 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +4 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/process-attestation/0.1/payload.d.ts +1190 -0
  9. package/dist/process-attestation/0.1/payload.d.ts.map +1 -0
  10. package/dist/process-attestation/0.1/payload.js +660 -0
  11. package/dist/process-attestation/0.1/payload.js.map +1 -0
  12. package/dist/rooms/_shared/0.1/room.d.ts +1 -1
  13. package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
  14. package/dist/rooms/create/0.1/payload.d.ts +58 -2
  15. package/dist/rooms/create/0.1/payload.d.ts.map +1 -1
  16. package/dist/rooms/create/0.1/payload.js +32 -0
  17. package/dist/rooms/create/0.1/payload.js.map +1 -1
  18. package/dist/rooms/epoch/commits/0.1/payload.d.ts +506 -0
  19. package/dist/rooms/epoch/commits/0.1/payload.d.ts.map +1 -0
  20. package/dist/rooms/epoch/commits/0.1/payload.js +268 -0
  21. package/dist/rooms/epoch/commits/0.1/payload.js.map +1 -0
  22. package/dist/rooms/epoch/mint/0.1/payload.d.ts +20 -0
  23. package/dist/rooms/epoch/mint/0.1/payload.d.ts.map +1 -1
  24. package/dist/rooms/epoch/mint/0.1/payload.js +5 -0
  25. package/dist/rooms/epoch/mint/0.1/payload.js.map +1 -1
  26. package/dist/rooms/epoch/prune/0.1/payload.d.ts +423 -0
  27. package/dist/rooms/epoch/prune/0.1/payload.d.ts.map +1 -0
  28. package/dist/rooms/epoch/prune/0.1/payload.js +229 -0
  29. package/dist/rooms/epoch/prune/0.1/payload.js.map +1 -0
  30. package/dist/rooms/keys/browse/0.1/payload.d.ts +20 -0
  31. package/dist/rooms/keys/browse/0.1/payload.d.ts.map +1 -1
  32. package/dist/rooms/keys/browse/0.1/payload.js +24 -0
  33. package/dist/rooms/keys/browse/0.1/payload.js.map +1 -1
  34. package/dist/rooms/keys/read/0.1/payload.d.ts +20 -0
  35. package/dist/rooms/keys/read/0.1/payload.d.ts.map +1 -1
  36. package/dist/rooms/keys/read/0.1/payload.js +24 -0
  37. package/dist/rooms/keys/read/0.1/payload.js.map +1 -1
  38. package/dist/rooms/owner/anchor/0.1/payload.d.ts +537 -0
  39. package/dist/rooms/owner/anchor/0.1/payload.d.ts.map +1 -0
  40. package/dist/rooms/owner/anchor/0.1/payload.js +291 -0
  41. package/dist/rooms/owner/anchor/0.1/payload.js.map +1 -0
  42. package/package.json +1 -1
  43. package/src/_shared/components.ts +56 -0
  44. package/src/index.ts +4 -0
  45. package/src/process-attestation/0.1/payload.ts +794 -0
  46. package/src/rooms/_shared/0.1/room.ts +1 -1
  47. package/src/rooms/create/0.1/payload.ts +42 -2
  48. package/src/rooms/epoch/commits/0.1/payload.ts +341 -0
  49. package/src/rooms/epoch/mint/0.1/payload.ts +15 -0
  50. package/src/rooms/epoch/prune/0.1/payload.ts +289 -0
  51. package/src/rooms/keys/browse/0.1/payload.ts +24 -0
  52. package/src/rooms/keys/read/0.1/payload.ts +24 -0
  53. package/src/rooms/owner/anchor/0.1/payload.ts +353 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/process-attestation/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAGvD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AACnF;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,QAAQ,GAAG,WAAW,CAAC;AACvE;;GAEG;AACH,MAAM,MAAM,gBAAgB,G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1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/process-attestation/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/process-attestation/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/process-attestation/0.1",
21
+ "title": "Process Attestation — payload",
22
+ "description": "What a Verifier asks of a Holder: identify an artifact by digest, supply a freshness challenge, and name the disclosure categories wanted. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "artifact",
27
+ "challenge"
28
+ ],
29
+ "properties": {
30
+ "artifact": {
31
+ "$ref": "#/$defs/Artifact"
32
+ },
33
+ "challenge": {
34
+ "type": "string",
35
+ "minLength": 16,
36
+ "maxLength": 256,
37
+ "description": "Verifier-supplied freshness nonce, echoed verbatim in the response. The floor is 16 characters because anti-replay is the only integrity property the request has."
38
+ },
39
+ "disclosure": {
40
+ "type": "array",
41
+ "uniqueItems": true,
42
+ "items": {
43
+ "$ref": "#/$defs/DisclosureCategory"
44
+ },
45
+ "description": "Categories the Verifier requests. A Holder MAY return fewer; it MUST NOT return more."
46
+ },
47
+ "ext": {
48
+ "$ref": "#/$defs/Ext"
49
+ }
50
+ },
51
+ "$defs": {
52
+ "Response": {
53
+ "$anchor": "response",
54
+ "title": "Process Attestation — response payload",
55
+ "description": "The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.",
56
+ "unevaluatedProperties": false,
57
+ "oneOf": [
58
+ {
59
+ "type": "object",
60
+ "title": "Attested",
61
+ "additionalProperties": false,
62
+ "required": [
63
+ "result",
64
+ "challenge",
65
+ "artifact",
66
+ "assessment",
67
+ "receiptReference"
68
+ ],
69
+ "properties": {
70
+ "result": {
71
+ "const": "attested"
72
+ },
73
+ "challenge": {
74
+ "type": "string",
75
+ "minLength": 16,
76
+ "maxLength": 256,
77
+ "description": "The request's challenge, echoed verbatim."
78
+ },
79
+ "artifact": {
80
+ "$ref": "#/$defs/Artifact"
81
+ },
82
+ "ext": {
83
+ "$ref": "#/$defs/Ext"
84
+ },
85
+ "assessment": {
86
+ "$ref": "#/$defs/Assessment"
87
+ },
88
+ "receiptReference": {
89
+ "$ref": "#/$defs/ReceiptReference"
90
+ },
91
+ "disclosed": {
92
+ "$ref": "#/$defs/Disclosed"
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "type": "object",
98
+ "title": "Unavailable",
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "result",
102
+ "challenge",
103
+ "artifact"
104
+ ],
105
+ "properties": {
106
+ "result": {
107
+ "const": "unavailable"
108
+ },
109
+ "challenge": {
110
+ "type": "string",
111
+ "minLength": 16,
112
+ "maxLength": 256,
113
+ "description": "The request's challenge, echoed verbatim."
114
+ },
115
+ "artifact": {
116
+ "$ref": "#/$defs/Artifact"
117
+ },
118
+ "ext": {
119
+ "$ref": "#/$defs/Ext"
120
+ }
121
+ }
122
+ }
123
+ ]
124
+ },
125
+ "Artifact": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": [
129
+ "digest",
130
+ "algorithm"
131
+ ],
132
+ "description": "Deterministic identification of the object whose production is in question.",
133
+ "properties": {
134
+ "digest": {
135
+ "type": "string",
136
+ "pattern": "^[A-Za-z0-9_-]{16,128}$",
137
+ "description": "base64url, unpadded."
138
+ },
139
+ "algorithm": {
140
+ "type": "string",
141
+ "enum": [
142
+ "sha-256",
143
+ "sha-384",
144
+ "sha-512",
145
+ "blake3"
146
+ ],
147
+ "description": "Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values."
148
+ },
149
+ "byteLength": {
150
+ "type": "integer",
151
+ "minimum": 0
152
+ }
153
+ }
154
+ },
155
+ "Assessment": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "primitive",
160
+ "determination"
161
+ ],
162
+ "description": "Opaque at the task layer. The task standardizes the interaction, not the receipt.",
163
+ "properties": {
164
+ "primitive": {
165
+ "type": "string",
166
+ "format": "uri",
167
+ "description": "Specification the receipt is verified under. Names which vocabulary `determination` belongs to.",
168
+ "maxLength": 2048
169
+ },
170
+ "determination": {
171
+ "type": "string",
172
+ "minLength": 1,
173
+ "maxLength": 128,
174
+ "description": "Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean."
175
+ },
176
+ "confidence": {
177
+ "type": "integer",
178
+ "minimum": 0,
179
+ "maximum": 100,
180
+ "description": "The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property."
181
+ }
182
+ }
183
+ },
184
+ "ReceiptReference": {
185
+ "description": "Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.",
186
+ "oneOf": [
187
+ {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "required": [
191
+ "type",
192
+ "uri"
193
+ ],
194
+ "properties": {
195
+ "type": {
196
+ "const": "uri"
197
+ },
198
+ "uri": {
199
+ "type": "string",
200
+ "format": "uri",
201
+ "maxLength": 2048
202
+ },
203
+ "mediaType": {
204
+ "type": "string",
205
+ "maxLength": 255
206
+ }
207
+ }
208
+ },
209
+ {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": [
213
+ "type",
214
+ "mediaType",
215
+ "data"
216
+ ],
217
+ "properties": {
218
+ "type": {
219
+ "const": "inline"
220
+ },
221
+ "mediaType": {
222
+ "type": "string",
223
+ "maxLength": 255
224
+ },
225
+ "data": {
226
+ "type": "string",
227
+ "pattern": "^[A-Za-z0-9_-]+$",
228
+ "description": "base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.",
229
+ "maxLength": 262144
230
+ }
231
+ }
232
+ }
233
+ ]
234
+ },
235
+ "DisclosureCategory": {
236
+ "type": "string",
237
+ "enum": [
238
+ "document",
239
+ "timeline",
240
+ "integrity",
241
+ "anchors"
242
+ ],
243
+ "description": "Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1."
244
+ },
245
+ "Disclosed": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "description": "Only the categories the request asked for.",
249
+ "properties": {
250
+ "document": {
251
+ "type": "object",
252
+ "additionalProperties": false,
253
+ "properties": {
254
+ "byteLength": {
255
+ "type": "integer",
256
+ "minimum": 0
257
+ },
258
+ "mediaType": {
259
+ "type": "string",
260
+ "maxLength": 255
261
+ }
262
+ }
263
+ },
264
+ "timeline": {
265
+ "type": "object",
266
+ "additionalProperties": false,
267
+ "properties": {
268
+ "startedAt": {
269
+ "type": "string",
270
+ "format": "date-time"
271
+ },
272
+ "endedAt": {
273
+ "type": "string",
274
+ "format": "date-time"
275
+ },
276
+ "checkpointCount": {
277
+ "type": "integer",
278
+ "minimum": 0
279
+ }
280
+ }
281
+ },
282
+ "integrity": {
283
+ "type": "object",
284
+ "additionalProperties": false,
285
+ "properties": {
286
+ "chainValid": {
287
+ "type": "boolean"
288
+ },
289
+ "signatureValid": {
290
+ "type": "boolean"
291
+ },
292
+ "keyCustody": {
293
+ "type": "string",
294
+ "enum": [
295
+ "software",
296
+ "tpm",
297
+ "secureEnclave"
298
+ ]
299
+ }
300
+ }
301
+ },
302
+ "anchors": {
303
+ "type": "array",
304
+ "items": {
305
+ "type": "object",
306
+ "additionalProperties": false,
307
+ "required": [
308
+ "kind"
309
+ ],
310
+ "properties": {
311
+ "kind": {
312
+ "type": "string",
313
+ "enum": [
314
+ "rfc3161",
315
+ "opentimestamps",
316
+ "roughtime"
317
+ ]
318
+ },
319
+ "anchoredAt": {
320
+ "type": "string",
321
+ "format": "date-time"
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ },
328
+ "Ext": {
329
+ "title": "Ext",
330
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
331
+ "type": "object",
332
+ "minProperties": 1,
333
+ "additionalProperties": true,
334
+ "propertyNames": {
335
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
336
+ }
337
+ }
338
+ }
339
+ };
340
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
341
+ export const RESPONSE_PAYLOAD_SCHEMA = {
342
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
343
+ "$ref": "#/$defs/Response",
344
+ "$defs": {
345
+ "Response": {
346
+ "$anchor": "response",
347
+ "title": "Process Attestation — response payload",
348
+ "description": "The Holder's answer. Failures use trust-task-error, not this shape. Both results share one response type so the envelope carries no observable distinction between them. `result` is the discriminator and stays inside the payload, so one envelope type covers both branches.",
349
+ "unevaluatedProperties": false,
350
+ "oneOf": [
351
+ {
352
+ "type": "object",
353
+ "title": "Attested",
354
+ "additionalProperties": false,
355
+ "required": [
356
+ "result",
357
+ "challenge",
358
+ "artifact",
359
+ "assessment",
360
+ "receiptReference"
361
+ ],
362
+ "properties": {
363
+ "result": {
364
+ "const": "attested"
365
+ },
366
+ "challenge": {
367
+ "type": "string",
368
+ "minLength": 16,
369
+ "maxLength": 256,
370
+ "description": "The request's challenge, echoed verbatim."
371
+ },
372
+ "artifact": {
373
+ "$ref": "#/$defs/Artifact"
374
+ },
375
+ "ext": {
376
+ "$ref": "#/$defs/Ext"
377
+ },
378
+ "assessment": {
379
+ "$ref": "#/$defs/Assessment"
380
+ },
381
+ "receiptReference": {
382
+ "$ref": "#/$defs/ReceiptReference"
383
+ },
384
+ "disclosed": {
385
+ "$ref": "#/$defs/Disclosed"
386
+ }
387
+ }
388
+ },
389
+ {
390
+ "type": "object",
391
+ "title": "Unavailable",
392
+ "additionalProperties": false,
393
+ "required": [
394
+ "result",
395
+ "challenge",
396
+ "artifact"
397
+ ],
398
+ "properties": {
399
+ "result": {
400
+ "const": "unavailable"
401
+ },
402
+ "challenge": {
403
+ "type": "string",
404
+ "minLength": 16,
405
+ "maxLength": 256,
406
+ "description": "The request's challenge, echoed verbatim."
407
+ },
408
+ "artifact": {
409
+ "$ref": "#/$defs/Artifact"
410
+ },
411
+ "ext": {
412
+ "$ref": "#/$defs/Ext"
413
+ }
414
+ }
415
+ }
416
+ ]
417
+ },
418
+ "Artifact": {
419
+ "type": "object",
420
+ "additionalProperties": false,
421
+ "required": [
422
+ "digest",
423
+ "algorithm"
424
+ ],
425
+ "description": "Deterministic identification of the object whose production is in question.",
426
+ "properties": {
427
+ "digest": {
428
+ "type": "string",
429
+ "pattern": "^[A-Za-z0-9_-]{16,128}$",
430
+ "description": "base64url, unpadded."
431
+ },
432
+ "algorithm": {
433
+ "type": "string",
434
+ "enum": [
435
+ "sha-256",
436
+ "sha-384",
437
+ "sha-512",
438
+ "blake3"
439
+ ],
440
+ "description": "Carried verbatim from the IANA Named Information Hash Algorithm registry, not re-cased — SPEC §4.10 externally-owned values."
441
+ },
442
+ "byteLength": {
443
+ "type": "integer",
444
+ "minimum": 0
445
+ }
446
+ }
447
+ },
448
+ "Assessment": {
449
+ "type": "object",
450
+ "additionalProperties": false,
451
+ "required": [
452
+ "primitive",
453
+ "determination"
454
+ ],
455
+ "description": "Opaque at the task layer. The task standardizes the interaction, not the receipt.",
456
+ "properties": {
457
+ "primitive": {
458
+ "type": "string",
459
+ "format": "uri",
460
+ "description": "Specification the receipt is verified under. Names which vocabulary `determination` belongs to.",
461
+ "maxLength": 2048
462
+ },
463
+ "determination": {
464
+ "type": "string",
465
+ "minLength": 1,
466
+ "maxLength": 128,
467
+ "description": "Primitive-defined. Deliberately not normalized across primitives: a determination means only what the primitive that produced it defines it to mean."
468
+ },
469
+ "confidence": {
470
+ "type": "integer",
471
+ "minimum": 0,
472
+ "maximum": 100,
473
+ "description": "The primitive's confidence in `determination`, as an integer percentage. An integer rather than a fraction because no other specification in this registry puts a floating-point value on the wire: a float's textual form is not stable across JSON implementations, which makes byte-exact re-serialization a language-dependent property."
474
+ }
475
+ }
476
+ },
477
+ "ReceiptReference": {
478
+ "description": "Tagged union. Inline exists for Verifiers that cannot dereference a URI at verification time.",
479
+ "oneOf": [
480
+ {
481
+ "type": "object",
482
+ "additionalProperties": false,
483
+ "required": [
484
+ "type",
485
+ "uri"
486
+ ],
487
+ "properties": {
488
+ "type": {
489
+ "const": "uri"
490
+ },
491
+ "uri": {
492
+ "type": "string",
493
+ "format": "uri",
494
+ "maxLength": 2048
495
+ },
496
+ "mediaType": {
497
+ "type": "string",
498
+ "maxLength": 255
499
+ }
500
+ }
501
+ },
502
+ {
503
+ "type": "object",
504
+ "additionalProperties": false,
505
+ "required": [
506
+ "type",
507
+ "mediaType",
508
+ "data"
509
+ ],
510
+ "properties": {
511
+ "type": {
512
+ "const": "inline"
513
+ },
514
+ "mediaType": {
515
+ "type": "string",
516
+ "maxLength": 255
517
+ },
518
+ "data": {
519
+ "type": "string",
520
+ "pattern": "^[A-Za-z0-9_-]+$",
521
+ "description": "base64url, unpadded. Bounded at 256 KiB of encoded text (~192 KiB of receipt): inline exists for the offline case, not as the general transport. A receipt larger than the bound MUST use the `uri` form.",
522
+ "maxLength": 262144
523
+ }
524
+ }
525
+ }
526
+ ]
527
+ },
528
+ "DisclosureCategory": {
529
+ "type": "string",
530
+ "enum": [
531
+ "document",
532
+ "timeline",
533
+ "integrity",
534
+ "anchors"
535
+ ],
536
+ "description": "Derived aggregates only. An enum rather than a pattern so a primitive cannot widen its own disclosure surface by inventing a name. The determination itself is not a category: it is always in `assessment` when the result is `attested`. Raw behavioral samples and fingerprints are out of scope for 0.1."
537
+ },
538
+ "Disclosed": {
539
+ "type": "object",
540
+ "additionalProperties": false,
541
+ "description": "Only the categories the request asked for.",
542
+ "properties": {
543
+ "document": {
544
+ "type": "object",
545
+ "additionalProperties": false,
546
+ "properties": {
547
+ "byteLength": {
548
+ "type": "integer",
549
+ "minimum": 0
550
+ },
551
+ "mediaType": {
552
+ "type": "string",
553
+ "maxLength": 255
554
+ }
555
+ }
556
+ },
557
+ "timeline": {
558
+ "type": "object",
559
+ "additionalProperties": false,
560
+ "properties": {
561
+ "startedAt": {
562
+ "type": "string",
563
+ "format": "date-time"
564
+ },
565
+ "endedAt": {
566
+ "type": "string",
567
+ "format": "date-time"
568
+ },
569
+ "checkpointCount": {
570
+ "type": "integer",
571
+ "minimum": 0
572
+ }
573
+ }
574
+ },
575
+ "integrity": {
576
+ "type": "object",
577
+ "additionalProperties": false,
578
+ "properties": {
579
+ "chainValid": {
580
+ "type": "boolean"
581
+ },
582
+ "signatureValid": {
583
+ "type": "boolean"
584
+ },
585
+ "keyCustody": {
586
+ "type": "string",
587
+ "enum": [
588
+ "software",
589
+ "tpm",
590
+ "secureEnclave"
591
+ ]
592
+ }
593
+ }
594
+ },
595
+ "anchors": {
596
+ "type": "array",
597
+ "items": {
598
+ "type": "object",
599
+ "additionalProperties": false,
600
+ "required": [
601
+ "kind"
602
+ ],
603
+ "properties": {
604
+ "kind": {
605
+ "type": "string",
606
+ "enum": [
607
+ "rfc3161",
608
+ "opentimestamps",
609
+ "roughtime"
610
+ ]
611
+ },
612
+ "anchoredAt": {
613
+ "type": "string",
614
+ "format": "date-time"
615
+ }
616
+ }
617
+ }
618
+ }
619
+ }
620
+ },
621
+ "Ext": {
622
+ "title": "Ext",
623
+ "description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
624
+ "type": "object",
625
+ "minProperties": 1,
626
+ "additionalProperties": true,
627
+ "propertyNames": {
628
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
629
+ }
630
+ }
631
+ }
632
+ };
633
+ /**
634
+ * SPEC.md §7.2 policy for the request variant, from this specification's
635
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
636
+ * per-specification and cannot be derived from the document alone, and
637
+ * item 2 needs the schema this carries.
638
+ */
639
+ export const SPEC = {
640
+ typeUri: TYPE_URI,
641
+ isBearer: false,
642
+ isProofRequired: false,
643
+ isRecipientRequired: true,
644
+ isIssuedAtRequired: true,
645
+ payloadSchema: PAYLOAD_SCHEMA,
646
+ };
647
+ /**
648
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
649
+ * tracks the *issuer* party's requirement because a response swaps the
650
+ * parties (§7.3 item 5).
651
+ */
652
+ export const RESPONSE_SPEC = {
653
+ typeUri: RESPONSE_TYPE_URI,
654
+ isBearer: false,
655
+ isProofRequired: true,
656
+ isRecipientRequired: true,
657
+ isIssuedAtRequired: true,
658
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
659
+ };
660
+ //# sourceMappingURL=payload.js.map