@pagopa/io-react-native-wallet 0.27.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (289) hide show
  1. package/lib/commonjs/credential/index.js +1 -5
  2. package/lib/commonjs/credential/index.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/02-get-issuer-config.js +48 -0
  4. package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +1 -0
  5. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +16 -20
  6. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +8 -8
  8. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/05-authorize-access.js +8 -9
  10. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  11. package/lib/commonjs/credential/issuance/06-obtain-credential.js +18 -21
  12. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  13. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +3 -3
  14. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  15. package/lib/commonjs/credential/issuance/README.md +18 -21
  16. package/lib/commonjs/credential/issuance/index.js +3 -3
  17. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  18. package/lib/commonjs/credential/issuance/types.js +1 -1
  19. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  20. package/lib/commonjs/credential/presentation/01-start-flow.js +7 -2
  21. package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
  22. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +2 -2
  23. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  24. package/lib/commonjs/credential/presentation/03-retrieve-jwks.js +68 -0
  25. package/lib/commonjs/credential/presentation/03-retrieve-jwks.js.map +1 -0
  26. package/lib/commonjs/credential/presentation/{03-get-request-object.js → 04-get-request-object.js} +27 -13
  27. package/lib/commonjs/credential/presentation/04-get-request-object.js.map +1 -0
  28. package/lib/commonjs/credential/presentation/{04-send-authorization-response.js → 05-send-authorization-response.js} +1 -1
  29. package/lib/commonjs/credential/presentation/{04-send-authorization-response.js.map → 05-send-authorization-response.js.map} +1 -1
  30. package/lib/commonjs/credential/presentation/README.md +74 -2
  31. package/lib/commonjs/credential/presentation/index.js +15 -2
  32. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  33. package/lib/commonjs/credential/presentation/types.js +5 -3
  34. package/lib/commonjs/credential/presentation/types.js.map +1 -1
  35. package/lib/commonjs/entity/openid-connect/issuer/index.js +25 -0
  36. package/lib/commonjs/entity/openid-connect/issuer/index.js.map +1 -0
  37. package/lib/commonjs/entity/openid-connect/issuer/types.js +61 -0
  38. package/lib/commonjs/entity/openid-connect/issuer/types.js.map +1 -0
  39. package/lib/commonjs/{trust → entity/trust}/chain.js +1 -1
  40. package/lib/commonjs/entity/trust/chain.js.map +1 -0
  41. package/lib/commonjs/{trust → entity/trust}/index.js +1 -1
  42. package/lib/commonjs/entity/trust/index.js.map +1 -0
  43. package/lib/commonjs/{trust → entity/trust}/types.js +2 -2
  44. package/lib/commonjs/entity/trust/types.js.map +1 -0
  45. package/lib/commonjs/index.js +1 -3
  46. package/lib/commonjs/index.js.map +1 -1
  47. package/lib/commonjs/pid/sd-jwt/types.js +2 -18
  48. package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
  49. package/lib/commonjs/sd-jwt/__test__/index.test.js +32 -23
  50. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
  51. package/lib/commonjs/sd-jwt/__test__/types.test.js +20 -11
  52. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  53. package/lib/commonjs/sd-jwt/types.js +18 -5
  54. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  55. package/lib/commonjs/utils/error-codes.js +1 -13
  56. package/lib/commonjs/utils/error-codes.js.map +1 -1
  57. package/lib/commonjs/utils/errors.js +2 -53
  58. package/lib/commonjs/utils/errors.js.map +1 -1
  59. package/lib/commonjs/utils/jwk.js +5 -1
  60. package/lib/commonjs/utils/jwk.js.map +1 -1
  61. package/lib/commonjs/utils/par.js +6 -12
  62. package/lib/commonjs/utils/par.js.map +1 -1
  63. package/lib/module/credential/index.js +1 -3
  64. package/lib/module/credential/index.js.map +1 -1
  65. package/lib/module/credential/issuance/02-get-issuer-config.js +42 -0
  66. package/lib/module/credential/issuance/02-get-issuer-config.js.map +1 -0
  67. package/lib/module/credential/issuance/03-start-user-authorization.js +16 -20
  68. package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
  69. package/lib/module/credential/issuance/04-complete-user-authorization.js +8 -8
  70. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  71. package/lib/module/credential/issuance/05-authorize-access.js +8 -9
  72. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  73. package/lib/module/credential/issuance/06-obtain-credential.js +18 -21
  74. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  75. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +3 -3
  76. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  77. package/lib/module/credential/issuance/README.md +18 -21
  78. package/lib/module/credential/issuance/index.js +2 -2
  79. package/lib/module/credential/issuance/index.js.map +1 -1
  80. package/lib/module/credential/issuance/types.js +1 -1
  81. package/lib/module/credential/issuance/types.js.map +1 -1
  82. package/lib/module/credential/presentation/01-start-flow.js +7 -2
  83. package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
  84. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +1 -1
  85. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
  86. package/lib/module/credential/presentation/03-retrieve-jwks.js +61 -0
  87. package/lib/module/credential/presentation/03-retrieve-jwks.js.map +1 -0
  88. package/lib/module/credential/presentation/{03-get-request-object.js → 04-get-request-object.js} +26 -12
  89. package/lib/module/credential/presentation/04-get-request-object.js.map +1 -0
  90. package/lib/module/credential/presentation/{04-send-authorization-response.js → 05-send-authorization-response.js} +1 -1
  91. package/lib/module/credential/presentation/{04-send-authorization-response.js.map → 05-send-authorization-response.js.map} +1 -1
  92. package/lib/module/credential/presentation/README.md +74 -2
  93. package/lib/module/credential/presentation/index.js +4 -3
  94. package/lib/module/credential/presentation/index.js.map +1 -1
  95. package/lib/module/credential/presentation/types.js +5 -3
  96. package/lib/module/credential/presentation/types.js.map +1 -1
  97. package/lib/module/entity/openid-connect/issuer/index.js +20 -0
  98. package/lib/module/entity/openid-connect/issuer/index.js.map +1 -0
  99. package/lib/module/entity/openid-connect/issuer/types.js +47 -0
  100. package/lib/module/entity/openid-connect/issuer/types.js.map +1 -0
  101. package/lib/module/{trust → entity/trust}/chain.js +1 -1
  102. package/lib/module/entity/trust/chain.js.map +1 -0
  103. package/lib/module/{trust → entity/trust}/index.js +1 -1
  104. package/lib/module/entity/trust/index.js.map +1 -0
  105. package/lib/module/{trust → entity/trust}/types.js +2 -2
  106. package/lib/module/entity/trust/types.js.map +1 -0
  107. package/lib/module/index.js +1 -2
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/pid/sd-jwt/types.js +1 -16
  110. package/lib/module/pid/sd-jwt/types.js.map +1 -1
  111. package/lib/module/sd-jwt/__test__/index.test.js +32 -23
  112. package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
  113. package/lib/module/sd-jwt/__test__/types.test.js +20 -11
  114. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  115. package/lib/module/sd-jwt/types.js +16 -4
  116. package/lib/module/sd-jwt/types.js.map +1 -1
  117. package/lib/module/utils/error-codes.js +1 -13
  118. package/lib/module/utils/error-codes.js.map +1 -1
  119. package/lib/module/utils/errors.js +0 -48
  120. package/lib/module/utils/errors.js.map +1 -1
  121. package/lib/module/utils/jwk.js +3 -0
  122. package/lib/module/utils/jwk.js.map +1 -1
  123. package/lib/module/utils/par.js +6 -12
  124. package/lib/module/utils/par.js.map +1 -1
  125. package/lib/typescript/credential/index.d.ts +1 -3
  126. package/lib/typescript/credential/index.d.ts.map +1 -1
  127. package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
  128. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +32 -0
  129. package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +1 -0
  130. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
  131. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
  132. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +8 -8
  133. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  134. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
  135. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  136. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +3 -3
  137. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
  138. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -3
  139. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  140. package/lib/typescript/credential/issuance/index.d.ts +3 -3
  141. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  142. package/lib/typescript/credential/issuance/types.d.ts +4 -9
  143. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  144. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
  145. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +1 -1
  146. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
  147. package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts +41 -0
  148. package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts.map +1 -0
  149. package/lib/typescript/credential/presentation/{03-get-request-object.d.ts → 04-get-request-object.d.ts} +4 -4
  150. package/lib/typescript/credential/presentation/04-get-request-object.d.ts.map +1 -0
  151. package/lib/typescript/credential/presentation/{04-send-authorization-response.d.ts → 05-send-authorization-response.d.ts} +2 -2
  152. package/lib/typescript/credential/presentation/{04-send-authorization-response.d.ts.map → 05-send-authorization-response.d.ts.map} +1 -1
  153. package/lib/typescript/credential/presentation/index.d.ts +5 -4
  154. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  155. package/lib/typescript/credential/presentation/types.d.ts +15 -15
  156. package/lib/typescript/entity/openid-connect/issuer/index.d.ts +12 -0
  157. package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +1 -0
  158. package/lib/typescript/entity/openid-connect/issuer/types.d.ts +641 -0
  159. package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +1 -0
  160. package/lib/typescript/entity/trust/chain.d.ts.map +1 -0
  161. package/lib/typescript/{trust → entity/trust}/index.d.ts +97 -97
  162. package/lib/typescript/entity/trust/index.d.ts.map +1 -0
  163. package/lib/typescript/{trust → entity/trust}/types.d.ts +597 -597
  164. package/lib/typescript/{trust → entity/trust}/types.d.ts.map +1 -1
  165. package/lib/typescript/index.d.ts +1 -2
  166. package/lib/typescript/index.d.ts.map +1 -1
  167. package/lib/typescript/pid/sd-jwt/types.d.ts +25 -103
  168. package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
  169. package/lib/typescript/sd-jwt/index.d.ts +60 -20
  170. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  171. package/lib/typescript/sd-jwt/types.d.ts +114 -24
  172. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  173. package/lib/typescript/utils/error-codes.d.ts +0 -12
  174. package/lib/typescript/utils/error-codes.d.ts.map +1 -1
  175. package/lib/typescript/utils/errors.d.ts +6 -37
  176. package/lib/typescript/utils/errors.d.ts.map +1 -1
  177. package/lib/typescript/utils/jwk.d.ts +135 -0
  178. package/lib/typescript/utils/jwk.d.ts.map +1 -1
  179. package/lib/typescript/utils/par.d.ts +1 -8
  180. package/lib/typescript/utils/par.d.ts.map +1 -1
  181. package/lib/typescript/wallet-instance-attestation/types.d.ts +12 -12
  182. package/package.json +1 -1
  183. package/src/credential/index.ts +1 -4
  184. package/src/credential/issuance/01-start-flow.ts +1 -1
  185. package/src/credential/issuance/02-get-issuer-config.ts +67 -0
  186. package/src/credential/issuance/03-start-user-authorization.ts +22 -30
  187. package/src/credential/issuance/04-complete-user-authorization.ts +11 -13
  188. package/src/credential/issuance/05-authorize-access.ts +8 -10
  189. package/src/credential/issuance/06-obtain-credential.ts +30 -31
  190. package/src/credential/issuance/07-verify-and-parse-credential.ts +6 -6
  191. package/src/credential/issuance/README.md +18 -21
  192. package/src/credential/issuance/index.ts +3 -6
  193. package/src/credential/issuance/types.ts +1 -1
  194. package/src/credential/presentation/01-start-flow.ts +8 -2
  195. package/src/credential/presentation/02-evaluate-rp-trust.ts +2 -2
  196. package/src/credential/presentation/03-retrieve-jwks.ts +73 -0
  197. package/src/credential/presentation/{03-get-request-object.ts → 04-get-request-object.ts} +33 -15
  198. package/src/credential/presentation/{04-send-authorization-response.ts → 05-send-authorization-response.ts} +1 -1
  199. package/src/credential/presentation/README.md +74 -2
  200. package/src/credential/presentation/index.ts +10 -2
  201. package/src/credential/presentation/types.ts +3 -3
  202. package/src/entity/openid-connect/issuer/index.ts +27 -0
  203. package/src/entity/openid-connect/issuer/types.ts +68 -0
  204. package/src/{trust → entity/trust}/chain.ts +2 -2
  205. package/src/{trust → entity/trust}/index.ts +1 -1
  206. package/src/{trust → entity/trust}/types.ts +2 -2
  207. package/src/index.ts +0 -2
  208. package/src/pid/sd-jwt/types.ts +1 -18
  209. package/src/sd-jwt/__test__/index.test.ts +47 -37
  210. package/src/sd-jwt/__test__/types.test.ts +26 -16
  211. package/src/sd-jwt/types.ts +16 -2
  212. package/src/utils/error-codes.ts +0 -12
  213. package/src/utils/errors.ts +12 -86
  214. package/src/utils/jwk.ts +5 -0
  215. package/src/utils/par.ts +3 -10
  216. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -27
  217. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  218. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
  219. package/lib/commonjs/credential/status/01-start-flow.js +0 -2
  220. package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
  221. package/lib/commonjs/credential/status/02-status-attestation.js +0 -72
  222. package/lib/commonjs/credential/status/02-status-attestation.js.map +0 -1
  223. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +0 -52
  224. package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
  225. package/lib/commonjs/credential/status/README.md +0 -67
  226. package/lib/commonjs/credential/status/index.js +0 -27
  227. package/lib/commonjs/credential/status/index.js.map +0 -1
  228. package/lib/commonjs/credential/status/types.js +0 -48
  229. package/lib/commonjs/credential/status/types.js.map +0 -1
  230. package/lib/commonjs/credential/trustmark/README.md +0 -62
  231. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -81
  232. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
  233. package/lib/commonjs/credential/trustmark/index.js +0 -13
  234. package/lib/commonjs/credential/trustmark/index.js.map +0 -1
  235. package/lib/commonjs/trust/chain.js.map +0 -1
  236. package/lib/commonjs/trust/index.js.map +0 -1
  237. package/lib/commonjs/trust/types.js.map +0 -1
  238. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -20
  239. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  240. package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
  241. package/lib/module/credential/status/01-start-flow.js +0 -2
  242. package/lib/module/credential/status/01-start-flow.js.map +0 -1
  243. package/lib/module/credential/status/02-status-attestation.js +0 -64
  244. package/lib/module/credential/status/02-status-attestation.js.map +0 -1
  245. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +0 -46
  246. package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
  247. package/lib/module/credential/status/README.md +0 -67
  248. package/lib/module/credential/status/index.js +0 -5
  249. package/lib/module/credential/status/index.js.map +0 -1
  250. package/lib/module/credential/status/types.js +0 -40
  251. package/lib/module/credential/status/types.js.map +0 -1
  252. package/lib/module/credential/trustmark/README.md +0 -62
  253. package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -72
  254. package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
  255. package/lib/module/credential/trustmark/index.js +0 -3
  256. package/lib/module/credential/trustmark/index.js.map +0 -1
  257. package/lib/module/trust/chain.js.map +0 -1
  258. package/lib/module/trust/index.js.map +0 -1
  259. package/lib/module/trust/types.js.map +0 -1
  260. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
  261. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
  262. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
  263. package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
  264. package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
  265. package/lib/typescript/credential/status/02-status-attestation.d.ts +0 -19
  266. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +0 -1
  267. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +0 -24
  268. package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +0 -1
  269. package/lib/typescript/credential/status/index.d.ts +0 -7
  270. package/lib/typescript/credential/status/index.d.ts.map +0 -1
  271. package/lib/typescript/credential/status/types.d.ts +0 -305
  272. package/lib/typescript/credential/status/types.d.ts.map +0 -1
  273. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
  274. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
  275. package/lib/typescript/credential/trustmark/index.d.ts +0 -4
  276. package/lib/typescript/credential/trustmark/index.d.ts.map +0 -1
  277. package/lib/typescript/trust/chain.d.ts.map +0 -1
  278. package/lib/typescript/trust/index.d.ts.map +0 -1
  279. package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -32
  280. package/src/credential/status/01-start-flow.ts +0 -9
  281. package/src/credential/status/02-status-attestation.ts +0 -102
  282. package/src/credential/status/03-verify-and-parse-status-attestation.ts +0 -60
  283. package/src/credential/status/README.md +0 -67
  284. package/src/credential/status/index.ts +0 -22
  285. package/src/credential/status/types.ts +0 -43
  286. package/src/credential/trustmark/README.md +0 -62
  287. package/src/credential/trustmark/get-credential-trustmark.ts +0 -120
  288. package/src/credential/trustmark/index.ts +0 -8
  289. /package/lib/typescript/{trust → entity/trust}/chain.d.ts +0 -0
