@openvtc/trust-tasks 0.25.0 → 0.25.2

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