@pagopa/io-react-native-wallet 2.0.0-next.2 → 2.0.0-next.3

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 (122) hide show
  1. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +38 -24
  2. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/05-authorize-access.js +6 -10
  4. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  5. package/lib/commonjs/credential/issuance/06-obtain-credential.js +43 -11
  6. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +51 -48
  8. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/README.md +34 -13
  10. package/lib/commonjs/credential/issuance/const.js +1 -1
  11. package/lib/commonjs/credential/issuance/types.js +16 -10
  12. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  13. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +4 -4
  14. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +3 -3
  15. package/lib/commonjs/credential/status/README.md +0 -1
  16. package/lib/commonjs/sd-jwt/__test__/index.test.js +11 -15
  17. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
  18. package/lib/commonjs/sd-jwt/__test__/types.test.js +5 -2
  19. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  20. package/lib/commonjs/sd-jwt/__test__/utils.test.js +37 -0
  21. package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -0
  22. package/lib/commonjs/sd-jwt/index.js +20 -0
  23. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  24. package/lib/commonjs/sd-jwt/types.js +51 -4
  25. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  26. package/lib/commonjs/sd-jwt/utils.js +64 -0
  27. package/lib/commonjs/sd-jwt/utils.js.map +1 -0
  28. package/lib/commonjs/trust/types.js +18 -13
  29. package/lib/commonjs/trust/types.js.map +1 -1
  30. package/lib/commonjs/utils/par.js +32 -22
  31. package/lib/commonjs/utils/par.js.map +1 -1
  32. package/lib/commonjs/utils/pop.js +1 -1
  33. package/lib/commonjs/utils/pop.js.map +1 -1
  34. package/lib/commonjs/wallet-instance-attestation/types.js +5 -1
  35. package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
  36. package/lib/module/credential/issuance/03-start-user-authorization.js +38 -24
  37. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  38. package/lib/module/credential/issuance/05-authorize-access.js +6 -10
  39. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  40. package/lib/module/credential/issuance/06-obtain-credential.js +44 -12
  41. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  42. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +51 -48
  43. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  44. package/lib/module/credential/issuance/README.md +34 -13
  45. package/lib/module/credential/issuance/const.js +1 -1
  46. package/lib/module/credential/issuance/types.js +12 -8
  47. package/lib/module/credential/issuance/types.js.map +1 -1
  48. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +4 -4
  49. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +3 -3
  50. package/lib/module/credential/status/README.md +0 -1
  51. package/lib/module/sd-jwt/__test__/index.test.js +11 -16
  52. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  53. package/lib/module/sd-jwt/__test__/types.test.js +5 -2
  54. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  55. package/lib/module/sd-jwt/__test__/utils.test.js +35 -0
  56. package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -0
  57. package/lib/module/sd-jwt/index.js +1 -0
  58. package/lib/module/sd-jwt/index.js.map +1 -1
  59. package/lib/module/sd-jwt/types.js +50 -3
  60. package/lib/module/sd-jwt/types.js.map +1 -1
  61. package/lib/module/sd-jwt/utils.js +57 -0
  62. package/lib/module/sd-jwt/utils.js.map +1 -0
  63. package/lib/module/trust/types.js +18 -13
  64. package/lib/module/trust/types.js.map +1 -1
  65. package/lib/module/utils/par.js +29 -20
  66. package/lib/module/utils/par.js.map +1 -1
  67. package/lib/module/utils/pop.js +1 -1
  68. package/lib/module/utils/pop.js.map +1 -1
  69. package/lib/module/wallet-instance-attestation/types.js +5 -1
  70. package/lib/module/wallet-instance-attestation/types.js.map +1 -1
  71. package/lib/typescript/client/generated/wallet-provider.d.ts +12 -12
  72. package/lib/typescript/credential/issuance/01-start-flow.d.ts +2 -2
  73. package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +1 -1
  74. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +7 -6
  75. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  76. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  77. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +10 -5
  78. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  79. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -2
  80. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  81. package/lib/typescript/credential/issuance/const.d.ts +1 -1
  82. package/lib/typescript/credential/issuance/types.d.ts +46 -26
  83. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  84. package/lib/typescript/pid/sd-jwt/types.d.ts +7 -7
  85. package/lib/typescript/sd-jwt/__test__/utils.test.d.ts +2 -0
  86. package/lib/typescript/sd-jwt/__test__/utils.test.d.ts.map +1 -0
  87. package/lib/typescript/sd-jwt/index.d.ts +21 -8
  88. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  89. package/lib/typescript/sd-jwt/types.d.ts +194 -12
  90. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  91. package/lib/typescript/sd-jwt/utils.d.ts +18 -0
  92. package/lib/typescript/sd-jwt/utils.d.ts.map +1 -0
  93. package/lib/typescript/trust/build-chain.d.ts +30 -14
  94. package/lib/typescript/trust/build-chain.d.ts.map +1 -1
  95. package/lib/typescript/trust/types.d.ts +322 -158
  96. package/lib/typescript/trust/types.d.ts.map +1 -1
  97. package/lib/typescript/utils/par.d.ts +29 -13
  98. package/lib/typescript/utils/par.d.ts.map +1 -1
  99. package/lib/typescript/wallet-instance-attestation/types.d.ts +9 -9
  100. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +1 -1
  101. package/package.json +1 -1
  102. package/src/credential/issuance/01-start-flow.ts +2 -2
  103. package/src/credential/issuance/03-start-user-authorization.ts +57 -38
  104. package/src/credential/issuance/05-authorize-access.ts +5 -11
  105. package/src/credential/issuance/06-obtain-credential.ts +53 -23
  106. package/src/credential/issuance/07-verify-and-parse-credential.ts +54 -62
  107. package/src/credential/issuance/README.md +34 -13
  108. package/src/credential/issuance/const.ts +1 -1
  109. package/src/credential/issuance/types.ts +18 -8
  110. package/src/credential/presentation/07-evaluate-dcql-query.ts +4 -4
  111. package/src/credential/presentation/07-evaluate-input-descriptor.ts +3 -3
  112. package/src/credential/status/README.md +0 -1
  113. package/src/sd-jwt/__test__/index.test.ts +8 -29
  114. package/src/sd-jwt/__test__/types.test.ts +6 -2
  115. package/src/sd-jwt/__test__/utils.test.ts +37 -0
  116. package/src/sd-jwt/index.ts +2 -0
  117. package/src/sd-jwt/types.ts +49 -2
  118. package/src/sd-jwt/utils.ts +73 -0
  119. package/src/trust/types.ts +23 -17
  120. package/src/utils/par.ts +37 -21
  121. package/src/utils/pop.ts +1 -1
  122. package/src/wallet-instance-attestation/types.ts +3 -1
