@openvtc/trust-tasks 0.24.0 → 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 +36 -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,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/join-requests/wallet-session/start/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { DigestMultibase, Ext } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* An applicant asks the community to open an OpenID4VP 1.0 presentation session for one of its join criteria, so that a wallet which cannot sign Trust Tasks can present credentials as evidence for the applicant's join. The applicant is the document proof's signer, not a payload member. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCJoinRequestsWalletSessionStartPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The `requirementsDigest` of the criterion the applicant is gathering evidence for, as vtc/join-requests/manifest/0.3 published it — the same value vtc/join-requests/submit/0.3 carries as its `criterion`. Naming the version, not only the criterion, fixes the DCQL query the wallet is asked to satisfy to the one the applicant read.
|
|
12
|
+
*/
|
|
13
|
+
criterion: DigestMultibase;
|
|
14
|
+
/**
|
|
15
|
+
* An existing join request of the applicant's to record the evidence on. Absent: the community holds the evidence, for a bounded period of its own policy, for the applicant's next vtc/join-requests/submit under the same criterion.
|
|
16
|
+
*/
|
|
17
|
+
requestId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The OpenID4VP 1.0 client identifier prefix the community should identify itself to the wallet with — a DID (`decentralized_identifier`, as swiyu wallets expect) or an X.509 certificate (`x509_hash`, as EUDI wallets expect). Values are OpenID4VP's own and are carried verbatim. Absent: the community's default. A community holding no verifier identity of the requested kind refuses with `verifierNotConfigured`.
|
|
20
|
+
*/
|
|
21
|
+
clientIdPrefix?: "decentralized_identifier" | "x509_hash";
|
|
22
|
+
ext?: Ext;
|
|
23
|
+
}
|
|
24
|
+
export interface VTCJoinRequestsWalletSessionStartResponsePayload {
|
|
25
|
+
/**
|
|
26
|
+
* Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it.
|
|
27
|
+
*/
|
|
28
|
+
sessionId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others.
|
|
31
|
+
*/
|
|
32
|
+
walletUri: string;
|
|
33
|
+
/**
|
|
34
|
+
* The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name.
|
|
35
|
+
*/
|
|
36
|
+
clientId: string;
|
|
37
|
+
/**
|
|
38
|
+
* The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names.
|
|
39
|
+
*/
|
|
40
|
+
dcqlQuery: {};
|
|
41
|
+
/**
|
|
42
|
+
* When the session closes if no wallet has answered it. Minutes, not hours.
|
|
43
|
+
*/
|
|
44
|
+
expiresAt: string;
|
|
45
|
+
ext?: Ext;
|
|
46
|
+
}
|
|
47
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
48
|
+
export type { DigestMultibase, Ext };
|
|
49
|
+
/** Trust Task type URI. */
|
|
50
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1";
|
|
51
|
+
/** Stable alias for this specification's request payload shape. */
|
|
52
|
+
export type Payload = VTCJoinRequestsWalletSessionStartPayload;
|
|
53
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
54
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1#response";
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = VTCJoinRequestsWalletSessionStartResponsePayload;
|
|
57
|
+
/**
|
|
58
|
+
* This specification's payload schema, as a value.
|
|
59
|
+
*
|
|
60
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
61
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
62
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
63
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
64
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
65
|
+
*/
|
|
66
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
67
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
68
|
+
readonly $id: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1";
|
|
69
|
+
readonly title: "VTC Join-Requests Wallet Session Start — payload";
|
|
70
|
+
readonly description: "An applicant asks the community to open an OpenID4VP 1.0 presentation session for one of its join criteria, so that a wallet which cannot sign Trust Tasks can present credentials as evidence for the applicant's join. The applicant is the document proof's signer, not a payload member. The outer document members are owned by the framework — SPEC §6.3.";
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly additionalProperties: false;
|
|
73
|
+
readonly required: readonly ["criterion"];
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly criterion: {
|
|
76
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
77
|
+
readonly description: "The `requirementsDigest` of the criterion the applicant is gathering evidence for, as vtc/join-requests/manifest/0.3 published it — the same value vtc/join-requests/submit/0.3 carries as its `criterion`. Naming the version, not only the criterion, fixes the DCQL query the wallet is asked to satisfy to the one the applicant read.";
|
|
78
|
+
};
|
|
79
|
+
readonly requestId: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly minLength: 1;
|
|
82
|
+
readonly maxLength: 128;
|
|
83
|
+
readonly description: "An existing join request of the applicant's to record the evidence on. Absent: the community holds the evidence, for a bounded period of its own policy, for the applicant's next vtc/join-requests/submit under the same criterion.";
|
|
84
|
+
};
|
|
85
|
+
readonly clientIdPrefix: {
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly enum: readonly ["decentralized_identifier", "x509_hash"];
|
|
88
|
+
readonly description: "The OpenID4VP 1.0 client identifier prefix the community should identify itself to the wallet with — a DID (`decentralized_identifier`, as swiyu wallets expect) or an X.509 certificate (`x509_hash`, as EUDI wallets expect). Values are OpenID4VP's own and are carried verbatim. Absent: the community's default. A community holding no verifier identity of the requested kind refuses with `verifierNotConfigured`.";
|
|
89
|
+
};
|
|
90
|
+
readonly ext: {
|
|
91
|
+
readonly $ref: "#/$defs/Ext";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
readonly $defs: {
|
|
95
|
+
readonly Response: {
|
|
96
|
+
readonly $anchor: "response";
|
|
97
|
+
readonly title: "VTC Join-Requests Wallet Session Start — response payload";
|
|
98
|
+
readonly type: "object";
|
|
99
|
+
readonly additionalProperties: false;
|
|
100
|
+
readonly required: readonly ["sessionId", "walletUri", "clientId", "dcqlQuery", "expiresAt"];
|
|
101
|
+
readonly properties: {
|
|
102
|
+
readonly sessionId: {
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
readonly minLength: 16;
|
|
105
|
+
readonly maxLength: 128;
|
|
106
|
+
readonly description: "Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it.";
|
|
107
|
+
};
|
|
108
|
+
readonly walletUri: {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly format: "uri";
|
|
111
|
+
readonly minLength: 1;
|
|
112
|
+
readonly maxLength: 4096;
|
|
113
|
+
readonly description: "The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others.";
|
|
114
|
+
};
|
|
115
|
+
readonly clientId: {
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
readonly minLength: 1;
|
|
118
|
+
readonly maxLength: 2048;
|
|
119
|
+
readonly description: "The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name.";
|
|
120
|
+
};
|
|
121
|
+
readonly dcqlQuery: {
|
|
122
|
+
readonly type: "object";
|
|
123
|
+
readonly description: "The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names.";
|
|
124
|
+
};
|
|
125
|
+
readonly expiresAt: {
|
|
126
|
+
readonly type: "string";
|
|
127
|
+
readonly format: "date-time";
|
|
128
|
+
readonly description: "When the session closes if no wallet has answered it. Minutes, not hours.";
|
|
129
|
+
};
|
|
130
|
+
readonly ext: {
|
|
131
|
+
readonly $ref: "#/$defs/Ext";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly Ext: {
|
|
136
|
+
readonly title: "Ext";
|
|
137
|
+
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.";
|
|
138
|
+
readonly type: "object";
|
|
139
|
+
readonly minProperties: 1;
|
|
140
|
+
readonly additionalProperties: true;
|
|
141
|
+
readonly propertyNames: {
|
|
142
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly DigestMultibase: {
|
|
146
|
+
readonly title: "DigestMultibase";
|
|
147
|
+
readonly 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`.";
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
readonly minLength: 16;
|
|
150
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
151
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
156
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
157
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
158
|
+
readonly $ref: "#/$defs/Response";
|
|
159
|
+
readonly $defs: {
|
|
160
|
+
readonly Response: {
|
|
161
|
+
readonly $anchor: "response";
|
|
162
|
+
readonly title: "VTC Join-Requests Wallet Session Start — response payload";
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly additionalProperties: false;
|
|
165
|
+
readonly required: readonly ["sessionId", "walletUri", "clientId", "dcqlQuery", "expiresAt"];
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly sessionId: {
|
|
168
|
+
readonly type: "string";
|
|
169
|
+
readonly minLength: 16;
|
|
170
|
+
readonly maxLength: 128;
|
|
171
|
+
readonly description: "Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it.";
|
|
172
|
+
};
|
|
173
|
+
readonly walletUri: {
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
readonly format: "uri";
|
|
176
|
+
readonly minLength: 1;
|
|
177
|
+
readonly maxLength: 4096;
|
|
178
|
+
readonly description: "The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others.";
|
|
179
|
+
};
|
|
180
|
+
readonly clientId: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
readonly minLength: 1;
|
|
183
|
+
readonly maxLength: 2048;
|
|
184
|
+
readonly description: "The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name.";
|
|
185
|
+
};
|
|
186
|
+
readonly dcqlQuery: {
|
|
187
|
+
readonly type: "object";
|
|
188
|
+
readonly description: "The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names.";
|
|
189
|
+
};
|
|
190
|
+
readonly expiresAt: {
|
|
191
|
+
readonly type: "string";
|
|
192
|
+
readonly format: "date-time";
|
|
193
|
+
readonly description: "When the session closes if no wallet has answered it. Minutes, not hours.";
|
|
194
|
+
};
|
|
195
|
+
readonly ext: {
|
|
196
|
+
readonly $ref: "#/$defs/Ext";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
readonly Ext: {
|
|
201
|
+
readonly title: "Ext";
|
|
202
|
+
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.";
|
|
203
|
+
readonly type: "object";
|
|
204
|
+
readonly minProperties: 1;
|
|
205
|
+
readonly additionalProperties: true;
|
|
206
|
+
readonly propertyNames: {
|
|
207
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly DigestMultibase: {
|
|
211
|
+
readonly title: "DigestMultibase";
|
|
212
|
+
readonly 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`.";
|
|
213
|
+
readonly type: "string";
|
|
214
|
+
readonly minLength: 16;
|
|
215
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
216
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
222
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
223
|
+
* per-specification and cannot be derived from the document alone, and
|
|
224
|
+
* item 2 needs the schema this carries.
|
|
225
|
+
*/
|
|
226
|
+
export declare const SPEC: {
|
|
227
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1";
|
|
228
|
+
readonly isBearer: false;
|
|
229
|
+
readonly isProofRequired: true;
|
|
230
|
+
readonly isRecipientRequired: true;
|
|
231
|
+
readonly isIssuedAtRequired: true;
|
|
232
|
+
readonly payloadSchema: {
|
|
233
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
234
|
+
readonly $id: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1";
|
|
235
|
+
readonly title: "VTC Join-Requests Wallet Session Start — payload";
|
|
236
|
+
readonly description: "An applicant asks the community to open an OpenID4VP 1.0 presentation session for one of its join criteria, so that a wallet which cannot sign Trust Tasks can present credentials as evidence for the applicant's join. The applicant is the document proof's signer, not a payload member. The outer document members are owned by the framework — SPEC §6.3.";
|
|
237
|
+
readonly type: "object";
|
|
238
|
+
readonly additionalProperties: false;
|
|
239
|
+
readonly required: readonly ["criterion"];
|
|
240
|
+
readonly properties: {
|
|
241
|
+
readonly criterion: {
|
|
242
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
243
|
+
readonly description: "The `requirementsDigest` of the criterion the applicant is gathering evidence for, as vtc/join-requests/manifest/0.3 published it — the same value vtc/join-requests/submit/0.3 carries as its `criterion`. Naming the version, not only the criterion, fixes the DCQL query the wallet is asked to satisfy to the one the applicant read.";
|
|
244
|
+
};
|
|
245
|
+
readonly requestId: {
|
|
246
|
+
readonly type: "string";
|
|
247
|
+
readonly minLength: 1;
|
|
248
|
+
readonly maxLength: 128;
|
|
249
|
+
readonly description: "An existing join request of the applicant's to record the evidence on. Absent: the community holds the evidence, for a bounded period of its own policy, for the applicant's next vtc/join-requests/submit under the same criterion.";
|
|
250
|
+
};
|
|
251
|
+
readonly clientIdPrefix: {
|
|
252
|
+
readonly type: "string";
|
|
253
|
+
readonly enum: readonly ["decentralized_identifier", "x509_hash"];
|
|
254
|
+
readonly description: "The OpenID4VP 1.0 client identifier prefix the community should identify itself to the wallet with — a DID (`decentralized_identifier`, as swiyu wallets expect) or an X.509 certificate (`x509_hash`, as EUDI wallets expect). Values are OpenID4VP's own and are carried verbatim. Absent: the community's default. A community holding no verifier identity of the requested kind refuses with `verifierNotConfigured`.";
|
|
255
|
+
};
|
|
256
|
+
readonly ext: {
|
|
257
|
+
readonly $ref: "#/$defs/Ext";
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly $defs: {
|
|
261
|
+
readonly Response: {
|
|
262
|
+
readonly $anchor: "response";
|
|
263
|
+
readonly title: "VTC Join-Requests Wallet Session Start — response payload";
|
|
264
|
+
readonly type: "object";
|
|
265
|
+
readonly additionalProperties: false;
|
|
266
|
+
readonly required: readonly ["sessionId", "walletUri", "clientId", "dcqlQuery", "expiresAt"];
|
|
267
|
+
readonly properties: {
|
|
268
|
+
readonly sessionId: {
|
|
269
|
+
readonly type: "string";
|
|
270
|
+
readonly minLength: 16;
|
|
271
|
+
readonly maxLength: 128;
|
|
272
|
+
readonly description: "Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it.";
|
|
273
|
+
};
|
|
274
|
+
readonly walletUri: {
|
|
275
|
+
readonly type: "string";
|
|
276
|
+
readonly format: "uri";
|
|
277
|
+
readonly minLength: 1;
|
|
278
|
+
readonly maxLength: 4096;
|
|
279
|
+
readonly description: "The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others.";
|
|
280
|
+
};
|
|
281
|
+
readonly clientId: {
|
|
282
|
+
readonly type: "string";
|
|
283
|
+
readonly minLength: 1;
|
|
284
|
+
readonly maxLength: 2048;
|
|
285
|
+
readonly description: "The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name.";
|
|
286
|
+
};
|
|
287
|
+
readonly dcqlQuery: {
|
|
288
|
+
readonly type: "object";
|
|
289
|
+
readonly description: "The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names.";
|
|
290
|
+
};
|
|
291
|
+
readonly expiresAt: {
|
|
292
|
+
readonly type: "string";
|
|
293
|
+
readonly format: "date-time";
|
|
294
|
+
readonly description: "When the session closes if no wallet has answered it. Minutes, not hours.";
|
|
295
|
+
};
|
|
296
|
+
readonly ext: {
|
|
297
|
+
readonly $ref: "#/$defs/Ext";
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly Ext: {
|
|
302
|
+
readonly title: "Ext";
|
|
303
|
+
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.";
|
|
304
|
+
readonly type: "object";
|
|
305
|
+
readonly minProperties: 1;
|
|
306
|
+
readonly additionalProperties: true;
|
|
307
|
+
readonly propertyNames: {
|
|
308
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
readonly DigestMultibase: {
|
|
312
|
+
readonly title: "DigestMultibase";
|
|
313
|
+
readonly 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`.";
|
|
314
|
+
readonly type: "string";
|
|
315
|
+
readonly minLength: 16;
|
|
316
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
317
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
324
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
325
|
+
* parties (§7.3 item 5).
|
|
326
|
+
*/
|
|
327
|
+
export declare const RESPONSE_SPEC: {
|
|
328
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1#response";
|
|
329
|
+
readonly isBearer: false;
|
|
330
|
+
readonly isProofRequired: true;
|
|
331
|
+
readonly isRecipientRequired: true;
|
|
332
|
+
readonly isIssuedAtRequired: true;
|
|
333
|
+
readonly payloadSchema: {
|
|
334
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
335
|
+
readonly $ref: "#/$defs/Response";
|
|
336
|
+
readonly $defs: {
|
|
337
|
+
readonly Response: {
|
|
338
|
+
readonly $anchor: "response";
|
|
339
|
+
readonly title: "VTC Join-Requests Wallet Session Start — response payload";
|
|
340
|
+
readonly type: "object";
|
|
341
|
+
readonly additionalProperties: false;
|
|
342
|
+
readonly required: readonly ["sessionId", "walletUri", "clientId", "dcqlQuery", "expiresAt"];
|
|
343
|
+
readonly properties: {
|
|
344
|
+
readonly sessionId: {
|
|
345
|
+
readonly type: "string";
|
|
346
|
+
readonly minLength: 16;
|
|
347
|
+
readonly maxLength: 128;
|
|
348
|
+
readonly description: "Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it.";
|
|
349
|
+
};
|
|
350
|
+
readonly walletUri: {
|
|
351
|
+
readonly type: "string";
|
|
352
|
+
readonly format: "uri";
|
|
353
|
+
readonly minLength: 1;
|
|
354
|
+
readonly maxLength: 4096;
|
|
355
|
+
readonly description: "The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others.";
|
|
356
|
+
};
|
|
357
|
+
readonly clientId: {
|
|
358
|
+
readonly type: "string";
|
|
359
|
+
readonly minLength: 1;
|
|
360
|
+
readonly maxLength: 2048;
|
|
361
|
+
readonly description: "The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name.";
|
|
362
|
+
};
|
|
363
|
+
readonly dcqlQuery: {
|
|
364
|
+
readonly type: "object";
|
|
365
|
+
readonly description: "The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names.";
|
|
366
|
+
};
|
|
367
|
+
readonly expiresAt: {
|
|
368
|
+
readonly type: "string";
|
|
369
|
+
readonly format: "date-time";
|
|
370
|
+
readonly description: "When the session closes if no wallet has answered it. Minutes, not hours.";
|
|
371
|
+
};
|
|
372
|
+
readonly ext: {
|
|
373
|
+
readonly $ref: "#/$defs/Ext";
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
readonly Ext: {
|
|
378
|
+
readonly title: "Ext";
|
|
379
|
+
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.";
|
|
380
|
+
readonly type: "object";
|
|
381
|
+
readonly minProperties: 1;
|
|
382
|
+
readonly additionalProperties: true;
|
|
383
|
+
readonly propertyNames: {
|
|
384
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
readonly DigestMultibase: {
|
|
388
|
+
readonly title: "DigestMultibase";
|
|
389
|
+
readonly 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`.";
|
|
390
|
+
readonly type: "string";
|
|
391
|
+
readonly minLength: 16;
|
|
392
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
393
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../../../src/vtc/join-requests/wallet-session/start/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGjF;;GAEG;AACH,MAAM,WAAW,wCAAwC;IACvD;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,0BAA0B,GAAG,WAAW,CAAC;IAC1D,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD,MAAM,WAAW,gDAAgD;IAC/D;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,EAAE,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC;AAErC,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,wEAAiF,CAAC;AAE1G,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,wCAAwC,CAAC;AAE/D,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,iFAA0F,CAAC;AAE5H,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,gDAAgD,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuE1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/join-requests/wallet-session/start/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
/** Trust Task type URI. */
|
|
6
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1";
|
|
7
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
8
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/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/vtc/join-requests/wallet-session/start/0.1",
|
|
21
|
+
"title": "VTC Join-Requests Wallet Session Start — payload",
|
|
22
|
+
"description": "An applicant asks the community to open an OpenID4VP 1.0 presentation session for one of its join criteria, so that a wallet which cannot sign Trust Tasks can present credentials as evidence for the applicant's join. The applicant is the document proof's signer, not a payload member. The outer document members are owned by the framework — SPEC §6.3.",
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"criterion"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"criterion": {
|
|
30
|
+
"$ref": "#/$defs/DigestMultibase",
|
|
31
|
+
"description": "The `requirementsDigest` of the criterion the applicant is gathering evidence for, as vtc/join-requests/manifest/0.3 published it — the same value vtc/join-requests/submit/0.3 carries as its `criterion`. Naming the version, not only the criterion, fixes the DCQL query the wallet is asked to satisfy to the one the applicant read."
|
|
32
|
+
},
|
|
33
|
+
"requestId": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"minLength": 1,
|
|
36
|
+
"maxLength": 128,
|
|
37
|
+
"description": "An existing join request of the applicant's to record the evidence on. Absent: the community holds the evidence, for a bounded period of its own policy, for the applicant's next vtc/join-requests/submit under the same criterion."
|
|
38
|
+
},
|
|
39
|
+
"clientIdPrefix": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"decentralized_identifier",
|
|
43
|
+
"x509_hash"
|
|
44
|
+
],
|
|
45
|
+
"description": "The OpenID4VP 1.0 client identifier prefix the community should identify itself to the wallet with — a DID (`decentralized_identifier`, as swiyu wallets expect) or an X.509 certificate (`x509_hash`, as EUDI wallets expect). Values are OpenID4VP's own and are carried verbatim. Absent: the community's default. A community holding no verifier identity of the requested kind refuses with `verifierNotConfigured`."
|
|
46
|
+
},
|
|
47
|
+
"ext": {
|
|
48
|
+
"$ref": "#/$defs/Ext"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"$defs": {
|
|
52
|
+
"Response": {
|
|
53
|
+
"$anchor": "response",
|
|
54
|
+
"title": "VTC Join-Requests Wallet Session Start — response payload",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": [
|
|
58
|
+
"sessionId",
|
|
59
|
+
"walletUri",
|
|
60
|
+
"clientId",
|
|
61
|
+
"dcqlQuery",
|
|
62
|
+
"expiresAt"
|
|
63
|
+
],
|
|
64
|
+
"properties": {
|
|
65
|
+
"sessionId": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"minLength": 16,
|
|
68
|
+
"maxLength": 128,
|
|
69
|
+
"description": "Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it."
|
|
70
|
+
},
|
|
71
|
+
"walletUri": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"format": "uri",
|
|
74
|
+
"minLength": 1,
|
|
75
|
+
"maxLength": 4096,
|
|
76
|
+
"description": "The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others."
|
|
77
|
+
},
|
|
78
|
+
"clientId": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"maxLength": 2048,
|
|
82
|
+
"description": "The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name."
|
|
83
|
+
},
|
|
84
|
+
"dcqlQuery": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"description": "The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names."
|
|
87
|
+
},
|
|
88
|
+
"expiresAt": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"format": "date-time",
|
|
91
|
+
"description": "When the session closes if no wallet has answered it. Minutes, not hours."
|
|
92
|
+
},
|
|
93
|
+
"ext": {
|
|
94
|
+
"$ref": "#/$defs/Ext"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"Ext": {
|
|
99
|
+
"title": "Ext",
|
|
100
|
+
"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.",
|
|
101
|
+
"type": "object",
|
|
102
|
+
"minProperties": 1,
|
|
103
|
+
"additionalProperties": true,
|
|
104
|
+
"propertyNames": {
|
|
105
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"DigestMultibase": {
|
|
109
|
+
"title": "DigestMultibase",
|
|
110
|
+
"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`.",
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 16,
|
|
113
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
114
|
+
"examples": [
|
|
115
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
121
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
122
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
123
|
+
"$ref": "#/$defs/Response",
|
|
124
|
+
"$defs": {
|
|
125
|
+
"Response": {
|
|
126
|
+
"$anchor": "response",
|
|
127
|
+
"title": "VTC Join-Requests Wallet Session Start — response payload",
|
|
128
|
+
"type": "object",
|
|
129
|
+
"additionalProperties": false,
|
|
130
|
+
"required": [
|
|
131
|
+
"sessionId",
|
|
132
|
+
"walletUri",
|
|
133
|
+
"clientId",
|
|
134
|
+
"dcqlQuery",
|
|
135
|
+
"expiresAt"
|
|
136
|
+
],
|
|
137
|
+
"properties": {
|
|
138
|
+
"sessionId": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"minLength": 16,
|
|
141
|
+
"maxLength": 128,
|
|
142
|
+
"description": "Opaque, unguessable identifier of the session, carrying at least 128 bits of entropy. The applicant reads the outcome with vtc/join-requests/wallet-session/status under it."
|
|
143
|
+
},
|
|
144
|
+
"walletUri": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"format": "uri",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"maxLength": 4096,
|
|
149
|
+
"description": "The OpenID4VP invocation URI for this session, carrying `client_id` and `request_uri`, to be rendered as a QR code or opened as a deep link. Its scheme is the community's choice for the wallet ecosystem it serves — `openid4vp://`, `swiyu-verify://`, `haip-vp://` and others."
|
|
150
|
+
},
|
|
151
|
+
"clientId": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1,
|
|
154
|
+
"maxLength": 2048,
|
|
155
|
+
"description": "The full OpenID4VP client identifier the community presents to the wallet, prefix included (`decentralized_identifier:did:webvh:…`, `x509_hash:…`). It is the audience the wallet's key-binding JWT will name."
|
|
156
|
+
},
|
|
157
|
+
"dcqlQuery": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"description": "The DCQL query (OpenID4VP 1.0 §6) the wallet will be asked to satisfy: the criterion's published query, unchanged. Opaque here; its members are DCQL's own and keep DCQL's snake_case names."
|
|
160
|
+
},
|
|
161
|
+
"expiresAt": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"format": "date-time",
|
|
164
|
+
"description": "When the session closes if no wallet has answered it. Minutes, not hours."
|
|
165
|
+
},
|
|
166
|
+
"ext": {
|
|
167
|
+
"$ref": "#/$defs/Ext"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"Ext": {
|
|
172
|
+
"title": "Ext",
|
|
173
|
+
"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.",
|
|
174
|
+
"type": "object",
|
|
175
|
+
"minProperties": 1,
|
|
176
|
+
"additionalProperties": true,
|
|
177
|
+
"propertyNames": {
|
|
178
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"DigestMultibase": {
|
|
182
|
+
"title": "DigestMultibase",
|
|
183
|
+
"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`.",
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 16,
|
|
186
|
+
"pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
|
|
187
|
+
"examples": [
|
|
188
|
+
"zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
195
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
196
|
+
* per-specification and cannot be derived from the document alone, and
|
|
197
|
+
* item 2 needs the schema this carries.
|
|
198
|
+
*/
|
|
199
|
+
export const SPEC = {
|
|
200
|
+
typeUri: TYPE_URI,
|
|
201
|
+
isBearer: false,
|
|
202
|
+
isProofRequired: true,
|
|
203
|
+
isRecipientRequired: true,
|
|
204
|
+
isIssuedAtRequired: true,
|
|
205
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
209
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
210
|
+
* parties (§7.3 item 5).
|
|
211
|
+
*/
|
|
212
|
+
export const RESPONSE_SPEC = {
|
|
213
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
214
|
+
isBearer: false,
|
|
215
|
+
isProofRequired: true,
|
|
216
|
+
isRecipientRequired: true,
|
|
217
|
+
isIssuedAtRequired: true,
|
|
218
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
219
|
+
};
|
|
220
|
+
//# sourceMappingURL=payload.js.map
|