@@ -115,55 +115,7 @@ export class WalletProviderResponseError extends UnexpectedStatusCodeError {
115
115
  this.code = params.code ?? WalletProviderResponseErrorCodes.WalletProviderGenericError;
116
116
  }
117
117
  }
118
- /**
119
- * Function to extract the error message from the Entity Configuration's supported error codes.
120
- * @param errorCode The error code to map to a meaningful message
121
- * @param issuerConf The entity configuration for credentials
122
- * @param credentialType The type of credential the error belongs to
123
- * @returns A localized error {@link LocalizedIssuanceError} or undefined
124
- * @throws {IoWalletError} When no credential config is found
125
- */
126
- export function extractErrorMessageFromIssuerConf(errorCode, _ref5) {
127
- let {
128
- issuerConf,
129
- credentialType
130
- } = _ref5;
131
- const credentialConfiguration = issuerConf.openid_credential_issuer.credential_configurations_supported[credentialType];
132
- if (!credentialConfiguration) {
133
- throw new IoWalletError(`No configuration found for ${credentialType} in the provided EC`);
134
- }
135
- const {
136
- issuance_errors_supported
137
- } = credentialConfiguration;
138
- if (!(issuance_errors_supported !== null && issuance_errors_supported !== void 0 && issuance_errors_supported[errorCode])) {
139
- return undefined;
140
- }
141
- const localesList = issuance_errors_supported[errorCode].display;
142
- return localesList.reduce((acc, _ref6) => {
143
- let {
144
- locale,
145
- ...rest
146
- } = _ref6;
147
- return {
148
- ...acc,
149
- [locale]: rest
150
- };
151
- }, {});
152
- }
153
118
 
