@pagopa/io-react-native-wallet 0.27.1 → 0.28.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/lib/commonjs/client/generated/wallet-provider.js +27 -19
  2. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +3 -0
  4. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  5. package/lib/commonjs/credential/presentation/01-start-flow.js +14 -24
  6. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
  7. package/lib/commonjs/credential/presentation/03-get-request-object.js +30 -42
  8. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -1
  9. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +32 -0
  10. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
  11. package/lib/commonjs/credential/presentation/05-verify-request-object.js +53 -0
  12. package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -0
  13. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +39 -0
  14. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
  15. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +125 -0
  16. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +1 -0
  17. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +289 -0
  18. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
  19. package/lib/commonjs/credential/presentation/08-send-authorization-response.js +170 -0
  20. package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -0
  21. package/lib/commonjs/credential/presentation/errors.js +69 -1
  22. package/lib/commonjs/credential/presentation/errors.js.map +1 -1
  23. package/lib/commonjs/credential/presentation/index.js +29 -1
  24. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  25. package/lib/commonjs/credential/presentation/types.js +124 -3
  26. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  27. package/lib/commonjs/sd-jwt/index.js +41 -1
  28. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  29. package/lib/commonjs/trust/chain.js +35 -50
  30. package/lib/commonjs/trust/chain.js.map +1 -1
  31. package/lib/commonjs/trust/index.js +139 -16
  32. package/lib/commonjs/trust/index.js.map +1 -1
  33. package/lib/commonjs/trust/types.js +36 -12
  34. package/lib/commonjs/trust/types.js.map +1 -1
  35. package/lib/commonjs/trust/utils.js +41 -0
  36. package/lib/commonjs/trust/utils.js.map +1 -0
  37. package/lib/commonjs/utils/jwk.js +5 -1
  38. package/lib/commonjs/utils/jwk.js.map +1 -1
  39. package/lib/commonjs/wallet-instance/index.js +10 -0
  40. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  41. package/lib/module/client/generated/wallet-provider.js +22 -15
  42. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  43. package/lib/module/credential/issuance/03-start-user-authorization.js +3 -0
  44. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  45. package/lib/module/credential/presentation/01-start-flow.js +14 -24
  46. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  47. package/lib/module/credential/presentation/03-get-request-object.js +31 -43
  48. package/lib/module/credential/presentation/03-get-request-object.js.map +1 -1
  49. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +25 -0
  50. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
  51. package/lib/module/credential/presentation/05-verify-request-object.js +46 -0
  52. package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -0
  53. package/lib/module/credential/presentation/06-fetch-presentation-definition.js +32 -0
  54. package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
  55. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +117 -0
  56. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +1 -0
  57. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +278 -0
  58. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
  59. package/lib/module/credential/presentation/08-send-authorization-response.js +158 -0
  60. package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -0
  61. package/lib/module/credential/presentation/errors.js +64 -0
  62. package/lib/module/credential/presentation/errors.js.map +1 -1
  63. package/lib/module/credential/presentation/index.js +6 -2
  64. package/lib/module/credential/presentation/index.js.map +1 -1
  65. package/lib/module/credential/presentation/types.js +121 -2
  66. package/lib/module/credential/presentation/types.js.map +1 -1
  67. package/lib/module/sd-jwt/index.js +40 -1
  68. package/lib/module/sd-jwt/index.js.map +1 -1
  69. package/lib/module/trust/chain.js +32 -46
  70. package/lib/module/trust/chain.js.map +1 -1
  71. package/lib/module/trust/index.js +139 -18
  72. package/lib/module/trust/index.js.map +1 -1
  73. package/lib/module/trust/types.js +34 -11
  74. package/lib/module/trust/types.js.map +1 -1
  75. package/lib/module/trust/utils.js +33 -0
  76. package/lib/module/trust/utils.js.map +1 -0
  77. package/lib/module/utils/jwk.js +3 -0
  78. package/lib/module/utils/jwk.js.map +1 -1
  79. package/lib/module/wallet-instance/index.js +9 -0
  80. package/lib/module/wallet-instance/index.js.map +1 -1
  81. package/lib/typescript/client/generated/wallet-provider.d.ts +91 -54
  82. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  83. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  84. package/lib/typescript/credential/presentation/01-start-flow.d.ts +26 -5
  85. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
  86. package/lib/typescript/credential/presentation/03-get-request-object.d.ts +7 -10
  87. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -1
  88. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +23 -0
  89. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -0
  90. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +18 -0
  91. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -0
  92. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +21 -0
  93. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -0
  94. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +20 -0
  95. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +1 -0
  96. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +88 -0
  97. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -0
  98. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +70 -0
  99. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -0
  100. package/lib/typescript/credential/presentation/errors.d.ts +44 -0
  101. package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
  102. package/lib/typescript/credential/presentation/index.d.ts +7 -3
  103. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  104. package/lib/typescript/credential/presentation/types.d.ts +747 -10
  105. package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
  106. package/lib/typescript/credential/status/types.d.ts +6 -6
  107. package/lib/typescript/sd-jwt/index.d.ts +31 -12
  108. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  109. package/lib/typescript/sd-jwt/types.d.ts +6 -6
  110. package/lib/typescript/trust/chain.d.ts +4 -9
  111. package/lib/typescript/trust/chain.d.ts.map +1 -1
  112. package/lib/typescript/trust/index.d.ts +337 -61
  113. package/lib/typescript/trust/index.d.ts.map +1 -1
  114. package/lib/typescript/trust/types.d.ts +4074 -407
  115. package/lib/typescript/trust/types.d.ts.map +1 -1
  116. package/lib/typescript/trust/utils.d.ts +12 -0
  117. package/lib/typescript/trust/utils.d.ts.map +1 -0
  118. package/lib/typescript/utils/decoder.d.ts +1 -1
  119. package/lib/typescript/utils/decoder.d.ts.map +1 -1
  120. package/lib/typescript/utils/jwk.d.ts +137 -0
  121. package/lib/typescript/utils/jwk.d.ts.map +1 -1
  122. package/lib/typescript/wallet-instance/index.d.ts +8 -0
  123. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  124. package/lib/typescript/wallet-instance-attestation/types.d.ts +36 -36
  125. package/package.json +5 -2
  126. package/src/client/generated/wallet-provider.ts +28 -19
  127. package/src/credential/issuance/03-start-user-authorization.ts +3 -0
  128. package/src/credential/presentation/01-start-flow.ts +19 -26
  129. package/src/credential/presentation/03-get-request-object.ts +35 -58
  130. package/src/credential/presentation/04-retrieve-rp-jwks.ts +34 -0
  131. package/src/credential/presentation/05-verify-request-object.ts +52 -0
  132. package/src/credential/presentation/06-fetch-presentation-definition.ts +48 -0
  133. package/src/credential/presentation/07-evaluate-dcql-query.ts +166 -0
  134. package/src/credential/presentation/07-evaluate-input-descriptor.ts +391 -0
  135. package/src/credential/presentation/08-send-authorization-response.ts +220 -0
  136. package/src/credential/presentation/errors.ts +64 -0
  137. package/src/credential/presentation/index.ts +22 -1
  138. package/src/credential/presentation/types.ts +133 -2
  139. package/src/sd-jwt/index.ts +49 -1
  140. package/src/trust/chain.ts +46 -66
  141. package/src/trust/index.ts +185 -20
  142. package/src/trust/types.ts +34 -10
  143. package/src/trust/utils.ts +35 -0
  144. package/src/utils/decoder.ts +1 -1
  145. package/src/utils/jwk.ts +8 -1
  146. package/src/wallet-instance/index.ts +13 -0
  147. package/lib/commonjs/credential/presentation/04-send-authorization-response.js +0 -138
  148. package/lib/commonjs/credential/presentation/04-send-authorization-response.js.map +0 -1
  149. package/lib/module/credential/presentation/04-send-authorization-response.js +0 -128
  150. package/lib/module/credential/presentation/04-send-authorization-response.js.map +0 -1
  151. package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts +0 -34
  152. package/lib/typescript/credential/presentation/04-send-authorization-response.d.ts.map +0 -1
  153. package/src/credential/presentation/04-send-authorization-response.ts +0 -168
