@pagopa/io-react-native-wallet 3.6.3 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1281) hide show
  1. package/README.md +2 -2
  2. package/lib/commonjs/IoWallet.js +5 -3
  3. package/lib/commonjs/IoWallet.js.map +1 -1
  4. package/lib/commonjs/api/index.js +23 -24
  5. package/lib/commonjs/api/index.js.map +1 -1
  6. package/lib/commonjs/client/index.js +9 -11
  7. package/lib/commonjs/client/index.js.map +1 -1
  8. package/lib/commonjs/credential/issuance/README.md +9 -9
  9. package/lib/commonjs/credential/issuance/api/IssuerConfig.js +23 -23
  10. package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -1
  11. package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -1
  12. package/lib/commonjs/credential/issuance/api/types.js +3 -3
  13. package/lib/commonjs/credential/issuance/api/types.js.map +1 -1
  14. package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +3 -0
  15. package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -1
  16. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +11 -8
  17. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -1
  18. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +13 -13
  19. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
  20. package/lib/commonjs/credential/issuance/common/errors.js +0 -3
  21. package/lib/commonjs/credential/issuance/common/errors.js.map +1 -1
  22. package/lib/commonjs/credential/issuance/index.js +2 -2
  23. package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +4 -4
  24. package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
  25. package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js +14 -14
  26. package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
  27. package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js +20 -20
  28. package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
  29. package/lib/commonjs/credential/issuance/mrtd-pop/index.js +6 -6
  30. package/lib/commonjs/credential/issuance/mrtd-pop/index.js.map +1 -1
  31. package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -1
  32. package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +13 -13
  33. package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -1
  34. package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +18 -18
  35. package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
  36. package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +10 -10
  37. package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -1
  38. package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +24 -15
  39. package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
  40. package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -1
  41. package/lib/commonjs/credential/issuance/v1.0.0/index.js +8 -8
  42. package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -1
  43. package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +7 -7
  44. package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -1
  45. package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -1
  46. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/01-evaluate-issuer-trust.js +3 -3
  47. package/lib/commonjs/credential/issuance/v1.4.6/01-evaluate-issuer-trust.js.map +1 -0
  48. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/02-start-user-authorization.js +30 -30
  49. package/lib/commonjs/credential/issuance/v1.4.6/02-start-user-authorization.js.map +1 -0
  50. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/03-complete-user-authorization.js +37 -39
  51. package/lib/commonjs/credential/issuance/v1.4.6/03-complete-user-authorization.js.map +1 -0
  52. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/04-authorize-access.js +16 -16
  53. package/lib/commonjs/credential/issuance/v1.4.6/04-authorize-access.js.map +1 -0
  54. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/05-obtain-credential.js +36 -32
  55. package/lib/commonjs/credential/issuance/v1.4.6/05-obtain-credential.js.map +1 -0
  56. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/06-verify-and-parse-credential.js.map +1 -1
  57. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/index.js +8 -8
  58. package/lib/commonjs/credential/issuance/v1.4.6/index.js.map +1 -0
  59. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/mappers.js +18 -17
  60. package/lib/commonjs/credential/issuance/v1.4.6/mappers.js.map +1 -0
  61. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/types.js.map +1 -1
  62. package/lib/commonjs/credential/offer/README.md +10 -6
  63. package/lib/commonjs/credential/offer/common/errors.js +0 -6
  64. package/lib/commonjs/credential/offer/common/errors.js.map +1 -1
  65. package/lib/commonjs/credential/offer/index.js +2 -2
  66. package/lib/commonjs/credential/offer/v1.0.0/index.js +3 -3
  67. package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -1
  68. package/lib/commonjs/credential/offer/{v1.3.3 → v1.4.6}/01-resolve-credential-offer.js +5 -5
  69. package/lib/commonjs/credential/offer/{v1.3.3 → v1.4.6}/01-resolve-credential-offer.js.map +1 -1
  70. package/lib/commonjs/credential/offer/{v1.3.3 → v1.4.6}/02-extract-grant-details.js +6 -6
  71. package/lib/commonjs/credential/offer/v1.4.6/02-extract-grant-details.js.map +1 -0
  72. package/lib/commonjs/credential/offer/{v1.3.3 → v1.4.6}/03-validate-credential-offer.js +7 -7
  73. package/lib/commonjs/credential/offer/v1.4.6/03-validate-credential-offer.js.map +1 -0
  74. package/lib/commonjs/credential/offer/{v1.3.3 → v1.4.6}/index.js +1 -1
  75. package/lib/commonjs/credential/offer/v1.4.6/index.js.map +1 -0
  76. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +8 -8
  77. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
  78. package/lib/commonjs/credential/presentation/api/types.js +13 -13
  79. package/lib/commonjs/credential/presentation/api/types.js.map +1 -1
  80. package/lib/commonjs/credential/presentation/common/errors.js +24 -23
  81. package/lib/commonjs/credential/presentation/common/errors.js.map +1 -1
  82. package/lib/commonjs/credential/presentation/common/utils/dcql.js +38 -35
  83. package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -1
  84. package/lib/commonjs/credential/presentation/common/utils/mdoc.js +20 -22
  85. package/lib/commonjs/credential/presentation/common/utils/mdoc.js.map +1 -1
  86. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +10 -10
  87. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -1
  88. package/lib/commonjs/credential/presentation/index.js +2 -2
  89. package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +1 -1
  90. package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -1
  91. package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -1
  92. package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +2 -2
  93. package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -1
  94. package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js +3 -3
  95. package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
  96. package/lib/commonjs/credential/presentation/v1.0.0/06-evaluate-dcql-query.js +17 -12
  97. package/lib/commonjs/credential/presentation/v1.0.0/06-evaluate-dcql-query.js.map +1 -1
  98. package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js +20 -20
  99. package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
  100. package/lib/commonjs/credential/presentation/v1.0.0/index.js +4 -4
  101. package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -1
  102. package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +6 -6
  103. package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -1
  104. package/lib/commonjs/credential/presentation/v1.0.0/types.js +12 -12
  105. package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -1
  106. package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -1
  107. package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -1
  108. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/01-start-flow.js +11 -5
  109. package/lib/commonjs/credential/presentation/v1.4.6/01-start-flow.js.map +1 -0
  110. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/02-evaluate-rp-trust.js +1 -1
  111. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/02-evaluate-rp-trust.js.map +1 -1
  112. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/03-get-request-object.js +1 -1
  113. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/03-get-request-object.js.map +1 -1
  114. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/04-verify-certificate-chain.js +3 -3
  115. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/04-verify-certificate-chain.js.map +1 -1
  116. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/05-verify-request-object.js +14 -12
  117. package/lib/commonjs/credential/presentation/v1.4.6/05-verify-request-object.js.map +1 -0
  118. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/06-evaluate-dcql-query.js +24 -16
  119. package/lib/commonjs/credential/presentation/v1.4.6/06-evaluate-dcql-query.js.map +1 -0
  120. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/07-send-authorization-response.js +31 -26
  121. package/lib/commonjs/credential/presentation/v1.4.6/07-send-authorization-response.js.map +1 -0
  122. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/index.js +5 -5
  123. package/lib/commonjs/credential/presentation/v1.4.6/index.js.map +1 -0
  124. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/mappers.js +11 -11
  125. package/lib/commonjs/credential/presentation/v1.4.6/mappers.js.map +1 -0
  126. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/sdkErrorMapper.js +2 -2
  127. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/sdkErrorMapper.js.map +1 -1
  128. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/types.js +3 -3
  129. package/lib/commonjs/credential/presentation/{v1.3.3 → v1.4.6}/types.js.map +1 -1
  130. package/lib/commonjs/credential/status/README.md +2 -2
  131. package/lib/commonjs/credential/status/api/types.js +6 -6
  132. package/lib/commonjs/credential/status/api/types.js.map +1 -1
  133. package/lib/commonjs/credential/status/index.js +3 -3
  134. package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +15 -12
  135. package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -1
  136. package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +17 -10
  137. package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -1
  138. package/lib/commonjs/credential/status/v1.0.0/index.js +1 -1
  139. package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -1
  140. package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -1
  141. package/lib/commonjs/credential/status/v1.0.0/types.js +18 -18
  142. package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -1
  143. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/01-status-list.js +4 -4
  144. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/01-status-list.js.map +1 -1
  145. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/02-verify-and-parse-status-list.js.map +1 -1
  146. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/03-get-status.js +4 -4
  147. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/03-get-status.js.map +1 -1
  148. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/index.js +3 -3
  149. package/lib/commonjs/credential/status/v1.4.6/index.js.map +1 -0
  150. package/lib/commonjs/credential/trustmark/index.js +2 -2
  151. package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +7 -7
  152. package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -1
  153. package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -1
  154. package/lib/commonjs/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.js +1 -1
  155. package/lib/commonjs/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.js.map +1 -1
  156. package/lib/commonjs/credential/trustmark/{v1.3.3 → v1.4.6}/index.js.map +1 -1
  157. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +55 -55
  158. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  159. package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js +2 -2
  160. package/lib/commonjs/credentials-catalogue/common/get-status-l10n-ids.js.map +1 -1
  161. package/lib/commonjs/credentials-catalogue/index.js +2 -2
  162. package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +2 -2
  163. package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -1
  164. package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +1 -1
  165. package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -1
  166. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +0 -1
  167. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
  168. package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +36 -36
  169. package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -1
  170. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-and-parse-catalogue.js +12 -12
  171. package/lib/commonjs/credentials-catalogue/v1.4.6/fetch-and-parse-catalogue.js.map +1 -0
  172. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-translations.js +1 -1
  173. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-translations.js.map +1 -1
  174. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/index.js +1 -1
  175. package/lib/commonjs/credentials-catalogue/v1.4.6/index.js.map +1 -0
  176. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/mappers.js +21 -20
  177. package/lib/commonjs/credentials-catalogue/v1.4.6/mappers.js.map +1 -0
  178. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/types.js +98 -98
  179. package/lib/commonjs/credentials-catalogue/v1.4.6/types.js.map +1 -0
  180. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/utils.js +10 -10
  181. package/lib/commonjs/credentials-catalogue/{v1.3.3 → v1.4.6}/utils.js.map +1 -1
  182. package/lib/commonjs/index.js +23 -17
  183. package/lib/commonjs/index.js.map +1 -1
  184. package/lib/commonjs/{wallet-unit-attestation → key-attestation}/README.md +9 -9
  185. package/lib/commonjs/{wallet-unit-attestation → key-attestation}/api/index.js.map +1 -1
  186. package/lib/commonjs/{wallet-unit-attestation → key-attestation}/api/types.js +9 -9
  187. package/lib/commonjs/key-attestation/api/types.js.map +1 -0
  188. package/lib/commonjs/{wallet-unit-attestation → key-attestation}/index.js +4 -4
  189. package/lib/commonjs/key-attestation/index.js.map +1 -0
  190. package/lib/commonjs/key-attestation/v1.0.0/index.js +11 -0
  191. package/lib/commonjs/key-attestation/v1.0.0/index.js.map +1 -0
  192. package/lib/commonjs/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/index.js +7 -7
  193. package/lib/commonjs/key-attestation/v1.4.6/index.js.map +1 -0
  194. package/lib/commonjs/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/issuing.js +34 -31
  195. package/lib/commonjs/key-attestation/v1.4.6/issuing.js.map +1 -0
  196. package/lib/commonjs/key-attestation/v1.4.6/mappers.js +13 -0
  197. package/lib/commonjs/key-attestation/v1.4.6/mappers.js.map +1 -0
  198. package/lib/commonjs/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/types.js +6 -6
  199. package/lib/commonjs/key-attestation/v1.4.6/types.js.map +1 -0
  200. package/lib/commonjs/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/utils.js +2 -2
  201. package/lib/commonjs/key-attestation/v1.4.6/utils.js.map +1 -0
  202. package/lib/commonjs/mdoc/index.js +13 -5
  203. package/lib/commonjs/mdoc/index.js.map +1 -1
  204. package/lib/commonjs/mdoc/utils.js.map +1 -1
  205. package/lib/commonjs/sd-jwt/__test__/types.test.js +9 -9
  206. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  207. package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -3
  208. package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
  209. package/lib/commonjs/sd-jwt/index.js +9 -9
  210. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  211. package/lib/commonjs/sd-jwt/types.js +19 -19
  212. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  213. package/lib/commonjs/sd-jwt/utils.js +10 -11
  214. package/lib/commonjs/sd-jwt/utils.js.map +1 -1
  215. package/lib/commonjs/trust/api/TrustAnchorConfig.js +4 -4
  216. package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -1
  217. package/lib/commonjs/trust/common/build-chain.js +5 -2
  218. package/lib/commonjs/trust/common/build-chain.js.map +1 -1
  219. package/lib/commonjs/trust/common/errors.js +51 -44
  220. package/lib/commonjs/trust/common/errors.js.map +1 -1
  221. package/lib/commonjs/trust/common/types.js +22 -22
  222. package/lib/commonjs/trust/common/types.js.map +1 -1
  223. package/lib/commonjs/trust/common/utils.js +45 -45
  224. package/lib/commonjs/trust/common/utils.js.map +1 -1
  225. package/lib/commonjs/trust/common/verify-chain.js +96 -96
  226. package/lib/commonjs/trust/common/verify-chain.js.map +1 -1
  227. package/lib/commonjs/trust/v1.0.0/build-chain.js +2 -2
  228. package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -1
  229. package/lib/commonjs/trust/v1.0.0/entities.js +1 -1
  230. package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -1
  231. package/lib/commonjs/trust/v1.0.0/index.js +3 -3
  232. package/lib/commonjs/trust/v1.0.0/index.js.map +1 -1
  233. package/lib/commonjs/trust/v1.0.0/mappers.js +2 -2
  234. package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -1
  235. package/lib/commonjs/trust/v1.0.0/types.js +46 -46
  236. package/lib/commonjs/trust/v1.0.0/types.js.map +1 -1
  237. package/lib/commonjs/trust/v1.0.0/verify-chain.js +3 -3
  238. package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -1
  239. package/lib/commonjs/trust/{v1.3.3 → v1.4.6}/entities.js +2 -2
  240. package/lib/commonjs/trust/{v1.3.3 → v1.4.6}/entities.js.map +1 -1
  241. package/lib/commonjs/trust/{v1.3.3 → v1.4.6}/types.js +2 -2
  242. package/lib/commonjs/trust/{v1.3.3 → v1.4.6}/types.js.map +1 -1
  243. package/lib/commonjs/utils/auth.js +2 -2
  244. package/lib/commonjs/utils/auth.js.map +1 -1
  245. package/lib/commonjs/utils/callbacks.js +47 -51
  246. package/lib/commonjs/utils/callbacks.js.map +1 -1
  247. package/lib/commonjs/utils/config.js +2 -10
  248. package/lib/commonjs/utils/config.js.map +1 -1
  249. package/lib/commonjs/utils/credentials.js +3 -3
  250. package/lib/commonjs/utils/credentials.js.map +1 -1
  251. package/lib/commonjs/utils/crypto.js +23 -25
  252. package/lib/commonjs/utils/crypto.js.map +1 -1
  253. package/lib/commonjs/utils/decoder.js +2 -2
  254. package/lib/commonjs/utils/decoder.js.map +1 -1
  255. package/lib/commonjs/utils/dpop.js +5 -5
  256. package/lib/commonjs/utils/dpop.js.map +1 -1
  257. package/lib/commonjs/utils/error-codes.js +19 -19
  258. package/lib/commonjs/utils/error-codes.js.map +1 -1
  259. package/lib/commonjs/utils/errors.js +51 -50
  260. package/lib/commonjs/utils/errors.js.map +1 -1
  261. package/lib/commonjs/utils/jwk.js +5 -6
  262. package/lib/commonjs/utils/jwk.js.map +1 -1
  263. package/lib/commonjs/utils/logging.js +15 -14
  264. package/lib/commonjs/utils/logging.js.map +1 -1
  265. package/lib/commonjs/utils/mappers.js +6 -8
  266. package/lib/commonjs/utils/mappers.js.map +1 -1
  267. package/lib/commonjs/utils/misc.js +6 -5
  268. package/lib/commonjs/utils/misc.js.map +1 -1
  269. package/lib/commonjs/utils/par.js +28 -28
  270. package/lib/commonjs/utils/par.js.map +1 -1
  271. package/lib/commonjs/utils/pop.js +5 -5
  272. package/lib/commonjs/utils/pop.js.map +1 -1
  273. package/lib/commonjs/utils/string.js.map +1 -1
  274. package/lib/commonjs/utils/x509.js +2 -2
  275. package/lib/commonjs/utils/x509.js.map +1 -1
  276. package/lib/commonjs/utils/zod.js +1 -1
  277. package/lib/commonjs/utils/zod.js.map +1 -1
  278. package/lib/commonjs/wallet-instance/common/wallet-instance.js +5 -5
  279. package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -1
  280. package/lib/commonjs/wallet-instance/index.js +2 -2
  281. package/lib/commonjs/wallet-instance/v1.0.0/index.js +2 -2
  282. package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -1
  283. package/lib/commonjs/wallet-instance/{v1.3.3 → v1.4.6}/index.js +2 -2
  284. package/lib/commonjs/wallet-instance/v1.4.6/index.js.map +1 -0
  285. package/lib/commonjs/wallet-instance-attestation/api/types.js +7 -7
  286. package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -1
  287. package/lib/commonjs/wallet-instance-attestation/common/types.js +7 -7
  288. package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -1
  289. package/lib/commonjs/wallet-instance-attestation/index.js +2 -2
  290. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +2 -2
  291. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
  292. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +15 -15
  293. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
  294. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +2 -2
  295. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
  296. package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +5 -5
  297. package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -1
  298. package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +1 -1
  299. package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -1
  300. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/index.js +2 -2
  301. package/lib/commonjs/wallet-instance-attestation/v1.4.6/index.js.map +1 -0
  302. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/issuing.js +20 -20
  303. package/lib/commonjs/wallet-instance-attestation/v1.4.6/issuing.js.map +1 -0
  304. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.js.map +1 -1
  305. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.js.map +1 -1
  306. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/utils.js +1 -1
  307. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/utils.js.map +1 -1
  308. package/lib/module/IoWallet.js +6 -4
  309. package/lib/module/IoWallet.js.map +1 -1
  310. package/lib/module/api/index.js +23 -24
  311. package/lib/module/api/index.js.map +1 -1
  312. package/lib/module/client/index.js +10 -12
  313. package/lib/module/client/index.js.map +1 -1
  314. package/lib/module/credential/issuance/README.md +9 -9
  315. package/lib/module/credential/issuance/api/IssuerConfig.js +23 -23
  316. package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -1
  317. package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -1
  318. package/lib/module/credential/issuance/api/types.js +3 -3
  319. package/lib/module/credential/issuance/api/types.js.map +1 -1
  320. package/lib/module/credential/issuance/common/02-start-user-authorization.js +4 -1
  321. package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -1
  322. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +11 -8
  323. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -1
  324. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +6 -6
  325. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -1
  326. package/lib/module/credential/issuance/common/errors.js +0 -3
  327. package/lib/module/credential/issuance/common/errors.js.map +1 -1
  328. package/lib/module/credential/issuance/index.js +1 -1
  329. package/lib/module/credential/issuance/index.js.map +1 -1
  330. package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +4 -4
  331. package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
  332. package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js +14 -14
  333. package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
  334. package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js +20 -20
  335. package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
  336. package/lib/module/credential/issuance/mrtd-pop/index.js +8 -8
  337. package/lib/module/credential/issuance/mrtd-pop/index.js.map +1 -1
  338. package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -1
  339. package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +13 -13
  340. package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -1
  341. package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +17 -17
  342. package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
  343. package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +11 -11
  344. package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -1
  345. package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +25 -16
  346. package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
  347. package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -1
  348. package/lib/module/credential/issuance/v1.0.0/index.js +9 -9
  349. package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -1
  350. package/lib/module/credential/issuance/v1.0.0/mappers.js +7 -7
  351. package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -1
  352. package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -1
  353. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/01-evaluate-issuer-trust.js +3 -3
  354. package/lib/module/credential/issuance/v1.4.6/01-evaluate-issuer-trust.js.map +1 -0
  355. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/02-start-user-authorization.js +31 -31
  356. package/lib/module/credential/issuance/v1.4.6/02-start-user-authorization.js.map +1 -0
  357. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/03-complete-user-authorization.js +29 -31
  358. package/lib/module/credential/issuance/v1.4.6/03-complete-user-authorization.js.map +1 -0
  359. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/04-authorize-access.js +16 -16
  360. package/lib/module/credential/issuance/v1.4.6/04-authorize-access.js.map +1 -0
  361. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/05-obtain-credential.js +38 -34
  362. package/lib/module/credential/issuance/v1.4.6/05-obtain-credential.js.map +1 -0
  363. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/06-verify-and-parse-credential.js.map +1 -1
  364. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/index.js +9 -9
  365. package/lib/module/credential/issuance/v1.4.6/index.js.map +1 -0
  366. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/mappers.js +18 -17
  367. package/lib/module/credential/issuance/v1.4.6/mappers.js.map +1 -0
  368. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/types.js.map +1 -1
  369. package/lib/module/credential/offer/README.md +10 -6
  370. package/lib/module/credential/offer/common/errors.js +0 -6
  371. package/lib/module/credential/offer/common/errors.js.map +1 -1
  372. package/lib/module/credential/offer/index.js +1 -1
  373. package/lib/module/credential/offer/index.js.map +1 -1
  374. package/lib/module/credential/offer/v1.0.0/index.js +3 -3
  375. package/lib/module/credential/offer/v1.0.0/index.js.map +1 -1
  376. package/lib/module/credential/offer/{v1.3.3 → v1.4.6}/01-resolve-credential-offer.js +6 -6
  377. package/lib/module/credential/offer/v1.4.6/01-resolve-credential-offer.js.map +1 -0
  378. package/lib/module/credential/offer/{v1.3.3 → v1.4.6}/02-extract-grant-details.js +5 -5
  379. package/lib/module/credential/offer/v1.4.6/02-extract-grant-details.js.map +1 -0
  380. package/lib/module/credential/offer/{v1.3.3 → v1.4.6}/03-validate-credential-offer.js +8 -8
  381. package/lib/module/credential/offer/v1.4.6/03-validate-credential-offer.js.map +1 -0
  382. package/lib/module/credential/offer/{v1.3.3 → v1.4.6}/index.js +1 -1
  383. package/lib/module/credential/offer/{v1.3.3 → v1.4.6}/index.js.map +1 -1
  384. package/lib/module/credential/presentation/api/RelyingPartyConfig.js +8 -8
  385. package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -1
  386. package/lib/module/credential/presentation/api/types.js +13 -13
  387. package/lib/module/credential/presentation/api/types.js.map +1 -1
  388. package/lib/module/credential/presentation/common/errors.js +21 -21
  389. package/lib/module/credential/presentation/common/errors.js.map +1 -1
  390. package/lib/module/credential/presentation/common/utils/dcql.js +38 -35
  391. package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -1
  392. package/lib/module/credential/presentation/common/utils/mdoc.js +20 -22
  393. package/lib/module/credential/presentation/common/utils/mdoc.js.map +1 -1
  394. package/lib/module/credential/presentation/common/utils/sd-jwt.js +10 -10
  395. package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -1
  396. package/lib/module/credential/presentation/index.js +1 -1
  397. package/lib/module/credential/presentation/index.js.map +1 -1
  398. package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +1 -1
  399. package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -1
  400. package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -1
  401. package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +2 -2
  402. package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -1
  403. package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js +3 -3
  404. package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
  405. package/lib/module/credential/presentation/v1.0.0/06-evaluate-dcql-query.js +16 -11
  406. package/lib/module/credential/presentation/v1.0.0/06-evaluate-dcql-query.js.map +1 -1
  407. package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js +12 -12
  408. package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
  409. package/lib/module/credential/presentation/v1.0.0/index.js +5 -5
  410. package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -1
  411. package/lib/module/credential/presentation/v1.0.0/mappers.js +6 -6
  412. package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -1
  413. package/lib/module/credential/presentation/v1.0.0/types.js +12 -12
  414. package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -1
  415. package/lib/module/credential/presentation/v1.0.0/utils.js +1 -0
  416. package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -1
  417. package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +1 -0
  418. package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -1
  419. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/01-start-flow.js +11 -5
  420. package/lib/module/credential/presentation/v1.4.6/01-start-flow.js.map +1 -0
  421. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/02-evaluate-rp-trust.js +1 -1
  422. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/02-evaluate-rp-trust.js.map +1 -1
  423. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/03-get-request-object.js +1 -1
  424. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/03-get-request-object.js.map +1 -1
  425. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/04-verify-certificate-chain.js +3 -3
  426. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/04-verify-certificate-chain.js.map +1 -1
  427. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/05-verify-request-object.js +16 -13
  428. package/lib/module/credential/presentation/v1.4.6/05-verify-request-object.js.map +1 -0
  429. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/06-evaluate-dcql-query.js +25 -17
  430. package/lib/module/credential/presentation/v1.4.6/06-evaluate-dcql-query.js.map +1 -0
  431. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/07-send-authorization-response.js +31 -26
  432. package/lib/module/credential/presentation/v1.4.6/07-send-authorization-response.js.map +1 -0
  433. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/index.js +6 -6
  434. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/index.js.map +1 -1
  435. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/mappers.js +11 -11
  436. package/lib/module/credential/presentation/v1.4.6/mappers.js.map +1 -0
  437. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/sdkErrorMapper.js +4 -3
  438. package/lib/module/credential/presentation/v1.4.6/sdkErrorMapper.js.map +1 -0
  439. package/lib/module/credential/presentation/{v1.3.3 → v1.4.6}/types.js +3 -3
  440. package/lib/module/credential/presentation/v1.4.6/types.js.map +1 -0
  441. package/lib/module/credential/status/README.md +2 -2
  442. package/lib/module/credential/status/api/index.js.map +1 -1
  443. package/lib/module/credential/status/api/types.js +6 -6
  444. package/lib/module/credential/status/api/types.js.map +1 -1
  445. package/lib/module/credential/status/index.js +1 -1
  446. package/lib/module/credential/status/index.js.map +1 -1
  447. package/lib/module/credential/status/v1.0.0/01-status-assertion.js +15 -12
  448. package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -1
  449. package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +17 -10
  450. package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -1
  451. package/lib/module/credential/status/v1.0.0/index.js +1 -1
  452. package/lib/module/credential/status/v1.0.0/index.js.map +1 -1
  453. package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -1
  454. package/lib/module/credential/status/v1.0.0/types.js +17 -17
  455. package/lib/module/credential/status/v1.0.0/types.js.map +1 -1
  456. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/01-status-list.js +4 -4
  457. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/01-status-list.js.map +1 -1
  458. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/02-verify-and-parse-status-list.js.map +1 -1
  459. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/03-get-status.js +5 -4
  460. package/lib/module/credential/status/v1.4.6/03-get-status.js.map +1 -0
  461. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/index.js +3 -3
  462. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/index.js.map +1 -1
  463. package/lib/module/credential/trustmark/index.js +1 -1
  464. package/lib/module/credential/trustmark/index.js.map +1 -1
  465. package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +8 -8
  466. package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -1
  467. package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -1
  468. package/lib/module/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.js +1 -1
  469. package/lib/module/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.js.map +1 -1
  470. package/lib/module/credential/trustmark/{v1.3.3 → v1.4.6}/index.js.map +1 -1
  471. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +55 -55
  472. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
  473. package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js +2 -2
  474. package/lib/module/credentials-catalogue/common/get-status-l10n-ids.js.map +1 -1
  475. package/lib/module/credentials-catalogue/index.js +1 -1
  476. package/lib/module/credentials-catalogue/index.js.map +1 -1
  477. package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +2 -2
  478. package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -1
  479. package/lib/module/credentials-catalogue/v1.0.0/index.js +1 -1
  480. package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -1
  481. package/lib/module/credentials-catalogue/v1.0.0/mappers.js +0 -1
  482. package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -1
  483. package/lib/module/credentials-catalogue/v1.0.0/types.js +36 -36
  484. package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -1
  485. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-and-parse-catalogue.js +12 -12
  486. package/lib/module/credentials-catalogue/v1.4.6/fetch-and-parse-catalogue.js.map +1 -0
  487. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-translations.js +1 -1
  488. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-translations.js.map +1 -1
  489. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/index.js +1 -1
  490. package/lib/module/credentials-catalogue/v1.4.6/index.js.map +1 -0
  491. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/mappers.js +22 -21
  492. package/lib/module/credentials-catalogue/v1.4.6/mappers.js.map +1 -0
  493. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/types.js +98 -98
  494. package/lib/module/credentials-catalogue/v1.4.6/types.js.map +1 -0
  495. package/lib/module/credentials-catalogue/{v1.3.3 → v1.4.6}/utils.js +10 -10
  496. package/lib/module/credentials-catalogue/v1.4.6/utils.js.map +1 -0
  497. package/lib/module/index.js +10 -10
  498. package/lib/module/index.js.map +1 -1
  499. package/{src/wallet-unit-attestation → lib/module/key-attestation}/README.md +9 -9
  500. package/lib/module/{wallet-unit-attestation → key-attestation}/api/index.js.map +1 -1
  501. package/lib/module/{wallet-unit-attestation → key-attestation}/api/types.js +7 -7
  502. package/lib/module/key-attestation/api/types.js.map +1 -0
  503. package/lib/module/key-attestation/index.js +3 -0
  504. package/lib/module/key-attestation/index.js.map +1 -0
  505. package/lib/module/key-attestation/v1.0.0/index.js +4 -0
  506. package/lib/module/key-attestation/v1.0.0/index.js.map +1 -0
  507. package/lib/module/key-attestation/v1.4.6/index.js +10 -0
  508. package/lib/module/key-attestation/v1.4.6/index.js.map +1 -0
  509. package/lib/module/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/issuing.js +35 -32
  510. package/lib/module/key-attestation/v1.4.6/issuing.js.map +1 -0
  511. package/lib/module/key-attestation/v1.4.6/mappers.js +6 -0
  512. package/lib/module/key-attestation/v1.4.6/mappers.js.map +1 -0
  513. package/lib/module/key-attestation/v1.4.6/types.js +14 -0
  514. package/lib/module/key-attestation/v1.4.6/types.js.map +1 -0
  515. package/lib/module/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/utils.js +3 -3
  516. package/lib/module/key-attestation/v1.4.6/utils.js.map +1 -0
  517. package/lib/module/mdoc/index.js +13 -5
  518. package/lib/module/mdoc/index.js.map +1 -1
  519. package/lib/module/mdoc/utils.js.map +1 -1
  520. package/lib/module/sd-jwt/__test__/types.test.js +9 -9
  521. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  522. package/lib/module/sd-jwt/__test__/utils.test.js +3 -3
  523. package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
  524. package/lib/module/sd-jwt/index.js +9 -9
  525. package/lib/module/sd-jwt/index.js.map +1 -1
  526. package/lib/module/sd-jwt/types.js +19 -19
  527. package/lib/module/sd-jwt/types.js.map +1 -1
  528. package/lib/module/sd-jwt/utils.js +10 -11
  529. package/lib/module/sd-jwt/utils.js.map +1 -1
  530. package/lib/module/trust/api/TrustAnchorConfig.js +4 -4
  531. package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -1
  532. package/lib/module/trust/common/build-chain.js +5 -2
  533. package/lib/module/trust/common/build-chain.js.map +1 -1
  534. package/lib/module/trust/common/errors.js +46 -37
  535. package/lib/module/trust/common/errors.js.map +1 -1
  536. package/lib/module/trust/common/types.js +22 -22
  537. package/lib/module/trust/common/types.js.map +1 -1
  538. package/lib/module/trust/common/utils.js +45 -45
  539. package/lib/module/trust/common/utils.js.map +1 -1
  540. package/lib/module/trust/common/verify-chain.js +96 -96
  541. package/lib/module/trust/common/verify-chain.js.map +1 -1
  542. package/lib/module/trust/v1.0.0/build-chain.js +2 -2
  543. package/lib/module/trust/v1.0.0/build-chain.js.map +1 -1
  544. package/lib/module/trust/v1.0.0/entities.js +1 -1
  545. package/lib/module/trust/v1.0.0/entities.js.map +1 -1
  546. package/lib/module/trust/v1.0.0/index.js +3 -3
  547. package/lib/module/trust/v1.0.0/index.js.map +1 -1
  548. package/lib/module/trust/v1.0.0/mappers.js +2 -2
  549. package/lib/module/trust/v1.0.0/mappers.js.map +1 -1
  550. package/lib/module/trust/v1.0.0/types.js +46 -46
  551. package/lib/module/trust/v1.0.0/types.js.map +1 -1
  552. package/lib/module/trust/v1.0.0/verify-chain.js +3 -3
  553. package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -1
  554. package/lib/module/trust/{v1.3.3 → v1.4.6}/entities.js +2 -2
  555. package/lib/module/trust/{v1.3.3 → v1.4.6}/entities.js.map +1 -1
  556. package/lib/module/trust/{v1.3.3 → v1.4.6}/types.js +2 -2
  557. package/lib/module/trust/v1.4.6/types.js.map +1 -0
  558. package/lib/module/utils/auth.js +2 -2
  559. package/lib/module/utils/auth.js.map +1 -1
  560. package/lib/module/utils/callbacks.js +47 -51
  561. package/lib/module/utils/callbacks.js.map +1 -1
  562. package/lib/module/utils/config.js +0 -7
  563. package/lib/module/utils/config.js.map +1 -1
  564. package/lib/module/utils/credentials.js +3 -3
  565. package/lib/module/utils/credentials.js.map +1 -1
  566. package/lib/module/utils/crypto.js +23 -25
  567. package/lib/module/utils/crypto.js.map +1 -1
  568. package/lib/module/utils/decoder.js +3 -3
  569. package/lib/module/utils/decoder.js.map +1 -1
  570. package/lib/module/utils/dpop.js +5 -5
  571. package/lib/module/utils/dpop.js.map +1 -1
  572. package/lib/module/utils/error-codes.js +19 -19
  573. package/lib/module/utils/error-codes.js.map +1 -1
  574. package/lib/module/utils/errors.js +47 -46
  575. package/lib/module/utils/errors.js.map +1 -1
  576. package/lib/module/utils/jwk.js +4 -5
  577. package/lib/module/utils/jwk.js.map +1 -1
  578. package/lib/module/utils/logging.js +15 -14
  579. package/lib/module/utils/logging.js.map +1 -1
  580. package/lib/module/utils/mappers.js +6 -8
  581. package/lib/module/utils/mappers.js.map +1 -1
  582. package/lib/module/utils/misc.js +7 -6
  583. package/lib/module/utils/misc.js.map +1 -1
  584. package/lib/module/utils/par.js +28 -28
  585. package/lib/module/utils/par.js.map +1 -1
  586. package/lib/module/utils/pop.js +5 -5
  587. package/lib/module/utils/pop.js.map +1 -1
  588. package/lib/module/utils/string.js.map +1 -1
  589. package/lib/module/utils/x509.js +2 -2
  590. package/lib/module/utils/x509.js.map +1 -1
  591. package/lib/module/utils/zod.js +1 -1
  592. package/lib/module/utils/zod.js.map +1 -1
  593. package/lib/module/wallet-instance/common/wallet-instance.js +6 -6
  594. package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -1
  595. package/lib/module/wallet-instance/index.js +1 -1
  596. package/lib/module/wallet-instance/index.js.map +1 -1
  597. package/lib/module/wallet-instance/v1.0.0/index.js +3 -3
  598. package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -1
  599. package/lib/module/wallet-instance/v1.4.6/index.js +8 -0
  600. package/lib/module/wallet-instance/v1.4.6/index.js.map +1 -0
  601. package/lib/module/wallet-instance-attestation/api/types.js +7 -7
  602. package/lib/module/wallet-instance-attestation/api/types.js.map +1 -1
  603. package/lib/module/wallet-instance-attestation/common/types.js +7 -7
  604. package/lib/module/wallet-instance-attestation/common/types.js.map +1 -1
  605. package/lib/module/wallet-instance-attestation/index.js +1 -1
  606. package/lib/module/wallet-instance-attestation/index.js.map +1 -1
  607. package/lib/module/wallet-instance-attestation/v1.0.0/index.js +2 -2
  608. package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -1
  609. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +15 -15
  610. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -1
  611. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +2 -2
  612. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -1
  613. package/lib/module/wallet-instance-attestation/v1.0.0/types.js +5 -5
  614. package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -1
  615. package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +1 -1
  616. package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -1
  617. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/index.js +2 -2
  618. package/lib/module/wallet-instance-attestation/v1.4.6/index.js.map +1 -0
  619. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/issuing.js +20 -20
  620. package/lib/module/wallet-instance-attestation/v1.4.6/issuing.js.map +1 -0
  621. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.js.map +1 -1
  622. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.js.map +1 -1
  623. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/utils.js +1 -1
  624. package/lib/module/wallet-instance-attestation/v1.4.6/utils.js.map +1 -0
  625. package/lib/typescript/IoWallet.d.ts +4 -4
  626. package/lib/typescript/IoWallet.d.ts.map +1 -1
  627. package/lib/typescript/api/index.d.ts +14 -14
  628. package/lib/typescript/api/index.d.ts.map +1 -1
  629. package/lib/typescript/client/index.d.ts +2 -2
  630. package/lib/typescript/client/index.d.ts.map +1 -1
  631. package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +8 -8
  632. package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -1
  633. package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +30 -30
  634. package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -1
  635. package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +2 -2
  636. package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -1
  637. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +8 -8
  638. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -1
  639. package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +1 -1
  640. package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -1
  641. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +52 -52
  642. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -1
  643. package/lib/typescript/credential/issuance/api/index.d.ts +2 -2
  644. package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -1
  645. package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +30 -30
  646. package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -1
  647. package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +25 -25
  648. package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -1
  649. package/lib/typescript/credential/issuance/api/types.d.ts +8 -11
  650. package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -1
  651. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +2 -2
  652. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -1
  653. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -1
  654. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -1
  655. package/lib/typescript/credential/issuance/common/errors.d.ts +0 -1
  656. package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -1
  657. package/lib/typescript/credential/issuance/index.d.ts +1 -1
  658. package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts.map +1 -1
  659. package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts +2 -2
  660. package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts.map +1 -1
  661. package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts +2 -2
  662. package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts.map +1 -1
  663. package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts.map +1 -1
  664. package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -1
  665. package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -1
  666. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +1 -1
  667. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
  668. package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -1
  669. package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -1
  670. package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -1
  671. package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -1
  672. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +130 -130
  673. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -1
  674. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -1
  675. package/lib/typescript/credential/issuance/v1.4.6/01-evaluate-issuer-trust.d.ts.map +1 -0
  676. package/lib/typescript/credential/issuance/v1.4.6/02-start-user-authorization.d.ts.map +1 -0
  677. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/03-complete-user-authorization.d.ts +1 -1
  678. package/lib/typescript/credential/issuance/v1.4.6/03-complete-user-authorization.d.ts.map +1 -0
  679. package/lib/typescript/credential/issuance/v1.4.6/04-authorize-access.d.ts.map +1 -0
  680. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/05-obtain-credential.d.ts +8 -8
  681. package/lib/typescript/credential/issuance/v1.4.6/05-obtain-credential.d.ts.map +1 -0
  682. package/lib/typescript/credential/issuance/v1.4.6/06-verify-and-parse-credential.d.ts.map +1 -0
  683. package/lib/typescript/credential/issuance/v1.4.6/index.d.ts.map +1 -0
  684. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/mappers.d.ts +52 -45
  685. package/lib/typescript/credential/issuance/v1.4.6/mappers.d.ts.map +1 -0
  686. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/types.d.ts.map +1 -1
  687. package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts +1 -1
  688. package/lib/typescript/credential/offer/api/03-validate-credential-offer.d.ts.map +1 -1
  689. package/lib/typescript/credential/offer/api/index.d.ts +1 -1
  690. package/lib/typescript/credential/offer/api/index.d.ts.map +1 -1
  691. package/lib/typescript/credential/offer/common/errors.d.ts +0 -2
  692. package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -1
  693. package/lib/typescript/credential/offer/index.d.ts +1 -1
  694. package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -1
  695. package/lib/typescript/credential/offer/{v1.3.3 → v1.4.6}/01-resolve-credential-offer.d.ts +1 -1
  696. package/lib/typescript/credential/offer/v1.4.6/01-resolve-credential-offer.d.ts.map +1 -0
  697. package/lib/typescript/credential/offer/{v1.3.3 → v1.4.6}/02-extract-grant-details.d.ts +1 -1
  698. package/lib/typescript/credential/offer/v1.4.6/02-extract-grant-details.d.ts.map +1 -0
  699. package/lib/typescript/credential/offer/{v1.3.3 → v1.4.6}/03-validate-credential-offer.d.ts +1 -1
  700. package/lib/typescript/credential/offer/v1.4.6/03-validate-credential-offer.d.ts.map +1 -0
  701. package/lib/typescript/credential/offer/v1.4.6/index.d.ts.map +1 -0
  702. package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +3 -3
  703. package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -1
  704. package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts +12 -12
  705. package/lib/typescript/credential/presentation/api/06-evaluate-dcql-query.d.ts.map +1 -1
  706. package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts +17 -17
  707. package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts.map +1 -1
  708. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +19 -19
  709. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -1
  710. package/lib/typescript/credential/presentation/api/index.d.ts +1 -1
  711. package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -1
  712. package/lib/typescript/credential/presentation/api/types.d.ts +75 -75
  713. package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
  714. package/lib/typescript/credential/presentation/common/errors.d.ts +24 -24
  715. package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -1
  716. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +5 -5
  717. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -1
  718. package/lib/typescript/credential/presentation/common/utils/mdoc.d.ts.map +1 -1
  719. package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -1
  720. package/lib/typescript/credential/presentation/index.d.ts +1 -1
  721. package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -1
  722. package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -1
  723. package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -1
  724. package/lib/typescript/credential/presentation/v1.0.0/05-verify-request-object.d.ts.map +1 -1
  725. package/lib/typescript/credential/presentation/v1.0.0/06-evaluate-dcql-query.d.ts.map +1 -1
  726. package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts +1 -1
  727. package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts.map +1 -1
  728. package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -1
  729. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +51 -51
  730. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -1
  731. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +10 -10
  732. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -1
  733. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +1 -1
  734. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -1
  735. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +1 -1
  736. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -1
  737. package/lib/typescript/credential/presentation/v1.4.6/01-start-flow.d.ts.map +1 -0
  738. package/lib/typescript/credential/presentation/v1.4.6/02-evaluate-rp-trust.d.ts.map +1 -0
  739. package/lib/typescript/credential/presentation/v1.4.6/03-get-request-object.d.ts.map +1 -0
  740. package/lib/typescript/credential/presentation/v1.4.6/04-verify-certificate-chain.d.ts.map +1 -0
  741. package/lib/typescript/credential/presentation/v1.4.6/05-verify-request-object.d.ts.map +1 -0
  742. package/lib/typescript/credential/presentation/v1.4.6/06-evaluate-dcql-query.d.ts.map +1 -0
  743. package/lib/typescript/credential/presentation/v1.4.6/07-send-authorization-response.d.ts.map +1 -0
  744. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/index.d.ts.map +1 -1
  745. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/mappers.d.ts +44 -42
  746. package/lib/typescript/credential/presentation/v1.4.6/mappers.d.ts.map +1 -0
  747. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/sdkErrorMapper.d.ts.map +1 -1
  748. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/types.d.ts +4 -3
  749. package/lib/typescript/credential/presentation/v1.4.6/types.d.ts.map +1 -0
  750. package/lib/typescript/credential/status/api/index.d.ts +3 -3
  751. package/lib/typescript/credential/status/api/index.d.ts.map +1 -1
  752. package/lib/typescript/credential/status/api/status-assertion.d.ts +3 -3
  753. package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -1
  754. package/lib/typescript/credential/status/api/status-list.d.ts +11 -11
  755. package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -1
  756. package/lib/typescript/credential/status/api/types.d.ts +12 -12
  757. package/lib/typescript/credential/status/api/types.d.ts.map +1 -1
  758. package/lib/typescript/credential/status/index.d.ts +1 -1
  759. package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -1
  760. package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -1
  761. package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -1
  762. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +7 -7
  763. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -1
  764. package/lib/typescript/credential/status/v1.0.0/types.d.ts +27 -27
  765. package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -1
  766. package/lib/typescript/credential/status/v1.4.6/01-status-list.d.ts.map +1 -0
  767. package/lib/typescript/credential/status/v1.4.6/02-verify-and-parse-status-list.d.ts.map +1 -0
  768. package/lib/typescript/credential/status/v1.4.6/03-get-status.d.ts.map +1 -0
  769. package/lib/typescript/credential/status/v1.4.6/index.d.ts.map +1 -0
  770. package/lib/typescript/credential/trustmark/api/index.d.ts +11 -11
  771. package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -1
  772. package/lib/typescript/credential/trustmark/index.d.ts +1 -1
  773. package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -1
  774. package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -1
  775. package/lib/typescript/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.d.ts.map +1 -1
  776. package/lib/typescript/credential/trustmark/v1.4.6/index.d.ts.map +1 -0
  777. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +171 -168
  778. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
  779. package/lib/typescript/credentials-catalogue/api/index.d.ts +11 -11
  780. package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -1
  781. package/lib/typescript/credentials-catalogue/common/get-status-l10n-ids.d.ts.map +1 -1
  782. package/lib/typescript/credentials-catalogue/index.d.ts +1 -1
  783. package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -1
  784. package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -1
  785. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +72 -71
  786. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
  787. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +91 -91
  788. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -1
  789. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-and-parse-catalogue.d.ts.map +1 -1
  790. package/lib/typescript/credentials-catalogue/v1.4.6/fetch-translations.d.ts.map +1 -0
  791. package/lib/typescript/credentials-catalogue/v1.4.6/index.d.ts.map +1 -0
  792. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/mappers.d.ts +158 -157
  793. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/mappers.d.ts.map +1 -1
  794. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/types.d.ts +190 -190
  795. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/types.d.ts.map +1 -1
  796. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/utils.d.ts +3 -3
  797. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/utils.d.ts.map +1 -1
  798. package/lib/typescript/index.d.ts +12 -12
  799. package/lib/typescript/index.d.ts.map +1 -1
  800. package/lib/typescript/{wallet-unit-attestation → key-attestation}/api/index.d.ts +24 -24
  801. package/lib/typescript/key-attestation/api/index.d.ts.map +1 -0
  802. package/lib/typescript/{wallet-unit-attestation → key-attestation}/api/types.d.ts +13 -13
  803. package/lib/typescript/key-attestation/api/types.d.ts.map +1 -0
  804. package/lib/typescript/key-attestation/index.d.ts +4 -0
  805. package/lib/typescript/key-attestation/index.d.ts.map +1 -0
  806. package/lib/typescript/key-attestation/v1.0.0/index.d.ts +3 -0
  807. package/lib/typescript/key-attestation/v1.0.0/index.d.ts.map +1 -0
  808. package/lib/typescript/key-attestation/v1.4.6/index.d.ts +3 -0
  809. package/lib/typescript/key-attestation/v1.4.6/index.d.ts.map +1 -0
  810. package/lib/typescript/key-attestation/v1.4.6/issuing.d.ts +3 -0
  811. package/lib/typescript/key-attestation/v1.4.6/issuing.d.ts.map +1 -0
  812. package/lib/typescript/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/mappers.d.ts +12 -12
  813. package/lib/typescript/key-attestation/v1.4.6/mappers.d.ts.map +1 -0
  814. package/lib/typescript/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/types.d.ts +10 -10
  815. package/lib/typescript/key-attestation/v1.4.6/types.d.ts.map +1 -0
  816. package/lib/typescript/key-attestation/v1.4.6/utils.d.ts +7 -0
  817. package/lib/typescript/key-attestation/v1.4.6/utils.d.ts.map +1 -0
  818. package/lib/typescript/mdoc/index.d.ts.map +1 -1
  819. package/lib/typescript/mdoc/utils.d.ts +2 -2
  820. package/lib/typescript/mdoc/utils.d.ts.map +1 -1
  821. package/lib/typescript/sd-jwt/index.d.ts +10 -10
  822. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  823. package/lib/typescript/sd-jwt/types.d.ts +17 -17
  824. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  825. package/lib/typescript/sd-jwt/utils.d.ts +4 -3
  826. package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
  827. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +17 -17
  828. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -1
  829. package/lib/typescript/trust/api/index.d.ts +11 -11
  830. package/lib/typescript/trust/api/index.d.ts.map +1 -1
  831. package/lib/typescript/trust/common/build-chain.d.ts +3 -3
  832. package/lib/typescript/trust/common/build-chain.d.ts.map +1 -1
  833. package/lib/typescript/trust/common/errors.d.ts +43 -43
  834. package/lib/typescript/trust/common/errors.d.ts.map +1 -1
  835. package/lib/typescript/trust/common/types.d.ts +37 -37
  836. package/lib/typescript/trust/common/types.d.ts.map +1 -1
  837. package/lib/typescript/trust/common/utils.d.ts +17 -17
  838. package/lib/typescript/trust/common/utils.d.ts.map +1 -1
  839. package/lib/typescript/trust/common/verify-chain.d.ts +9 -9
  840. package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -1
  841. package/lib/typescript/trust/v1.0.0/entities.d.ts +325 -325
  842. package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -1
  843. package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -1
  844. package/lib/typescript/trust/v1.0.0/mappers.d.ts +42 -42
  845. package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -1
  846. package/lib/typescript/trust/v1.0.0/types.d.ts +331 -331
  847. package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -1
  848. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -1
  849. package/lib/typescript/trust/{v1.3.3 → v1.4.6}/entities.d.ts +25 -24
  850. package/lib/typescript/trust/{v1.3.3 → v1.4.6}/entities.d.ts.map +1 -1
  851. package/lib/typescript/trust/{v1.3.3 → v1.4.6}/types.d.ts +210 -206
  852. package/lib/typescript/trust/{v1.3.3 → v1.4.6}/types.d.ts.map +1 -1
  853. package/lib/typescript/utils/auth.d.ts +1 -1
  854. package/lib/typescript/utils/callbacks.d.ts +1 -1
  855. package/lib/typescript/utils/callbacks.d.ts.map +1 -1
  856. package/lib/typescript/utils/config.d.ts +0 -4
  857. package/lib/typescript/utils/config.d.ts.map +1 -1
  858. package/lib/typescript/utils/credentials.d.ts.map +1 -1
  859. package/lib/typescript/utils/crypto.d.ts +1 -1
  860. package/lib/typescript/utils/crypto.d.ts.map +1 -1
  861. package/lib/typescript/utils/decoder.d.ts +1 -1
  862. package/lib/typescript/utils/decoder.d.ts.map +1 -1
  863. package/lib/typescript/utils/dpop.d.ts +3 -3
  864. package/lib/typescript/utils/dpop.d.ts.map +1 -1
  865. package/lib/typescript/utils/error-codes.d.ts +18 -18
  866. package/lib/typescript/utils/error-codes.d.ts.map +1 -1
  867. package/lib/typescript/utils/errors.d.ts +49 -51
  868. package/lib/typescript/utils/errors.d.ts.map +1 -1
  869. package/lib/typescript/utils/integrity.d.ts +9 -9
  870. package/lib/typescript/utils/integrity.d.ts.map +1 -1
  871. package/lib/typescript/utils/jwk.d.ts +3 -3
  872. package/lib/typescript/utils/jwk.d.ts.map +1 -1
  873. package/lib/typescript/utils/logging.d.ts +10 -10
  874. package/lib/typescript/utils/logging.d.ts.map +1 -1
  875. package/lib/typescript/utils/mappers.d.ts.map +1 -1
  876. package/lib/typescript/utils/misc.d.ts +2 -2
  877. package/lib/typescript/utils/misc.d.ts.map +1 -1
  878. package/lib/typescript/utils/par.d.ts +13 -13
  879. package/lib/typescript/utils/par.d.ts.map +1 -1
  880. package/lib/typescript/utils/parser.d.ts +2 -2
  881. package/lib/typescript/utils/parser.d.ts.map +1 -1
  882. package/lib/typescript/utils/pop.d.ts +2 -2
  883. package/lib/typescript/utils/pop.d.ts.map +1 -1
  884. package/lib/typescript/utils/string.d.ts.map +1 -1
  885. package/lib/typescript/utils/x509.d.ts.map +1 -1
  886. package/lib/typescript/utils/zod.d.ts +5 -5
  887. package/lib/typescript/utils/zod.d.ts.map +1 -1
  888. package/lib/typescript/wallet-instance/api/index.d.ts +19 -19
  889. package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -1
  890. package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -1
  891. package/lib/typescript/wallet-instance/index.d.ts +1 -1
  892. package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -1
  893. package/lib/typescript/wallet-instance/v1.4.6/index.d.ts.map +1 -0
  894. package/lib/typescript/wallet-instance-attestation/api/index.d.ts +15 -15
  895. package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -1
  896. package/lib/typescript/wallet-instance-attestation/api/types.d.ts +10 -10
  897. package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -1
  898. package/lib/typescript/wallet-instance-attestation/common/types.d.ts +5 -5
  899. package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -1
  900. package/lib/typescript/wallet-instance-attestation/index.d.ts +1 -1
  901. package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -1
  902. package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -1
  903. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +12 -12
  904. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +14 -14
  905. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -1
  906. package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -1
  907. package/lib/typescript/wallet-instance-attestation/v1.4.6/index.d.ts.map +1 -0
  908. package/lib/typescript/wallet-instance-attestation/v1.4.6/issuing.d.ts.map +1 -0
  909. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.d.ts +10 -10
  910. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.d.ts.map +1 -1
  911. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.d.ts +5 -5
  912. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.d.ts.map +1 -1
  913. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/utils.d.ts.map +1 -1
  914. package/package.json +15 -12
  915. package/src/IoWallet.ts +11 -9
  916. package/src/api/index.ts +31 -32
  917. package/src/client/index.ts +14 -13
  918. package/src/credential/issuance/README.md +9 -9
  919. package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +1 -1
  920. package/src/credential/issuance/api/02-start-user-authorization.ts +9 -8
  921. package/src/credential/issuance/api/03-complete-user-authorization.ts +41 -40
  922. package/src/credential/issuance/api/04-authorize-access.ts +4 -3
  923. package/src/credential/issuance/api/05-obtain-credential.ts +11 -10
  924. package/src/credential/issuance/api/06-verify-and-parse-credential.ts +3 -2
  925. package/src/credential/issuance/api/IssuerConfig.ts +20 -19
  926. package/src/credential/issuance/api/index.ts +4 -4
  927. package/src/credential/issuance/api/mrtd-pop/index.ts +39 -38
  928. package/src/credential/issuance/api/mrtd-pop/types.ts +27 -27
  929. package/src/credential/issuance/api/types.ts +9 -8
  930. package/src/credential/issuance/common/02-start-user-authorization.ts +20 -14
  931. package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +39 -34
  932. package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +32 -29
  933. package/src/credential/issuance/common/errors.ts +0 -4
  934. package/src/credential/issuance/index.ts +1 -1
  935. package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +7 -5
  936. package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +22 -20
  937. package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +24 -21
  938. package/src/credential/issuance/mrtd-pop/index.ts +8 -7
  939. package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +3 -2
  940. package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +15 -14
  941. package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +45 -43
  942. package/src/credential/issuance/v1.0.0/04-authorize-access.ts +17 -15
  943. package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +39 -22
  944. package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +5 -4
  945. package/src/credential/issuance/v1.0.0/index.ts +11 -10
  946. package/src/credential/issuance/v1.0.0/mappers.ts +12 -11
  947. package/src/credential/issuance/v1.0.0/types.ts +2 -1
  948. package/src/credential/issuance/{v1.3.3 → v1.4.6}/01-evaluate-issuer-trust.ts +6 -4
  949. package/src/credential/issuance/{v1.3.3 → v1.4.6}/02-start-user-authorization.ts +33 -30
  950. package/src/credential/issuance/{v1.3.3 → v1.4.6}/03-complete-user-authorization.ts +55 -54
  951. package/src/credential/issuance/{v1.3.3 → v1.4.6}/04-authorize-access.ts +20 -18
  952. package/src/credential/issuance/{v1.3.3 → v1.4.6}/05-obtain-credential.ts +57 -53
  953. package/src/credential/issuance/{v1.3.3 → v1.4.6}/06-verify-and-parse-credential.ts +5 -4
  954. package/src/credential/issuance/{v1.3.3 → v1.4.6}/index.ts +11 -10
  955. package/src/credential/issuance/{v1.3.3 → v1.4.6}/mappers.ts +25 -22
  956. package/src/credential/offer/README.md +10 -6
  957. package/src/credential/offer/api/01-resolve-credential-offer.ts +1 -1
  958. package/src/credential/offer/api/03-validate-credential-offer.ts +2 -1
  959. package/src/credential/offer/api/index.ts +2 -2
  960. package/src/credential/offer/common/errors.ts +0 -8
  961. package/src/credential/offer/index.ts +1 -1
  962. package/src/credential/offer/v1.0.0/index.ts +5 -4
  963. package/src/credential/offer/{v1.3.3 → v1.4.6}/01-resolve-credential-offer.ts +8 -6
  964. package/src/credential/offer/{v1.3.3 → v1.4.6}/02-extract-grant-details.ts +9 -7
  965. package/src/credential/offer/{v1.3.3 → v1.4.6}/03-validate-credential-offer.ts +9 -7
  966. package/src/credential/offer/{v1.3.3 → v1.4.6}/index.ts +2 -1
  967. package/src/credential/presentation/api/01-start-flow.ts +4 -4
  968. package/src/credential/presentation/api/02-evaluate-rp-trust.ts +1 -1
  969. package/src/credential/presentation/api/03-get-request-object.ts +1 -1
  970. package/src/credential/presentation/api/04-verify-certificate-chain.ts +1 -1
  971. package/src/credential/presentation/api/05-verify-request-object.ts +1 -1
  972. package/src/credential/presentation/api/06-evaluate-dcql-query.ts +14 -14
  973. package/src/credential/presentation/api/07-send-authorization-response.ts +21 -19
  974. package/src/credential/presentation/api/RelyingPartyConfig.ts +8 -7
  975. package/src/credential/presentation/api/index.ts +4 -4
  976. package/src/credential/presentation/api/types.ts +70 -68
  977. package/src/credential/presentation/common/errors.ts +32 -35
  978. package/src/credential/presentation/common/utils/dcql.ts +34 -30
  979. package/src/credential/presentation/common/utils/http.ts +2 -2
  980. package/src/credential/presentation/common/utils/mdoc.ts +17 -15
  981. package/src/credential/presentation/common/utils/sd-jwt.ts +19 -16
  982. package/src/credential/presentation/index.ts +1 -1
  983. package/src/credential/presentation/v1.0.0/01-start-flow.ts +4 -3
  984. package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +3 -2
  985. package/src/credential/presentation/v1.0.0/03-get-request-object.ts +6 -5
  986. package/src/credential/presentation/v1.0.0/05-verify-request-object.ts +14 -12
  987. package/src/credential/presentation/v1.0.0/06-evaluate-dcql-query.ts +26 -15
  988. package/src/credential/presentation/v1.0.0/07-send-authorization-response.ts +23 -21
  989. package/src/credential/presentation/v1.0.0/index.ts +6 -5
  990. package/src/credential/presentation/v1.0.0/mappers.ts +9 -8
  991. package/src/credential/presentation/v1.0.0/types.ts +11 -10
  992. package/src/credential/presentation/v1.0.0/utils.jwks.ts +4 -3
  993. package/src/credential/presentation/v1.0.0/utils.ts +4 -3
  994. package/src/credential/presentation/{v1.3.3 → v1.4.6}/01-start-flow.ts +13 -7
  995. package/src/credential/presentation/{v1.3.3 → v1.4.6}/02-evaluate-rp-trust.ts +3 -2
  996. package/src/credential/presentation/{v1.3.3 → v1.4.6}/03-get-request-object.ts +4 -2
  997. package/src/credential/presentation/{v1.3.3 → v1.4.6}/04-verify-certificate-chain.ts +9 -7
  998. package/src/credential/presentation/{v1.3.3 → v1.4.6}/05-verify-request-object.ts +25 -22
  999. package/src/credential/presentation/{v1.3.3 → v1.4.6}/06-evaluate-dcql-query.ts +37 -23
  1000. package/src/credential/presentation/{v1.3.3 → v1.4.6}/07-send-authorization-response.ts +40 -32
  1001. package/src/credential/presentation/{v1.3.3 → v1.4.6}/index.ts +7 -6
  1002. package/src/credential/presentation/{v1.3.3 → v1.4.6}/mappers.ts +13 -12
  1003. package/src/credential/presentation/{v1.3.3 → v1.4.6}/sdkErrorMapper.ts +9 -7
  1004. package/src/credential/status/README.md +2 -2
  1005. package/src/credential/status/api/index.ts +4 -4
  1006. package/src/credential/status/api/status-assertion.ts +7 -6
  1007. package/src/credential/status/api/status-list.ts +17 -17
  1008. package/src/credential/status/api/types.ts +12 -11
  1009. package/src/credential/status/index.ts +1 -1
  1010. package/src/credential/status/v1.0.0/01-status-assertion.ts +22 -16
  1011. package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +27 -17
  1012. package/src/credential/status/v1.0.0/index.ts +2 -1
  1013. package/src/credential/status/v1.0.0/mappers.ts +2 -1
  1014. package/src/credential/status/v1.0.0/types.ts +17 -16
  1015. package/src/credential/status/{v1.3.3 → v1.4.6}/01-status-list.ts +9 -7
  1016. package/src/credential/status/{v1.3.3 → v1.4.6}/02-verify-and-parse-status-list.ts +3 -1
  1017. package/src/credential/status/{v1.3.3 → v1.4.6}/03-get-status.ts +8 -6
  1018. package/src/credential/status/{v1.3.3 → v1.4.6}/index.ts +3 -2
  1019. package/src/credential/trustmark/api/index.ts +11 -11
  1020. package/src/credential/trustmark/index.ts +1 -1
  1021. package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +14 -13
  1022. package/src/credential/trustmark/v1.0.0/index.ts +2 -1
  1023. package/src/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.ts +1 -1
  1024. package/src/credential/trustmark/{v1.3.3 → v1.4.6}/index.ts +2 -1
  1025. package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +49 -47
  1026. package/src/credentials-catalogue/api/index.ts +14 -12
  1027. package/src/credentials-catalogue/common/get-status-l10n-ids.ts +4 -4
  1028. package/src/credentials-catalogue/index.ts +1 -1
  1029. package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +7 -6
  1030. package/src/credentials-catalogue/v1.0.0/index.ts +2 -1
  1031. package/src/credentials-catalogue/v1.0.0/mappers.ts +2 -3
  1032. package/src/credentials-catalogue/v1.0.0/types.ts +33 -32
  1033. package/src/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-and-parse-catalogue.ts +15 -15
  1034. package/src/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-translations.ts +4 -3
  1035. package/src/credentials-catalogue/{v1.3.3 → v1.4.6}/index.ts +2 -1
  1036. package/src/credentials-catalogue/{v1.3.3 → v1.4.6}/mappers.ts +28 -27
  1037. package/src/credentials-catalogue/{v1.3.3 → v1.4.6}/types.ts +87 -86
  1038. package/src/credentials-catalogue/{v1.3.3 → v1.4.6}/utils.ts +16 -14
  1039. package/src/index.ts +26 -24
  1040. package/{lib/module/wallet-unit-attestation → src/key-attestation}/README.md +9 -9
  1041. package/src/{wallet-unit-attestation → key-attestation}/api/index.ts +26 -28
  1042. package/src/{wallet-unit-attestation → key-attestation}/api/types.ts +14 -15
  1043. package/src/key-attestation/index.ts +3 -0
  1044. package/src/key-attestation/v1.0.0/index.ts +5 -0
  1045. package/src/key-attestation/v1.4.6/index.ts +12 -0
  1046. package/src/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/issuing.ts +44 -36
  1047. package/src/key-attestation/v1.4.6/mappers.ts +10 -0
  1048. package/src/key-attestation/v1.4.6/types.ts +20 -0
  1049. package/src/{wallet-unit-attestation/v1.3.3 → key-attestation/v1.4.6}/utils.ts +5 -4
  1050. package/src/mdoc/index.ts +26 -11
  1051. package/src/mdoc/utils.ts +6 -4
  1052. package/src/sd-jwt/__test__/types.test.ts +6 -6
  1053. package/src/sd-jwt/__test__/utils.test.ts +2 -2
  1054. package/src/sd-jwt/index.ts +10 -8
  1055. package/src/sd-jwt/types.ts +16 -15
  1056. package/src/sd-jwt/utils.ts +17 -12
  1057. package/src/trust/api/TrustAnchorConfig.ts +3 -2
  1058. package/src/trust/api/index.ts +19 -16
  1059. package/src/trust/common/build-chain.ts +28 -18
  1060. package/src/trust/common/errors.ts +58 -50
  1061. package/src/trust/common/types.ts +22 -21
  1062. package/src/trust/common/utils.ts +65 -64
  1063. package/src/trust/common/verify-chain.ts +140 -138
  1064. package/src/trust/v1.0.0/build-chain.ts +1 -1
  1065. package/src/trust/v1.0.0/entities.ts +18 -16
  1066. package/src/trust/v1.0.0/index.ts +5 -4
  1067. package/src/trust/v1.0.0/mappers.ts +3 -2
  1068. package/src/trust/v1.0.0/types.ts +43 -42
  1069. package/src/trust/v1.0.0/verify-chain.ts +3 -2
  1070. package/src/trust/{v1.3.3 → v1.4.6}/entities.ts +7 -5
  1071. package/src/trust/{v1.3.3 → v1.4.6}/types.ts +10 -9
  1072. package/src/utils/auth.ts +1 -1
  1073. package/src/utils/callbacks.ts +38 -38
  1074. package/src/utils/config.ts +0 -7
  1075. package/src/utils/credentials.ts +7 -5
  1076. package/src/utils/crypto.ts +36 -36
  1077. package/src/utils/decoder.ts +7 -5
  1078. package/src/utils/dpop.ts +5 -6
  1079. package/src/utils/error-codes.ts +20 -20
  1080. package/src/utils/errors.ts +89 -87
  1081. package/src/utils/integrity.ts +11 -11
  1082. package/src/utils/jwk.ts +4 -4
  1083. package/src/utils/logging.ts +21 -20
  1084. package/src/utils/mappers.ts +14 -11
  1085. package/src/utils/misc.ts +15 -12
  1086. package/src/utils/par.ts +30 -29
  1087. package/src/utils/parser.ts +4 -4
  1088. package/src/utils/pop.ts +4 -5
  1089. package/src/utils/string.ts +2 -2
  1090. package/src/utils/x509.ts +5 -4
  1091. package/src/utils/zod.ts +4 -4
  1092. package/src/wallet-instance/api/index.ts +24 -24
  1093. package/src/wallet-instance/common/wallet-instance.ts +8 -7
  1094. package/src/wallet-instance/index.ts +1 -1
  1095. package/src/wallet-instance/v1.0.0/index.ts +5 -4
  1096. package/src/wallet-instance/{v1.3.3 → v1.4.6}/index.ts +5 -4
  1097. package/src/wallet-instance-attestation/api/index.ts +18 -17
  1098. package/src/wallet-instance-attestation/api/types.ts +12 -11
  1099. package/src/wallet-instance-attestation/common/types.ts +7 -6
  1100. package/src/wallet-instance-attestation/index.ts +1 -1
  1101. package/src/wallet-instance-attestation/v1.0.0/index.ts +3 -2
  1102. package/src/wallet-instance-attestation/v1.0.0/issuing.ts +22 -20
  1103. package/src/wallet-instance-attestation/v1.0.0/mappers.ts +2 -2
  1104. package/src/wallet-instance-attestation/v1.0.0/types.ts +10 -9
  1105. package/src/wallet-instance-attestation/v1.0.0/utils.ts +3 -2
  1106. package/src/wallet-instance-attestation/{v1.3.3 → v1.4.6}/index.ts +4 -3
  1107. package/src/wallet-instance-attestation/{v1.3.3 → v1.4.6}/issuing.ts +25 -23
  1108. package/src/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.ts +3 -2
  1109. package/src/wallet-instance-attestation/{v1.3.3 → v1.4.6}/utils.ts +3 -2
  1110. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +0 -1
  1111. package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +0 -1
  1112. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +0 -1
  1113. package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +0 -1
  1114. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +0 -1
  1115. package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +0 -1
  1116. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +0 -1
  1117. package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +0 -1
  1118. package/lib/commonjs/credential/offer/v1.3.3/03-validate-credential-offer.js.map +0 -1
  1119. package/lib/commonjs/credential/offer/v1.3.3/index.js.map +0 -1
  1120. package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +0 -1
  1121. package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js.map +0 -1
  1122. package/lib/commonjs/credential/presentation/v1.3.3/06-evaluate-dcql-query.js.map +0 -1
  1123. package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js.map +0 -1
  1124. package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +0 -1
  1125. package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +0 -1
  1126. package/lib/commonjs/credential/status/v1.3.3/index.js.map +0 -1
  1127. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +0 -1
  1128. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +0 -1
  1129. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +0 -1
  1130. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +0 -1
  1131. package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +0 -1
  1132. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +0 -1
  1133. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +0 -1
  1134. package/lib/commonjs/wallet-unit-attestation/api/types.js.map +0 -1
  1135. package/lib/commonjs/wallet-unit-attestation/index.js.map +0 -1
  1136. package/lib/commonjs/wallet-unit-attestation/v1.0.0/index.js +0 -11
  1137. package/lib/commonjs/wallet-unit-attestation/v1.0.0/index.js.map +0 -1
  1138. package/lib/commonjs/wallet-unit-attestation/v1.3.3/index.js.map +0 -1
  1139. package/lib/commonjs/wallet-unit-attestation/v1.3.3/issuing.js.map +0 -1
  1140. package/lib/commonjs/wallet-unit-attestation/v1.3.3/mappers.js +0 -13
  1141. package/lib/commonjs/wallet-unit-attestation/v1.3.3/mappers.js.map +0 -1
  1142. package/lib/commonjs/wallet-unit-attestation/v1.3.3/types.js.map +0 -1
  1143. package/lib/commonjs/wallet-unit-attestation/v1.3.3/utils.js.map +0 -1
  1144. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +0 -1
  1145. package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +0 -1
  1146. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +0 -1
  1147. package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +0 -1
  1148. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +0 -1
  1149. package/lib/module/credential/issuance/v1.3.3/index.js.map +0 -1
  1150. package/lib/module/credential/issuance/v1.3.3/mappers.js.map +0 -1
  1151. package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +0 -1
  1152. package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +0 -1
  1153. package/lib/module/credential/offer/v1.3.3/03-validate-credential-offer.js.map +0 -1
  1154. package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +0 -1
  1155. package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js.map +0 -1
  1156. package/lib/module/credential/presentation/v1.3.3/06-evaluate-dcql-query.js.map +0 -1
  1157. package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js.map +0 -1
  1158. package/lib/module/credential/presentation/v1.3.3/mappers.js.map +0 -1
  1159. package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +0 -1
  1160. package/lib/module/credential/presentation/v1.3.3/types.js.map +0 -1
  1161. package/lib/module/credential/status/v1.3.3/03-get-status.js.map +0 -1
  1162. package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +0 -1
  1163. package/lib/module/credentials-catalogue/v1.3.3/index.js.map +0 -1
  1164. package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +0 -1
  1165. package/lib/module/credentials-catalogue/v1.3.3/types.js.map +0 -1
  1166. package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +0 -1
  1167. package/lib/module/trust/v1.3.3/types.js.map +0 -1
  1168. package/lib/module/wallet-instance/v1.3.3/index.js +0 -8
  1169. package/lib/module/wallet-instance/v1.3.3/index.js.map +0 -1
  1170. package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +0 -1
  1171. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +0 -1
  1172. package/lib/module/wallet-instance-attestation/v1.3.3/utils.js.map +0 -1
  1173. package/lib/module/wallet-unit-attestation/api/types.js.map +0 -1
  1174. package/lib/module/wallet-unit-attestation/index.js +0 -3
  1175. package/lib/module/wallet-unit-attestation/index.js.map +0 -1
  1176. package/lib/module/wallet-unit-attestation/v1.0.0/index.js +0 -4
  1177. package/lib/module/wallet-unit-attestation/v1.0.0/index.js.map +0 -1
  1178. package/lib/module/wallet-unit-attestation/v1.3.3/index.js +0 -10
  1179. package/lib/module/wallet-unit-attestation/v1.3.3/index.js.map +0 -1
  1180. package/lib/module/wallet-unit-attestation/v1.3.3/issuing.js.map +0 -1
  1181. package/lib/module/wallet-unit-attestation/v1.3.3/mappers.js +0 -6
  1182. package/lib/module/wallet-unit-attestation/v1.3.3/mappers.js.map +0 -1
  1183. package/lib/module/wallet-unit-attestation/v1.3.3/types.js +0 -14
  1184. package/lib/module/wallet-unit-attestation/v1.3.3/types.js.map +0 -1
  1185. package/lib/module/wallet-unit-attestation/v1.3.3/utils.js.map +0 -1
  1186. package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +0 -1
  1187. package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +0 -1
  1188. package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +0 -1
  1189. package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +0 -1
  1190. package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +0 -1
  1191. package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +0 -1
  1192. package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +0 -1
  1193. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +0 -1
  1194. package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +0 -1
  1195. package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +0 -1
  1196. package/lib/typescript/credential/offer/v1.3.3/03-validate-credential-offer.d.ts.map +0 -1
  1197. package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +0 -1
  1198. package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +0 -1
  1199. package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +0 -1
  1200. package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +0 -1
  1201. package/lib/typescript/credential/presentation/v1.3.3/04-verify-certificate-chain.d.ts.map +0 -1
  1202. package/lib/typescript/credential/presentation/v1.3.3/05-verify-request-object.d.ts.map +0 -1
  1203. package/lib/typescript/credential/presentation/v1.3.3/06-evaluate-dcql-query.d.ts.map +0 -1
  1204. package/lib/typescript/credential/presentation/v1.3.3/07-send-authorization-response.d.ts.map +0 -1
  1205. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +0 -1
  1206. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +0 -1
  1207. package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +0 -1
  1208. package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +0 -1
  1209. package/lib/typescript/credential/status/v1.3.3/03-get-status.d.ts.map +0 -1
  1210. package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +0 -1
  1211. package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +0 -1
  1212. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-translations.d.ts.map +0 -1
  1213. package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +0 -1
  1214. package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +0 -1
  1215. package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +0 -1
  1216. package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +0 -1
  1217. package/lib/typescript/wallet-unit-attestation/api/index.d.ts.map +0 -1
  1218. package/lib/typescript/wallet-unit-attestation/api/types.d.ts.map +0 -1
  1219. package/lib/typescript/wallet-unit-attestation/index.d.ts +0 -4
  1220. package/lib/typescript/wallet-unit-attestation/index.d.ts.map +0 -1
  1221. package/lib/typescript/wallet-unit-attestation/v1.0.0/index.d.ts +0 -3
  1222. package/lib/typescript/wallet-unit-attestation/v1.0.0/index.d.ts.map +0 -1
  1223. package/lib/typescript/wallet-unit-attestation/v1.3.3/index.d.ts +0 -3
  1224. package/lib/typescript/wallet-unit-attestation/v1.3.3/index.d.ts.map +0 -1
  1225. package/lib/typescript/wallet-unit-attestation/v1.3.3/issuing.d.ts +0 -3
  1226. package/lib/typescript/wallet-unit-attestation/v1.3.3/issuing.d.ts.map +0 -1
  1227. package/lib/typescript/wallet-unit-attestation/v1.3.3/mappers.d.ts.map +0 -1
  1228. package/lib/typescript/wallet-unit-attestation/v1.3.3/types.d.ts.map +0 -1
  1229. package/lib/typescript/wallet-unit-attestation/v1.3.3/utils.d.ts +0 -7
  1230. package/lib/typescript/wallet-unit-attestation/v1.3.3/utils.d.ts.map +0 -1
  1231. package/src/wallet-unit-attestation/index.ts +0 -3
  1232. package/src/wallet-unit-attestation/v1.0.0/index.ts +0 -5
  1233. package/src/wallet-unit-attestation/v1.3.3/index.ts +0 -11
  1234. package/src/wallet-unit-attestation/v1.3.3/mappers.ts +0 -10
  1235. package/src/wallet-unit-attestation/v1.3.3/types.ts +0 -21
  1236. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/06-verify-and-parse-credential.js +0 -0
  1237. package/lib/commonjs/credential/issuance/{v1.3.3 → v1.4.6}/types.js +0 -0
  1238. package/lib/commonjs/credential/status/{v1.3.3 → v1.4.6}/02-verify-and-parse-status-list.js +0 -0
  1239. package/lib/commonjs/credential/trustmark/{v1.3.3 → v1.4.6}/index.js +0 -0
  1240. package/lib/commonjs/{wallet-unit-attestation → key-attestation}/api/index.js +0 -0
  1241. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.js +0 -0
  1242. package/lib/commonjs/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.js +0 -0
  1243. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/06-verify-and-parse-credential.js +0 -0
  1244. package/lib/module/credential/issuance/{v1.3.3 → v1.4.6}/types.js +0 -0
  1245. package/lib/module/credential/status/{v1.3.3 → v1.4.6}/02-verify-and-parse-status-list.js +0 -0
  1246. package/lib/module/credential/trustmark/{v1.3.3 → v1.4.6}/index.js +0 -0
  1247. package/lib/module/{wallet-unit-attestation → key-attestation}/api/index.js +0 -0
  1248. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.js +0 -0
  1249. package/lib/module/wallet-instance-attestation/{v1.3.3 → v1.4.6}/types.js +0 -0
  1250. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/01-evaluate-issuer-trust.d.ts +0 -0
  1251. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/02-start-user-authorization.d.ts +0 -0
  1252. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/04-authorize-access.d.ts +0 -0
  1253. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/06-verify-and-parse-credential.d.ts +0 -0
  1254. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1255. package/lib/typescript/credential/issuance/{v1.3.3 → v1.4.6}/types.d.ts +0 -0
  1256. package/lib/typescript/credential/offer/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1257. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/01-start-flow.d.ts +0 -0
  1258. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/02-evaluate-rp-trust.d.ts +0 -0
  1259. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/03-get-request-object.d.ts +0 -0
  1260. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/04-verify-certificate-chain.d.ts +0 -0
  1261. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/05-verify-request-object.d.ts +0 -0
  1262. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/06-evaluate-dcql-query.d.ts +0 -0
  1263. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/07-send-authorization-response.d.ts +0 -0
  1264. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1265. package/lib/typescript/credential/presentation/{v1.3.3 → v1.4.6}/sdkErrorMapper.d.ts +0 -0
  1266. package/lib/typescript/credential/status/{v1.3.3 → v1.4.6}/01-status-list.d.ts +0 -0
  1267. package/lib/typescript/credential/status/{v1.3.3 → v1.4.6}/02-verify-and-parse-status-list.d.ts +0 -0
  1268. package/lib/typescript/credential/status/{v1.3.3 → v1.4.6}/03-get-status.d.ts +0 -0
  1269. package/lib/typescript/credential/status/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1270. package/lib/typescript/credential/trustmark/{v1.3.3 → v1.4.6}/get-credential-trustmark.d.ts +0 -0
  1271. package/lib/typescript/credential/trustmark/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1272. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-and-parse-catalogue.d.ts +0 -0
  1273. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/fetch-translations.d.ts +0 -0
  1274. package/lib/typescript/credentials-catalogue/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1275. package/lib/typescript/wallet-instance/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1276. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/index.d.ts +0 -0
  1277. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/issuing.d.ts +0 -0
  1278. package/lib/typescript/wallet-instance-attestation/{v1.3.3 → v1.4.6}/utils.d.ts +0 -0
  1279. package/src/credential/issuance/{v1.3.3 → v1.4.6}/types.ts +0 -0
  1280. package/src/credential/presentation/{v1.3.3 → v1.4.6}/types.ts +3 -3
  1281. /package/src/wallet-instance-attestation/{v1.3.3 → v1.4.6}/mappers.ts +0 -0