154
- /**
155
- * Type guard for issuer errors.
156
- * @param error The error to check
157
- * @param code Optional code to narrow down the issuer error
158
- */
159
- export const isIssuerResponseError = (error, code) => error instanceof IssuerResponseError && error.code === (code ?? error.code);
160
-
161
- /**
162
- * Type guard for wallet provider errors.
163
- * @param error The error to check
164
- * @param code Optional code to narrow down the wallet provider error
165
- */
166
- export const isWalletProviderResponseError = (error, code) => error instanceof WalletProviderResponseError && error.code === (code ?? error.code);
167
119
  /**
168
120
  * Builder class used to create specialized errors from type {@link UnexpectedStatusCodeError} that handles multiple status codes.
169
121
  *
@@ -1 +1 @@
1
- {"version":3,"names":["IssuerResponseErrorCodes","WalletProviderResponseErrorCodes","serializeAttrs","attrs","Object","entries","filter","_ref","v","undefined","map","_ref2","k","Array","isArray","join","JSON","stringify","_","IoWalletError","Error","code","constructor","message","name","ValidationFailed","_ref3","claim","reason","UnexpectedStatusCodeError","_ref4","statusCode","IssuerResponseError","params","IssuerGenericError","WalletProviderResponseError","WalletProviderGenericError","extractErrorMessageFromIssuerConf","errorCode","_ref5","issuerConf","credentialType","credentialConfiguration","openid_credential_issuer","credential_configurations_supported","issuance_errors_supported","localesList","display","reduce","acc","_ref6","locale","rest","isIssuerResponseError","error","isWalletProviderResponseError","ResponseErrorBuilder","errorCases","ErrorClass","handle","status","buildFrom","originalError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AAEA,SACEA,wBAAwB,EACxBC,gCAAgC,QAG3B,eAAe;AAEtB,SAASD,wBAAwB,EAAEC,gCAAgC;;AAEnE;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GACzBC,KAA8E,IAE9EC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,MAAM,CAACC,IAAA;EAAA,IAAC,GAAGC,CAAC,CAAC,GAAAD,IAAA;EAAA,OAAKC,CAAC,KAAKC,SAAS;AAAA,EAAC,CAClCC,GAAG,CAACC,KAAA,IAAY;EAAA,IAAX,CAACC,CAAC,EAAEJ,CAAC,CAAC,GAAAG,KAAA;EACV,IAAIE,KAAK,CAACC,OAAO,CAACN,CAAC,CAAC,EAAE,OAAO,C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,GAAG7B;MAAO,CAAC,CAAC;IAC7D;IAEA,OAAO6B,aAAa;EACtB;AACF"}
1
+ {"version":3,"names":["IssuerResponseErrorCodes","WalletProviderResponseErrorCodes","serializeAttrs","attrs","Object","entries","filter","_ref","v","undefined","map","_ref2","k","Array","isArray","join","JSON","stringify","_","IoWalletError","Error","code","constructor","message","name","ValidationFailed","_ref3","claim","reason","UnexpectedStatusCodeError","_ref4","statusCode","IssuerResponseError","params","IssuerGenericError","WalletProviderResponseError","WalletProviderGenericError","ResponseErrorBuilder","errorCases","ErrorClass","handle","status","buildFrom","originalError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":"AACA,SACEA,wBAAwB,EACxBC,gCAAgC,QAG3B,eAAe;AAEtB,SAASD,wBAAwB,EAAEC,gCAAgC;;AAEnE;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GACzBC,KAA8E,IAE9EC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,MAAM,CAACC,IAAA;EAAA,IAAC,GAAGC,CAAC,CAAC,GAAAD,IAAA;EAAA,OAAKC,CAAC,KAAKC,SAAS;AAAA,EAAC,CAClCC,GAAG,CAACC,KAAA,IAAY;EAAA,IAAX,CAACC,CAAC,EAAEJ,CAAC,CAAC,GAAAG,KAAA;EACV,IAAIE,KAAK,CAACC,OAAO,CAACN,CAAC,CAAC,EAAE,OAAO,CAACI,CAAC,EAAG,IAAGJ,CAAC,CAACO,IAAI,CAAC,IAAI,CAAE,GAAE,CAAC;EACrD,IAAI,OAAOP,CAAC,KAAK,QAAQ,EAAE,OAAO,CAACI,CAAC,EAAEI,IAAI,CAACC,SAAS,CAACT,CAAC,CAAC,CAAC;EACxD,OAAO,CAACI,CAAC,EAAEJ,CAAC,CAAC;AACf,CAAC,CAAC,CACDE,GAAG,CAAEQ,CAAC,IAAKA,CAAC,CAACH,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IA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AAGY,MAAM,CAACZ,IAAI,IAAIrB,wBAAwB,CAACkC,kBAAkB;EACxE;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,SAASN,yBAAyB,CAAC;EAIzEP,WAAWA,CAACW,MAKX,EAAE;IACD,KAAK,CAACA,MAAM,CAAC;IACb,IAAI,CAACL,MAAM,GAAGK,MAAM,CAACL,MAAM;IAC3B,IAAI,CAACP,IAAI,GACPY,MAAM,CAACZ,IAAI,IACXpB,gCAAgC,CAACmC,0BAA0B;EAC/D;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,CAA6C;EACpEC,UAAU,GAEd,CAAC,CAAC;EAENhB,WAAWA,CAASiB,UAAa,EAAE;IAAA,KAAfA,UAAa,GAAbA,UAAa;EAAG;EAEpCC,MAAMA,CAACC,MAAoB,EAAER,MAAoB,EAAE;IACjD,IAAI,CAACK,UAAU,CAACG,MAAM,CAAC,GAAGR,MAAM;IAChC,OAAO,IAAI;EACb;EAEAS,SAASA,CAACC,aAAwC,EAAE;IAClD,MAAMV,MAAM,GACV,IAAI,CAACK,UAAU,CAACK,aAAa,CAACZ,UAAU,CAAC,IAAI,IAAI,CAACO,UAAU,CAAC,GAAG,CAAC;IAEnE,IAAIL,MAAM,EAAE;MACV,OAAO,IAAI,IAAI,CAACM,UAAU,CAAC;QAAE,GAAGI,aAAa;QAAE,GAAGV;MAAO,CAAC,CAAC;IAC7D;IAEA,OAAOU,aAAa;EACtB;AACF"}
@@ -69,4 +69,7 @@ export function fixBase64EncodingOnKey(key) {
69
69
  } : {})
70
70
  };
71
71
  }
72
+ export const JWKS = z.object({
73
+ keys: z.array(JWK)
74
+ });
72
75
  //# sourceMappingURL=jwk.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["removePadding","z","JWK","object","alg","string","optional","crv","d","dp","dq","e","ext","boolean","k","key_ops","array","kid","kty","union","literal","n","p","q","qi","use","x","y","x5c","x5t","x5u","fixBase64EncodingOnKey","key","pk"],"sourceRoot":"../../../src","sources":["utils/jwk.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,CAAC,QAAQ,KAAK;AAGvB,OAAO,MAAMC,GAAG,GAAGD,CAAC,CAACE,MAAM,CAAC;EAC1B;EACAC,GAAG,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BC,GAAG,EAAEN,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BE,CAAC,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACxBG,EAAE,EAAER,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzBI,EAAE,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzBK,CAAC,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACxB;EACAM,GAAG,EAAEX,CAAC,CAACY,OAAO,CAAC,CAAC,CAACP,QAAQ,CAAC,CAAC;EAC3BQ,CAAC,EAAEb,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACxB;EACAS,OAAO,EAAEd,CAAC,CAACe,KAAK,CAACf,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACvC;EACAW,GAAG,EAAEhB,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1B;AACF;AACA;EACEY,GAAG,EAAEjB,CAAC,CAACkB,KAAK,CAAC,CAAClB,CAAC,CAACmB,OAAO,CAAC,KAAK,CAAC,EAAEnB,CAAC,CAACmB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;EACjDC,CAAC,EAAEpB,CAAC,CAACI,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C,GAAG;MAAEA,CAAC,EAAE3B,aAAa,CAAC2B,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,IAAIhB,CAAC,GAAG;MAAEA,CAAC,EAAEX,aAAa,CAACW,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,IAAIU,CAAC,GAAG;MAAEA,CAAC,EAAErB,aAAa,CAACqB,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC;EACtC,CAAC;AACH"}
1
+ {"version":3,"names":["removePadding","z","JWK","object","alg","string","optional","crv","d","dp","dq","e","ext","boolean","k","key_ops","array","kid","kty","union","literal","n","p","q","qi","use","x","y","x5c","x5t","x5u","fixBase64EncodingOnKey","key","pk","JWKS","keys"],"sourceRoot":"../../../src","sources":["utils/jwk.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,CAAC,QAAQ,KAAK;AAGvB,OAAO,MAAMC,GAAG,GAAGD,CAAC,CAACE,MAAM,CAAC;EAC1B;EACAC,GAAG,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BC,GAAG,EAAEN,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC1BE,CAAC,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACxBG,EAAE,EAAER,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzBI,EAAE,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACzBK,CAAC,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACxB;EACAM,GAAG,EAAEX,CAAC,CAACY,OAAO,CAAC,CAAC,CAACP,QAAQ,CAAC,CAAC;EAC3BQ,CAAC,EAAEb,CAAC,CAACI,MAAM,CAAC,CAAC,CAACC,QAAQ,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ACI,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC3B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASyB,sBAAsBA,CAACC,GAAQ,EAAO;EACpD,MAAM;IAAEN,CAAC;IAAEC,CAAC;IAAEhB,CAAC;IAAEU,CAAC;IAAE,GAAGY;EAAG,CAAC,GAAGD,GAAG;EAEjC,OAAO;IACL,GAAGC,EAAE;IACL,IAAIP,CAAC,GAAG;MAAEA,CAAC,EAAE1B,aAAa,CAAC0B,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,IAAIC,CAAC,GAAG;MAAEA,CAAC,EAAE3B,aAAa,CAAC2B,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,IAAIhB,CAAC,GAAG;MAAEA,CAAC,EAAEX,aAAa,CAACW,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,IAAIU,CAAC,GAAG;MAAEA,CAAC,EAAErB,aAAa,CAACqB,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC;EACtC,CAAC;AACH;AAGA,OAAO,MAAMa,IAAI,GAAGjC,CAAC,CAACE,MAAM,CAAC;EAC3BgC,IAAI,EAAElC,CAAC,CAACe,KAAK,CAACd,GAAG;AACnB,CAAC,CAAC"}
@@ -7,7 +7,6 @@ import { createPopToken } from "./pop";
7
7
  import { IssuerResponseError } from "./errors";
8
8
  export const AuthorizationDetail = z.object({
9
9
  credential_configuration_id: z.string(),
10
- format: z.union([z.literal("vc+sd-jwt"), z.literal("vc+mdoc-cbor")]),
11
10
  type: z.literal("openid_credential")
12
11
  });
13
12
  export const AuthorizationDetails = z.array(AuthorizationDetail);
@@ -20,7 +19,7 @@ export const makeParRequest = _ref => {
20
19
  wiaCryptoContext,
21
20
  appFetch
22
21
  } = _ref;
23
- return async (clientId, codeVerifier, redirectUri, responseMode, parEndpoint, walletInstanceAttestation, authorizationDetails, assertionType) => {
22
+ return async (clientId, codeVerifier, redirectUri, responseMode, parEndpoint, walletInstanceAttestation, authorizationDetails) => {
24
23
  const wiaPublicKey = await wiaCryptoContext.getPublicKey();
25
24
  const parUrl = new URL(parEndpoint);
26
25
  const aud = `${parUrl.protocol}//${parUrl.hostname}`;
@@ -55,26 +54,21 @@ export const makeParRequest = _ref => {
55
54
  code_challenge: codeChallenge,
56
55
  code_challenge_method: codeChallengeMethod,
57
56
  authorization_details: authorizationDetails,
58
- redirect_uri: redirectUri,
59
- client_assertion_type: assertionType,
60
- client_assertion: walletInstanceAttestation + "~" + signedWiaPoP
57
+ redirect_uri: redirectUri
61
58
  }).setIssuedAt() //iat is set to now
62
59
  .setExpirationTime("5min").sign();
63
60
 
64
61
  /** The request body for the Pushed Authorization Request */
