@openvtc/trust-tasks 0.20.0 → 0.20.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 (37) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/dist/index.d.ts +6 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +6 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/persona/attribute/get/1.0/payload.d.ts +1221 -0
  7. package/dist/persona/attribute/get/1.0/payload.d.ts.map +1 -0
  8. package/dist/persona/attribute/get/1.0/payload.js +719 -0
  9. package/dist/persona/attribute/get/1.0/payload.js.map +1 -0
  10. package/dist/vetting/attestation/0.1/payload.d.ts +690 -0
  11. package/dist/vetting/attestation/0.1/payload.d.ts.map +1 -0
  12. package/dist/vetting/attestation/0.1/payload.js +374 -0
  13. package/dist/vetting/attestation/0.1/payload.js.map +1 -0
  14. package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts +261 -0
  15. package/dist/vtc/vetting/pcs-challenge/0.1/payload.d.ts.map +1 -0
  16. package/dist/vtc/vetting/pcs-challenge/0.1/payload.js +145 -0
  17. package/dist/vtc/vetting/pcs-challenge/0.1/payload.js.map +1 -0
  18. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts +546 -0
  19. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.d.ts.map +1 -0
  20. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js +290 -0
  21. package/dist/vtc/vetting/vetters/event-mode/0.1/payload.js.map +1 -0
  22. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts +336 -0
  23. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.d.ts.map +1 -0
  24. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js +178 -0
  25. package/dist/vtc/vetting/vetters/pcs-root/0.1/payload.js.map +1 -0
  26. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts +402 -0
  27. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.d.ts.map +1 -0
  28. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js +205 -0
  29. package/dist/vtc/vetting/vetters/pcs-tokens/0.1/payload.js.map +1 -0
  30. package/package.json +1 -1
  31. package/src/index.ts +6 -0
  32. package/src/persona/attribute/get/1.0/payload.ts +785 -0
  33. package/src/vetting/attestation/0.1/payload.ts +493 -0
  34. package/src/vtc/vetting/pcs-challenge/0.1/payload.ts +187 -0
  35. package/src/vtc/vetting/vetters/event-mode/0.1/payload.ts +375 -0
  36. package/src/vtc/vetting/vetters/pcs-root/0.1/payload.ts +241 -0
  37. package/src/vtc/vetting/vetters/pcs-tokens/0.1/payload.ts +286 -0