@@ -1,14 +1,15 @@
1
- import { WalletProviderEntityConfiguration, TrustAnchorEntityConfiguration, CredentialIssuerEntityConfiguration, RelyingPartyEntityConfiguration, EntityConfiguration, EntityStatement } from "./types";
1
+ import { CredentialIssuerEntityConfiguration, EntityConfiguration, EntityStatement, RelyingPartyEntityConfiguration, TrustAnchorEntityConfiguration, WalletProviderEntityConfiguration } from "./types";
2
2
  import { validateTrustChain } from "./chain";
3
+ import type { JWK } from "../utils/jwk";
3
4
  export type { WalletProviderEntityConfiguration, TrustAnchorEntityConfiguration, CredentialIssuerEntityConfiguration, RelyingPartyEntityConfiguration, EntityConfiguration, EntityStatement, };
4
5
  /**
5
6
  * Verify a given trust chain is actually valid.
6
7
  * It can handle fast chain renewal, which means we try to fetch a fresh version of each statement.
7
8
  *
8
9
  * @param trustAnchorEntity The entity configuration of the known trust anchor
9
- * @param chain The chain of statements to be validate
10
- * @param options.renewOnFail Whether to renew the provided chain if the validation fails at first. Default: true
11
- * @param options.appFetch Fetch api implementation. Default: the built-in implementation
10
+ * @param chain The chain of statements to be validated
11
+ * @param renewOnFail Whether to renew the provided chain if the validation fails at first. Default: true
12
+ * @param appFetch Fetch api implementation. Default: the built-in implementation
12
13
  * @returns The result of the chain validation
13
14
  * @throws {IoWalletError} When either validation or renewal fail
14
15
  */