@@ -32,16 +32,16 @@ export type DisclosureWithEncoded = {
32
32
  export type SdJwt4VC = z.infer<typeof SdJwt4VC>;
33
33
  export declare const SdJwt4VC: z.ZodObject<{
34
34
  header: z.ZodObject<{
35
- typ: z.ZodLiteral<"vc+sd-jwt">;
35
+ typ: z.ZodLiteral<"dc+sd-jwt">;
36
36
  alg: z.ZodString;
37
37
  kid: z.ZodOptional<z.ZodString>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  alg: string;
40
- typ: "vc+sd-jwt";
40
+ typ: "dc+sd-jwt";
41
41
  kid?: string | undefined;
42
42
  }, {
43
43
  alg: string;
44
- typ: "vc+sd-jwt";
44
+ typ: "dc+sd-jwt";
45
45
  kid?: string | undefined;
46
46
  }>;
47
47
  payload: z.ZodIntersection<z.ZodObject<{
@@ -51,7 +51,7 @@ export declare const SdJwt4VC: z.ZodObject<{
51
51
  exp: z.ZodNumber;
52
52
  _sd_alg: z.ZodLiteral<"sha-256">;
53
53
  status: z.ZodObject<{
54
- status_attestation: z.ZodObject<{
54
+ status_assertion: z.ZodObject<{
55
55
  credential_hash_alg: z.ZodLiteral<"sha-256">;
56
56
  }, "strip", z.ZodTypeAny, {
57
57
  credential_hash_alg: "sha-256";
@@ -59,11 +59,11 @@ export declare const SdJwt4VC: z.ZodObject<{
59
59
  credential_hash_alg: "sha-256";
60
60
  }>;
61
61
  }, "strip", z.ZodTypeAny, {
62
- status_attestation: {
62
+ status_assertion: {
63
63
  credential_hash_alg: "sha-256";
64
64
  };
65
65
  }, {
66
- status_attestation: {
66
+ status_assertion: {
67
67
  credential_hash_alg: "sha-256";
68
68
  };
69
69
  }>;
@@ -190,10 +190,13 @@ export declare const SdJwt4VC: z.ZodObject<{
190
190
  };
191
191
  }>;
192
192
  vct: z.ZodString;
193
+ "vct#integrity": z.ZodString;
194
+ issuing_authority: z.ZodString;
195
+ issuing_country: z.ZodString;
193
196
  }, "strip", z.ZodTypeAny, {
194
197
  iss: string;
195
198
  status: {
196
- status_attestation: {
199
+ status_assertion: {
197
200
  credential_hash_alg: "sha-256";
198
201
  };
199
202
  };
@@ -227,11 +230,14 @@ export declare const SdJwt4VC: z.ZodObject<{
227
230
  };
228
231
  };
229
232
  vct: string;
233
+ "vct#integrity": string;
234
+ issuing_authority: string;
235
+ issuing_country: string;
230
236
  iat?: number | undefined;
231
237
  }, {
232
238
  iss: string;
233
239
  status: {
234
- status_attestation: {
240
+ status_assertion: {
235
241
  credential_hash_alg: "sha-256";
236
242
  };
237
243
  };
@@ -265,6 +271,9 @@ export declare const SdJwt4VC: z.ZodObject<{
265
271
  };
266
272
  };
267
273
  vct: string;
274
+ "vct#integrity": string;
275
+ issuing_authority: string;
276
+ issuing_country: string;
268
277
  iat?: number | undefined;
269
278
  }>, z.ZodObject<{
270
279
  _sd: z.ZodArray<z.ZodString, "many">;
@@ -276,13 +285,13 @@ export declare const SdJwt4VC: z.ZodObject<{
276
285
  }, "strip", z.ZodTypeAny, {
277
286
  header: {
278
287
  alg: string;
279
- typ: "vc+sd-jwt";
288
+ typ: "dc+sd-jwt";
280
289
  kid?: string | undefined;
281
290
  };
282
291
  payload: {
283
292
  iss: string;
284
293
  status: {
285
- status_attestation: {
294
+ status_assertion: {
286
295
  credential_hash_alg: "sha-256";
287
296
  };
288
297
  };
@@ -316,6 +325,9 @@ export declare const SdJwt4VC: z.ZodObject<{
316
325
  };
317
326
  };
318
327
  vct: string;
328
+ "vct#integrity": string;
329
+ issuing_authority: string;
330
+ issuing_country: string;
319
331
  iat?: number | undefined;
320
332
  } & {
321
333
  _sd: string[];
@@ -323,13 +335,13 @@ export declare const SdJwt4VC: z.ZodObject<{
323
335
  }, {
324
336
  header: {
325
337
  alg: string;
326
- typ: "vc+sd-jwt";
338
+ typ: "dc+sd-jwt";
327
339
  kid?: string | undefined;
328
340
  };
329
341
  payload: {
330
342
  iss: string;
331
343
  status: {
332
- status_attestation: {
344
+ status_assertion: {
333
345
  credential_hash_alg: "sha-256";
334
346
  };
335
347
  };
@@ -363,9 +375,179 @@ export declare const SdJwt4VC: z.ZodObject<{
363
375
  };
364
376
  };
365
377
  vct: string;
378
+ "vct#integrity": string;
379
+ issuing_authority: string;
380
+ issuing_country: string;
366
381
  iat?: number | undefined;
367
382
  } & {
368
383
  _sd: string[];
369
384
  };
370
385
  }>;
386
+ /**
387
+ * Object containing User authentication and User data verification information.
388
+ * Useful to extract the assurance level to determine L2/L3 authentication.
389
+ */
390
+ export type Verification = z.infer<typeof Verification>;
391
+ export declare const Verification: z.ZodObject<{
392
+ trust_framework: z.ZodString;
393
+ assurance_level: z.ZodString;
394
+ evidence: z.ZodArray<z.ZodObject<{
395
+ type: z.ZodLiteral<"vouch">;
396
+ time: z.ZodString;
397
+ attestation: z.ZodObject<{
398
+ type: z.ZodLiteral<"digital_attestation">;
399
+ reference_number: z.ZodString;
400
+ date_of_issuance: z.ZodString;
401
+ voucher: z.ZodObject<{
402
+ organization: z.ZodString;
403
+ }, "strip", z.ZodTypeAny, {
404
+ organization: string;
405
+ }, {
406
+ organization: string;
407
+ }>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ type: "digital_attestation";
410
+ reference_number: string;
411
+ date_of_issuance: string;
412
+ voucher: {
413
+ organization: string;
414
+ };
415
+ }, {
416
+ type: "digital_attestation";
417
+ reference_number: string;
418
+ date_of_issuance: string;
419
+ voucher: {
420
+ organization: string;
421
+ };
422
+ }>;
423
+ }, "strip", z.ZodTypeAny, {
424
+ type: "vouch";
425
+ time: string;
426
+ attestation: {
427
+ type: "digital_attestation";
428
+ reference_number: string;
429
+ date_of_issuance: string;
430
+ voucher: {
431
+ organization: string;
432
+ };
433
+ };
434
+ }, {
435
+ type: "vouch";
436
+ time: string;
437
+ attestation: {
438
+ type: "digital_attestation";
439
+ reference_number: string;
440
+ date_of_issuance: string;
441
+ voucher: {
442
+ organization: string;
443
+ };
444
+ };
445
+ }>, "many">;
446
+ }, "strip", z.ZodTypeAny, {
447
+ trust_framework: string;
448
+ assurance_level: string;
449
+ evidence: {
450
+ type: "vouch";
451
+ time: string;
452
+ attestation: {
453
+ type: "digital_attestation";
454
+ reference_number: string;
455
+ date_of_issuance: string;
456
+ voucher: {
457
+ organization: string;
458
+ };
459
+ };
460
+ }[];
461
+ }, {
462
+ trust_framework: string;
463
+ assurance_level: string;
464
+ evidence: {
465
+ type: "vouch";
466
+ time: string;
467
+ attestation: {
468
+ type: "digital_attestation";
469
+ reference_number: string;
470
+ date_of_issuance: string;
471
+ voucher: {
472
+ organization: string;
473
+ };
474
+ };
475
+ }[];
476
+ }>;
477
+ /**
478
+ * Metadata for a digital credential. This information is retrieved from the URL defined in the `vct` claim.
479
+ *
480
+ * @see https://italia.github.io/eid-wallet-it-docs/v0.9.1/en/pid-eaa-data-model.html#digital-credential-metadata-type
481
+ */
482
+ export type TypeMetadata = z.infer<typeof TypeMetadata>;
483
+ export declare const TypeMetadata: z.ZodObject<{
484
+ name: z.ZodString;
485
+ description: z.ZodString;
486
+ data_source: z.ZodObject<{
487
+ trust_framework: z.ZodString;
488
+ authentic_source: z.ZodObject<{
489
+ organization_name: z.ZodString;
490
+ organization_code: z.ZodString;
491
+ contacts: z.ZodArray<z.ZodString, "many">;
492
+ homepage_uri: z.ZodString;
493
+ logo_uri: z.ZodString;
494
+ }, "strip", z.ZodTypeAny, {
495
+ organization_name: string;
496
+ organization_code: string;
497
+ contacts: string[];
498
+ homepage_uri: string;
499
+ logo_uri: string;
500
+ }, {
501
+ organization_name: string;
502
+ organization_code: string;
503
+ contacts: string[];
504
+ homepage_uri: string;
505
+ logo_uri: string;
506
+ }>;
507
+ }, "strip", z.ZodTypeAny, {
508
+ trust_framework: string;
509
+ authentic_source: {
510
+ organization_name: string;
511
+ organization_code: string;
512
+ contacts: string[];
513
+ homepage_uri: string;
514
+ logo_uri: string;
515
+ };
516
+ }, {
517
+ trust_framework: string;
518
+ authentic_source: {
519
+ organization_name: string;
520
+ organization_code: string;
521
+ contacts: string[];
522
+ homepage_uri: string;
523
+ logo_uri: string;
524
+ };
525
+ }>;
526
+ }, "strip", z.ZodTypeAny, {
527
+ name: string;
528
+ description: string;
529
+ data_source: {
530
+ trust_framework: string;
531
+ authentic_source: {
532
+ organization_name: string;
533
+ organization_code: string;
534
+ contacts: string[];
535
+ homepage_uri: string;
536
+ logo_uri: string;
537
+ };
538
+ };
539
+ }, {
540
+ name: string;
541
+ description: string;
542
+ data_source: {
543
+ trust_framework: string;
544
+ authentic_source: {
545
+ organization_name: string;
546
+ organization_code: string;
547
+ contacts: string[];
548
+ homepage_uri: string;
549
+ logo_uri: string;
550
+ };
551
+ };
552
+ }>;
371
553
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,QAAQ,aAAuC,CAAC;AAC7D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;EAAyC,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAO,MAAM,UAAU,4DAIrB,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BnB,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAevB,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { TypeMetadata, Verification } from "./types";
2
+ /**
3
+ * Retrieve the Type Metadata for a credential and verify its integrity.
4
+ * @param vct The VCT as a valid HTTPS url
5
+ * @param vctIntegrity The integrity hash
6
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
7
+ * @returns The credential metadata {@link TypeMetadata}
8
+ */
9
+ export declare const fetchTypeMetadata: (vct: string, vctIntegrity: string, context?: {
10
+ appFetch?: GlobalFetch["fetch"];
11
+ }) => Promise<TypeMetadata>;
12
+ /**
13
+ * Extract and validate the `verification` claim from disclosures.
14
+ * @param credentialSdJwt The raw credential SD-JWT
15
+ * @returns The verification claim or undefined if it wasn't found
16
+ */
17
+ export declare const getVerification: (credentialSdJwt: string) => Verification | undefined;
18
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/sd-jwt/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASrD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QACvB,MAAM,gBACG,MAAM,YACX;IACP,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACA,QAAQ,YAAY,CA8BtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,oBACT,MAAM,KACtB,YAAY,GAAG,SASjB,CAAC"}
@@ -260,33 +260,41 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
260
260
  }[];
261
261
  credential_issuer: string;
262
262
  credential_endpoint: string;
263
- revocation_endpoint: string;
263
+ nonce_endpoint: string;
264
264
  status_attestation_endpoint: string;
265
- credential_configurations_supported: Record<string, {
266
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
265
+ credential_configurations_supported: Record<string, ({
266
+ vct: string;
267
+ format: "dc+sd-jwt";
268
+ } | {
269
+ format: "mso_mdoc";
270
+ doctype: string;
271
+ }) & {
267
272
  scope: string;
268
273
  display: {
269
274
  name: string;
270
275
  locale: string;
271
276
  }[];
272
- claims: Record<string, {
273
- value_type: string;
277
+ claims: {
278
+ path: string[];
274
279
  display: {
275
280
  name: string;
276
281
  locale: string;
277
282
  }[];
278
- }>;
283
+ }[];
279
284
  cryptographic_binding_methods_supported: string[];
280
285
  credential_signing_alg_values_supported: string[];
281
286
  authentic_source?: string | undefined;
282
287
  issuance_errors_supported?: Record<string, {
283
288
  display: {
289
+ description: string;
284
290
  locale: string;
285
291
  title: string;
286
- description: string;
287
292
  }[];
288
293
  }> | undefined;
289
294
  }>;
295
+ trust_frameworks_supported: string[];
296
+ evidence_supported: string[];
297
+ revocation_endpoint?: string | undefined;
290
298
  };
291
299
  oauth_authorization_server: {
292
300
  request_object_signing_alg_values_supported: string[];
@@ -795,33 +803,41 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
795
803
  }[];
796
804
  credential_issuer: string;
797
805
  credential_endpoint: string;
798
- revocation_endpoint: string;
806
+ nonce_endpoint: string;
799
807
  status_attestation_endpoint: string;
800
- credential_configurations_supported: Record<string, {
801
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
808
+ credential_configurations_supported: Record<string, ({
809
+ vct: string;
810
+ format: "dc+sd-jwt";
811
+ } | {
812
+ format: "mso_mdoc";
813
+ doctype: string;
814
+ }) & {
802
815
  scope: string;
803
816
  display: {
804
817
  name: string;
805
818
  locale: string;
806
819
  }[];
807
- claims: Record<string, {
808
- value_type: string;
820
+ claims: {
821
+ path: string[];
809
822
  display: {
810
823
  name: string;
811
824
  locale: string;
812
825
  }[];
813
- }>;
826
+ }[];
814
827
  cryptographic_binding_methods_supported: string[];
815
828
  credential_signing_alg_values_supported: string[];
816
829
  authentic_source?: string | undefined;
817
830
  issuance_errors_supported?: Record<string, {
818
831
  display: {
832
+ description: string;
819
833
  locale: string;
820
834
  title: string;
821
- description: string;
822
835
  }[];
823
836
  }> | undefined;
824
837
  }>;
838
+ trust_frameworks_supported: string[];
839
+ evidence_supported: string[];
840
+ revocation_endpoint?: string | undefined;
825
841
  };
826
842
  oauth_authorization_server: {
827
843
  request_object_signing_alg_values_supported: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"build-chain.d.ts","sourceRoot":"","sources":["../../../src/trust/build-chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AASxC,OAAO,EACL,mCAAmC,EACnC,mBAAmB,EAGnB,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,SAAS,CAAC;AAIjB;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAe,gCAAgC,CAC7C,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,OAAO,iCAAiC,EAChD,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,GACA,OAAO,CAAC,iCAAiC,CAAC,CAAC;AAC9C,iBAAe,gCAAgC,CAC7C,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE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