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