@@ -20,7 +21,7 @@ export declare function verifyTrustChain(trustAnchorEntity: TrustAnchorEntityCon
20
21
  * Fetch the signed entity configuration token for an entity
21
22
  *
22
23
  * @param entityBaseUrl The url of the entity to fetch
23
- * @param param.appFetch (optional) fetch api implemention
24
+ * @param appFetch (optional) fetch api implementation
24
25
  * @returns The signed Entity Configuration token
25
26
  */
26
27
  export declare function getSignedEntityConfiguration(entityBaseUrl: string, { appFetch, }?: {
@@ -38,6 +39,7 @@ export declare function getSignedEntityConfiguration(entityBaseUrl: string, { ap
38
39
  *
39
40
  * @param entityBaseUrl The base url of the entity.
40
41
  * @param schema The expected schema of the entity configuration, according to the kind of entity we are fetching from.
42
+ * @param options An optional object with additional options.
41
43
  * @param options.appFetch An optional instance of the http client to be used.
42
44
  * @returns The parsed entity configuration object
43
45
  * @throws {IoWalletError} If the http request fails
@@ -59,11 +61,6 @@ declare function fetchAndParseEntityConfiguration(entityBaseUrl: string, schema:
59
61
  appFetch?: GlobalFetch["fetch"];
60
62
  }): Promise<EntityConfiguration>;
61
63
  export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
62
- header: {
63
- alg: string;
64
- kid: string;
65
- typ: "entity-statement+jwt";
66
- };
67
64
  payload: {
68
65
  iss: string;
69
66
  sub: string;
@@ -102,6 +99,9 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
102
99
  federation_resolve_endpoint?: string | undefined;
103
100
  federation_trust_mark_status_endpoint?: string | undefined;
104
101
  federation_trust_mark_list_endpoint?: string | undefined;
102
+ federation_trust_mark_endpoint?: string | undefined;
103
+ federation_historical_keys_endpoint?: string | undefined;
104
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
105
105
  organization_name?: string | undefined;
106
106
  homepage_uri?: string | undefined;
107
107
  policy_uri?: string | undefined;
@@ -117,6 +117,11 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
117
117
  } & {
118
118
  [k: string]: unknown;
119
119
  };
120
+ header: {
121
+ alg: string;
122
+ kid: string;
123
+ typ: "entity-statement+jwt";
124
+ };
120
125
  } & {
121
126
  payload: {
122
127
  metadata: {
@@ -159,11 +164,6 @@ export declare const getWalletProviderEntityConfiguration: (entityBaseUrl: Param
159
164
  };
160
165
  }>;
161
166
  export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
162
- header: {
163
- alg: string;
164
- kid: string;
165
- typ: "entity-statement+jwt";
166
- };
167
167
  payload: {
168
168
  iss: string;
169
169
  sub: string;
@@ -202,6 +202,9 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
202
202
  federation_resolve_endpoint?: string | undefined;
203
203
  federation_trust_mark_status_endpoint?: string | undefined;
204
204
  federation_trust_mark_list_endpoint?: string | undefined;
205
+ federation_trust_mark_endpoint?: string | undefined;
206
+ federation_historical_keys_endpoint?: string | undefined;
207
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
205
208
  organization_name?: string | undefined;
206
209
  homepage_uri?: string | undefined;
207
210
  policy_uri?: string | undefined;
@@ -217,6 +220,11 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
217
220
  } & {
218
221
  [k: string]: unknown;
219
222
  };
223
+ header: {
224
+ alg: string;
225
+ kid: string;
226
+ typ: "entity-statement+jwt";
227
+ };
220
228
  } & {
221
229
  payload: {
222
230
  jwks: {
@@ -282,12 +290,12 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
282
290
  revocation_endpoint: string;
283
291
  status_attestation_endpoint: string;
284
292
  credential_configurations_supported: Record<string, {
293
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
294
+ scope: string;
285
295
  display: {
286
296
  name: string;
287
297
  locale: string;
288
298
  }[];
289
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
290
- scope: string;
291
299
  claims: Record<string, {
292
300
  value_type: string;
293
301
  display: {
@@ -308,6 +316,7 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
308
316
  }>;
309
317
  };
310
318
  oauth_authorization_server: {
319
+ request_object_signing_alg_values_supported: string[];
311
320
  jwks: {
312
321
  keys: {
313
322
  kty: "RSA" | "EC";
@@ -346,8 +355,80 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
346
355
  response_modes_supported: string[];
347
356
  token_endpoint_auth_methods_supported: string[];
348
357
  token_endpoint_auth_signing_alg_values_supported: string[];
349
- request_object_signing_alg_values_supported: string[];
350
358
  };
359
+ openid_credential_verifier?: {
360
+ jwks: {
361
+ keys: {
362
+ kty: "RSA" | "EC";
363
+ alg?: string | undefined;
364
+ crv?: string | undefined;
365
+ d?: string | undefined;
366
+ dp?: string | undefined;
367
+ dq?: string | undefined;
368
+ e?: string | undefined;
369
+ ext?: boolean | undefined;
370
+ k?: string | undefined;
371
+ key_ops?: string[] | undefined;
372
+ kid?: string | undefined;
373
+ n?: string | undefined;
374
+ p?: string | undefined;
375
+ q?: string | undefined;
376
+ qi?: string | undefined;
377
+ use?: string | undefined;
378
+ x?: string | undefined;
379
+ y?: string | undefined;
380
+ x5c?: string[] | undefined;
381
+ x5t?: string | undefined;
382
+ "x5t#S256"?: string | undefined;
383
+ x5u?: string | undefined;
384
+ }[];
385
+ };
386
+ application_type?: string | undefined;
387
+ client_id?: string | undefined;
388
+ client_name?: string | undefined;
389
+ contacts?: string[] | undefined;
390
+ presentation_definition?: {
391
+ id: string;
392
+ input_descriptors: {
393
+ id: string;
394
+ constraints: {
395
+ fields?: {
396
+ path: string[];
397
+ id?: string | undefined;
398
+ purpose?: string | undefined;
399
+ name?: string | undefined;
400
+ filter?: any;
401
+ optional?: boolean | undefined;
402
+ intent_to_retain?: boolean | undefined;
403
+ }[] | undefined;
404
+ limit_disclosure?: "required" | "preferred" | undefined;
405
+ };
406
+ name?: string | undefined;
407
+ purpose?: string | undefined;
408
+ format?: Record<string, any> | undefined;
409
+ group?: string | undefined;
410
+ }[];
411
+ name?: string | undefined;
412
+ purpose?: string | undefined;
413
+ submission_requirements?: {
414
+ rule: string;
415
+ name?: string | undefined;
416
+ purpose?: string | undefined;
417
+ from?: string | undefined;
418
+ from_nested?: {
419
+ rule: string;
420
+ from: string;
421
+ name?: string | undefined;
422
+ purpose?: string | undefined;
423
+ }[] | undefined;
424
+ count?: number | undefined;
425
+ }[] | undefined;
426
+ } | undefined;
427
+ request_uris?: string[] | undefined;
428
+ authorization_signed_response_alg?: string | undefined;
429
+ authorization_encrypted_response_alg?: string | undefined;
430
+ authorization_encrypted_response_enc?: string | undefined;
431
+ } | undefined;
351
432
  wallet_relying_party?: {
352
433
  jwks: {
353
434
  keys: {
@@ -384,11 +465,6 @@ export declare const getCredentialIssuerEntityConfiguration: (entityBaseUrl: Par
384
465
  };
385
466
  }>;
386
467
  export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
387
- header: {
388
- alg: string;
389
- kid: string;
390
- typ: "entity-statement+jwt";
391
- };
392
468
  payload: {
393
469
  iss: string;
394
470
  sub: string;
@@ -427,6 +503,9 @@ export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Paramete
427
503
  federation_resolve_endpoint?: string | undefined;
428
504
  federation_trust_mark_status_endpoint?: string | undefined;
429
505
  federation_trust_mark_list_endpoint?: string | undefined;
506
+ federation_trust_mark_endpoint?: string | undefined;
507
+ federation_historical_keys_endpoint?: string | undefined;
508
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
430
509
  organization_name?: string | undefined;
431
510
  homepage_uri?: string | undefined;
432
511
  policy_uri?: string | undefined;
@@ -442,13 +521,13 @@ export declare const getTrustAnchorEntityConfiguration: (entityBaseUrl: Paramete
442
521
  } & {
443
522
  [k: string]: unknown;
444
523
  };
445
- }>;
446
- export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
447
524
  header: {
448
525
  alg: string;
449
526
  kid: string;
450
527
  typ: "entity-statement+jwt";
451
528
  };
529
+ }>;
530
+ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
452
531
  payload: {
453
532
  iss: string;
454
533
  sub: string;
@@ -487,6 +566,9 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
487
566
  federation_resolve_endpoint?: string | undefined;
488
567
  federation_trust_mark_status_endpoint?: string | undefined;
489
568
  federation_trust_mark_list_endpoint?: string | undefined;
569
+ federation_trust_mark_endpoint?: string | undefined;
570
+ federation_historical_keys_endpoint?: string | undefined;
571
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
490
572
  organization_name?: string | undefined;
491
573
  homepage_uri?: string | undefined;
492
574
  policy_uri?: string | undefined;
@@ -502,10 +584,15 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
502
584
  } & {
503
585
  [k: string]: unknown;
504
586
  };
587
+ header: {
588
+ alg: string;
589
+ kid: string;
590
+ typ: "entity-statement+jwt";
591
+ };
505
592
  } & {
506
593
  payload: {
507
594
  metadata: {
508
- wallet_relying_party: {
595
+ openid_credential_verifier: {
509
596
  jwks: {
510
597
  keys: {
511
598
  kty: "RSA" | "EC";
@@ -536,16 +623,52 @@ export declare const getRelyingPartyEntityConfiguration: (entityBaseUrl: Paramet
536
623
  client_id?: string | undefined;
537
624
  client_name?: string | undefined;
538
625
  contacts?: string[] | undefined;
626
+ presentation_definition?: {
627
+ id: string;
628
+ input_descriptors: {
629
+ id: string;
630
+ constraints: {
631
+ fields?: {
632
+ path: string[];
633
+ id?: string | undefined;
634
+ purpose?: string | undefined;
635
+ name?: string | undefined;
636
+ filter?: any;
637
+ optional?: boolean | undefined;
638
+ intent_to_retain?: boolean | undefined;
639
+ }[] | undefined;
640
+ limit_disclosure?: "required" | "preferred" | undefined;
641
+ };
642
+ name?: string | undefined;
643
+ purpose?: string | undefined;
644
+ format?: Record<string, any> | undefined;
645
+ group?: string | undefined;
646
+ }[];
647
+ name?: string | undefined;
648
+ purpose?: string | undefined;
649
+ submission_requirements?: {
650
+ rule: string;
651
+ name?: string | undefined;
652
+ purpose?: string | undefined;
653
+ from?: string | undefined;
654
+ from_nested?: {
655
+ rule: string;
656
+ from: string;
657
+ name?: string | undefined;
658
+ purpose?: string | undefined;
659
+ }[] | undefined;
660
+ count?: number | undefined;
661
+ }[] | undefined;
662
+ } | undefined;
663
+ request_uris?: string[] | undefined;
664
+ authorization_signed_response_alg?: string | undefined;
665
+ authorization_encrypted_response_alg?: string | undefined;
666
+ authorization_encrypted_response_enc?: string | undefined;
539
667
  };
540
668
  };
541
669
  };
542
670
  }>;
543
671
  export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof fetchAndParseEntityConfiguration>[0], options?: Parameters<typeof fetchAndParseEntityConfiguration>[2]) => Promise<{
544
- header: {
545
- alg: string;
546
- kid: string;
547
- typ: "entity-statement+jwt";
548
- };
549
672
  payload: {
550
673
  iss: string;
551
674
  sub: string;
@@ -584,6 +707,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
584
707
  federation_resolve_endpoint?: string | undefined;
585
708
  federation_trust_mark_status_endpoint?: string | undefined;
586
709
  federation_trust_mark_list_endpoint?: string | undefined;
710
+ federation_trust_mark_endpoint?: string | undefined;
711
+ federation_historical_keys_endpoint?: string | undefined;
712
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
587
713
  organization_name?: string | undefined;
588
714
  homepage_uri?: string | undefined;
589
715
  policy_uri?: string | undefined;
@@ -599,12 +725,12 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
599
725
  } & {
600
726
  [k: string]: unknown;
601
727
  };
602
- } | ({
603
728
  header: {
604
729
  alg: string;
605
730
  kid: string;
606
731
  typ: "entity-statement+jwt";
607
732
  };
733
+ } | ({
608
734
  payload: {
609
735
  iss: string;
610
736
  sub: string;
@@ -643,6 +769,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
643
769
  federation_resolve_endpoint?: string | undefined;
644
770
  federation_trust_mark_status_endpoint?: string | undefined;
645
771
  federation_trust_mark_list_endpoint?: string | undefined;
772
+ federation_trust_mark_endpoint?: string | undefined;
773
+ federation_historical_keys_endpoint?: string | undefined;
774
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
646
775
  organization_name?: string | undefined;
647
776
  homepage_uri?: string | undefined;
648
777
  policy_uri?: string | undefined;
@@ -658,6 +787,11 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
658
787
  } & {
659
788
  [k: string]: unknown;
660
789
  };
790
+ header: {
791
+ alg: string;
792
+ kid: string;
793
+ typ: "entity-statement+jwt";
794
+ };
661
795
  } & {
662
796
  payload: {
663
797
  jwks: {
@@ -723,12 +857,12 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
723
857
  revocation_endpoint: string;
724
858
  status_attestation_endpoint: string;
725
859
  credential_configurations_supported: Record<string, {
860
+ format: "vc+sd-jwt" | "vc+mdoc-cbor";
861
+ scope: string;
726
862
  display: {
727
863
  name: string;
728
864
  locale: string;
729
865
  }[];
730
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
731
- scope: string;
732
866
  claims: Record<string, {
733
867
  value_type: string;
734
868
  display: {
@@ -749,6 +883,7 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
749
883
  }>;
750
884
  };
751
885
  oauth_authorization_server: {
886
+ request_object_signing_alg_values_supported: string[];
752
887
  jwks: {
753
888
  keys: {
754
889
  kty: "RSA" | "EC";
@@ -787,8 +922,80 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
787
922
  response_modes_supported: string[];
788
923
  token_endpoint_auth_methods_supported: string[];
789
924
  token_endpoint_auth_signing_alg_values_supported: string[];
790
- request_object_signing_alg_values_supported: string[];
791
925
  };
926
+ openid_credential_verifier?: {
927
+ jwks: {
928
+ keys: {
929
+ kty: "RSA" | "EC";
930
+ alg?: string | undefined;
931
+ crv?: string | undefined;
932
+ d?: string | undefined;
933
+ dp?: string | undefined;
934
+ dq?: string | undefined;
935
+ e?: string | undefined;
936
+ ext?: boolean | undefined;
937
+ k?: string | undefined;
938
+ key_ops?: string[] | undefined;
939
+ kid?: string | undefined;
940
+ n?: string | undefined;
941
+ p?: string | undefined;
942
+ q?: string | undefined;
943
+ qi?: string | undefined;
944
+ use?: string | undefined;
945
+ x?: string | undefined;
946
+ y?: string | undefined;
947
+ x5c?: string[] | undefined;
948
+ x5t?: string | undefined;
949
+ "x5t#S256"?: string | undefined;
950
+ x5u?: string | undefined;
951
+ }[];
952
+ };
953
+ application_type?: string | undefined;
954
+ client_id?: string | undefined;
955
+ client_name?: string | undefined;
956
+ contacts?: string[] | undefined;
957
+ presentation_definition?: {
958
+ id: string;
959
+ input_descriptors: {
960
+ id: string;
961
+ constraints: {
962
+ fields?: {
963
+ path: string[];
964
+ id?: string | undefined;
965
+ purpose?: string | undefined;
966
+ name?: string | undefined;
967
+ filter?: any;
968
+ optional?: boolean | undefined;
969
+ intent_to_retain?: boolean | undefined;
970
+ }[] | undefined;
971
+ limit_disclosure?: "required" | "preferred" | undefined;
972
+ };
973
+ name?: string | undefined;
974
+ purpose?: string | undefined;
975
+ format?: Record<string, any> | undefined;
976
+ group?: string | undefined;
977
+ }[];
978
+ name?: string | undefined;
979
+ purpose?: string | undefined;
980
+ submission_requirements?: {
981
+ rule: string;
982
+ name?: string | undefined;
983
+ purpose?: string | undefined;
984
+ from?: string | undefined;
985
+ from_nested?: {
986
+ rule: string;
987
+ from: string;
988
+ name?: string | undefined;
989
+ purpose?: string | undefined;
990
+ }[] | undefined;
991
+ count?: number | undefined;
992
+ }[] | undefined;
993
+ } | undefined;
994
+ request_uris?: string[] | undefined;
995
+ authorization_signed_response_alg?: string | undefined;
996
+ authorization_encrypted_response_alg?: string | undefined;
997
+ authorization_encrypted_response_enc?: string | undefined;
998
+ } | undefined;
792
999
  wallet_relying_party?: {
793
1000
  jwks: {
794
1001
  keys: {
@@ -824,11 +1031,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
824
1031
  };
825
1032
  };
826
1033
  }) | ({
827
- header: {
828
- alg: string;
829
- kid: string;
830
- typ: "entity-statement+jwt";
831
- };
832
1034
  payload: {
833
1035
  iss: string;
834
1036
  sub: string;
@@ -867,6 +1069,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
867
1069
  federation_resolve_endpoint?: string | undefined;
868
1070
  federation_trust_mark_status_endpoint?: string | undefined;
869
1071
  federation_trust_mark_list_endpoint?: string | undefined;
1072
+ federation_trust_mark_endpoint?: string | undefined;
1073
+ federation_historical_keys_endpoint?: string | undefined;
1074
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
870
1075
  organization_name?: string | undefined;
871
1076
  homepage_uri?: string | undefined;
872
1077
  policy_uri?: string | undefined;
@@ -882,10 +1087,15 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
882
1087
  } & {
883
1088
  [k: string]: unknown;
884
1089
  };
1090
+ header: {
1091
+ alg: string;
1092
+ kid: string;
1093
+ typ: "entity-statement+jwt";
1094
+ };
885
1095
  } & {
886
1096
  payload: {
887
1097
  metadata: {
888
- wallet_relying_party: {
1098
+ openid_credential_verifier: {
889
1099
  jwks: {
890
1100
  keys: {
891
1101
  kty: "RSA" | "EC";
@@ -916,15 +1126,51 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
916
1126
  client_id?: string | undefined;
917
1127
  client_name?: string | undefined;
918
1128
  contacts?: string[] | undefined;
1129
+ presentation_definition?: {
1130
+ id: string;
1131
+ input_descriptors: {
1132
+ id: string;
1133
+ constraints: {
1134
+ fields?: {
1135
+ path: string[];
1136
+ id?: string | undefined;
1137
+ purpose?: string | undefined;
1138
+ name?: string | undefined;
1139
+ filter?: any;
1140
+ optional?: boolean | undefined;
1141
+ intent_to_retain?: boolean | undefined;
1142
+ }[] | undefined;
1143
+ limit_disclosure?: "required" | "preferred" | undefined;
1144
+ };
1145
+ name?: string | undefined;
1146
+ purpose?: string | undefined;
1147
+ format?: Record<string, any> | undefined;
1148
+ group?: string | undefined;
1149
+ }[];
1150
+ name?: string | undefined;
1151
+ purpose?: string | undefined;
1152
+ submission_requirements?: {
1153
+ rule: string;
1154
+ name?: string | undefined;
1155
+ purpose?: string | undefined;
1156
+ from?: string | undefined;
1157
+ from_nested?: {
1158
+ rule: string;
1159
+ from: string;
1160
+ name?: string | undefined;
1161
+ purpose?: string | undefined;
1162
+ }[] | undefined;
1163
+ count?: number | undefined;
1164
+ }[] | undefined;
1165
+ } | undefined;
1166
+ request_uris?: string[] | undefined;
1167
+ authorization_signed_response_alg?: string | undefined;
1168
+ authorization_encrypted_response_alg?: string | undefined;
1169
+ authorization_encrypted_response_enc?: string | undefined;
919
1170
  };
920
1171
  };
921
1172
  };
922
1173
  }) | ({
923
- header: {
924
- alg: string;
925
- kid: string;
926
- typ: "entity-statement+jwt";
927
- };
928
1174
  payload: {
929
1175
  iss: string;
930
1176
  sub: string;
@@ -963,6 +1209,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
963
1209
  federation_resolve_endpoint?: string | undefined;
964
1210
  federation_trust_mark_status_endpoint?: string | undefined;
965
1211
  federation_trust_mark_list_endpoint?: string | undefined;
1212
+ federation_trust_mark_endpoint?: string | undefined;
1213
+ federation_historical_keys_endpoint?: string | undefined;
1214
+ endpoint_auth_signing_alg_values_supported?: string | undefined;
966
1215
  organization_name?: string | undefined;
967
1216
  homepage_uri?: string | undefined;
968
1217
  policy_uri?: string | undefined;
@@ -978,6 +1227,11 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
978
1227
  } & {
979
1228
  [k: string]: unknown;
980
1229
  };
1230
+ header: {
1231
+ alg: string;
1232
+ kid: string;
1233
+ typ: "entity-statement+jwt";
1234
+ };
981
1235
  } & {
982
1236
  payload: {
983
1237
  metadata: {
@@ -1022,9 +1276,9 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
1022
1276
  /**
1023
1277
  * Fetch and parse the entity statement document for a given federation entity.
1024
1278
  *
1025
- * @param accreditationBodyBaseUrl The base url of the accreditaion body which holds and signs the required entity statement
1279
+ * @param accreditationBodyBaseUrl The base url of the accreditation body which holds and signs the required entity statement
1026
1280
  * @param subordinatedEntityBaseUrl The url that identifies the subordinate entity
1027
- * @param options.appFetch An optional instance of the http client to be used.
1281
+ * @param appFetch An optional instance of the http client to be used.
1028
1282
  * @returns The parsed entity configuration object
1029
1283
  * @throws {IoWalletError} If the http request fails
1030
1284
  * @throws Parse error if the document is not in the expected shape.
@@ -1032,11 +1286,6 @@ export declare const getEntityConfiguration: (entityBaseUrl: Parameters<typeof f
1032
1286
  export declare function getEntityStatement(accreditationBodyBaseUrl: string, subordinatedEntityBaseUrl: string, { appFetch, }?: {
1033
1287
  appFetch?: GlobalFetch["fetch"];
1034
1288
  }): Promise<{
1035
- header: {
1036
- alg: string;
1037
- kid: string;
1038
- typ: "entity-statement+jwt";
1039
- };
1040
1289
  payload: {
1041
1290
  iss: string;
1042
1291
  sub: string;
@@ -1068,22 +1317,49 @@ export declare function getEntityStatement(accreditationBodyBaseUrl: string, sub
1068
1317
  x5u?: string | undefined;
1069
1318
  }[];
1070
1319
  };
1071
- trust_marks: {
1320
+ trust_marks?: {
1072
1321
  id: string;
1073
1322
  trust_mark: string;
1074
- }[];
1323
+ }[] | undefined;
1324
+ };
1325
+ header: {
1326
+ alg: string;
1327
+ kid: string;
1328
+ typ: "entity-statement+jwt";
1075
1329
  };
1076
1330
  }>;
1077
1331
  /**
1078
1332
  * Fetch the entity statement document for a given federation entity.
1079
1333
  *
1080
- * @param accreditationBodyBaseUrl The base url of the accreditaion body which holds and signs the required entity statement
1081
- * @param subordinatedEntityBaseUrl The url that identifies the subordinate entity
1082
- * @param options.appFetch An optional instance of the http client to be used.
1083
- * @returns The signed entity statement token
1084
- * @throws {IoWalletError} If the http request fails
1334
+ * @param federationFetchEndpoint The exact endpoint provided by the parent EC's metadata.
1335
+ * @param subordinatedEntityBaseUrl The url that identifies the subordinate entity.
1336
+ * @param appFetch An optional instance of the http client to be used.
1337
+ * @returns The signed entity statement token.
1338
+ * @throws {IoWalletError} If the http request fails.
1085
1339
  */
1086
- export declare function getSignedEntityStatement(accreditationBodyBaseUrl: string, subordinatedEntityBaseUrl: string, { appFetch, }?: {
1340
+ export declare function getSignedEntityStatement(federationFetchEndpoint: string, subordinatedEntityBaseUrl: string, { appFetch, }?: {
1087
1341
  appFetch?: GlobalFetch["fetch"];
1088
1342
  }): Promise<string>;
1343
+ /**
1344
+ * Fetch the federation list document from a given endpoint.
1345
+ *
1346
+ * @param federationListEndpoint The URL of the federation list endpoint.
1347
+ * @param appFetch An optional instance of the http client to be used.
1348
+ * @returns The federation list as an array of strings.
1349
+ * @throws {IoWalletError} If the HTTP request fails or the response cannot be parsed.
1350
+ */
1351
+ export declare function getFederationList(federationListEndpoint: string, { appFetch, }?: {
1352
+ appFetch?: GlobalFetch["fetch"];
1353
+ }): Promise<string[]>;
1354
+ /**
1355
+ * Build a not-verified trust chain for a given Relying Party (RP) entity.
1356
+ *
1357
+ * @param relyingPartyEntityBaseUrl The base URL of the RP entity
1358
+ * @param trustAnchorKey The public key of the Trust Anchor (TA) entity
1359
+ * @param appFetch An optional instance of the http client to be used.
1360
+ * @returns A list of signed tokens that represent the trust chain, in the order of the chain (from the RP to the Trust Anchor)
1361
+ * @throws {IoWalletError} When an element of the chain fails to parse
1362
+ * The result of this function can be used to validate the trust chain with {@link verifyTrustChain}
1363
+ */
1364
+ export declare function buildTrustChain(relyingPartyEntityBaseUrl: string, trustAnchorKey: JWK, appFetch?: GlobalFetch["fetch"]): Promise<string[]>;
1089
1365
  //# sourceMappingURL=index.d.ts.map