@openvtc/trust-tasks 0.25.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/_shared/components.d.ts +314 -3
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +6 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +6 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +6 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +6 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +14 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +14 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/vetting/_shared/0.1/hidden-vetting.d.ts +16 -0
  25. package/dist/vetting/_shared/0.1/hidden-vetting.d.ts.map +1 -0
  26. package/dist/vetting/_shared/0.1/hidden-vetting.js +6 -0
  27. package/dist/vetting/_shared/0.1/hidden-vetting.js.map +1 -0
  28. package/dist/vetting/attestation/0.1/payload.d.ts +94 -146
  29. package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -1
  30. package/dist/vetting/attestation/0.1/payload.js +43 -43
  31. package/dist/vetting/attestation/0.1/payload.js.map +1 -1
  32. package/dist/vta/_shared/0.4/pcs-engine.d.ts +16 -0
  33. package/dist/vta/_shared/0.4/pcs-engine.d.ts.map +1 -0
  34. package/dist/vta/_shared/0.4/pcs-engine.js +6 -0
  35. package/dist/vta/_shared/0.4/pcs-engine.js.map +1 -0
  36. package/dist/vta/pcs/applications/create/0.1/payload.d.ts +1215 -0
  37. package/dist/vta/pcs/applications/create/0.1/payload.d.ts.map +1 -0
  38. package/dist/vta/pcs/applications/create/0.1/payload.js +724 -0
  39. package/dist/vta/pcs/applications/create/0.1/payload.js.map +1 -0
  40. package/dist/vta/pcs/applications/delete/0.1/payload.d.ts +253 -0
  41. package/dist/vta/pcs/applications/delete/0.1/payload.d.ts.map +1 -0
  42. package/dist/vta/pcs/applications/delete/0.1/payload.js +146 -0
  43. package/dist/vta/pcs/applications/delete/0.1/payload.js.map +1 -0
  44. package/dist/vta/pcs/applications/show/0.1/payload.d.ts +733 -0
  45. package/dist/vta/pcs/applications/show/0.1/payload.d.ts.map +1 -0
  46. package/dist/vta/pcs/applications/show/0.1/payload.js +450 -0
  47. package/dist/vta/pcs/applications/show/0.1/payload.js.map +1 -0
  48. package/dist/vta/pcs/attest/0.1/payload.d.ts +1456 -0
  49. package/dist/vta/pcs/attest/0.1/payload.d.ts.map +1 -0
  50. package/dist/vta/pcs/attest/0.1/payload.js +876 -0
  51. package/dist/vta/pcs/attest/0.1/payload.js.map +1 -0
  52. package/dist/vta/pcs/prove/0.1/payload.d.ts +1348 -0
  53. package/dist/vta/pcs/prove/0.1/payload.d.ts.map +1 -0
  54. package/dist/vta/pcs/prove/0.1/payload.js +804 -0
  55. package/dist/vta/pcs/prove/0.1/payload.js.map +1 -0
  56. package/dist/vta/pcs/root-accept/0.1/payload.d.ts +1100 -0
  57. package/dist/vta/pcs/root-accept/0.1/payload.d.ts.map +1 -0
  58. package/dist/vta/pcs/root-accept/0.1/payload.js +634 -0
  59. package/dist/vta/pcs/root-accept/0.1/payload.js.map +1 -0
  60. package/dist/vta/pcs/root-request/0.1/payload.d.ts +880 -0
  61. package/dist/vta/pcs/root-request/0.1/payload.d.ts.map +1 -0
  62. package/dist/vta/pcs/root-request/0.1/payload.js +496 -0
  63. package/dist/vta/pcs/root-request/0.1/payload.js.map +1 -0
  64. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts +612 -0
  65. package/dist/vta/pcs/tokens/abandon/0.1/payload.d.ts.map +1 -0
  66. package/dist/vta/pcs/tokens/abandon/0.1/payload.js +355 -0
  67. package/dist/vta/pcs/tokens/abandon/0.1/payload.js.map +1 -0
  68. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts +1149 -0
  69. package/dist/vta/pcs/tokens/accept/0.1/payload.d.ts.map +1 -0
  70. package/dist/vta/pcs/tokens/accept/0.1/payload.js +657 -0
  71. package/dist/vta/pcs/tokens/accept/0.1/payload.js.map +1 -0
  72. package/dist/vta/pcs/tokens/request/0.1/payload.d.ts +908 -0
  73. package/dist/vta/pcs/tokens/request/0.1/payload.d.ts.map +1 -0
  74. package/dist/vta/pcs/tokens/request/0.1/payload.js +508 -0
  75. package/dist/vta/pcs/tokens/request/0.1/payload.js.map +1 -0
  76. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts +1423 -0
  77. package/dist/vta/pcs/verify-attestation/0.1/payload.d.ts.map +1 -0
  78. package/dist/vta/pcs/verify-attestation/0.1/payload.js +850 -0
  79. package/dist/vta/pcs/verify-attestation/0.1/payload.js.map +1 -0
  80. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts +605 -0
  81. package/dist/vta/pcs/vetter/show/0.1/payload.d.ts.map +1 -0
  82. package/dist/vta/pcs/vetter/show/0.1/payload.js +351 -0
  83. package/dist/vta/pcs/vetter/show/0.1/payload.js.map +1 -0
  84. package/dist/vtc/_shared/0.1/room-storage.d.ts +1 -1
  85. package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -1
  86. package/dist/vtc/storage/configs/create/0.1/payload.d.ts +50 -10
  87. package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -1
  88. package/dist/vtc/storage/configs/create/0.1/payload.js +24 -2
  89. package/dist/vtc/storage/configs/create/0.1/payload.js.map +1 -1
  90. package/dist/vtc/storage/configs/get/0.1/payload.d.ts +66 -10
  91. package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -1
  92. package/dist/vtc/storage/configs/get/0.1/payload.js +32 -2
  93. package/dist/vtc/storage/configs/get/0.1/payload.js.map +1 -1
  94. package/dist/vtc/storage/configs/list/0.1/payload.d.ts +66 -10
  95. package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -1
  96. package/dist/vtc/storage/configs/list/0.1/payload.js +32 -2
  97. package/dist/vtc/storage/configs/list/0.1/payload.js.map +1 -1
  98. package/dist/vtc/storage/configs/update/0.1/payload.d.ts +50 -10
  99. package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -1
  100. package/dist/vtc/storage/configs/update/0.1/payload.js +24 -2
  101. package/dist/vtc/storage/configs/update/0.1/payload.js.map +1 -1
  102. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +46 -2
  103. package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -1
  104. package/dist/vtc/storage/credentials/set/0.1/payload.js +22 -0
  105. package/dist/vtc/storage/credentials/set/0.1/payload.js.map +1 -1
  106. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts +403 -486
  107. package/dist/vtc/vetting/hidden/publish/0.1/payload.d.ts.map +1 -1
  108. package/dist/vtc/vetting/hidden/publish/0.1/payload.js +240 -240
  109. package/dist/vtc/vetting/hidden/publish/0.1/payload.js.map +1 -1
  110. package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts +482 -565
  111. package/dist/vtc/vetting/hidden/show/0.1/payload.d.ts.map +1 -1
  112. package/dist/vtc/vetting/hidden/show/0.1/payload.js +294 -294
  113. package/dist/vtc/vetting/hidden/show/0.1/payload.js.map +1 -1
  114. package/package.json +1 -1
  115. package/src/_shared/components.ts +318 -3
  116. package/src/device/list/0.1/payload.ts +6 -2
  117. package/src/device/list/0.2/payload.ts +6 -2
  118. package/src/device/register/0.1/payload.ts +6 -2
  119. package/src/device/register/0.2/payload.ts +6 -2
  120. package/src/index.ts +14 -0
  121. package/src/vetting/_shared/0.1/hidden-vetting.ts +17 -0
  122. package/src/vetting/attestation/0.1/payload.ts +49 -101
  123. package/src/vta/_shared/0.4/pcs-engine.ts +17 -0
  124. package/src/vta/pcs/applications/create/0.1/payload.ts +768 -0
  125. package/src/vta/pcs/applications/delete/0.1/payload.ts +182 -0
  126. package/src/vta/pcs/applications/show/0.1/payload.ts +482 -0
  127. package/src/vta/pcs/attest/0.1/payload.ts +943 -0
  128. package/src/vta/pcs/prove/0.1/payload.ts +845 -0
  129. package/src/vta/pcs/root-accept/0.1/payload.ts +681 -0
  130. package/src/vta/pcs/root-request/0.1/payload.ts +559 -0
  131. package/src/vta/pcs/tokens/abandon/0.1/payload.ts +392 -0
  132. package/src/vta/pcs/tokens/accept/0.1/payload.ts +713 -0
  133. package/src/vta/pcs/tokens/request/0.1/payload.ts +581 -0
  134. package/src/vta/pcs/verify-attestation/0.1/payload.ts +888 -0
  135. package/src/vta/pcs/vetter/show/0.1/payload.ts +387 -0
  136. package/src/vtc/_shared/0.1/room-storage.ts +1 -1
  137. package/src/vtc/storage/configs/create/0.1/payload.ts +26 -4
  138. package/src/vtc/storage/configs/get/0.1/payload.ts +34 -4
  139. package/src/vtc/storage/configs/list/0.1/payload.ts +34 -4
  140. package/src/vtc/storage/configs/update/0.1/payload.ts +26 -4
  141. package/src/vtc/storage/credentials/set/0.1/payload.ts +24 -2
  142. package/src/vtc/vetting/hidden/publish/0.1/payload.ts +247 -331
  143. package/src/vtc/vetting/hidden/show/0.1/payload.ts +295 -379