65
62
  var formBody = new URLSearchParams({
66
- response_type: "code",
67
63
  client_id: clientId,
68
- code_challenge: codeChallenge,
69
- code_challenge_method: "S256",
70
- request: signedJwtForPar,
71
- client_assertion_type: assertionType,
72
- client_assertion: walletInstanceAttestation + "~" + signedWiaPoP
64
+ request: signedJwtForPar
73
65
  });
74
66
  return await appFetch(parEndpoint, {
75
67
  method: "POST",
76
68
  headers: {
77
- "Content-Type": "application/x-www-form-urlencoded"
69
+ "Content-Type": "application/x-www-form-urlencoded",
70
+ "OAuth-Client-Attestation": walletInstanceAttestation,
71
+ "OAuth-Client-Attestation-PoP": signedWiaPoP
78
72
  },
79
73
  body: formBody.toString()
80
74
  }).then(hasStatusOrThrow(201, IssuerResponseError)).then(res => res.json()).then(result => result.request_uri);
@@ -1 +1 @@
1
- {"version":3,"names":["sha256ToBase64","SignJWT","uuid","z","WalletInstanceAttestation","generateRandomAlphaNumericString","hasStatusOrThrow","createPopToken","IssuerResponseError","AuthorizationDetail","object","credential_configuration_id","string","format","union","literal","type","AuthorizationDetails","array","makeParRequest","_ref","wiaCryptoContext","appFetch","clientId","codeVerifier","redirectUri","responseMode","parEndpoint","walletInstanceAttestation","authorizationDetails","assertionType","wiaPublicKey","getPublicKey","parUrl","URL","aud","protocol","hostname","iss","decode","payload","cnf","jwk","kid","signedWiaPoP","jti","v4","codeChallengeMethod","codeChallenge","signedJwtForPar","setProtectedHeader","typ","setPayload","response_type","response_mode","client_id","state","code_challenge","code_challenge_method","authorization_details","redirect_uri","client_assertion_type","client_assertion","setIssuedAt","setExpirationTime","sign","formBody","URLSearchParams","request","method","headers","body","toString","then","res","json","result","request_uri"],"sourceRoot":"../../../src","sources":["utils/par.ts"],"mappings":"AAAA,SACEA,cAAc,EAEdC,OAAO,QACF,6BAA6B;AACpC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;AAC3E,SAASC,gCAAgC,EAAEC,gBAAgB,QAAQ,QAAQ;AAC3E,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,mBAAmB,QAAQ,UAAU;AAG9C,OAAO,MAAMC,mBAAmB,GAAGN,CAAC,CAACO,MAAM,CAAC;EAC1CC,2BAA2B,EAAER,CAAC,CAACS,MAAM,CAAC,CAAC;EACvCC,MAAM,EAAEV,CAAC,CAACW,KAAK,CAAC,CAACX,CAAC,CAACY,OAAO,CAAC,WAAW,CAAC,EAAEZ,CAAC,CAACY,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;EACpEC,IAAI,EAAEb,CAAC,CAACY,OAAO,CAAC,mBAAmB;AACrC,CAAC,CAAC;AAGF,OAAO,MAAME,oBAAoB,GAAGd,CAAC,CAACe,KAAK,CAACT,mBAAmB,CAAC;;AAEhE;AACA;AACA;AACA,OAAO,MAAMU,cAAc,GACzBC,IAAA;EAAA,IAAC;IACCC,gBAAgB;IAChBC;EAIF,CAAC,GAAAF,IAAA;EAAA,OACD,OACEG,QAAgB,EAChBC,YAAoB,EACpBC,WAAmB,EACnBC,YAAoB,EACpBC,WAAmB,EACnBC,yBAAiC,EACjCC,oBAA0C,EAC1CC,aAAqB,KACD;IACpB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IACtD,CAAC,CAAC,CACDmB,WAAW,CAAC,CAAC,CAAC;IAAA,CACdC,iBAAiB,CAAC,MAAM,CAAC,CACzBC,IAAI,CAAC,CAAC;;IAET;IACA,IAAIC,QAAQ,GAAG,IAAIC,eAAe,CAAC;MACjCd,aAAa,EAAE,MAAM;MACrBE,SAAS,EAAEhC,QAAQ;MACnBkC,cAAc,EAAET,aAAa;MAC7BU,qBAAqB,EAAE,MAAM;MAC7BU,OAAO,EAAEnB,eAAe;MACxBY,qBAAqB,EAAE/B,aAAa;MACpCgC,gBAAgB,EAAElC,yBAAyB,GAAG,GAAG,GAAGgB;IACtD,CAAC,CAAC;IAEF,OAAO,MAAMtB,QAAQ,CAACK,WAAW,EAAE;MACjC0C,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,IAAI,EAAEL,QAAQ,CAACM,QAAQ,CAAC;IAC1B,CAAC,CAAC,CACCC,IAAI,CAACnE,gBAAgB,CAAC,GAAG,EAAEE,mBAAmB,CAAC,CAAC,CAChDiE,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAAEG,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC;EACzC,CAAC;AAAA"}
1
+ {"version":3,"names":["sha256ToBase64","SignJWT","uuid","z","WalletInstanceAttestation","generateRandomAlphaNumericString","hasStatusOrThrow","createPopToken","IssuerResponseError","AuthorizationDetail","object","credential_configuration_id","string","type","literal","AuthorizationDetails","array","makeParRequest","_ref","wiaCryptoContext","appFetch","clientId","codeVerifier","redirectUri","responseMode","parEndpoint","walletInstanceAttestation","authorizationDetails","wiaPublicKey","getPublicKey","parUrl","URL","aud","protocol","hostname","iss","decode","payload","cnf","jwk","kid","signedWiaPoP","jti","v4","codeChallengeMethod","codeChallenge","signedJwtForPar","setProtectedHeader","typ","setPayload","response_type","response_mode","client_id","state","code_challenge","code_challenge_method","authorization_details","redirect_uri","setIssuedAt","setExpirationTime","sign","formBody","URLSearchParams","request","method","headers","body","toString","then","res","json","result","request_uri"],"sourceRoot":"../../../src","sources":["utils/par.ts"],"mappings":"AAAA,SACEA,cAAc,EAEdC,OAAO,QACF,6BAA6B;AACpC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;AAC3E,SAASC,gCAAgC,EAAEC,gBAAgB,QAAQ,QAAQ;AAC3E,SAASC,cAAc,QAAQ,OAAO;AACtC,SAASC,mBAAmB,QAAQ,UAAU;AAG9C,OAAO,MAAMC,mBAAmB,GAAGN,CAAC,CAACO,MAAM,CAAC;EAC1CC,2BAA2B,EAAER,CAAC,CAACS,MAAM,CAAC,CAAC;EACvCC,IAAI,EAAEV,CAAC,CAACW,OAAO,CAAC,mBAAmB;AACrC,CAAC,CAAC;AAGF,OAAO,MAAMC,oBAAoB,GAAGZ,CAAC,CAACa,KAAK,CAACP,mBAAmB,CAAC;;AAEhE;AACA;AACA;AACA,OAAO,MAAMQ,cAAc,GACzBC,IAAA;EAAA,IAAC;IACCC,gBAAgB;IAChBC;EAIF,CAAC,GAAAF,IAAA;EAAA,OACD,OACEG,QAAgB,EAChBC,YAAoB,EACpBC,WAAmB,EACnBC,YAAoB,EACpBC,WAAmB,EACnBC,yBAAiC,EACjCC,oBAA0C,KACtB;IACpB,MAAMC,YAAY,GAAG,MAAMT,gBAAgB,CAACU,YAAY,CAAC,CAAC;IAE1D,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAACN,WAAW,CAAC;IACnC,MAAMO,GAAG,GAAI,GAAEF,MAAM,CAACG,QAAS,KAAIH,MAAM,CAACI,QAAS,EAAC;IAEpD,MAAMC,GAAG,GAAG/B,yBAAyB,CAACgC,MAAM,CAACV,yBAAyB,CAAC,CACpEW,OAAO,CAACC,GAAG,CAACC,GAAG,CAACC,GAAG;IAEtB,MAAMC,YAAY,GAAG,MAA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AAQ,CAAC;IAC1B,CAAC,CAAC,CACCC,IAAI,CAAC9D,gBAAgB,CAAC,GAAG,EAAEE,mBAAmB,CAAC,CAAC,CAChD4D,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAAEG,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC;EACzC,CAAC;AAAA"}
@@ -1,6 +1,4 @@
1
1
  import * as Issuance from "./issuance";
