@owf/eudi-wrprc 0.0.0
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/README.md +264 -0
- package/dist/index.d.mts +1302 -0
- package/dist/index.mjs +892 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +43 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1302 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { IdentityException } from "@owf/identity-common";
|
|
3
|
+
import { Signer } from "@owf/crypto";
|
|
4
|
+
|
|
5
|
+
//#region src/schemas.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Multilingual string schema (B.2.6 Class MultiLangString)
|
|
8
|
+
*/
|
|
9
|
+
declare const MultiLangStringSchema: z.ZodObject<{
|
|
10
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
11
|
+
value: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
lang: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}, {
|
|
16
|
+
lang: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Supervisory Authority schema for Data Protection Authority
|
|
21
|
+
*/
|
|
22
|
+
declare const SupervisoryAuthoritySchema: z.ZodObject<{
|
|
23
|
+
/** Email address of the Data Protection Authority */email: z.ZodOptional<z.ZodString>; /** Telephone number of the Data Protection Authority */
|
|
24
|
+
phone: z.ZodOptional<z.ZodString>; /** URL of web form provided by the Data Protection Authority */
|
|
25
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
email?: string | undefined;
|
|
28
|
+
phone?: string | undefined;
|
|
29
|
+
uri?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
email?: string | undefined;
|
|
32
|
+
phone?: string | undefined;
|
|
33
|
+
uri?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Claim schema for credential attribute specification (B.2.10 Class Claim)
|
|
37
|
+
*/
|
|
38
|
+
declare const ClaimSchema: z.ZodObject<{
|
|
39
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
40
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
path: string[];
|
|
43
|
+
values?: (string | number | boolean)[] | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
path: string[];
|
|
46
|
+
values?: (string | number | boolean)[] | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Credential schema for attestations (B.2.9 Class Credential)
|
|
50
|
+
*/
|
|
51
|
+
declare const CredentialSchema: z.ZodObject<{
|
|
52
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
53
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
54
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
56
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
path: string[];
|
|
59
|
+
values?: (string | number | boolean)[] | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
path: string[];
|
|
62
|
+
values?: (string | number | boolean)[] | undefined;
|
|
63
|
+
}>, "many">>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
format: string;
|
|
66
|
+
meta: Record<string, unknown>;
|
|
67
|
+
claim?: {
|
|
68
|
+
path: string[];
|
|
69
|
+
values?: (string | number | boolean)[] | undefined;
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
format: string;
|
|
73
|
+
meta: Record<string, unknown>;
|
|
74
|
+
claim?: {
|
|
75
|
+
path: string[];
|
|
76
|
+
values?: (string | number | boolean)[] | undefined;
|
|
77
|
+
}[] | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Status schema for WRPRC validity
|
|
81
|
+
*/
|
|
82
|
+
declare const StatusSchema: z.ZodObject<{
|
|
83
|
+
status_list: z.ZodObject<{
|
|
84
|
+
/** Index in the status list */idx: z.ZodNumber; /** URI to the status list */
|
|
85
|
+
uri: z.ZodString;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
uri: string;
|
|
88
|
+
idx: number;
|
|
89
|
+
}, {
|
|
90
|
+
uri: string;
|
|
91
|
+
idx: number;
|
|
92
|
+
}>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
status_list: {
|
|
95
|
+
uri: string;
|
|
96
|
+
idx: number;
|
|
97
|
+
};
|
|
98
|
+
}, {
|
|
99
|
+
status_list: {
|
|
100
|
+
uri: string;
|
|
101
|
+
idx: number;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
/**
|
|
105
|
+
* Intermediary information when WRP acts through an intermediary
|
|
106
|
+
*/
|
|
107
|
+
declare const IntermediarySchema: z.ZodObject<{
|
|
108
|
+
/** Identifier of the intermediary */sub: z.ZodString; /** Name of the intermediary */
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
sub: string;
|
|
112
|
+
name: string;
|
|
113
|
+
}, {
|
|
114
|
+
sub: string;
|
|
115
|
+
name: string;
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* WRPRC Payload schema according to ETSI TS 119 475 clause 5.2.4
|
|
119
|
+
*/
|
|
120
|
+
declare const WRPRCPayloadSchema: z.ZodObject<{
|
|
121
|
+
/** The subject trade name of the WRPRC (B.2.1 tradeName) */name: z.ZodString; /** Legal name for legal person (B.2.3 legalName) */
|
|
122
|
+
sub_ln: z.ZodOptional<z.ZodString>; /** Given name for natural person (B.2.4 givenName) */
|
|
123
|
+
sub_gn: z.ZodOptional<z.ZodString>; /** Family name for natural person (B.2.4 familyName) */
|
|
124
|
+
sub_fn: z.ZodOptional<z.ZodString>; /** WRP identifier following semantic identifier rules */
|
|
125
|
+
sub: z.ZodString; /** Country code (ISO 3166-1 Alpha-2) */
|
|
126
|
+
country: z.ZodString; /** URL pointing to the national registry API endpoint */
|
|
127
|
+
registry_uri: z.ZodString; /** Descriptions of the services provided by the WRP */
|
|
128
|
+
srv_description: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
129
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
130
|
+
value: z.ZodString;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
lang: string;
|
|
133
|
+
value: string;
|
|
134
|
+
}, {
|
|
135
|
+
lang: string;
|
|
136
|
+
value: string;
|
|
137
|
+
}>, "many">, "many">>; /** List of entitlements assigned to the WRP */
|
|
138
|
+
entitlements: z.ZodArray<z.ZodString, "many">; /** URL to the WRP's privacy policy */
|
|
139
|
+
privacy_policy: z.ZodOptional<z.ZodString>; /** URL general-purpose web address */
|
|
140
|
+
info_uri: z.ZodOptional<z.ZodString>; /** URL or email for data deletion/portability requests */
|
|
141
|
+
support_uri: z.ZodOptional<z.ZodString>; /** Data Protection Authority supervising the WRP */
|
|
142
|
+
supervisory_authority: z.ZodOptional<z.ZodObject<{
|
|
143
|
+
/** Email address of the Data Protection Authority */email: z.ZodOptional<z.ZodString>; /** Telephone number of the Data Protection Authority */
|
|
144
|
+
phone: z.ZodOptional<z.ZodString>; /** URL of web form provided by the Data Protection Authority */
|
|
145
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
email?: string | undefined;
|
|
148
|
+
phone?: string | undefined;
|
|
149
|
+
uri?: string | undefined;
|
|
150
|
+
}, {
|
|
151
|
+
email?: string | undefined;
|
|
152
|
+
phone?: string | undefined;
|
|
153
|
+
uri?: string | undefined;
|
|
154
|
+
}>>; /** Policy identifier as defined in clause 6.1.3 */
|
|
155
|
+
policy_id: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; /** URL to the certificate policy and practice statement */
|
|
156
|
+
certificate_policy: z.ZodOptional<z.ZodString>; /** Unix timestamp indicating when the WRPRC was issued */
|
|
157
|
+
iat: z.ZodNumber; /** Status list for WRPRC validity */
|
|
158
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
status_list: z.ZodObject<{
|
|
160
|
+
/** Index in the status list */idx: z.ZodNumber; /** URI to the status list */
|
|
161
|
+
uri: z.ZodString;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
uri: string;
|
|
164
|
+
idx: number;
|
|
165
|
+
}, {
|
|
166
|
+
uri: string;
|
|
167
|
+
idx: number;
|
|
168
|
+
}>;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
status_list: {
|
|
171
|
+
uri: string;
|
|
172
|
+
idx: number;
|
|
173
|
+
};
|
|
174
|
+
}, {
|
|
175
|
+
status_list: {
|
|
176
|
+
uri: string;
|
|
177
|
+
idx: number;
|
|
178
|
+
};
|
|
179
|
+
}>>; /** Purpose of the intended data processing */
|
|
180
|
+
purpose: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
181
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
182
|
+
value: z.ZodString;
|
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
lang: string;
|
|
185
|
+
value: string;
|
|
186
|
+
}, {
|
|
187
|
+
lang: string;
|
|
188
|
+
value: string;
|
|
189
|
+
}>, "many">>; /** Set of credentials intended to be requested by the WRP */
|
|
190
|
+
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
191
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
192
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
193
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
194
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
195
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
path: string[];
|
|
198
|
+
values?: (string | number | boolean)[] | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
path: string[];
|
|
201
|
+
values?: (string | number | boolean)[] | undefined;
|
|
202
|
+
}>, "many">>;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
format: string;
|
|
205
|
+
meta: Record<string, unknown>;
|
|
206
|
+
claim?: {
|
|
207
|
+
path: string[];
|
|
208
|
+
values?: (string | number | boolean)[] | undefined;
|
|
209
|
+
}[] | undefined;
|
|
210
|
+
}, {
|
|
211
|
+
format: string;
|
|
212
|
+
meta: Record<string, unknown>;
|
|
213
|
+
claim?: {
|
|
214
|
+
path: string[];
|
|
215
|
+
values?: (string | number | boolean)[] | undefined;
|
|
216
|
+
}[] | undefined;
|
|
217
|
+
}>, "many">>; /** Set of credentials issued by the WRP (for attestation providers) */
|
|
218
|
+
provides_attestations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
219
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
220
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
221
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
222
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
223
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
path: string[];
|
|
226
|
+
values?: (string | number | boolean)[] | undefined;
|
|
227
|
+
}, {
|
|
228
|
+
path: string[];
|
|
229
|
+
values?: (string | number | boolean)[] | undefined;
|
|
230
|
+
}>, "many">>;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
format: string;
|
|
233
|
+
meta: Record<string, unknown>;
|
|
234
|
+
claim?: {
|
|
235
|
+
path: string[];
|
|
236
|
+
values?: (string | number | boolean)[] | undefined;
|
|
237
|
+
}[] | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
format: string;
|
|
240
|
+
meta: Record<string, unknown>;
|
|
241
|
+
claim?: {
|
|
242
|
+
path: string[];
|
|
243
|
+
values?: (string | number | boolean)[] | undefined;
|
|
244
|
+
}[] | undefined;
|
|
245
|
+
}>, "many">>; /** Intermediary information when WRP acts through an intermediary */
|
|
246
|
+
intermediary: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
/** Identifier of the intermediary */sub: z.ZodString; /** Name of the intermediary */
|
|
248
|
+
name: z.ZodString;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
sub: string;
|
|
251
|
+
name: string;
|
|
252
|
+
}, {
|
|
253
|
+
sub: string;
|
|
254
|
+
name: string;
|
|
255
|
+
}>>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
sub: string;
|
|
258
|
+
name: string;
|
|
259
|
+
country: string;
|
|
260
|
+
registry_uri: string;
|
|
261
|
+
entitlements: string[];
|
|
262
|
+
iat: number;
|
|
263
|
+
status?: {
|
|
264
|
+
status_list: {
|
|
265
|
+
uri: string;
|
|
266
|
+
idx: number;
|
|
267
|
+
};
|
|
268
|
+
} | undefined;
|
|
269
|
+
sub_ln?: string | undefined;
|
|
270
|
+
sub_gn?: string | undefined;
|
|
271
|
+
sub_fn?: string | undefined;
|
|
272
|
+
srv_description?: {
|
|
273
|
+
lang: string;
|
|
274
|
+
value: string;
|
|
275
|
+
}[][] | undefined;
|
|
276
|
+
privacy_policy?: string | undefined;
|
|
277
|
+
info_uri?: string | undefined;
|
|
278
|
+
support_uri?: string | undefined;
|
|
279
|
+
supervisory_authority?: {
|
|
280
|
+
email?: string | undefined;
|
|
281
|
+
phone?: string | undefined;
|
|
282
|
+
uri?: string | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
policy_id?: string[] | undefined;
|
|
285
|
+
certificate_policy?: string | undefined;
|
|
286
|
+
purpose?: {
|
|
287
|
+
lang: string;
|
|
288
|
+
value: string;
|
|
289
|
+
}[] | undefined;
|
|
290
|
+
credentials?: {
|
|
291
|
+
format: string;
|
|
292
|
+
meta: Record<string, unknown>;
|
|
293
|
+
claim?: {
|
|
294
|
+
path: string[];
|
|
295
|
+
values?: (string | number | boolean)[] | undefined;
|
|
296
|
+
}[] | undefined;
|
|
297
|
+
}[] | undefined;
|
|
298
|
+
provides_attestations?: {
|
|
299
|
+
format: string;
|
|
300
|
+
meta: Record<string, unknown>;
|
|
301
|
+
claim?: {
|
|
302
|
+
path: string[];
|
|
303
|
+
values?: (string | number | boolean)[] | undefined;
|
|
304
|
+
}[] | undefined;
|
|
305
|
+
}[] | undefined;
|
|
306
|
+
intermediary?: {
|
|
307
|
+
sub: string;
|
|
308
|
+
name: string;
|
|
309
|
+
} | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
sub: string;
|
|
312
|
+
name: string;
|
|
313
|
+
country: string;
|
|
314
|
+
registry_uri: string;
|
|
315
|
+
entitlements: string[];
|
|
316
|
+
iat: number;
|
|
317
|
+
status?: {
|
|
318
|
+
status_list: {
|
|
319
|
+
uri: string;
|
|
320
|
+
idx: number;
|
|
321
|
+
};
|
|
322
|
+
} | undefined;
|
|
323
|
+
sub_ln?: string | undefined;
|
|
324
|
+
sub_gn?: string | undefined;
|
|
325
|
+
sub_fn?: string | undefined;
|
|
326
|
+
srv_description?: {
|
|
327
|
+
lang: string;
|
|
328
|
+
value: string;
|
|
329
|
+
}[][] | undefined;
|
|
330
|
+
privacy_policy?: string | undefined;
|
|
331
|
+
info_uri?: string | undefined;
|
|
332
|
+
support_uri?: string | undefined;
|
|
333
|
+
supervisory_authority?: {
|
|
334
|
+
email?: string | undefined;
|
|
335
|
+
phone?: string | undefined;
|
|
336
|
+
uri?: string | undefined;
|
|
337
|
+
} | undefined;
|
|
338
|
+
policy_id?: string[] | undefined;
|
|
339
|
+
certificate_policy?: string | undefined;
|
|
340
|
+
purpose?: {
|
|
341
|
+
lang: string;
|
|
342
|
+
value: string;
|
|
343
|
+
}[] | undefined;
|
|
344
|
+
credentials?: {
|
|
345
|
+
format: string;
|
|
346
|
+
meta: Record<string, unknown>;
|
|
347
|
+
claim?: {
|
|
348
|
+
path: string[];
|
|
349
|
+
values?: (string | number | boolean)[] | undefined;
|
|
350
|
+
}[] | undefined;
|
|
351
|
+
}[] | undefined;
|
|
352
|
+
provides_attestations?: {
|
|
353
|
+
format: string;
|
|
354
|
+
meta: Record<string, unknown>;
|
|
355
|
+
claim?: {
|
|
356
|
+
path: string[];
|
|
357
|
+
values?: (string | number | boolean)[] | undefined;
|
|
358
|
+
}[] | undefined;
|
|
359
|
+
}[] | undefined;
|
|
360
|
+
intermediary?: {
|
|
361
|
+
sub: string;
|
|
362
|
+
name: string;
|
|
363
|
+
} | undefined;
|
|
364
|
+
}>;
|
|
365
|
+
/**
|
|
366
|
+
* JWT Header schema according to ETSI TS 119 475 clause 5.2.2
|
|
367
|
+
*/
|
|
368
|
+
declare const WRPRCJWTHeaderSchema: z.ZodObject<{
|
|
369
|
+
/** Type of the Web Token - must be "rc-wrp+jwt" for JWT */typ: z.ZodLiteral<"rc-wrp+jwt">; /** Algorithm used to sign the JWT */
|
|
370
|
+
alg: z.ZodEnum<["ES256", "ES384", "ES512", "RS256", "RS384", "RS512"]>; /** Certificate chain to verify the JWT */
|
|
371
|
+
x5c: z.ZodArray<z.ZodString, "many">; /** Key ID */
|
|
372
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
373
|
+
}, "strip", z.ZodTypeAny, {
|
|
374
|
+
typ: "rc-wrp+jwt";
|
|
375
|
+
alg: "ES256" | "ES384" | "ES512" | "RS256" | "RS384" | "RS512";
|
|
376
|
+
x5c: string[];
|
|
377
|
+
kid?: string | undefined;
|
|
378
|
+
}, {
|
|
379
|
+
typ: "rc-wrp+jwt";
|
|
380
|
+
alg: "ES256" | "ES384" | "ES512" | "RS256" | "RS384" | "RS512";
|
|
381
|
+
x5c: string[];
|
|
382
|
+
kid?: string | undefined;
|
|
383
|
+
}>;
|
|
384
|
+
/**
|
|
385
|
+
* CWT Header schema according to ETSI TS 119 475 clause 5.2.3
|
|
386
|
+
*/
|
|
387
|
+
declare const WRPRCCWTHeaderSchema: z.ZodObject<{
|
|
388
|
+
/** Type of the Web Token - must be "rc-wrp+cwt" for CWT */typ: z.ZodLiteral<"rc-wrp+cwt">; /** Algorithm used to sign the CWT per RFC 9052 */
|
|
389
|
+
alg: z.ZodNumber; /** Certificate chain to verify the CWT per RFC 9360 */
|
|
390
|
+
x5chain: z.ZodArray<z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>, "many">;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
typ: "rc-wrp+cwt";
|
|
393
|
+
alg: number;
|
|
394
|
+
x5chain: Uint8Array<ArrayBuffer>[];
|
|
395
|
+
}, {
|
|
396
|
+
typ: "rc-wrp+cwt";
|
|
397
|
+
alg: number;
|
|
398
|
+
x5chain: Uint8Array<ArrayBuffer>[];
|
|
399
|
+
}>;
|
|
400
|
+
/**
|
|
401
|
+
* Schema for legal person WRPRC subject
|
|
402
|
+
*/
|
|
403
|
+
declare const LegalPersonSubjectSchema: z.ZodObject<Omit<{
|
|
404
|
+
name: z.ZodString;
|
|
405
|
+
sub_gn: z.ZodOptional<z.ZodString>;
|
|
406
|
+
sub_fn: z.ZodOptional<z.ZodString>;
|
|
407
|
+
sub: z.ZodString;
|
|
408
|
+
country: z.ZodString;
|
|
409
|
+
registry_uri: z.ZodString;
|
|
410
|
+
srv_description: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
411
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
412
|
+
value: z.ZodString;
|
|
413
|
+
}, "strip", z.ZodTypeAny, {
|
|
414
|
+
lang: string;
|
|
415
|
+
value: string;
|
|
416
|
+
}, {
|
|
417
|
+
lang: string;
|
|
418
|
+
value: string;
|
|
419
|
+
}>, "many">, "many">>;
|
|
420
|
+
entitlements: z.ZodArray<z.ZodString, "many">;
|
|
421
|
+
privacy_policy: z.ZodOptional<z.ZodString>;
|
|
422
|
+
info_uri: z.ZodOptional<z.ZodString>;
|
|
423
|
+
support_uri: z.ZodOptional<z.ZodString>;
|
|
424
|
+
supervisory_authority: z.ZodOptional<z.ZodObject<{
|
|
425
|
+
/** Email address of the Data Protection Authority */email: z.ZodOptional<z.ZodString>; /** Telephone number of the Data Protection Authority */
|
|
426
|
+
phone: z.ZodOptional<z.ZodString>; /** URL of web form provided by the Data Protection Authority */
|
|
427
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
428
|
+
}, "strip", z.ZodTypeAny, {
|
|
429
|
+
email?: string | undefined;
|
|
430
|
+
phone?: string | undefined;
|
|
431
|
+
uri?: string | undefined;
|
|
432
|
+
}, {
|
|
433
|
+
email?: string | undefined;
|
|
434
|
+
phone?: string | undefined;
|
|
435
|
+
uri?: string | undefined;
|
|
436
|
+
}>>;
|
|
437
|
+
policy_id: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
438
|
+
certificate_policy: z.ZodOptional<z.ZodString>;
|
|
439
|
+
iat: z.ZodNumber;
|
|
440
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
status_list: z.ZodObject<{
|
|
442
|
+
/** Index in the status list */idx: z.ZodNumber; /** URI to the status list */
|
|
443
|
+
uri: z.ZodString;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
uri: string;
|
|
446
|
+
idx: number;
|
|
447
|
+
}, {
|
|
448
|
+
uri: string;
|
|
449
|
+
idx: number;
|
|
450
|
+
}>;
|
|
451
|
+
}, "strip", z.ZodTypeAny, {
|
|
452
|
+
status_list: {
|
|
453
|
+
uri: string;
|
|
454
|
+
idx: number;
|
|
455
|
+
};
|
|
456
|
+
}, {
|
|
457
|
+
status_list: {
|
|
458
|
+
uri: string;
|
|
459
|
+
idx: number;
|
|
460
|
+
};
|
|
461
|
+
}>>;
|
|
462
|
+
purpose: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
463
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
464
|
+
value: z.ZodString;
|
|
465
|
+
}, "strip", z.ZodTypeAny, {
|
|
466
|
+
lang: string;
|
|
467
|
+
value: string;
|
|
468
|
+
}, {
|
|
469
|
+
lang: string;
|
|
470
|
+
value: string;
|
|
471
|
+
}>, "many">>;
|
|
472
|
+
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
473
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
474
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
475
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
476
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
477
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
478
|
+
}, "strip", z.ZodTypeAny, {
|
|
479
|
+
path: string[];
|
|
480
|
+
values?: (string | number | boolean)[] | undefined;
|
|
481
|
+
}, {
|
|
482
|
+
path: string[];
|
|
483
|
+
values?: (string | number | boolean)[] | undefined;
|
|
484
|
+
}>, "many">>;
|
|
485
|
+
}, "strip", z.ZodTypeAny, {
|
|
486
|
+
format: string;
|
|
487
|
+
meta: Record<string, unknown>;
|
|
488
|
+
claim?: {
|
|
489
|
+
path: string[];
|
|
490
|
+
values?: (string | number | boolean)[] | undefined;
|
|
491
|
+
}[] | undefined;
|
|
492
|
+
}, {
|
|
493
|
+
format: string;
|
|
494
|
+
meta: Record<string, unknown>;
|
|
495
|
+
claim?: {
|
|
496
|
+
path: string[];
|
|
497
|
+
values?: (string | number | boolean)[] | undefined;
|
|
498
|
+
}[] | undefined;
|
|
499
|
+
}>, "many">>;
|
|
500
|
+
provides_attestations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
501
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
502
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
503
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
504
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
505
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
506
|
+
}, "strip", z.ZodTypeAny, {
|
|
507
|
+
path: string[];
|
|
508
|
+
values?: (string | number | boolean)[] | undefined;
|
|
509
|
+
}, {
|
|
510
|
+
path: string[];
|
|
511
|
+
values?: (string | number | boolean)[] | undefined;
|
|
512
|
+
}>, "many">>;
|
|
513
|
+
}, "strip", z.ZodTypeAny, {
|
|
514
|
+
format: string;
|
|
515
|
+
meta: Record<string, unknown>;
|
|
516
|
+
claim?: {
|
|
517
|
+
path: string[];
|
|
518
|
+
values?: (string | number | boolean)[] | undefined;
|
|
519
|
+
}[] | undefined;
|
|
520
|
+
}, {
|
|
521
|
+
format: string;
|
|
522
|
+
meta: Record<string, unknown>;
|
|
523
|
+
claim?: {
|
|
524
|
+
path: string[];
|
|
525
|
+
values?: (string | number | boolean)[] | undefined;
|
|
526
|
+
}[] | undefined;
|
|
527
|
+
}>, "many">>;
|
|
528
|
+
intermediary: z.ZodOptional<z.ZodObject<{
|
|
529
|
+
/** Identifier of the intermediary */sub: z.ZodString; /** Name of the intermediary */
|
|
530
|
+
name: z.ZodString;
|
|
531
|
+
}, "strip", z.ZodTypeAny, {
|
|
532
|
+
sub: string;
|
|
533
|
+
name: string;
|
|
534
|
+
}, {
|
|
535
|
+
sub: string;
|
|
536
|
+
name: string;
|
|
537
|
+
}>>;
|
|
538
|
+
} & {
|
|
539
|
+
sub_ln: z.ZodString;
|
|
540
|
+
}, "sub_gn" | "sub_fn">, "strip", z.ZodTypeAny, {
|
|
541
|
+
sub: string;
|
|
542
|
+
name: string;
|
|
543
|
+
sub_ln: string;
|
|
544
|
+
country: string;
|
|
545
|
+
registry_uri: string;
|
|
546
|
+
entitlements: string[];
|
|
547
|
+
iat: number;
|
|
548
|
+
status?: {
|
|
549
|
+
status_list: {
|
|
550
|
+
uri: string;
|
|
551
|
+
idx: number;
|
|
552
|
+
};
|
|
553
|
+
} | undefined;
|
|
554
|
+
srv_description?: {
|
|
555
|
+
lang: string;
|
|
556
|
+
value: string;
|
|
557
|
+
}[][] | undefined;
|
|
558
|
+
privacy_policy?: string | undefined;
|
|
559
|
+
info_uri?: string | undefined;
|
|
560
|
+
support_uri?: string | undefined;
|
|
561
|
+
supervisory_authority?: {
|
|
562
|
+
email?: string | undefined;
|
|
563
|
+
phone?: string | undefined;
|
|
564
|
+
uri?: string | undefined;
|
|
565
|
+
} | undefined;
|
|
566
|
+
policy_id?: string[] | undefined;
|
|
567
|
+
certificate_policy?: string | undefined;
|
|
568
|
+
purpose?: {
|
|
569
|
+
lang: string;
|
|
570
|
+
value: string;
|
|
571
|
+
}[] | undefined;
|
|
572
|
+
credentials?: {
|
|
573
|
+
format: string;
|
|
574
|
+
meta: Record<string, unknown>;
|
|
575
|
+
claim?: {
|
|
576
|
+
path: string[];
|
|
577
|
+
values?: (string | number | boolean)[] | undefined;
|
|
578
|
+
}[] | undefined;
|
|
579
|
+
}[] | undefined;
|
|
580
|
+
provides_attestations?: {
|
|
581
|
+
format: string;
|
|
582
|
+
meta: Record<string, unknown>;
|
|
583
|
+
claim?: {
|
|
584
|
+
path: string[];
|
|
585
|
+
values?: (string | number | boolean)[] | undefined;
|
|
586
|
+
}[] | undefined;
|
|
587
|
+
}[] | undefined;
|
|
588
|
+
intermediary?: {
|
|
589
|
+
sub: string;
|
|
590
|
+
name: string;
|
|
591
|
+
} | undefined;
|
|
592
|
+
}, {
|
|
593
|
+
sub: string;
|
|
594
|
+
name: string;
|
|
595
|
+
sub_ln: string;
|
|
596
|
+
country: string;
|
|
597
|
+
registry_uri: string;
|
|
598
|
+
entitlements: string[];
|
|
599
|
+
iat: number;
|
|
600
|
+
status?: {
|
|
601
|
+
status_list: {
|
|
602
|
+
uri: string;
|
|
603
|
+
idx: number;
|
|
604
|
+
};
|
|
605
|
+
} | undefined;
|
|
606
|
+
srv_description?: {
|
|
607
|
+
lang: string;
|
|
608
|
+
value: string;
|
|
609
|
+
}[][] | undefined;
|
|
610
|
+
privacy_policy?: string | undefined;
|
|
611
|
+
info_uri?: string | undefined;
|
|
612
|
+
support_uri?: string | undefined;
|
|
613
|
+
supervisory_authority?: {
|
|
614
|
+
email?: string | undefined;
|
|
615
|
+
phone?: string | undefined;
|
|
616
|
+
uri?: string | undefined;
|
|
617
|
+
} | undefined;
|
|
618
|
+
policy_id?: string[] | undefined;
|
|
619
|
+
certificate_policy?: string | undefined;
|
|
620
|
+
purpose?: {
|
|
621
|
+
lang: string;
|
|
622
|
+
value: string;
|
|
623
|
+
}[] | undefined;
|
|
624
|
+
credentials?: {
|
|
625
|
+
format: string;
|
|
626
|
+
meta: Record<string, unknown>;
|
|
627
|
+
claim?: {
|
|
628
|
+
path: string[];
|
|
629
|
+
values?: (string | number | boolean)[] | undefined;
|
|
630
|
+
}[] | undefined;
|
|
631
|
+
}[] | undefined;
|
|
632
|
+
provides_attestations?: {
|
|
633
|
+
format: string;
|
|
634
|
+
meta: Record<string, unknown>;
|
|
635
|
+
claim?: {
|
|
636
|
+
path: string[];
|
|
637
|
+
values?: (string | number | boolean)[] | undefined;
|
|
638
|
+
}[] | undefined;
|
|
639
|
+
}[] | undefined;
|
|
640
|
+
intermediary?: {
|
|
641
|
+
sub: string;
|
|
642
|
+
name: string;
|
|
643
|
+
} | undefined;
|
|
644
|
+
}>;
|
|
645
|
+
/**
|
|
646
|
+
* Schema for natural person WRPRC subject
|
|
647
|
+
*/
|
|
648
|
+
declare const NaturalPersonSubjectSchema: z.ZodObject<Omit<{
|
|
649
|
+
name: z.ZodString;
|
|
650
|
+
sub_ln: z.ZodOptional<z.ZodString>;
|
|
651
|
+
sub: z.ZodString;
|
|
652
|
+
country: z.ZodString;
|
|
653
|
+
registry_uri: z.ZodString;
|
|
654
|
+
srv_description: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
655
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
656
|
+
value: z.ZodString;
|
|
657
|
+
}, "strip", z.ZodTypeAny, {
|
|
658
|
+
lang: string;
|
|
659
|
+
value: string;
|
|
660
|
+
}, {
|
|
661
|
+
lang: string;
|
|
662
|
+
value: string;
|
|
663
|
+
}>, "many">, "many">>;
|
|
664
|
+
entitlements: z.ZodArray<z.ZodString, "many">;
|
|
665
|
+
privacy_policy: z.ZodOptional<z.ZodString>;
|
|
666
|
+
info_uri: z.ZodOptional<z.ZodString>;
|
|
667
|
+
support_uri: z.ZodOptional<z.ZodString>;
|
|
668
|
+
supervisory_authority: z.ZodOptional<z.ZodObject<{
|
|
669
|
+
/** Email address of the Data Protection Authority */email: z.ZodOptional<z.ZodString>; /** Telephone number of the Data Protection Authority */
|
|
670
|
+
phone: z.ZodOptional<z.ZodString>; /** URL of web form provided by the Data Protection Authority */
|
|
671
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
672
|
+
}, "strip", z.ZodTypeAny, {
|
|
673
|
+
email?: string | undefined;
|
|
674
|
+
phone?: string | undefined;
|
|
675
|
+
uri?: string | undefined;
|
|
676
|
+
}, {
|
|
677
|
+
email?: string | undefined;
|
|
678
|
+
phone?: string | undefined;
|
|
679
|
+
uri?: string | undefined;
|
|
680
|
+
}>>;
|
|
681
|
+
policy_id: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
682
|
+
certificate_policy: z.ZodOptional<z.ZodString>;
|
|
683
|
+
iat: z.ZodNumber;
|
|
684
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
685
|
+
status_list: z.ZodObject<{
|
|
686
|
+
/** Index in the status list */idx: z.ZodNumber; /** URI to the status list */
|
|
687
|
+
uri: z.ZodString;
|
|
688
|
+
}, "strip", z.ZodTypeAny, {
|
|
689
|
+
uri: string;
|
|
690
|
+
idx: number;
|
|
691
|
+
}, {
|
|
692
|
+
uri: string;
|
|
693
|
+
idx: number;
|
|
694
|
+
}>;
|
|
695
|
+
}, "strip", z.ZodTypeAny, {
|
|
696
|
+
status_list: {
|
|
697
|
+
uri: string;
|
|
698
|
+
idx: number;
|
|
699
|
+
};
|
|
700
|
+
}, {
|
|
701
|
+
status_list: {
|
|
702
|
+
uri: string;
|
|
703
|
+
idx: number;
|
|
704
|
+
};
|
|
705
|
+
}>>;
|
|
706
|
+
purpose: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
707
|
+
/** Language code per BCP47/RFC 5646 */lang: z.ZodString; /** Localized string value */
|
|
708
|
+
value: z.ZodString;
|
|
709
|
+
}, "strip", z.ZodTypeAny, {
|
|
710
|
+
lang: string;
|
|
711
|
+
value: string;
|
|
712
|
+
}, {
|
|
713
|
+
lang: string;
|
|
714
|
+
value: string;
|
|
715
|
+
}>, "many">>;
|
|
716
|
+
credentials: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
717
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
718
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
719
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
720
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
721
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
722
|
+
}, "strip", z.ZodTypeAny, {
|
|
723
|
+
path: string[];
|
|
724
|
+
values?: (string | number | boolean)[] | undefined;
|
|
725
|
+
}, {
|
|
726
|
+
path: string[];
|
|
727
|
+
values?: (string | number | boolean)[] | undefined;
|
|
728
|
+
}>, "many">>;
|
|
729
|
+
}, "strip", z.ZodTypeAny, {
|
|
730
|
+
format: string;
|
|
731
|
+
meta: Record<string, unknown>;
|
|
732
|
+
claim?: {
|
|
733
|
+
path: string[];
|
|
734
|
+
values?: (string | number | boolean)[] | undefined;
|
|
735
|
+
}[] | undefined;
|
|
736
|
+
}, {
|
|
737
|
+
format: string;
|
|
738
|
+
meta: Record<string, unknown>;
|
|
739
|
+
claim?: {
|
|
740
|
+
path: string[];
|
|
741
|
+
values?: (string | number | boolean)[] | undefined;
|
|
742
|
+
}[] | undefined;
|
|
743
|
+
}>, "many">>;
|
|
744
|
+
provides_attestations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
745
|
+
/** Format of the attestation (e.g., "dc+sd-jwt", "mso_mdoc") */format: z.ZodString; /** Object defining additional properties per Credential Format */
|
|
746
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnknown>; /** Array of claim objects specifying requestable attributes */
|
|
747
|
+
claim: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
748
|
+
/** Path pointer that specifies the path to a claim within the Credential */path: z.ZodArray<z.ZodString, "many">; /** Array of expected values of the claim */
|
|
749
|
+
values: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
|
|
750
|
+
}, "strip", z.ZodTypeAny, {
|
|
751
|
+
path: string[];
|
|
752
|
+
values?: (string | number | boolean)[] | undefined;
|
|
753
|
+
}, {
|
|
754
|
+
path: string[];
|
|
755
|
+
values?: (string | number | boolean)[] | undefined;
|
|
756
|
+
}>, "many">>;
|
|
757
|
+
}, "strip", z.ZodTypeAny, {
|
|
758
|
+
format: string;
|
|
759
|
+
meta: Record<string, unknown>;
|
|
760
|
+
claim?: {
|
|
761
|
+
path: string[];
|
|
762
|
+
values?: (string | number | boolean)[] | undefined;
|
|
763
|
+
}[] | undefined;
|
|
764
|
+
}, {
|
|
765
|
+
format: string;
|
|
766
|
+
meta: Record<string, unknown>;
|
|
767
|
+
claim?: {
|
|
768
|
+
path: string[];
|
|
769
|
+
values?: (string | number | boolean)[] | undefined;
|
|
770
|
+
}[] | undefined;
|
|
771
|
+
}>, "many">>;
|
|
772
|
+
intermediary: z.ZodOptional<z.ZodObject<{
|
|
773
|
+
/** Identifier of the intermediary */sub: z.ZodString; /** Name of the intermediary */
|
|
774
|
+
name: z.ZodString;
|
|
775
|
+
}, "strip", z.ZodTypeAny, {
|
|
776
|
+
sub: string;
|
|
777
|
+
name: string;
|
|
778
|
+
}, {
|
|
779
|
+
sub: string;
|
|
780
|
+
name: string;
|
|
781
|
+
}>>;
|
|
782
|
+
} & {
|
|
783
|
+
sub_gn: z.ZodString;
|
|
784
|
+
sub_fn: z.ZodString;
|
|
785
|
+
}, "sub_ln">, "strip", z.ZodTypeAny, {
|
|
786
|
+
sub: string;
|
|
787
|
+
name: string;
|
|
788
|
+
sub_gn: string;
|
|
789
|
+
sub_fn: string;
|
|
790
|
+
country: string;
|
|
791
|
+
registry_uri: string;
|
|
792
|
+
entitlements: string[];
|
|
793
|
+
iat: number;
|
|
794
|
+
status?: {
|
|
795
|
+
status_list: {
|
|
796
|
+
uri: string;
|
|
797
|
+
idx: number;
|
|
798
|
+
};
|
|
799
|
+
} | undefined;
|
|
800
|
+
srv_description?: {
|
|
801
|
+
lang: string;
|
|
802
|
+
value: string;
|
|
803
|
+
}[][] | undefined;
|
|
804
|
+
privacy_policy?: string | undefined;
|
|
805
|
+
info_uri?: string | undefined;
|
|
806
|
+
support_uri?: string | undefined;
|
|
807
|
+
supervisory_authority?: {
|
|
808
|
+
email?: string | undefined;
|
|
809
|
+
phone?: string | undefined;
|
|
810
|
+
uri?: string | undefined;
|
|
811
|
+
} | undefined;
|
|
812
|
+
policy_id?: string[] | undefined;
|
|
813
|
+
certificate_policy?: string | undefined;
|
|
814
|
+
purpose?: {
|
|
815
|
+
lang: string;
|
|
816
|
+
value: string;
|
|
817
|
+
}[] | undefined;
|
|
818
|
+
credentials?: {
|
|
819
|
+
format: string;
|
|
820
|
+
meta: Record<string, unknown>;
|
|
821
|
+
claim?: {
|
|
822
|
+
path: string[];
|
|
823
|
+
values?: (string | number | boolean)[] | undefined;
|
|
824
|
+
}[] | undefined;
|
|
825
|
+
}[] | undefined;
|
|
826
|
+
provides_attestations?: {
|
|
827
|
+
format: string;
|
|
828
|
+
meta: Record<string, unknown>;
|
|
829
|
+
claim?: {
|
|
830
|
+
path: string[];
|
|
831
|
+
values?: (string | number | boolean)[] | undefined;
|
|
832
|
+
}[] | undefined;
|
|
833
|
+
}[] | undefined;
|
|
834
|
+
intermediary?: {
|
|
835
|
+
sub: string;
|
|
836
|
+
name: string;
|
|
837
|
+
} | undefined;
|
|
838
|
+
}, {
|
|
839
|
+
sub: string;
|
|
840
|
+
name: string;
|
|
841
|
+
sub_gn: string;
|
|
842
|
+
sub_fn: string;
|
|
843
|
+
country: string;
|
|
844
|
+
registry_uri: string;
|
|
845
|
+
entitlements: string[];
|
|
846
|
+
iat: number;
|
|
847
|
+
status?: {
|
|
848
|
+
status_list: {
|
|
849
|
+
uri: string;
|
|
850
|
+
idx: number;
|
|
851
|
+
};
|
|
852
|
+
} | undefined;
|
|
853
|
+
srv_description?: {
|
|
854
|
+
lang: string;
|
|
855
|
+
value: string;
|
|
856
|
+
}[][] | undefined;
|
|
857
|
+
privacy_policy?: string | undefined;
|
|
858
|
+
info_uri?: string | undefined;
|
|
859
|
+
support_uri?: string | undefined;
|
|
860
|
+
supervisory_authority?: {
|
|
861
|
+
email?: string | undefined;
|
|
862
|
+
phone?: string | undefined;
|
|
863
|
+
uri?: string | undefined;
|
|
864
|
+
} | undefined;
|
|
865
|
+
policy_id?: string[] | undefined;
|
|
866
|
+
certificate_policy?: string | undefined;
|
|
867
|
+
purpose?: {
|
|
868
|
+
lang: string;
|
|
869
|
+
value: string;
|
|
870
|
+
}[] | undefined;
|
|
871
|
+
credentials?: {
|
|
872
|
+
format: string;
|
|
873
|
+
meta: Record<string, unknown>;
|
|
874
|
+
claim?: {
|
|
875
|
+
path: string[];
|
|
876
|
+
values?: (string | number | boolean)[] | undefined;
|
|
877
|
+
}[] | undefined;
|
|
878
|
+
}[] | undefined;
|
|
879
|
+
provides_attestations?: {
|
|
880
|
+
format: string;
|
|
881
|
+
meta: Record<string, unknown>;
|
|
882
|
+
claim?: {
|
|
883
|
+
path: string[];
|
|
884
|
+
values?: (string | number | boolean)[] | undefined;
|
|
885
|
+
}[] | undefined;
|
|
886
|
+
}[] | undefined;
|
|
887
|
+
intermediary?: {
|
|
888
|
+
sub: string;
|
|
889
|
+
name: string;
|
|
890
|
+
} | undefined;
|
|
891
|
+
}>;
|
|
892
|
+
//#endregion
|
|
893
|
+
//#region src/types.d.ts
|
|
894
|
+
/** Multilingual string with language tag (B.2.6 Class MultiLangString) */
|
|
895
|
+
type MultiLangString = z.infer<typeof MultiLangStringSchema>;
|
|
896
|
+
/** Supervisory Authority (Data Protection Authority) */
|
|
897
|
+
type SupervisoryAuthority = z.infer<typeof SupervisoryAuthoritySchema>;
|
|
898
|
+
/** Claim specification for credential attributes (B.2.10 Class Claim) */
|
|
899
|
+
type Claim = z.infer<typeof ClaimSchema>;
|
|
900
|
+
/** Credential specification for attestations (B.2.9 Class Credential) */
|
|
901
|
+
type Credential = z.infer<typeof CredentialSchema>;
|
|
902
|
+
/** Status reference for WRPRC validity */
|
|
903
|
+
type Status = z.infer<typeof StatusSchema>;
|
|
904
|
+
/** Intermediary information */
|
|
905
|
+
type Intermediary = z.infer<typeof IntermediarySchema>;
|
|
906
|
+
/** WRPRC Payload */
|
|
907
|
+
type WRPRCPayload = z.infer<typeof WRPRCPayloadSchema>;
|
|
908
|
+
/** Legal person subject payload */
|
|
909
|
+
type LegalPersonSubject = z.infer<typeof LegalPersonSubjectSchema>;
|
|
910
|
+
/** Natural person subject payload */
|
|
911
|
+
type NaturalPersonSubject = z.infer<typeof NaturalPersonSubjectSchema>;
|
|
912
|
+
/** JWT Header for WRPRC */
|
|
913
|
+
type WRPRCJWTHeader = z.infer<typeof WRPRCJWTHeaderSchema>;
|
|
914
|
+
/** CWT Header for WRPRC */
|
|
915
|
+
type WRPRCCWTHeader = z.infer<typeof WRPRCCWTHeaderSchema>;
|
|
916
|
+
/** Signed JWT WRPRC (compact JWS format) */
|
|
917
|
+
interface SignedWRPRC {
|
|
918
|
+
/** The compact JWS string */
|
|
919
|
+
jws: string;
|
|
920
|
+
/** Decoded header */
|
|
921
|
+
header: WRPRCJWTHeader;
|
|
922
|
+
/** Decoded payload */
|
|
923
|
+
payload: WRPRCPayload;
|
|
924
|
+
}
|
|
925
|
+
/** Options for signing a WRPRC */
|
|
926
|
+
interface SignOptions {
|
|
927
|
+
/** The WRPRC payload to sign */
|
|
928
|
+
payload: WRPRCPayload;
|
|
929
|
+
/** Algorithm (default: ES256) */
|
|
930
|
+
algorithm?: 'ES256' | 'ES384' | 'ES512' | 'RS256' | 'RS384' | 'RS512';
|
|
931
|
+
/** PEM-encoded certificates for x5c header (each element is a single PEM certificate) */
|
|
932
|
+
certificates: string[];
|
|
933
|
+
/** Key ID (optional) */
|
|
934
|
+
keyId?: string;
|
|
935
|
+
/** Signer function for signing the JWS */
|
|
936
|
+
signer: Signer;
|
|
937
|
+
}
|
|
938
|
+
/** Input for creating a legal person WRPRC */
|
|
939
|
+
interface LegalPersonWRPRCInput {
|
|
940
|
+
/** Trade name (for display) */
|
|
941
|
+
name: string;
|
|
942
|
+
/** Legal name of the organization */
|
|
943
|
+
legalName: string;
|
|
944
|
+
/** Semantic identifier (e.g., "LEIXG-529900T8BM49AURSDO55") */
|
|
945
|
+
identifier: string;
|
|
946
|
+
/** Country code (ISO 3166-1 Alpha-2) */
|
|
947
|
+
country: string;
|
|
948
|
+
/** URL to the national registry API endpoint */
|
|
949
|
+
registryUri: string;
|
|
950
|
+
/** List of entitlement URIs */
|
|
951
|
+
entitlements: string[];
|
|
952
|
+
}
|
|
953
|
+
/** Input for creating a natural person WRPRC */
|
|
954
|
+
interface NaturalPersonWRPRCInput {
|
|
955
|
+
/** Trade name (for display) */
|
|
956
|
+
name: string;
|
|
957
|
+
/** Given name(s) */
|
|
958
|
+
givenName: string;
|
|
959
|
+
/** Family name */
|
|
960
|
+
familyName: string;
|
|
961
|
+
/** Semantic identifier (e.g., "TINIT-RSSMRA85T10A562S") */
|
|
962
|
+
identifier: string;
|
|
963
|
+
/** Country code (ISO 3166-1 Alpha-2) */
|
|
964
|
+
country: string;
|
|
965
|
+
/** URL to the national registry API endpoint */
|
|
966
|
+
registryUri: string;
|
|
967
|
+
/** List of entitlement URIs */
|
|
968
|
+
entitlements: string[];
|
|
969
|
+
}
|
|
970
|
+
//#endregion
|
|
971
|
+
//#region src/entitlements.d.ts
|
|
972
|
+
/**
|
|
973
|
+
* All standard WRP entitlements defined in ETSI TS 119 475
|
|
974
|
+
*/
|
|
975
|
+
declare const WRP_ENTITLEMENTS: {
|
|
976
|
+
readonly SERVICE_PROVIDER: "https://uri.etsi.org/19475/Entitlement/Service_Provider";
|
|
977
|
+
readonly QEAA_PROVIDER: "https://uri.etsi.org/19475/Entitlement/QEAA_Provider";
|
|
978
|
+
readonly NON_Q_EAA_PROVIDER: "https://uri.etsi.org/19475/Entitlement/Non_Q_EAA_Provider";
|
|
979
|
+
readonly PUB_EAA_PROVIDER: "https://uri.etsi.org/19475/Entitlement/PUB_EAA_Provider";
|
|
980
|
+
readonly PID_PROVIDER: "https://uri.etsi.org/19475/Entitlement/PID_Provider";
|
|
981
|
+
readonly QCERT_FOR_ESEAL_PROVIDER: "https://uri.etsi.org/19475/Entitlement/QCert_for_ESeal_Provider";
|
|
982
|
+
readonly QCERT_FOR_ESIG_PROVIDER: "https://uri.etsi.org/19475/Entitlement/QCert_for_ESig_Provider";
|
|
983
|
+
readonly RQSEALCDS_PROVIDER: "https://uri.etsi.org/19475/Entitlement/rQSealCDs_Provider";
|
|
984
|
+
readonly RQSIGCDS_PROVIDER: "https://uri.etsi.org/19475/Entitlement/rQSigCDs_Provider";
|
|
985
|
+
readonly ESIG_ESEAL_CREATION_PROVIDER: "https://uri.etsi.org/19475/Entitlement/ESig_ESeal_Creation_Provider";
|
|
986
|
+
};
|
|
987
|
+
/**
|
|
988
|
+
* Payment Service Provider Sub-entitlements (A.3.1)
|
|
989
|
+
* As defined in ETSI TS 119 495
|
|
990
|
+
*/
|
|
991
|
+
declare const PSP_SUB_ENTITLEMENTS: {
|
|
992
|
+
/** Account Servicing Payment Service Provider */readonly ACCOUNT_SERVICING: "https://uri.etsi.org/19475/SubEntitlement/psp/psp-as"; /** Payment Initiation Service Provider */
|
|
993
|
+
readonly PAYMENT_INITIATION: "https://uri.etsi.org/19475/SubEntitlement/psp/psp-pi"; /** Account Information Service Provider */
|
|
994
|
+
readonly ACCOUNT_INFORMATION: "https://uri.etsi.org/19475/SubEntitlement/psp/psp-ai"; /** Payment Service Provider issuing card-based payment instruments */
|
|
995
|
+
readonly CARD_BASED: "https://uri.etsi.org/19475/SubEntitlement/psp/psp-ic"; /** Unspecified Payment Service Provider */
|
|
996
|
+
readonly UNSPECIFIED: "https://uri.etsi.org/19475/SubEntitlement/psp/unspecified";
|
|
997
|
+
};
|
|
998
|
+
/**
|
|
999
|
+
* Identifier type URIs for legal person semantic identifiers
|
|
1000
|
+
*/
|
|
1001
|
+
declare const IDENTIFIER_TYPES: {
|
|
1002
|
+
/** Economic Operator Registration and Identification Number (EORI-No) */readonly EORI: "http://data.europa.eu/eudi/id/EORI-No"; /** Legal Entity Identifier (LEI) */
|
|
1003
|
+
readonly LEI: "http://data.europa.eu/eudi/id/LEI"; /** European Unique Identifier (EUID) */
|
|
1004
|
+
readonly EUID: "http://data.europa.eu/eudi/id/EUID"; /** Value Added Tax Identification Number (VATIN) */
|
|
1005
|
+
readonly VATIN: "http://data.europa.eu/eudi/id/VATIN"; /** Taxpayer Identification Number (TIN) */
|
|
1006
|
+
readonly TIN: "http://data.europa.eu/eudi/id/TIN"; /** Excise Number */
|
|
1007
|
+
readonly EXCISE: "http://data.europa.eu/eudi/id/Excise";
|
|
1008
|
+
};
|
|
1009
|
+
/**
|
|
1010
|
+
* Check if a given URI is a valid WRP entitlement
|
|
1011
|
+
*/
|
|
1012
|
+
declare function isValidEntitlement(uri: string): boolean;
|
|
1013
|
+
/**
|
|
1014
|
+
* Check if a given URI is a PSP sub-entitlement
|
|
1015
|
+
*/
|
|
1016
|
+
declare function isPSPSubEntitlement(uri: string): boolean;
|
|
1017
|
+
/**
|
|
1018
|
+
* Check if entitlements include an attestation provider role
|
|
1019
|
+
*/
|
|
1020
|
+
declare function hasAttestationProviderEntitlement(entitlements: string[]): boolean;
|
|
1021
|
+
//#endregion
|
|
1022
|
+
//#region src/validator.d.ts
|
|
1023
|
+
/**
|
|
1024
|
+
* A single validation error
|
|
1025
|
+
*/
|
|
1026
|
+
interface ValidationError {
|
|
1027
|
+
/** Path to the invalid field */
|
|
1028
|
+
path: string[];
|
|
1029
|
+
/** Error message */
|
|
1030
|
+
message: string;
|
|
1031
|
+
/** Error code */
|
|
1032
|
+
code: string;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Result of WRPRC validation
|
|
1036
|
+
*/
|
|
1037
|
+
interface ValidationResult {
|
|
1038
|
+
/** Whether the WRPRC is valid */
|
|
1039
|
+
valid: boolean;
|
|
1040
|
+
/** List of validation errors (empty if valid) */
|
|
1041
|
+
errors: ValidationError[];
|
|
1042
|
+
/** Warnings that don't invalidate the certificate but should be noted */
|
|
1043
|
+
warnings: ValidationError[];
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Validate a WRPRC payload against the schema
|
|
1047
|
+
*/
|
|
1048
|
+
declare function validateWRPRCPayload(payload: unknown): ValidationResult;
|
|
1049
|
+
/**
|
|
1050
|
+
* Validate a JWT header for WRPRC
|
|
1051
|
+
*/
|
|
1052
|
+
declare function validateWRPRCJWTHeader(header: unknown): ValidationResult;
|
|
1053
|
+
/**
|
|
1054
|
+
* Validate a complete WRPRC (header + payload)
|
|
1055
|
+
*/
|
|
1056
|
+
declare function validateWRPRC(header: unknown, payload: unknown): ValidationResult;
|
|
1057
|
+
/**
|
|
1058
|
+
* Check if payload represents a legal person
|
|
1059
|
+
*/
|
|
1060
|
+
declare function isLegalPersonWRPRC(payload: WRPRCPayload): boolean;
|
|
1061
|
+
/**
|
|
1062
|
+
* Check if payload represents a natural person
|
|
1063
|
+
*/
|
|
1064
|
+
declare function isNaturalPersonWRPRC(payload: WRPRCPayload): boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* Validate as legal person WRPRC
|
|
1067
|
+
*/
|
|
1068
|
+
declare function validateLegalPersonWRPRC(payload: unknown): ValidationResult;
|
|
1069
|
+
/**
|
|
1070
|
+
* Validate as natural person WRPRC
|
|
1071
|
+
*/
|
|
1072
|
+
declare function validateNaturalPersonWRPRC(payload: unknown): ValidationResult;
|
|
1073
|
+
/**
|
|
1074
|
+
* Assert that a WRPRC payload is valid, throws WRPRCException if not
|
|
1075
|
+
*/
|
|
1076
|
+
declare function assertValidWRPRCPayload(payload: unknown): asserts payload is WRPRCPayload;
|
|
1077
|
+
/**
|
|
1078
|
+
* Assert that a WRPRC is valid (header + payload), throws WRPRCException if not
|
|
1079
|
+
*/
|
|
1080
|
+
declare function assertValidWRPRC(header: unknown, payload: unknown): void;
|
|
1081
|
+
//#endregion
|
|
1082
|
+
//#region src/builders.d.ts
|
|
1083
|
+
/**
|
|
1084
|
+
* Builder for creating WRPRC payloads with a fluent API
|
|
1085
|
+
*/
|
|
1086
|
+
declare class WRPRCBuilder {
|
|
1087
|
+
private payload;
|
|
1088
|
+
/**
|
|
1089
|
+
* Set the trade name (display name) of the WRP
|
|
1090
|
+
*/
|
|
1091
|
+
name(value: string): this;
|
|
1092
|
+
/**
|
|
1093
|
+
* Set the legal name for a legal person WRP
|
|
1094
|
+
*/
|
|
1095
|
+
legalName(value: string): this;
|
|
1096
|
+
/**
|
|
1097
|
+
* Set the given name for a natural person WRP
|
|
1098
|
+
*/
|
|
1099
|
+
givenName(value: string): this;
|
|
1100
|
+
/**
|
|
1101
|
+
* Set the family name for a natural person WRP
|
|
1102
|
+
*/
|
|
1103
|
+
familyName(value: string): this;
|
|
1104
|
+
/**
|
|
1105
|
+
* Set the WRP identifier (semantic identifier)
|
|
1106
|
+
*
|
|
1107
|
+
* @param identifier - The semantic identifier following ETSI EN 319 412-1
|
|
1108
|
+
* Format: PREFIX (3 chars) + COUNTRY (2 chars) + "-" + ID
|
|
1109
|
+
* Examples: "LEIXG-529900T8BM49AURSDO55", "TINIT-RSSMRA85T10A562S"
|
|
1110
|
+
*/
|
|
1111
|
+
identifier(identifier: string): this;
|
|
1112
|
+
/**
|
|
1113
|
+
* Set the country code (ISO 3166-1 Alpha-2)
|
|
1114
|
+
*/
|
|
1115
|
+
country(code: string): this;
|
|
1116
|
+
/**
|
|
1117
|
+
* Set the URL to the national registry API endpoint
|
|
1118
|
+
*/
|
|
1119
|
+
registryUri(uri: string): this;
|
|
1120
|
+
/**
|
|
1121
|
+
* Add a service description in a specific language
|
|
1122
|
+
*/
|
|
1123
|
+
serviceDescription(description: string, lang?: string): this;
|
|
1124
|
+
/**
|
|
1125
|
+
* Add multiple service descriptions (one array per service, with multiple languages)
|
|
1126
|
+
*/
|
|
1127
|
+
addServiceDescriptions(descriptions: MultiLangString[]): this;
|
|
1128
|
+
/**
|
|
1129
|
+
* Add an entitlement
|
|
1130
|
+
*
|
|
1131
|
+
* @param entitlement - The entitlement URI or key from WRP_ENTITLEMENTS
|
|
1132
|
+
*/
|
|
1133
|
+
addEntitlement(entitlement: string | (typeof WRP_ENTITLEMENTS)[keyof typeof WRP_ENTITLEMENTS]): this;
|
|
1134
|
+
/**
|
|
1135
|
+
* Set all entitlements (replaces existing)
|
|
1136
|
+
*/
|
|
1137
|
+
entitlements(entitlements: string[]): this;
|
|
1138
|
+
/**
|
|
1139
|
+
* Set the privacy policy URL
|
|
1140
|
+
*/
|
|
1141
|
+
privacyPolicy(uri: string): this;
|
|
1142
|
+
/**
|
|
1143
|
+
* Set the info URI (general-purpose web address)
|
|
1144
|
+
*/
|
|
1145
|
+
infoUri(uri: string): this;
|
|
1146
|
+
/**
|
|
1147
|
+
* Set the support URI for data requests
|
|
1148
|
+
*/
|
|
1149
|
+
supportUri(uri: string): this;
|
|
1150
|
+
/**
|
|
1151
|
+
* Set the supervisory authority (Data Protection Authority)
|
|
1152
|
+
*/
|
|
1153
|
+
supervisoryAuthority(authority: SupervisoryAuthority): this;
|
|
1154
|
+
/**
|
|
1155
|
+
* Set the policy ID(s)
|
|
1156
|
+
*/
|
|
1157
|
+
policyId(ids: string[]): this;
|
|
1158
|
+
/**
|
|
1159
|
+
* Set the certificate policy URL
|
|
1160
|
+
*/
|
|
1161
|
+
certificatePolicy(uri: string): this;
|
|
1162
|
+
/**
|
|
1163
|
+
* Set the issued-at timestamp (Unix timestamp)
|
|
1164
|
+
* If not set, will default to current time when building
|
|
1165
|
+
*/
|
|
1166
|
+
issuedAt(timestamp: number | Date): this;
|
|
1167
|
+
/**
|
|
1168
|
+
* Set the status reference for certificate validity
|
|
1169
|
+
*/
|
|
1170
|
+
status(status: Status): this;
|
|
1171
|
+
/**
|
|
1172
|
+
* Add a purpose description
|
|
1173
|
+
*/
|
|
1174
|
+
addPurpose(description: string, lang?: string): this;
|
|
1175
|
+
/**
|
|
1176
|
+
* Set all purposes (replaces existing)
|
|
1177
|
+
*/
|
|
1178
|
+
purposes(purposes: MultiLangString[]): this;
|
|
1179
|
+
/**
|
|
1180
|
+
* Add a credential that the WRP intends to request
|
|
1181
|
+
*/
|
|
1182
|
+
addCredential(credential: Credential): this;
|
|
1183
|
+
/**
|
|
1184
|
+
* Add a credential the WRP provides (for attestation providers)
|
|
1185
|
+
*/
|
|
1186
|
+
addProvidedAttestation(credential: Credential): this;
|
|
1187
|
+
/**
|
|
1188
|
+
* Set intermediary information
|
|
1189
|
+
*/
|
|
1190
|
+
intermediary(intermediary: Intermediary): this;
|
|
1191
|
+
/**
|
|
1192
|
+
* Build the WRPRC payload
|
|
1193
|
+
*
|
|
1194
|
+
* @throws WRPRCException if the payload is invalid
|
|
1195
|
+
*/
|
|
1196
|
+
build(): WRPRCPayload;
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Builder for creating Credential objects
|
|
1200
|
+
*/
|
|
1201
|
+
declare class CredentialBuilder {
|
|
1202
|
+
private credential;
|
|
1203
|
+
/**
|
|
1204
|
+
* Set the credential format
|
|
1205
|
+
*
|
|
1206
|
+
* @param format - The format identifier (e.g., "dc+sd-jwt", "mso_mdoc")
|
|
1207
|
+
*/
|
|
1208
|
+
format(format: string): this;
|
|
1209
|
+
/**
|
|
1210
|
+
* Set the credential metadata
|
|
1211
|
+
*
|
|
1212
|
+
* @param meta - Metadata object per credential format specification
|
|
1213
|
+
*/
|
|
1214
|
+
meta(meta: Record<string, unknown>): this;
|
|
1215
|
+
/**
|
|
1216
|
+
* Set SD-JWT credential metadata (vct_values)
|
|
1217
|
+
*/
|
|
1218
|
+
sdJwtMeta(vctValues: string[]): this;
|
|
1219
|
+
/**
|
|
1220
|
+
* Set mDL/mDoc credential metadata (doctype_value)
|
|
1221
|
+
*/
|
|
1222
|
+
mdocMeta(doctypeValue: string): this;
|
|
1223
|
+
/**
|
|
1224
|
+
* Add a claim to request
|
|
1225
|
+
*/
|
|
1226
|
+
addClaim(claim: Claim): this;
|
|
1227
|
+
/**
|
|
1228
|
+
* Add a simple path claim
|
|
1229
|
+
*/
|
|
1230
|
+
addPathClaim(...path: string[]): this;
|
|
1231
|
+
/**
|
|
1232
|
+
* Build the Credential object
|
|
1233
|
+
*/
|
|
1234
|
+
build(): Credential;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Create a new WRPRCBuilder
|
|
1238
|
+
*/
|
|
1239
|
+
declare function wrprc(): WRPRCBuilder;
|
|
1240
|
+
/**
|
|
1241
|
+
* Create a new CredentialBuilder
|
|
1242
|
+
*/
|
|
1243
|
+
declare function credential(): CredentialBuilder;
|
|
1244
|
+
/**
|
|
1245
|
+
* Create a WRPRC payload for a legal person
|
|
1246
|
+
*/
|
|
1247
|
+
declare function createLegalPersonWRPRC(input: LegalPersonWRPRCInput): WRPRCPayload;
|
|
1248
|
+
/**
|
|
1249
|
+
* Create a WRPRC payload for a natural person
|
|
1250
|
+
*/
|
|
1251
|
+
declare function createNaturalPersonWRPRC(input: NaturalPersonWRPRCInput): WRPRCPayload;
|
|
1252
|
+
/**
|
|
1253
|
+
* Create a simple service provider WRPRC
|
|
1254
|
+
*/
|
|
1255
|
+
declare function createServiceProviderWRPRC(name: string, legalName: string, identifier: string, country: string, registryUri: string): WRPRCPayload;
|
|
1256
|
+
//#endregion
|
|
1257
|
+
//#region src/signer.d.ts
|
|
1258
|
+
/**
|
|
1259
|
+
* Sign a WRPRC payload to create a JWT
|
|
1260
|
+
*
|
|
1261
|
+
* @param options - Signing options including payload, algorithm, certificates, and signer
|
|
1262
|
+
* @returns Signed WRPRC with JWS string and decoded parts
|
|
1263
|
+
*/
|
|
1264
|
+
declare function signWRPRC(options: SignOptions): Promise<SignedWRPRC>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Decode a signed WRPRC JWT (without verification)
|
|
1267
|
+
*
|
|
1268
|
+
* @param jws - The compact JWS string
|
|
1269
|
+
* @returns Decoded WRPRC with header and payload
|
|
1270
|
+
*/
|
|
1271
|
+
declare function decodeWRPRC(jws: string): SignedWRPRC;
|
|
1272
|
+
/**
|
|
1273
|
+
* Parse a WRPRC JWT without validation (for inspection purposes)
|
|
1274
|
+
*
|
|
1275
|
+
* @param jws - The compact JWS string
|
|
1276
|
+
* @returns Decoded parts without validation
|
|
1277
|
+
*/
|
|
1278
|
+
declare function parseWRPRC(jws: string): {
|
|
1279
|
+
header: unknown;
|
|
1280
|
+
payload: unknown;
|
|
1281
|
+
signature: string;
|
|
1282
|
+
};
|
|
1283
|
+
/**
|
|
1284
|
+
* Create a WRPRC with automatic timestamp
|
|
1285
|
+
*
|
|
1286
|
+
* @param payload - Partial payload (iat will be set automatically if not provided)
|
|
1287
|
+
* @returns Complete payload with timestamp
|
|
1288
|
+
*/
|
|
1289
|
+
declare function createWRPRCPayload(payload: Omit<WRPRCPayload, 'iat'> & {
|
|
1290
|
+
iat?: number;
|
|
1291
|
+
}): WRPRCPayload;
|
|
1292
|
+
//#endregion
|
|
1293
|
+
//#region src/wrprc-exception.d.ts
|
|
1294
|
+
/**
|
|
1295
|
+
* WRPRCException is a custom error class for WRPRC-related exceptions.
|
|
1296
|
+
*/
|
|
1297
|
+
declare class WRPRCException extends IdentityException {
|
|
1298
|
+
constructor(message: string, details?: unknown);
|
|
1299
|
+
}
|
|
1300
|
+
//#endregion
|
|
1301
|
+
export { type Claim, ClaimSchema, type Credential, CredentialBuilder, CredentialSchema, IDENTIFIER_TYPES, type Intermediary, IntermediarySchema, type LegalPersonSubject, LegalPersonSubjectSchema, type LegalPersonWRPRCInput, type MultiLangString, MultiLangStringSchema, type NaturalPersonSubject, NaturalPersonSubjectSchema, type NaturalPersonWRPRCInput, PSP_SUB_ENTITLEMENTS, type SignOptions, type SignedWRPRC, type Status, StatusSchema, type SupervisoryAuthority, SupervisoryAuthoritySchema, WRPRCBuilder, type WRPRCCWTHeader, WRPRCCWTHeaderSchema, WRPRCException, type WRPRCJWTHeader, WRPRCJWTHeaderSchema, type WRPRCPayload, WRPRCPayloadSchema, WRP_ENTITLEMENTS, assertValidWRPRC, assertValidWRPRCPayload, createLegalPersonWRPRC, createNaturalPersonWRPRC, createServiceProviderWRPRC, createWRPRCPayload, credential, decodeWRPRC, hasAttestationProviderEntitlement, isLegalPersonWRPRC, isNaturalPersonWRPRC, isPSPSubEntitlement, isValidEntitlement, parseWRPRC, signWRPRC, validateLegalPersonWRPRC, validateNaturalPersonWRPRC, validateWRPRC, validateWRPRCJWTHeader, validateWRPRCPayload, wrprc };
|
|
1302
|
+
//# sourceMappingURL=index.d.mts.map
|