@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,681 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vta/pcs/root-accept/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { CommunityParameters, Ext, Multibase, PublishedConfig, PublishedEvent, TickLength, Tier, TokenDraw, VetterSummary } from "../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A vetter's client hands its VTA the community's answer to a root request; the VTA unblinds it into the vetter's class credential for the period and keeps it.
11
+ */
12
+ export interface VTAPCSRootAcceptPayload {
13
+ /**
14
+ * The context the engine belongs to. Its key is derived from this context's base.
15
+ */
16
+ contextId: string;
17
+ /**
18
+ * The community's DID: the helper whose parameters the engine runs under.
19
+ */
20
+ community: string;
21
+ /**
22
+ * The community's published hidden-vetting parameters, copied verbatim from its join manifest.
23
+ */
24
+ parameters: CommunityParameters;
25
+ /**
26
+ * The payload of the community's vtc/vetting/vetters/pcs-root/0.1 response, without its ext.
27
+ */
28
+ response: {
29
+ label: string;
30
+ preCredential: string;
31
+ };
32
+ ext?: Ext;
33
+ }
34
+ export interface VTAPCSRootAcceptResponsePayload {
35
+ vetter: VetterSummary;
36
+ ext?: Ext;
37
+ }
38
+
39
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
40
+ export type { CommunityParameters, Ext, Multibase, PublishedConfig, PublishedEvent, TickLength, Tier, TokenDraw, VetterSummary };
41
+
42
+ /** Trust Task type URI. */
43
+ export const TYPE_URI = "https://trusttasks.org/spec/vta/pcs/root-accept/0.1" as const;
44
+
45
+ /** Stable alias for this specification's request payload shape. */
46
+ export type Payload = VTAPCSRootAcceptPayload;
47
+
48
+ /** Trust Task response type URI (request type URI + "#response"). */
49
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vta/pcs/root-accept/0.1#response" as const;
50
+
51
+ /** Stable alias for this specification's success-response payload shape. */
52
+ export type Response = VTAPCSRootAcceptResponsePayload;
53
+
54
+ /**
55
+ * This specification's payload schema, as a value.
56
+ *
57
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
58
+ * rather than only as a `.json` file because TypeScript types are erased
59
+ * at runtime: without a schema a consumer has nothing to validate, and
60
+ * every REQUIRED payload member is optional in practice. Cross-file
61
+ * `$ref`s are already inlined, so it needs no resolver.
62
+ */
63
+ export const PAYLOAD_SCHEMA = {
64
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
65
+ "$id": "https://trusttasks.org/spec/vta/pcs/root-accept/0.1",
66
+ "title": "VTA PCS — Root Accept — payload",
67
+ "description": "A vetter's client hands its VTA the community's answer to a root request; the VTA unblinds it into the vetter's class credential for the period and keeps it.",
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "contextId",
72
+ "community",
73
+ "parameters",
74
+ "response"
75
+ ],
76
+ "properties": {
77
+ "contextId": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "description": "The context the engine belongs to. Its key is derived from this context's base."
81
+ },
82
+ "community": {
83
+ "type": "string",
84
+ "minLength": 1,
85
+ "description": "The community's DID: the helper whose parameters the engine runs under."
86
+ },
87
+ "parameters": {
88
+ "$ref": "#/$defs/CommunityParameters",
89
+ "description": "The community's published hidden-vetting parameters, copied verbatim from its join manifest."
90
+ },
91
+ "response": {
92
+ "type": "object",
93
+ "additionalProperties": false,
94
+ "required": [
95
+ "label",
96
+ "preCredential"
97
+ ],
98
+ "description": "The payload of the community's vtc/vetting/vetters/pcs-root/0.1 response, without its ext.",
99
+ "properties": {
100
+ "label": {
101
+ "type": "string",
102
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$"
103
+ },
104
+ "preCredential": {
105
+ "type": "string",
106
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
107
+ }
108
+ }
109
+ },
110
+ "ext": {
111
+ "$ref": "#/$defs/Ext"
112
+ }
113
+ },
114
+ "$defs": {
115
+ "Response": {
116
+ "$anchor": "response",
117
+ "title": "VTA PCS — Root Accept — response payload",
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": [
121
+ "vetter"
122
+ ],
123
+ "properties": {
124
+ "vetter": {
125
+ "$ref": "#/$defs/VetterSummary"
126
+ },
127
+ "ext": {
128
+ "$ref": "#/$defs/Ext"
129
+ }
130
+ }
131
+ },
132
+ "Ext": {
133
+ "title": "Ext",
134
+ "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.",
135
+ "type": "object",
136
+ "minProperties": 1,
137
+ "additionalProperties": true,
138
+ "propertyNames": {
139
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
140
+ }
141
+ },
142
+ "VetterSummary": {
143
+ "title": "VetterSummary",
144
+ "description": "A vetter engine as the VTA holds it, without its key, its credentials or its tokens.",
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "contextId",
149
+ "community",
150
+ "memberDid",
151
+ "suite",
152
+ "id",
153
+ "enrolledLabels",
154
+ "pendingLabels",
155
+ "tokensFree",
156
+ "tokensHeld",
157
+ "drawsInFlight",
158
+ "attested"
159
+ ],
160
+ "properties": {
161
+ "contextId": {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ "community": {
166
+ "type": "string",
167
+ "minLength": 1
168
+ },
169
+ "memberDid": {
170
+ "type": "string",
171
+ "minLength": 1,
172
+ "description": "The member DID the engine draws tokens as. Bound into every token request."
173
+ },
174
+ "suite": {
175
+ "type": "string",
176
+ "minLength": 1,
177
+ "maxLength": 64
178
+ },
179
+ "id": {
180
+ "$ref": "#/$defs/Multibase",
181
+ "description": "The vetter's PCS identifier for this community."
182
+ },
183
+ "enrolledLabels": {
184
+ "type": "array",
185
+ "description": "Class labels this vetter holds a credential under, newest first.",
186
+ "items": {
187
+ "type": "string",
188
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$"
189
+ }
190
+ },
191
+ "pendingLabels": {
192
+ "type": "array",
193
+ "description": "Class labels requested and not yet accepted.",
194
+ "items": {
195
+ "type": "string",
196
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$"
197
+ }
198
+ },
199
+ "tokensFree": {
200
+ "type": "integer",
201
+ "minimum": 0,
202
+ "description": "Tokens held and not reserved."
203
+ },
204
+ "tokensHeld": {
205
+ "type": "integer",
206
+ "minimum": 0,
207
+ "description": "Tokens held in all."
208
+ },
209
+ "drawsInFlight": {
210
+ "type": "array",
211
+ "description": "Draws requested and not yet accepted or abandoned.",
212
+ "items": {
213
+ "$ref": "#/$defs/TokenDraw"
214
+ }
215
+ },
216
+ "attested": {
217
+ "type": "integer",
218
+ "minimum": 0,
219
+ "description": "Attestations made through this engine."
220
+ }
221
+ }
222
+ },
223
+ "TokenDraw": {
224
+ "title": "TokenDraw",
225
+ "description": "One draw of the token drip: a label and a tick.",
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": [
229
+ "label",
230
+ "tick"
231
+ ],
232
+ "properties": {
233
+ "label": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "maxLength": 128
237
+ },
238
+ "tick": {
239
+ "type": "integer",
240
+ "minimum": 0
241
+ }
242
+ }
243
+ },
244
+ "Multibase": {
245
+ "title": "Multibase",
246
+ "description": "A binary value, multibase base58btc over the suite's canonical encoding.",
247
+ "type": "string",
248
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
249
+ },
250
+ "CommunityParameters": {
251
+ "title": "CommunityParameters",
252
+ "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.",
253
+ "$ref": "#/$defs/PublishedConfig"
254
+ },
255
+ "PublishedConfig": {
256
+ "title": "PublishedConfig",
257
+ "description": "The parameters exactly as they now appear in this community's join manifest, under vetting.ext. What an applicant and a vetter read.",
258
+ "type": "object",
259
+ "additionalProperties": false,
260
+ "required": [
261
+ "suite",
262
+ "helperKey",
263
+ "tokenKey",
264
+ "vetterLabels",
265
+ "tokenLabels",
266
+ "dripPerTick",
267
+ "tickLength",
268
+ "events"
269
+ ],
270
+ "properties": {
271
+ "suite": {
272
+ "type": "string",
273
+ "minLength": 1
274
+ },
275
+ "helperKey": {
276
+ "type": "string",
277
+ "minLength": 1,
278
+ "description": "The helper verification key, multibase — named for its role on the wire rather than for hvk."
279
+ },
280
+ "tokenKey": {
281
+ "type": "string",
282
+ "minLength": 1,
283
+ "description": "The token verification key, multibase — named for its role on the wire rather than for tvk."
284
+ },
285
+ "vetterLabels": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "string",
289
+ "minLength": 1
290
+ },
291
+ "description": "Class labels published whole, e.g. vetter/2026-09 — a request names one of these, not the bare period."
292
+ },
293
+ "tokenLabels": {
294
+ "type": "array",
295
+ "items": {
296
+ "type": "string",
297
+ "minLength": 1
298
+ }
299
+ },
300
+ "dripPerTick": {
301
+ "type": "integer",
302
+ "minimum": 1
303
+ },
304
+ "tickLength": {
305
+ "$ref": "#/$defs/TickLength"
306
+ },
307
+ "events": {
308
+ "type": "array",
309
+ "items": {
310
+ "$ref": "#/$defs/PublishedEvent"
311
+ }
312
+ }
313
+ }
314
+ },
315
+ "PublishedEvent": {
316
+ "title": "PublishedEvent",
317
+ "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.",
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "required": [
321
+ "eventId",
322
+ "startDate",
323
+ "endDate",
324
+ "groupFloor",
325
+ "tiers"
326
+ ],
327
+ "properties": {
328
+ "eventId": {
329
+ "type": "string",
330
+ "minLength": 1
331
+ },
332
+ "startDate": {
333
+ "type": "string",
334
+ "format": "date"
335
+ },
336
+ "endDate": {
337
+ "type": "string",
338
+ "format": "date"
339
+ },
340
+ "groupFloor": {
341
+ "type": "integer",
342
+ "minimum": 1
343
+ },
344
+ "tiers": {
345
+ "type": "array",
346
+ "items": {
347
+ "$ref": "#/$defs/Tier"
348
+ }
349
+ }
350
+ }
351
+ },
352
+ "Tier": {
353
+ "title": "Tier",
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "required": [
357
+ "name",
358
+ "dripPerTick"
359
+ ],
360
+ "properties": {
361
+ "name": {
362
+ "type": "string",
363
+ "minLength": 1,
364
+ "description": "How the menu names it: desk, busy-desk."
365
+ },
366
+ "dripPerTick": {
367
+ "type": "integer",
368
+ "minimum": 1,
369
+ "description": "How many tokens a tick under this tier yields."
370
+ }
371
+ }
372
+ },
373
+ "TickLength": {
374
+ "title": "TickLength",
375
+ "type": "string",
376
+ "pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
377
+ "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`)."
378
+ }
379
+ }
380
+ } as const;
381
+
382
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
383
+ export const RESPONSE_PAYLOAD_SCHEMA = {
384
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
385
+ "$ref": "#/$defs/Response",
386
+ "$defs": {
387
+ "Response": {
388
+ "$anchor": "response",
389
+ "title": "VTA PCS — Root Accept — response payload",
390
+ "type": "object",
391
+ "additionalProperties": false,
392
+ "required": [
393
+ "vetter"
394
+ ],
395
+ "properties": {
396
+ "vetter": {
397
+ "$ref": "#/$defs/VetterSummary"
398
+ },
399
+ "ext": {
400
+ "$ref": "#/$defs/Ext"
401
+ }
402
+ }
403
+ },
404
+ "Ext": {
405
+ "title": "Ext",
406
+ "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.",
407
+ "type": "object",
408
+ "minProperties": 1,
409
+ "additionalProperties": true,
410
+ "propertyNames": {
411
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
412
+ }
413
+ },
414
+ "VetterSummary": {
415
+ "title": "VetterSummary",
416
+ "description": "A vetter engine as the VTA holds it, without its key, its credentials or its tokens.",
417
+ "type": "object",
418
+ "additionalProperties": false,
419
+ "required": [
420
+ "contextId",
421
+ "community",
422
+ "memberDid",
423
+ "suite",
424
+ "id",
425
+ "enrolledLabels",
426
+ "pendingLabels",
427
+ "tokensFree",
428
+ "tokensHeld",
429
+ "drawsInFlight",
430
+ "attested"
431
+ ],
432
+ "properties": {
433
+ "contextId": {
434
+ "type": "string",
435
+ "minLength": 1
436
+ },
437
+ "community": {
438
+ "type": "string",
439
+ "minLength": 1
440
+ },
441
+ "memberDid": {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "description": "The member DID the engine draws tokens as. Bound into every token request."
445
+ },
446
+ "suite": {
447
+ "type": "string",
448
+ "minLength": 1,
449
+ "maxLength": 64
450
+ },
451
+ "id": {
452
+ "$ref": "#/$defs/Multibase",
453
+ "description": "The vetter's PCS identifier for this community."
454
+ },
455
+ "enrolledLabels": {
456
+ "type": "array",
457
+ "description": "Class labels this vetter holds a credential under, newest first.",
458
+ "items": {
459
+ "type": "string",
460
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$"
461
+ }
462
+ },
463
+ "pendingLabels": {
464
+ "type": "array",
465
+ "description": "Class labels requested and not yet accepted.",
466
+ "items": {
467
+ "type": "string",
468
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$"
469
+ }
470
+ },
471
+ "tokensFree": {
472
+ "type": "integer",
473
+ "minimum": 0,
474
+ "description": "Tokens held and not reserved."
475
+ },
476
+ "tokensHeld": {
477
+ "type": "integer",
478
+ "minimum": 0,
479
+ "description": "Tokens held in all."
480
+ },
481
+ "drawsInFlight": {
482
+ "type": "array",
483
+ "description": "Draws requested and not yet accepted or abandoned.",
484
+ "items": {
485
+ "$ref": "#/$defs/TokenDraw"
486
+ }
487
+ },
488
+ "attested": {
489
+ "type": "integer",
490
+ "minimum": 0,
491
+ "description": "Attestations made through this engine."
492
+ }
493
+ }
494
+ },
495
+ "TokenDraw": {
496
+ "title": "TokenDraw",
497
+ "description": "One draw of the token drip: a label and a tick.",
498
+ "type": "object",
499
+ "additionalProperties": false,
500
+ "required": [
501
+ "label",
502
+ "tick"
503
+ ],
504
+ "properties": {
505
+ "label": {
506
+ "type": "string",
507
+ "minLength": 1,
508
+ "maxLength": 128
509
+ },
510
+ "tick": {
511
+ "type": "integer",
512
+ "minimum": 0
513
+ }
514
+ }
515
+ },
516
+ "Multibase": {
517
+ "title": "Multibase",
518
+ "description": "A binary value, multibase base58btc over the suite's canonical encoding.",
519
+ "type": "string",
520
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$"
521
+ },
522
+ "CommunityParameters": {
523
+ "title": "CommunityParameters",
524
+ "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.",
525
+ "$ref": "#/$defs/PublishedConfig"
526
+ },
527
+ "PublishedConfig": {
528
+ "title": "PublishedConfig",
529
+ "description": "The parameters exactly as they now appear in this community's join manifest, under vetting.ext. What an applicant and a vetter read.",
530
+ "type": "object",
531
+ "additionalProperties": false,
532
+ "required": [
533
+ "suite",
534
+ "helperKey",
535
+ "tokenKey",
536
+ "vetterLabels",
537
+ "tokenLabels",
538
+ "dripPerTick",
539
+ "tickLength",
540
+ "events"
541
+ ],
542
+ "properties": {
543
+ "suite": {
544
+ "type": "string",
545
+ "minLength": 1
546
+ },
547
+ "helperKey": {
548
+ "type": "string",
549
+ "minLength": 1,
550
+ "description": "The helper verification key, multibase — named for its role on the wire rather than for hvk."
551
+ },
552
+ "tokenKey": {
553
+ "type": "string",
554
+ "minLength": 1,
555
+ "description": "The token verification key, multibase — named for its role on the wire rather than for tvk."
556
+ },
557
+ "vetterLabels": {
558
+ "type": "array",
559
+ "items": {
560
+ "type": "string",
561
+ "minLength": 1
562
+ },
563
+ "description": "Class labels published whole, e.g. vetter/2026-09 — a request names one of these, not the bare period."
564
+ },
565
+ "tokenLabels": {
566
+ "type": "array",
567
+ "items": {
568
+ "type": "string",
569
+ "minLength": 1
570
+ }
571
+ },
572
+ "dripPerTick": {
573
+ "type": "integer",
574
+ "minimum": 1
575
+ },
576
+ "tickLength": {
577
+ "$ref": "#/$defs/TickLength"
578
+ },
579
+ "events": {
580
+ "type": "array",
581
+ "items": {
582
+ "$ref": "#/$defs/PublishedEvent"
583
+ }
584
+ }
585
+ }
586
+ },
587
+ "PublishedEvent": {
588
+ "title": "PublishedEvent",
589
+ "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.",
590
+ "type": "object",
591
+ "additionalProperties": false,
592
+ "required": [
593
+ "eventId",
594
+ "startDate",
595
+ "endDate",
596
+ "groupFloor",
597
+ "tiers"
598
+ ],
599
+ "properties": {
600
+ "eventId": {
601
+ "type": "string",
602
+ "minLength": 1
603
+ },
604
+ "startDate": {
605
+ "type": "string",
606
+ "format": "date"
607
+ },
608
+ "endDate": {
609
+ "type": "string",
610
+ "format": "date"
611
+ },
612
+ "groupFloor": {
613
+ "type": "integer",
614
+ "minimum": 1
615
+ },
616
+ "tiers": {
617
+ "type": "array",
618
+ "items": {
619
+ "$ref": "#/$defs/Tier"
620
+ }
621
+ }
622
+ }
623
+ },
624
+ "Tier": {
625
+ "title": "Tier",
626
+ "type": "object",
627
+ "additionalProperties": false,
628
+ "required": [
629
+ "name",
630
+ "dripPerTick"
631
+ ],
632
+ "properties": {
633
+ "name": {
634
+ "type": "string",
635
+ "minLength": 1,
636
+ "description": "How the menu names it: desk, busy-desk."
637
+ },
638
+ "dripPerTick": {
639
+ "type": "integer",
640
+ "minimum": 1,
641
+ "description": "How many tokens a tick under this tier yields."
642
+ }
643
+ }
644
+ },
645
+ "TickLength": {
646
+ "title": "TickLength",
647
+ "type": "string",
648
+ "pattern": "^P(?:\\d+D(?:T\\d+H)?|T\\d+H)$",
649
+ "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`)."
650
+ }
651
+ }
652
+ } as const;
653
+
654
+ /**
655
+ * SPEC.md §7.2 policy for the request variant, from this specification's
656
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
657
+ * per-specification and cannot be derived from the document alone, and
658
+ * item 2 needs the schema this carries.
659
+ */
660
+ export const SPEC = {
661
+ typeUri: TYPE_URI,
662
+ isBearer: false,
663
+ isProofRequired: true,
664
+ isRecipientRequired: true,
665
+ isIssuedAtRequired: true,
666
+ payloadSchema: PAYLOAD_SCHEMA,
667
+ } as const;
668
+
669
+ /**
670
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
671
+ * tracks the *issuer* party's requirement because a response swaps the
672
+ * parties (§7.3 item 5).
673
+ */
674
+ export const RESPONSE_SPEC = {
675
+ typeUri: RESPONSE_TYPE_URI,
676
+ isBearer: false,
677
+ isProofRequired: false,
678
+ isRecipientRequired: true,
679
+ isIssuedAtRequired: true,
680
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
681
+ } as const;