@@ -0,0 +1,850 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/verify-attestation/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/verify-attestation/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/verify-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/vta/pcs/verify-attestation/0.1",
21
+ "title": "VTA PCS — Verify Attestation — payload",
22
+ "description": "A client hands its VTA an attestation a vetter sent; the VTA checks it and its token against the community's parameters and keeps it for the application's proof.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "applicationId",
27
+ "parameters",
28
+ "attestation"
29
+ ],
30
+ "properties": {
31
+ "applicationId": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 128
35
+ },
36
+ "parameters": {
37
+ "$ref": "#/$defs/CommunityParameters",
38
+ "description": "The community's published hidden-vetting parameters, copied verbatim from its join manifest."
39
+ },
40
+ "attestation": {
41
+ "$ref": "#/$defs/Attestation"
42
+ },
43
+ "ext": {
44
+ "$ref": "#/$defs/Ext"
45
+ }
46
+ },
47
+ "$defs": {
48
+ "Response": {
49
+ "$anchor": "response",
50
+ "title": "VTA PCS — Verify Attestation — response payload",
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [
54
+ "application",
55
+ "accepted"
56
+ ],
57
+ "properties": {
58
+ "application": {
59
+ "$ref": "#/$defs/ApplicationSummary"
60
+ },
61
+ "accepted": {
62
+ "$ref": "#/$defs/AttestationMeta",
63
+ "description": "The metadata of the attestation taken."
64
+ },
65
+ "ext": {
66
+ "$ref": "#/$defs/Ext"
67
+ }
68
+ }
69
+ },
70
+ "Ext": {
71
+ "title": "Ext",
72
+ "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.",
73
+ "type": "object",
74
+ "minProperties": 1,
75
+ "additionalProperties": true,
76
+ "propertyNames": {
77
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
78
+ }
79
+ },
80
+ "AttestationMeta": {
81
+ "title": "AttestationMeta",
82
+ "description": "The metadata of one attestation: what a Vetting Statement would have said, minus its issuer, as vetting/attestation/0.1 defines it.",
83
+ "$ref": "#/$defs/StatementMeta"
84
+ },
85
+ "StatementMeta": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "community",
90
+ "requirementsDigest",
91
+ "method",
92
+ "claimsVerified",
93
+ "livenessConfirmed",
94
+ "declaredRelationship",
95
+ "identityCommitment",
96
+ "cardDigestMultibase",
97
+ "validFrom",
98
+ "validUntil",
99
+ "tokenLabel",
100
+ "tokenSerial"
101
+ ],
102
+ "description": "What a Vetting Statement would have said, minus its issuer.",
103
+ "properties": {
104
+ "community": {
105
+ "type": "string",
106
+ "minLength": 1,
107
+ "description": "The community this attestation is for. An attestation is not portable between communities."
108
+ },
109
+ "requirementsDigest": {
110
+ "type": "string",
111
+ "minLength": 1,
112
+ "description": "The digest of the criterion's requirements as the vetter read them."
113
+ },
114
+ "method": {
115
+ "type": "string",
116
+ "enum": [
117
+ "inPerson",
118
+ "video",
119
+ "priorAcquaintance"
120
+ ],
121
+ "description": "How the vetter met the applicant."
122
+ },
123
+ "claimsVerified": {
124
+ "type": "array",
125
+ "minItems": 1,
126
+ "items": {
127
+ "type": "string",
128
+ "minLength": 1
129
+ },
130
+ "description": "The claim types the vetter checked."
131
+ },
132
+ "livenessConfirmed": {
133
+ "type": "boolean",
134
+ "description": "Whether the vetter confirmed a live person."
135
+ },
136
+ "declaredRelationship": {
137
+ "type": "string",
138
+ "enum": [
139
+ "none",
140
+ "family",
141
+ "sameEmployer",
142
+ "closeFriend",
143
+ "other"
144
+ ],
145
+ "description": "The relationship the vetter declared, which the community's independence rules count."
146
+ },
147
+ "identityCommitment": {
148
+ "type": "string",
149
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
150
+ "description": "The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them."
151
+ },
152
+ "cardDigestMultibase": {
153
+ "type": "string",
154
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
155
+ "description": "Digest of that card, as the vetter verified it."
156
+ },
157
+ "validFrom": {
158
+ "type": "string",
159
+ "format": "date",
160
+ "description": "A DATE, never a timestamp: an exact time would let a community line an attestation up with a vetter's activity, which undoes the proof without touching it."
161
+ },
162
+ "validUntil": {
163
+ "type": "string",
164
+ "format": "date",
165
+ "description": "A date, for the same reason."
166
+ },
167
+ "tokenLabel": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "maxLength": 128,
171
+ "description": "The token label spent, repeated inside the bound facts so it cannot be swapped in transit."
172
+ },
173
+ "tokenSerial": {
174
+ "type": "string",
175
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
176
+ "description": "The token serial spent, likewise bound."
177
+ }
178
+ }
179
+ },
180
+ "ApplicationSummary": {
181
+ "title": "ApplicationSummary",
182
+ "description": "An applicant engine as the VTA holds it, without its key.",
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": [
186
+ "applicationId",
187
+ "contextId",
188
+ "community",
189
+ "joinDid",
190
+ "suite",
191
+ "id",
192
+ "attestations",
193
+ "createdAt"
194
+ ],
195
+ "properties": {
196
+ "applicationId": {
197
+ "type": "string",
198
+ "minLength": 1,
199
+ "maxLength": 128,
200
+ "description": "The VTA's handle for this application. Opaque; never sent to the community."
201
+ },
202
+ "contextId": {
203
+ "type": "string",
204
+ "minLength": 1,
205
+ "description": "The context the application's key is derived in."
206
+ },
207
+ "community": {
208
+ "type": "string",
209
+ "minLength": 1,
210
+ "description": "The community's DID."
211
+ },
212
+ "joinDid": {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "description": "The DID the application joins as."
216
+ },
217
+ "suite": {
218
+ "type": "string",
219
+ "minLength": 1,
220
+ "maxLength": 64
221
+ },
222
+ "id": {
223
+ "$ref": "#/$defs/Multibase",
224
+ "description": "The applicant's PCS identifier: what a vetter attests to, carried in a vetting/request's `ext`."
225
+ },
226
+ "attestations": {
227
+ "type": "array",
228
+ "description": "The metadata of each attestation held, in the order received. Metadata names no vetter.",
229
+ "items": {
230
+ "$ref": "#/$defs/StatementMeta"
231
+ }
232
+ },
233
+ "createdAt": {
234
+ "type": "string",
235
+ "format": "date-time"
236
+ }
237
+ }
238
+ },
239
+ "Multibase": {
240
+ "title": "Multibase",
241
+ "description": "A binary value, multibase base58btc over the suite's canonical encoding.",
242
+ "type": "string",
243
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
244
+ },
245
+ "Attestation": {
246
+ "title": "Attestation",
247
+ "description": "An attestation as a vetter hands it to an applicant: the payload of vetting/attestation/0.1, without its `ext`. The engine produces it from vta/pcs/attest and takes it into vta/pcs/verify-attestation.",
248
+ "type": "object",
249
+ "additionalProperties": false,
250
+ "required": [
251
+ "suite",
252
+ "attestation",
253
+ "meta",
254
+ "token"
255
+ ],
256
+ "properties": {
257
+ "suite": {
258
+ "type": "string",
259
+ "minLength": 1,
260
+ "maxLength": 64,
261
+ "description": "The suite the attestation was made under, as the community publishes it."
262
+ },
263
+ "attestation": {
264
+ "$ref": "#/$defs/Multibase",
265
+ "description": "The attestation: a tag, a shown class credential and a proof. It names no vetter."
266
+ },
267
+ "meta": {
268
+ "$ref": "#/$defs/StatementMeta"
269
+ },
270
+ "token": {
271
+ "$ref": "#/$defs/AttestationToken"
272
+ }
273
+ }
274
+ },
275
+ "AttestationToken": {
276
+ "title": "AttestationToken",
277
+ "description": "The attestation token spent on one attestation: the label it was drawn under, the serial its spend reveals, and its re-randomised signature. The same members as `token` in vetting/attestation/0.1.",
278
+ "type": "object",
279
+ "additionalProperties": false,
280
+ "required": [
281
+ "label",
282
+ "serial",
283
+ "shown"
284
+ ],
285
+ "properties": {
286
+ "label": {
287
+ "type": "string",
288
+ "minLength": 1,
289
+ "maxLength": 128,
290
+ "description": "The token label spent under."
291
+ },
292
+ "serial": {
293
+ "$ref": "#/$defs/Multibase",
294
+ "description": "The serial revealed by the spend."
295
+ },
296
+ "shown": {
297
+ "$ref": "#/$defs/Multibase",
298
+ "description": "The re-randomised token signature, verifiable under the published token key."
299
+ }
300
+ }
301
+ },
302
+ "CommunityParameters": {
303
+ "title": "CommunityParameters",
304
+ "description": "The community's hidden-vetting parameters exactly as its join manifest publishes them, under the criterion's `vetting.ext`. The caller copies them in verbatim on every call that needs them, because the community rotates labels and the engine keeps no copy of its own: a stale copy costs the caller a refused proof, never a mistaken one.",
305
+ "$ref": "#/$defs/PublishedConfig"
306
+ },
307
+ "PublishedConfig": {
308
+ "title": "PublishedConfig",
309
+ "description": "The parameters exactly as they now appear in this community's join manifest, under vetting.ext. What an applicant and a vetter read.",
310
+ "type": "object",
311
+ "additionalProperties": false,
312
+ "required": [
313
+ "suite",
314
+ "helperKey",
315
+ "tokenKey",
316
+ "vetterLabels",
317
+ "tokenLabels",
318
+ "dripPerTick",
319
+ "tickLength",
320
+ "events"
321
+ ],
322
+ "properties": {
323
+ "suite": {
324
+ "type": "string",
325
+ "minLength": 1
326
+ },
327
+ "helperKey": {
328
+ "type": "string",
329
+ "minLength": 1,
330
+ "description": "The helper verification key, multibase — named for its role on the wire rather than for hvk."
331
+ },
332
+ "tokenKey": {
333
+ "type": "string",
334
+ "minLength": 1,
335
+ "description": "The token verification key, multibase — named for its role on the wire rather than for tvk."
336
+ },
337
+ "vetterLabels": {
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string",
341
+ "minLength": 1
342
+ },
343
+ "description": "Class labels published whole, e.g. vetter/2026-09 — a request names one of these, not the bare period."
344
+ },
345
+ "tokenLabels": {
346
+ "type": "array",
347
+ "items": {
348
+ "type": "string",
349
+ "minLength": 1
350
+ }
351
+ },
352
+ "dripPerTick": {
353
+ "type": "integer",
354
+ "minimum": 1
355
+ },
356
+ "tickLength": {
357
+ "$ref": "#/$defs/TickLength"
358
+ },
359
+ "events": {
360
+ "type": "array",
361
+ "items": {
362
+ "$ref": "#/$defs/PublishedEvent"
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "PublishedEvent": {
368
+ "title": "PublishedEvent",
369
+ "description": "The published shape drops approvedBy and graceDays: who approved is the community's own record, and a vetter is told closesAfter when its request is approved rather than being handed the raw grace period here.",
370
+ "type": "object",
371
+ "additionalProperties": false,
372
+ "required": [
373
+ "eventId",
374
+ "startDate",
375
+ "endDate",
376
+ "groupFloor",
377
+ "tiers"
378
+ ],
379
+ "properties": {
380
+ "eventId": {
381
+ "type": "string",
382
+ "minLength": 1
383
+ },
384
+ "startDate": {
385
+ "type": "string",
386
+ "format": "date"
387
+ },
388
+ "endDate": {
389
+ "type": "string",
390
+ "format": "date"
391
+ },
392
+ "groupFloor": {
393
+ "type": "integer",
394
+ "minimum": 1
395
+ },
396
+ "tiers": {
397
+ "type": "array",
398
+ "items": {
399
+ "$ref": "#/$defs/Tier"
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "Tier": {
405
+ "title": "Tier",
406
+ "type": "object",
407
+ "additionalProperties": false,
408
+ "required": [
409
+ "name",
410
+ "dripPerTick"
411
+ ],
412
+ "properties": {
413
+ "name": {
414
+ "type": "string",
415
+ "minLength": 1,
416
+ "description": "How the menu names it: desk, busy-desk."
417
+ },
418
+ "dripPerTick": {
419
+ "type": "integer",
420
+ "minimum": 1,
421
+ "description": "How many tokens a tick under this tier yields."
422
+ }
423
+ }
424
+ },
425
+ "TickLength": {
426
+ "title": "TickLength",
427
+ "type": "string",
428
+ "pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
429
+ "description": "The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`)."
430
+ }
431
+ }
432
+ };
433
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
434
+ export const RESPONSE_PAYLOAD_SCHEMA = {
435
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
436
+ "$ref": "#/$defs/Response",
437
+ "$defs": {
438
+ "Response": {
439
+ "$anchor": "response",
440
+ "title": "VTA PCS — Verify Attestation — response payload",
441
+ "type": "object",
442
+ "additionalProperties": false,
443
+ "required": [
444
+ "application",
445
+ "accepted"
446
+ ],
447
+ "properties": {
448
+ "application": {
449
+ "$ref": "#/$defs/ApplicationSummary"
450
+ },
451
+ "accepted": {
452
+ "$ref": "#/$defs/AttestationMeta",
453
+ "description": "The metadata of the attestation taken."
454
+ },
455
+ "ext": {
456
+ "$ref": "#/$defs/Ext"
457
+ }
458
+ }
459
+ },
460
+ "Ext": {
461
+ "title": "Ext",
462
+ "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.",
463
+ "type": "object",
464
+ "minProperties": 1,
465
+ "additionalProperties": true,
466
+ "propertyNames": {
467
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
468
+ }
469
+ },
470
+ "AttestationMeta": {
471
+ "title": "AttestationMeta",
472
+ "description": "The metadata of one attestation: what a Vetting Statement would have said, minus its issuer, as vetting/attestation/0.1 defines it.",
473
+ "$ref": "#/$defs/StatementMeta"
474
+ },
475
+ "StatementMeta": {
476
+ "type": "object",
477
+ "additionalProperties": false,
478
+ "required": [
479
+ "community",
480
+ "requirementsDigest",
481
+ "method",
482
+ "claimsVerified",
483
+ "livenessConfirmed",
484
+ "declaredRelationship",
485
+ "identityCommitment",
486
+ "cardDigestMultibase",
487
+ "validFrom",
488
+ "validUntil",
489
+ "tokenLabel",
490
+ "tokenSerial"
491
+ ],
492
+ "description": "What a Vetting Statement would have said, minus its issuer.",
493
+ "properties": {
494
+ "community": {
495
+ "type": "string",
496
+ "minLength": 1,
497
+ "description": "The community this attestation is for. An attestation is not portable between communities."
498
+ },
499
+ "requirementsDigest": {
500
+ "type": "string",
501
+ "minLength": 1,
502
+ "description": "The digest of the criterion's requirements as the vetter read them."
503
+ },
504
+ "method": {
505
+ "type": "string",
506
+ "enum": [
507
+ "inPerson",
508
+ "video",
509
+ "priorAcquaintance"
510
+ ],
511
+ "description": "How the vetter met the applicant."
512
+ },
513
+ "claimsVerified": {
514
+ "type": "array",
515
+ "minItems": 1,
516
+ "items": {
517
+ "type": "string",
518
+ "minLength": 1
519
+ },
520
+ "description": "The claim types the vetter checked."
521
+ },
522
+ "livenessConfirmed": {
523
+ "type": "boolean",
524
+ "description": "Whether the vetter confirmed a live person."
525
+ },
526
+ "declaredRelationship": {
527
+ "type": "string",
528
+ "enum": [
529
+ "none",
530
+ "family",
531
+ "sameEmployer",
532
+ "closeFriend",
533
+ "other"
534
+ ],
535
+ "description": "The relationship the vetter declared, which the community's independence rules count."
536
+ },
537
+ "identityCommitment": {
538
+ "type": "string",
539
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
540
+ "description": "The commitment on the Vetting Card the applicant showed. Consistency across attestations is what stops two applicants pooling them."
541
+ },
542
+ "cardDigestMultibase": {
543
+ "type": "string",
544
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
545
+ "description": "Digest of that card, as the vetter verified it."
546
+ },
547
+ "validFrom": {
548
+ "type": "string",
549
+ "format": "date",
550
+ "description": "A DATE, never a timestamp: an exact time would let a community line an attestation up with a vetter's activity, which undoes the proof without touching it."
551
+ },
552
+ "validUntil": {
553
+ "type": "string",
554
+ "format": "date",
555
+ "description": "A date, for the same reason."
556
+ },
557
+ "tokenLabel": {
558
+ "type": "string",
559
+ "minLength": 1,
560
+ "maxLength": 128,
561
+ "description": "The token label spent, repeated inside the bound facts so it cannot be swapped in transit."
562
+ },
563
+ "tokenSerial": {
564
+ "type": "string",
565
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
566
+ "description": "The token serial spent, likewise bound."
567
+ }
568
+ }
569
+ },
570
+ "ApplicationSummary": {
571
+ "title": "ApplicationSummary",
572
+ "description": "An applicant engine as the VTA holds it, without its key.",
573
+ "type": "object",
574
+ "additionalProperties": false,
575
+ "required": [
576
+ "applicationId",
577
+ "contextId",
578
+ "community",
579
+ "joinDid",
580
+ "suite",
581
+ "id",
582
+ "attestations",
583
+ "createdAt"
584
+ ],
585
+ "properties": {
586
+ "applicationId": {
587
+ "type": "string",
588
+ "minLength": 1,
589
+ "maxLength": 128,
590
+ "description": "The VTA's handle for this application. Opaque; never sent to the community."
591
+ },
592
+ "contextId": {
593
+ "type": "string",
594
+ "minLength": 1,
595
+ "description": "The context the application's key is derived in."
596
+ },
597
+ "community": {
598
+ "type": "string",
599
+ "minLength": 1,
600
+ "description": "The community's DID."
601
+ },
602
+ "joinDid": {
603
+ "type": "string",
604
+ "minLength": 1,
605
+ "description": "The DID the application joins as."
606
+ },
607
+ "suite": {
608
+ "type": "string",
609
+ "minLength": 1,
610
+ "maxLength": 64
611
+ },
612
+ "id": {
613
+ "$ref": "#/$defs/Multibase",
614
+ "description": "The applicant's PCS identifier: what a vetter attests to, carried in a vetting/request's `ext`."
615
+ },
616
+ "attestations": {
617
+ "type": "array",
618
+ "description": "The metadata of each attestation held, in the order received. Metadata names no vetter.",
619
+ "items": {
620
+ "$ref": "#/$defs/StatementMeta"
621
+ }
622
+ },
623
+ "createdAt": {
624
+ "type": "string",
625
+ "format": "date-time"
626
+ }
627
+ }
628
+ },
629
+ "Multibase": {
630
+ "title": "Multibase",
631
+ "description": "A binary value, multibase base58btc over the suite's canonical encoding.",
632
+ "type": "string",
633
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
634
+ },
635
+ "Attestation": {
636
+ "title": "Attestation",
637
+ "description": "An attestation as a vetter hands it to an applicant: the payload of vetting/attestation/0.1, without its `ext`. The engine produces it from vta/pcs/attest and takes it into vta/pcs/verify-attestation.",
638
+ "type": "object",
639
+ "additionalProperties": false,
640
+ "required": [
641
+ "suite",
642
+ "attestation",
643
+ "meta",
644
+ "token"
645
+ ],
646
+ "properties": {
647
+ "suite": {
648
+ "type": "string",
649
+ "minLength": 1,
650
+ "maxLength": 64,
651
+ "description": "The suite the attestation was made under, as the community publishes it."
652
+ },
653
+ "attestation": {
654
+ "$ref": "#/$defs/Multibase",
655
+ "description": "The attestation: a tag, a shown class credential and a proof. It names no vetter."
656
+ },
657
+ "meta": {
658
+ "$ref": "#/$defs/StatementMeta"
659
+ },
660
+ "token": {
661
+ "$ref": "#/$defs/AttestationToken"
662
+ }
663
+ }
664
+ },
665
+ "AttestationToken": {
666
+ "title": "AttestationToken",
667
+ "description": "The attestation token spent on one attestation: the label it was drawn under, the serial its spend reveals, and its re-randomised signature. The same members as `token` in vetting/attestation/0.1.",
668
+ "type": "object",
669
+ "additionalProperties": false,
670
+ "required": [
671
+ "label",
672
+ "serial",
673
+ "shown"
674
+ ],
675
+ "properties": {
676
+ "label": {
677
+ "type": "string",
678
+ "minLength": 1,
679
+ "maxLength": 128,
680
+ "description": "The token label spent under."
681
+ },
682
+ "serial": {
683
+ "$ref": "#/$defs/Multibase",
684
+ "description": "The serial revealed by the spend."
685
+ },
686
+ "shown": {
687
+ "$ref": "#/$defs/Multibase",
688
+ "description": "The re-randomised token signature, verifiable under the published token key."
689
+ }
690
+ }
691
+ },
692
+ "CommunityParameters": {
693
+ "title": "CommunityParameters",
694
+ "description": "The community's hidden-vetting parameters exactly as its join manifest publishes them, under the criterion's `vetting.ext`. The caller copies them in verbatim on every call that needs them, because the community rotates labels and the engine keeps no copy of its own: a stale copy costs the caller a refused proof, never a mistaken one.",
695
+ "$ref": "#/$defs/PublishedConfig"
696
+ },
697
+ "PublishedConfig": {
698
+ "title": "PublishedConfig",
699
+ "description": "The parameters exactly as they now appear in this community's join manifest, under vetting.ext. What an applicant and a vetter read.",
700
+ "type": "object",
701
+ "additionalProperties": false,
702
+ "required": [
703
+ "suite",
704
+ "helperKey",
705
+ "tokenKey",
706
+ "vetterLabels",
707
+ "tokenLabels",
708
+ "dripPerTick",
709
+ "tickLength",
710
+ "events"
711
+ ],
712
+ "properties": {
713
+ "suite": {
714
+ "type": "string",
715
+ "minLength": 1
716
+ },
717
+ "helperKey": {
718
+ "type": "string",
719
+ "minLength": 1,
720
+ "description": "The helper verification key, multibase — named for its role on the wire rather than for hvk."
721
+ },
722
+ "tokenKey": {
723
+ "type": "string",
724
+ "minLength": 1,
725
+ "description": "The token verification key, multibase — named for its role on the wire rather than for tvk."
726
+ },
727
+ "vetterLabels": {
728
+ "type": "array",
729
+ "items": {
730
+ "type": "string",
731
+ "minLength": 1
732
+ },
733
+ "description": "Class labels published whole, e.g. vetter/2026-09 — a request names one of these, not the bare period."
734
+ },
735
+ "tokenLabels": {
736
+ "type": "array",
737
+ "items": {
738
+ "type": "string",
739
+ "minLength": 1
740
+ }
741
+ },
742
+ "dripPerTick": {
743
+ "type": "integer",
744
+ "minimum": 1
745
+ },
746
+ "tickLength": {
747
+ "$ref": "#/$defs/TickLength"
748
+ },
749
+ "events": {
750
+ "type": "array",
751
+ "items": {
752
+ "$ref": "#/$defs/PublishedEvent"
753
+ }
754
+ }
755
+ }
756
+ },
757
+ "PublishedEvent": {
758
+ "title": "PublishedEvent",
759
+ "description": "The published shape drops approvedBy and graceDays: who approved is the community's own record, and a vetter is told closesAfter when its request is approved rather than being handed the raw grace period here.",
760
+ "type": "object",
761
+ "additionalProperties": false,
762
+ "required": [
763
+ "eventId",
764
+ "startDate",
765
+ "endDate",
766
+ "groupFloor",
767
+ "tiers"
768
+ ],
769
+ "properties": {
770
+ "eventId": {
771
+ "type": "string",
772
+ "minLength": 1
773
+ },
774
+ "startDate": {
775
+ "type": "string",
776
+ "format": "date"
777
+ },
778
+ "endDate": {
779
+ "type": "string",
780
+ "format": "date"
781
+ },
782
+ "groupFloor": {
783
+ "type": "integer",
784
+ "minimum": 1
785
+ },
786
+ "tiers": {
787
+ "type": "array",
788
+ "items": {
789
+ "$ref": "#/$defs/Tier"
790
+ }
791
+ }
792
+ }
793
+ },
794
+ "Tier": {
795
+ "title": "Tier",
796
+ "type": "object",
797
+ "additionalProperties": false,
798
+ "required": [
799
+ "name",
800
+ "dripPerTick"
801
+ ],
802
+ "properties": {
803
+ "name": {
804
+ "type": "string",
805
+ "minLength": 1,
806
+ "description": "How the menu names it: desk, busy-desk."
807
+ },
808
+ "dripPerTick": {
809
+ "type": "integer",
810
+ "minimum": 1,
811
+ "description": "How many tokens a tick under this tier yields."
812
+ }
813
+ }
814
+ },
815
+ "TickLength": {
816
+ "title": "TickLength",
817
+ "type": "string",
818
+ "pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
819
+ "description": "The length of one tick of the drip, as an ISO 8601 duration in days and/or hours — at least `PT1H`. A label's tick `t` is the window starting `t` tick lengths after the label's start (`vtc/vetting/vetters/pcs-tokens`)."
820
+ }
821
+ }
822
+ };
823
+ /**
824
+ * SPEC.md §7.2 policy for the request variant, from this specification's
825
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
826
+ * per-specification and cannot be derived from the document alone, and
827
+ * item 2 needs the schema this carries.
828
+ */
829
+ export const SPEC = {
830
+ typeUri: TYPE_URI,
831
+ isBearer: false,
832
+ isProofRequired: true,
833
+ isRecipientRequired: true,
834
+ isIssuedAtRequired: true,
835
+ payloadSchema: PAYLOAD_SCHEMA,
836
+ };
837
+ /**
838
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
839
+ * tracks the *issuer* party's requirement because a response swaps the
840
+ * parties (§7.3 item 5).
841
+ */
842
+ export const RESPONSE_SPEC = {
843
+ typeUri: RESPONSE_TYPE_URI,
844
+ isBearer: false,
845
+ isProofRequired: false,
846
+ isRecipientRequired: true,
847
+ isIssuedAtRequired: true,
848
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
849
+ };
850
+ //# sourceMappingURL=payload.js.map