@openvtc/trust-tasks 0.23.9 → 0.24.1
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 +62 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/vtc/join-requests/wallet-session/start/0.1/payload.d.ts +398 -0
- package/dist/vtc/join-requests/wallet-session/start/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/wallet-session/start/0.1/payload.js +220 -0
- package/dist/vtc/join-requests/wallet-session/start/0.1/payload.js.map +1 -0
- package/dist/vtc/join-requests/wallet-session/status/0.1/payload.d.ts +655 -0
- package/dist/vtc/join-requests/wallet-session/status/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/join-requests/wallet-session/status/0.1/payload.js +360 -0
- package/dist/vtc/join-requests/wallet-session/status/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/vtc/join-requests/wallet-session/start/0.1/payload.ts +279 -0
- package/src/vtc/join-requests/wallet-session/status/0.1/payload.ts +454 -0
|
@@ -0,0 +1,655 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/join-requests/wallet-session/status/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { Ext } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* An applicant reads the state of a wallet presentation session they opened with vtc/join-requests/wallet-session/start, and, once a wallet has answered, what the presentation established. The applicant is the document proof's signer. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCJoinRequestsWalletSessionStatusPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The session to read, as vtc/join-requests/wallet-session/start returned it.
|
|
12
|
+
*/
|
|
13
|
+
sessionId: string;
|
|
14
|
+
ext?: Ext;
|
|
15
|
+
}
|
|
16
|
+
export interface VTCJoinRequestsWalletSessionStatusResponsePayload {
|
|
17
|
+
sessionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* `awaitingWallet`: no wallet has fetched the request object. `requestRetrieved`: a wallet has fetched it and not yet answered. `presented`: a wallet answered and the presentation verified; see `evidence`. `refused`: a wallet answered and the community did not accept the answer, or the wallet declined; see `reason`. `expired`: the session closed unanswered.
|
|
20
|
+
*/
|
|
21
|
+
state: "awaitingWallet" | "requestRetrieved" | "presented" | "refused" | "expired";
|
|
22
|
+
/**
|
|
23
|
+
* When the session closes, or closed, if unanswered.
|
|
24
|
+
*/
|
|
25
|
+
expiresAt: string;
|
|
26
|
+
/**
|
|
27
|
+
* The join request the session's evidence is recorded on. Present when the session was bound to one, or its evidence has since been attached to one by a submission.
|
|
28
|
+
*/
|
|
29
|
+
requestId?: string;
|
|
30
|
+
evidence?: Evidence;
|
|
31
|
+
/**
|
|
32
|
+
* Why the session ended `refused`. `presentationInvalid`: the response or a presentation failed verification — decryption, `state`, signature, key binding, nonce or audience. `queryNotSatisfied`: the presentations verified but do not satisfy the query. `issuerNotTrusted`: a credential's issuer is not one the criterion accepts. `statusNotValid`: a credential's status is revoked or suspended, or could not be read. `walletDeclined`: the wallet answered with an OpenID4VP error, such as `access_denied`. Present only when `state` is `refused`.
|
|
33
|
+
*/
|
|
34
|
+
reason?: "presentationInvalid" | "queryNotSatisfied" | "issuerNotTrusted" | "statusNotValid" | "walletDeclined";
|
|
35
|
+
ext?: Ext;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Present only when `state` is `presented`.
|
|
39
|
+
*/
|
|
40
|
+
export interface Evidence {
|
|
41
|
+
/**
|
|
42
|
+
* Whether the presentation satisfies the criterion's DCQL query. Satisfying the query is not admission: the community still decides the join under the criterion's `admission`.
|
|
43
|
+
*/
|
|
44
|
+
satisfied: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The identifier of the key that held the presented credentials — for an SD-JWT VC, the `did:key` of its `cnf` key. Recorded beside the applicant DID, never as it.
|
|
47
|
+
*/
|
|
48
|
+
holder: string;
|
|
49
|
+
/**
|
|
50
|
+
* The credentials presented, one entry each.
|
|
51
|
+
*
|
|
52
|
+
* @minItems 1
|
|
53
|
+
* @maxItems 32
|
|
54
|
+
*/
|
|
55
|
+
credentials: [PresentedCredential, ...PresentedCredential[]];
|
|
56
|
+
/**
|
|
57
|
+
* When evidence not yet recorded on a join request is discarded if the applicant has not submitted under the session's criterion. Absent when the evidence is recorded on a request.
|
|
58
|
+
*/
|
|
59
|
+
heldUntil?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* One credential the wallet presented, described without any of its claim values.
|
|
63
|
+
*/
|
|
64
|
+
export interface PresentedCredential {
|
|
65
|
+
/**
|
|
66
|
+
* The `id` of the DCQL credential query this credential was presented for — the key it arrived under in the OpenID4VP `vp_token`.
|
|
67
|
+
*/
|
|
68
|
+
credentialQueryId: string;
|
|
69
|
+
/**
|
|
70
|
+
* The credential format identifier, as OpenID4VP names it (`dc+sd-jwt`, `mso_mdoc`). Carried verbatim.
|
|
71
|
+
*/
|
|
72
|
+
format: string;
|
|
73
|
+
/**
|
|
74
|
+
* The identifier of the credential's issuer as the community verified it — a DID, or for an issuer identified by an X.509 certificate, the certificate subject or hash the community's policy names it by.
|
|
75
|
+
*/
|
|
76
|
+
issuer: string;
|
|
77
|
+
/**
|
|
78
|
+
* The SD-JWT VC credential type (`vct`). Present for SD-JWT VC credentials.
|
|
79
|
+
*/
|
|
80
|
+
vct?: string;
|
|
81
|
+
}
|
|
82
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
83
|
+
export type { Ext };
|
|
84
|
+
/** Trust Task type URI. */
|
|
85
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/status/0.1";
|
|
86
|
+
/** Stable alias for this specification's request payload shape. */
|
|
87
|
+
export type Payload = VTCJoinRequestsWalletSessionStatusPayload;
|
|
88
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
89
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/status/0.1#response";
|
|
90
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
91
|
+
export type Response = VTCJoinRequestsWalletSessionStatusResponsePayload;
|
|
92
|
+
/**
|
|
93
|
+
* This specification's payload schema, as a value.
|
|
94
|
+
*
|
|
95
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
96
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
97
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
98
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
99
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
100
|
+
*/
|
|
101
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
102
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
103
|
+
readonly $id: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/status/0.1";
|
|
104
|
+
readonly title: "VTC Join-Requests Wallet Session Status — payload";
|
|
105
|
+
readonly description: "An applicant reads the state of a wallet presentation session they opened with vtc/join-requests/wallet-session/start, and, once a wallet has answered, what the presentation established. The applicant is the document proof's signer. The outer document members are owned by the framework — SPEC §6.3.";
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly additionalProperties: false;
|
|
108
|
+
readonly required: readonly ["sessionId"];
|
|
109
|
+
readonly properties: {
|
|
110
|
+
readonly sessionId: {
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
readonly minLength: 16;
|
|
113
|
+
readonly maxLength: 128;
|
|
114
|
+
readonly description: "The session to read, as vtc/join-requests/wallet-session/start returned it.";
|
|
115
|
+
};
|
|
116
|
+
readonly ext: {
|
|
117
|
+
readonly $ref: "#/$defs/Ext";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
readonly $defs: {
|
|
121
|
+
readonly PresentedCredential: {
|
|
122
|
+
readonly title: "PresentedCredential";
|
|
123
|
+
readonly type: "object";
|
|
124
|
+
readonly additionalProperties: false;
|
|
125
|
+
readonly required: readonly ["credentialQueryId", "format", "issuer"];
|
|
126
|
+
readonly description: "One credential the wallet presented, described without any of its claim values.";
|
|
127
|
+
readonly properties: {
|
|
128
|
+
readonly credentialQueryId: {
|
|
129
|
+
readonly type: "string";
|
|
130
|
+
readonly minLength: 1;
|
|
131
|
+
readonly maxLength: 128;
|
|
132
|
+
readonly description: "The `id` of the DCQL credential query this credential was presented for — the key it arrived under in the OpenID4VP `vp_token`.";
|
|
133
|
+
};
|
|
134
|
+
readonly format: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly minLength: 1;
|
|
137
|
+
readonly maxLength: 64;
|
|
138
|
+
readonly description: "The credential format identifier, as OpenID4VP names it (`dc+sd-jwt`, `mso_mdoc`). Carried verbatim.";
|
|
139
|
+
};
|
|
140
|
+
readonly issuer: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
readonly minLength: 1;
|
|
143
|
+
readonly maxLength: 2048;
|
|
144
|
+
readonly description: "The identifier of the credential's issuer as the community verified it — a DID, or for an issuer identified by an X.509 certificate, the certificate subject or hash the community's policy names it by.";
|
|
145
|
+
};
|
|
146
|
+
readonly vct: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly minLength: 1;
|
|
149
|
+
readonly maxLength: 2048;
|
|
150
|
+
readonly description: "The SD-JWT VC credential type (`vct`). Present for SD-JWT VC credentials.";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
readonly Evidence: {
|
|
155
|
+
readonly title: "Evidence";
|
|
156
|
+
readonly type: "object";
|
|
157
|
+
readonly additionalProperties: false;
|
|
158
|
+
readonly required: readonly ["satisfied", "holder", "credentials"];
|
|
159
|
+
readonly description: "What a verified wallet presentation established. Never claim values.";
|
|
160
|
+
readonly properties: {
|
|
161
|
+
readonly satisfied: {
|
|
162
|
+
readonly type: "boolean";
|
|
163
|
+
readonly description: "Whether the presentation satisfies the criterion's DCQL query. Satisfying the query is not admission: the community still decides the join under the criterion's `admission`.";
|
|
164
|
+
};
|
|
165
|
+
readonly holder: {
|
|
166
|
+
readonly type: "string";
|
|
167
|
+
readonly minLength: 1;
|
|
168
|
+
readonly maxLength: 2048;
|
|
169
|
+
readonly description: "The identifier of the key that held the presented credentials — for an SD-JWT VC, the `did:key` of its `cnf` key. Recorded beside the applicant DID, never as it.";
|
|
170
|
+
};
|
|
171
|
+
readonly credentials: {
|
|
172
|
+
readonly type: "array";
|
|
173
|
+
readonly minItems: 1;
|
|
174
|
+
readonly maxItems: 32;
|
|
175
|
+
readonly items: {
|
|
176
|
+
readonly $ref: "#/$defs/PresentedCredential";
|
|
177
|
+
};
|
|
178
|
+
readonly description: "The credentials presented, one entry each.";
|
|
179
|
+
};
|
|
180
|
+
readonly heldUntil: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
readonly format: "date-time";
|
|
183
|
+
readonly description: "When evidence not yet recorded on a join request is discarded if the applicant has not submitted under the session's criterion. Absent when the evidence is recorded on a request.";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
readonly Response: {
|
|
188
|
+
readonly $anchor: "response";
|
|
189
|
+
readonly title: "VTC Join-Requests Wallet Session Status — response payload";
|
|
190
|
+
readonly type: "object";
|
|
191
|
+
readonly additionalProperties: false;
|
|
192
|
+
readonly required: readonly ["sessionId", "state", "expiresAt"];
|
|
193
|
+
readonly properties: {
|
|
194
|
+
readonly sessionId: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly minLength: 16;
|
|
197
|
+
readonly maxLength: 128;
|
|
198
|
+
};
|
|
199
|
+
readonly state: {
|
|
200
|
+
readonly type: "string";
|
|
201
|
+
readonly enum: readonly ["awaitingWallet", "requestRetrieved", "presented", "refused", "expired"];
|
|
202
|
+
readonly description: "`awaitingWallet`: no wallet has fetched the request object. `requestRetrieved`: a wallet has fetched it and not yet answered. `presented`: a wallet answered and the presentation verified; see `evidence`. `refused`: a wallet answered and the community did not accept the answer, or the wallet declined; see `reason`. `expired`: the session closed unanswered.";
|
|
203
|
+
};
|
|
204
|
+
readonly expiresAt: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
readonly format: "date-time";
|
|
207
|
+
readonly description: "When the session closes, or closed, if unanswered.";
|
|
208
|
+
};
|
|
209
|
+
readonly requestId: {
|
|
210
|
+
readonly type: "string";
|
|
211
|
+
readonly minLength: 1;
|
|
212
|
+
readonly maxLength: 128;
|
|
213
|
+
readonly description: "The join request the session's evidence is recorded on. Present when the session was bound to one, or its evidence has since been attached to one by a submission.";
|
|
214
|
+
};
|
|
215
|
+
readonly evidence: {
|
|
216
|
+
readonly $ref: "#/$defs/Evidence";
|
|
217
|
+
readonly description: "Present only when `state` is `presented`.";
|
|
218
|
+
};
|
|
219
|
+
readonly reason: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
readonly enum: readonly ["presentationInvalid", "queryNotSatisfied", "issuerNotTrusted", "statusNotValid", "walletDeclined"];
|
|
222
|
+
readonly description: "Why the session ended `refused`. `presentationInvalid`: the response or a presentation failed verification — decryption, `state`, signature, key binding, nonce or audience. `queryNotSatisfied`: the presentations verified but do not satisfy the query. `issuerNotTrusted`: a credential's issuer is not one the criterion accepts. `statusNotValid`: a credential's status is revoked or suspended, or could not be read. `walletDeclined`: the wallet answered with an OpenID4VP error, such as `access_denied`. Present only when `state` is `refused`.";
|
|
223
|
+
};
|
|
224
|
+
readonly ext: {
|
|
225
|
+
readonly $ref: "#/$defs/Ext";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
readonly Ext: {
|
|
230
|
+
readonly title: "Ext";
|
|
231
|
+
readonly 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.";
|
|
232
|
+
readonly type: "object";
|
|
233
|
+
readonly minProperties: 1;
|
|
234
|
+
readonly additionalProperties: true;
|
|
235
|
+
readonly propertyNames: {
|
|
236
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
242
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
243
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
244
|
+
readonly $ref: "#/$defs/Response";
|
|
245
|
+
readonly $defs: {
|
|
246
|
+
readonly PresentedCredential: {
|
|
247
|
+
readonly title: "PresentedCredential";
|
|
248
|
+
readonly type: "object";
|
|
249
|
+
readonly additionalProperties: false;
|
|
250
|
+
readonly required: readonly ["credentialQueryId", "format", "issuer"];
|
|
251
|
+
readonly description: "One credential the wallet presented, described without any of its claim values.";
|
|
252
|
+
readonly properties: {
|
|
253
|
+
readonly credentialQueryId: {
|
|
254
|
+
readonly type: "string";
|
|
255
|
+
readonly minLength: 1;
|
|
256
|
+
readonly maxLength: 128;
|
|
257
|
+
readonly description: "The `id` of the DCQL credential query this credential was presented for — the key it arrived under in the OpenID4VP `vp_token`.";
|
|
258
|
+
};
|
|
259
|
+
readonly format: {
|
|
260
|
+
readonly type: "string";
|
|
261
|
+
readonly minLength: 1;
|
|
262
|
+
readonly maxLength: 64;
|
|
263
|
+
readonly description: "The credential format identifier, as OpenID4VP names it (`dc+sd-jwt`, `mso_mdoc`). Carried verbatim.";
|
|
264
|
+
};
|
|
265
|
+
readonly issuer: {
|
|
266
|
+
readonly type: "string";
|
|
267
|
+
readonly minLength: 1;
|
|
268
|
+
readonly maxLength: 2048;
|
|
269
|
+
readonly description: "The identifier of the credential's issuer as the community verified it — a DID, or for an issuer identified by an X.509 certificate, the certificate subject or hash the community's policy names it by.";
|
|
270
|
+
};
|
|
271
|
+
readonly vct: {
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
readonly minLength: 1;
|
|
274
|
+
readonly maxLength: 2048;
|
|
275
|
+
readonly description: "The SD-JWT VC credential type (`vct`). Present for SD-JWT VC credentials.";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
readonly Evidence: {
|
|
280
|
+
readonly title: "Evidence";
|
|
281
|
+
readonly type: "object";
|
|
282
|
+
readonly additionalProperties: false;
|
|
283
|
+
readonly required: readonly ["satisfied", "holder", "credentials"];
|
|
284
|
+
readonly description: "What a verified wallet presentation established. Never claim values.";
|
|
285
|
+
readonly properties: {
|
|
286
|
+
readonly satisfied: {
|
|
287
|
+
readonly type: "boolean";
|
|
288
|
+
readonly description: "Whether the presentation satisfies the criterion's DCQL query. Satisfying the query is not admission: the community still decides the join under the criterion's `admission`.";
|
|
289
|
+
};
|
|
290
|
+
readonly holder: {
|
|
291
|
+
readonly type: "string";
|
|
292
|
+
readonly minLength: 1;
|
|
293
|
+
readonly maxLength: 2048;
|
|
294
|
+
readonly description: "The identifier of the key that held the presented credentials — for an SD-JWT VC, the `did:key` of its `cnf` key. Recorded beside the applicant DID, never as it.";
|
|
295
|
+
};
|
|
296
|
+
readonly credentials: {
|
|
297
|
+
readonly type: "array";
|
|
298
|
+
readonly minItems: 1;
|
|
299
|
+
readonly maxItems: 32;
|
|
300
|
+
readonly items: {
|
|
301
|
+
readonly $ref: "#/$defs/PresentedCredential";
|
|
302
|
+
};
|
|
303
|
+
readonly description: "The credentials presented, one entry each.";
|
|
304
|
+
};
|
|
305
|
+
readonly heldUntil: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
readonly format: "date-time";
|
|
308
|
+
readonly description: "When evidence not yet recorded on a join request is discarded if the applicant has not submitted under the session's criterion. Absent when the evidence is recorded on a request.";
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
readonly Response: {
|
|
313
|
+
readonly $anchor: "response";
|
|
314
|
+
readonly title: "VTC Join-Requests Wallet Session Status — response payload";
|
|
315
|
+
readonly type: "object";
|
|
316
|
+
readonly additionalProperties: false;
|
|
317
|
+
readonly required: readonly ["sessionId", "state", "expiresAt"];
|
|
318
|
+
readonly properties: {
|
|
319
|
+
readonly sessionId: {
|
|
320
|
+
readonly type: "string";
|
|
321
|
+
readonly minLength: 16;
|
|
322
|
+
readonly maxLength: 128;
|
|
323
|
+
};
|
|
324
|
+
readonly state: {
|
|
325
|
+
readonly type: "string";
|
|
326
|
+
readonly enum: readonly ["awaitingWallet", "requestRetrieved", "presented", "refused", "expired"];
|
|
327
|
+
readonly description: "`awaitingWallet`: no wallet has fetched the request object. `requestRetrieved`: a wallet has fetched it and not yet answered. `presented`: a wallet answered and the presentation verified; see `evidence`. `refused`: a wallet answered and the community did not accept the answer, or the wallet declined; see `reason`. `expired`: the session closed unanswered.";
|
|
328
|
+
};
|
|
329
|
+
readonly expiresAt: {
|
|
330
|
+
readonly type: "string";
|
|
331
|
+
readonly format: "date-time";
|
|
332
|
+
readonly description: "When the session closes, or closed, if unanswered.";
|
|
333
|
+
};
|
|
334
|
+
readonly requestId: {
|
|
335
|
+
readonly type: "string";
|
|
336
|
+
readonly minLength: 1;
|
|
337
|
+
readonly maxLength: 128;
|
|
338
|
+
readonly description: "The join request the session's evidence is recorded on. Present when the session was bound to one, or its evidence has since been attached to one by a submission.";
|
|
339
|
+
};
|
|
340
|
+
readonly evidence: {
|
|
341
|
+
readonly $ref: "#/$defs/Evidence";
|
|
342
|
+
readonly description: "Present only when `state` is `presented`.";
|
|
343
|
+
};
|
|
344
|
+
readonly reason: {
|
|
345
|
+
readonly type: "string";
|
|
346
|
+
readonly enum: readonly ["presentationInvalid", "queryNotSatisfied", "issuerNotTrusted", "statusNotValid", "walletDeclined"];
|
|
347
|
+
readonly description: "Why the session ended `refused`. `presentationInvalid`: the response or a presentation failed verification — decryption, `state`, signature, key binding, nonce or audience. `queryNotSatisfied`: the presentations verified but do not satisfy the query. `issuerNotTrusted`: a credential's issuer is not one the criterion accepts. `statusNotValid`: a credential's status is revoked or suspended, or could not be read. `walletDeclined`: the wallet answered with an OpenID4VP error, such as `access_denied`. Present only when `state` is `refused`.";
|
|
348
|
+
};
|
|
349
|
+
readonly ext: {
|
|
350
|
+
readonly $ref: "#/$defs/Ext";
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
readonly Ext: {
|
|
355
|
+
readonly title: "Ext";
|
|
356
|
+
readonly 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.";
|
|
357
|
+
readonly type: "object";
|
|
358
|
+
readonly minProperties: 1;
|
|
359
|
+
readonly additionalProperties: true;
|
|
360
|
+
readonly propertyNames: {
|
|
361
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
368
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
369
|
+
* per-specification and cannot be derived from the document alone, and
|
|
370
|
+
* item 2 needs the schema this carries.
|
|
371
|
+
*/
|
|
372
|
+
export declare const SPEC: {
|
|
373
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/status/0.1";
|
|
374
|
+
readonly isBearer: false;
|
|
375
|
+
readonly isProofRequired: true;
|
|
376
|
+
readonly isRecipientRequired: true;
|
|
377
|
+
readonly isIssuedAtRequired: false;
|
|
378
|
+
readonly payloadSchema: {
|
|
379
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
380
|
+
readonly $id: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/status/0.1";
|
|
381
|
+
readonly title: "VTC Join-Requests Wallet Session Status — payload";
|
|
382
|
+
readonly description: "An applicant reads the state of a wallet presentation session they opened with vtc/join-requests/wallet-session/start, and, once a wallet has answered, what the presentation established. The applicant is the document proof's signer. The outer document members are owned by the framework — SPEC §6.3.";
|
|
383
|
+
readonly type: "object";
|
|
384
|
+
readonly additionalProperties: false;
|
|
385
|
+
readonly required: readonly ["sessionId"];
|
|
386
|
+
readonly properties: {
|
|
387
|
+
readonly sessionId: {
|
|
388
|
+
readonly type: "string";
|
|
389
|
+
readonly minLength: 16;
|
|
390
|
+
readonly maxLength: 128;
|
|
391
|
+
readonly description: "The session to read, as vtc/join-requests/wallet-session/start returned it.";
|
|
392
|
+
};
|
|
393
|
+
readonly ext: {
|
|
394
|
+
readonly $ref: "#/$defs/Ext";
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
readonly $defs: {
|
|
398
|
+
readonly PresentedCredential: {
|
|
399
|
+
readonly title: "PresentedCredential";
|
|
400
|
+
readonly type: "object";
|
|
401
|
+
readonly additionalProperties: false;
|
|
402
|
+
readonly required: readonly ["credentialQueryId", "format", "issuer"];
|
|
403
|
+
readonly description: "One credential the wallet presented, described without any of its claim values.";
|
|
404
|
+
readonly properties: {
|
|
405
|
+
readonly credentialQueryId: {
|
|
406
|
+
readonly type: "string";
|
|
407
|
+
readonly minLength: 1;
|
|
408
|
+
readonly maxLength: 128;
|
|
409
|
+
readonly description: "The `id` of the DCQL credential query this credential was presented for — the key it arrived under in the OpenID4VP `vp_token`.";
|
|
410
|
+
};
|
|
411
|
+
readonly format: {
|
|
412
|
+
readonly type: "string";
|
|
413
|
+
readonly minLength: 1;
|
|
414
|
+
readonly maxLength: 64;
|
|
415
|
+
readonly description: "The credential format identifier, as OpenID4VP names it (`dc+sd-jwt`, `mso_mdoc`). Carried verbatim.";
|
|
416
|
+
};
|
|
417
|
+
readonly issuer: {
|
|
418
|
+
readonly type: "string";
|
|
419
|
+
readonly minLength: 1;
|
|
420
|
+
readonly maxLength: 2048;
|
|
421
|
+
readonly description: "The identifier of the credential's issuer as the community verified it — a DID, or for an issuer identified by an X.509 certificate, the certificate subject or hash the community's policy names it by.";
|
|
422
|
+
};
|
|
423
|
+
readonly vct: {
|
|
424
|
+
readonly type: "string";
|
|
425
|
+
readonly minLength: 1;
|
|
426
|
+
readonly maxLength: 2048;
|
|
427
|
+
readonly description: "The SD-JWT VC credential type (`vct`). Present for SD-JWT VC credentials.";
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
readonly Evidence: {
|
|
432
|
+
readonly title: "Evidence";
|
|
433
|
+
readonly type: "object";
|
|
434
|
+
readonly additionalProperties: false;
|
|
435
|
+
readonly required: readonly ["satisfied", "holder", "credentials"];
|
|
436
|
+
readonly description: "What a verified wallet presentation established. Never claim values.";
|
|
437
|
+
readonly properties: {
|
|
438
|
+
readonly satisfied: {
|
|
439
|
+
readonly type: "boolean";
|
|
440
|
+
readonly description: "Whether the presentation satisfies the criterion's DCQL query. Satisfying the query is not admission: the community still decides the join under the criterion's `admission`.";
|
|
441
|
+
};
|
|
442
|
+
readonly holder: {
|
|
443
|
+
readonly type: "string";
|
|
444
|
+
readonly minLength: 1;
|
|
445
|
+
readonly maxLength: 2048;
|
|
446
|
+
readonly description: "The identifier of the key that held the presented credentials — for an SD-JWT VC, the `did:key` of its `cnf` key. Recorded beside the applicant DID, never as it.";
|
|
447
|
+
};
|
|
448
|
+
readonly credentials: {
|
|
449
|
+
readonly type: "array";
|
|
450
|
+
readonly minItems: 1;
|
|
451
|
+
readonly maxItems: 32;
|
|
452
|
+
readonly items: {
|
|
453
|
+
readonly $ref: "#/$defs/PresentedCredential";
|
|
454
|
+
};
|
|
455
|
+
readonly description: "The credentials presented, one entry each.";
|
|
456
|
+
};
|
|
457
|
+
readonly heldUntil: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
readonly format: "date-time";
|
|
460
|
+
readonly description: "When evidence not yet recorded on a join request is discarded if the applicant has not submitted under the session's criterion. Absent when the evidence is recorded on a request.";
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
readonly Response: {
|
|
465
|
+
readonly $anchor: "response";
|
|
466
|
+
readonly title: "VTC Join-Requests Wallet Session Status — response payload";
|
|
467
|
+
readonly type: "object";
|
|
468
|
+
readonly additionalProperties: false;
|
|
469
|
+
readonly required: readonly ["sessionId", "state", "expiresAt"];
|
|
470
|
+
readonly properties: {
|
|
471
|
+
readonly sessionId: {
|
|
472
|
+
readonly type: "string";
|
|
473
|
+
readonly minLength: 16;
|
|
474
|
+
readonly maxLength: 128;
|
|
475
|
+
};
|
|
476
|
+
readonly state: {
|
|
477
|
+
readonly type: "string";
|
|
478
|
+
readonly enum: readonly ["awaitingWallet", "requestRetrieved", "presented", "refused", "expired"];
|
|
479
|
+
readonly description: "`awaitingWallet`: no wallet has fetched the request object. `requestRetrieved`: a wallet has fetched it and not yet answered. `presented`: a wallet answered and the presentation verified; see `evidence`. `refused`: a wallet answered and the community did not accept the answer, or the wallet declined; see `reason`. `expired`: the session closed unanswered.";
|
|
480
|
+
};
|
|
481
|
+
readonly expiresAt: {
|
|
482
|
+
readonly type: "string";
|
|
483
|
+
readonly format: "date-time";
|
|
484
|
+
readonly description: "When the session closes, or closed, if unanswered.";
|
|
485
|
+
};
|
|
486
|
+
readonly requestId: {
|
|
487
|
+
readonly type: "string";
|
|
488
|
+
readonly minLength: 1;
|
|
489
|
+
readonly maxLength: 128;
|
|
490
|
+
readonly description: "The join request the session's evidence is recorded on. Present when the session was bound to one, or its evidence has since been attached to one by a submission.";
|
|
491
|
+
};
|
|
492
|
+
readonly evidence: {
|
|
493
|
+
readonly $ref: "#/$defs/Evidence";
|
|
494
|
+
readonly description: "Present only when `state` is `presented`.";
|
|
495
|
+
};
|
|
496
|
+
readonly reason: {
|
|
497
|
+
readonly type: "string";
|
|
498
|
+
readonly enum: readonly ["presentationInvalid", "queryNotSatisfied", "issuerNotTrusted", "statusNotValid", "walletDeclined"];
|
|
499
|
+
readonly description: "Why the session ended `refused`. `presentationInvalid`: the response or a presentation failed verification — decryption, `state`, signature, key binding, nonce or audience. `queryNotSatisfied`: the presentations verified but do not satisfy the query. `issuerNotTrusted`: a credential's issuer is not one the criterion accepts. `statusNotValid`: a credential's status is revoked or suspended, or could not be read. `walletDeclined`: the wallet answered with an OpenID4VP error, such as `access_denied`. Present only when `state` is `refused`.";
|
|
500
|
+
};
|
|
501
|
+
readonly ext: {
|
|
502
|
+
readonly $ref: "#/$defs/Ext";
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
readonly Ext: {
|
|
507
|
+
readonly title: "Ext";
|
|
508
|
+
readonly 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.";
|
|
509
|
+
readonly type: "object";
|
|
510
|
+
readonly minProperties: 1;
|
|
511
|
+
readonly additionalProperties: true;
|
|
512
|
+
readonly propertyNames: {
|
|
513
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
/**
|
|
520
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
521
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
522
|
+
* parties (§7.3 item 5).
|
|
523
|
+
*/
|
|
524
|
+
export declare const RESPONSE_SPEC: {
|
|
525
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/status/0.1#response";
|
|
526
|
+
readonly isBearer: false;
|
|
527
|
+
readonly isProofRequired: true;
|
|
528
|
+
readonly isRecipientRequired: true;
|
|
529
|
+
readonly isIssuedAtRequired: false;
|
|
530
|
+
readonly payloadSchema: {
|
|
531
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
532
|
+
readonly $ref: "#/$defs/Response";
|
|
533
|
+
readonly $defs: {
|
|
534
|
+
readonly PresentedCredential: {
|
|
535
|
+
readonly title: "PresentedCredential";
|
|
536
|
+
readonly type: "object";
|
|
537
|
+
readonly additionalProperties: false;
|
|
538
|
+
readonly required: readonly ["credentialQueryId", "format", "issuer"];
|
|
539
|
+
readonly description: "One credential the wallet presented, described without any of its claim values.";
|
|
540
|
+
readonly properties: {
|
|
541
|
+
readonly credentialQueryId: {
|
|
542
|
+
readonly type: "string";
|
|
543
|
+
readonly minLength: 1;
|
|
544
|
+
readonly maxLength: 128;
|
|
545
|
+
readonly description: "The `id` of the DCQL credential query this credential was presented for — the key it arrived under in the OpenID4VP `vp_token`.";
|
|
546
|
+
};
|
|
547
|
+
readonly format: {
|
|
548
|
+
readonly type: "string";
|
|
549
|
+
readonly minLength: 1;
|
|
550
|
+
readonly maxLength: 64;
|
|
551
|
+
readonly description: "The credential format identifier, as OpenID4VP names it (`dc+sd-jwt`, `mso_mdoc`). Carried verbatim.";
|
|
552
|
+
};
|
|
553
|
+
readonly issuer: {
|
|
554
|
+
readonly type: "string";
|
|
555
|
+
readonly minLength: 1;
|
|
556
|
+
readonly maxLength: 2048;
|
|
557
|
+
readonly description: "The identifier of the credential's issuer as the community verified it — a DID, or for an issuer identified by an X.509 certificate, the certificate subject or hash the community's policy names it by.";
|
|
558
|
+
};
|
|
559
|
+
readonly vct: {
|
|
560
|
+
readonly type: "string";
|
|
561
|
+
readonly minLength: 1;
|
|
562
|
+
readonly maxLength: 2048;
|
|
563
|
+
readonly description: "The SD-JWT VC credential type (`vct`). Present for SD-JWT VC credentials.";
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
readonly Evidence: {
|
|
568
|
+
readonly title: "Evidence";
|
|
569
|
+
readonly type: "object";
|
|
570
|
+
readonly additionalProperties: false;
|
|
571
|
+
readonly required: readonly ["satisfied", "holder", "credentials"];
|
|
572
|
+
readonly description: "What a verified wallet presentation established. Never claim values.";
|
|
573
|
+
readonly properties: {
|
|
574
|
+
readonly satisfied: {
|
|
575
|
+
readonly type: "boolean";
|
|
576
|
+
readonly description: "Whether the presentation satisfies the criterion's DCQL query. Satisfying the query is not admission: the community still decides the join under the criterion's `admission`.";
|
|
577
|
+
};
|
|
578
|
+
readonly holder: {
|
|
579
|
+
readonly type: "string";
|
|
580
|
+
readonly minLength: 1;
|
|
581
|
+
readonly maxLength: 2048;
|
|
582
|
+
readonly description: "The identifier of the key that held the presented credentials — for an SD-JWT VC, the `did:key` of its `cnf` key. Recorded beside the applicant DID, never as it.";
|
|
583
|
+
};
|
|
584
|
+
readonly credentials: {
|
|
585
|
+
readonly type: "array";
|
|
586
|
+
readonly minItems: 1;
|
|
587
|
+
readonly maxItems: 32;
|
|
588
|
+
readonly items: {
|
|
589
|
+
readonly $ref: "#/$defs/PresentedCredential";
|
|
590
|
+
};
|
|
591
|
+
readonly description: "The credentials presented, one entry each.";
|
|
592
|
+
};
|
|
593
|
+
readonly heldUntil: {
|
|
594
|
+
readonly type: "string";
|
|
595
|
+
readonly format: "date-time";
|
|
596
|
+
readonly description: "When evidence not yet recorded on a join request is discarded if the applicant has not submitted under the session's criterion. Absent when the evidence is recorded on a request.";
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
readonly Response: {
|
|
601
|
+
readonly $anchor: "response";
|
|
602
|
+
readonly title: "VTC Join-Requests Wallet Session Status — response payload";
|
|
603
|
+
readonly type: "object";
|
|
604
|
+
readonly additionalProperties: false;
|
|
605
|
+
readonly required: readonly ["sessionId", "state", "expiresAt"];
|
|
606
|
+
readonly properties: {
|
|
607
|
+
readonly sessionId: {
|
|
608
|
+
readonly type: "string";
|
|
609
|
+
readonly minLength: 16;
|
|
610
|
+
readonly maxLength: 128;
|
|
611
|
+
};
|
|
612
|
+
readonly state: {
|
|
613
|
+
readonly type: "string";
|
|
614
|
+
readonly enum: readonly ["awaitingWallet", "requestRetrieved", "presented", "refused", "expired"];
|
|
615
|
+
readonly description: "`awaitingWallet`: no wallet has fetched the request object. `requestRetrieved`: a wallet has fetched it and not yet answered. `presented`: a wallet answered and the presentation verified; see `evidence`. `refused`: a wallet answered and the community did not accept the answer, or the wallet declined; see `reason`. `expired`: the session closed unanswered.";
|
|
616
|
+
};
|
|
617
|
+
readonly expiresAt: {
|
|
618
|
+
readonly type: "string";
|
|
619
|
+
readonly format: "date-time";
|
|
620
|
+
readonly description: "When the session closes, or closed, if unanswered.";
|
|
621
|
+
};
|
|
622
|
+
readonly requestId: {
|
|
623
|
+
readonly type: "string";
|
|
624
|
+
readonly minLength: 1;
|
|
625
|
+
readonly maxLength: 128;
|
|
626
|
+
readonly description: "The join request the session's evidence is recorded on. Present when the session was bound to one, or its evidence has since been attached to one by a submission.";
|
|
627
|
+
};
|
|
628
|
+
readonly evidence: {
|
|
629
|
+
readonly $ref: "#/$defs/Evidence";
|
|
630
|
+
readonly description: "Present only when `state` is `presented`.";
|
|
631
|
+
};
|
|
632
|
+
readonly reason: {
|
|
633
|
+
readonly type: "string";
|
|
634
|
+
readonly enum: readonly ["presentationInvalid", "queryNotSatisfied", "issuerNotTrusted", "statusNotValid", "walletDeclined"];
|
|
635
|
+
readonly description: "Why the session ended `refused`. `presentationInvalid`: the response or a presentation failed verification — decryption, `state`, signature, key binding, nonce or audience. `queryNotSatisfied`: the presentations verified but do not satisfy the query. `issuerNotTrusted`: a credential's issuer is not one the criterion accepts. `statusNotValid`: a credential's status is revoked or suspended, or could not be read. `walletDeclined`: the wallet answered with an OpenID4VP error, such as `access_denied`. Present only when `state` is `refused`.";
|
|
636
|
+
};
|
|
637
|
+
readonly ext: {
|
|
638
|
+
readonly $ref: "#/$defs/Ext";
|
|
639
|
+
};
|
|
640
|
+
};
|
|
641
|
+
};
|
|
642
|
+
readonly Ext: {
|
|
643
|
+
readonly title: "Ext";
|
|
644
|
+
readonly 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.";
|
|
645
|
+
readonly type: "object";
|
|
646
|
+
readonly minProperties: 1;
|
|
647
|
+
readonly additionalProperties: true;
|
|
648
|
+
readonly propertyNames: {
|
|
649
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
650
|
+
};
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
//# sourceMappingURL=payload.d.ts.map
|