@pagopa/io-react-native-wallet 2.5.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1551) hide show
  1. package/README.md +41 -7
  2. package/lib/commonjs/IoWallet.js +47 -0
  3. package/lib/commonjs/IoWallet.js.map +1 -0
  4. package/lib/commonjs/api/index.js +51 -0
  5. package/lib/commonjs/api/index.js.map +1 -0
  6. package/lib/commonjs/credential/index.js +1 -9
  7. package/lib/commonjs/credential/index.js.map +1 -1
  8. package/lib/commonjs/credential/issuance/README.md +37 -44
  9. package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js +6 -0
  10. package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
  11. package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js +6 -0
  12. package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js.map +1 -0
  13. package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js +6 -0
  14. package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
  15. package/lib/commonjs/credential/issuance/api/04-authorize-access.js +6 -0
  16. package/lib/commonjs/credential/issuance/api/04-authorize-access.js.map +1 -0
  17. package/lib/commonjs/credential/issuance/api/05-obtain-credential.js +6 -0
  18. package/lib/commonjs/credential/issuance/api/05-obtain-credential.js.map +1 -0
  19. package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js +6 -0
  20. package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
  21. package/lib/commonjs/credential/issuance/api/IssuerConfig.js +67 -0
  22. package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -0
  23. package/lib/commonjs/credential/issuance/api/index.js +6 -0
  24. package/lib/commonjs/credential/issuance/api/index.js.map +1 -0
  25. package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js +17 -0
  26. package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -0
  27. package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js +2 -0
  28. package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js.map +1 -0
  29. package/lib/commonjs/credential/issuance/api/types.js +26 -0
  30. package/lib/commonjs/credential/issuance/api/types.js.map +1 -0
  31. package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +55 -0
  32. package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -0
  33. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +178 -0
  34. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
  35. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +183 -0
  36. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
  37. package/lib/commonjs/credential/issuance/common/authorization.js +56 -0
  38. package/lib/commonjs/credential/issuance/common/authorization.js.map +1 -0
  39. package/lib/commonjs/credential/issuance/common/errors.js +35 -0
  40. package/lib/commonjs/credential/issuance/common/errors.js.map +1 -0
  41. package/lib/commonjs/credential/issuance/index.js +8 -68
  42. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  43. package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
  44. package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
  45. package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js +25 -37
  46. package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
  47. package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js +24 -46
  48. package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
  49. package/lib/commonjs/credential/issuance/mrtd-pop/index.js +8 -24
  50. package/lib/commonjs/credential/issuance/mrtd-pop/index.js.map +1 -1
  51. package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js +19 -0
  52. package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
  53. package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +63 -0
  54. package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
  55. package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +195 -0
  56. package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
  57. package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +69 -0
  58. package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
  59. package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +148 -0
  60. package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
  61. package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +34 -0
  62. package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
  63. package/lib/commonjs/credential/issuance/v1.0.0/index.js +28 -0
  64. package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -0
  65. package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +28 -0
  66. package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -0
  67. package/lib/commonjs/credential/issuance/v1.0.0/types.js +44 -0
  68. package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -0
  69. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +24 -0
  70. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
  71. package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +92 -0
  72. package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
  73. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +187 -0
  74. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
  75. package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js +75 -0
  76. package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
  77. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +143 -0
  78. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
  79. package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +34 -0
  80. package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
  81. package/lib/commonjs/credential/issuance/v1.3.3/index.js +28 -0
  82. package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -0
  83. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +73 -0
  84. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -0
  85. package/lib/commonjs/credential/issuance/v1.3.3/types.js +14 -0
  86. package/lib/commonjs/credential/issuance/v1.3.3/types.js.map +1 -0
  87. package/lib/commonjs/credential/offer/README.md +103 -119
  88. package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js +6 -0
  89. package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
  90. package/lib/commonjs/credential/offer/api/02-extract-grant-details.js +6 -0
  91. package/lib/commonjs/credential/offer/api/02-extract-grant-details.js.map +1 -0
  92. package/lib/commonjs/credential/offer/api/index.js +17 -0
  93. package/lib/commonjs/credential/offer/api/index.js.map +1 -0
  94. package/lib/commonjs/credential/offer/api/types.js +6 -0
  95. package/lib/commonjs/credential/offer/api/types.js.map +1 -0
  96. package/lib/commonjs/credential/offer/common/errors.js +22 -0
  97. package/lib/commonjs/credential/offer/common/errors.js.map +1 -0
  98. package/lib/commonjs/credential/offer/index.js +7 -7
  99. package/lib/commonjs/credential/offer/index.js.map +1 -1
  100. package/lib/commonjs/credential/offer/v1.0.0/index.js +17 -0
  101. package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -0
  102. package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +62 -0
  103. package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
  104. package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +25 -0
  105. package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
  106. package/lib/commonjs/credential/offer/v1.3.3/index.js +14 -0
  107. package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -0
  108. package/lib/commonjs/credential/presentation/README.md +12 -9
  109. package/lib/commonjs/credential/presentation/api/01-start-flow.js +6 -0
  110. package/lib/commonjs/credential/presentation/api/01-start-flow.js.map +1 -0
  111. package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js +6 -0
  112. package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
  113. package/lib/commonjs/credential/presentation/api/03-get-request-object.js +6 -0
  114. package/lib/commonjs/credential/presentation/api/03-get-request-object.js.map +1 -0
  115. package/lib/commonjs/credential/presentation/api/04-verify-request-object.js +6 -0
  116. package/lib/commonjs/credential/presentation/api/04-verify-request-object.js.map +1 -0
  117. package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js +6 -0
  118. package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
  119. package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js +6 -0
  120. package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js.map +1 -0
  121. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +31 -0
  122. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
  123. package/lib/commonjs/credential/presentation/api/index.js +17 -0
  124. package/lib/commonjs/credential/presentation/api/index.js.map +1 -0
  125. package/lib/commonjs/credential/presentation/api/types.js +74 -0
  126. package/lib/commonjs/credential/presentation/api/types.js.map +1 -0
  127. package/lib/commonjs/credential/presentation/common/errors.js +121 -0
  128. package/lib/commonjs/credential/presentation/common/errors.js.map +1 -0
  129. package/lib/commonjs/credential/presentation/common/utils/dcql.js +164 -0
  130. package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -0
  131. package/lib/commonjs/credential/presentation/common/utils/http.js +28 -0
  132. package/lib/commonjs/credential/presentation/common/utils/http.js.map +1 -0
  133. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +56 -0
  134. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -0
  135. package/lib/commonjs/credential/presentation/common/utils.js +28 -0
  136. package/lib/commonjs/credential/presentation/common/utils.js.map +1 -0
  137. package/lib/commonjs/credential/presentation/index.js +7 -80
  138. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  139. package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +21 -0
  140. package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
  141. package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +21 -0
  142. package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
  143. package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +58 -0
  144. package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
  145. package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js +86 -0
  146. package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
  147. package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +85 -0
  148. package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
  149. package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js +165 -0
  150. package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
  151. package/lib/commonjs/credential/presentation/v1.0.0/index.js +24 -0
  152. package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -0
  153. package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +33 -0
  154. package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -0
  155. package/lib/commonjs/credential/presentation/v1.0.0/types.js +46 -0
  156. package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -0
  157. package/lib/commonjs/credential/presentation/v1.0.0/utils.js +27 -0
  158. package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -0
  159. package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js +27 -0
  160. package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
  161. package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js +23 -0
  162. package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
  163. package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +22 -0
  164. package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
  165. package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js +37 -0
  166. package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
  167. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js +33 -0
  168. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
  169. package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +105 -0
  170. package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
  171. package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js +137 -0
  172. package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
  173. package/lib/commonjs/credential/presentation/v1.3.3/index.js +24 -0
  174. package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -0
  175. package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +32 -0
  176. package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -0
  177. package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js +74 -0
  178. package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
  179. package/lib/commonjs/credential/presentation/v1.3.3/types.js +19 -0
  180. package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -0
  181. package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js +88 -0
  182. package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
  183. package/lib/commonjs/credential/status/README.md +77 -19
  184. package/lib/commonjs/credential/status/api/index.js +17 -0
  185. package/lib/commonjs/credential/status/api/index.js.map +1 -0
  186. package/lib/commonjs/credential/status/api/status-assertion.js +6 -0
  187. package/lib/commonjs/credential/status/api/status-assertion.js.map +1 -0
  188. package/lib/commonjs/credential/status/api/status-list.js +6 -0
  189. package/lib/commonjs/credential/status/api/status-list.js.map +1 -0
  190. package/lib/commonjs/credential/status/api/types.js +2 -0
  191. package/lib/commonjs/credential/status/api/types.js.map +1 -0
  192. package/lib/commonjs/credential/status/index.js +21 -12
  193. package/lib/commonjs/credential/status/index.js.map +1 -1
  194. package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +71 -0
  195. package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
  196. package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +74 -0
  197. package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
  198. package/lib/commonjs/credential/status/v1.0.0/index.js +20 -0
  199. package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -0
  200. package/lib/commonjs/credential/status/v1.0.0/mappers.js +10 -0
  201. package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -0
  202. package/lib/commonjs/credential/status/v1.0.0/types.js +81 -0
  203. package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -0
  204. package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +48 -0
  205. package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -0
  206. package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js +24 -0
  207. package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
  208. package/lib/commonjs/credential/status/v1.3.3/index.js +20 -0
  209. package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -0
  210. package/lib/commonjs/credential/trustmark/README.md +5 -1
  211. package/lib/commonjs/credential/trustmark/api/index.js +6 -0
  212. package/lib/commonjs/credential/trustmark/api/index.js.map +1 -0
  213. package/lib/commonjs/credential/trustmark/index.js +10 -3
  214. package/lib/commonjs/credential/trustmark/index.js.map +1 -1
  215. package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +70 -0
  216. package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
  217. package/lib/commonjs/credential/trustmark/v1.0.0/index.js +12 -0
  218. package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -0
  219. package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js +12 -0
  220. package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
  221. package/lib/commonjs/credential/trustmark/v1.3.3/index.js +12 -0
  222. package/lib/commonjs/credential/trustmark/v1.3.3/index.js.map +1 -0
  223. package/lib/commonjs/credentials-catalogue/README.md +8 -2
  224. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +84 -0
  225. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
  226. package/lib/commonjs/credentials-catalogue/api/index.js +6 -0
  227. package/lib/commonjs/credentials-catalogue/api/index.js.map +1 -0
  228. package/lib/commonjs/credentials-catalogue/index.js +10 -3
  229. package/lib/commonjs/credentials-catalogue/index.js.map +1 -1
  230. package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +33 -0
  231. package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
  232. package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +12 -0
  233. package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -0
  234. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +29 -0
  235. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
  236. package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +99 -0
  237. package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -0
  238. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +47 -0
  239. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
  240. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +12 -0
  241. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -0
  242. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +61 -0
  243. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
  244. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +156 -0
  245. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -0
  246. package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +57 -0
  247. package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -0
  248. package/lib/commonjs/index.js +21 -7
  249. package/lib/commonjs/index.js.map +1 -1
  250. package/lib/commonjs/mdoc/index.js +22 -3
  251. package/lib/commonjs/mdoc/index.js.map +1 -1
  252. package/lib/commonjs/mdoc/utils.js.map +1 -1
  253. package/lib/commonjs/sd-jwt/__test__/types.test.js +0 -61
  254. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  255. package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -12
  256. package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
  257. package/lib/commonjs/sd-jwt/index.js +20 -164
  258. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  259. package/lib/commonjs/sd-jwt/types.js +26 -50
  260. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  261. package/lib/commonjs/sd-jwt/utils.js +5 -7
  262. package/lib/commonjs/sd-jwt/utils.js.map +1 -1
  263. package/lib/commonjs/trust/README.md +24 -11
  264. package/lib/commonjs/trust/api/TrustAnchorConfig.js +29 -0
  265. package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -0
  266. package/lib/commonjs/trust/api/index.js +6 -0
  267. package/lib/commonjs/trust/api/index.js.map +1 -0
  268. package/lib/commonjs/trust/common/build-chain.js +118 -0
  269. package/lib/commonjs/trust/common/build-chain.js.map +1 -0
  270. package/lib/commonjs/trust/common/errors.js +134 -0
  271. package/lib/commonjs/trust/common/errors.js.map +1 -0
  272. package/lib/commonjs/trust/common/types.js +82 -0
  273. package/lib/commonjs/trust/common/types.js.map +1 -0
  274. package/lib/commonjs/trust/common/utils.js +139 -0
  275. package/lib/commonjs/trust/common/utils.js.map +1 -0
  276. package/lib/commonjs/trust/common/verify-chain.js +193 -0
  277. package/lib/commonjs/trust/common/verify-chain.js.map +1 -0
  278. package/lib/commonjs/trust/index.js +9 -8
  279. package/lib/commonjs/trust/index.js.map +1 -1
  280. package/lib/commonjs/trust/v1.0.0/build-chain.js +15 -0
  281. package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -0
  282. package/lib/commonjs/trust/v1.0.0/entities.js +51 -0
  283. package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -0
  284. package/lib/commonjs/trust/v1.0.0/index.js +18 -0
  285. package/lib/commonjs/trust/v1.0.0/index.js.map +1 -0
  286. package/lib/commonjs/trust/v1.0.0/mappers.js +21 -0
  287. package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -0
  288. package/lib/commonjs/trust/v1.0.0/types.js +159 -0
  289. package/lib/commonjs/trust/v1.0.0/types.js.map +1 -0
  290. package/lib/commonjs/trust/v1.0.0/verify-chain.js +19 -0
  291. package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -0
  292. package/lib/commonjs/trust/v1.3.3/entities.js +43 -0
  293. package/lib/commonjs/trust/v1.3.3/entities.js.map +1 -0
  294. package/lib/commonjs/trust/v1.3.3/types.js +54 -0
  295. package/lib/commonjs/trust/v1.3.3/types.js.map +1 -0
  296. package/lib/commonjs/utils/callbacks.js +101 -0
  297. package/lib/commonjs/utils/callbacks.js.map +1 -0
  298. package/lib/commonjs/utils/config.js +23 -0
  299. package/lib/commonjs/utils/config.js.map +1 -0
  300. package/lib/commonjs/utils/credentials.js +9 -6
  301. package/lib/commonjs/utils/credentials.js.map +1 -1
  302. package/lib/commonjs/utils/errors.js +68 -5
  303. package/lib/commonjs/utils/errors.js.map +1 -1
  304. package/lib/commonjs/utils/mappers.js +71 -0
  305. package/lib/commonjs/utils/mappers.js.map +1 -0
  306. package/lib/commonjs/utils/misc.js +19 -4
  307. package/lib/commonjs/utils/misc.js.map +1 -1
  308. package/lib/commonjs/utils/object.js +20 -0
  309. package/lib/commonjs/utils/object.js.map +1 -0
  310. package/lib/commonjs/utils/par.js +5 -4
  311. package/lib/commonjs/utils/par.js.map +1 -1
  312. package/lib/commonjs/utils/zod.js +3 -1
  313. package/lib/commonjs/utils/zod.js.map +1 -1
  314. package/lib/commonjs/wallet-instance/README.md +8 -5
  315. package/lib/commonjs/wallet-instance/api/index.js +6 -0
  316. package/lib/commonjs/wallet-instance/api/index.js.map +1 -0
  317. package/lib/commonjs/wallet-instance/common/wallet-instance.js +75 -0
  318. package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -0
  319. package/lib/commonjs/wallet-instance/index.js +13 -83
  320. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  321. package/lib/commonjs/wallet-instance/v1.0.0/index.js +15 -0
  322. package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -0
  323. package/lib/commonjs/wallet-instance/v1.3.3/index.js +15 -0
  324. package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +1 -0
  325. package/lib/commonjs/wallet-instance-attestation/README.md +8 -2
  326. package/lib/commonjs/wallet-instance-attestation/api/index.js +6 -0
  327. package/lib/commonjs/wallet-instance-attestation/api/index.js.map +1 -0
  328. package/lib/commonjs/wallet-instance-attestation/api/types.js +30 -0
  329. package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -0
  330. package/lib/commonjs/wallet-instance-attestation/common/types.js +34 -0
  331. package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -0
  332. package/lib/commonjs/wallet-instance-attestation/index.js +10 -53
  333. package/lib/commonjs/wallet-instance-attestation/index.js.map +1 -1
  334. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +17 -0
  335. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
  336. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +106 -0
  337. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
  338. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +19 -0
  339. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
  340. package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +46 -0
  341. package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
  342. package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +37 -0
  343. package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
  344. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +19 -0
  345. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
  346. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +12 -0
  347. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
  348. package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js +42 -0
  349. package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
  350. package/lib/module/IoWallet.js +40 -0
  351. package/lib/module/IoWallet.js.map +1 -0
  352. package/lib/module/api/index.js +43 -0
  353. package/lib/module/api/index.js.map +1 -0
  354. package/lib/module/credential/index.js +1 -5
  355. package/lib/module/credential/index.js.map +1 -1
  356. package/lib/module/credential/issuance/README.md +37 -44
  357. package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js +2 -0
  358. package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
  359. package/lib/module/credential/issuance/api/02-start-user-authorization.js +2 -0
  360. package/lib/module/credential/issuance/api/02-start-user-authorization.js.map +1 -0
  361. package/lib/module/credential/issuance/api/03-complete-user-authorization.js +2 -0
  362. package/lib/module/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
  363. package/lib/module/credential/issuance/api/04-authorize-access.js +2 -0
  364. package/lib/module/credential/issuance/api/04-authorize-access.js.map +1 -0
  365. package/lib/module/credential/issuance/api/05-obtain-credential.js +2 -0
  366. package/lib/module/credential/issuance/api/05-obtain-credential.js.map +1 -0
  367. package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js +2 -0
  368. package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
  369. package/lib/module/credential/issuance/api/IssuerConfig.js +60 -0
  370. package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -0
  371. package/lib/module/credential/issuance/api/index.js +2 -0
  372. package/lib/module/credential/issuance/api/index.js.map +1 -0
  373. package/lib/module/credential/issuance/api/mrtd-pop/index.js +3 -0
  374. package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -0
  375. package/lib/module/credential/issuance/api/mrtd-pop/types.js +2 -0
  376. package/lib/module/credential/issuance/api/mrtd-pop/types.js.map +1 -0
  377. package/lib/module/credential/issuance/api/types.js +17 -0
  378. package/lib/module/credential/issuance/api/types.js.map +1 -0
  379. package/lib/module/credential/issuance/common/02-start-user-authorization.js +47 -0
  380. package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -0
  381. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +171 -0
  382. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
  383. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +176 -0
  384. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
  385. package/lib/module/credential/issuance/common/authorization.js +48 -0
  386. package/lib/module/credential/issuance/common/authorization.js.map +1 -0
  387. package/lib/module/credential/issuance/common/errors.js +28 -0
  388. package/lib/module/credential/issuance/common/errors.js.map +1 -0
  389. package/lib/module/credential/issuance/index.js +4 -9
  390. package/lib/module/credential/issuance/index.js.map +1 -1
  391. package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
  392. package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
  393. package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js +24 -38
  394. package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
  395. package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js +22 -46
  396. package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
  397. package/lib/module/credential/issuance/mrtd-pop/index.js +6 -1
  398. package/lib/module/credential/issuance/mrtd-pop/index.js.map +1 -1
  399. package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js +12 -0
  400. package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
  401. package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +56 -0
  402. package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
  403. package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +182 -0
  404. package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
  405. package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +60 -0
  406. package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
  407. package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +140 -0
  408. package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
  409. package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +27 -0
  410. package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
  411. package/lib/module/credential/issuance/v1.0.0/index.js +21 -0
  412. package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -0
  413. package/lib/module/credential/issuance/v1.0.0/mappers.js +21 -0
  414. package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -0
  415. package/lib/module/credential/issuance/v1.0.0/types.js +22 -0
  416. package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -0
  417. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +17 -0
  418. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
  419. package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +85 -0
  420. package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
  421. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +174 -0
  422. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
  423. package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js +66 -0
  424. package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
  425. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +135 -0
  426. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
  427. package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +27 -0
  428. package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
  429. package/lib/module/credential/issuance/v1.3.3/index.js +21 -0
  430. package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -0
  431. package/lib/module/credential/issuance/v1.3.3/mappers.js +66 -0
  432. package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -0
  433. package/lib/module/credential/issuance/v1.3.3/types.js +5 -0
  434. package/lib/module/credential/issuance/v1.3.3/types.js.map +1 -0
  435. package/lib/module/credential/offer/README.md +103 -119
  436. package/lib/module/credential/offer/api/01-resolve-credential-offer.js +2 -0
  437. package/lib/module/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
  438. package/lib/module/credential/offer/api/02-extract-grant-details.js +2 -0
  439. package/lib/module/credential/offer/api/02-extract-grant-details.js.map +1 -0
  440. package/lib/module/credential/offer/api/index.js +3 -0
  441. package/lib/module/credential/offer/api/index.js.map +1 -0
  442. package/lib/module/credential/offer/api/types.js +2 -0
  443. package/lib/module/credential/offer/api/types.js.map +1 -0
  444. package/lib/module/credential/offer/common/errors.js +14 -0
  445. package/lib/module/credential/offer/common/errors.js.map +1 -0
  446. package/lib/module/credential/offer/index.js +4 -4
  447. package/lib/module/credential/offer/index.js.map +1 -1
  448. package/lib/module/credential/offer/v1.0.0/index.js +10 -0
  449. package/lib/module/credential/offer/v1.0.0/index.js.map +1 -0
  450. package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +55 -0
  451. package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
  452. package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +18 -0
  453. package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
  454. package/lib/module/credential/offer/v1.3.3/index.js +7 -0
  455. package/lib/module/credential/offer/v1.3.3/index.js.map +1 -0
  456. package/lib/module/credential/presentation/README.md +12 -9
  457. package/lib/module/credential/presentation/api/01-start-flow.js +2 -0
  458. package/lib/module/credential/presentation/api/01-start-flow.js.map +1 -0
  459. package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js +2 -0
  460. package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
  461. package/lib/module/credential/presentation/api/03-get-request-object.js +2 -0
  462. package/lib/module/credential/presentation/api/03-get-request-object.js.map +1 -0
  463. package/lib/module/credential/presentation/api/04-verify-request-object.js +2 -0
  464. package/lib/module/credential/presentation/api/04-verify-request-object.js.map +1 -0
  465. package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js +2 -0
  466. package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
  467. package/lib/module/credential/presentation/api/06-send-authorization-response.js +2 -0
  468. package/lib/module/credential/presentation/api/06-send-authorization-response.js.map +1 -0
  469. package/lib/module/credential/presentation/api/RelyingPartyConfig.js +23 -0
  470. package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
  471. package/lib/module/credential/presentation/api/index.js +3 -0
  472. package/lib/module/credential/presentation/api/index.js.map +1 -0
  473. package/lib/module/credential/presentation/api/types.js +64 -0
  474. package/lib/module/credential/presentation/api/types.js.map +1 -0
  475. package/lib/module/credential/presentation/common/errors.js +103 -0
  476. package/lib/module/credential/presentation/common/errors.js.map +1 -0
  477. package/lib/module/credential/presentation/common/utils/dcql.js +152 -0
  478. package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -0
  479. package/lib/module/credential/presentation/common/utils/http.js +21 -0
  480. package/lib/module/credential/presentation/common/utils/http.js.map +1 -0
  481. package/lib/module/credential/presentation/common/utils/sd-jwt.js +49 -0
  482. package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -0
  483. package/lib/module/credential/presentation/common/utils.js +21 -0
  484. package/lib/module/credential/presentation/common/utils.js.map +1 -0
  485. package/lib/module/credential/presentation/index.js +4 -11
  486. package/lib/module/credential/presentation/index.js.map +1 -1
  487. package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +14 -0
  488. package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
  489. package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +14 -0
  490. package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
  491. package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +51 -0
  492. package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
  493. package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js +79 -0
  494. package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
  495. package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +76 -0
  496. package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
  497. package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js +155 -0
  498. package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
  499. package/lib/module/credential/presentation/v1.0.0/index.js +17 -0
  500. package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -0
  501. package/lib/module/credential/presentation/v1.0.0/mappers.js +25 -0
  502. package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -0
  503. package/lib/module/credential/presentation/v1.0.0/types.js +36 -0
  504. package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -0
  505. package/lib/module/credential/presentation/v1.0.0/utils.js +20 -0
  506. package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -0
  507. package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +20 -0
  508. package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
  509. package/lib/module/credential/presentation/v1.3.3/01-start-flow.js +16 -0
  510. package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
  511. package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +15 -0
  512. package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
  513. package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js +30 -0
  514. package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
  515. package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js +26 -0
  516. package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
  517. package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +97 -0
  518. package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
  519. package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js +129 -0
  520. package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
  521. package/lib/module/credential/presentation/v1.3.3/index.js +17 -0
  522. package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -0
  523. package/lib/module/credential/presentation/v1.3.3/mappers.js +24 -0
  524. package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -0
  525. package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js +65 -0
  526. package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
  527. package/lib/module/credential/presentation/v1.3.3/types.js +9 -0
  528. package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -0
  529. package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js +79 -0
  530. package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
  531. package/lib/module/credential/status/README.md +77 -19
  532. package/lib/module/credential/status/api/index.js +14 -0
  533. package/lib/module/credential/status/api/index.js.map +1 -0
  534. package/lib/module/credential/status/api/status-assertion.js +2 -0
  535. package/lib/module/credential/status/api/status-assertion.js.map +1 -0
  536. package/lib/module/credential/status/api/status-list.js +2 -0
  537. package/lib/module/credential/status/api/status-list.js.map +1 -0
  538. package/lib/module/credential/status/api/types.js +2 -0
  539. package/lib/module/credential/status/api/types.js.map +1 -0
  540. package/lib/module/credential/status/index.js +3 -4
  541. package/lib/module/credential/status/index.js.map +1 -1
  542. package/lib/module/credential/status/v1.0.0/01-status-assertion.js +64 -0
  543. package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
  544. package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +67 -0
  545. package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
  546. package/lib/module/credential/status/v1.0.0/index.js +13 -0
  547. package/lib/module/credential/status/v1.0.0/index.js.map +1 -0
  548. package/lib/module/credential/status/v1.0.0/mappers.js +3 -0
  549. package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -0
  550. package/lib/module/credential/status/v1.0.0/types.js +71 -0
  551. package/lib/module/credential/status/v1.0.0/types.js.map +1 -0
  552. package/lib/module/credential/status/v1.3.3/01-status-list.js +41 -0
  553. package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -0
  554. package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js +17 -0
  555. package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
  556. package/lib/module/credential/status/v1.3.3/index.js +13 -0
  557. package/lib/module/credential/status/v1.3.3/index.js.map +1 -0
  558. package/lib/module/credential/trustmark/README.md +5 -1
  559. package/lib/module/credential/trustmark/api/index.js +2 -0
  560. package/lib/module/credential/trustmark/api/index.js.map +1 -0
  561. package/lib/module/credential/trustmark/index.js +2 -2
  562. package/lib/module/credential/trustmark/index.js.map +1 -1
  563. package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +61 -0
  564. package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
  565. package/lib/module/credential/trustmark/v1.0.0/index.js +5 -0
  566. package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -0
  567. package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js +5 -0
  568. package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
  569. package/lib/module/credential/trustmark/v1.3.3/index.js +5 -0
  570. package/lib/module/credential/trustmark/v1.3.3/index.js.map +1 -0
  571. package/lib/module/credentials-catalogue/README.md +8 -2
  572. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +73 -0
  573. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
  574. package/lib/module/credentials-catalogue/api/index.js +2 -0
  575. package/lib/module/credentials-catalogue/api/index.js.map +1 -0
  576. package/lib/module/credentials-catalogue/index.js +2 -1
  577. package/lib/module/credentials-catalogue/index.js.map +1 -1
  578. package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +26 -0
  579. package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
  580. package/lib/module/credentials-catalogue/v1.0.0/index.js +5 -0
  581. package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -0
  582. package/lib/module/credentials-catalogue/v1.0.0/mappers.js +22 -0
  583. package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
  584. package/lib/module/credentials-catalogue/v1.0.0/types.js +89 -0
  585. package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -0
  586. package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +39 -0
  587. package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
  588. package/lib/module/credentials-catalogue/v1.3.3/index.js +5 -0
  589. package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -0
  590. package/lib/module/credentials-catalogue/v1.3.3/mappers.js +54 -0
  591. package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
  592. package/lib/module/credentials-catalogue/v1.3.3/types.js +141 -0
  593. package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -0
  594. package/lib/module/credentials-catalogue/v1.3.3/utils.js +50 -0
  595. package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -0
  596. package/lib/module/index.js +9 -4
  597. package/lib/module/index.js.map +1 -1
  598. package/lib/module/mdoc/index.js +19 -2
  599. package/lib/module/mdoc/index.js.map +1 -1
  600. package/lib/module/mdoc/utils.js.map +1 -1
  601. package/lib/module/sd-jwt/__test__/types.test.js +1 -62
  602. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  603. package/lib/module/sd-jwt/__test__/utils.test.js +3 -12
  604. package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
  605. package/lib/module/sd-jwt/index.js +19 -147
  606. package/lib/module/sd-jwt/index.js.map +1 -1
  607. package/lib/module/sd-jwt/types.js +21 -44
  608. package/lib/module/sd-jwt/types.js.map +1 -1
  609. package/lib/module/sd-jwt/utils.js +5 -7
  610. package/lib/module/sd-jwt/utils.js.map +1 -1
  611. package/lib/module/trust/README.md +24 -11
  612. package/lib/module/trust/api/TrustAnchorConfig.js +21 -0
  613. package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -0
  614. package/lib/module/trust/api/index.js +2 -0
  615. package/lib/module/trust/api/index.js.map +1 -0
  616. package/lib/module/trust/common/build-chain.js +111 -0
  617. package/lib/module/trust/common/build-chain.js.map +1 -0
  618. package/lib/module/trust/common/errors.js +116 -0
  619. package/lib/module/trust/common/errors.js.map +1 -0
  620. package/lib/module/trust/common/types.js +69 -0
  621. package/lib/module/trust/common/types.js.map +1 -0
  622. package/lib/module/trust/common/utils.js +126 -0
  623. package/lib/module/trust/common/utils.js.map +1 -0
  624. package/lib/module/trust/common/verify-chain.js +188 -0
  625. package/lib/module/trust/common/verify-chain.js.map +1 -0
  626. package/lib/module/trust/index.js +3 -5
  627. package/lib/module/trust/index.js.map +1 -1
  628. package/lib/module/trust/v1.0.0/build-chain.js +8 -0
  629. package/lib/module/trust/v1.0.0/build-chain.js.map +1 -0
  630. package/lib/module/trust/v1.0.0/entities.js +41 -0
  631. package/lib/module/trust/v1.0.0/entities.js.map +1 -0
  632. package/lib/module/trust/v1.0.0/index.js +11 -0
  633. package/lib/module/trust/v1.0.0/index.js.map +1 -0
  634. package/lib/module/trust/v1.0.0/mappers.js +14 -0
  635. package/lib/module/trust/v1.0.0/mappers.js.map +1 -0
  636. package/lib/module/trust/v1.0.0/types.js +150 -0
  637. package/lib/module/trust/v1.0.0/types.js.map +1 -0
  638. package/lib/module/trust/v1.0.0/verify-chain.js +12 -0
  639. package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -0
  640. package/lib/module/trust/v1.3.3/entities.js +37 -0
  641. package/lib/module/trust/v1.3.3/entities.js.map +1 -0
  642. package/lib/module/trust/v1.3.3/types.js +46 -0
  643. package/lib/module/trust/v1.3.3/types.js.map +1 -0
  644. package/lib/module/utils/callbacks.js +94 -0
  645. package/lib/module/utils/callbacks.js.map +1 -0
  646. package/lib/module/utils/config.js +16 -0
  647. package/lib/module/utils/config.js.map +1 -0
  648. package/lib/module/utils/credentials.js +9 -6
  649. package/lib/module/utils/credentials.js.map +1 -1
  650. package/lib/module/utils/errors.js +62 -2
  651. package/lib/module/utils/errors.js.map +1 -1
  652. package/lib/module/utils/mappers.js +62 -0
  653. package/lib/module/utils/mappers.js.map +1 -0
  654. package/lib/module/utils/misc.js +15 -1
  655. package/lib/module/utils/misc.js.map +1 -1
  656. package/lib/module/utils/object.js +11 -0
  657. package/lib/module/utils/object.js.map +1 -0
  658. package/lib/module/utils/par.js +5 -4
  659. package/lib/module/utils/par.js.map +1 -1
  660. package/lib/module/utils/zod.js +1 -0
  661. package/lib/module/utils/zod.js.map +1 -1
  662. package/lib/module/wallet-instance/README.md +8 -5
  663. package/lib/module/wallet-instance/api/index.js +2 -0
  664. package/lib/module/wallet-instance/api/index.js.map +1 -0
  665. package/lib/module/wallet-instance/common/wallet-instance.js +65 -0
  666. package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -0
  667. package/lib/module/wallet-instance/index.js +2 -80
  668. package/lib/module/wallet-instance/index.js.map +1 -1
  669. package/lib/module/wallet-instance/v1.0.0/index.js +8 -0
  670. package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -0
  671. package/lib/module/wallet-instance/v1.3.3/index.js +8 -0
  672. package/lib/module/wallet-instance/v1.3.3/index.js.map +1 -0
  673. package/lib/module/wallet-instance-attestation/README.md +8 -2
  674. package/lib/module/wallet-instance-attestation/api/index.js +2 -0
  675. package/lib/module/wallet-instance-attestation/api/index.js.map +1 -0
  676. package/lib/module/wallet-instance-attestation/api/types.js +22 -0
  677. package/lib/module/wallet-instance-attestation/api/types.js.map +1 -0
  678. package/lib/module/wallet-instance-attestation/common/types.js +25 -0
  679. package/lib/module/wallet-instance-attestation/common/types.js.map +1 -0
  680. package/lib/module/wallet-instance-attestation/index.js +2 -51
  681. package/lib/module/wallet-instance-attestation/index.js.map +1 -1
  682. package/lib/module/wallet-instance-attestation/v1.0.0/index.js +10 -0
  683. package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
  684. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +100 -0
  685. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
  686. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +11 -0
  687. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
  688. package/lib/module/wallet-instance-attestation/v1.0.0/types.js +35 -0
  689. package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
  690. package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +31 -0
  691. package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
  692. package/lib/module/wallet-instance-attestation/v1.3.3/index.js +12 -0
  693. package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
  694. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +5 -0
  695. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
  696. package/lib/module/wallet-instance-attestation/v1.3.3/types.js +32 -0
  697. package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
  698. package/lib/typescript/IoWallet.d.ts +28 -0
  699. package/lib/typescript/IoWallet.d.ts.map +1 -0
  700. package/lib/typescript/api/index.d.ts +29 -0
  701. package/lib/typescript/api/index.d.ts.map +1 -0
  702. package/lib/typescript/client/generated/wallet-provider.d.ts +14 -14
  703. package/lib/typescript/credential/index.d.ts +1 -5
  704. package/lib/typescript/credential/index.d.ts.map +1 -1
  705. package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts +18 -0
  706. package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts.map +1 -0
  707. package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +48 -0
  708. package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -0
  709. package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +78 -0
  710. package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -0
  711. package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +33 -0
  712. package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -0
  713. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +36 -0
  714. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -0
  715. package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +36 -0
  716. package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -0
  717. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +423 -0
  718. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -0
  719. package/lib/typescript/credential/issuance/api/index.d.ts +14 -0
  720. package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -0
  721. package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +74 -0
  722. package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -0
  723. package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +34 -0
  724. package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -0
  725. package/lib/typescript/credential/issuance/api/types.d.ts +64 -0
  726. package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -0
  727. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +21 -0
  728. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -0
  729. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts +3 -0
  730. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -0
  731. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts +3 -0
  732. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -0
  733. package/lib/typescript/credential/issuance/common/authorization.d.ts +21 -0
  734. package/lib/typescript/credential/issuance/common/authorization.d.ts.map +1 -0
  735. package/lib/typescript/credential/issuance/common/errors.d.ts +19 -0
  736. package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -0
  737. package/lib/typescript/credential/issuance/index.d.ts +5 -11
  738. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  739. package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts +2 -24
  740. package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts.map +1 -1
  741. package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts +2 -22
  742. package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts.map +1 -1
  743. package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts +3 -38
  744. package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts.map +1 -1
  745. package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts +2 -6
  746. package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts.map +1 -1
  747. package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts +3 -0
  748. package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -0
  749. package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts +3 -0
  750. package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -0
  751. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +16 -0
  752. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -0
  753. package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts +3 -0
  754. package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -0
  755. package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts +5 -0
  756. package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -0
  757. package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts +3 -0
  758. package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -0
  759. package/lib/typescript/credential/issuance/v1.0.0/index.d.ts +3 -0
  760. package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -0
  761. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +307 -0
  762. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -0
  763. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts +43 -0
  764. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -0
  765. package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts +3 -0
  766. package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -0
  767. package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts +3 -0
  768. package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -0
  769. package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts +16 -0
  770. package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -0
  771. package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts +3 -0
  772. package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +1 -0
  773. package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +5 -0
  774. package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -0
  775. package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts +3 -0
  776. package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +1 -0
  777. package/lib/typescript/credential/issuance/v1.3.3/index.d.ts +3 -0
  778. package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -0
  779. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +2309 -0
  780. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -0
  781. package/lib/typescript/credential/issuance/v1.3.3/types.d.ts +10 -0
  782. package/lib/typescript/credential/issuance/v1.3.3/types.d.ts.map +1 -0
  783. package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts +22 -0
  784. package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts.map +1 -0
  785. package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts +13 -0
  786. package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts.map +1 -0
  787. package/lib/typescript/credential/offer/api/index.d.ts +6 -0
  788. package/lib/typescript/credential/offer/api/index.d.ts.map +1 -0
  789. package/lib/typescript/credential/offer/api/types.d.ts +5 -0
  790. package/lib/typescript/credential/offer/api/types.d.ts.map +1 -0
  791. package/lib/typescript/credential/offer/common/errors.d.ts +10 -0
  792. package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -0
  793. package/lib/typescript/credential/offer/index.d.ts +5 -6
  794. package/lib/typescript/credential/offer/index.d.ts.map +1 -1
  795. package/lib/typescript/credential/offer/v1.0.0/index.d.ts +3 -0
  796. package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -0
  797. package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts +25 -0
  798. package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -0
  799. package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts +16 -0
  800. package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -0
  801. package/lib/typescript/credential/offer/v1.3.3/index.d.ts +3 -0
  802. package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -0
  803. package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +18 -0
  804. package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -0
  805. package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts +18 -0
  806. package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts.map +1 -0
  807. package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts +19 -0
  808. package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts.map +1 -0
  809. package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts +23 -0
  810. package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts.map +1 -0
  811. package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts +41 -0
  812. package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts.map +1 -0
  813. package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts +54 -0
  814. package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts.map +1 -0
  815. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +185 -0
  816. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -0
  817. package/lib/typescript/credential/presentation/api/index.d.ts +12 -0
  818. package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -0
  819. package/lib/typescript/credential/presentation/api/types.d.ts +207 -0
  820. package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -0
  821. package/lib/typescript/credential/presentation/common/errors.d.ts +80 -0
  822. package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -0
  823. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +293 -0
  824. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -0
  825. package/lib/typescript/credential/presentation/common/utils/http.d.ts +11 -0
  826. package/lib/typescript/credential/presentation/common/utils/http.d.ts.map +1 -0
  827. package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts +14 -0
  828. package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -0
  829. package/lib/typescript/credential/presentation/common/utils.d.ts +11 -0
  830. package/lib/typescript/credential/presentation/common/utils.d.ts.map +1 -0
  831. package/lib/typescript/credential/presentation/index.d.ts +5 -12
  832. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  833. package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts +3 -0
  834. package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -0
  835. package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts +3 -0
  836. package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -0
  837. package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts +3 -0
  838. package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -0
  839. package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts +3 -0
  840. package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts.map +1 -0
  841. package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts +3 -0
  842. package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts.map +1 -0
  843. package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts +26 -0
  844. package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts.map +1 -0
  845. package/lib/typescript/credential/presentation/v1.0.0/index.d.ts +3 -0
  846. package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -0
  847. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +143 -0
  848. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -0
  849. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +80 -0
  850. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -0
  851. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +11 -0
  852. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -0
  853. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +11 -0
  854. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -0
  855. package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts +3 -0
  856. package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +1 -0
  857. package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts +3 -0
  858. package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +1 -0
  859. package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts +3 -0
  860. package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +1 -0
  861. package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts +3 -0
  862. package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts.map +1 -0
  863. package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts +3 -0
  864. package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts.map +1 -0
  865. package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts +18 -0
  866. package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts.map +1 -0
  867. package/lib/typescript/credential/presentation/v1.3.3/index.d.ts +3 -0
  868. package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -0
  869. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +619 -0
  870. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -0
  871. package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts +13 -0
  872. package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -0
  873. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +3730 -0
  874. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -0
  875. package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts +28 -0
  876. package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts.map +1 -0
  877. package/lib/typescript/credential/status/api/index.d.ts +21 -0
  878. package/lib/typescript/credential/status/api/index.d.ts.map +1 -0
  879. package/lib/typescript/credential/status/api/status-assertion.d.ts +49 -0
  880. package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -0
  881. package/lib/typescript/credential/status/api/status-list.d.ts +40 -0
  882. package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -0
  883. package/lib/typescript/credential/status/api/types.d.ts +16 -0
  884. package/lib/typescript/credential/status/api/types.d.ts.map +1 -0
  885. package/lib/typescript/credential/status/index.d.ts +3 -6
  886. package/lib/typescript/credential/status/index.d.ts.map +1 -1
  887. package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts +3 -0
  888. package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -0
  889. package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts +3 -0
  890. package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -0
  891. package/lib/typescript/credential/status/v1.0.0/index.d.ts +3 -0
  892. package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -0
  893. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +47 -0
  894. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -0
  895. package/lib/typescript/credential/status/v1.0.0/types.d.ts +782 -0
  896. package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -0
  897. package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts +3 -0
  898. package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -0
  899. package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts +3 -0
  900. package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -0
  901. package/lib/typescript/credential/status/v1.3.3/index.d.ts +3 -0
  902. package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -0
  903. package/lib/typescript/credential/trustmark/api/index.d.ts +49 -0
  904. package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -0
  905. package/lib/typescript/credential/trustmark/index.d.ts +3 -3
  906. package/lib/typescript/credential/trustmark/index.d.ts.map +1 -1
  907. package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts +3 -0
  908. package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -0
  909. package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts +3 -0
  910. package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -0
  911. package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts +3 -0
  912. package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts.map +1 -0
  913. package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts +3 -0
  914. package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +1 -0
  915. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +613 -0
  916. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -0
  917. package/lib/typescript/credentials-catalogue/api/index.d.ts +18 -0
  918. package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -0
  919. package/lib/typescript/credentials-catalogue/index.d.ts +3 -2
  920. package/lib/typescript/credentials-catalogue/index.d.ts.map +1 -1
  921. package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts +3 -0
  922. package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -0
  923. package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts +3 -0
  924. package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -0
  925. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +54 -0
  926. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -0
  927. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +844 -0
  928. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -0
  929. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts +3 -0
  930. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts.map +1 -0
  931. package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts +3 -0
  932. package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -0
  933. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +168 -0
  934. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -0
  935. package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +1074 -0
  936. package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -0
  937. package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +26 -0
  938. package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -0
  939. package/lib/typescript/index.d.ts +9 -4
  940. package/lib/typescript/index.d.ts.map +1 -1
  941. package/lib/typescript/mdoc/index.d.ts +4 -0
  942. package/lib/typescript/mdoc/index.d.ts.map +1 -1
  943. package/lib/typescript/mdoc/utils.d.ts +2 -2
  944. package/lib/typescript/mdoc/utils.d.ts.map +1 -1
  945. package/lib/typescript/sd-jwt/index.d.ts +58 -278
  946. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  947. package/lib/typescript/sd-jwt/types.d.ts +118 -153
  948. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  949. package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
  950. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +247 -0
  951. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -0
  952. package/lib/typescript/trust/api/index.d.ts +43 -0
  953. package/lib/typescript/trust/api/index.d.ts.map +1 -0
  954. package/lib/typescript/trust/common/build-chain.d.ts +21 -0
  955. package/lib/typescript/trust/common/build-chain.d.ts.map +1 -0
  956. package/lib/typescript/trust/common/errors.d.ts +103 -0
  957. package/lib/typescript/trust/common/errors.d.ts.map +1 -0
  958. package/lib/typescript/trust/common/types.d.ts +1306 -0
  959. package/lib/typescript/trust/common/types.d.ts.map +1 -0
  960. package/lib/typescript/trust/common/utils.d.ts +53 -0
  961. package/lib/typescript/trust/common/utils.d.ts.map +1 -0
  962. package/lib/typescript/trust/common/verify-chain.d.ts +27 -0
  963. package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -0
  964. package/lib/typescript/trust/index.d.ts +4 -5
  965. package/lib/typescript/trust/index.d.ts.map +1 -1
  966. package/lib/typescript/trust/v1.0.0/build-chain.d.ts +54 -0
  967. package/lib/typescript/trust/v1.0.0/build-chain.d.ts.map +1 -0
  968. package/lib/typescript/trust/v1.0.0/entities.d.ts +968 -0
  969. package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -0
  970. package/lib/typescript/trust/v1.0.0/index.d.ts +3 -0
  971. package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -0
  972. package/lib/typescript/trust/v1.0.0/mappers.d.ts +113 -0
  973. package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -0
  974. package/lib/typescript/trust/v1.0.0/types.d.ts +12744 -0
  975. package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -0
  976. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts +57 -0
  977. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -0
  978. package/lib/typescript/trust/v1.3.3/entities.d.ts +103 -0
  979. package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -0
  980. package/lib/typescript/trust/v1.3.3/types.d.ts +14620 -0
  981. package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -0
  982. package/lib/typescript/utils/auth.d.ts +2 -2
  983. package/lib/typescript/utils/callbacks.d.ts +21 -0
  984. package/lib/typescript/utils/callbacks.d.ts.map +1 -0
  985. package/lib/typescript/utils/config.d.ts +10 -0
  986. package/lib/typescript/utils/config.d.ts.map +1 -0
  987. package/lib/typescript/utils/credentials.d.ts +2 -3
  988. package/lib/typescript/utils/credentials.d.ts.map +1 -1
  989. package/lib/typescript/utils/errors.d.ts +38 -3
  990. package/lib/typescript/utils/errors.d.ts.map +1 -1
  991. package/lib/typescript/utils/mappers.d.ts +47 -0
  992. package/lib/typescript/utils/mappers.d.ts.map +1 -0
  993. package/lib/typescript/utils/misc.d.ts +7 -1
  994. package/lib/typescript/utils/misc.d.ts.map +1 -1
  995. package/lib/typescript/utils/object.d.ts +4 -0
  996. package/lib/typescript/utils/object.d.ts.map +1 -0
  997. package/lib/typescript/utils/par.d.ts +2 -2
  998. package/lib/typescript/utils/par.d.ts.map +1 -1
  999. package/lib/typescript/utils/pop.d.ts +2 -2
  1000. package/lib/typescript/utils/zod.d.ts +2 -0
  1001. package/lib/typescript/utils/zod.d.ts.map +1 -1
  1002. package/lib/typescript/wallet-instance/api/index.d.ts +45 -0
  1003. package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -0
  1004. package/lib/typescript/wallet-instance/common/wallet-instance.d.ts +6 -0
  1005. package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -0
  1006. package/lib/typescript/wallet-instance/index.d.ts +3 -35
  1007. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  1008. package/lib/typescript/wallet-instance/v1.0.0/index.d.ts +3 -0
  1009. package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -0
  1010. package/lib/typescript/wallet-instance/v1.3.3/index.d.ts +3 -0
  1011. package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +1 -0
  1012. package/lib/typescript/wallet-instance-attestation/api/index.d.ts +46 -0
  1013. package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -0
  1014. package/lib/typescript/wallet-instance-attestation/api/types.d.ts +211 -0
  1015. package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -0
  1016. package/lib/typescript/wallet-instance-attestation/common/types.d.ts +306 -0
  1017. package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -0
  1018. package/lib/typescript/wallet-instance-attestation/index.d.ts +3 -34
  1019. package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
  1020. package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts +3 -0
  1021. package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -0
  1022. package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts +3 -0
  1023. package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -0
  1024. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +91 -0
  1025. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts.map +1 -0
  1026. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +710 -0
  1027. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -0
  1028. package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts +15 -0
  1029. package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -0
  1030. package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts +3 -0
  1031. package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -0
  1032. package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts +3 -0
  1033. package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -0
  1034. package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +925 -0
  1035. package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -0
  1036. package/package.json +20 -13
  1037. package/src/IoWallet.ts +50 -0
  1038. package/src/api/index.ts +55 -0
  1039. package/src/credential/index.ts +1 -5
  1040. package/src/credential/issuance/README.md +37 -44
  1041. package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +17 -0
  1042. package/src/credential/issuance/api/02-start-user-authorization.ts +50 -0
  1043. package/src/credential/issuance/api/03-complete-user-authorization.ts +102 -0
  1044. package/src/credential/issuance/api/04-authorize-access.ts +37 -0
  1045. package/src/credential/issuance/api/05-obtain-credential.ts +42 -0
  1046. package/src/credential/issuance/api/06-verify-and-parse-credential.ts +42 -0
  1047. package/src/credential/issuance/api/IssuerConfig.ts +65 -0
  1048. package/src/credential/issuance/api/index.ts +21 -0
  1049. package/src/credential/issuance/api/mrtd-pop/index.ts +104 -0
  1050. package/src/credential/issuance/api/mrtd-pop/types.ts +37 -0
  1051. package/src/credential/issuance/api/types.ts +34 -0
  1052. package/src/credential/issuance/common/02-start-user-authorization.ts +86 -0
  1053. package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +236 -0
  1054. package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +261 -0
  1055. package/src/credential/issuance/common/authorization.ts +89 -0
  1056. package/src/credential/issuance/common/errors.ts +29 -0
  1057. package/src/credential/issuance/index.ts +5 -62
  1058. package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +20 -65
  1059. package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +25 -56
  1060. package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +34 -90
  1061. package/src/credential/issuance/mrtd-pop/index.ts +4 -17
  1062. package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +14 -0
  1063. package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +68 -0
  1064. package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +279 -0
  1065. package/src/credential/issuance/v1.0.0/04-authorize-access.ts +93 -0
  1066. package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +212 -0
  1067. package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +46 -0
  1068. package/src/credential/issuance/v1.0.0/index.ts +28 -0
  1069. package/src/credential/issuance/v1.0.0/mappers.ts +29 -0
  1070. package/src/credential/issuance/v1.0.0/types.ts +28 -0
  1071. package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +19 -0
  1072. package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +109 -0
  1073. package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +249 -0
  1074. package/src/credential/issuance/v1.3.3/04-authorize-access.ts +84 -0
  1075. package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +188 -0
  1076. package/src/credential/issuance/v1.3.3/06-verify-and-parse-credential.ts +46 -0
  1077. package/src/credential/issuance/v1.3.3/index.ts +28 -0
  1078. package/src/credential/issuance/v1.3.3/mappers.ts +87 -0
  1079. package/src/credential/issuance/v1.3.3/types.ts +6 -0
  1080. package/src/credential/offer/README.md +103 -119
  1081. package/src/credential/offer/api/01-resolve-credential-offer.ts +23 -0
  1082. package/src/credential/offer/api/02-extract-grant-details.ts +13 -0
  1083. package/src/credential/offer/api/index.ts +8 -0
  1084. package/src/credential/offer/api/types.ts +5 -0
  1085. package/src/credential/offer/common/errors.ts +17 -0
  1086. package/src/credential/offer/index.ts +5 -16
  1087. package/src/credential/offer/v1.0.0/index.ts +11 -0
  1088. package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +60 -0
  1089. package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +27 -0
  1090. package/src/credential/offer/v1.3.3/index.ts +8 -0
  1091. package/src/credential/presentation/README.md +12 -9
  1092. package/src/credential/presentation/api/01-start-flow.ts +18 -0
  1093. package/src/credential/presentation/api/02-evaluate-rp-trust.ts +19 -0
  1094. package/src/credential/presentation/api/03-get-request-object.ts +20 -0
  1095. package/src/credential/presentation/api/04-verify-request-object.ts +24 -0
  1096. package/src/credential/presentation/api/05-evaluate-dcql-query.ts +54 -0
  1097. package/src/credential/presentation/api/06-send-authorization-response.ts +67 -0
  1098. package/src/credential/presentation/api/RelyingPartyConfig.ts +25 -0
  1099. package/src/credential/presentation/api/index.ts +18 -0
  1100. package/src/credential/presentation/api/types.ts +129 -0
  1101. package/src/credential/presentation/common/errors.ts +116 -0
  1102. package/src/credential/presentation/common/utils/dcql.ts +188 -0
  1103. package/src/credential/presentation/common/utils/http.ts +30 -0
  1104. package/src/credential/presentation/common/utils/sd-jwt.ts +68 -0
  1105. package/src/credential/presentation/common/utils.ts +30 -0
  1106. package/src/credential/presentation/index.ts +5 -71
  1107. package/src/credential/presentation/v1.0.0/01-start-flow.ts +22 -0
  1108. package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +14 -0
  1109. package/src/credential/presentation/v1.0.0/03-get-request-object.ts +61 -0
  1110. package/src/credential/presentation/v1.0.0/04-verify-request-object.ts +104 -0
  1111. package/src/credential/presentation/v1.0.0/05-evaluate-dcql-query.ts +97 -0
  1112. package/src/credential/presentation/v1.0.0/06-send-authorization-response.ts +196 -0
  1113. package/src/credential/presentation/v1.0.0/index.ts +22 -0
  1114. package/src/credential/presentation/v1.0.0/mappers.ts +35 -0
  1115. package/src/credential/presentation/v1.0.0/types.ts +40 -0
  1116. package/src/credential/presentation/v1.0.0/utils.jwks.ts +26 -0
  1117. package/src/credential/presentation/v1.0.0/utils.ts +26 -0
  1118. package/src/credential/presentation/v1.3.3/01-start-flow.ts +22 -0
  1119. package/src/credential/presentation/v1.3.3/02-evaluate-rp-trust.ts +15 -0
  1120. package/src/credential/presentation/v1.3.3/03-get-request-object.ts +28 -0
  1121. package/src/credential/presentation/v1.3.3/04-verify-request-object.ts +31 -0
  1122. package/src/credential/presentation/v1.3.3/05-evaluate-dcql-query.ts +119 -0
  1123. package/src/credential/presentation/v1.3.3/06-send-authorization-response.ts +160 -0
  1124. package/src/credential/presentation/v1.3.3/index.ts +22 -0
  1125. package/src/credential/presentation/v1.3.3/mappers.ts +34 -0
  1126. package/src/credential/presentation/v1.3.3/sdkErrorMapper.ts +93 -0
  1127. package/src/credential/presentation/v1.3.3/types.ts +12 -0
  1128. package/src/credential/presentation/v1.3.3/utils.mdoc.ts +98 -0
  1129. package/src/credential/status/README.md +77 -19
  1130. package/src/credential/status/api/index.ts +23 -0
  1131. package/src/credential/status/api/status-assertion.ts +57 -0
  1132. package/src/credential/status/api/status-list.ts +50 -0
  1133. package/src/credential/status/api/types.ts +15 -0
  1134. package/src/credential/status/index.ts +3 -15
  1135. package/src/credential/status/v1.0.0/01-status-assertion.ts +95 -0
  1136. package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +87 -0
  1137. package/src/credential/status/v1.0.0/index.ts +14 -0
  1138. package/src/credential/status/v1.0.0/mappers.ts +8 -0
  1139. package/src/credential/status/v1.0.0/types.ts +90 -0
  1140. package/src/credential/status/v1.3.3/01-status-list.ts +50 -0
  1141. package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +19 -0
  1142. package/src/credential/status/v1.3.3/index.ts +14 -0
  1143. package/src/credential/trustmark/README.md +5 -1
  1144. package/src/credential/trustmark/api/index.ts +50 -0
  1145. package/src/credential/trustmark/index.ts +3 -8
  1146. package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +89 -0
  1147. package/src/credential/trustmark/v1.0.0/index.ts +6 -0
  1148. package/src/credential/trustmark/v1.3.3/get-credential-trustmark.ts +7 -0
  1149. package/src/credential/trustmark/v1.3.3/index.ts +6 -0
  1150. package/src/credentials-catalogue/README.md +8 -2
  1151. package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +82 -0
  1152. package/src/credentials-catalogue/api/index.ts +21 -0
  1153. package/src/credentials-catalogue/index.ts +3 -2
  1154. package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +41 -0
  1155. package/src/credentials-catalogue/v1.0.0/index.ts +6 -0
  1156. package/src/credentials-catalogue/v1.0.0/mappers.ts +20 -0
  1157. package/src/credentials-catalogue/v1.0.0/types.ts +97 -0
  1158. package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +52 -0
  1159. package/src/credentials-catalogue/v1.3.3/index.ts +6 -0
  1160. package/src/credentials-catalogue/v1.3.3/mappers.ts +75 -0
  1161. package/src/credentials-catalogue/v1.3.3/types.ts +162 -0
  1162. package/src/credentials-catalogue/v1.3.3/utils.ts +64 -0
  1163. package/src/index.ts +18 -7
  1164. package/src/mdoc/index.ts +43 -2
  1165. package/src/mdoc/utils.ts +4 -2
  1166. package/src/sd-jwt/__test__/types.test.ts +1 -77
  1167. package/src/sd-jwt/__test__/utils.test.ts +3 -13
  1168. package/src/sd-jwt/index.ts +19 -164
  1169. package/src/sd-jwt/types.ts +33 -63
  1170. package/src/sd-jwt/utils.ts +11 -8
  1171. package/src/trust/README.md +24 -11
  1172. package/src/trust/api/TrustAnchorConfig.ts +20 -0
  1173. package/src/trust/api/index.ts +57 -0
  1174. package/src/trust/common/build-chain.ts +161 -0
  1175. package/src/trust/common/errors.ts +138 -0
  1176. package/src/trust/common/types.ts +78 -0
  1177. package/src/trust/common/utils.ts +150 -0
  1178. package/src/trust/common/verify-chain.ts +293 -0
  1179. package/src/trust/index.ts +4 -6
  1180. package/src/trust/v1.0.0/build-chain.ts +8 -0
  1181. package/src/trust/v1.0.0/entities.ts +93 -0
  1182. package/src/trust/v1.0.0/index.ts +15 -0
  1183. package/src/trust/v1.0.0/mappers.ts +15 -0
  1184. package/src/trust/v1.0.0/types.ts +178 -0
  1185. package/src/trust/v1.0.0/verify-chain.ts +12 -0
  1186. package/src/trust/v1.3.3/entities.ts +51 -0
  1187. package/src/trust/v1.3.3/types.ts +68 -0
  1188. package/src/utils/callbacks.ts +84 -0
  1189. package/src/utils/config.ts +18 -0
  1190. package/src/utils/credentials.ts +10 -9
  1191. package/src/utils/errors.ts +69 -6
  1192. package/src/utils/mappers.ts +84 -0
  1193. package/src/utils/misc.ts +16 -2
  1194. package/src/utils/object.ts +15 -0
  1195. package/src/utils/par.ts +3 -5
  1196. package/src/utils/zod.ts +3 -0
  1197. package/src/wallet-instance/README.md +8 -5
  1198. package/src/wallet-instance/api/index.ts +53 -0
  1199. package/src/wallet-instance/common/wallet-instance.ts +96 -0
  1200. package/src/wallet-instance/index.ts +3 -120
  1201. package/src/wallet-instance/v1.0.0/index.ts +14 -0
  1202. package/src/wallet-instance/v1.3.3/index.ts +14 -0
  1203. package/src/wallet-instance-attestation/README.md +8 -2
  1204. package/src/wallet-instance-attestation/api/index.ts +48 -0
  1205. package/src/wallet-instance-attestation/api/types.ts +25 -0
  1206. package/src/wallet-instance-attestation/common/types.ts +25 -0
  1207. package/src/wallet-instance-attestation/index.ts +3 -56
  1208. package/src/wallet-instance-attestation/v1.0.0/index.ts +11 -0
  1209. package/src/wallet-instance-attestation/v1.0.0/issuing.ts +154 -0
  1210. package/src/wallet-instance-attestation/v1.0.0/mappers.ts +24 -0
  1211. package/src/wallet-instance-attestation/v1.0.0/types.ts +59 -0
  1212. package/src/wallet-instance-attestation/v1.0.0/utils.ts +37 -0
  1213. package/src/wallet-instance-attestation/v1.3.3/index.ts +13 -0
  1214. package/src/wallet-instance-attestation/v1.3.3/issuing.ts +7 -0
  1215. package/src/wallet-instance-attestation/v1.3.3/types.ts +48 -0
  1216. package/lib/commonjs/credential/issuance/01-start-flow.js +0 -2
  1217. package/lib/commonjs/credential/issuance/01-start-flow.js.map +0 -1
  1218. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -32
  1219. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  1220. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +0 -132
  1221. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +0 -1
  1222. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +0 -259
  1223. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +0 -1
  1224. package/lib/commonjs/credential/issuance/05-authorize-access.js +0 -87
  1225. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +0 -1
  1226. package/lib/commonjs/credential/issuance/06-obtain-credential.js +0 -168
  1227. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +0 -1
  1228. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +0 -388
  1229. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
  1230. package/lib/commonjs/credential/issuance/errors.js +0 -35
  1231. package/lib/commonjs/credential/issuance/errors.js.map +0 -1
  1232. package/lib/commonjs/credential/issuance/mrtd-pop/types.js +0 -57
  1233. package/lib/commonjs/credential/issuance/mrtd-pop/types.js.map +0 -1
  1234. package/lib/commonjs/credential/issuance/types.js +0 -43
  1235. package/lib/commonjs/credential/issuance/types.js.map +0 -1
  1236. package/lib/commonjs/credential/offer/01-start-flow.js +0 -75
  1237. package/lib/commonjs/credential/offer/01-start-flow.js.map +0 -1
  1238. package/lib/commonjs/credential/offer/02-fetch-credential-offer.js +0 -45
  1239. package/lib/commonjs/credential/offer/02-fetch-credential-offer.js.map +0 -1
  1240. package/lib/commonjs/credential/offer/errors.js +0 -22
  1241. package/lib/commonjs/credential/offer/errors.js.map +0 -1
  1242. package/lib/commonjs/credential/offer/types.js +0 -51
  1243. package/lib/commonjs/credential/offer/types.js.map +0 -1
  1244. package/lib/commonjs/credential/presentation/01-start-flow.js +0 -45
  1245. package/lib/commonjs/credential/presentation/01-start-flow.js.map +0 -1
  1246. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +0 -34
  1247. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
  1248. package/lib/commonjs/credential/presentation/03-get-request-object.js +0 -56
  1249. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
  1250. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +0 -32
  1251. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
  1252. package/lib/commonjs/credential/presentation/05-verify-request-object.js +0 -95
  1253. package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +0 -1
  1254. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +0 -39
  1255. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
  1256. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +0 -155
  1257. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
  1258. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +0 -307
  1259. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
  1260. package/lib/commonjs/credential/presentation/08-send-authorization-response.js +0 -252
  1261. package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +0 -1
  1262. package/lib/commonjs/credential/presentation/errors.js +0 -121
  1263. package/lib/commonjs/credential/presentation/errors.js.map +0 -1
  1264. package/lib/commonjs/credential/presentation/types.js +0 -157
  1265. package/lib/commonjs/credential/presentation/types.js.map +0 -1
  1266. package/lib/commonjs/credential/status/01-start-flow.js +0 -2
  1267. package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
  1268. package/lib/commonjs/credential/status/02-status-assertion.js +0 -79
  1269. package/lib/commonjs/credential/status/02-status-assertion.js.map +0 -1
  1270. package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js +0 -85
  1271. package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
  1272. package/lib/commonjs/credential/status/types.js +0 -81
  1273. package/lib/commonjs/credential/status/types.js.map +0 -1
  1274. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -86
  1275. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
  1276. package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js +0 -42
  1277. package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
  1278. package/lib/commonjs/credentials-catalogue/types.js +0 -99
  1279. package/lib/commonjs/credentials-catalogue/types.js.map +0 -1
  1280. package/lib/commonjs/pid/index.js +0 -11
  1281. package/lib/commonjs/pid/index.js.map +0 -1
  1282. package/lib/commonjs/pid/sd-jwt/converters.js +0 -25
  1283. package/lib/commonjs/pid/sd-jwt/converters.js.map +0 -1
  1284. package/lib/commonjs/pid/sd-jwt/index.js +0 -77
  1285. package/lib/commonjs/pid/sd-jwt/index.js.map +0 -1
  1286. package/lib/commonjs/pid/sd-jwt/types.js +0 -50
  1287. package/lib/commonjs/pid/sd-jwt/types.js.map +0 -1
  1288. package/lib/commonjs/sd-jwt/__test__/converters.test.js +0 -25
  1289. package/lib/commonjs/sd-jwt/__test__/converters.test.js.map +0 -1
  1290. package/lib/commonjs/sd-jwt/__test__/index.test.js +0 -134
  1291. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +0 -1
  1292. package/lib/commonjs/sd-jwt/converters.js +0 -30
  1293. package/lib/commonjs/sd-jwt/converters.js.map +0 -1
  1294. package/lib/commonjs/sd-jwt/errors.js +0 -40
  1295. package/lib/commonjs/sd-jwt/errors.js.map +0 -1
  1296. package/lib/commonjs/sd-jwt/verifier.js +0 -24
  1297. package/lib/commonjs/sd-jwt/verifier.js.map +0 -1
  1298. package/lib/commonjs/trust/build-chain.js +0 -255
  1299. package/lib/commonjs/trust/build-chain.js.map +0 -1
  1300. package/lib/commonjs/trust/errors.js +0 -134
  1301. package/lib/commonjs/trust/errors.js.map +0 -1
  1302. package/lib/commonjs/trust/types.js +0 -234
  1303. package/lib/commonjs/trust/types.js.map +0 -1
  1304. package/lib/commonjs/trust/utils.js +0 -70
  1305. package/lib/commonjs/trust/utils.js.map +0 -1
  1306. package/lib/commonjs/trust/verify-chain.js +0 -188
  1307. package/lib/commonjs/trust/verify-chain.js.map +0 -1
  1308. package/lib/commonjs/wallet-instance-attestation/issuing.js +0 -117
  1309. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +0 -1
  1310. package/lib/commonjs/wallet-instance-attestation/types.js +0 -69
  1311. package/lib/commonjs/wallet-instance-attestation/types.js.map +0 -1
  1312. package/lib/module/credential/issuance/01-start-flow.js +0 -2
  1313. package/lib/module/credential/issuance/01-start-flow.js.map +0 -1
  1314. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -25
  1315. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  1316. package/lib/module/credential/issuance/03-start-user-authorization.js +0 -125
  1317. package/lib/module/credential/issuance/03-start-user-authorization.js.map +0 -1
  1318. package/lib/module/credential/issuance/04-complete-user-authorization.js +0 -247
  1319. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +0 -1
  1320. package/lib/module/credential/issuance/05-authorize-access.js +0 -78
  1321. package/lib/module/credential/issuance/05-authorize-access.js.map +0 -1
  1322. package/lib/module/credential/issuance/06-obtain-credential.js +0 -160
  1323. package/lib/module/credential/issuance/06-obtain-credential.js.map +0 -1
  1324. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +0 -382
  1325. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
  1326. package/lib/module/credential/issuance/errors.js +0 -28
  1327. package/lib/module/credential/issuance/errors.js.map +0 -1
  1328. package/lib/module/credential/issuance/mrtd-pop/types.js +0 -46
  1329. package/lib/module/credential/issuance/mrtd-pop/types.js.map +0 -1
  1330. package/lib/module/credential/issuance/types.js +0 -30
  1331. package/lib/module/credential/issuance/types.js.map +0 -1
  1332. package/lib/module/credential/offer/01-start-flow.js +0 -66
  1333. package/lib/module/credential/offer/01-start-flow.js.map +0 -1
  1334. package/lib/module/credential/offer/02-fetch-credential-offer.js +0 -38
  1335. package/lib/module/credential/offer/02-fetch-credential-offer.js.map +0 -1
  1336. package/lib/module/credential/offer/errors.js +0 -14
  1337. package/lib/module/credential/offer/errors.js.map +0 -1
  1338. package/lib/module/credential/offer/types.js +0 -41
  1339. package/lib/module/credential/offer/types.js.map +0 -1
  1340. package/lib/module/credential/presentation/01-start-flow.js +0 -36
  1341. package/lib/module/credential/presentation/01-start-flow.js.map +0 -1
  1342. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +0 -27
  1343. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
  1344. package/lib/module/credential/presentation/03-get-request-object.js +0 -49
  1345. package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
  1346. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +0 -25
  1347. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
  1348. package/lib/module/credential/presentation/05-verify-request-object.js +0 -88
  1349. package/lib/module/credential/presentation/05-verify-request-object.js.map +0 -1
  1350. package/lib/module/credential/presentation/06-fetch-presentation-definition.js +0 -32
  1351. package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
  1352. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +0 -148
  1353. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
  1354. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +0 -296
  1355. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
  1356. package/lib/module/credential/presentation/08-send-authorization-response.js +0 -239
  1357. package/lib/module/credential/presentation/08-send-authorization-response.js.map +0 -1
  1358. package/lib/module/credential/presentation/errors.js +0 -103
  1359. package/lib/module/credential/presentation/errors.js.map +0 -1
  1360. package/lib/module/credential/presentation/types.js +0 -146
  1361. package/lib/module/credential/presentation/types.js.map +0 -1
  1362. package/lib/module/credential/status/01-start-flow.js +0 -2
  1363. package/lib/module/credential/status/01-start-flow.js.map +0 -1
  1364. package/lib/module/credential/status/02-status-assertion.js +0 -72
  1365. package/lib/module/credential/status/02-status-assertion.js.map +0 -1
  1366. package/lib/module/credential/status/03-verify-and-parse-status-assertion.js +0 -78
  1367. package/lib/module/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
  1368. package/lib/module/credential/status/types.js +0 -71
  1369. package/lib/module/credential/status/types.js.map +0 -1
  1370. package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -77
  1371. package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
  1372. package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js +0 -35
  1373. package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
  1374. package/lib/module/credentials-catalogue/types.js +0 -89
  1375. package/lib/module/credentials-catalogue/types.js.map +0 -1
  1376. package/lib/module/pid/index.js +0 -3
  1377. package/lib/module/pid/index.js.map +0 -1
  1378. package/lib/module/pid/sd-jwt/converters.js +0 -19
  1379. package/lib/module/pid/sd-jwt/converters.js.map +0 -1
  1380. package/lib/module/pid/sd-jwt/index.js +0 -66
  1381. package/lib/module/pid/sd-jwt/index.js.map +0 -1
  1382. package/lib/module/pid/sd-jwt/types.js +0 -43
  1383. package/lib/module/pid/sd-jwt/types.js.map +0 -1
  1384. package/lib/module/sd-jwt/__test__/converters.test.js +0 -23
  1385. package/lib/module/sd-jwt/__test__/converters.test.js.map +0 -1
  1386. package/lib/module/sd-jwt/__test__/index.test.js +0 -132
  1387. package/lib/module/sd-jwt/__test__/index.test.js.map +0 -1
  1388. package/lib/module/sd-jwt/converters.js +0 -24
  1389. package/lib/module/sd-jwt/converters.js.map +0 -1
  1390. package/lib/module/sd-jwt/errors.js +0 -32
  1391. package/lib/module/sd-jwt/errors.js.map +0 -1
  1392. package/lib/module/sd-jwt/verifier.js +0 -17
  1393. package/lib/module/sd-jwt/verifier.js.map +0 -1
  1394. package/lib/module/trust/build-chain.js +0 -238
  1395. package/lib/module/trust/build-chain.js.map +0 -1
  1396. package/lib/module/trust/errors.js +0 -116
  1397. package/lib/module/trust/errors.js.map +0 -1
  1398. package/lib/module/trust/types.js +0 -221
  1399. package/lib/module/trust/types.js.map +0 -1
  1400. package/lib/module/trust/utils.js +0 -60
  1401. package/lib/module/trust/utils.js.map +0 -1
  1402. package/lib/module/trust/verify-chain.js +0 -179
  1403. package/lib/module/trust/verify-chain.js.map +0 -1
  1404. package/lib/module/wallet-instance-attestation/issuing.js +0 -110
  1405. package/lib/module/wallet-instance-attestation/issuing.js.map +0 -1
  1406. package/lib/module/wallet-instance-attestation/types.js +0 -58
  1407. package/lib/module/wallet-instance-attestation/types.js.map +0 -1
  1408. package/lib/typescript/credential/issuance/01-start-flow.d.ts +0 -12
  1409. package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +0 -1
  1410. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
  1411. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
  1412. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +0 -47
  1413. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +0 -1
  1414. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +0 -79
  1415. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +0 -1
  1416. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +0 -34
  1417. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +0 -1
  1418. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +0 -36
  1419. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +0 -1
  1420. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +0 -43
  1421. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +0 -1
  1422. package/lib/typescript/credential/issuance/errors.d.ts +0 -19
  1423. package/lib/typescript/credential/issuance/errors.d.ts.map +0 -1
  1424. package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts +0 -201
  1425. package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts.map +0 -1
  1426. package/lib/typescript/credential/issuance/types.d.ts +0 -96
  1427. package/lib/typescript/credential/issuance/types.d.ts.map +0 -1
  1428. package/lib/typescript/credential/offer/01-start-flow.d.ts +0 -172
  1429. package/lib/typescript/credential/offer/01-start-flow.d.ts.map +0 -1
  1430. package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts +0 -20
  1431. package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts.map +0 -1
  1432. package/lib/typescript/credential/offer/errors.d.ts +0 -10
  1433. package/lib/typescript/credential/offer/errors.d.ts.map +0 -1
  1434. package/lib/typescript/credential/offer/types.d.ts +0 -264
  1435. package/lib/typescript/credential/offer/types.d.ts.map +0 -1
  1436. package/lib/typescript/credential/presentation/01-start-flow.d.ts +0 -39
  1437. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +0 -1
  1438. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +0 -19
  1439. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +0 -1
  1440. package/lib/typescript/credential/presentation/03-get-request-object.d.ts +0 -19
  1441. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
  1442. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +0 -23
  1443. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +0 -1
  1444. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +0 -21
  1445. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +0 -1
  1446. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +0 -21
  1447. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +0 -1
  1448. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +0 -29
  1449. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +0 -1
  1450. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +0 -97
  1451. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +0 -1
  1452. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +0 -98
  1453. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +0 -1
  1454. package/lib/typescript/credential/presentation/errors.d.ts +0 -73
  1455. package/lib/typescript/credential/presentation/errors.d.ts.map +0 -1
  1456. package/lib/typescript/credential/presentation/types.d.ts +0 -792
  1457. package/lib/typescript/credential/presentation/types.d.ts.map +0 -1
  1458. package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
  1459. package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
  1460. package/lib/typescript/credential/status/02-status-assertion.d.ts +0 -24
  1461. package/lib/typescript/credential/status/02-status-assertion.d.ts.map +0 -1
  1462. package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts +0 -22
  1463. package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts.map +0 -1
  1464. package/lib/typescript/credential/status/types.d.ts +0 -782
  1465. package/lib/typescript/credential/status/types.d.ts.map +0 -1
  1466. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
  1467. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
  1468. package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts +0 -15
  1469. package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts.map +0 -1
  1470. package/lib/typescript/credentials-catalogue/types.d.ts +0 -844
  1471. package/lib/typescript/credentials-catalogue/types.d.ts.map +0 -1
  1472. package/lib/typescript/pid/index.d.ts +0 -3
  1473. package/lib/typescript/pid/index.d.ts.map +0 -1
  1474. package/lib/typescript/pid/sd-jwt/converters.d.ts +0 -4
  1475. package/lib/typescript/pid/sd-jwt/converters.d.ts.map +0 -1
  1476. package/lib/typescript/pid/sd-jwt/index.d.ts +0 -50
  1477. package/lib/typescript/pid/sd-jwt/index.d.ts.map +0 -1
  1478. package/lib/typescript/pid/sd-jwt/types.d.ts +0 -196
  1479. package/lib/typescript/pid/sd-jwt/types.d.ts.map +0 -1
  1480. package/lib/typescript/sd-jwt/__test__/converters.test.d.ts +0 -2
  1481. package/lib/typescript/sd-jwt/__test__/converters.test.d.ts.map +0 -1
  1482. package/lib/typescript/sd-jwt/__test__/index.test.d.ts +0 -2
  1483. package/lib/typescript/sd-jwt/__test__/index.test.d.ts.map +0 -1
  1484. package/lib/typescript/sd-jwt/converters.d.ts +0 -3
  1485. package/lib/typescript/sd-jwt/converters.d.ts.map +0 -1
  1486. package/lib/typescript/sd-jwt/errors.d.ts +0 -20
  1487. package/lib/typescript/sd-jwt/errors.d.ts.map +0 -1
  1488. package/lib/typescript/sd-jwt/verifier.d.ts +0 -3
  1489. package/lib/typescript/sd-jwt/verifier.d.ts.map +0 -1
  1490. package/lib/typescript/trust/build-chain.d.ts +0 -1299
  1491. package/lib/typescript/trust/build-chain.d.ts.map +0 -1
  1492. package/lib/typescript/trust/errors.d.ts +0 -103
  1493. package/lib/typescript/trust/errors.d.ts.map +0 -1
  1494. package/lib/typescript/trust/types.d.ts +0 -15945
  1495. package/lib/typescript/trust/types.d.ts.map +0 -1
  1496. package/lib/typescript/trust/utils.d.ts +0 -22
  1497. package/lib/typescript/trust/utils.d.ts.map +0 -1
  1498. package/lib/typescript/trust/verify-chain.d.ts +0 -39
  1499. package/lib/typescript/trust/verify-chain.d.ts.map +0 -1
  1500. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +0 -34
  1501. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +0 -1
  1502. package/lib/typescript/wallet-instance-attestation/types.d.ts +0 -715
  1503. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +0 -1
  1504. package/src/credential/issuance/01-start-flow.ts +0 -11
  1505. package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -33
  1506. package/src/credential/issuance/03-start-user-authorization.ts +0 -196
  1507. package/src/credential/issuance/04-complete-user-authorization.ts +0 -372
  1508. package/src/credential/issuance/05-authorize-access.ts +0 -129
  1509. package/src/credential/issuance/06-obtain-credential.ts +0 -254
  1510. package/src/credential/issuance/07-verify-and-parse-credential.ts +0 -572
  1511. package/src/credential/issuance/errors.ts +0 -29
  1512. package/src/credential/issuance/mrtd-pop/types.ts +0 -65
  1513. package/src/credential/issuance/types.ts +0 -43
  1514. package/src/credential/offer/01-start-flow.ts +0 -89
  1515. package/src/credential/offer/02-fetch-credential-offer.ts +0 -54
  1516. package/src/credential/offer/errors.ts +0 -17
  1517. package/src/credential/offer/types.ts +0 -59
  1518. package/src/credential/presentation/01-start-flow.ts +0 -42
  1519. package/src/credential/presentation/02-evaluate-rp-trust.ts +0 -34
  1520. package/src/credential/presentation/03-get-request-object.ts +0 -61
  1521. package/src/credential/presentation/04-retrieve-rp-jwks.ts +0 -34
  1522. package/src/credential/presentation/05-verify-request-object.ts +0 -121
  1523. package/src/credential/presentation/06-fetch-presentation-definition.ts +0 -48
  1524. package/src/credential/presentation/07-evaluate-dcql-query.ts +0 -198
  1525. package/src/credential/presentation/07-evaluate-input-descriptor.ts +0 -408
  1526. package/src/credential/presentation/08-send-authorization-response.ts +0 -329
  1527. package/src/credential/presentation/errors.ts +0 -112
  1528. package/src/credential/presentation/types.ts +0 -169
  1529. package/src/credential/status/01-start-flow.ts +0 -9
  1530. package/src/credential/status/02-status-assertion.ts +0 -115
  1531. package/src/credential/status/03-verify-and-parse-status-assertion.ts +0 -110
  1532. package/src/credential/status/types.ts +0 -90
  1533. package/src/credential/trustmark/get-credential-trustmark.ts +0 -139
  1534. package/src/credentials-catalogue/fetch-and-parse-catalogue.ts +0 -54
  1535. package/src/credentials-catalogue/types.ts +0 -97
  1536. package/src/pid/index.ts +0 -2
  1537. package/src/pid/sd-jwt/converters.ts +0 -20
  1538. package/src/pid/sd-jwt/index.ts +0 -74
  1539. package/src/pid/sd-jwt/types.ts +0 -46
  1540. package/src/sd-jwt/__test__/converters.test.ts +0 -27
  1541. package/src/sd-jwt/__test__/index.test.ts +0 -152
  1542. package/src/sd-jwt/converters.ts +0 -24
  1543. package/src/sd-jwt/errors.ts +0 -39
  1544. package/src/sd-jwt/verifier.ts +0 -18
  1545. package/src/trust/build-chain.ts +0 -398
  1546. package/src/trust/errors.ts +0 -138
  1547. package/src/trust/types.ts +0 -259
  1548. package/src/trust/utils.ts +0 -70
  1549. package/src/trust/verify-chain.ts +0 -267
  1550. package/src/wallet-instance-attestation/issuing.ts +0 -164
  1551. package/src/wallet-instance-attestation/types.ts +0 -85
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.pathToPresentationFrame = exports.getValidDcqlClaims = exports.getPresentationFrameFromDcqlMatch = exports.getDcqlQueryMatches = exports.getClaimsFromDcqlMatch = exports.extractFailedCredentialsDetails = void 0;
7
+ var _object = require("../../../../utils/object");
8
+ var _errors = require("../../../../utils/errors");
9
+ var _types = require("../../../../sd-jwt/types");
10
+ /**
11
+ * Extract only successful matches from the DCQL query result.
12
+ */
13
+ const getDcqlQueryMatches = result => Object.entries(result.credential_matches).filter(_ref => {
14
+ let [, match] = _ref;
15
+ return match.success === true;
16
+ });
17
+
18
+ /**
19
+ * Extract only failed matches from the DCQL query result.
20
+ */
21
+ exports.getDcqlQueryMatches = getDcqlQueryMatches;
22
+ const getDcqlQueryFailedMatches = result => Object.entries(result.credential_matches).filter(_ref2 => {
23
+ let [, match] = _ref2;
24
+ return match.success === false;
25
+ });
26
+
27
+ /**
28
+ * Extract details related to failed credentials
29
+ */
30
+ const extractFailedCredentialsDetails = queryResult => {
31
+ return getDcqlQueryFailedMatches(queryResult).map(_ref3 => {
32
+ var _match$failed_credent;
33
+ let [id, match] = _ref3;
34
+ const credential = queryResult.credentials.find(c => c.id === id);
35
+ const issues = (_match$failed_credent = match.failed_credentials) === null || _match$failed_credent === void 0 ? void 0 : _match$failed_credent.flatMap(c => {
36
+ if ("issues" in c.meta) {
37
+ return Object.values(c.meta.issues).flat();
38
+ }
39
+ if (c.claims.failed_claim_sets) {
40
+ return c.claims.failed_claim_sets.flatMap(cs => Object.values(cs.issues).flat());
41
+ }
42
+ return [];
43
+ });
44
+ if ((credential === null || credential === void 0 ? void 0 : credential.format) === "mso_mdoc") {
45
+ var _credential$meta;
46
+ return {
47
+ id,
48
+ issues,
49
+ format: credential.format,
50
+ doctypeValue: (_credential$meta = credential.meta) === null || _credential$meta === void 0 ? void 0 : _credential$meta.doctype_value
51
+ };
52
+ }
53
+ if ((credential === null || credential === void 0 ? void 0 : credential.format) === "dc+sd-jwt" || (credential === null || credential === void 0 ? void 0 : credential.format) === _types.LEGACY_SD_JWT) {
54
+ return {
55
+ id,
56
+ issues,
57
+ format: credential.format,
58
+ vctValues: credential.meta && "vct_values" in credential.meta ? credential.meta.vct_values : []
59
+ };
60
+ }
61
+ throw new _errors.IoWalletError(`Unsupported format: ${credential === null || credential === void 0 ? void 0 : credential.format}`);
62
+ });
63
+ };
64
+
65
+ /**
66
+ * Extract a compact list of claims from the `dcql` result.
67
+ * @param match The DCQL query match
68
+ * @returns The list of claims in {@link EvaluatedDisclosure} format
69
+ */
70
+ exports.extractFailedCredentialsDetails = extractFailedCredentialsDetails;
71
+ const getClaimsFromDcqlMatch = match => getValidDcqlClaims(match).flatMap(c => Object.entries(c.output).map(_ref4 => {
72
+ let [name, value] = _ref4;
73
+ return {
74
+ name,
75
+ value
76
+ };
77
+ }));
78
+
79
+ /**
80
+ * Recursively convert a claim path to a {@link PresentationFrame} for `@sd-jwt/present`
81
+ * @param path The claim path array
82
+ * @param claim The decoded claim
83
+ * @returns A presentation frame compatible with `@sd-jwt/present`
84
+ */
85
+ exports.getClaimsFromDcqlMatch = getClaimsFromDcqlMatch;
86
+ const pathToPresentationFrame = (path, claim) => {
87
+ const [segment, ...rest] = path;
88
+
89
+ // Base case: no more path segments to process
90
+ if (segment === undefined) {
91
+ // @ts-expect-error unwind recursion
92
+ return true;
93
+ }
94
+
95
+ // null path segments (lists) must include all elements in the list
96
+ if (segment === null) {
97
+ const [maybeArrayClaim] = Object.values(claim);
98
+ if (Array.isArray(maybeArrayClaim)) {
99
+ return maybeArrayClaim.reduce((acc, c, i) => ({
100
+ ...acc,
101
+ [i]: pathToPresentationFrame(rest, c)
102
+ }), {});
103
+ }
104
+ // @ts-expect-error unwind recursion
105
+ return true;
106
+ }
107
+ return {
108
+ [segment]: pathToPresentationFrame(rest, claim)
109
+ };
110
+ };
111
+
112
+ /**
113
+ * Build a presentation frame from the `dcql` result to use for disclosing the requested claims.
114
+ * @param match The DCQL query match
115
+ * @param originalQuery The original DCQL query
116
+ * @returns A presentation frame compatible with `@sd-jwt/present`
117
+ */
118
+ exports.pathToPresentationFrame = pathToPresentationFrame;
119
+ const getPresentationFrameFromDcqlMatch = (match, originalQuery) => {
120
+ var _originalQuery$creden;
121
+ // The original DCQL query claims are needed to get their path
122
+ const queryClaims = ((_originalQuery$creden = originalQuery.credentials.find(_ref5 => {
123
+ let {
124
+ id
125
+ } = _ref5;
126
+ return id === match.credential_query_id;
127
+ })) === null || _originalQuery$creden === void 0 ? void 0 : _originalQuery$creden.claims) ?? [];
128
+ if (queryClaims.length === 0) return {};
129
+ const typedQueryClaims = queryClaims;
130
+
131
+ // Build a presentation frame from each claim's path
132
+ return getValidDcqlClaims(match).reduce((acc, c) => {
133
+ const pf = pathToPresentationFrame(typedQueryClaims[c.claim_index].path, c.output);
134
+ // Merge objects with the same key to not lose objects that are already in the accumulator
135
+ for (const [key, value] of Object.entries(pf)) {
136
+ acc[key] = (0, _object.isObject)(value) ? Object.assign(value, acc[key]) : value;
137
+ }
138
+ return acc;
139
+ }, {});
140
+ };
141
+
142
+ /**
143
+ * Extract valid claims from a successful `dcql` match. The extracted claims
144
+ * come directly from the library, without any processing.
145
+ * @param match The DCQL query match
146
+ * @returns A list of raw `dcql` claims
147
+ */
148
+ exports.getPresentationFrameFromDcqlMatch = getPresentationFrameFromDcqlMatch;
149
+ const getValidDcqlClaims = match => {
150
+ var _match$valid_credenti, _match$valid_credenti2;
151
+ const validClaims = (_match$valid_credenti = match.valid_credentials) === null || _match$valid_credenti === void 0 || (_match$valid_credenti = _match$valid_credenti[0]) === null || _match$valid_credenti === void 0 || (_match$valid_credenti = _match$valid_credenti.claims) === null || _match$valid_credenti === void 0 ? void 0 : _match$valid_credenti.valid_claims;
152
+ if (!validClaims) return [];
153
+ const [validClaimSet] = ((_match$valid_credenti2 = match.valid_credentials) === null || _match$valid_credenti2 === void 0 || (_match$valid_credenti2 = _match$valid_credenti2[0]) === null || _match$valid_credenti2 === void 0 || (_match$valid_credenti2 = _match$valid_credenti2.claims) === null || _match$valid_credenti2 === void 0 ? void 0 : _match$valid_credenti2.valid_claim_sets) ?? [];
154
+
155
+ // If there is a valid claim set, only claims from that set must be disclosed
156
+ // We select claims in the order they are defined in the set
157
+ if (validClaimSet) {
158
+ var _validClaimSet$valid_;
159
+ return ((_validClaimSet$valid_ = validClaimSet.valid_claim_indexes) === null || _validClaimSet$valid_ === void 0 ? void 0 : _validClaimSet$valid_.map(i => validClaims.find(c => c.claim_index === i))) ?? [];
160
+ }
161
+ return validClaims;
162
+ };
163
+ exports.getValidDcqlClaims = getValidDcqlClaims;
164
+ //# sourceMappingURL=dcql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_object","require","_errors","_types","getDcqlQueryMatches","result","Object","entries","credential_matches","filter","_ref","match","success","exports","getDcqlQueryFailedMatches","_ref2","extractFailedCredentialsDetails","queryResult","map","_ref3","_match$failed_credent","id","credential","credentials","find","c","issues","failed_credentials","flatMap","meta","values","flat","claims","failed_claim_sets","cs","format","_credential$meta","doctypeValue","doctype_value","LEGACY_SD_JWT","vctValues","vct_values","IoWalletError","getClaimsFromDcqlMatch","getValidDcqlClaims","output","_ref4","name","value","pathToPresentationFrame","path","claim","segment","rest","undefined","maybeArrayClaim","Array","isArray","reduce","acc","i","getPresentationFrameFromDcqlMatch","originalQuery","_originalQuery$creden","queryClaims","_ref5","credential_query_id","length","typedQueryClaims","pf","claim_index","key","isObject","assign","_match$valid_credenti","_match$valid_credenti2","validClaims","valid_credentials","valid_claims","validClaimSet","valid_claim_sets","_validClaimSet$valid_","valid_claim_indexes"],"sourceRoot":"../../../../../../src","sources":["credential/presentation/common/utils/dcql.ts"],"mappings":"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"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.buildDirectPostBody = void 0;
7
+ /**
8
+ * Builds a URL-encoded form body for a direct POST response without encryption.
9
+ *
10
+ * @param requestObject - Contains state, nonce, and other relevant info.
11
+ * @param payload - Object that contains either the VP token to encrypt and the stringified mapping of the credential disclosures or the error code
12
+ * @returns A URL-encoded string suitable for an `application/x-www-form-urlencoded` POST body.
13
+ */
14
+ const buildDirectPostBody = async (requestObject, payload) => {
15
+ const formUrlEncodedBody = new URLSearchParams({
16
+ state: requestObject.state,
17
+ ...Object.entries(payload).reduce((acc, _ref) => {
18
+ let [key, value] = _ref;
19
+ return {
20
+ ...acc,
21
+ [key]: Array.isArray(value) || typeof value === "object" ? JSON.stringify(value) : value
22
+ };
23
+ }, {})
24
+ });
25
+ return formUrlEncodedBody.toString();
26
+ };
27
+ exports.buildDirectPostBody = buildDirectPostBody;
28
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["buildDirectPostBody","requestObject","payload","formUrlEncodedBody","URLSearchParams","state","Object","entries","reduce","acc","_ref","key","value","Array","isArray","JSON","stringify","toString","exports"],"sourceRoot":"../../../../../../src","sources":["credential/presentation/common/utils/http.ts"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAG,MAAAA,CACjCC,aAA4B,EAC5BC,OAAuC,KACnB;EACpB,MAAMC,kBAAkB,GAAG,IAAIC,eAAe,CAAC;IAC7CC,KAAK,EAAEJ,aAAa,CAACI,KAAK;IAC1B,GAAGC,MAAM,CAACC,OAAO,CAACL,OAAO,CAAC,CAACM,MAAM,CAC/B,CAACC,GAAG,EAAAC,IAAA;MAAA,IAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAAF,IAAA;MAAA,OAAM;QACtB,GAAGD,GAAG;QACN,CAACE,GAAG,GACFE,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAI,OAAOA,KAAK,KAAK,QAAQ,GAC7CG,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,GACrBA;MACR,CAAC;IAAA,CAAC,EACF,CAAC,CACH;EACF,CAAC,CAAC;EAEF,OAAOT,kBAAkB,CAACc,QAAQ,CAAC,CAAC;AACtC,CAAC;AAACC,OAAA,CAAAlB,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mapCredentialsToObj = void 0;
7
+ var _core = require("@sd-jwt/core");
8
+ var _decode = require("@sd-jwt/decode");
9
+ var _cryptoNodejs = require("@sd-jwt/crypto-nodejs");
10
+ var _errors = require("../../../../utils/errors");
11
+ var _types = require("../../../../sd-jwt/types");
12
+ /**
13
+ * List of claims to remove from the SD-JWT before evaluating the DCQL query.
14
+ */
15
+ const NON_DISCLOSABLE_CLAIMS = ["status", "cnf", "exp"];
16
+
17
+ /**
18
+ * Extract claims from disclosures for use in `dcql` library.
19
+ */
20
+ const getClaimsFromDecodedSdJwt = async decodedRawSdJwt => {
21
+ var _decodedRawSdJwt$jwt;
22
+ if (!((_decodedRawSdJwt$jwt = decodedRawSdJwt.jwt) !== null && _decodedRawSdJwt$jwt !== void 0 && _decodedRawSdJwt$jwt.payload)) {
23
+ throw new _errors.IoWalletError("Can't decode SD-JWT");
24
+ }
25
+ const claims = await (0, _decode.getClaims)(decodedRawSdJwt.jwt.payload, decodedRawSdJwt.disclosures ?? [], _cryptoNodejs.digest);
26
+ for (const claim of NON_DISCLOSABLE_CLAIMS) {
27
+ delete claims[claim];
28
+ }
29
+ return claims;
30
+ };
31
+
32
+ /**
33
+ * Convert a list of credential in SD-JWT format to a list of objects
34
+ * with claims for correct parsing by the `dcql` library.
35
+ * @param credentials The raw SD-JWT credentials
36
+ * @returns List of `dcql` compatible objects
37
+ */
38
+ const mapCredentialsToObj = async credentials => {
39
+ const sdJwt = new _core.SDJwtInstance({
40
+ hasher: _cryptoNodejs.digest
41
+ });
42
+ return Promise.all(credentials.map(async credential => {
43
+ var _decodedRawSdJwt$jwt2, _decodedRawSdJwt$jwt3;
44
+ const decodedRawSdJwt = await sdJwt.decode(credential[1]);
45
+ const claims = await getClaimsFromDecodedSdJwt(decodedRawSdJwt);
46
+ return {
47
+ vct: (_decodedRawSdJwt$jwt2 = decodedRawSdJwt.jwt) === null || _decodedRawSdJwt$jwt2 === void 0 || (_decodedRawSdJwt$jwt2 = _decodedRawSdJwt$jwt2.payload) === null || _decodedRawSdJwt$jwt2 === void 0 ? void 0 : _decodedRawSdJwt$jwt2.vct,
48
+ credential_format: ((_decodedRawSdJwt$jwt3 = decodedRawSdJwt.jwt) === null || _decodedRawSdJwt$jwt3 === void 0 || (_decodedRawSdJwt$jwt3 = _decodedRawSdJwt$jwt3.header) === null || _decodedRawSdJwt$jwt3 === void 0 ? void 0 : _decodedRawSdJwt$jwt3.typ) === _types.LEGACY_SD_JWT ? _types.LEGACY_SD_JWT : "dc+sd-jwt",
49
+ cryptographic_holder_binding: true,
50
+ claims,
51
+ original_credential: credential
52
+ };
53
+ }));
54
+ };
55
+ exports.mapCredentialsToObj = mapCredentialsToObj;
56
+ //# sourceMappingURL=sd-jwt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_decode","_cryptoNodejs","_errors","_types","NON_DISCLOSABLE_CLAIMS","getClaimsFromDecodedSdJwt","decodedRawSdJwt","_decodedRawSdJwt$jwt","jwt","payload","IoWalletError","claims","getClaims","disclosures","digest","claim","mapCredentialsToObj","credentials","sdJwt","SDJwtInstance","hasher","Promise","all","map","credential","_decodedRawSdJwt$jwt2","_decodedRawSdJwt$jwt3","decode","vct","credential_format","header","typ","LEGACY_SD_JWT","cryptographic_holder_binding","original_credential","exports"],"sourceRoot":"../../../../../../src","sources":["credential/presentation/common/utils/sd-jwt.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAOA;AACA;AACA;AACA,MAAMK,sBAAsB,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC;;AAEvD;AACA;AACA;AACA,MAAMC,yBAAyB,GAAG,MAAOC,eAAsB,IAAK;EAAA,IAAAC,oBAAA;EAClE,IAAI,GAAAA,oBAAA,GAACD,eAAe,CAACE,GAAG,cAAAD,oBAAA,eAAnBA,oBAAA,CAAqBE,OAAO,GAAE;IACjC,MAAM,IAAIC,qBAAa,CAAC,qBAAqB,CAAC;EAChD;EAEA,MAAMC,MAAM,GAAG,MAAM,IAAAC,iBAAS,EAC5BN,eAAe,CAACE,GAAG,CAACC,OAAO,EAC3BH,eAAe,CAACO,WAAW,IAAI,EAAE,EACjCC,oBACF,CAAC;EAED,KAAK,MAAMC,KAAK,IAAIX,sBAAsB,EAAE;IAC1C,OAAOO,MAAM,CAACI,KAAK,CAAC;EACtB;EAEA,OAAOJ,MAAM;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,mBAAmB,GAAG,MACjCC,WAA8B,IACa;EAC3C,MAAMC,KAAK,GAAG,IAAIC,mBAAa,CAAC;IAC9BC,MAAM,EAAEN;EACV,CAAC,CAAC;EAEF,OAAOO,OAAO,CAACC,GAAG,CAChBL,WAAW,CAACM,GAAG,CAAC,MAAOC,UAAU,IAAK;IAAA,IAAAC,qBAAA,EAAAC,qBAAA;IACpC,MAAMpB,eAAe,GAAG,MAAMY,KAAK,CAACS,MAAM,CAACH,UAAU,CAAC,CAAC,CAAC,CAAC;IACzD,MAAMb,MAAM,GAAG,MAAMN,yBAAyB,CAACC,eAAe,CAAC;IAC/D,OAAO;MACLsB,GAAG,GAAAH,qBAAA,GAAEnB,eAAe,CAACE,GAAG,cAAAiB,qBAAA,gBAAAA,qBAAA,GAAnBA,qBAAA,CAAqBhB,OAAO,cAAAgB,qBAAA,uBAA5BA,qBAAA,CAA8BG,GAAa;MAChDC,iBAAiB,EACf,EAAAH,qBAAA,GAAApB,eAAe,CAACE,GAAG,cAAAkB,qBAAA,gBAAAA,qBAAA,GAAnBA,qBAAA,CAAqBI,MAAM,cAAAJ,qBAAA,uBAA3BA,qBAAA,CAA6BK,GAAG,MAAKC,oBAAa,GAC9CA,oBAAa,GACb,WAAW;MACjBC,4BAA4B,EAAE,IAAI;MAClCtB,MAAM;MACNuB,mBAAmB,EAAEV;IACvB,CAAC;EACH,CAAC,CACH,CAAC;AACH,CAAC;AAACW,OAAA,CAAAnB,mBAAA,GAAAA,mBAAA"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.buildDirectPostBody = void 0;
7
+ /**
8
+ * Builds a URL-encoded form body for a direct POST response without encryption.
9
+ *
10
+ * @param requestObject - Contains state, nonce, and other relevant info.
11
+ * @param payload - Object that contains either the VP token to encrypt and the stringified mapping of the credential disclosures or the error code
12
+ * @returns A URL-encoded string suitable for an `application/x-www-form-urlencoded` POST body.
13
+ */
14
+ const buildDirectPostBody = async (requestObject, payload) => {
15
+ const formUrlEncodedBody = new URLSearchParams({
16
+ state: requestObject.state,
17
+ ...Object.entries(payload).reduce((acc, _ref) => {
18
+ let [key, value] = _ref;
19
+ return {
20
+ ...acc,
21
+ [key]: Array.isArray(value) || typeof value === "object" ? JSON.stringify(value) : value
22
+ };
23
+ }, {})
24
+ });
25
+ return formUrlEncodedBody.toString();
26
+ };
27
+ exports.buildDirectPostBody = buildDirectPostBody;
28
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["buildDirectPostBody","requestObject","payload","formUrlEncodedBody","URLSearchParams","state","Object","entries","reduce","acc","_ref","key","value","Array","isArray","JSON","stringify","toString","exports"],"sourceRoot":"../../../../../src","sources":["credential/presentation/common/utils.ts"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAG,MAAAA,CACjCC,aAA4B,EAC5BC,OAAuC,KACnB;EACpB,MAAMC,kBAAkB,GAAG,IAAIC,eAAe,CAAC;IAC7CC,KAAK,EAAEJ,aAAa,CAACI,KAAK;IAC1B,GAAGC,MAAM,CAACC,OAAO,CAACL,OAAO,CAAC,CAACM,MAAM,CAC/B,CAACC,GAAG,EAAAC,IAAA;MAAA,IAAE,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAAF,IAAA;MAAA,OAAM;QACtB,GAAGD,GAAG;QACN,CAACE,GAAG,GACFE,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,IAAI,OAAOA,KAAK,KAAK,QAAQ,GAC7CG,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,GACrBA;MACR,CAAC;IAAA,CAAC,EACF,CAAC,CACH;EACF,CAAC,CAAC;EAEF,OAAOT,kBAAkB,CAACc,QAAQ,CAAC,CAAC;AACtC,CAAC;AAACC,OAAA,CAAAlB,mBAAA,GAAAA,mBAAA"}
@@ -4,95 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Errors = void 0;
7
- Object.defineProperty(exports, "evaluateDcqlQuery", {
7
+ Object.defineProperty(exports, "V1_0_0", {
8
8
  enumerable: true,
9
9
  get: function () {
10
- return _evaluateDcqlQuery.evaluateDcqlQuery;
10
+ return _v.RemotePresentation;
11
11
  }
12
12
  });
13
- Object.defineProperty(exports, "evaluateInputDescriptors", {
13
+ Object.defineProperty(exports, "V1_3_3", {
14
14
  enumerable: true,
15
15
  get: function () {
16
- return _evaluateInputDescriptor.evaluateInputDescriptors;
16
+ return _v2.RemotePresentation;
17
17
  }
18
18
  });
19
- Object.defineProperty(exports, "evaluateRelyingPartyTrust", {
20
- enumerable: true,
21
- get: function () {
22
- return _evaluateRpTrust.evaluateRelyingPartyTrust;
23
- }
24
- });
25
- Object.defineProperty(exports, "fetchPresentDefinition", {
26
- enumerable: true,
27
- get: function () {
28
- return _fetchPresentationDefinition.fetchPresentDefinition;
29
- }
30
- });
31
- Object.defineProperty(exports, "getJwksFromConfig", {
32
- enumerable: true,
33
- get: function () {
34
- return _retrieveRpJwks.getJwksFromConfig;
35
- }
36
- });
37
- Object.defineProperty(exports, "getRequestObject", {
38
- enumerable: true,
39
- get: function () {
40
- return _getRequestObject.getRequestObject;
41
- }
42
- });
43
- Object.defineProperty(exports, "prepareLegacyRemotePresentations", {
44
- enumerable: true,
45
- get: function () {
46
- return _evaluateInputDescriptor.prepareLegacyRemotePresentations;
47
- }
48
- });
49
- Object.defineProperty(exports, "prepareRemotePresentations", {
50
- enumerable: true,
51
- get: function () {
52
- return _evaluateDcqlQuery.prepareRemotePresentations;
53
- }
54
- });
55
- Object.defineProperty(exports, "sendAuthorizationErrorResponse", {
56
- enumerable: true,
57
- get: function () {
58
- return _sendAuthorizationResponse.sendAuthorizationErrorResponse;
59
- }
60
- });
61
- Object.defineProperty(exports, "sendAuthorizationResponse", {
62
- enumerable: true,
63
- get: function () {
64
- return _sendAuthorizationResponse.sendAuthorizationResponse;
65
- }
66
- });
67
- Object.defineProperty(exports, "sendLegacyAuthorizationResponse", {
68
- enumerable: true,
69
- get: function () {
70
- return _sendAuthorizationResponse.sendLegacyAuthorizationResponse;
71
- }
72
- });
73
- Object.defineProperty(exports, "startFlowFromQR", {
74
- enumerable: true,
75
- get: function () {
76
- return _startFlow.startFlowFromQR;
77
- }
78
- });
79
- Object.defineProperty(exports, "verifyRequestObject", {
80
- enumerable: true,
81
- get: function () {
82
- return _verifyRequestObject.verifyRequestObject;
83
- }
84
- });
85
- var _startFlow = require("./01-start-flow");
86
- var _evaluateRpTrust = require("./02-evaluate-rp-trust");
87
- var _getRequestObject = require("./03-get-request-object");
88
- var _retrieveRpJwks = require("./04-retrieve-rp-jwks");
89
- var _verifyRequestObject = require("./05-verify-request-object");
90
- var _fetchPresentationDefinition = require("./06-fetch-presentation-definition");
91
- var _evaluateInputDescriptor = require("./07-evaluate-input-descriptor");
92
- var _evaluateDcqlQuery = require("./07-evaluate-dcql-query");
93
- var _sendAuthorizationResponse = require("./08-send-authorization-response");
94
- var Errors = _interopRequireWildcard(require("./errors"));
19
+ var Errors = _interopRequireWildcard(require("./common/errors"));
95
20
  exports.Errors = Errors;
21
+ var _v = require("./v1.0.0");
22
+ var _v2 = require("./v1.3.3");
96
23
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
97
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
98
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_startFlow","require","_evaluateRpTrust","_getRequestObject","_retrieveRpJwks","_verifyRequestObject","_fetchPresentationDefinition","_evaluateInputDescriptor","_evaluateDcqlQuery","_sendAuthorizationResponse","Errors","_interopRequireWildcard","exports","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../../../src","sources":["credential/presentation/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAIA,IAAAE,iBAAA,GAAAF,OAAA;AAIA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAIA,IAAAK,4BAAA,GAAAL,OAAA;AAIA,IAAAM,wBAAA,GAAAN,OAAA;AAMA,IAAAO,kBAAA,GAAAP,OAAA;AAMA,IAAAQ,0BAAA,GAAAR,OAAA;AAQA,IAAAS,MAAA,GAAAC,uBAAA,CAAAV,OAAA;AAAmCW,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
1
+ {"version":3,"names":["Errors","_interopRequireWildcard","require","exports","_v","_v2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../../../src","sources":["credential/presentation/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0CC,OAAA,CAAAH,MAAA,GAAAA,MAAA;AAG1C,IAAAI,EAAA,GAAAF,OAAA;AACA,IAAAG,GAAA,GAAAH,OAAA;AAAwD,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.startFlowFromQR = void 0;
7
+ var _errors = require("../common/errors");
8
+ var _types = require("../api/types");
9
+ const startFlowFromQR = params => {
10
+ const result = _types.PresentationParams.safeParse({
11
+ ...params,
12
+ request_uri_method: params.request_uri_method ?? "get"
13
+ });
14
+ if (!result.success) throw new _errors.InvalidQRCodeError(result.error.message);
15
+ if (!result.data.request_uri) {
16
+ throw new _errors.InvalidQRCodeError("Invalid QR code missing the required 'request_uri' parameter.");
17
+ }
18
+ return result.data;
19
+ };
20
+ exports.startFlowFromQR = startFlowFromQR;
21
+ //# sourceMappingURL=01-start-flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","_types","startFlowFromQR","params","result","PresentationParams","safeParse","request_uri_method","success","InvalidQRCodeError","error","message","data","request_uri","exports"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/01-start-flow.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,eAAyD,GACpEC,MAAM,IACH;EACH,MAAMC,MAAM,GAAGC,yBAAkB,CAACC,SAAS,CAAC;IAC1C,GAAGH,MAAM;IACTI,kBAAkB,EAAEJ,MAAM,CAACI,kBAAkB,IAAI;EACnD,CAAC,CAAC;EAEF,IAAI,CAACH,MAAM,CAACI,OAAO,EAAE,MAAM,IAAIC,0BAAkB,CAACL,MAAM,CAACM,KAAK,CAACC,OAAO,CAAC;EAEvE,IAAI,CAACP,MAAM,CAACQ,IAAI,CAACC,WAAW,EAAE;IAC5B,MAAM,IAAIJ,0BAAkB,CAC1B,+DACF,CAAC;EACH;EAEA,OAAOL,MAAM,CAACQ,IAAI;AACpB,CAAC;AAACE,OAAA,CAAAZ,eAAA,GAAAA,eAAA"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.evaluateRelyingPartyTrust = void 0;
7
+ var _entities = require("../../../trust/v1.0.0/entities");
8
+ var _mappers = require("./mappers");
9
+ const evaluateRelyingPartyTrust = async function (rpUrl) {
10
+ let {
11
+ appFetch = fetch
12
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13
+ const rpEntityConfiguration = await (0, _entities.getRelyingPartyEntityConfiguration)(rpUrl, {
14
+ appFetch
15
+ });
16
+ return {
17
+ rpConf: (0, _mappers.mapToRelyingPartyConfig)(rpEntityConfiguration)
18
+ };
19
+ };
20
+ exports.evaluateRelyingPartyTrust = evaluateRelyingPartyTrust;
21
+ //# sourceMappingURL=02-evaluate-rp-trust.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_entities","require","_mappers","evaluateRelyingPartyTrust","rpUrl","appFetch","fetch","arguments","length","undefined","rpEntityConfiguration","getRelyingPartyEntityConfiguration","rpConf","mapToRelyingPartyConfig","exports"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/02-evaluate-rp-trust.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEO,MAAME,yBAA6E,GACxF,eAAAA,CAAOC,KAAK,EAAgC;EAAA,IAA9B;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACrC,MAAMG,qBAAqB,GAAG,MAAM,IAAAC,4CAAkC,EACpEP,KAAK,EACL;IAAEC;EAAS,CACb,CAAC;EACD,OAAO;IACLO,MAAM,EAAE,IAAAC,gCAAuB,EAACH,qBAAqB;EACvD,CAAC;AACH,CAAC;AAACI,OAAA,CAAAX,yBAAA,GAAAA,yBAAA"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getRequestObject = void 0;
7
+ var _errors = require("../../../utils/errors");
8
+ var _misc = require("../../../utils/misc");
9
+ var _types = require("../api/types");
10
+ var _errors2 = require("../common/errors");
11
+ const getRequestObject = async function (authorizationRequestUrl) {
12
+ let {
13
+ appFetch = fetch,
14
+ walletCapabilities
15
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16
+ const authorizationUrl = new URL(authorizationRequestUrl);
17
+
18
+ /*
19
+ * The QR code parameters are validated in step 1.
20
+ * For consistency with the 1.3 flow we accept the full authorization URL,
21
+ * but here we only extract the `request_uri` to retrieve the Request Object.
22
+ */
23
+ const requestUri = authorizationUrl.searchParams.get("request_uri") ?? undefined;
24
+ if (!requestUri) {
25
+ throw new _errors2.InvalidQRCodeError("The QR code is missing the required 'request_uri' parameter.");
26
+ }
27
+ if (walletCapabilities) {
28
+ // Validate external input
29
+ const {
30
+ wallet_metadata,
31
+ wallet_nonce
32
+ } = _types.RequestObjectWalletCapabilities.parse(walletCapabilities);
33
+ const formUrlEncodedBody = new URLSearchParams({
34
+ wallet_metadata: JSON.stringify(wallet_metadata),
35
+ ...(wallet_nonce && {
36
+ wallet_nonce
37
+ })
38
+ });
39
+ const requestObjectEncodedJwt = await appFetch(requestUri, {
40
+ method: "POST",
41
+ headers: {
42
+ "Content-Type": "application/x-www-form-urlencoded"
43
+ },
44
+ body: formUrlEncodedBody.toString()
45
+ }).then((0, _misc.hasStatusOrThrow)(200, _errors.RelyingPartyResponseError)).then(res => res.text());
46
+ return {
47
+ requestObjectEncodedJwt
48
+ };
49
+ }
50
+ const requestObjectEncodedJwt = await appFetch(requestUri, {
51
+ method: "GET"
52
+ }).then((0, _misc.hasStatusOrThrow)(200, _errors.RelyingPartyResponseError)).then(res => res.text());
53
+ return {
54
+ requestObjectEncodedJwt
55
+ };
56
+ };
57
+ exports.getRequestObject = getRequestObject;
58
+ //# sourceMappingURL=03-get-request-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","_misc","_types","_errors2","getRequestObject","authorizationRequestUrl","appFetch","fetch","walletCapabilities","arguments","length","undefined","authorizationUrl","URL","requestUri","searchParams","get","InvalidQRCodeError","wallet_metadata","wallet_nonce","RequestObjectWalletCapabilities","parse","formUrlEncodedBody","URLSearchParams","JSON","stringify","requestObjectEncodedJwt","method","headers","body","toString","then","hasStatusOrThrow","RelyingPartyResponseError","res","text","exports"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/03-get-request-object.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAEO,MAAMI,gBAA2D,GACtE,eAAAA,CACEC,uBAAuB,EAEpB;EAAA,IADH;IAAEC,QAAQ,GAAGC,KAAK;IAAEC;EAAmB,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE7C,MAAMG,gBAAgB,GAAG,IAAIC,GAAG,CAACR,uBAAuB,CAAC;;EAEzD;AACJ;AACA;AACA;AACA;EACI,MAAMS,UAAU,GACdF,gBAAgB,CAACG,YAAY,CAACC,GAAG,CAAC,aAAa,CAAC,IAAIL,SAAS;EAC/D,IAAI,CAACG,UAAU,EAAE;IACf,MAAM,IAAIG,2BAAkB,CAC1B,8DACF,CAAC;EACH;EAEA,IAAIT,kBAAkB,EAAE;IACtB;IACA,MAAM;MAAEU,eAAe;MAAEC;IAAa,CAAC,GACrCC,sCAA+B,CAACC,KAAK,CAACb,kBAAkB,CAAC;IAE3D,MAAMc,kBAAkB,GAAG,IAAIC,eAAe,CAAC;MAC7CL,eAAe,EAAEM,IAAI,CAACC,SAAS,CAACP,eAAe,CAAC;MAChD,IAAIC,YAAY,IAAI;QAAEA;MAAa,CAAC;IACtC,CAAC,CAAC;IAEF,MAAMO,uBAAuB,GAAG,MAAMpB,QAAQ,CAACQ,UAAU,EAAE;MACzDa,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,IAAI,EAAEP,kBAAkB,CAACQ,QAAQ,CAAC;IACpC,CAAC,CAAC,CACCC,IAAI,CAAC,IAAAC,sBAAgB,EAAC,GAAG,EAAEC,iCAAyB,CAAC,CAAC,CACtDF,IAAI,CAAEG,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC;IAE5B,OAAO;MACLT;IACF,CAAC;EACH;EAEA,MAAMA,uBAAuB,GAAG,MAAMpB,QAAQ,CAACQ,UAAU,EAAE;IACzDa,MAAM,EAAE;EACV,CAAC,CAAC,CACCI,IAAI,CAAC,IAAAC,sBAAgB,EAAC,GAAG,EAAEC,iCAAyB,CAAC,CAAC,CACtDF,IAAI,CAAEG,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC;EAE5B,OAAO;IACLT;EACF,CAAC;AACH,CAAC;AAACU,OAAA,CAAAhC,gBAAA,GAAAA,gBAAA"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.verifyRequestObject = void 0;
7
+ var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
8
+ var _errors = require("../common/errors");
9
+ var _types = require("./types");
10
+ var _mappers = require("./mappers");
11
+ var _utils = require("./utils.jwks");
12
+ const verifyRequestObject = async (requestObjectEncodedJwt, _ref) => {
13
+ let {
14
+ clientId,
15
+ rpConf,
16
+ state
17
+ } = _ref;
18
+ const requestObjectJwt = (0, _ioReactNativeJwt.decode)(requestObjectEncodedJwt);
19
+ const pubKey = getSigPublicKey(rpConf, requestObjectJwt.protectedHeader.kid);
20
+ try {
21
+ // Standard claims are verified within `verify`
22
+ await (0, _ioReactNativeJwt.verify)(requestObjectEncodedJwt, pubKey, {
23
+ issuer: clientId
24
+ });
25
+ } catch (_) {
26
+ throw new _errors.InvalidRequestObjectError("The Request Object signature verification failed");
27
+ }
28
+ const requestObject = validateRequestObjectShape(requestObjectJwt.payload);
29
+ const isClientIdMatch = clientId === requestObject.client_id && clientId === rpConf.subject;
30
+ if (!isClientIdMatch) {
31
+ throw new _errors.InvalidRequestObjectError("Client ID does not match Request Object or Entity Configuration");
32
+ }
33
+ const isStateMatch = state ? state === requestObject.state : true;
34
+ if (!isStateMatch) {
35
+ throw new _errors.InvalidRequestObjectError("The provided state does not match the Request Object's");
36
+ }
37
+ return {
38
+ requestObject: (0, _mappers.mapToRequestObject)(requestObject)
39
+ };
40
+ };
41
+
42
+ /**
43
+ * Validate the shape of the Request Object to ensure all required properties are present and are of the expected type.
44
+ *
45
+ * @param payload The Request Object to validate
46
+ * @returns A valid Request Object
47
+ * @throws {InvalidRequestObjectError} when the Request Object cannot be parsed
48
+ */
49
+ exports.verifyRequestObject = verifyRequestObject;
50
+ const validateRequestObjectShape = payload => {
51
+ const requestObjectParse = _types.RequestObjectPayload.safeParse(payload);
52
+ if (requestObjectParse.success) {
53
+ return requestObjectParse.data;
54
+ }
55
+ throw new _errors.InvalidRequestObjectError("The Request Object cannot be parsed successfully", formatFlattenedZodErrors(requestObjectParse.error.flatten()));
56
+ };
57
+
58
+ /**
59
+ * Get the public key to verify the Request Object's signature from the Relying Party's EC.
60
+ *
61
+ * @param rpConf The Relying Party's EC
62
+ * @param kid The identifier of the key to find
63
+ * @returns The corresponding public key to verify the signature
64
+ * @throws {InvalidRequestObjectError} when the key cannot be found
65
+ */
66
+ const getSigPublicKey = (rpConf, kid) => {
67
+ try {
68
+ const {
69
+ keys
70
+ } = (0, _utils.getJwksFromRpConfig)(rpConf);
71
+ const pubKey = keys.find(k => k.kid === kid);
72
+ if (!pubKey) throw new Error();
73
+ return pubKey;
74
+ } catch (_) {
75
+ throw new _errors.InvalidRequestObjectError(`The public key for signature verification (${kid}) cannot be found in the Entity Configuration`);
76
+ }
77
+ };
78
+
79
+ /**
80
+ * Utility to format flattened Zod errors into a simplified string `key1: key1_error, key2: key2_error`
81
+ */
82
+ const formatFlattenedZodErrors = errors => Object.entries(errors.fieldErrors).map(_ref2 => {
83
+ let [key, error] = _ref2;
84
+ return `${key}: ${error[0]}`;
85
+ }).join(", ");
86
+ //# sourceMappingURL=04-verify-request-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_ioReactNativeJwt","require","_errors","_types","_mappers","_utils","verifyRequestObject","requestObjectEncodedJwt","_ref","clientId","rpConf","state","requestObjectJwt","decodeJwt","pubKey","getSigPublicKey","protectedHeader","kid","verify","issuer","_","InvalidRequestObjectError","requestObject","validateRequestObjectShape","payload","isClientIdMatch","client_id","subject","isStateMatch","mapToRequestObject","exports","requestObjectParse","RequestObjectPayload","safeParse","success","data","formatFlattenedZodErrors","error","flatten","keys","getJwksFromRpConfig","find","k","Error","errors","Object","entries","fieldErrors","map","_ref2","key","join"],"sourceRoot":"../../../../../src","sources":["credential/presentation/v1.0.0/04-verify-request-object.ts"],"mappings":"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"}