2
2
  import * as Presentation from "./presentation";
3
- import * as Status from "./status";
4
- import * as Trustmark from "./trustmark";
5
- export { Issuance, Presentation, Status, Trustmark };
3
+ export { Issuance, Presentation };
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/credential/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * WARNING: This is the first function to be called in the issuing flow. The next function to be called is {@link evaluateIssuerTrust}.
2
+ * WARNING: This is the first function to be called in the issuing flow. The next function to be called is {@link getIssuerConfig}.
3
3
  * The beginning of the issuing flow.
4
4
  * To be implemented accordind to the user touchpoint
5
5
  *
@@ -0,0 +1,32 @@
1
+ import type { StartFlow } from "./01-start-flow";
2
+ import type { Out } from "../../utils/misc";
3
+ import type { JWK } from "src/utils/jwk";
4
+ import type { CredentialConfigurationSupported } from "../../entity/openid-connect/issuer/types";
5
+ export type GetIssuerConfig = (issuerUrl: Out<StartFlow>["issuerUrl"], context?: {
6
+ appFetch?: GlobalFetch["fetch"];
7
+ }) => Promise<{
8
+ issuerConf: IssuerConfig;
9
+ }>;
10
+ /**
11
+ * Common configuration for the issuer.
12
+ * This is needed to have a common configuration for the issuer to be used in our flows.
13
+ * It allows to support multiple issuers with different configurations, defining a common interface to interact with them.
14
+ */
15
+ export type IssuerConfig = {
16
+ credential_configurations_supported: CredentialConfigurationSupported;
17
+ pushed_authorization_request_endpoint: string;
18
+ authorization_endpoint: string;
19
+ token_endpoint: string;
20
+ credential_endpoint: string;
21
+ keys: Array<JWK>;
22
+ };
23
+ /**
24
+ * WARNING: This function must be called after {@link startFlow}. The next function to be called is {@link startUserAuthorization}.
25
+ * Get the Issuer's configuration from the Issuer's metadata.
26
+ * Currently it only supports a mixed configuration based on OpenID Connect partial implementation.
27
+ * @param issuerUrl The base url of the Issuer returned by {@link startFlow}
28
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
29
+ * @returns The Issuer's configuration
30
+ */
31
+ export declare const getIssuerConfig: GetIssuerConfig;
32
+ //# sourceMappingURL=02-get-issuer-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"02-get-issuer-config.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/02-get-issuer-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAEjG,MAAM,MAAM,eAAe,GAAG,CAC5B,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EACtC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IAAE,UAAU,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,mCAAmC,EAAE,gCAAgC,CAAC;IACtE,qCAAqC,EAAE,MAAM,CAAC;IAC9C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,eAS7B,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import { type Out } from "../../utils/misc";
3
- import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
3
  import type { StartFlow } from "./01-start-flow";
