@openvtc/trust-tasks 0.22.3 → 0.22.5
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 +101 -0
- package/dist/_shared/components.d.ts +44 -3
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/vta/webvh/dids/create/1.1/payload.d.ts +834 -0
- package/dist/vta/webvh/dids/create/1.1/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/create/1.1/payload.js +415 -0
- package/dist/vta/webvh/dids/create/1.1/payload.js.map +1 -0
- package/dist/vtc/_shared/0.1/schema-registry.d.ts +1 -1
- package/dist/vtc/_shared/0.1/schema-registry.d.ts.map +1 -1
- package/dist/vtc/_shared/0.2/schema-registry.d.ts +16 -0
- package/dist/vtc/_shared/0.2/schema-registry.d.ts.map +1 -0
- package/dist/vtc/_shared/0.2/schema-registry.js +6 -0
- package/dist/vtc/_shared/0.2/schema-registry.js.map +1 -0
- package/dist/vtc/join-requests/manifest/0.3/payload.d.ts +1595 -0
- package/dist/vtc/join-requests/manifest/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/manifest/0.3/payload.js +827 -0
- package/dist/vtc/join-requests/manifest/0.3/payload.js.map +1 -0
- package/dist/vtc/join-requests/status/0.1/payload.d.ts +82 -2
- package/dist/vtc/join-requests/status/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/join-requests/status/0.1/payload.js +42 -2
- package/dist/vtc/join-requests/status/0.1/payload.js.map +1 -1
- package/dist/vtc/join-requests/submit/0.3/payload.d.ts +662 -0
- package/dist/vtc/join-requests/submit/0.3/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/submit/0.3/payload.js +364 -0
- package/dist/vtc/join-requests/submit/0.3/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts +1 -1
- package/dist/vtc/schemas/accepts/list/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/schemas/accepts/list/0.2/payload.d.ts +1326 -0
- package/dist/vtc/schemas/accepts/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/list/0.2/payload.js +759 -0
- package/dist/vtc/schemas/accepts/list/0.2/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts +1 -1
- package/dist/vtc/schemas/accepts/register/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/schemas/accepts/register/0.2/payload.d.ts +1316 -0
- package/dist/vtc/schemas/accepts/register/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/register/0.2/payload.js +762 -0
- package/dist/vtc/schemas/accepts/register/0.2/payload.js.map +1 -0
- package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts +1 -1
- package/dist/vtc/schemas/accepts/show/0.1/payload.d.ts.map +1 -1
- package/dist/vtc/schemas/accepts/show/0.2/payload.d.ts +1256 -0
- package/dist/vtc/schemas/accepts/show/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/schemas/accepts/show/0.2/payload.js +733 -0
- package/dist/vtc/schemas/accepts/show/0.2/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +44 -3
- package/src/index.ts +7 -0
- package/src/vta/webvh/dids/create/1.1/payload.ts +570 -0
- package/src/vtc/_shared/0.1/schema-registry.ts +1 -1
- package/src/vtc/_shared/0.2/schema-registry.ts +17 -0
- package/src/vtc/join-requests/manifest/0.3/payload.ts +1020 -0
- package/src/vtc/join-requests/status/0.1/payload.ts +58 -2
- package/src/vtc/join-requests/submit/0.3/payload.ts +431 -0
- package/src/vtc/schemas/accepts/list/0.1/payload.ts +1 -1
- package/src/vtc/schemas/accepts/list/0.2/payload.ts +802 -0
- package/src/vtc/schemas/accepts/register/0.1/payload.ts +1 -1
- package/src/vtc/schemas/accepts/register/0.2/payload.ts +803 -0
- package/src/vtc/schemas/accepts/show/0.1/payload.ts +1 -1
- package/src/vtc/schemas/accepts/show/0.2/payload.ts +762 -0
|
@@ -11,6 +11,10 @@ export interface VTCJoinRequestsStatusPayload {
|
|
|
11
11
|
* The request to poll. Optional: an applicant whose first reply was lost never received an id, and the id-less poll — resolved from the authenticated applicant's own DID — is the only form available to them. Supply it when you have it; a consumer that has it MUST prefer it over inferring the request from the caller.
|
|
12
12
|
*/
|
|
13
13
|
requestId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Ask the community to deliver again the membership credential and role credential it already issued for this request, when the request is `approved` and they have not arrived. Set it only after a response of `approved` with `credentialsDelivered: false` and a reasonable wait; the community rate-limits it and answers in `credentialResend`. The community never issues new credentials in response.
|
|
16
|
+
*/
|
|
17
|
+
resendCredentials?: boolean;
|
|
14
18
|
ext?: Ext;
|
|
15
19
|
}
|
|
16
20
|
export interface VTCJoinRequestsStatusResponsePayload {
|
|
@@ -36,6 +40,18 @@ export interface VTCJoinRequestsStatusResponsePayload {
|
|
|
36
40
|
* When more evidence is needed, the presentation-definition to satisfy (opaque here).
|
|
37
41
|
*/
|
|
38
42
|
presentationDefinition?: {};
|
|
43
|
+
/**
|
|
44
|
+
* Whether the community holds the applicant's acknowledgement that the membership credential arrived. Present only when `status` is `approved`.
|
|
45
|
+
*/
|
|
46
|
+
credentialsDelivered?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The community's answer to `resendCredentials`. `queued`: a re-delivery of the already-issued credentials is queued. `notNeeded`: delivery is already acknowledged. `rateLimited`: a re-delivery was honoured too recently; see `retryAfter`. Present only when `resendCredentials` was set and `status` is `approved`; absent then means the community does not support re-delivery.
|
|
49
|
+
*/
|
|
50
|
+
credentialResend?: "queued" | "notNeeded" | "rateLimited";
|
|
51
|
+
/**
|
|
52
|
+
* The earliest time the community will honour another `resendCredentials`. Present only when `credentialResend` is `rateLimited`.
|
|
53
|
+
*/
|
|
54
|
+
retryAfter?: string;
|
|
39
55
|
ext?: Ext;
|
|
40
56
|
}
|
|
41
57
|
|
|
@@ -75,6 +91,10 @@ export const PAYLOAD_SCHEMA = {
|
|
|
75
91
|
"minLength": 1,
|
|
76
92
|
"description": "The request to poll. Optional: an applicant whose first reply was lost never received an id, and the id-less poll — resolved from the authenticated applicant's own DID — is the only form available to them. Supply it when you have it; a consumer that has it MUST prefer it over inferring the request from the caller."
|
|
77
93
|
},
|
|
94
|
+
"resendCredentials": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"description": "Ask the community to deliver again the membership credential and role credential it already issued for this request, when the request is `approved` and they have not arrived. Set it only after a response of `approved` with `credentialsDelivered: false` and a reasonable wait; the community rate-limits it and answers in `credentialResend`. The community never issues new credentials in response."
|
|
97
|
+
},
|
|
78
98
|
"ext": {
|
|
79
99
|
"$ref": "#/$defs/Ext"
|
|
80
100
|
}
|
|
@@ -132,6 +152,24 @@ export const PAYLOAD_SCHEMA = {
|
|
|
132
152
|
"type": "object",
|
|
133
153
|
"description": "When more evidence is needed, the presentation-definition to satisfy (opaque here)."
|
|
134
154
|
},
|
|
155
|
+
"credentialsDelivered": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"description": "Whether the community holds the applicant's acknowledgement that the membership credential arrived. Present only when `status` is `approved`."
|
|
158
|
+
},
|
|
159
|
+
"credentialResend": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"enum": [
|
|
162
|
+
"queued",
|
|
163
|
+
"notNeeded",
|
|
164
|
+
"rateLimited"
|
|
165
|
+
],
|
|
166
|
+
"description": "The community's answer to `resendCredentials`. `queued`: a re-delivery of the already-issued credentials is queued. `notNeeded`: delivery is already acknowledged. `rateLimited`: a re-delivery was honoured too recently; see `retryAfter`. Present only when `resendCredentials` was set and `status` is `approved`; absent then means the community does not support re-delivery."
|
|
167
|
+
},
|
|
168
|
+
"retryAfter": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"format": "date-time",
|
|
171
|
+
"description": "The earliest time the community will honour another `resendCredentials`. Present only when `credentialResend` is `rateLimited`."
|
|
172
|
+
},
|
|
135
173
|
"ext": {
|
|
136
174
|
"$ref": "#/$defs/Ext"
|
|
137
175
|
}
|
|
@@ -207,6 +245,24 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
|
207
245
|
"type": "object",
|
|
208
246
|
"description": "When more evidence is needed, the presentation-definition to satisfy (opaque here)."
|
|
209
247
|
},
|
|
248
|
+
"credentialsDelivered": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "Whether the community holds the applicant's acknowledgement that the membership credential arrived. Present only when `status` is `approved`."
|
|
251
|
+
},
|
|
252
|
+
"credentialResend": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"enum": [
|
|
255
|
+
"queued",
|
|
256
|
+
"notNeeded",
|
|
257
|
+
"rateLimited"
|
|
258
|
+
],
|
|
259
|
+
"description": "The community's answer to `resendCredentials`. `queued`: a re-delivery of the already-issued credentials is queued. `notNeeded`: delivery is already acknowledged. `rateLimited`: a re-delivery was honoured too recently; see `retryAfter`. Present only when `resendCredentials` was set and `status` is `approved`; absent then means the community does not support re-delivery."
|
|
260
|
+
},
|
|
261
|
+
"retryAfter": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"format": "date-time",
|
|
264
|
+
"description": "The earliest time the community will honour another `resendCredentials`. Present only when `credentialResend` is `rateLimited`."
|
|
265
|
+
},
|
|
210
266
|
"ext": {
|
|
211
267
|
"$ref": "#/$defs/Ext"
|
|
212
268
|
}
|
|
@@ -236,7 +292,7 @@ export const SPEC = {
|
|
|
236
292
|
isBearer: false,
|
|
237
293
|
isProofRequired: true,
|
|
238
294
|
isRecipientRequired: true,
|
|
239
|
-
isIssuedAtRequired:
|
|
295
|
+
isIssuedAtRequired: true,
|
|
240
296
|
payloadSchema: PAYLOAD_SCHEMA,
|
|
241
297
|
} as const;
|
|
242
298
|
|
|
@@ -250,6 +306,6 @@ export const RESPONSE_SPEC = {
|
|
|
250
306
|
isBearer: false,
|
|
251
307
|
isProofRequired: true,
|
|
252
308
|
isRecipientRequired: true,
|
|
253
|
-
isIssuedAtRequired:
|
|
309
|
+
isIssuedAtRequired: true,
|
|
254
310
|
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
255
311
|
} as const;
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/join-requests/submit/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { DigestMultibase, Ext, Verdict, VerdictEffect, VerdictWith } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface VTCJoinRequestsSubmitPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The applicant's W3C Verifiable Presentation (opaque here), satisfying the community's join policy. The applicant DID is the document proof's signer — not a payload field.
|
|
12
|
+
*/
|
|
13
|
+
vp: {};
|
|
14
|
+
/**
|
|
15
|
+
* The `requirementsDigest` of the criterion this submission is made under, as vtc/join-requests/manifest/0.3 published it. Absent: the community decides the submission under the first criterion, in the order it publishes them, that the submission meets.
|
|
16
|
+
*/
|
|
17
|
+
criterion?: DigestMultibase;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the applicant consents to trust-registry publication.
|
|
20
|
+
*/
|
|
21
|
+
registryConsent?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Opaque applicant-supplied extension bag.
|
|
24
|
+
*/
|
|
25
|
+
extensions?: {};
|
|
26
|
+
/**
|
|
27
|
+
* The applicant's answers to the manifest's `requestedAttributes`: one entry per attribute given. Self-asserted and bound to the applicant by the document proof. A maintainer MUST refuse the submission with `attributesMissing` when a required attribute is absent and with `attributesUnrequested` when an entry names a type the manifest does not request.
|
|
28
|
+
*
|
|
29
|
+
* @maxItems 32
|
|
30
|
+
*/
|
|
31
|
+
attributes?: {
|
|
32
|
+
/**
|
|
33
|
+
* A claim-type token from the persona claim-type registry (persona/_shared/0.1/CLAIM-TYPES.md) — `name.display`, `address.country` — or an `x:` extension token.
|
|
34
|
+
*/
|
|
35
|
+
type: string;
|
|
36
|
+
/**
|
|
37
|
+
* The value the applicant gives. Self-asserted: the applicant's own statement, bound to them by the document proof, and attested by nobody.
|
|
38
|
+
*/
|
|
39
|
+
value: {
|
|
40
|
+
[k: string]: unknown | undefined;
|
|
41
|
+
};
|
|
42
|
+
}[];
|
|
43
|
+
ext?: Ext;
|
|
44
|
+
}
|
|
45
|
+
export interface VTCJoinRequestsSubmitResponsePayload {
|
|
46
|
+
/**
|
|
47
|
+
* Id of the created join request (a UUID).
|
|
48
|
+
*/
|
|
49
|
+
requestId: string;
|
|
50
|
+
/**
|
|
51
|
+
* What the community decided about this submission.
|
|
52
|
+
*
|
|
53
|
+
* `0.1` returned `status: "pending"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all.
|
|
54
|
+
*/
|
|
55
|
+
verdict: Verdict;
|
|
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 { DigestMultibase, Ext, Verdict, VerdictEffect, VerdictWith };
|
|
61
|
+
|
|
62
|
+
/** Trust Task type URI. */
|
|
63
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/submit/0.3" as const;
|
|
64
|
+
|
|
65
|
+
/** Stable alias for this specification's request payload shape. */
|
|
66
|
+
export type Payload = VTCJoinRequestsSubmitPayload;
|
|
67
|
+
|
|
68
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
69
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/submit/0.3#response" as const;
|
|
70
|
+
|
|
71
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
72
|
+
export type Response = VTCJoinRequestsSubmitResponsePayload;
|
|
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/vtc/join-requests/submit/0.3",
|
|
86
|
+
"title": "VTC Join-Requests Submit — payload",
|
|
87
|
+
"type": "object",
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"required": [
|
|
90
|
+
"vp"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"vp": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"description": "The applicant's W3C Verifiable Presentation (opaque here), satisfying the community's join policy. The applicant DID is the document proof's signer — not a payload field."
|
|
96
|
+
},
|
|
97
|
+
"criterion": {
|
|
98
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
99
|
+
"description": "The `requirementsDigest` of the criterion this submission is made under, as vtc/join-requests/manifest/0.3 published it. Absent: the community decides the submission under the first criterion, in the order it publishes them, that the submission meets."
|
|
100
|
+
},
|
|
101
|
+
"registryConsent": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"description": "Whether the applicant consents to trust-registry publication."
|
|
104
|
+
},
|
|
105
|
+
"extensions": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"description": "Opaque applicant-supplied extension bag."
|
|
108
|
+
},
|
|
109
|
+
"attributes": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"maxItems": 32,
|
|
112
|
+
"description": "The applicant's answers to the manifest's `requestedAttributes`: one entry per attribute given. Self-asserted and bound to the applicant by the document proof. A maintainer MUST refuse the submission with `attributesMissing` when a required attribute is absent and with `attributesUnrequested` when an entry names a type the manifest does not request.",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": [
|
|
117
|
+
"type",
|
|
118
|
+
"value"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"type": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"minLength": 1,
|
|
124
|
+
"maxLength": 128,
|
|
125
|
+
"pattern": "^(x:)?[a-z][A-Za-z0-9]*(\\.[a-z][A-Za-z0-9]*)*$",
|
|
126
|
+
"description": "A claim-type token from the persona claim-type registry (persona/_shared/0.1/CLAIM-TYPES.md) — `name.display`, `address.country` — or an `x:` extension token."
|
|
127
|
+
},
|
|
128
|
+
"value": {
|
|
129
|
+
"description": "The value the applicant gives. Self-asserted: the applicant's own statement, bound to them by the document proof, and attested by nobody."
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"ext": {
|
|
135
|
+
"$ref": "#/$defs/Ext"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"$defs": {
|
|
139
|
+
"Response": {
|
|
140
|
+
"$anchor": "response",
|
|
141
|
+
"title": "VTC Join-Requests Submit — response payload",
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"required": [
|
|
145
|
+
"requestId",
|
|
146
|
+
"verdict"
|
|
147
|
+
],
|
|
148
|
+
"properties": {
|
|
149
|
+
"requestId": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"description": "Id of the created join request (a UUID)."
|
|
153
|
+
},
|
|
154
|
+
"verdict": {
|
|
155
|
+
"$ref": "#/$defs/Verdict",
|
|
156
|
+
"description": "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all."
|
|
157
|
+
},
|
|
158
|
+
"ext": {
|
|
159
|
+
"$ref": "#/$defs/Ext"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"Ext": {
|
|
164
|
+
"title": "Ext",
|
|
165
|
+
"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.",
|
|
166
|
+
"type": "object",
|
|
167
|
+
"minProperties": 1,
|
|
168
|
+
"additionalProperties": true,
|
|
169
|
+
"propertyNames": {
|
|
170
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"Verdict": {
|
|
174
|
+
"$anchor": "verdict",
|
|
175
|
+
"title": "Verdict",
|
|
176
|
+
"type": "object",
|
|
177
|
+
"additionalProperties": false,
|
|
178
|
+
"required": [
|
|
179
|
+
"effect",
|
|
180
|
+
"with"
|
|
181
|
+
],
|
|
182
|
+
"description": "A ceremony decision: the effect, plus its effect-dependent detail.",
|
|
183
|
+
"properties": {
|
|
184
|
+
"effect": {
|
|
185
|
+
"$ref": "#/$defs/VerdictEffect"
|
|
186
|
+
},
|
|
187
|
+
"with": {
|
|
188
|
+
"$ref": "#/$defs/VerdictWith"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"VerdictWith": {
|
|
193
|
+
"$anchor": "verdictWith",
|
|
194
|
+
"title": "VerdictWith",
|
|
195
|
+
"type": "object",
|
|
196
|
+
"additionalProperties": false,
|
|
197
|
+
"description": "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.",
|
|
198
|
+
"properties": {
|
|
199
|
+
"role": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"minLength": 1,
|
|
202
|
+
"description": "The granted local role. `allow` only."
|
|
203
|
+
},
|
|
204
|
+
"obligations": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"description": "Conditions attached to the grant. `allow` only."
|
|
207
|
+
},
|
|
208
|
+
"bundleRef": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"description": "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only."
|
|
211
|
+
},
|
|
212
|
+
"code": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"minLength": 1,
|
|
215
|
+
"description": "Stable refusal code, safe to branch on. `deny` only."
|
|
216
|
+
},
|
|
217
|
+
"reason": {
|
|
218
|
+
"type": [
|
|
219
|
+
"string",
|
|
220
|
+
"null"
|
|
221
|
+
],
|
|
222
|
+
"maxLength": 1024,
|
|
223
|
+
"description": "Elaboration in prose, when the decider gave one. `deny` and `refer`."
|
|
224
|
+
},
|
|
225
|
+
"queue": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"minLength": 1,
|
|
228
|
+
"description": "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only."
|
|
229
|
+
},
|
|
230
|
+
"needs": {
|
|
231
|
+
"type": "array",
|
|
232
|
+
"items": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"minLength": 1
|
|
235
|
+
},
|
|
236
|
+
"description": "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only."
|
|
237
|
+
},
|
|
238
|
+
"presentationDefinition": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"description": "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only."
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"VerdictEffect": {
|
|
245
|
+
"$anchor": "verdictEffect",
|
|
246
|
+
"title": "VerdictEffect",
|
|
247
|
+
"type": "string",
|
|
248
|
+
"enum": [
|
|
249
|
+
"allow",
|
|
250
|
+
"deny",
|
|
251
|
+
"refer",
|
|
252
|
+
"requestMore"
|
|
253
|
+
],
|
|
254
|
+
"description": "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act."
|
|
255
|
+
},
|
|
256
|
+
"DigestMultibase": {
|
|
257
|
+
"title": "DigestMultibase",
|
|
258
|
+
"description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
|
|
259
|
+
"type": "string",
|
|
260
|
+
"minLength": 16,
|
|
261
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
262
|
+
"examples": [
|
|
263
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
} as const;
|
|
268
|
+
|
|
269
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
270
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
271
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
272
|
+
"$ref": "#/$defs/Response",
|
|
273
|
+
"$defs": {
|
|
274
|
+
"Response": {
|
|
275
|
+
"$anchor": "response",
|
|
276
|
+
"title": "VTC Join-Requests Submit — response payload",
|
|
277
|
+
"type": "object",
|
|
278
|
+
"additionalProperties": false,
|
|
279
|
+
"required": [
|
|
280
|
+
"requestId",
|
|
281
|
+
"verdict"
|
|
282
|
+
],
|
|
283
|
+
"properties": {
|
|
284
|
+
"requestId": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"minLength": 1,
|
|
287
|
+
"description": "Id of the created join request (a UUID)."
|
|
288
|
+
},
|
|
289
|
+
"verdict": {
|
|
290
|
+
"$ref": "#/$defs/Verdict",
|
|
291
|
+
"description": "What the community decided about this submission.\n\n`0.1` returned `status: \"pending\"` — a constant, which could express only one of the four outcomes a submission actually has. A policy that admits outright, refuses outright, or asks for more evidence had to be reported as 'pending' or not at all."
|
|
292
|
+
},
|
|
293
|
+
"ext": {
|
|
294
|
+
"$ref": "#/$defs/Ext"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"Ext": {
|
|
299
|
+
"title": "Ext",
|
|
300
|
+
"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.",
|
|
301
|
+
"type": "object",
|
|
302
|
+
"minProperties": 1,
|
|
303
|
+
"additionalProperties": true,
|
|
304
|
+
"propertyNames": {
|
|
305
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"Verdict": {
|
|
309
|
+
"$anchor": "verdict",
|
|
310
|
+
"title": "Verdict",
|
|
311
|
+
"type": "object",
|
|
312
|
+
"additionalProperties": false,
|
|
313
|
+
"required": [
|
|
314
|
+
"effect",
|
|
315
|
+
"with"
|
|
316
|
+
],
|
|
317
|
+
"description": "A ceremony decision: the effect, plus its effect-dependent detail.",
|
|
318
|
+
"properties": {
|
|
319
|
+
"effect": {
|
|
320
|
+
"$ref": "#/$defs/VerdictEffect"
|
|
321
|
+
},
|
|
322
|
+
"with": {
|
|
323
|
+
"$ref": "#/$defs/VerdictWith"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"VerdictWith": {
|
|
328
|
+
"$anchor": "verdictWith",
|
|
329
|
+
"title": "VerdictWith",
|
|
330
|
+
"type": "object",
|
|
331
|
+
"additionalProperties": false,
|
|
332
|
+
"description": "The effect-dependent detail of a verdict.\n\nEvery member is optional at the schema level and which ones are meaningful depends on `effect`: `role` / `obligations` / `bundleRef` on `allow`, `code` / `reason` on `deny`, `queue` / `reason` on `refer`, `needs` / `presentationDefinition` on `requestMore`. The dependency is stated here rather than enforced by `if`/`then` per effect, so that the shape stays a single flat object a generated type can carry without a discriminated union per family — a deliberate trade of schema strictness for implementability, and the reason a consumer MUST branch on `effect` rather than on which members happen to be present.",
|
|
333
|
+
"properties": {
|
|
334
|
+
"role": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"minLength": 1,
|
|
337
|
+
"description": "The granted local role. `allow` only."
|
|
338
|
+
},
|
|
339
|
+
"obligations": {
|
|
340
|
+
"type": "object",
|
|
341
|
+
"description": "Conditions attached to the grant. `allow` only."
|
|
342
|
+
},
|
|
343
|
+
"bundleRef": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"description": "Pointer to a sealed credential bundle, added by the community where issuance occurred rather than emitted by the policy. `allow` only."
|
|
346
|
+
},
|
|
347
|
+
"code": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"minLength": 1,
|
|
350
|
+
"description": "Stable refusal code, safe to branch on. `deny` only."
|
|
351
|
+
},
|
|
352
|
+
"reason": {
|
|
353
|
+
"type": [
|
|
354
|
+
"string",
|
|
355
|
+
"null"
|
|
356
|
+
],
|
|
357
|
+
"maxLength": 1024,
|
|
358
|
+
"description": "Elaboration in prose, when the decider gave one. `deny` and `refer`."
|
|
359
|
+
},
|
|
360
|
+
"queue": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"minLength": 1,
|
|
363
|
+
"description": "Which review queue the decision was parked in, so an applicant can be told who now holds it. `refer` only."
|
|
364
|
+
},
|
|
365
|
+
"needs": {
|
|
366
|
+
"type": "array",
|
|
367
|
+
"items": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"minLength": 1
|
|
370
|
+
},
|
|
371
|
+
"description": "What further evidence is required, named so the applicant can act without a support conversation. `requestMore` only."
|
|
372
|
+
},
|
|
373
|
+
"presentationDefinition": {
|
|
374
|
+
"type": "object",
|
|
375
|
+
"description": "A machine-readable statement of the same request, so a wallet can satisfy it without a human reading `needs`. `requestMore` only."
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"VerdictEffect": {
|
|
380
|
+
"$anchor": "verdictEffect",
|
|
381
|
+
"title": "VerdictEffect",
|
|
382
|
+
"type": "string",
|
|
383
|
+
"enum": [
|
|
384
|
+
"allow",
|
|
385
|
+
"deny",
|
|
386
|
+
"refer",
|
|
387
|
+
"requestMore"
|
|
388
|
+
],
|
|
389
|
+
"description": "What the policy decided.\n\n`allow` — admitted. `deny` — refused, terminally for this submission. `refer` — parked for a human or quorum decision; the applicant is neither in nor out. `requestMore` — the policy cannot decide yet and names what further evidence it needs.\n\nThe four are not reducible to a pending/decided pair. `refer` and `requestMore` are both 'not decided', but they place the next action with different parties: `refer` waits on the community, `requestMore` waits on the applicant. A consumer that cannot tell them apart cannot tell a user whether to wait or to act."
|
|
390
|
+
},
|
|
391
|
+
"DigestMultibase": {
|
|
392
|
+
"title": "DigestMultibase",
|
|
393
|
+
"description": "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.",
|
|
394
|
+
"type": "string",
|
|
395
|
+
"minLength": 16,
|
|
396
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
397
|
+
"examples": [
|
|
398
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
} as const;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
406
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
407
|
+
* per-specification and cannot be derived from the document alone, and
|
|
408
|
+
* item 2 needs the schema this carries.
|
|
409
|
+
*/
|
|
410
|
+
export const SPEC = {
|
|
411
|
+
typeUri: TYPE_URI,
|
|
412
|
+
isBearer: false,
|
|
413
|
+
isProofRequired: true,
|
|
414
|
+
isRecipientRequired: true,
|
|
415
|
+
isIssuedAtRequired: true,
|
|
416
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
417
|
+
} as const;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
421
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
422
|
+
* parties (§7.3 item 5).
|
|
423
|
+
*/
|
|
424
|
+
export const RESPONSE_SPEC = {
|
|
425
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
426
|
+
isBearer: false,
|
|
427
|
+
isProofRequired: true,
|
|
428
|
+
isRecipientRequired: true,
|
|
429
|
+
isIssuedAtRequired: true,
|
|
430
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
431
|
+
} as const;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Source: specs/vtc/schemas/accepts/list/0.1/payload.schema.json
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { AcceptsCriterion, AcceptsCriterionId, ClaimType, CriterionDescription, DcqlQuery, Duration, Ext, ExtCritical, VettingDocumentation, VettingMethod, VettingRequirements } from "../../../../../_shared/components.js";
|
|
6
|
+
import type { AcceptsCriterion_VtcV0_1 as AcceptsCriterion, AcceptsCriterionId, ClaimType, CriterionDescription_VtcV0_1 as CriterionDescription, DcqlQuery, Duration, Ext, ExtCritical, VettingDocumentation, VettingMethod, VettingRequirements } from "../../../../../_shared/components.js";
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
/**
|