@@ -0,0 +1,375 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/vetting/vetters/event-mode/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A vetter asks to vet at a named event, at one of the rates the community publishes. The community answers where the request stands; it does not answer whether it was granted, because a vetter cannot raise its own cap and the group it would join may not exist yet.
11
+ */
12
+ export interface VTCVettingEventModePayload {
13
+ /**
14
+ * The event, as the community names it. It is the whole anonymity set for anything spent under this event's tokens, so it names a gathering people attend — never one desk, one day or one vetter.
15
+ */
16
+ eventId: string;
17
+ /**
18
+ * One of the tiers the community publishes. A tier is picked from a menu rather than a number being named, so that no vetter's requested rate is itself a distinguishing detail.
19
+ */
20
+ tier: string;
21
+ window: EventWindow;
22
+ ext?: Ext;
23
+ }
24
+ /**
25
+ * The days the event runs. Dates, not timestamps: an hour would say when a vetter expects to be at a desk, and the tokens are day-scale anyway.
26
+ */
27
+ export interface EventWindow {
28
+ /**
29
+ * First day of the event, inclusive.
30
+ */
31
+ startDate: string;
32
+ /**
33
+ * Last day of the event, inclusive. It is not before `startDate`.
34
+ */
35
+ endDate: string;
36
+ }
37
+ /**
38
+ * Where the request stands. `pending` is the ordinary answer to a first request and is not a refusal — a refusal is a `trust-task-error`.
39
+ */
40
+ export interface VTCVettingEventModeResponsePayload {
41
+ /**
42
+ * The event the request names.
43
+ */
44
+ eventId: string;
45
+ /**
46
+ * `pending`: recorded, awaiting an approver and the group floor. `approved`: the event's label is live and this vetter may draw under it.
47
+ */
48
+ state: "pending" | "approved";
49
+ /**
50
+ * The tier recorded for this vetter at this event.
51
+ */
52
+ tier: string;
53
+ window: EventWindow;
54
+ /**
55
+ * How many vetters have asked for this event so far, including this one. A count, never a list: who else is at the event is the anonymity set, and naming its members would hand out the very thing the set exists to hide.
56
+ */
57
+ groupSize: number;
58
+ /**
59
+ * How many vetters this community requires before an event may be approved at all. A one-vetter event is an event key with one holder, which is a name.
60
+ */
61
+ groupFloor: number;
62
+ /**
63
+ * Present when `state` is `approved`: the token label to draw under, for `vtc/vetting/vetters/pcs-tokens`.
64
+ */
65
+ label?: string;
66
+ /**
67
+ * Present when `state` is `approved`: how many tokens a tick under this label yields. It is the tier's rate, and it is the community's cap, not the vetter's request.
68
+ */
69
+ dripPerTick?: number;
70
+ /**
71
+ * Present when `state` is `approved`: the last day this label will be accepted. It is after `window.endDate` by the community's grace period, so an applicant met on the final day still has time to submit.
72
+ */
73
+ closesAfter?: string;
74
+ ext?: Ext;
75
+ }
76
+
77
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
78
+ export type { Ext };
79
+
80
+ /** Trust Task type URI. */
81
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/event-mode/0.1" as const;
82
+
83
+ /** Stable alias for this specification's request payload shape. */
84
+ export type Payload = VTCVettingEventModePayload;
85
+
86
+ /** Trust Task response type URI (request type URI + "#response"). */
87
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/event-mode/0.1#response" as const;
88
+
89
+ /** Stable alias for this specification's success-response payload shape. */
90
+ export type Response = VTCVettingEventModeResponsePayload;
91
+
92
+ /**
93
+ * This specification's payload schema, as a value.
94
+ *
95
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
96
+ * rather than only as a `.json` file because TypeScript types are erased
97
+ * at runtime: without a schema a consumer has nothing to validate, and
98
+ * every REQUIRED payload member is optional in practice. Cross-file
99
+ * `$ref`s are already inlined, so it needs no resolver.
100
+ */
101
+ export const PAYLOAD_SCHEMA = {
102
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
103
+ "$id": "https://trusttasks.org/spec/vtc/vetting/vetters/event-mode/0.1",
104
+ "title": "VTC — Vetting Event Mode — payload",
105
+ "description": "A vetter asks to vet at a named event, at one of the rates the community publishes. The community answers where the request stands; it does not answer whether it was granted, because a vetter cannot raise its own cap and the group it would join may not exist yet.",
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "eventId",
110
+ "tier",
111
+ "window"
112
+ ],
113
+ "properties": {
114
+ "eventId": {
115
+ "type": "string",
116
+ "minLength": 1,
117
+ "maxLength": 64,
118
+ "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
119
+ "description": "The event, as the community names it. It is the whole anonymity set for anything spent under this event's tokens, so it names a gathering people attend — never one desk, one day or one vetter."
120
+ },
121
+ "tier": {
122
+ "type": "string",
123
+ "minLength": 1,
124
+ "maxLength": 64,
125
+ "description": "One of the tiers the community publishes. A tier is picked from a menu rather than a number being named, so that no vetter's requested rate is itself a distinguishing detail."
126
+ },
127
+ "window": {
128
+ "$ref": "#/$defs/Window"
129
+ },
130
+ "ext": {
131
+ "$ref": "#/$defs/Ext"
132
+ }
133
+ },
134
+ "$defs": {
135
+ "Window": {
136
+ "title": "Event window",
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": [
140
+ "startDate",
141
+ "endDate"
142
+ ],
143
+ "description": "The days the event runs. Dates, not timestamps: an hour would say when a vetter expects to be at a desk, and the tokens are day-scale anyway.",
144
+ "properties": {
145
+ "startDate": {
146
+ "type": "string",
147
+ "format": "date",
148
+ "description": "First day of the event, inclusive."
149
+ },
150
+ "endDate": {
151
+ "type": "string",
152
+ "format": "date",
153
+ "description": "Last day of the event, inclusive. It is not before `startDate`."
154
+ }
155
+ }
156
+ },
157
+ "Response": {
158
+ "$anchor": "response",
159
+ "title": "VTC Vetting Event Mode — response payload",
160
+ "type": "object",
161
+ "additionalProperties": false,
162
+ "required": [
163
+ "eventId",
164
+ "state",
165
+ "tier",
166
+ "window",
167
+ "groupSize",
168
+ "groupFloor"
169
+ ],
170
+ "description": "Where the request stands. `pending` is the ordinary answer to a first request and is not a refusal — a refusal is a `trust-task-error`.",
171
+ "properties": {
172
+ "eventId": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "maxLength": 64,
176
+ "description": "The event the request names."
177
+ },
178
+ "state": {
179
+ "type": "string",
180
+ "enum": [
181
+ "pending",
182
+ "approved"
183
+ ],
184
+ "description": "`pending`: recorded, awaiting an approver and the group floor. `approved`: the event's label is live and this vetter may draw under it."
185
+ },
186
+ "tier": {
187
+ "type": "string",
188
+ "minLength": 1,
189
+ "maxLength": 64,
190
+ "description": "The tier recorded for this vetter at this event."
191
+ },
192
+ "window": {
193
+ "$ref": "#/$defs/Window"
194
+ },
195
+ "groupSize": {
196
+ "type": "integer",
197
+ "minimum": 0,
198
+ "description": "How many vetters have asked for this event so far, including this one. A count, never a list: who else is at the event is the anonymity set, and naming its members would hand out the very thing the set exists to hide."
199
+ },
200
+ "groupFloor": {
201
+ "type": "integer",
202
+ "minimum": 2,
203
+ "description": "How many vetters this community requires before an event may be approved at all. A one-vetter event is an event key with one holder, which is a name."
204
+ },
205
+ "label": {
206
+ "type": "string",
207
+ "minLength": 1,
208
+ "maxLength": 128,
209
+ "description": "Present when `state` is `approved`: the token label to draw under, for `vtc/vetting/vetters/pcs-tokens`."
210
+ },
211
+ "dripPerTick": {
212
+ "type": "integer",
213
+ "minimum": 1,
214
+ "description": "Present when `state` is `approved`: how many tokens a tick under this label yields. It is the tier's rate, and it is the community's cap, not the vetter's request."
215
+ },
216
+ "closesAfter": {
217
+ "type": "string",
218
+ "format": "date",
219
+ "description": "Present when `state` is `approved`: the last day this label will be accepted. It is after `window.endDate` by the community's grace period, so an applicant met on the final day still has time to submit."
220
+ },
221
+ "ext": {
222
+ "$ref": "#/$defs/Ext"
223
+ }
224
+ }
225
+ },
226
+ "Ext": {
227
+ "title": "Ext",
228
+ "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.",
229
+ "type": "object",
230
+ "minProperties": 1,
231
+ "additionalProperties": true,
232
+ "propertyNames": {
233
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
234
+ }
235
+ }
236
+ }
237
+ } as const;
238
+
239
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
240
+ export const RESPONSE_PAYLOAD_SCHEMA = {
241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
242
+ "$ref": "#/$defs/Response",
243
+ "$defs": {
244
+ "Window": {
245
+ "title": "Event window",
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": [
249
+ "startDate",
250
+ "endDate"
251
+ ],
252
+ "description": "The days the event runs. Dates, not timestamps: an hour would say when a vetter expects to be at a desk, and the tokens are day-scale anyway.",
253
+ "properties": {
254
+ "startDate": {
255
+ "type": "string",
256
+ "format": "date",
257
+ "description": "First day of the event, inclusive."
258
+ },
259
+ "endDate": {
260
+ "type": "string",
261
+ "format": "date",
262
+ "description": "Last day of the event, inclusive. It is not before `startDate`."
263
+ }
264
+ }
265
+ },
266
+ "Response": {
267
+ "$anchor": "response",
268
+ "title": "VTC Vetting Event Mode — response payload",
269
+ "type": "object",
270
+ "additionalProperties": false,
271
+ "required": [
272
+ "eventId",
273
+ "state",
274
+ "tier",
275
+ "window",
276
+ "groupSize",
277
+ "groupFloor"
278
+ ],
279
+ "description": "Where the request stands. `pending` is the ordinary answer to a first request and is not a refusal — a refusal is a `trust-task-error`.",
280
+ "properties": {
281
+ "eventId": {
282
+ "type": "string",
283
+ "minLength": 1,
284
+ "maxLength": 64,
285
+ "description": "The event the request names."
286
+ },
287
+ "state": {
288
+ "type": "string",
289
+ "enum": [
290
+ "pending",
291
+ "approved"
292
+ ],
293
+ "description": "`pending`: recorded, awaiting an approver and the group floor. `approved`: the event's label is live and this vetter may draw under it."
294
+ },
295
+ "tier": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "maxLength": 64,
299
+ "description": "The tier recorded for this vetter at this event."
300
+ },
301
+ "window": {
302
+ "$ref": "#/$defs/Window"
303
+ },
304
+ "groupSize": {
305
+ "type": "integer",
306
+ "minimum": 0,
307
+ "description": "How many vetters have asked for this event so far, including this one. A count, never a list: who else is at the event is the anonymity set, and naming its members would hand out the very thing the set exists to hide."
308
+ },
309
+ "groupFloor": {
310
+ "type": "integer",
311
+ "minimum": 2,
312
+ "description": "How many vetters this community requires before an event may be approved at all. A one-vetter event is an event key with one holder, which is a name."
313
+ },
314
+ "label": {
315
+ "type": "string",
316
+ "minLength": 1,
317
+ "maxLength": 128,
318
+ "description": "Present when `state` is `approved`: the token label to draw under, for `vtc/vetting/vetters/pcs-tokens`."
319
+ },
320
+ "dripPerTick": {
321
+ "type": "integer",
322
+ "minimum": 1,
323
+ "description": "Present when `state` is `approved`: how many tokens a tick under this label yields. It is the tier's rate, and it is the community's cap, not the vetter's request."
324
+ },
325
+ "closesAfter": {
326
+ "type": "string",
327
+ "format": "date",
328
+ "description": "Present when `state` is `approved`: the last day this label will be accepted. It is after `window.endDate` by the community's grace period, so an applicant met on the final day still has time to submit."
329
+ },
330
+ "ext": {
331
+ "$ref": "#/$defs/Ext"
332
+ }
333
+ }
334
+ },
335
+ "Ext": {
336
+ "title": "Ext",
337
+ "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.",
338
+ "type": "object",
339
+ "minProperties": 1,
340
+ "additionalProperties": true,
341
+ "propertyNames": {
342
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
343
+ }
344
+ }
345
+ }
346
+ } as const;
347
+
348
+ /**
349
+ * SPEC.md §7.2 policy for the request variant, from this specification's
350
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
351
+ * per-specification and cannot be derived from the document alone, and
352
+ * item 2 needs the schema this carries.
353
+ */
354
+ export const SPEC = {
355
+ typeUri: TYPE_URI,
356
+ isBearer: false,
357
+ isProofRequired: true,
358
+ isRecipientRequired: true,
359
+ isIssuedAtRequired: true,
360
+ payloadSchema: PAYLOAD_SCHEMA,
361
+ } as const;
362
+
363
+ /**
364
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
365
+ * tracks the *issuer* party's requirement because a response swaps the
366
+ * parties (§7.3 item 5).
367
+ */
368
+ export const RESPONSE_SPEC = {
369
+ typeUri: RESPONSE_TYPE_URI,
370
+ isBearer: false,
371
+ isProofRequired: true,
372
+ isRecipientRequired: true,
373
+ isIssuedAtRequired: true,
374
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
375
+ } as const;
@@ -0,0 +1,241 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/vtc/vetting/vetters/pcs-root/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A vetter asks the community to blind-sign its class credential for a vetting period. What the community signs is a commitment it cannot open, so the credential it issues is one it cannot later recognise — which is what lets the vetter attest without being named.
11
+ */
12
+ export interface VTCVettingPCSRootCredentialPayload {
13
+ /**
14
+ * The class label asked for, `vetter/<YYYY-MM>`. A community issues under its current label only; a stale client is refused rather than silently served under another.
15
+ */
16
+ label: string;
17
+ /**
18
+ * The vetter's PCS identifier, multibase base58btc. Recorded once and required again at every later label: a member holding two identifiers could be counted twice in one proof.
19
+ */
20
+ id: string;
21
+ /**
22
+ * The blinded root request, as the suite serialises it. Opaque to the community beyond verifying it; its members are fixed by the suite named in the criterion's parameters, not by this schema.
23
+ */
24
+ request: {
25
+ /**
26
+ * The issuance encoding the suite carries.
27
+ */
28
+ encoding?: string;
29
+ /**
30
+ * The request's tag under the root context.
31
+ */
32
+ t0?: string;
33
+ /**
34
+ * The proof that the commitment is well formed and the requester holds its secret.
35
+ */
36
+ proof: string;
37
+ };
38
+ ext?: Ext;
39
+ }
40
+ /**
41
+ * The blind pre-credential. The vetter unblinds it into a credential the community has never seen.
42
+ */
43
+ export interface VTCVettingPCSRootCredentialResponsePayload {
44
+ /**
45
+ * The label signed under — the one asked for.
46
+ */
47
+ label: string;
48
+ /**
49
+ * The pre-credential, multibase base58btc. Useless to anyone but the holder of the request's blinding state.
50
+ */
51
+ preCredential: string;
52
+ ext?: Ext;
53
+ }
54
+
55
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
56
+ export type { Ext };
57
+
58
+ /** Trust Task type URI. */
59
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-root/0.1" as const;
60
+
61
+ /** Stable alias for this specification's request payload shape. */
62
+ export type Payload = VTCVettingPCSRootCredentialPayload;
63
+
64
+ /** Trust Task response type URI (request type URI + "#response"). */
65
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-root/0.1#response" as const;
66
+
67
+ /** Stable alias for this specification's success-response payload shape. */
68
+ export type Response = VTCVettingPCSRootCredentialResponsePayload;
69
+
70
+ /**
71
+ * This specification's payload schema, as a value.
72
+ *
73
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
74
+ * rather than only as a `.json` file because TypeScript types are erased
75
+ * at runtime: without a schema a consumer has nothing to validate, and
76
+ * every REQUIRED payload member is optional in practice. Cross-file
77
+ * `$ref`s are already inlined, so it needs no resolver.
78
+ */
79
+ export const PAYLOAD_SCHEMA = {
80
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
81
+ "$id": "https://trusttasks.org/spec/vtc/vetting/vetters/pcs-root/0.1",
82
+ "title": "VTC — Vetting PCS Root Credential — payload",
83
+ "description": "A vetter asks the community to blind-sign its class credential for a vetting period. What the community signs is a commitment it cannot open, so the credential it issues is one it cannot later recognise — which is what lets the vetter attest without being named.",
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "label",
88
+ "id",
89
+ "request"
90
+ ],
91
+ "properties": {
92
+ "label": {
93
+ "type": "string",
94
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$",
95
+ "description": "The class label asked for, `vetter/<YYYY-MM>`. A community issues under its current label only; a stale client is refused rather than silently served under another."
96
+ },
97
+ "id": {
98
+ "type": "string",
99
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
100
+ "description": "The vetter's PCS identifier, multibase base58btc. Recorded once and required again at every later label: a member holding two identifiers could be counted twice in one proof."
101
+ },
102
+ "request": {
103
+ "type": "object",
104
+ "description": "The blinded root request, as the suite serialises it. Opaque to the community beyond verifying it; its members are fixed by the suite named in the criterion's parameters, not by this schema.",
105
+ "properties": {
106
+ "encoding": {
107
+ "type": "string",
108
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
109
+ "description": "The issuance encoding the suite carries."
110
+ },
111
+ "t0": {
112
+ "type": "string",
113
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
114
+ "description": "The request's tag under the root context."
115
+ },
116
+ "proof": {
117
+ "type": "string",
118
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
119
+ "description": "The proof that the commitment is well formed and the requester holds its secret."
120
+ }
121
+ },
122
+ "required": [
123
+ "proof"
124
+ ]
125
+ },
126
+ "ext": {
127
+ "$ref": "#/$defs/Ext"
128
+ }
129
+ },
130
+ "$defs": {
131
+ "Response": {
132
+ "$anchor": "response",
133
+ "title": "VTC Vetting PCS Root Credential — response payload",
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "required": [
137
+ "label",
138
+ "preCredential"
139
+ ],
140
+ "description": "The blind pre-credential. The vetter unblinds it into a credential the community has never seen.",
141
+ "properties": {
142
+ "label": {
143
+ "type": "string",
144
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$",
145
+ "description": "The label signed under — the one asked for."
146
+ },
147
+ "preCredential": {
148
+ "type": "string",
149
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
150
+ "description": "The pre-credential, multibase base58btc. Useless to anyone but the holder of the request's blinding state."
151
+ },
152
+ "ext": {
153
+ "$ref": "#/$defs/Ext"
154
+ }
155
+ }
156
+ },
157
+ "Ext": {
158
+ "title": "Ext",
159
+ "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.",
160
+ "type": "object",
161
+ "minProperties": 1,
162
+ "additionalProperties": true,
163
+ "propertyNames": {
164
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
165
+ }
166
+ }
167
+ }
168
+ } as const;
169
+
170
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
171
+ export const RESPONSE_PAYLOAD_SCHEMA = {
172
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
173
+ "$ref": "#/$defs/Response",
174
+ "$defs": {
175
+ "Response": {
176
+ "$anchor": "response",
177
+ "title": "VTC Vetting PCS Root Credential — response payload",
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "label",
182
+ "preCredential"
183
+ ],
184
+ "description": "The blind pre-credential. The vetter unblinds it into a credential the community has never seen.",
185
+ "properties": {
186
+ "label": {
187
+ "type": "string",
188
+ "pattern": "^vetter/[0-9]{4}-[0-9]{2}$",
189
+ "description": "The label signed under — the one asked for."
190
+ },
191
+ "preCredential": {
192
+ "type": "string",
193
+ "pattern": "^z[1-9A-HJ-NP-Za-km-z]+$",
194
+ "description": "The pre-credential, multibase base58btc. Useless to anyone but the holder of the request's blinding state."
195
+ },
196
+ "ext": {
197
+ "$ref": "#/$defs/Ext"
198
+ }
199
+ }
200
+ },
201
+ "Ext": {
202
+ "title": "Ext",
203
+ "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.",
204
+ "type": "object",
205
+ "minProperties": 1,
206
+ "additionalProperties": true,
207
+ "propertyNames": {
208
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
209
+ }
210
+ }
211
+ }
212
+ } as const;
213
+
214
+ /**
215
+ * SPEC.md §7.2 policy for the request variant, from this specification's
216
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
217
+ * per-specification and cannot be derived from the document alone, and
218
+ * item 2 needs the schema this carries.
219
+ */
220
+ export const SPEC = {
221
+ typeUri: TYPE_URI,
222
+ isBearer: false,
223
+ isProofRequired: true,
224
+ isRecipientRequired: true,
225
+ isIssuedAtRequired: true,
226
+ payloadSchema: PAYLOAD_SCHEMA,
227
+ } as const;
228
+
229
+ /**
230
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
231
+ * tracks the *issuer* party's requirement because a response swaps the
232
+ * parties (§7.3 item 5).
233
+ */
234
+ export const RESPONSE_SPEC = {
235
+ typeUri: RESPONSE_TYPE_URI,
236
+ isBearer: false,
237
+ isProofRequired: true,
238
+ isRecipientRequired: true,
239
+ isIssuedAtRequired: true,
240
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
241
+ } as const;