@openvtc/trust-tasks 0.24.0 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/dist/_shared/components.d.ts +55 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +4 -0
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +4 -0
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +4 -0
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +4 -0
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +4 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/keys/sign-csr/0.1/payload.d.ts +729 -0
  25. package/dist/keys/sign-csr/0.1/payload.d.ts.map +1 -0
  26. package/dist/keys/sign-csr/0.1/payload.js +280 -0
  27. package/dist/keys/sign-csr/0.1/payload.js.map +1 -0
  28. package/dist/keys/sign-jws/0.1/payload.d.ts +352 -0
  29. package/dist/keys/sign-jws/0.1/payload.d.ts.map +1 -0
  30. package/dist/keys/sign-jws/0.1/payload.js +207 -0
  31. package/dist/keys/sign-jws/0.1/payload.js.map +1 -0
  32. package/dist/rooms/_shared/0.1/blobs.d.ts +1 -1
  33. package/dist/rooms/_shared/0.1/blobs.d.ts.map +1 -1
  34. package/dist/vtc/join-requests/wallet-session/start/0.1/payload.d.ts +398 -0
  35. package/dist/vtc/join-requests/wallet-session/start/0.1/payload.d.ts.map +1 -0
  36. package/dist/vtc/join-requests/wallet-session/start/0.1/payload.js +220 -0
  37. package/dist/vtc/join-requests/wallet-session/start/0.1/payload.js.map +1 -0
  38. package/dist/vtc/join-requests/wallet-session/status/0.1/payload.d.ts +655 -0
  39. package/dist/vtc/join-requests/wallet-session/status/0.1/payload.d.ts.map +1 -0
  40. package/dist/vtc/join-requests/wallet-session/status/0.1/payload.js +360 -0
  41. package/dist/vtc/join-requests/wallet-session/status/0.1/payload.js.map +1 -0
  42. package/package.json +1 -1
  43. package/src/_shared/components.ts +57 -0
  44. package/src/device/list/0.1/payload.ts +4 -0
  45. package/src/device/list/0.2/payload.ts +4 -0
  46. package/src/device/register/0.1/payload.ts +4 -0
  47. package/src/device/register/0.2/payload.ts +4 -0
  48. package/src/index.ts +4 -0
  49. package/src/keys/sign-csr/0.1/payload.ts +646 -0
  50. package/src/keys/sign-jws/0.1/payload.ts +271 -0
  51. package/src/rooms/_shared/0.1/blobs.ts +1 -1
  52. package/src/vtc/join-requests/wallet-session/start/0.1/payload.ts +279 -0
  53. package/src/vtc/join-requests/wallet-session/status/0.1/payload.ts +454 -0
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/keys/sign-jws/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A request for a compact JWS (RFC 7515) made with a key the custodian holds. The producer supplies the protected header members it wants and the payload; the custodian sets `alg` from the key, serialises both itself, and signs the JWS signing input with no framing of its own. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export type KeysSignJWSPayload = {
13
+ /**
14
+ * Identifier of the key to sign with, as `keys/show` describes it. The key MUST be `active` and of a type with a JOSE signature algorithm.
15
+ */
16
+ keyId: string;
17
+ /**
18
+ * Protected header members the producer wants in the JWS — `typ`, `kid`, `x5c`, `cty`, or a profile's own (swiyu's `profile_version`). Member names and values are JOSE's and the profile's, carried verbatim. The custodian adds `alg` itself and refuses `alg`, `crit`, `b64`, `jwk`, `jku` and `x5u` (see the specification's Conformance section). Absent means a header of `alg` alone.
19
+ */
20
+ header?: {};
21
+ /**
22
+ * The JWS payload, as a JSON object — for an OpenID4VP request object or any other JWT, its claims set. The custodian serialises it (RFC 8785) and base64url-encodes the result. Exactly one of `payload` and `payloadBase64Url` is present.
23
+ */
24
+ payload?: {};
25
+ /**
26
+ * The JWS payload as bytes, for a payload that is not a JSON object, base64url-encoded without padding. The custodian uses this string as the payload segment unchanged, after checking it is the canonical encoding of the bytes it decodes to. Exactly one of `payload` and `payloadBase64Url` is present.
27
+ */
28
+ payloadBase64Url?: string;
29
+ /**
30
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
31
+ */
32
+ ext?: Ext;
33
+ } & {
34
+ [k: string]: unknown | undefined;
35
+ };
36
+
37
+ /**
38
+ * The success response to a keys/sign-jws request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-jws/0.1#response. Failures use trust-task-error, not this shape.
39
+ */
40
+ export interface KeysSignJWSResponsePayload {
41
+ /**
42
+ * The key that produced the signature. Echoed so a response separated from its request is still attributable.
43
+ */
44
+ keyId: string;
45
+ /**
46
+ * The JOSE algorithm the custodian chose from the key's type and wrote into the header: `EdDSA` for `ed25519`, `ES256` for `p256`, `ES256K` for a secp256k1 key, `ML-DSA-44` and `ML-DSA-65` for `mldsa44` and `mldsa65`. Externally owned, carried verbatim.
47
+ */
48
+ alg: "EdDSA" | "ES256" | "ES256K" | "ML-DSA-44" | "ML-DSA-65";
49
+ /**
50
+ * The JWS in compact serialisation: BASE64URL(header) '.' BASE64URL(payload) '.' BASE64URL(signature), unpadded. For ECDSA the signature is the fixed-width `r || s` of RFC 7518 §3.4, not DER.
51
+ */
52
+ jws: string;
53
+ ext?: Ext;
54
+ }
55
+
56
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
57
+ export type { Ext };
58
+
59
+ /** Trust Task type URI. */
60
+ export const TYPE_URI = "https://trusttasks.org/spec/keys/sign-jws/0.1" as const;
61
+
62
+ /** Stable alias for this specification's request payload shape. */
63
+ export type Payload = KeysSignJWSPayload;
64
+
65
+ /** Trust Task response type URI (request type URI + "#response"). */
66
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/keys/sign-jws/0.1#response" as const;
67
+
68
+ /** Stable alias for this specification's success-response payload shape. */
69
+ export type Response = KeysSignJWSResponsePayload;
70
+
71
+ /**
72
+ * This specification's payload schema, as a value.
73
+ *
74
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
75
+ * rather than only as a `.json` file because TypeScript types are erased
76
+ * at runtime: without a schema a consumer has nothing to validate, and
77
+ * every REQUIRED payload member is optional in practice. Cross-file
78
+ * `$ref`s are already inlined, so it needs no resolver.
79
+ */
80
+ export const PAYLOAD_SCHEMA = {
81
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
82
+ "$id": "https://trusttasks.org/spec/keys/sign-jws/0.1",
83
+ "title": "Keys — Sign JWS — payload",
84
+ "description": "A request for a compact JWS (RFC 7515) made with a key the custodian holds. The producer supplies the protected header members it wants and the payload; the custodian sets `alg` from the key, serialises both itself, and signs the JWS signing input with no framing of its own. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "keyId"
89
+ ],
90
+ "oneOf": [
91
+ {
92
+ "required": [
93
+ "payload"
94
+ ],
95
+ "not": {
96
+ "required": [
97
+ "payloadBase64Url"
98
+ ]
99
+ }
100
+ },
101
+ {
102
+ "required": [
103
+ "payloadBase64Url"
104
+ ],
105
+ "not": {
106
+ "required": [
107
+ "payload"
108
+ ]
109
+ }
110
+ }
111
+ ],
112
+ "properties": {
113
+ "keyId": {
114
+ "type": "string",
115
+ "minLength": 1,
116
+ "description": "Identifier of the key to sign with, as `keys/show` describes it. The key MUST be `active` and of a type with a JOSE signature algorithm."
117
+ },
118
+ "header": {
119
+ "type": "object",
120
+ "maxProperties": 32,
121
+ "description": "Protected header members the producer wants in the JWS — `typ`, `kid`, `x5c`, `cty`, or a profile's own (swiyu's `profile_version`). Member names and values are JOSE's and the profile's, carried verbatim. The custodian adds `alg` itself and refuses `alg`, `crit`, `b64`, `jwk`, `jku` and `x5u` (see the specification's Conformance section). Absent means a header of `alg` alone."
122
+ },
123
+ "payload": {
124
+ "type": "object",
125
+ "description": "The JWS payload, as a JSON object — for an OpenID4VP request object or any other JWT, its claims set. The custodian serialises it (RFC 8785) and base64url-encodes the result. Exactly one of `payload` and `payloadBase64Url` is present."
126
+ },
127
+ "payloadBase64Url": {
128
+ "type": "string",
129
+ "minLength": 2,
130
+ "pattern": "^[A-Za-z0-9_-]+$",
131
+ "description": "The JWS payload as bytes, for a payload that is not a JSON object, base64url-encoded without padding. The custodian uses this string as the payload segment unchanged, after checking it is the canonical encoding of the bytes it decodes to. Exactly one of `payload` and `payloadBase64Url` is present."
132
+ },
133
+ "ext": {
134
+ "$ref": "#/$defs/Ext",
135
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
136
+ }
137
+ },
138
+ "$defs": {
139
+ "Response": {
140
+ "$anchor": "response",
141
+ "title": "Keys — Sign JWS — response payload",
142
+ "description": "The success response to a keys/sign-jws request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-jws/0.1#response. Failures use trust-task-error, not this shape.",
143
+ "type": "object",
144
+ "additionalProperties": false,
145
+ "required": [
146
+ "keyId",
147
+ "alg",
148
+ "jws"
149
+ ],
150
+ "properties": {
151
+ "keyId": {
152
+ "type": "string",
153
+ "description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
154
+ },
155
+ "alg": {
156
+ "type": "string",
157
+ "enum": [
158
+ "EdDSA",
159
+ "ES256",
160
+ "ES256K",
161
+ "ML-DSA-44",
162
+ "ML-DSA-65"
163
+ ],
164
+ "description": "The JOSE algorithm the custodian chose from the key's type and wrote into the header: `EdDSA` for `ed25519`, `ES256` for `p256`, `ES256K` for a secp256k1 key, `ML-DSA-44` and `ML-DSA-65` for `mldsa44` and `mldsa65`. Externally owned, carried verbatim."
165
+ },
166
+ "jws": {
167
+ "type": "string",
168
+ "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
169
+ "description": "The JWS in compact serialisation: BASE64URL(header) '.' BASE64URL(payload) '.' BASE64URL(signature), unpadded. For ECDSA the signature is the fixed-width `r || s` of RFC 7518 §3.4, not DER."
170
+ },
171
+ "ext": {
172
+ "$ref": "#/$defs/Ext"
173
+ }
174
+ }
175
+ },
176
+ "Ext": {
177
+ "title": "Ext",
178
+ "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.",
179
+ "type": "object",
180
+ "minProperties": 1,
181
+ "additionalProperties": true,
182
+ "propertyNames": {
183
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
184
+ }
185
+ }
186
+ }
187
+ } as const;
188
+
189
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
190
+ export const RESPONSE_PAYLOAD_SCHEMA = {
191
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
192
+ "$ref": "#/$defs/Response",
193
+ "$defs": {
194
+ "Response": {
195
+ "$anchor": "response",
196
+ "title": "Keys — Sign JWS — response payload",
197
+ "description": "The success response to a keys/sign-jws request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-jws/0.1#response. Failures use trust-task-error, not this shape.",
198
+ "type": "object",
199
+ "additionalProperties": false,
200
+ "required": [
201
+ "keyId",
202
+ "alg",
203
+ "jws"
204
+ ],
205
+ "properties": {
206
+ "keyId": {
207
+ "type": "string",
208
+ "description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
209
+ },
210
+ "alg": {
211
+ "type": "string",
212
+ "enum": [
213
+ "EdDSA",
214
+ "ES256",
215
+ "ES256K",
216
+ "ML-DSA-44",
217
+ "ML-DSA-65"
218
+ ],
219
+ "description": "The JOSE algorithm the custodian chose from the key's type and wrote into the header: `EdDSA` for `ed25519`, `ES256` for `p256`, `ES256K` for a secp256k1 key, `ML-DSA-44` and `ML-DSA-65` for `mldsa44` and `mldsa65`. Externally owned, carried verbatim."
220
+ },
221
+ "jws": {
222
+ "type": "string",
223
+ "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",
224
+ "description": "The JWS in compact serialisation: BASE64URL(header) '.' BASE64URL(payload) '.' BASE64URL(signature), unpadded. For ECDSA the signature is the fixed-width `r || s` of RFC 7518 §3.4, not DER."
225
+ },
226
+ "ext": {
227
+ "$ref": "#/$defs/Ext"
228
+ }
229
+ }
230
+ },
231
+ "Ext": {
232
+ "title": "Ext",
233
+ "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.",
234
+ "type": "object",
235
+ "minProperties": 1,
236
+ "additionalProperties": true,
237
+ "propertyNames": {
238
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
239
+ }
240
+ }
241
+ }
242
+ } as const;
243
+
244
+ /**
245
+ * SPEC.md §7.2 policy for the request variant, from this specification's
246
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
247
+ * per-specification and cannot be derived from the document alone, and
248
+ * item 2 needs the schema this carries.
249
+ */
250
+ export const SPEC = {
251
+ typeUri: TYPE_URI,
252
+ isBearer: false,
253
+ isProofRequired: true,
254
+ isRecipientRequired: true,
255
+ isIssuedAtRequired: true,
256
+ payloadSchema: PAYLOAD_SCHEMA,
257
+ } as const;
258
+
259
+ /**
260
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
261
+ * tracks the *issuer* party's requirement because a response swaps the
262
+ * parties (§7.3 item 5).
263
+ */
264
+ export const RESPONSE_SPEC = {
265
+ typeUri: RESPONSE_TYPE_URI,
266
+ isBearer: false,
267
+ isProofRequired: false,
268
+ isRecipientRequired: true,
269
+ isIssuedAtRequired: true,
270
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
271
+ } as const;
@@ -14,4 +14,4 @@ export interface RoomsSharedFileAndBlobTypes {
14
14
  * The definitions this shared schema publishes, hoisted to one declaration each.
15
15
  * See "../../../_shared/components.js".
16
16
  */
17
- export type { BlobManifest, BlobRef, RoomLimits, ScopeLimits, TransferId, Usage } from "../../../_shared/components.js";
17
+ export type { BlobManifest, BlobRef, FileManifest, RoomLimits, ScopeLimits, TransferId, Usage } from "../../../_shared/components.js";
@@ -0,0 +1,279 @@
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
+
6
+ import type { DigestMultibase, Ext } from "../../../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * 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.
11
+ */
12
+ export interface VTCJoinRequestsWalletSessionStartPayload {
13
+ /**
14
+ * 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.
15
+ */
16
+ criterion: DigestMultibase;
17
+ /**
18
+ * 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.
19
+ */
20
+ requestId?: string;
21
+ /**
22
+ * 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`.
23
+ */
24
+ clientIdPrefix?: "decentralized_identifier" | "x509_hash";
25
+ ext?: Ext;
26
+ }
27
+ export interface VTCJoinRequestsWalletSessionStartResponsePayload {
28
+ /**
29
+ * 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.
30
+ */
31
+ sessionId: string;
32
+ /**
33
+ * 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.
34
+ */
35
+ walletUri: string;
36
+ /**
37
+ * 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.
38
+ */
39
+ clientId: string;
40
+ /**
41
+ * 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.
42
+ */
43
+ dcqlQuery: {};
44
+ /**
45
+ * When the session closes if no wallet has answered it. Minutes, not hours.
46
+ */
47
+ expiresAt: string;
48
+ ext?: Ext;
49
+ }
50
+
51
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
52
+ export type { DigestMultibase, Ext };
53
+
54
+ /** Trust Task type URI. */
55
+ export const TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1" as const;
56
+
57
+ /** Stable alias for this specification's request payload shape. */
58
+ export type Payload = VTCJoinRequestsWalletSessionStartPayload;
59
+
60
+ /** Trust Task response type URI (request type URI + "#response"). */
61
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1#response" as const;
62
+
63
+ /** Stable alias for this specification's success-response payload shape. */
64
+ export type Response = VTCJoinRequestsWalletSessionStartResponsePayload;
65
+
66
+ /**
67
+ * This specification's payload schema, as a value.
68
+ *
69
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
70
+ * rather than only as a `.json` file because TypeScript types are erased
71
+ * at runtime: without a schema a consumer has nothing to validate, and
72
+ * every REQUIRED payload member is optional in practice. Cross-file
73
+ * `$ref`s are already inlined, so it needs no resolver.
74
+ */
75
+ export const PAYLOAD_SCHEMA = {
76
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
77
+ "$id": "https://trusttasks.org/spec/vtc/join-requests/wallet-session/start/0.1",
78
+ "title": "VTC Join-Requests Wallet Session Start — payload",
79
+ "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.",
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "required": [
83
+ "criterion"
84
+ ],
85
+ "properties": {
86
+ "criterion": {
87
+ "$ref": "#/$defs/DigestMultibase",
88
+ "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."
89
+ },
90
+ "requestId": {
91
+ "type": "string",
92
+ "minLength": 1,
93
+ "maxLength": 128,
94
+ "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."
95
+ },
96
+ "clientIdPrefix": {
97
+ "type": "string",
98
+ "enum": [
99
+ "decentralized_identifier",
100
+ "x509_hash"
101
+ ],
102
+ "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`."
103
+ },
104
+ "ext": {
105
+ "$ref": "#/$defs/Ext"
106
+ }
107
+ },
108
+ "$defs": {
109
+ "Response": {
110
+ "$anchor": "response",
111
+ "title": "VTC Join-Requests Wallet Session Start — response payload",
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "sessionId",
116
+ "walletUri",
117
+ "clientId",
118
+ "dcqlQuery",
119
+ "expiresAt"
120
+ ],
121
+ "properties": {
122
+ "sessionId": {
123
+ "type": "string",
124
+ "minLength": 16,
125
+ "maxLength": 128,
126
+ "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."
127
+ },
128
+ "walletUri": {
129
+ "type": "string",
130
+ "format": "uri",
131
+ "minLength": 1,
132
+ "maxLength": 4096,
133
+ "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."
134
+ },
135
+ "clientId": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 2048,
139
+ "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."
140
+ },
141
+ "dcqlQuery": {
142
+ "type": "object",
143
+ "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."
144
+ },
145
+ "expiresAt": {
146
+ "type": "string",
147
+ "format": "date-time",
148
+ "description": "When the session closes if no wallet has answered it. Minutes, not hours."
149
+ },
150
+ "ext": {
151
+ "$ref": "#/$defs/Ext"
152
+ }
153
+ }
154
+ },
155
+ "Ext": {
156
+ "title": "Ext",
157
+ "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.",
158
+ "type": "object",
159
+ "minProperties": 1,
160
+ "additionalProperties": true,
161
+ "propertyNames": {
162
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
163
+ }
164
+ },
165
+ "DigestMultibase": {
166
+ "title": "DigestMultibase",
167
+ "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`.",
168
+ "type": "string",
169
+ "minLength": 16,
170
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
171
+ "examples": [
172
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
173
+ ]
174
+ }
175
+ }
176
+ } as const;
177
+
178
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
179
+ export const RESPONSE_PAYLOAD_SCHEMA = {
180
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
181
+ "$ref": "#/$defs/Response",
182
+ "$defs": {
183
+ "Response": {
184
+ "$anchor": "response",
185
+ "title": "VTC Join-Requests Wallet Session Start — response payload",
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "required": [
189
+ "sessionId",
190
+ "walletUri",
191
+ "clientId",
192
+ "dcqlQuery",
193
+ "expiresAt"
194
+ ],
195
+ "properties": {
196
+ "sessionId": {
197
+ "type": "string",
198
+ "minLength": 16,
199
+ "maxLength": 128,
200
+ "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."
201
+ },
202
+ "walletUri": {
203
+ "type": "string",
204
+ "format": "uri",
205
+ "minLength": 1,
206
+ "maxLength": 4096,
207
+ "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."
208
+ },
209
+ "clientId": {
210
+ "type": "string",
211
+ "minLength": 1,
212
+ "maxLength": 2048,
213
+ "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."
214
+ },
215
+ "dcqlQuery": {
216
+ "type": "object",
217
+ "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."
218
+ },
219
+ "expiresAt": {
220
+ "type": "string",
221
+ "format": "date-time",
222
+ "description": "When the session closes if no wallet has answered it. Minutes, not hours."
223
+ },
224
+ "ext": {
225
+ "$ref": "#/$defs/Ext"
226
+ }
227
+ }
228
+ },
229
+ "Ext": {
230
+ "title": "Ext",
231
+ "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
+ "type": "object",
233
+ "minProperties": 1,
234
+ "additionalProperties": true,
235
+ "propertyNames": {
236
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
237
+ }
238
+ },
239
+ "DigestMultibase": {
240
+ "title": "DigestMultibase",
241
+ "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`.",
242
+ "type": "string",
243
+ "minLength": 16,
244
+ "pattern": "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$",
245
+ "examples": [
246
+ "zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"
247
+ ]
248
+ }
249
+ }
250
+ } as const;
251
+
252
+ /**
253
+ * SPEC.md §7.2 policy for the request variant, from this specification's
254
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
255
+ * per-specification and cannot be derived from the document alone, and
256
+ * item 2 needs the schema this carries.
257
+ */
258
+ export const SPEC = {
259
+ typeUri: TYPE_URI,
260
+ isBearer: false,
261
+ isProofRequired: true,
262
+ isRecipientRequired: true,
263
+ isIssuedAtRequired: true,
264
+ payloadSchema: PAYLOAD_SCHEMA,
265
+ } as const;
266
+
267
+ /**
268
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
269
+ * tracks the *issuer* party's requirement because a response swaps the
270
+ * parties (§7.3 item 5).
271
+ */
272
+ export const RESPONSE_SPEC = {
273
+ typeUri: RESPONSE_TYPE_URI,
274
+ isBearer: false,
275
+ isProofRequired: true,
276
+ isRecipientRequired: true,
277
+ isIssuedAtRequired: true,
278
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
279
+ } as const;