5
4
  import { AuthorizationDetail } from "../../utils/par";
6
- export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credentialType: Out<StartFlow>["credentialType"], context: {
5
+ import type { GetIssuerConfig } from "./02-get-issuer-config";
6
+ export type StartUserAuthorization = (issuerConf: Out<GetIssuerConfig>["issuerConf"], credentialType: Out<StartFlow>["credentialType"], context: {
7
7
  wiaCryptoContext: CryptoContext;
8
8
  walletInstanceAttestation: string;
9
9
  redirectUri: string;
@@ -15,7 +15,7 @@ export type StartUserAuthorization = (issuerConf: Out<EvaluateIssuerTrust>["issu
15
15
  credentialDefinition: AuthorizationDetail;
16
16
  }>;
17
17
  /**
18
- * WARNING: This function must be called after {@link evaluateIssuerTrust} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
18
+ * WARNING: This function must be called after {@link getIssuerConfig} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
19
19
  * Creates and sends a PAR request to the /as/par endpoint of the authorization server.
20
20
  * This starts the authentication flow to obtain an access token.
21
21
  * This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer.
@@ -1 +1 @@
1
- {"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAGtE,MAAM,MAAM,sBAAsB,GAAG,CACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,cAAc,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,mBAAmB,CAAC;CAC3C,CAAC,CAAC;AAyDH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBAmCpC,CAAC"}
1
+ {"version":3,"file":"03-start-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/03-start-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAoC,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,MAAM,sBAAsB,GAAG,CACnC,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,cAAc,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,EAChD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,mBAAmB,CAAC;CAC3C,CAAC,CAAC;AAoDH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBAiCpC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { type AuthorizationResult } from "../../utils/auth";
2
2
  import { type Out } from "../../utils/misc";
3
3
  import type { StartUserAuthorization } from "./03-start-user-authorization";
4
- import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
4
+ import type { GetIssuerConfig } from "./02-get-issuer-config";
5
5
  import { type CryptoContext } from "@pagopa/io-react-native-jwt";
6
6
  import { RequestObject } from "../presentation/types";
7
7
  /**
8
- * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
8
+ * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a urn:eu.europa.ec.eudi:pid:1.
9
9
  */
10
10
  export type CompleteUserAuthorizationWithQueryMode = (authRedirectUrl: string) => Promise<AuthorizationResult>;
11
11
  export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<GetRequestedCredentialToBePresented>, context: {
@@ -15,8 +15,8 @@ export type CompleteUserAuthorizationWithFormPostJwtMode = (requestObject: Out<G
15
15
  walletInstanceAttestation: string;
16
16
  appFetch?: GlobalFetch["fetch"];
17
17
  }) => Promise<AuthorizationResult>;
18
- export type GetRequestedCredentialToBePresented = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], appFetch?: GlobalFetch["fetch"]) => Promise<RequestObject>;
19
- export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], idpHint: string) => Promise<{
18
+ export type GetRequestedCredentialToBePresented = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<GetIssuerConfig>["issuerConf"], appFetch?: GlobalFetch["fetch"]) => Promise<RequestObject>;
19
+ export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorization>["issuerRequestUri"], clientId: Out<StartUserAuthorization>["clientId"], issuerConf: Out<GetIssuerConfig>["issuerConf"], idpHint: string) => Promise<{
20
20
  authUrl: string;
21
21
  }>;
22
22
  /**
@@ -24,14 +24,14 @@ export type BuildAuthorizationUrl = (issuerRequestUri: Out<StartUserAuthorizatio
24
24
  * Builds the authorization URL to which the end user should be redirected to continue the authentication flow.
25
25
  * @param issuerRequestUri the URI of the issuer where the request is sent
26
26
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
27
- * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
27
+ * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
28
28
  * @param idpHint Unique identifier of the IDP selected by the user
29
29
  * @returns An object containing the authorization URL
30
30
  */
31
31
  export declare const buildAuthorizationUrl: BuildAuthorizationUrl;