@@ -1,14 +1,14 @@
1
+ import { IoWalletError } from "../../../utils/errors";
2
+ import { Logger, LogLevel } from "../../../utils/logging";
1
3
  import { generateRandomAlphaNumericString } from "../../../utils/misc";
2
4
  import { makeParRequest } from "../../../utils/par";
3
- import { LogLevel, Logger } from "../../../utils/logging";
4
- import { IoWalletError } from "../../../utils/errors";
5
5
  import { selectCredentialDefinition, selectResponseMode } from "../common/02-start-user-authorization";
6
6
  export const startUserAuthorization = async (issuerConf, credentialIds, proof, ctx) => {
7
7
  const {
8
- wiaCryptoContext,
9
- walletInstanceAttestation,
8
+ appFetch = fetch,
10
9
  redirectUri,
11
- appFetch = fetch
10
+ walletInstanceAttestation,
11
+ wiaCryptoContext
12
12
  } = ctx;
13
13
  const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
14
14
  if (!clientId) {
@@ -20,8 +20,8 @@ export const startUserAuthorization = async (issuerConf, credentialIds, proof, c
20
20
  const aud = issuerConf.credential_issuer;
21
21
  const responseMode = selectResponseMode(issuerConf, credentialIds);
22
22
  const getPar = makeParRequest({
23
- wiaCryptoContext,
24
- appFetch
23
+ appFetch,
24
+ wiaCryptoContext
25
25
  });
26
26
  const credentialDefinition = credentialIds.map(c => selectCredentialDefinition(issuerConf, c));
27
27
  if (proof.proofType === "mrtd-pop") {
@@ -32,25 +32,25 @@ export const startUserAuthorization = async (issuerConf, credentialIds, proof, c
32
32
  * See https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/credential-issuance-endpoint.html#pushed-authorization-request-endpoint
33
33
  */
34
34
  credentialDefinition.push({
35
- type: "it_l2+document_proof",
36
- idphinting: proof.idpHinting,
37
35
  challenge_method: "mrtd+ias",
38
- challenge_redirect_uri: redirectUri
36
+ challenge_redirect_uri: redirectUri,
37
+ idphinting: proof.idpHinting,
38
+ type: "it_l2+document_proof"
39
39
  });
40
40
  }
41
41
  const issuerRequestUri = await getPar(parEndpoint, walletInstanceAttestation, {
42
42
  aud,
43
+ authorizationDetails: credentialDefinition,
43
44
  clientId,
44
45
  codeVerifier,
45
46
  redirectUri,
46
- responseMode,
47
- authorizationDetails: credentialDefinition
47
+ responseMode
48
48
  });
49
49
  return {
50
- issuerRequestUri,
51
50
  clientId,
52
51
  codeVerifier,
53
52
  credentialDefinition,
53
+ issuerRequestUri,
54
54
  responseMode
55
55
  };
56
56
  };
@@ -1 +1 @@
1
- {"version":3,"names":["generateRandomAlphaNumericString","makeParRequest","LogLevel","Logger","IoWalletError","selectCredentialDefinition","selectResponseMode","startUserAuthorization","issuerConf","credentialIds","proof","ctx","wiaCryptoContext","walletInstanceAttestation","redirectUri","appFetch","fetch","clientId","getPublicKey","then","_","kid","log","ERROR","codeVerifier","parEndpoint","pushed_authorization_request_endpoint","aud","credential_issuer","responseMode","getPar","credentialDefinition","map","c","proofType","push","type","idphinting","idpHinting","challenge_method","challenge_redirect_uri","issuerRequestUri","authorizationDetails"],"sourceRoot":"../../../../../src","sources":["cred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A;AACA;AACA;IACMH,oBAAoB,CAACI,IAAI,CAAC;MACxBC,IAAI,EAAE,sBAAsB;MAC5BC,UAAU,EAAE3B,KAAK,CAAC4B,UAAU;MAC5BC,gBAAgB,EAAE,UAAU;MAC5BC,sBAAsB,EAAE1B;IAC1B,CAAC,CAAC;EACJ;EAEA,MAAM2B,gBAAgB,GAAG,MAAMX,MAAM,CACnCL,WAAW,EACXZ,yBAAyB,EACzB;IACEc,GAAG;IACHV,QAAQ;IACRO,YAAY;IACZV,WAAW;IACXe,YAAY;IACZa,oBAAoB,EAAEX;EACxB,CACF,CAAC;EAED,OAAO;IACLU,gBAAgB;IAChBxB,QAAQ;IACRO,YAAY;IACZO,oBAAoB;IACpBF;EACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"names":["IoWalletError","Logger","LogLevel","generateRandomAlphaNumericString","makeParRequest","selectCredentialDefinition","selectResponseMode","startUserAuthorization","issuerConf","credentialIds","proof","ctx","appFetch","fetch","redirectUri","walletInstanceAttestation","wiaCryptoContext","clientId","getPublicKey","then","_","kid","log","ERROR","codeVerifier","parEndpoint","pushed_authorization_request_endpoint","aud","credential_issuer","responseMode","getPar","credentialDefinition","map","c","proofType","push","challenge_method","challenge_redirect_uri","idphinting","idpHinting","type","issuerRequestUri","authorizationDetails"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/02-start-user-authorization.ts"],"mappings":"AAEA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gCAAgC,QAAQ,qBAAqB;AACtE,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SACEC,0BAA0B,EAC1BC,kBAAkB,QACb,uCAAuC;AAE9C,OAAO,MAAMC,sBAA6D,GACxE,MAAAA,CAAOC,UAAU,EAAEC,aAAa,EAAEC,KAAK,EAAEC,GAAG,KAAK;EAC/C,MAAM;IACJC,QAAQ,GAAGC,KAAK;IAChBC,WAAW;IACXC,yBAA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;IACZO,oBAAoB;IACpBU,gBAAgB;IAChBZ;EACF,CAAC;AACH,CAAC"}
@@ -1,14 +1,14 @@
1
- import { AuthorizationChallengeResultShape, AuthorizationErrorShape, AuthorizationResultShape } from "../../../utils/auth";
2
- import { hasStatusOrThrow } from "../../../utils/misc";
3
- import parseUrl from "parse-url";
4
- import { IssuerResponseError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
5
1
  import { decode, SignJWT } from "@pagopa/io-react-native-jwt";
6
- import { ResponseUriResultShape } from "./types";
2
+ import parseUrl from "parse-url";
3
+ import { AuthorizationChallengeResultShape, AuthorizationErrorShape, AuthorizationResultShape } from "../../../utils/auth";
7
4
  import { getJwtFromFormPost } from "../../../utils/decoder";
8
- import { AuthorizationError, AuthorizationIdpError } from "../common/errors";
9
- import { LogLevel, Logger } from "../../../utils/logging";
10
- import { RawRequestObject } from "../../presentation/v1.0.0/types";
5
+ import { IssuerResponseError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
6
+ import { Logger, LogLevel } from "../../../utils/logging";
7
+ import { hasStatusOrThrow } from "../../../utils/misc";
11
8
  import { RemotePresentation as RemotePresentationFlow } from "../../presentation/v1.0.0";
9
+ import { RawRequestObject } from "../../presentation/v1.0.0/types";
10
+ import { AuthorizationError, AuthorizationIdpError } from "../common/errors";
11
+ import { ResponseUriResultShape } from "./types";
12
12
  export const continueUserAuthorizationWithMRTDPoPChallenge = async authRedirectUrl => {
13
13
  Logger.log(LogLevel.DEBUG, `The requested credential is a PersonIdentificationData and requires MRTD PoP, starting MRTD PoP validation from auth redirect`);
14
14
  const query = parseUrl(authRedirectUrl).query;
@@ -73,19 +73,19 @@ export const getRequestedCredentialToBePresented = async function (issuerRequest
73
73
  };
74
74
  export const completeUserAuthorizationWithFormPostJwtMode = async (requestObject, _issuerConfig, evaluatedDcqlQuery, _ref) => {
75
75
  let {
76
- wiaCryptoContext,
77
- appFetch = fetch
76
+ appFetch = fetch,
77
+ wiaCryptoContext
78
78
  } = _ref;
79
79
  Logger.log(LogLevel.DEBUG, `The requeste credential is not a PersonIdentificationData, completing the user authorization with form_post.jwt mode`);
80
80
  const authRequestObject = {
81
- nonce: requestObject.nonce,
82
81
  clientId: requestObject.client_id,
82
+ nonce: requestObject.nonce,
83
83
  responseUri: requestObject.response_uri
84
84
  };
85
85
  const remotePresentation = await RemotePresentationFlow.prepareRemotePresentations(evaluatedDcqlQuery, authRequestObject);
86
86
  const authzResponsePayload = await createAuthzResponsePayload({
87
- state: requestObject.state,
88
87
  remotePresentation,
88
+ state: requestObject.state,
89
89
  wiaCryptoContext
90
90
  });
91
91
  Logger.log(LogLevel.DEBUG, `Authz response payload: ${authzResponsePayload}`);
@@ -103,11 +103,11 @@ export const completeUserAuthorizationWithFormPostJwtMode = async (requestObject
103
103
  response: authzResponsePayload
104
104
  }).toString();
105
105
  const resUriRes = await appFetch(requestObject.response_uri, {
106
- method: "POST",
106
+ body,
107
107
  headers: {
108
108
  "Content-Type": "application/x-www-form-urlencoded"
109
109
  },
110
- body
110
+ method: "POST"
111
111
  }).then(hasStatusOrThrow(200, IssuerResponseError)).then(reqUri => reqUri.json());
112
112
  const responseUri = ResponseUriResultShape.safeParse(resUriRes);
113
113
  if (!responseUri.success) {
@@ -152,16 +152,16 @@ export const parseAuthorizationResponse = authRes => {
152
152
  */
153
153
  const createAuthzResponsePayload = async _ref2 => {
154
154
  let {
155
- state,
156
155
  remotePresentation,
156
+ state,
157
157
  wiaCryptoContext
158
158
  } = _ref2;
159
159
  const {
160
160
  kid
161
161
  } = await wiaCryptoContext.getPublicKey();
162
162
  return new SignJWT(wiaCryptoContext).setProtectedHeader({
163
- typ: "jwt",
164
- kid
163
+ kid,
164
+ typ: "jwt"
165
165
  }).setPayload({
166
166
  /**
167
167
  * TODO [SIW-2264]: `state` coming from `requestObject` is marked as `optional`
@@ -1 +1 @@
1
- {"version":3,"names":["AuthorizationChallengeResultShape","AuthorizationErrorShape","AuthorizationResultShape","hasStatusOrThrow","parseUrl","IssuerResponseError","UnimplementedFeatureError","ValidationFailed","decode","SignJWT","ResponseUriResultShape","getJwtFromFormPost","AuthorizationError","AuthorizationIdpError","LogLevel","Logger","RawRequestObject","RemotePresentation","RemotePresentationFlow","continueUserAuthorizationWithMRTDPoPChallenge","authRedirectUrl","log","DEBUG","query","authResParsed","safeParse","success","authErr","ERROR","error","message","JSON","stringify","data","error_description","buildAuthorizationUrl","issuerRequestUri","clientId","issuerConf","idpHint","authzRequestEndpoint","authorization_endpoint","params","URLSearchParams","client_id","request_uri","append","authUrl","completePidUserAuthorizationWithQueryMode","parseAuthorizationResponse","completeEaaUserAuthorizationWithQueryMode","getRequestedCredentialToBePresented","appFetch","arguments","length","undefined","fetch","toString","requestObject","method","then","res","text","jws","reqObj","header","protectedHeader","payload","reason","completeUserAuthorizationWithFormPostJwtMode","_issuerConfig","evaluatedDcqlQuery","_ref","wiaCryptoContext","authRequestObject","nonce","responseUri","response_uri","remotePresentation","prepareRemotePresentations","authzResponsePayload","createAuthzResponsePayload","state","body","response","resUriRes","headers","reqUri","json","redirect_uri","cbRes","decodedJwt","authRes","_ref2","kid","getPublicKey","setProtectedHeader","typ","setPayload","vp_token","presentations","reduce","_ref3","credentialId","vpToken","setIssuedAt","setExpirationTime","sign"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/03-complete-user-authorization.ts"],"mappings":"AAAA,SACEA,iCAAiC,EACjCC,uBAAuB,EACvBC,wBAAwB,QAEnB,qBAAqB;AAC5B,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,OAAOC,QAAQ,MAAM,WAAW;AAChC,SACEC,mBAAmB,EACnBC,yBAAyB,EACzBC,gBAAgB,QACX,uBAAuB;AAC9B,SACEC,MAAM,EACNC,OAAO,QAEF,6BAA6B;AACpC,SAASC,sBAAsB,QAAQ,SAAS;AAChD,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,kBAAkB,EAAEC,qBAAqB,QAAQ,kBAAkB;AAC5E,SAASC,Q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Y,CAAC,CAAC;EAErD,OAAO,IAAItF,OAAO,CAACgE,gBAAgB,CAAC,CACjCuB,kBAAkB,CAAC;IAClBC,GAAG,EAAE,KAAK;IACVH;EACF,CAAC,CAAC,CACDI,UAAU,CAAC;IACV;AACN;AACA;AACA;AACA;IACM,IAAIhB,KAAK,GAAG;MAAEA;IAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3BiB,QAAQ,EAAErB,kBAAkB,CAACsB,aAAa,CAACC,MAAM,CAC/C,CAACF,QAAQ,EAAAG,KAAA;MAAA,IAAE;QAAEC,YAAY;QAAEC;MAAQ,CAAC,GAAAF,KAAA;MAAA,OAAM;QACxC,GAAGH,QAAQ;QACX,CAACI,YAAY,GAAGC;MAClB,CAAC;IAAA,CAAC,EACF,CAAC,CACH;EACF,CAAC,CAAC,CACDC,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAC,IAAI,CAAC,CACvBC,IAAI,CAAC,CAAC;AACX,CAAC"}
1
+ {"version":3,"names":["decode","SignJWT","parseUrl","AuthorizationChallengeResultShape","AuthorizationErrorShape","AuthorizationResultShape","getJwtFromFormPost","IssuerResponseError","UnimplementedFeatureError","ValidationFailed","Logger","LogLevel","hasStatusOrThrow","RemotePresentation","RemotePresentationFlow","RawRequestObject","AuthorizationError","AuthorizationIdpError","ResponseUriResultShape","continueUserAuthorizationWithMRTDPoPChallenge","authRedirectUrl","log","DEBUG","query","authResParsed","safeParse","success","authErr","ERROR","error","message","JSON","stringify","data","error_description","buildAuthorizationUrl","issuerRequestUri","clientId","issuerConf","idpHint","authzRequestEndpoint","authorization_endpoint","params","URLSearchParams","client_id","request_uri","append","authUrl","completePidUserAuthorizationWithQueryMode","parseAuthorizationResponse","completeEaaUserAuthorizationWithQueryMode","getRequestedCredentialToBePresented","appFetch","arguments","length","undefined","fetch","toString","requestObject","method","then","res","text","jws","reqObj","header","protectedHeader","payload","reason","completeUserAuthorizationWithFormPostJwtMode","_issuerConfig","evaluatedDcqlQuery","_ref","wiaCryptoContext","authRequestObject","nonce","responseUri","response_uri","remotePresentation","prepareRemotePresentations","authzResponsePayload","createAuthzResponsePayload","state","body","response","resUriRes","headers","reqUri","json","redirect_uri","cbRes","decodedJwt","authRes","_ref2","kid","getPublicKey","setProtectedHeader","typ","setPayload","vp_token","presentations","reduce","_ref3","credentialId","vpToken","setIssuedAt","setExpirationTime","sign"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/03-complete-user-authorization.ts"],"mappings":"AAAA,SAEEA,MAAM,EACNC,OAAO,QACF,6BAA6B;AACpC,OAAOC,QAAQ,MAAM,WAAW;AAKhC,SACEC,iCAAiC,EACjCC,uBAAuB,EAEvBC,wBAAwB,QACnB,qBAAqB;AAC5B,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SACEC,mBAAmB,EACnBC,yBAAyB,EACzBC,gBAAgB,QACX,uBAAuB;AAC9B,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,kBAAkB,IAAIC,sBAAsB,QAAQ,2BAA2B;AACxF,SAASC,gBAAgB,QAAQ,iCAAiC;AAClE,SAASC,kBAAkB,EAAEC,qBAAqB,QAAQ,kBAAkB;AAC5E,SAASC,sBAAsB,QAAQ,SAAS;AAEhD,OAAO,MAAMC,6CAA2G,GACtH,MAAOC,eAAe,IAAK;EACzBV,MAAM,CAACW,GAAG,CACRV,QAAQ,CAACW,KAAK,EACb,+HACH,CAAC;EACD,MAAMC,KAAK,GAAGrB,QAAQ,CAACkB,eAAe,CAAC,CAACG,KAAK;EAE7C,MAAMC,aAAa,GAAGrB,iCAAiC,CAACsB,SAAS,CAACF,KAAK,CAAC;EACxE,IAAI,CAACC,aAAa,CAACE,OAAO,EAAE;IAC1B,MAAMC,OAAO,GAAGvB,uBAAuB,CAACqB,SAAS,CAACF,KAAK,CAAC;IACxD,IAAI,CAACI,OAAO,CAACD,OAAO,EAAE;MACpBhB,MAAM,CA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C,IAAI,CAAC,CACvBC,IAAI,CAAC,CAAC;AACX,CAAC"}
@@ -1,17 +1,17 @@
1
1
  import { v4 as uuidv4 } from "uuid";
2
- import { hasStatusOrThrow } from "../../../utils/misc";
3
2
  import { createDPopToken } from "../../../utils/dpop";
4
- import { createPopToken } from "../../../utils/pop";
5
- import { TokenResponse } from "./types";
6
3
  import { IssuerResponseError, ValidationFailed } from "../../../utils/errors";
7
- import { LogLevel, Logger } from "../../../utils/logging";
4
+ import { Logger, LogLevel } from "../../../utils/logging";
5
+ import { hasStatusOrThrow } from "../../../utils/misc";
6
+ import { createPopToken } from "../../../utils/pop";
8
7
  import * as WalletInstanceAttestation from "../../../wallet-instance-attestation/v1.0.0/utils";
8
+ import { TokenResponse } from "./types";
9
9
  export const authorizeAccess = async (issuerConf, code, redirectUri, codeVerifier, context) => {
10
10
  const {
11
11
  appFetch = fetch,
12
+ dPopCryptoContext,
12
13
  walletInstanceAttestation,
13
- wiaCryptoContext,
14
- dPopCryptoContext
14
+ wiaCryptoContext
15
15
  } = context;
16
16
  const aud = issuerConf.credential_issuer;
17
17
  const iss = WalletInstanceAttestation.decode(walletInstanceAttestation).payload.cnf.jwk.kid;
@@ -23,28 +23,28 @@ export const authorizeAccess = async (issuerConf, code, redirectUri, codeVerifie
23
23
  }, dPopCryptoContext);
24
24
  Logger.log(LogLevel.DEBUG, `Token request DPoP: ${tokenRequestSignedDPop}`);
25
25
  const signedWiaPoP = await createPopToken({
26
- jti: `${uuidv4()}`,
27
26
  aud,
28
- iss
27
+ iss,
28
+ jti: `${uuidv4()}`
29
29
  }, wiaCryptoContext);
30
30
  Logger.log(LogLevel.DEBUG, `WIA DPoP token: ${signedWiaPoP}`);
31
31
  const requestBody = {
32
- grant_type: "authorization_code",
33
32
  code,
34
33
  code_verifier: codeVerifier,
34
+ grant_type: "authorization_code",
35
35
  redirect_uri: redirectUri
36
36
  };
37
37
  const authorizationRequestFormBody = new URLSearchParams(requestBody);
38
38
  Logger.log(LogLevel.DEBUG, `Auth form request body: ${authorizationRequestFormBody}`);
39
39
  const tokenRes = await appFetch(tokenUrl, {
40
- method: "POST",
40
+ body: authorizationRequestFormBody.toString(),
41
41
  headers: {
42
42
  "Content-Type": "application/x-www-form-urlencoded",
43
43
  DPoP: tokenRequestSignedDPop,
44
44
  "OAuth-Client-Attestation": walletInstanceAttestation,
45
45
  "OAuth-Client-Attestation-PoP": signedWiaPoP
46
46
  },
47
- body: authorizationRequestFormBody.toString()
47
+ method: "POST"
48
48
  }).then(hasStatusOrThrow(200, IssuerResponseError)).then(res => res.json()).then(body => TokenResponse.safeParse(body));
49
49
  if (!tokenRes.success) {
50
50
  Logger.log(LogLevel.ERROR, `Token Response validation failed: ${tokenRes.error.message}`);
@@ -1 +1 @@
1
- {"version":3,"names":["v4","uuidv4","hasStatusOrThrow","createDPopToken","createPopToken","TokenResponse","IssuerResponseError","ValidationFailed","LogLevel","Logger","WalletInstanceAttestation","authorizeAccess","issuerConf","code","redirectUri","codeVerifier","context","appFetch","fetch","walletInstanceAttestation","wiaCryptoContext","dPopCryptoContext","aud","credential_issuer","iss","decode","payload","cnf","jwk","kid","tokenUrl","token_endpoint","tokenRequestSignedDPop","htm","htu","jti","log","DEBUG","signedWiaPoP","requestBody","grant_type","code_verifier","redirect_uri","authorizationRequestFormBody","URLSearchParams","tokenRes","method","headers","DPoP","body","toString","then","res","json","safeParse","success","ERROR","error","message","reason","accessToken","data"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/04-authorize-access.ts"],"mappings":"AAAA,SAASA,EAAE,IAAIC,MAAM,QAAQ,MAAM;AACnC,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,aAAa,QAAQ,SAAS;AACvC,SAASC,mBAAmB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAC7E,SAASC,QAAQ,EAAEC,MAAM,QAAQ,wBAAwB;AAEz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BM,4BAA6B,EAC1D,CAAC;EAED,MAAME,QAAQ,GAAG,MAAM5B,QAAQ,CAACa,QAAQ,EAAE;IACxCgB,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACP,cAAc,EAAE,mCAAmC;MACnDC,IAAI,EAAEhB,sBAAsB;MAC5B,0BAA0B,EAAEb,yBAAyB;MACrD,8BAA8B,EAAEmB;IAClC,CAAC;IACDW,IAAI,EAAEN,4BAA4B,CAACO,QAAQ,CAAC;EAC9C,CAAC,CAAC,CACCC,IAAI,CAACjD,gBAAgB,CAAC,GAAG,EAAEI,mBAAmB,CAAC,CAAC,CAChD6C,IAAI,CAAEC,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBF,IAAI,CAAEF,IAAI,IAAK5C,aAAa,CAACiD,SAAS,CAACL,IAAI,CAAC,CAAC;EAEhD,IAAI,CAACJ,QAAQ,CAACU,OAAO,EAAE;IACrB9C,MAAM,CAAC2B,GAAG,CACR5B,QAAQ,CAACgD,KAAK,EACb,qCAAoCX,QAAQ,CAACY,KAAK,CAACC,OAAQ,EAC9D,CAAC;IAED,MAAM,IAAInD,gBAAgB,CAAC;MACzBmD,OAAO,EAAE,kCAAkC;MAC3CC,MAAM,EAAEd,QAAQ,CAACY,KAAK,CAACC;IACzB,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEE,WAAW,EAAEf,QAAQ,CAACgB;EAAK,CAAC;AACvC,CAAC"}
1
+ {"version":3,"names":["v4","uuidv4","createDPopToken","IssuerResponseError","ValidationFailed","Logger","LogLevel","hasStatusOrThrow","createPopToken","WalletInstanceAttestation","TokenResponse","authorizeAccess","issuerConf","code","redirectUri","codeVerifier","context","appFetch","fetch","dPopCryptoContext","walletInstanceAttestation","wiaCryptoContext","aud","credential_issuer","iss","decode","payload","cnf","jwk","kid","tokenUrl","token_endpoint","tokenRequestSignedDPop","htm","htu","jti","log","DEBUG","signedWiaPoP","requestBody","code_verifier","grant_type","redirect_uri","authorizationRequestFormBody","URLSearchParams","tokenRes","body","toString","headers","DPoP","method","then","res","json","safeParse","success","ERROR","error","message","reason","accessToken","data"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/04-authorize-access.ts"],"mappings":"AAAA,SAASA,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAInC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,mBAAmB,EAAEC,gBAAgB,QAAQ,uBAAuB;AAC7E,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,cAAc,QAAQ,oBAAoB;AACnD,OAAO,KAAKC,yBAAyB,MAAM,mDAAmD;AAC9F,SAASC,aAAa,QAAQ,SAAS;AAEvC,OAAO,MAAMC,eAA+C,GAAG,MAAAA,CAC7DC,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,YAAY,EACZC,OAAO,KACJ;EACH,MAAM;IACJC,QAAQ,GAAGC,KAAK;IAChBC,iBAAiB;IACjBC,yBAAyB;IACzBC;EACF,CAAC,GAAGL,OAAO;EACX,MAAMM,GAAG,GAAGV,UAAU,CAACW,iBAAiB;EACxC,MAAMC,GAAG,GAAGf,yBAAyB,CAACgB,MAAM,CAACL,yBAAyB,CAAC,CACpEM,OAAO,CAACC,GAAG,CAACC,GAAG,CAACC,GAAG;EAEtB,MAAMC,QAAQ,GAAGlB,UAAU,CAACmB,cAAc;EAE1C,MAAMC,sBAAsB,GAAG,MAAM9B,eAAe,CAClD;IACE+B,GAAG,EAAE,MAAM;IACXC,GAAG,EAAEJ,QAAQ;IACbK,GAAG,EAAG,GAAElC,MAAM,CAAC,CAAE;EACnB,CAAC,EACDkB,iBACF,CAAC;EAEDd,MAAM,CAAC+B,GAAG,CAAC9B,QAAQ,CAAC+B,KAAK,EAAG,uBAAsBL,sBAAuB,EAAC,CAAC;EAE3E,MAAMM,YAAY,GAAG,MAAM9B,cAAc,CACvC;IACEc,GAAG;IACHE,GAAG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ACC;IACzB,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEE,WAAW,EAAEf,QAAQ,CAACgB;EAAK,CAAC;AACvC,CAAC"}
@@ -1,23 +1,24 @@
1
1
  import { sha256ToBase64, SignJWT } from "@pagopa/io-react-native-jwt";
2
2
  import { v4 as uuidv4 } from "uuid";
3
- import { hasStatusOrThrow } from "../../../utils/misc";
4
- import { IssuerResponseError, IssuerResponseErrorCodes, ResponseErrorBuilder, UnexpectedStatusCodeError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
5
3
  import { createDPopToken } from "../../../utils/dpop";
6
- import { LogLevel, Logger } from "../../../utils/logging";
4
+ import { IoWalletError, IssuerResponseError, IssuerResponseErrorCodes, ResponseErrorBuilder, UnexpectedStatusCodeError, UnimplementedFeatureError, ValidationFailed } from "../../../utils/errors";
5
+ import { Logger, LogLevel } from "../../../utils/logging";
6
+ import { hasStatusOrThrow } from "../../../utils/misc";
7
7
  import { CredentialResponse, NonceResponse } from "./types";
8
8
  export const createNonceProof = async (nonce, issuer, audience, ctx) => {
9
9
  const jwk = await ctx.getPublicKey();
10
10
  return new SignJWT(ctx).setPayload({
11
11
  nonce
12
12
  }).setProtectedHeader({
13
- typ: "openid4vci-proof+jwt",
14
- jwk
13
+ jwk,
14
+ typ: "openid4vci-proof+jwt"
15
15
  }).setAudience(audience).setIssuer(issuer).setIssuedAt().setExpirationTime("5min").sign();
16
16
  };
17
17
  export const obtainCredential = async (issuerConf, accessToken, clientId, credentialDefinition, context) => {
18
+ var _credentialRes$data$c;
18
19
  const {
19
- credentialCryptoContext,
20
20
  appFetch = fetch,
21
+ credentialCryptoContext,
21
22
  dPopCryptoContext
22
23
  } = context;
23
24
  const {
@@ -32,10 +33,10 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
32
33
  const {
33
34
  c_nonce
34
35
  } = await appFetch(nonceUrl, {
35
- method: "POST",
36
36
  headers: {
37
37
  "Content-Type": "application/json"
38
- }
38
+ },
39
+ method: "POST"
39
40
  }).then(hasStatusOrThrow(200)).then(res => res.json()).then(body => NonceResponse.parse(body));
40
41
 
41
42
  /**
@@ -76,20 +77,20 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
76
77
  };
77
78
  Logger.log(LogLevel.DEBUG, `Credential request body: ${JSON.stringify(credentialRequestFormBody)}`);
78
79
  const tokenRequestSignedDPop = await createDPopToken({
80
+ ath: await sha256ToBase64(accessToken.access_token),
79
81
  htm: "POST",
80
82
  htu: credentialUrl,
81
- jti: `${uuidv4()}`,
82
- ath: await sha256ToBase64(accessToken.access_token)
83
+ jti: `${uuidv4()}`
83
84
  }, dPopCryptoContext);
84
85
  Logger.log(LogLevel.DEBUG, `Token request DPoP: ${tokenRequestSignedDPop}`);
85
86
  const credentialRes = await appFetch(credentialUrl, {
86
- method: "POST",
87
+ body: JSON.stringify(credentialRequestFormBody),
87
88
  headers: {
89
+ Authorization: `${accessToken.token_type} ${accessToken.access_token}`,
88
90
  "Content-Type": "application/json",
89
- DPoP: tokenRequestSignedDPop,
90
- Authorization: `${accessToken.token_type} ${accessToken.access_token}`
91
+ DPoP: tokenRequestSignedDPop
91
92
  },
92
- body: JSON.stringify(credentialRequestFormBody)
93
+ method: "POST"
93
94
  }).then(hasStatusOrThrow(200)).then(res => res.json()).then(body => CredentialResponse.safeParse(body)).catch(handleObtainCredentialError);
94
95
  if (!credentialRes.success) {
95
96
  Logger.log(LogLevel.ERROR, `Credential Response validation failed: ${credentialRes.error.message}`);
@@ -102,11 +103,19 @@ export const obtainCredential = async (issuerConf, accessToken, clientId, creden
102
103
 
103
104
  // Extract the format corresponding to the credential_configuration_id used
104
105
  const issuerCredentialConfig = issuerConf.credential_configurations_supported[credential_configuration_id];
106
+ const credential = (_credentialRes$data$c = credentialRes.data.credentials[0]) === null || _credentialRes$data$c === void 0 ? void 0 : _credentialRes$data$c.credential;
107
+ if (!credential) {
108
+ throw new IoWalletError(`No credential found in the response for credential_configuration_id ${credential_configuration_id}`);
109
+ }
110
+ const format = issuerCredentialConfig === null || issuerCredentialConfig === void 0 ? void 0 : issuerCredentialConfig.format;
111
+ if (!format) {
112
+ throw new IoWalletError(`No format found for credential_configuration_id ${credential_configuration_id} in the issuer configuration`);
113
+ }
105
114
 
106
115
  // TODO: [SIW-2264] Handle multiple credentials
107
116
  return {
108
- credential: credentialRes.data.credentials.at(0).credential,
109
- format: issuerCredentialConfig.format
117
+ credential,
118
+ format
110
119
  };
111
120
  };
112
121
 
@@ -1 +1 @@
1
- {"version":3,"names":["sha256ToBase64","SignJWT","v4","uuidv4","hasStatusOrThrow","IssuerResponseError","IssuerResponseErrorCodes","ResponseErrorBuilder","UnexpectedStatusCodeError","UnimplementedFeatureError","ValidationFailed","createDPopToken","LogLevel","Logger","CredentialResponse","NonceResponse","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credential_configuration_id","credential_identifier","credentialUrl","credential_endpoint","issuerUrl","credential_issuer","nonceUrl","nonce_endpoint","c_nonce","method","headers","then","res","json","body","parse","signedNonceProof","log","DEBUG","containsCredentialDefinition","authorization_details","some","c","credential_identifiers","includes","ERROR","message","credentialRequestFormBody","proof","jwt","proof_type","JSON","stringify","tokenRequestSignedDPop","htm","htu","jti","ath","access_token","credentialRes","DPoP","Authorization","token_type","safeParse","catch","handleObtainCredentialError","success","error","reason","data","issuerCredentialConfig","credential_configurations_supported","credential","credentials","at","format","e","handle","code","CredentialIssuingNotSynchronous","CredentialInvalidStatus","CredentialRequestFailed","buildFrom","obtainCredentialsBatch"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/05-obtain-credential.ts"],"mappings":"AAAA,SAEEA,cAAc,EACdC,OAAO,QACF,6BAA6B;AACpC,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AACnC,SAASC,gBA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gG,uBAAuB;IACtDnC,OAAO,EAAE;EACX,CAAC,CAAC,CACDoC,SAAS,CAACN,CAAC,CAAC;AACjB,CAAC;AAED,OAAO,MAAMO,sBAA6D,GACxEA,CAAA,KAAM;EACJ,MAAM,IAAI/F,yBAAyB,CAAC,wBAAwB,EAAE,OAAO,CAAC;AACxE,CAAC"}
1
+ {"version":3,"names":["sha256ToBase64","SignJWT","v4","uuidv4","createDPopToken","IoWalletError","IssuerResponseError","IssuerResponseErrorCodes","ResponseErrorBuilder","UnexpectedStatusCodeError","UnimplementedFeatureError","ValidationFailed","Logger","LogLevel","hasStatusOrThrow","CredentialResponse","NonceResponse","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","_credentialRes$data$c","appFetch","fetch","credentialCryptoContext","dPopCryptoContext","credential_configuration_id","credential_identifier","credentialUrl","credential_endpoint","issuerUrl","credential_issuer","nonceUrl","nonce_endpoint","c_nonce","headers","method","then","res","json","body","parse","signedNonceProof","log","DEBUG","containsCredentialDefinition","authorization_details","some","c","credential_identifiers","includes","ERROR","message","credentialRequestFormBody","proof","jwt","proof_type","JSON","stringify","tokenRequestSignedDPop","ath","access_token","htm","htu","jti","credentialRes","Authorization","token_type","DPoP","safeParse","catch","handleObtainCredentialError","success","error","reason","data","issuerCredentialConfig","credential_configurations_supported","credential","credentials","format","e","handle","code","CredentialIssuingNotSynchronous","CredentialInvalidStatus","CredentialRequestFailed","buildFrom","obtainCredentialsBatch"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/05-obtain-credential.ts"],"mappings":"AAAA,SAEEA,cAAc,EACdC,OAAO,QACF,6BAA6B;AACpC,SAASC,EAAE,IAAIC,MAAM,QAAQ,MAAM;AAInC,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SACEC,aAAa,EACbC,mBAAmB,EACnBC,wBAAwB,E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AAI,EAAE7F,wBAAwB,CAAC+F,uBAAuB;IACtDjC,OAAO,EAAE;EACX,CAAC,CAAC,CACD8B,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAE7F,wBAAwB,CAAC+F,uBAAuB;IACtDjC,OAAO,EAAE;EACX,CAAC,CAAC,CACD8B,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAE7F,wBAAwB,CAACgG,uBAAuB;IACtDlC,OAAO,EAAE;EACX,CAAC,CAAC,CACDmC,SAAS,CAACN,CAAC,CAAC;AACjB,CAAC;AAED,OAAO,MAAMO,sBAA6D,GACxEA,CAAA,KAAM;EACJ,MAAM,IAAI/F,yBAAyB,CAAC,wBAAwB,EAAE,OAAO,CAAC;AACxE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["IoWalletError","Logger","LogLevel","verifyAndParseCredentialMDoc","verifyAndParseCredentialSdJwt","verifyAndParseCredential","issuerConf","credential","credentialConfigurationId","context","x509CertRoot","_issuerConf$credentia","format","credential_configurations_supported","log","DEBUG","message","ERROR"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/06-verify-and-parse-credential.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,4BAA4B,QAAQ,+CAA+C;AAC5F,SAASC,6BAA6B,QAAQ,gDAAgD;AAG9F,OAAO,MAAMC,wBAAiE,GAC5E,MAAAA,CACEC,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OAAO,EACPC,YAAY,KACT;EAAA,IAAAC,qBAAA;EACH,MAAMC,MAAM,IAAAD,qBAAA,GACVL,UAAU,CAACO,mCAAmC,CAACL,yBAAyB,CAAC,cAAAG,qBAAA,uBAAzEA,qBAAA,CACIC,MAAM;EAEZ,QAAQA,MAAM;IACZ,KAAK,WAAW;MAAE;QAChBX,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACa,KAAK,EAAE,wCAAwC,CAAC;QACpE,OAAOX,6BAA6B,CAClCE,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OACF,CAAC;MACH;IACA,KAAK,UAAU;MAAE;QACfR,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACa,KAAK,EAAE,uCAAuC,CAAC;QACnE,OAAOZ,4BAA4B,CACjCG,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OAAO,EACPC,YACF,CAAC;MACH;IAEA;MAAS;QACP,MAAMM,OAAO,GAAI,kCAAiCJ,MAAO,EAAC;QAC1DX,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACe,KAAK,EAAED,OAAO,CAAC;QACnC,MAAM,IAAIhB,aAAa,CAACgB,OAAO,CAAC;MAClC;EACF;AACF,CAAC"}
1
+ {"version":3,"names":["IoWalletError","Logger","LogLevel","verifyAndParseCredentialMDoc","verifyAndParseCredentialSdJwt","verifyAndParseCredential","issuerConf","credential","credentialConfigurationId","context","x509CertRoot","_issuerConf$credentia","format","credential_configurations_supported","log","DEBUG","message","ERROR"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/06-verify-and-parse-credential.ts"],"mappings":"AAEA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,MAAM,EAAEC,QAAQ,QAAQ,wBAAwB;AACzD,SAASC,4BAA4B,QAAQ,+CAA+C;AAC5F,SAASC,6BAA6B,QAAQ,gDAAgD;AAE9F,OAAO,MAAMC,wBAAiE,GAC5E,MAAAA,CACEC,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OAAO,EACPC,YAAY,KACT;EAAA,IAAAC,qBAAA;EACH,MAAMC,MAAM,IAAAD,qBAAA,GACVL,UAAU,CAACO,mCAAmC,CAACL,yBAAyB,CAAC,cAAAG,qBAAA,uBAAzEA,qBAAA,CACIC,MAAM;EAEZ,QAAQA,MAAM;IACZ,KAAK,WAAW;MAAE;QAChBX,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACa,KAAK,EAAE,wCAAwC,CAAC;QACpE,OAAOX,6BAA6B,CAClCE,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OACF,CAAC;MACH;IACA,KAAK,UAAU;MAAE;QACfR,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACa,KAAK,EAAE,uCAAuC,CAAC;QACnE,OAAOZ,4BAA4B,CACjCG,UAAU,EACVC,UAAU,EACVC,yBAAyB,EACzBC,OAAO,EACPC,YACF,CAAC;MACH;IAEA;MAAS;QACP,MAAMM,OAAO,GAAI,kCAAiCJ,MAAO,EAAC;QAC1DX,MAAM,CAACa,GAAG,CAACZ,QAAQ,CAACe,KAAK,EAAED,OAAO,CAAC;QACnC,MAAM,IAAIhB,aAAa,CAACgB,OAAO,CAAC;MAClC;EACF;AACF,CAAC"}
@@ -1,23 +1,23 @@
1
+ import { MRTDPoPv1_0 } from "../mrtd-pop";
1
2
  import { evaluateIssuerTrust } from "./01-evaluate-issuer-trust";
2
3
  import { startUserAuthorization } from "./02-start-user-authorization";
3
- import { continueUserAuthorizationWithMRTDPoPChallenge, completePidUserAuthorizationWithQueryMode, completeEaaUserAuthorizationWithQueryMode, completeUserAuthorizationWithFormPostJwtMode, buildAuthorizationUrl, getRequestedCredentialToBePresented } from "./03-complete-user-authorization";
4
+ import { buildAuthorizationUrl, completeEaaUserAuthorizationWithQueryMode, completePidUserAuthorizationWithQueryMode, completeUserAuthorizationWithFormPostJwtMode, continueUserAuthorizationWithMRTDPoPChallenge, getRequestedCredentialToBePresented } from "./03-complete-user-authorization";
4
5
  import { authorizeAccess } from "./04-authorize-access";
5
6
  import { obtainCredential, obtainCredentialsBatch } from "./05-obtain-credential";
6
7
  import { verifyAndParseCredential } from "./06-verify-and-parse-credential";
7
- import { MRTDPoPv1_0 } from "../mrtd-pop";
8
8
  export const Issuance = {
9
- evaluateIssuerTrust,
10
- startUserAuthorization,
9
+ authorizeAccess,
11
10
  buildAuthorizationUrl,
12
- completePidUserAuthorizationWithQueryMode,
13
11
  completeEaaUserAuthorizationWithQueryMode,
12
+ completePidUserAuthorizationWithQueryMode,
13
+ completeUserAuthorizationWithFormPostJwtMode,
14
14
  continueUserAuthorizationWithMRTDPoPChallenge,
15
+ evaluateIssuerTrust,
15
16
  getRequestedCredentialToBePresented,
16
- completeUserAuthorizationWithFormPostJwtMode,
17
- authorizeAccess,
17
+ MRTDPoP: MRTDPoPv1_0,
18
18
  obtainCredential,
19
19
  obtainCredentialsBatch,
20
- verifyAndParseCredential,
21
- MRTDPoP: MRTDPoPv1_0
20
+ startUserAuthorization,
21
+ verifyAndParseCredential
22
22
  };
23
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["evaluateIssuerTrust","startUserAuthorization","continueUserAuthorizationWithMRTDPoPChallenge","completePidUserAuthorizationWithQueryMode","completeEaaUserAuthorizationWithQueryMode","completeUserAuthorizationWithFormPostJwtMode","buildAuthorizationUrl","getRequestedCredentialToBePresented","authorizeAccess","obtainCredential","obtainCredentialsBatch","verifyAndParseCredential","MRTDPoPv1_0","Issuance","MRTDPoP"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/index.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,sBAAsB,QAAQ,+BAA+B;AACtE,SACEC,6CAA6C,EAC7CC,yCAAyC,EACzCC,yCAAyC,EACzCC,4CAA4C,EAC5CC,qBAAqB,EACrBC,mCAAmC,QAC9B,kCAAkC;AACzC,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SACEC,gBAAgB,EAChBC,sBAAsB,QACjB,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,kCAAkC;AAC3E,SAASC,WAAW,QAAQ,aAAa;AAEzC,OAAO,MAAMC,QAAqB,GAAG;EACnCb,mBAAmB;EACnBC,sBAAsB;EACtBK,qBAAqB;EACrBH,yCAAyC;EACzCC,yCAAyC;EACzCF,6CAA6C;EAC7CK,mCAAmC;EACnCF,4CAA4C;EAC5CG,eAAe;EACfC,gBAAgB;EAChBC,sBAAsB;EACtBC,wBAAwB;EACxBG,OAAO,EAAEF;AACX,CAAC"}
1
+ {"version":3,"names":["MRTDPoPv1_0","evaluateIssuerTrust","startUserAuthorization","buildAuthorizationUrl","completeEaaUserAuthorizationWithQueryMode","completePidUserAuthorizationWithQueryMode","completeUserAuthorizationWithFormPostJwtMode","continueUserAuthorizationWithMRTDPoPChallenge","getRequestedCredentialToBePresented","authorizeAccess","obtainCredential","obtainCredentialsBatch","verifyAndParseCredential","Issuance","MRTDPoP"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/index.ts"],"mappings":"AAEA,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,sBAAsB,QAAQ,+BAA+B;AACtE,SACEC,qBAAqB,EACrBC,yCAAyC,EACzCC,yCAAyC,EACzCC,4CAA4C,EAC5CC,6CAA6C,EAC7CC,mCAAmC,QAC9B,kCAAkC;AACzC,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SACEC,gBAAgB,EAChBC,sBAAsB,QACjB,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,kCAAkC;AAE3E,OAAO,MAAMC,QAAqB,GAAG;EACnCJ,eAAe;EACfN,qBAAqB;EACrBC,yCAAyC;EACzCC,yCAAyC;EACzCC,4CAA4C;EAC5CC,6CAA6C;EAC7CN,mBAAmB;EACnBO,mCAAmC;EACnCM,OAAO,EAAEd,WAAW;EACpBU,gBAAgB;EAChBC,sBAAsB;EACtBT,sBAAsB;EACtBU;AACF,CAAC"}
@@ -1,23 +1,23 @@
1
1
  import { createMapper } from "../../../utils/mappers";
2
2
  export const mapToIssuerConfig = createMapper(x => {
3
3
  const {
4
+ federation_entity,
4
5
  oauth_authorization_server,
5
6
  openid_credential_issuer,
6
- openid_credential_verifier,
7
- federation_entity
7
+ openid_credential_verifier
8
8
  } = x.payload.metadata;
9
9
  return {
10
10
  authorization_endpoint: oauth_authorization_server.authorization_endpoint,
11
+ credential_configurations_supported: openid_credential_issuer.credential_configurations_supported,
11
12
  credential_endpoint: openid_credential_issuer.credential_endpoint,
12
13
  credential_issuer: openid_credential_issuer.credential_issuer,
13
- credential_configurations_supported: openid_credential_issuer.credential_configurations_supported,
14
+ encrypted_response_enc_values_supported: openid_credential_verifier !== null && openid_credential_verifier !== void 0 && openid_credential_verifier.authorization_encrypted_response_enc ? [openid_credential_verifier.authorization_encrypted_response_enc] : undefined,
15
+ federation_entity,
14
16
  keys: [...openid_credential_issuer.jwks.keys, ...oauth_authorization_server.jwks.keys],
17
+ nonce_endpoint: openid_credential_issuer.nonce_endpoint,
15
18
  pushed_authorization_request_endpoint: oauth_authorization_server.pushed_authorization_request_endpoint,
16
- token_endpoint: oauth_authorization_server.token_endpoint,
17
19
  status_assertion_endpoint: openid_credential_issuer.status_attestation_endpoint,
18
- nonce_endpoint: openid_credential_issuer.nonce_endpoint,
19
- federation_entity,
20
- encrypted_response_enc_values_supported: openid_credential_verifier !== null && openid_credential_verifier !== void 0 && openid_credential_verifier.authorization_encrypted_response_enc ? [openid_credential_verifier.authorization_encrypted_response_enc] : undefined
20
+ token_endpoint: oauth_authorization_server.token_endpoint
21
21
  };
22
22
  });
23
23
  //# sourceMappingURL=mappers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createMapper","mapToIssuerConfig","x","oauth_authorization_server","openid_credential_issuer","openid_credential_verifier","federation_entity","payload","metadata","authorization_endpoint","credential_endpoint","credential_issuer","credential_configurations_supported","keys","jwks","pushed_authorization_request_endpoint","token_endpoint","status_assertion_endpoint","status_attestation_endpoint","nonce_endpoint","encrypted_response_enc_values_supported","authorization_encrypted_response_enc","undefined"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/mappers.ts"],"mappings":"AACA,SAASA,YAAY,QAAQ,wBAAwB;AAGrD,OAAO,MAAMC,iBAAiB,GAAGD,YAAY,CAG1CE,CAAC,IAAK;EACP,MAAM;IACJC,0BAA0B;IAC1BC,wBAAwB;IACxBC,0BAA0B;IAC1BC;EACF,CAAC,GAAGJ,CAAC,CAACK,OAAO,CAACC,QAAQ;EACtB,OAAO;IACLC,sBAAsB,EAAEN,0BAA0B,CAACM,sBAAsB;IACzEC,mBAAmB,EAAEN,wBAAwB,CAACM,mBAAmB;IACjEC,iBAAiB,EAAEP,wBAAwB,CAACO,iBAAiB;IAC7DC,mCAAmC,EACjCR,wBAAwB,CAACQ,mCAAmC;IAC9DC,IAAI,EAAE,CACJ,GAAGT,wBAAwB,CAACU,IAAI,CAACD,IAAI,EACrC,GAAGV,0BAA0B,CAACW,IAAI,CAACD,IAAI,CACxC;IACDE,qCAAqC,EACnCZ,0BAA0B,CAACY,qCAAqC;IAClEC,cAAc,EAAEb,0BAA0B,CAACa,cAAc;IACzDC,yBAAyB,EACvBb,wBAAwB,CAACc,2BAA2B;IACtDC,cAAc,EAAEf,wBAAwB,CAACe,cAAc;IACvDb,iBAAiB;IACjBc,uCAAuC,EACrCf,0BAA0B,aAA1BA,0BAA0B,eAA1BA,0BAA0B,CAAEgB,oCAAoC,GAC5D,CAAChB,0BAA0B,CAACgB,oCAAoC,CAAC,GACjEC;EACR,CAAC;AACH,CAAC,CAAC"}
1
+ {"version":3,"names":["createMapper","mapToIssuerConfig","x","federation_entity","oauth_authorization_server","openid_credential_issuer","openid_credential_verifier","payload","metadata","authorization_endpoint","credential_configurations_supported","credential_endpoint","credential_issuer","encrypted_response_enc_values_supported","authorization_encrypted_response_enc","undefined","keys","jwks","nonce_endpoint","pushed_authorization_request_endpoint","status_assertion_endpoint","status_attestation_endpoint","token_endpoint"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/mappers.ts"],"mappings":"AAGA,SAASA,YAAY,QAAQ,wBAAwB;AAErD,OAAO,MAAMC,iBAAiB,GAAGD,YAAY,CAG1CE,CAAC,IAAK;EACP,MAAM;IACJC,iBAAiB;IACjBC,0BAA0B;IAC1BC,wBAAwB;IACxBC;EACF,CAAC,GAAGJ,CAAC,CAACK,OAAO,CAACC,QAAQ;EACtB,OAAO;IACLC,sBAAsB,EAAEL,0BAA0B,CAACK,sBAAsB;IACzEC,mCAAmC,EACjCL,wBAAwB,CAACK,mCAAmC;IAC9DC,mBAAmB,EAAEN,wBAAwB,CAACM,mBAAmB;IACjEC,iBAAiB,EAAEP,wBAAwB,CAACO,iBAAiB;IAC7DC,uCAAuC,EACrCP,0BAA0B,aAA1BA,0BAA0B,eAA1BA,0BAA0B,CAAEQ,oCAAoC,GAC5D,CAACR,0BAA0B,CAACQ,oCAAoC,CAAC,GACjEC,SAAS;IACfZ,iBAAiB;IACjBa,IAAI,EAAE,CACJ,GAAGX,wBAAwB,CAACY,IAAI,CAACD,IAAI,EACrC,GAAGZ,0BAA0B,CAACa,IAAI,CAACD,IAAI,CACxC;IACDE,cAAc,EAAEb,wBAAwB,CAACa,cAAc;IACvDC,qCAAqC,EACnCf,0BAA0B,CAACe,qCAAqC;IAClEC,yBAAyB,EACvBf,wBAAwB,CAACgB,2BAA2B;IACtDC,cAAc,EAAElB,0BAA0B,CAACkB;EAC7C,CAAC;AACH,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["z","AuthorizationDetail","TokenResponse","CredentialResponse","object","credentials","array","credential","string","notification_id","optional","ResponseUriResultShape","redirect_uri","NonceResponse","c_nonce"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/types.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,KAAK;AACxB,SAASC,mBAAmB,EAAEC,aAAa,QAAQ,cAAc;;AAEjE;AACA,SAASD,mBAAmB,EAAEC,aAAa;AAI3C,OAAO,MAAMC,kBAAkB,GAAGH,CAAC,CAACI,MAAM,CAAC;EACzCC,WAAW,EAAEL,CAAC,CAACM,KAAK,CAClBN,CAAC,CAACI,MAAM,CAAC;IACPG,UAAU,EAAEP,CAAC,CAACQ,MAAM,CAAC;EACvB,CAAC,CACH,CAAC;EACDC,eAAe,EAAET,CAAC,CAACQ,MAAM,CAAC,CAAC,CAACE,QAAQ,CAAC;AACvC,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGX,CAAC,CAACI,MAAM,CAAC;EAC7CQ,YAAY,EAAEZ,CAAC,CAACQ,MAAM,CAAC;AACzB,CAAC,CAAC;AAGF,OAAO,MAAMK,aAAa,GAAGb,CAAC,CAACI,MAAM,CAAC;EACpCU,OAAO,EAAEd,CAAC,CAACQ,MAAM,CAAC;AACpB,CAAC,CAAC"}
1
+ {"version":3,"names":["z","AuthorizationDetail","TokenResponse","CredentialResponse","object","credentials","array","credential","string","notification_id","optional","ResponseUriResultShape","redirect_uri","NonceResponse","c_nonce"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.0.0/types.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,KAAK;AAExB,SAASC,mBAAmB,EAAEC,aAAa,QAAQ,cAAc;;AAEjE;AACA,SAASD,mBAAmB,EAAEC,aAAa;AAI3C,OAAO,MAAMC,kBAAkB,GAAGH,CAAC,CAACI,MAAM,CAAC;EACzCC,WAAW,EAAEL,CAAC,CAACM,KAAK,CAClBN,CAAC,CAACI,MAAM,CAAC;IACPG,UAAU,EAAEP,CAAC,CAACQ,MAAM,CAAC;EACvB,CAAC,CACH,CAAC;EACDC,eAAe,EAAET,CAAC,CAACQ,MAAM,CAAC,CAAC,CAACE,QAAQ,CAAC;AACvC,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGX,CAAC,CAACI,MAAM,CAAC;EAC7CQ,YAAY,EAAEZ,CAAC,CAACQ,MAAM,CAAC;AACzB,CAAC,CAAC;AAGF,OAAO,MAAMK,aAAa,GAAGb,CAAC,CAACI,MAAM,CAAC;EACpCU,OAAO,EAAEd,CAAC,CAACQ,MAAM,CAAC;AACpB,CAAC,CAAC"}
@@ -4,12 +4,12 @@ import { mapToIssuerConfig } from "./mappers";
4
4
  export const evaluateIssuerTrust = async function (issuerUrl) {
5
5
  let context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
6
6
  const issuerMetadata = await fetchMetadata({
7
- config: sdkConfigV1_4,
8
- credentialIssuerUrl: issuerUrl,
9
7
  authorizationServer: context.authorizationServer,
10
8
  callbacks: {
11
9
  fetch: context.appFetch
12
- }
10
+ },
11
+ config: sdkConfigV1_4,
12
+ credentialIssuerUrl: issuerUrl
13
13
  });
14
14
  return {
15
15
  issuerConf: mapToIssuerConfig(issuerMetadata)
@@ -0,0 +1 @@
1
+ {"version":3,"names":["fetchMetadata","sdkConfigV1_4","mapToIssuerConfig","evaluateIssuerTrust","issuerUrl","context","arguments","length","undefined","issuerMetadata","authorizationServer","callbacks","fetch","appFetch","config","credentialIssuerUrl","issuerConf"],"sourceRoot":"../../../../../src","sources":["credential/issuance/v1.4.6/01-evaluate-issuer-trust.ts"],"mappings":"AAAA,SACEA,aAAa,QAER,2BAA2B;AAIlC,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,OAAO,MAAMC,mBAAuD,GAAG,eAAAA,CACrEC,SAAS,EAEN;EAAA,IADHC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEZ,MAAMG,cAAc,GAAI,MAAMT,aAAa,CAAC;IAC1CU,mBAAmB,EAAEL,OAAO,CAACK,mBAAmB;IAChDC,SAAS,EAAE;MACTC,KAAK,EAAEP,OAAO,CAACQ;IACjB,CAAC;IACDC,MAAM,EAAEb,aAAa;IACrBc,mBAAmB,EAAEX;EACvB,CAAC,CAA0B;EAE3B,OAAO;IAAEY,UAAU,EAAEd,iBAAiB,CAACO,cAAc;EAAE,CAAC;AAC1D,CAAC"}