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