32
32
  /**
33
33
  * WARNING: This function must be called after obtaining the authorization redirect URL from the webviews (SPID and CIE L3) or browser for CIEID.
34
- * Complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
34
+ * Complete User authorization via strong identification when the response mode is "query" and the request credential is a urn:eu.europa.ec.eudi:pid:1.
35
35
  * This function parses the authorization redirect URL to extract the authorization response.
36
36
  * @param authRedirectUrl The URL to which the end user should be redirected to start the authentication flow
37
37
  * @returns the authorization response which contains code, state and iss
@@ -44,7 +44,7 @@ export declare const completeUserAuthorizationWithQueryMode: CompleteUserAuthori
44
44
  * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
45
45
  * @param issuerRequestUri the URI of the issuer where the request is sent
46
46
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
47
- * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
47
+ * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
48
48
  * @param appFetch (optional) fetch api implementation. Default: built-in fetch
49
49
  * @throws {ValidationFailed} if an error while validating the response
50
50
  * @returns the request object which contains the credential to be presented in order to obtain the requested credential
@@ -57,7 +57,7 @@ export declare const getRequestedCredentialToBePresented: GetRequestedCredential
57
57
  * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
58
58
  * @param issuerRequestUri the URI of the issuer where the request is sent
59
59
  * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
60
- * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
60
+ * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
61
61
  * @param context.walletInstanceAccestation the Wallet Instance's attestation to be presented
62
62
  * @param context.pid the PID to be presented
63
63
  * @param context.wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
@@ -1 +1 @@
1
- {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAAG,CACnD,eAAe,EAAE,MAAM,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,4CAA4C,GAAG,CACzD,aAAa,EAAE,GAAG,CAAC,mCAAmC,CAAC,EACvD,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElC,MAAM,MAAM,mCAAmC,GAAG,CAChD,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAC5B,OAAO,CAAC,aAAa,CAAC,CAAC;AAE5B,MAAM,MAAM,qBAAqB,GAAG,CAClC,gBAAgB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,kBAAkB,CAAC,EACjE,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAAE,qBAkBnC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sCAAsC,EAAE,sCAKlD,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mCAAmC,EAAE,mCAyB/C,CAAC;AAEJ;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAuGxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAaF,CAAC"}
1
+ {"version":3,"file":"04-complete-user-authorization.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/04-complete-user-authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAG5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAMtD;;GAEG;AACH,MAAM,MAAM,sCAAsC,G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;;;;;;;;GAeG;AACH,eAAO,MAAM,4CAA4C,EAAE,4CAuGxD,CAAC;AAEJ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,YAC5B,OAAO,KACf,mBAaF,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type Out } from "../../utils/misc";
2
- import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
2
+ import type { GetIssuerConfig } from "./02-get-issuer-config";
3
3
  import type { StartUserAuthorization } from "./03-start-user-authorization";
4
4
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
5
5
  import { TokenResponse } from "./types";
6
6
  import type { CompleteUserAuthorizationWithQueryMode } from "./04-complete-user-authorization";
7
- export type AuthorizeAccess = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], code: Out<CompleteUserAuthorizationWithQueryMode>["code"], redirectUri: string, clientId: Out<StartUserAuthorization>["clientId"], codeVerifier: Out<StartUserAuthorization>["codeVerifier"], context: {
7
+ export type AuthorizeAccess = (issuerConf: Out<GetIssuerConfig>["issuerConf"], code: Out<CompleteUserAuthorizationWithQueryMode>["code"], redirectUri: string, clientId: Out<StartUserAuthorization>["clientId"], codeVerifier: Out<StartUserAuthorization>["codeVerifier"], context: {
8
8
  walletInstanceAttestation: string;
9
9
  appFetch?: GlobalFetch["fetch"];
10
10
  wiaCryptoContext: CryptoContext;
@@ -17,7 +17,7 @@ export type AuthorizeAccess = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"
17
17
  * for requesting the issuance of an access token bound to the public key of the Wallet Instance contained within the DPoP.
18
18
  * This enables the Wallet Instance to request a digital credential.
19
19
  * The DPoP Proof JWT is generated according to the section 4.3 of the DPoP RFC 9449 specification.
20
- * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
20
+ * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
21
21
  * @param code The authorization code returned by {@link completeUserAuthorizationWithQueryMode} or {@link completeUserAuthorizationWithFormPost}
22
22
  * @param redirectUri The redirect URI which is the custom URL scheme that the Wallet Instance is registered to handle
23
23
  * @param clientId The client id returned by {@link startUserAuthorization}
@@ -1 +1 @@
1
- {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,eAyE7B,CAAC"}
1
+ {"version":3,"file":"05-authorize-access.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/05-authorize-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,kCAAkC,CAAC;AAE/F,MAAM,MAAM,eAAe,GAAG,CAC5B,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,IAAI,EAAE,GAAG,CAAC,sCAAsC,CAAC,CAAC,MAAM,CAAC,EACzD,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,YAAY,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,cAAc,CAAC,EACzD,OAAO,EAAE;IACP,yBAAyB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,EAAE,aAAa,CAAC;IAChC,iBAAiB,EAAE,aAAa,CAAC;CAClC,KACE,OAAO,CAAC;IAAE,WAAW,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,eAwE7B,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import type { AuthorizeAccess } from "./05-authorize-access";
3
- import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
+ import type { GetIssuerConfig } from "./02-get-issuer-config";
4
4
  import { type Out } from "../../utils/misc";
5
5
  import type { StartUserAuthorization } from "./03-start-user-authorization";
6
6
  import { CredentialResponse } from "./types";
7
- export type ObtainCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], clientId: Out<StartUserAuthorization>["clientId"], credentialDefinition: Out<StartUserAuthorization>["credentialDefinition"], context: {
7
+ export type ObtainCredential = (issuerConf: Out<GetIssuerConfig>["issuerConf"], accessToken: Out<AuthorizeAccess>["accessToken"], clientId: Out<StartUserAuthorization>["clientId"], credentialDefinition: Out<StartUserAuthorization>["credentialDefinition"], context: {
8
8
  dPopCryptoContext: CryptoContext;
9
9
  credentialCryptoContext: CryptoContext;
10
10
  appFetch?: GlobalFetch["fetch"];
@@ -16,7 +16,7 @@ export declare const createNonceProof: (nonce: string, issuer: string, audience:
16
16
  * of the Credential Issuer to request the issuance of a credential linked to the public key contained in the JWT proof.
17
17
  * The Openid4vci proof JWT incapsulates the nonce extracted from the token response from the {@link authorizeAccess} step.
18
18
  * The credential request is sent to the Credential Endpoint of the Credential Issuer via HTTP POST with the type of the credential, its format, the access token and the JWT proof.
19
- * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
19
+ * @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
20
20
  * @param accessToken The access token response returned by {@link authorizeAccess}
21
21
  * @param clientId The client id returned by {@link startUserAuthorization}
22
22
  * @param credentialDefinition The credential definition of the credential to be obtained returned by {@link startUserAuthorization}
@@ -1 +1 @@
1
- {"version":3,"file":"06-obtain-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/06-obtain-credential.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+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,YAAY,CAAC,EAC9C,WAAW,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,EAChD,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,EACjD,oBAAoB,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,EACzE,OAAO,EAAE;IACP,iBAAiB,EAAE,aAAa,CAAC;IACjC,uBAAuB,EAAE,aAAa,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC,eAAO,MAAM,gBAAgB,UACpB,MAAM,UACL,MAAM,YACJ,MAAM,OACX,aAAa,KACjB,QAAQ,MAAM,CAehB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAoG9B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { CryptoContext } from "@pagopa/io-react-native-jwt";
2
2
  import type { Out } from "../../utils/misc";
3
- import type { EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
3
+ import type { GetIssuerConfig } from "./02-get-issuer-config";
4
4
  import type { ObtainCredential } from "./06-obtain-credential";
5
- export type VerifyAndParseCredential = (issuerConf: Out<EvaluateIssuerTrust>["issuerConf"], credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"], context: {
5
+ export type VerifyAndParseCredential = (issuerConf: Out<GetIssuerConfig>["issuerConf"], credential: Out<ObtainCredential>["credential"], format: Out<ObtainCredential>["format"], context: {
6
6
  credentialCryptoContext: CryptoContext;
7
7
  /**
8
8
  * Do not throw an error when an attribute is not found within disclosures.
@@ -27,7 +27,7 @@ string, {
27
27
  }>;
28
28
  /**
29
29
  * Verify and parse an encoded credential.
30
- * @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
30
+ * @param issuerConf The Issuer configuration returned by {@link getIssuerConfig}
31
31
  * @param credential The encoded credential returned by {@link obtainCredential}
32
32
  * @param format The format of the credentual returned by {@link obtainCredential}
33
33
  * @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
@@ -1 +1 @@
1
- {"version":3,"file":"07-verify-and-parse-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-verify-and-parse-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC,YAAY,CAAC,EAClD,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EACvC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAGH,KAAK,gBAAgB,GAAG,MAAM;AAC5B,oBAAoB;AACpB,MAAM,EACN;IACE,2CAA2C;IAC3C,IAAI,EACA,yBAAyB,CAAC,MAAM,CAC9B,MAAM,EACN,MAAM,CACP,GACD,4BAA4B,CAAC,MAAM,GACnC,SAAS,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAkLF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBAgBtC,CAAC"}
1
+ {"version":3,"file":"07-verify-and-parse-credential.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/07-verify-and-parse-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAM9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,EAC9C,UAAU,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,EAC/C,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,EACvC,OAAO,EAAE;IACP,uBAAuB,EAAE,aAAa,CAAC;IACvC;;OAEG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC,KACE,OAAO,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;CAC5B,CAAC,CAAC;AAGH,KAAK,gBAAgB,GAAG,MAAM;AAC5B,oBAAoB;AACpB,MAAM,EACN;IACE,2CAA2C;IAC3C,IAAI,EACA,yBAAyB,CAAC,MAAM,CAC9B,MAAM,EACN,MAAM,CACP,GACD,4BAA4B,CAAC,MAAM,GACnC,SAAS,CAAC;IACd,wCAAwC;IACxC,KAAK,EAAE,OAAO,CAAC;CAChB,CACF,CAAC;AAkLF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,EAAE,wBAgBtC,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { type StartFlow } from "./01-start-flow";
2
- import { evaluateIssuerTrust, type EvaluateIssuerTrust } from "./02-evaluate-issuer-trust";
2
+ import { getIssuerConfig, type GetIssuerConfig } from "./02-get-issuer-config";
3
3
  import { startUserAuthorization, type StartUserAuthorization } from "./03-start-user-authorization";
4
4
  import { completeUserAuthorizationWithQueryMode, completeUserAuthorizationWithFormPostJwtMode, parseAuthorizationResponse, buildAuthorizationUrl, type CompleteUserAuthorizationWithQueryMode, type CompleteUserAuthorizationWithFormPostJwtMode, type GetRequestedCredentialToBePresented, type BuildAuthorizationUrl, getRequestedCredentialToBePresented } from "./04-complete-user-authorization";
5
5
  import { authorizeAccess, type AuthorizeAccess } from "./05-authorize-access";
6
6
  import { obtainCredential, type ObtainCredential } from "./06-obtain-credential";
7
7
  import { verifyAndParseCredential, type VerifyAndParseCredential } from "./07-verify-and-parse-credential";
8
8
  import * as Errors from "./errors";
9
- export { evaluateIssuerTrust, startUserAuthorization, buildAuthorizationUrl, completeUserAuthorizationWithQueryMode, getRequestedCredentialToBePresented, completeUserAuthorizationWithFormPostJwtMode, authorizeAccess, obtainCredential, verifyAndParseCredential, parseAuthorizationResponse, Errors, };
10
- export type { StartFlow, EvaluateIssuerTrust, StartUserAuthorization, BuildAuthorizationUrl, CompleteUserAuthorizationWithQueryMode, GetRequestedCredentialToBePresented, CompleteUserAuthorizationWithFormPostJwtMode, AuthorizeAccess, ObtainCredential, VerifyAndParseCredential, };
9
+ export { getIssuerConfig, startUserAuthorization, buildAuthorizationUrl, completeUserAuthorizationWithQueryMode, getRequestedCredentialToBePresented, completeUserAuthorizationWithFormPostJwtMode, authorizeAccess, obtainCredential, verifyAndParseCredential, parseAuthorizationResponse, Errors, };
10
+ export type { StartFlow, GetIssuerConfig, StartUserAuthorization, BuildAuthorizationUrl, CompleteUserAuthorizationWithQueryMode, GetRequestedCredentialToBePresented, CompleteUserAuthorizationWithFormPostJwtMode, AuthorizeAccess, ObtainCredential, VerifyAndParseCredential, };
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,EACtC,4CAA4C,EAC5C,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,mCAAmC,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EACL,sBAAsB,EACtB,KAAK,sBAAsB,EAC5B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sCAAsC,EACtC,4CAA4C,EAC5C,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,sCAAsC,EAC3C,KAAK,4CAA4C,EACjD,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,mCAAmC,EACpC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,GACP,CAAC;AACF,YAAY,EACV,SAAS,EACT,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,sCAAsC,EACtC,mCAAmC,EACnC,4CAA4C,EAC5C,eAAe,EACf,gBAAgB,EAChB,wBAAwB,GACzB,CAAC"}
@@ -2,19 +2,16 @@ import * as z from "zod";
2
2
  export type TokenResponse = z.infer<typeof TokenResponse>;
3
3
  export declare const TokenResponse: z.ZodObject<{
4
4
  access_token: z.ZodString;
5
- authorization_details: z.ZodArray<z.ZodObject<{
5
+ authorization_details: z.ZodObject<{
6
6
  credential_configuration_id: z.ZodString;
7
- format: z.ZodUnion<[z.ZodLiteral<"vc+sd-jwt">, z.ZodLiteral<"vc+mdoc-cbor">]>;
8
7
  type: z.ZodLiteral<"openid_credential">;
9
8
  }, "strip", z.ZodTypeAny, {
10
9
  type: "openid_credential";
11
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
12
10
  credential_configuration_id: string;
13
11
  }, {
14
12
  type: "openid_credential";
15
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
16
13
  credential_configuration_id: string;
17
- }>, "many">;
14
+ }>;
18
15
  c_nonce: z.ZodString;
19
16
  c_nonce_expires_in: z.ZodNumber;
20
17
  expires_in: z.ZodNumber;
@@ -22,9 +19,8 @@ export declare const TokenResponse: z.ZodObject<{
22
19
  }, "strip", z.ZodTypeAny, {
23
20
  authorization_details: {
24
21
  type: "openid_credential";
25
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
26
22
  credential_configuration_id: string;
27
- }[];
23
+ };
28
24
  access_token: string;
29
25
  c_nonce: string;
30
26
  c_nonce_expires_in: number;
@@ -33,9 +29,8 @@ export declare const TokenResponse: z.ZodObject<{
33
29
  }, {
34
30
  authorization_details: {
35
31
  type: "openid_credential";
36
- format: "vc+sd-jwt" | "vc+mdoc-cbor";
37
32
  credential_configuration_id: string;
38
- }[];
33
+ };
39
34
  access_token: string;
40
35
  c_nonce: string;
41
36
  c_nonce_expires_in: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credential/issuance/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CAoB/C,CAAC"}
1
+ {"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CA0B/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { RelyingPartyEntityConfiguration } from "../../trust/types";
1
+ import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
2
2
  import type { StartFlow } from "../issuance/01-start-flow";
3
3
  import type { Out } from "../../utils/misc";
4
4
  export type EvaluateRelyingPartyTrust = (rpUrl: Out<StartFlow>["issuerUrl"], context?: {
@@ -1 +1 @@
1
- {"version":3,"file":"02-evaluate-rp-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/02-evaluate-rp-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,CACtC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAClC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAUvC,CAAC"}
1
+ {"version":3,"file":"02-evaluate-rp-trust.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/02-evaluate-rp-trust.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,yBAAyB,GAAG,CACtC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,EAClC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC;IACX,MAAM,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAUvC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { JWK } from "../../utils/jwk";
2
+ import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
3
+ /**
4
+ * Defines the signature for a function that retrieves JSON Web Key Sets (JWKS) from a client.
5
+ *
6
+ * @template T - The tuple type representing the function arguments.
7
+ * @param args - The arguments passed to the function.
8
+ * @returns A promise resolving to an object containing an array of JWKs.
9
+ */
10
+ export type FetchJwks<T extends Array<unknown> = []> = (...args: T) => Promise<{
11
+ keys: JWK[];
12
+ }>;
13
+ /**
14
+ * Retrieves the JSON Web Key Set (JWKS) from the specified client's well-known endpoint.
15
+ *
16
+ * @param clientUrl - The base URL of the client entity from which to retrieve the JWKS.
17
+ * @param options - Optional context containing a custom fetch implementation.
18
+ * @param options.context - Optional context object.
19
+ * @param options.context.appFetch - Optional custom fetch function to use instead of the global `fetch`.
20
+ * @returns A promise resolving to an object containing an array of JWKs.
21
+ * @throws Will throw an error if the JWKS retrieval fails.
22
+ */
23
+ export declare const fetchJwksFromUri: FetchJwks<[
24
+ string,
25
+ {
26
+ context?: {
27
+ appFetch?: GlobalFetch["fetch"];
28
+ };
29
+ }
30
+ ]>;
31
+ /**
32
+ * Retrieves the JSON Web Key Set (JWKS) from a Relying Party's entity configuration.
33
+ *
34
+ * @param rpConfig - The configuration object of the Relying Party entity.
35
+ * @returns An object containing an array of JWKs.
36
+ * @throws Will throw an error if the configuration is invalid or if JWKS is not found.
37
+ */
38
+ export declare const fetchJwksFromConfig: FetchJwks<[
39
+ RelyingPartyEntityConfiguration
40
+ ]>;
41
+ //# sourceMappingURL=03-retrieve-jwks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"03-retrieve-jwks.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-retrieve-jwks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC7E,IAAI,EAAE,GAAG,EAAE,CAAC;CACb,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,CACtC;IAAC,MAAM;IAAE;QAAE,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;SAAE,CAAA;KAAE;CAAC,CAoB5D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,CACzC;IAAC,+BAA+B;CAAC,CAgBlC,CAAC"}