@pagopa/io-react-native-wallet 2.5.0 → 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 (1562) 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/client/generated/wallet-provider.js +48 -42
  7. package/lib/commonjs/client/generated/wallet-provider.js.map +1 -1
  8. package/lib/commonjs/client/index.js +1 -1
  9. package/lib/commonjs/client/index.js.map +1 -1
  10. package/lib/commonjs/credential/index.js +1 -9
  11. package/lib/commonjs/credential/index.js.map +1 -1
  12. package/lib/commonjs/credential/issuance/README.md +37 -44
  13. package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js +6 -0
  14. package/lib/commonjs/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
  15. package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js +6 -0
  16. package/lib/commonjs/credential/issuance/api/02-start-user-authorization.js.map +1 -0
  17. package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js +6 -0
  18. package/lib/commonjs/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
  19. package/lib/commonjs/credential/issuance/api/04-authorize-access.js +6 -0
  20. package/lib/commonjs/credential/issuance/api/04-authorize-access.js.map +1 -0
  21. package/lib/commonjs/credential/issuance/api/05-obtain-credential.js +6 -0
  22. package/lib/commonjs/credential/issuance/api/05-obtain-credential.js.map +1 -0
  23. package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js +6 -0
  24. package/lib/commonjs/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
  25. package/lib/commonjs/credential/issuance/api/IssuerConfig.js +67 -0
  26. package/lib/commonjs/credential/issuance/api/IssuerConfig.js.map +1 -0
  27. package/lib/commonjs/credential/issuance/api/index.js +6 -0
  28. package/lib/commonjs/credential/issuance/api/index.js.map +1 -0
  29. package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js +17 -0
  30. package/lib/commonjs/credential/issuance/api/mrtd-pop/index.js.map +1 -0
  31. package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js +2 -0
  32. package/lib/commonjs/credential/issuance/api/mrtd-pop/types.js.map +1 -0
  33. package/lib/commonjs/credential/issuance/api/types.js +26 -0
  34. package/lib/commonjs/credential/issuance/api/types.js.map +1 -0
  35. package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js +55 -0
  36. package/lib/commonjs/credential/issuance/common/02-start-user-authorization.js.map +1 -0
  37. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +178 -0
  38. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
  39. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +183 -0
  40. package/lib/commonjs/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
  41. package/lib/commonjs/credential/issuance/common/authorization.js +56 -0
  42. package/lib/commonjs/credential/issuance/common/authorization.js.map +1 -0
  43. package/lib/commonjs/credential/issuance/common/errors.js +35 -0
  44. package/lib/commonjs/credential/issuance/common/errors.js.map +1 -0
  45. package/lib/commonjs/credential/issuance/index.js +8 -68
  46. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  47. package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
  48. package/lib/commonjs/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
  49. package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js +25 -37
  50. package/lib/commonjs/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
  51. package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js +24 -46
  52. package/lib/commonjs/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
  53. package/lib/commonjs/credential/issuance/mrtd-pop/index.js +8 -24
  54. package/lib/commonjs/credential/issuance/mrtd-pop/index.js.map +1 -1
  55. package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js +19 -0
  56. package/lib/commonjs/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
  57. package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js +63 -0
  58. package/lib/commonjs/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
  59. package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +195 -0
  60. package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
  61. package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js +69 -0
  62. package/lib/commonjs/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
  63. package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +148 -0
  64. package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
  65. package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +34 -0
  66. package/lib/commonjs/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
  67. package/lib/commonjs/credential/issuance/v1.0.0/index.js +28 -0
  68. package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -0
  69. package/lib/commonjs/credential/issuance/v1.0.0/mappers.js +28 -0
  70. package/lib/commonjs/credential/issuance/v1.0.0/mappers.js.map +1 -0
  71. package/lib/commonjs/credential/issuance/v1.0.0/types.js +44 -0
  72. package/lib/commonjs/credential/issuance/v1.0.0/types.js.map +1 -0
  73. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +24 -0
  74. package/lib/commonjs/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
  75. package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js +92 -0
  76. package/lib/commonjs/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
  77. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +187 -0
  78. package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
  79. package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js +75 -0
  80. package/lib/commonjs/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
  81. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +143 -0
  82. package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
  83. package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +34 -0
  84. package/lib/commonjs/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
  85. package/lib/commonjs/credential/issuance/v1.3.3/index.js +28 -0
  86. package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -0
  87. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js +73 -0
  88. package/lib/commonjs/credential/issuance/v1.3.3/mappers.js.map +1 -0
  89. package/lib/commonjs/credential/issuance/v1.3.3/types.js +14 -0
  90. package/lib/commonjs/credential/issuance/v1.3.3/types.js.map +1 -0
  91. package/lib/commonjs/credential/offer/README.md +103 -119
  92. package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js +6 -0
  93. package/lib/commonjs/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
  94. package/lib/commonjs/credential/offer/api/02-extract-grant-details.js +6 -0
  95. package/lib/commonjs/credential/offer/api/02-extract-grant-details.js.map +1 -0
  96. package/lib/commonjs/credential/offer/api/index.js +17 -0
  97. package/lib/commonjs/credential/offer/api/index.js.map +1 -0
  98. package/lib/commonjs/credential/offer/api/types.js +6 -0
  99. package/lib/commonjs/credential/offer/api/types.js.map +1 -0
  100. package/lib/commonjs/credential/offer/common/errors.js +22 -0
  101. package/lib/commonjs/credential/offer/common/errors.js.map +1 -0
  102. package/lib/commonjs/credential/offer/index.js +7 -7
  103. package/lib/commonjs/credential/offer/index.js.map +1 -1
  104. package/lib/commonjs/credential/offer/v1.0.0/index.js +17 -0
  105. package/lib/commonjs/credential/offer/v1.0.0/index.js.map +1 -0
  106. package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js +62 -0
  107. package/lib/commonjs/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
  108. package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js +25 -0
  109. package/lib/commonjs/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
  110. package/lib/commonjs/credential/offer/v1.3.3/index.js +14 -0
  111. package/lib/commonjs/credential/offer/v1.3.3/index.js.map +1 -0
  112. package/lib/commonjs/credential/presentation/README.md +12 -9
  113. package/lib/commonjs/credential/presentation/api/01-start-flow.js +6 -0
  114. package/lib/commonjs/credential/presentation/api/01-start-flow.js.map +1 -0
  115. package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js +6 -0
  116. package/lib/commonjs/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
  117. package/lib/commonjs/credential/presentation/api/03-get-request-object.js +6 -0
  118. package/lib/commonjs/credential/presentation/api/03-get-request-object.js.map +1 -0
  119. package/lib/commonjs/credential/presentation/api/04-verify-request-object.js +6 -0
  120. package/lib/commonjs/credential/presentation/api/04-verify-request-object.js.map +1 -0
  121. package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js +6 -0
  122. package/lib/commonjs/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
  123. package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js +6 -0
  124. package/lib/commonjs/credential/presentation/api/06-send-authorization-response.js.map +1 -0
  125. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js +31 -0
  126. package/lib/commonjs/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
  127. package/lib/commonjs/credential/presentation/api/index.js +17 -0
  128. package/lib/commonjs/credential/presentation/api/index.js.map +1 -0
  129. package/lib/commonjs/credential/presentation/api/types.js +74 -0
  130. package/lib/commonjs/credential/presentation/api/types.js.map +1 -0
  131. package/lib/commonjs/credential/presentation/common/errors.js +121 -0
  132. package/lib/commonjs/credential/presentation/common/errors.js.map +1 -0
  133. package/lib/commonjs/credential/presentation/common/utils/dcql.js +164 -0
  134. package/lib/commonjs/credential/presentation/common/utils/dcql.js.map +1 -0
  135. package/lib/commonjs/credential/presentation/common/utils/http.js +28 -0
  136. package/lib/commonjs/credential/presentation/common/utils/http.js.map +1 -0
  137. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js +56 -0
  138. package/lib/commonjs/credential/presentation/common/utils/sd-jwt.js.map +1 -0
  139. package/lib/commonjs/credential/presentation/common/utils.js +28 -0
  140. package/lib/commonjs/credential/presentation/common/utils.js.map +1 -0
  141. package/lib/commonjs/credential/presentation/index.js +7 -80
  142. package/lib/commonjs/credential/presentation/index.js.map +1 -1
  143. package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js +21 -0
  144. package/lib/commonjs/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
  145. package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +21 -0
  146. package/lib/commonjs/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
  147. package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js +58 -0
  148. package/lib/commonjs/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
  149. package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js +86 -0
  150. package/lib/commonjs/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
  151. package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +85 -0
  152. package/lib/commonjs/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
  153. package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js +165 -0
  154. package/lib/commonjs/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
  155. package/lib/commonjs/credential/presentation/v1.0.0/index.js +24 -0
  156. package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -0
  157. package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +33 -0
  158. package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -0
  159. package/lib/commonjs/credential/presentation/v1.0.0/types.js +46 -0
  160. package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -0
  161. package/lib/commonjs/credential/presentation/v1.0.0/utils.js +27 -0
  162. package/lib/commonjs/credential/presentation/v1.0.0/utils.js.map +1 -0
  163. package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js +27 -0
  164. package/lib/commonjs/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
  165. package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js +23 -0
  166. package/lib/commonjs/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
  167. package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +22 -0
  168. package/lib/commonjs/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
  169. package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js +37 -0
  170. package/lib/commonjs/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
  171. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js +33 -0
  172. package/lib/commonjs/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
  173. package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +105 -0
  174. package/lib/commonjs/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
  175. package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js +137 -0
  176. package/lib/commonjs/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
  177. package/lib/commonjs/credential/presentation/v1.3.3/index.js +24 -0
  178. package/lib/commonjs/credential/presentation/v1.3.3/index.js.map +1 -0
  179. package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +32 -0
  180. package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -0
  181. package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js +74 -0
  182. package/lib/commonjs/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
  183. package/lib/commonjs/credential/presentation/v1.3.3/types.js +19 -0
  184. package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -0
  185. package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js +88 -0
  186. package/lib/commonjs/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
  187. package/lib/commonjs/credential/status/README.md +77 -19
  188. package/lib/commonjs/credential/status/api/index.js +17 -0
  189. package/lib/commonjs/credential/status/api/index.js.map +1 -0
  190. package/lib/commonjs/credential/status/api/status-assertion.js +6 -0
  191. package/lib/commonjs/credential/status/api/status-assertion.js.map +1 -0
  192. package/lib/commonjs/credential/status/api/status-list.js +6 -0
  193. package/lib/commonjs/credential/status/api/status-list.js.map +1 -0
  194. package/lib/commonjs/credential/status/api/types.js +2 -0
  195. package/lib/commonjs/credential/status/api/types.js.map +1 -0
  196. package/lib/commonjs/credential/status/index.js +21 -12
  197. package/lib/commonjs/credential/status/index.js.map +1 -1
  198. package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js +71 -0
  199. package/lib/commonjs/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
  200. package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +74 -0
  201. package/lib/commonjs/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
  202. package/lib/commonjs/credential/status/v1.0.0/index.js +20 -0
  203. package/lib/commonjs/credential/status/v1.0.0/index.js.map +1 -0
  204. package/lib/commonjs/credential/status/v1.0.0/mappers.js +10 -0
  205. package/lib/commonjs/credential/status/v1.0.0/mappers.js.map +1 -0
  206. package/lib/commonjs/credential/status/v1.0.0/types.js +81 -0
  207. package/lib/commonjs/credential/status/v1.0.0/types.js.map +1 -0
  208. package/lib/commonjs/credential/status/v1.3.3/01-status-list.js +48 -0
  209. package/lib/commonjs/credential/status/v1.3.3/01-status-list.js.map +1 -0
  210. package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js +24 -0
  211. package/lib/commonjs/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
  212. package/lib/commonjs/credential/status/v1.3.3/index.js +20 -0
  213. package/lib/commonjs/credential/status/v1.3.3/index.js.map +1 -0
  214. package/lib/commonjs/credential/trustmark/README.md +5 -1
  215. package/lib/commonjs/credential/trustmark/api/index.js +6 -0
  216. package/lib/commonjs/credential/trustmark/api/index.js.map +1 -0
  217. package/lib/commonjs/credential/trustmark/index.js +10 -3
  218. package/lib/commonjs/credential/trustmark/index.js.map +1 -1
  219. package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js +70 -0
  220. package/lib/commonjs/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
  221. package/lib/commonjs/credential/trustmark/v1.0.0/index.js +12 -0
  222. package/lib/commonjs/credential/trustmark/v1.0.0/index.js.map +1 -0
  223. package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js +12 -0
  224. package/lib/commonjs/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
  225. package/lib/commonjs/credential/trustmark/v1.3.3/index.js +12 -0
  226. package/lib/commonjs/credential/trustmark/v1.3.3/index.js.map +1 -0
  227. package/lib/commonjs/credentials-catalogue/README.md +8 -2
  228. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +84 -0
  229. package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
  230. package/lib/commonjs/credentials-catalogue/api/index.js +6 -0
  231. package/lib/commonjs/credentials-catalogue/api/index.js.map +1 -0
  232. package/lib/commonjs/credentials-catalogue/index.js +10 -3
  233. package/lib/commonjs/credentials-catalogue/index.js.map +1 -1
  234. package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +33 -0
  235. package/lib/commonjs/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
  236. package/lib/commonjs/credentials-catalogue/v1.0.0/index.js +12 -0
  237. package/lib/commonjs/credentials-catalogue/v1.0.0/index.js.map +1 -0
  238. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js +29 -0
  239. package/lib/commonjs/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
  240. package/lib/commonjs/credentials-catalogue/v1.0.0/types.js +99 -0
  241. package/lib/commonjs/credentials-catalogue/v1.0.0/types.js.map +1 -0
  242. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +47 -0
  243. package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
  244. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js +12 -0
  245. package/lib/commonjs/credentials-catalogue/v1.3.3/index.js.map +1 -0
  246. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +61 -0
  247. package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
  248. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +156 -0
  249. package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -0
  250. package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js +57 -0
  251. package/lib/commonjs/credentials-catalogue/v1.3.3/utils.js.map +1 -0
  252. package/lib/commonjs/index.js +21 -7
  253. package/lib/commonjs/index.js.map +1 -1
  254. package/lib/commonjs/mdoc/index.js +22 -3
  255. package/lib/commonjs/mdoc/index.js.map +1 -1
  256. package/lib/commonjs/mdoc/utils.js.map +1 -1
  257. package/lib/commonjs/sd-jwt/__test__/types.test.js +0 -61
  258. package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
  259. package/lib/commonjs/sd-jwt/__test__/utils.test.js +3 -12
  260. package/lib/commonjs/sd-jwt/__test__/utils.test.js.map +1 -1
  261. package/lib/commonjs/sd-jwt/index.js +20 -164
  262. package/lib/commonjs/sd-jwt/index.js.map +1 -1
  263. package/lib/commonjs/sd-jwt/types.js +26 -50
  264. package/lib/commonjs/sd-jwt/types.js.map +1 -1
  265. package/lib/commonjs/sd-jwt/utils.js +5 -7
  266. package/lib/commonjs/sd-jwt/utils.js.map +1 -1
  267. package/lib/commonjs/trust/README.md +24 -11
  268. package/lib/commonjs/trust/api/TrustAnchorConfig.js +29 -0
  269. package/lib/commonjs/trust/api/TrustAnchorConfig.js.map +1 -0
  270. package/lib/commonjs/trust/api/index.js +6 -0
  271. package/lib/commonjs/trust/api/index.js.map +1 -0
  272. package/lib/commonjs/trust/common/build-chain.js +118 -0
  273. package/lib/commonjs/trust/common/build-chain.js.map +1 -0
  274. package/lib/commonjs/trust/common/errors.js +134 -0
  275. package/lib/commonjs/trust/common/errors.js.map +1 -0
  276. package/lib/commonjs/trust/common/types.js +82 -0
  277. package/lib/commonjs/trust/common/types.js.map +1 -0
  278. package/lib/commonjs/trust/common/utils.js +139 -0
  279. package/lib/commonjs/trust/common/utils.js.map +1 -0
  280. package/lib/commonjs/trust/common/verify-chain.js +193 -0
  281. package/lib/commonjs/trust/common/verify-chain.js.map +1 -0
  282. package/lib/commonjs/trust/index.js +9 -8
  283. package/lib/commonjs/trust/index.js.map +1 -1
  284. package/lib/commonjs/trust/v1.0.0/build-chain.js +15 -0
  285. package/lib/commonjs/trust/v1.0.0/build-chain.js.map +1 -0
  286. package/lib/commonjs/trust/v1.0.0/entities.js +51 -0
  287. package/lib/commonjs/trust/v1.0.0/entities.js.map +1 -0
  288. package/lib/commonjs/trust/v1.0.0/index.js +18 -0
  289. package/lib/commonjs/trust/v1.0.0/index.js.map +1 -0
  290. package/lib/commonjs/trust/v1.0.0/mappers.js +21 -0
  291. package/lib/commonjs/trust/v1.0.0/mappers.js.map +1 -0
  292. package/lib/commonjs/trust/v1.0.0/types.js +159 -0
  293. package/lib/commonjs/trust/v1.0.0/types.js.map +1 -0
  294. package/lib/commonjs/trust/v1.0.0/verify-chain.js +19 -0
  295. package/lib/commonjs/trust/v1.0.0/verify-chain.js.map +1 -0
  296. package/lib/commonjs/trust/v1.3.3/entities.js +43 -0
  297. package/lib/commonjs/trust/v1.3.3/entities.js.map +1 -0
  298. package/lib/commonjs/trust/v1.3.3/types.js +54 -0
  299. package/lib/commonjs/trust/v1.3.3/types.js.map +1 -0
  300. package/lib/commonjs/utils/callbacks.js +101 -0
  301. package/lib/commonjs/utils/callbacks.js.map +1 -0
  302. package/lib/commonjs/utils/config.js +23 -0
  303. package/lib/commonjs/utils/config.js.map +1 -0
  304. package/lib/commonjs/utils/credentials.js +9 -6
  305. package/lib/commonjs/utils/credentials.js.map +1 -1
  306. package/lib/commonjs/utils/errors.js +68 -5
  307. package/lib/commonjs/utils/errors.js.map +1 -1
  308. package/lib/commonjs/utils/mappers.js +71 -0
  309. package/lib/commonjs/utils/mappers.js.map +1 -0
  310. package/lib/commonjs/utils/misc.js +19 -4
  311. package/lib/commonjs/utils/misc.js.map +1 -1
  312. package/lib/commonjs/utils/object.js +20 -0
  313. package/lib/commonjs/utils/object.js.map +1 -0
  314. package/lib/commonjs/utils/par.js +5 -4
  315. package/lib/commonjs/utils/par.js.map +1 -1
  316. package/lib/commonjs/utils/zod.js +3 -1
  317. package/lib/commonjs/utils/zod.js.map +1 -1
  318. package/lib/commonjs/wallet-instance/README.md +8 -5
  319. package/lib/commonjs/wallet-instance/api/index.js +6 -0
  320. package/lib/commonjs/wallet-instance/api/index.js.map +1 -0
  321. package/lib/commonjs/wallet-instance/common/wallet-instance.js +75 -0
  322. package/lib/commonjs/wallet-instance/common/wallet-instance.js.map +1 -0
  323. package/lib/commonjs/wallet-instance/index.js +13 -81
  324. package/lib/commonjs/wallet-instance/index.js.map +1 -1
  325. package/lib/commonjs/wallet-instance/v1.0.0/index.js +15 -0
  326. package/lib/commonjs/wallet-instance/v1.0.0/index.js.map +1 -0
  327. package/lib/commonjs/wallet-instance/v1.3.3/index.js +15 -0
  328. package/lib/commonjs/wallet-instance/v1.3.3/index.js.map +1 -0
  329. package/lib/commonjs/wallet-instance-attestation/README.md +8 -2
  330. package/lib/commonjs/wallet-instance-attestation/api/index.js +6 -0
  331. package/lib/commonjs/wallet-instance-attestation/api/index.js.map +1 -0
  332. package/lib/commonjs/wallet-instance-attestation/api/types.js +30 -0
  333. package/lib/commonjs/wallet-instance-attestation/api/types.js.map +1 -0
  334. package/lib/commonjs/wallet-instance-attestation/common/types.js +34 -0
  335. package/lib/commonjs/wallet-instance-attestation/common/types.js.map +1 -0
  336. package/lib/commonjs/wallet-instance-attestation/index.js +10 -53
  337. package/lib/commonjs/wallet-instance-attestation/index.js.map +1 -1
  338. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js +17 -0
  339. package/lib/commonjs/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
  340. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js +106 -0
  341. package/lib/commonjs/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
  342. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js +19 -0
  343. package/lib/commonjs/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
  344. package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js +46 -0
  345. package/lib/commonjs/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
  346. package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js +37 -0
  347. package/lib/commonjs/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
  348. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js +19 -0
  349. package/lib/commonjs/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
  350. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js +12 -0
  351. package/lib/commonjs/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
  352. package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js +42 -0
  353. package/lib/commonjs/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
  354. package/lib/module/IoWallet.js +40 -0
  355. package/lib/module/IoWallet.js.map +1 -0
  356. package/lib/module/api/index.js +43 -0
  357. package/lib/module/api/index.js.map +1 -0
  358. package/lib/module/client/generated/wallet-provider.js +37 -31
  359. package/lib/module/client/generated/wallet-provider.js.map +1 -1
  360. package/lib/module/client/index.js +2 -2
  361. package/lib/module/client/index.js.map +1 -1
  362. package/lib/module/credential/index.js +1 -5
  363. package/lib/module/credential/index.js.map +1 -1
  364. package/lib/module/credential/issuance/README.md +37 -44
  365. package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js +2 -0
  366. package/lib/module/credential/issuance/api/01-evaluate-issuer-trust.js.map +1 -0
  367. package/lib/module/credential/issuance/api/02-start-user-authorization.js +2 -0
  368. package/lib/module/credential/issuance/api/02-start-user-authorization.js.map +1 -0
  369. package/lib/module/credential/issuance/api/03-complete-user-authorization.js +2 -0
  370. package/lib/module/credential/issuance/api/03-complete-user-authorization.js.map +1 -0
  371. package/lib/module/credential/issuance/api/04-authorize-access.js +2 -0
  372. package/lib/module/credential/issuance/api/04-authorize-access.js.map +1 -0
  373. package/lib/module/credential/issuance/api/05-obtain-credential.js +2 -0
  374. package/lib/module/credential/issuance/api/05-obtain-credential.js.map +1 -0
  375. package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js +2 -0
  376. package/lib/module/credential/issuance/api/06-verify-and-parse-credential.js.map +1 -0
  377. package/lib/module/credential/issuance/api/IssuerConfig.js +60 -0
  378. package/lib/module/credential/issuance/api/IssuerConfig.js.map +1 -0
  379. package/lib/module/credential/issuance/api/index.js +2 -0
  380. package/lib/module/credential/issuance/api/index.js.map +1 -0
  381. package/lib/module/credential/issuance/api/mrtd-pop/index.js +3 -0
  382. package/lib/module/credential/issuance/api/mrtd-pop/index.js.map +1 -0
  383. package/lib/module/credential/issuance/api/mrtd-pop/types.js +2 -0
  384. package/lib/module/credential/issuance/api/mrtd-pop/types.js.map +1 -0
  385. package/lib/module/credential/issuance/api/types.js +17 -0
  386. package/lib/module/credential/issuance/api/types.js.map +1 -0
  387. package/lib/module/credential/issuance/common/02-start-user-authorization.js +47 -0
  388. package/lib/module/credential/issuance/common/02-start-user-authorization.js.map +1 -0
  389. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js +171 -0
  390. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.mdoc.js.map +1 -0
  391. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js +176 -0
  392. package/lib/module/credential/issuance/common/06-verify-and-parse-credential.sdjwt.js.map +1 -0
  393. package/lib/module/credential/issuance/common/authorization.js +48 -0
  394. package/lib/module/credential/issuance/common/authorization.js.map +1 -0
  395. package/lib/module/credential/issuance/common/errors.js +28 -0
  396. package/lib/module/credential/issuance/common/errors.js.map +1 -0
  397. package/lib/module/credential/issuance/index.js +4 -9
  398. package/lib/module/credential/issuance/index.js.map +1 -1
  399. package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js +13 -42
  400. package/lib/module/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.js.map +1 -1
  401. package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js +24 -38
  402. package/lib/module/credential/issuance/mrtd-pop/02-init-challenge.js.map +1 -1
  403. package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js +22 -46
  404. package/lib/module/credential/issuance/mrtd-pop/03-validate-challenge.js.map +1 -1
  405. package/lib/module/credential/issuance/mrtd-pop/index.js +6 -1
  406. package/lib/module/credential/issuance/mrtd-pop/index.js.map +1 -1
  407. package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js +12 -0
  408. package/lib/module/credential/issuance/v1.0.0/01-evaluate-issuer-trust.js.map +1 -0
  409. package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js +56 -0
  410. package/lib/module/credential/issuance/v1.0.0/02-start-user-authorization.js.map +1 -0
  411. package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +182 -0
  412. package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -0
  413. package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js +60 -0
  414. package/lib/module/credential/issuance/v1.0.0/04-authorize-access.js.map +1 -0
  415. package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +140 -0
  416. package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -0
  417. package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js +27 -0
  418. package/lib/module/credential/issuance/v1.0.0/06-verify-and-parse-credential.js.map +1 -0
  419. package/lib/module/credential/issuance/v1.0.0/index.js +21 -0
  420. package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -0
  421. package/lib/module/credential/issuance/v1.0.0/mappers.js +21 -0
  422. package/lib/module/credential/issuance/v1.0.0/mappers.js.map +1 -0
  423. package/lib/module/credential/issuance/v1.0.0/types.js +22 -0
  424. package/lib/module/credential/issuance/v1.0.0/types.js.map +1 -0
  425. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js +17 -0
  426. package/lib/module/credential/issuance/v1.3.3/01-evaluate-issuer-trust.js.map +1 -0
  427. package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js +85 -0
  428. package/lib/module/credential/issuance/v1.3.3/02-start-user-authorization.js.map +1 -0
  429. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +174 -0
  430. package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -0
  431. package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js +66 -0
  432. package/lib/module/credential/issuance/v1.3.3/04-authorize-access.js.map +1 -0
  433. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +135 -0
  434. package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -0
  435. package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js +27 -0
  436. package/lib/module/credential/issuance/v1.3.3/06-verify-and-parse-credential.js.map +1 -0
  437. package/lib/module/credential/issuance/v1.3.3/index.js +21 -0
  438. package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -0
  439. package/lib/module/credential/issuance/v1.3.3/mappers.js +66 -0
  440. package/lib/module/credential/issuance/v1.3.3/mappers.js.map +1 -0
  441. package/lib/module/credential/issuance/v1.3.3/types.js +5 -0
  442. package/lib/module/credential/issuance/v1.3.3/types.js.map +1 -0
  443. package/lib/module/credential/offer/README.md +103 -119
  444. package/lib/module/credential/offer/api/01-resolve-credential-offer.js +2 -0
  445. package/lib/module/credential/offer/api/01-resolve-credential-offer.js.map +1 -0
  446. package/lib/module/credential/offer/api/02-extract-grant-details.js +2 -0
  447. package/lib/module/credential/offer/api/02-extract-grant-details.js.map +1 -0
  448. package/lib/module/credential/offer/api/index.js +3 -0
  449. package/lib/module/credential/offer/api/index.js.map +1 -0
  450. package/lib/module/credential/offer/api/types.js +2 -0
  451. package/lib/module/credential/offer/api/types.js.map +1 -0
  452. package/lib/module/credential/offer/common/errors.js +14 -0
  453. package/lib/module/credential/offer/common/errors.js.map +1 -0
  454. package/lib/module/credential/offer/index.js +4 -4
  455. package/lib/module/credential/offer/index.js.map +1 -1
  456. package/lib/module/credential/offer/v1.0.0/index.js +10 -0
  457. package/lib/module/credential/offer/v1.0.0/index.js.map +1 -0
  458. package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js +55 -0
  459. package/lib/module/credential/offer/v1.3.3/01-resolve-credential-offer.js.map +1 -0
  460. package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js +18 -0
  461. package/lib/module/credential/offer/v1.3.3/02-extract-grant-details.js.map +1 -0
  462. package/lib/module/credential/offer/v1.3.3/index.js +7 -0
  463. package/lib/module/credential/offer/v1.3.3/index.js.map +1 -0
  464. package/lib/module/credential/presentation/README.md +12 -9
  465. package/lib/module/credential/presentation/api/01-start-flow.js +2 -0
  466. package/lib/module/credential/presentation/api/01-start-flow.js.map +1 -0
  467. package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js +2 -0
  468. package/lib/module/credential/presentation/api/02-evaluate-rp-trust.js.map +1 -0
  469. package/lib/module/credential/presentation/api/03-get-request-object.js +2 -0
  470. package/lib/module/credential/presentation/api/03-get-request-object.js.map +1 -0
  471. package/lib/module/credential/presentation/api/04-verify-request-object.js +2 -0
  472. package/lib/module/credential/presentation/api/04-verify-request-object.js.map +1 -0
  473. package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js +2 -0
  474. package/lib/module/credential/presentation/api/05-evaluate-dcql-query.js.map +1 -0
  475. package/lib/module/credential/presentation/api/06-send-authorization-response.js +2 -0
  476. package/lib/module/credential/presentation/api/06-send-authorization-response.js.map +1 -0
  477. package/lib/module/credential/presentation/api/RelyingPartyConfig.js +23 -0
  478. package/lib/module/credential/presentation/api/RelyingPartyConfig.js.map +1 -0
  479. package/lib/module/credential/presentation/api/index.js +3 -0
  480. package/lib/module/credential/presentation/api/index.js.map +1 -0
  481. package/lib/module/credential/presentation/api/types.js +64 -0
  482. package/lib/module/credential/presentation/api/types.js.map +1 -0
  483. package/lib/module/credential/presentation/common/errors.js +103 -0
  484. package/lib/module/credential/presentation/common/errors.js.map +1 -0
  485. package/lib/module/credential/presentation/common/utils/dcql.js +152 -0
  486. package/lib/module/credential/presentation/common/utils/dcql.js.map +1 -0
  487. package/lib/module/credential/presentation/common/utils/http.js +21 -0
  488. package/lib/module/credential/presentation/common/utils/http.js.map +1 -0
  489. package/lib/module/credential/presentation/common/utils/sd-jwt.js +49 -0
  490. package/lib/module/credential/presentation/common/utils/sd-jwt.js.map +1 -0
  491. package/lib/module/credential/presentation/common/utils.js +21 -0
  492. package/lib/module/credential/presentation/common/utils.js.map +1 -0
  493. package/lib/module/credential/presentation/index.js +4 -11
  494. package/lib/module/credential/presentation/index.js.map +1 -1
  495. package/lib/module/credential/presentation/v1.0.0/01-start-flow.js +14 -0
  496. package/lib/module/credential/presentation/v1.0.0/01-start-flow.js.map +1 -0
  497. package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js +14 -0
  498. package/lib/module/credential/presentation/v1.0.0/02-evaluate-rp-trust.js.map +1 -0
  499. package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js +51 -0
  500. package/lib/module/credential/presentation/v1.0.0/03-get-request-object.js.map +1 -0
  501. package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js +79 -0
  502. package/lib/module/credential/presentation/v1.0.0/04-verify-request-object.js.map +1 -0
  503. package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js +76 -0
  504. package/lib/module/credential/presentation/v1.0.0/05-evaluate-dcql-query.js.map +1 -0
  505. package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js +155 -0
  506. package/lib/module/credential/presentation/v1.0.0/06-send-authorization-response.js.map +1 -0
  507. package/lib/module/credential/presentation/v1.0.0/index.js +17 -0
  508. package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -0
  509. package/lib/module/credential/presentation/v1.0.0/mappers.js +25 -0
  510. package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -0
  511. package/lib/module/credential/presentation/v1.0.0/types.js +36 -0
  512. package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -0
  513. package/lib/module/credential/presentation/v1.0.0/utils.js +20 -0
  514. package/lib/module/credential/presentation/v1.0.0/utils.js.map +1 -0
  515. package/lib/module/credential/presentation/v1.0.0/utils.jwks.js +20 -0
  516. package/lib/module/credential/presentation/v1.0.0/utils.jwks.js.map +1 -0
  517. package/lib/module/credential/presentation/v1.3.3/01-start-flow.js +16 -0
  518. package/lib/module/credential/presentation/v1.3.3/01-start-flow.js.map +1 -0
  519. package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js +15 -0
  520. package/lib/module/credential/presentation/v1.3.3/02-evaluate-rp-trust.js.map +1 -0
  521. package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js +30 -0
  522. package/lib/module/credential/presentation/v1.3.3/03-get-request-object.js.map +1 -0
  523. package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js +26 -0
  524. package/lib/module/credential/presentation/v1.3.3/04-verify-request-object.js.map +1 -0
  525. package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js +97 -0
  526. package/lib/module/credential/presentation/v1.3.3/05-evaluate-dcql-query.js.map +1 -0
  527. package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js +129 -0
  528. package/lib/module/credential/presentation/v1.3.3/06-send-authorization-response.js.map +1 -0
  529. package/lib/module/credential/presentation/v1.3.3/index.js +17 -0
  530. package/lib/module/credential/presentation/v1.3.3/index.js.map +1 -0
  531. package/lib/module/credential/presentation/v1.3.3/mappers.js +24 -0
  532. package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -0
  533. package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js +65 -0
  534. package/lib/module/credential/presentation/v1.3.3/sdkErrorMapper.js.map +1 -0
  535. package/lib/module/credential/presentation/v1.3.3/types.js +9 -0
  536. package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -0
  537. package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js +79 -0
  538. package/lib/module/credential/presentation/v1.3.3/utils.mdoc.js.map +1 -0
  539. package/lib/module/credential/status/README.md +77 -19
  540. package/lib/module/credential/status/api/index.js +14 -0
  541. package/lib/module/credential/status/api/index.js.map +1 -0
  542. package/lib/module/credential/status/api/status-assertion.js +2 -0
  543. package/lib/module/credential/status/api/status-assertion.js.map +1 -0
  544. package/lib/module/credential/status/api/status-list.js +2 -0
  545. package/lib/module/credential/status/api/status-list.js.map +1 -0
  546. package/lib/module/credential/status/api/types.js +2 -0
  547. package/lib/module/credential/status/api/types.js.map +1 -0
  548. package/lib/module/credential/status/index.js +3 -4
  549. package/lib/module/credential/status/index.js.map +1 -1
  550. package/lib/module/credential/status/v1.0.0/01-status-assertion.js +64 -0
  551. package/lib/module/credential/status/v1.0.0/01-status-assertion.js.map +1 -0
  552. package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js +67 -0
  553. package/lib/module/credential/status/v1.0.0/02-verify-and-parse-status-assertion.js.map +1 -0
  554. package/lib/module/credential/status/v1.0.0/index.js +13 -0
  555. package/lib/module/credential/status/v1.0.0/index.js.map +1 -0
  556. package/lib/module/credential/status/v1.0.0/mappers.js +3 -0
  557. package/lib/module/credential/status/v1.0.0/mappers.js.map +1 -0
  558. package/lib/module/credential/status/v1.0.0/types.js +71 -0
  559. package/lib/module/credential/status/v1.0.0/types.js.map +1 -0
  560. package/lib/module/credential/status/v1.3.3/01-status-list.js +41 -0
  561. package/lib/module/credential/status/v1.3.3/01-status-list.js.map +1 -0
  562. package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js +17 -0
  563. package/lib/module/credential/status/v1.3.3/02-verify-and-parse-status-list.js.map +1 -0
  564. package/lib/module/credential/status/v1.3.3/index.js +13 -0
  565. package/lib/module/credential/status/v1.3.3/index.js.map +1 -0
  566. package/lib/module/credential/trustmark/README.md +5 -1
  567. package/lib/module/credential/trustmark/api/index.js +2 -0
  568. package/lib/module/credential/trustmark/api/index.js.map +1 -0
  569. package/lib/module/credential/trustmark/index.js +2 -2
  570. package/lib/module/credential/trustmark/index.js.map +1 -1
  571. package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js +61 -0
  572. package/lib/module/credential/trustmark/v1.0.0/get-credential-trustmark.js.map +1 -0
  573. package/lib/module/credential/trustmark/v1.0.0/index.js +5 -0
  574. package/lib/module/credential/trustmark/v1.0.0/index.js.map +1 -0
  575. package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js +5 -0
  576. package/lib/module/credential/trustmark/v1.3.3/get-credential-trustmark.js.map +1 -0
  577. package/lib/module/credential/trustmark/v1.3.3/index.js +5 -0
  578. package/lib/module/credential/trustmark/v1.3.3/index.js.map +1 -0
  579. package/lib/module/credentials-catalogue/README.md +8 -2
  580. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +73 -0
  581. package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -0
  582. package/lib/module/credentials-catalogue/api/index.js +2 -0
  583. package/lib/module/credentials-catalogue/api/index.js.map +1 -0
  584. package/lib/module/credentials-catalogue/index.js +2 -1
  585. package/lib/module/credentials-catalogue/index.js.map +1 -1
  586. package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js +26 -0
  587. package/lib/module/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.js.map +1 -0
  588. package/lib/module/credentials-catalogue/v1.0.0/index.js +5 -0
  589. package/lib/module/credentials-catalogue/v1.0.0/index.js.map +1 -0
  590. package/lib/module/credentials-catalogue/v1.0.0/mappers.js +22 -0
  591. package/lib/module/credentials-catalogue/v1.0.0/mappers.js.map +1 -0
  592. package/lib/module/credentials-catalogue/v1.0.0/types.js +89 -0
  593. package/lib/module/credentials-catalogue/v1.0.0/types.js.map +1 -0
  594. package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +39 -0
  595. package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -0
  596. package/lib/module/credentials-catalogue/v1.3.3/index.js +5 -0
  597. package/lib/module/credentials-catalogue/v1.3.3/index.js.map +1 -0
  598. package/lib/module/credentials-catalogue/v1.3.3/mappers.js +54 -0
  599. package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -0
  600. package/lib/module/credentials-catalogue/v1.3.3/types.js +141 -0
  601. package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -0
  602. package/lib/module/credentials-catalogue/v1.3.3/utils.js +50 -0
  603. package/lib/module/credentials-catalogue/v1.3.3/utils.js.map +1 -0
  604. package/lib/module/index.js +9 -4
  605. package/lib/module/index.js.map +1 -1
  606. package/lib/module/mdoc/index.js +19 -2
  607. package/lib/module/mdoc/index.js.map +1 -1
  608. package/lib/module/mdoc/utils.js.map +1 -1
  609. package/lib/module/sd-jwt/__test__/types.test.js +1 -62
  610. package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
  611. package/lib/module/sd-jwt/__test__/utils.test.js +3 -12
  612. package/lib/module/sd-jwt/__test__/utils.test.js.map +1 -1
  613. package/lib/module/sd-jwt/index.js +19 -147
  614. package/lib/module/sd-jwt/index.js.map +1 -1
  615. package/lib/module/sd-jwt/types.js +21 -44
  616. package/lib/module/sd-jwt/types.js.map +1 -1
  617. package/lib/module/sd-jwt/utils.js +5 -7
  618. package/lib/module/sd-jwt/utils.js.map +1 -1
  619. package/lib/module/trust/README.md +24 -11
  620. package/lib/module/trust/api/TrustAnchorConfig.js +21 -0
  621. package/lib/module/trust/api/TrustAnchorConfig.js.map +1 -0
  622. package/lib/module/trust/api/index.js +2 -0
  623. package/lib/module/trust/api/index.js.map +1 -0
  624. package/lib/module/trust/common/build-chain.js +111 -0
  625. package/lib/module/trust/common/build-chain.js.map +1 -0
  626. package/lib/module/trust/common/errors.js +116 -0
  627. package/lib/module/trust/common/errors.js.map +1 -0
  628. package/lib/module/trust/common/types.js +69 -0
  629. package/lib/module/trust/common/types.js.map +1 -0
  630. package/lib/module/trust/common/utils.js +126 -0
  631. package/lib/module/trust/common/utils.js.map +1 -0
  632. package/lib/module/trust/common/verify-chain.js +188 -0
  633. package/lib/module/trust/common/verify-chain.js.map +1 -0
  634. package/lib/module/trust/index.js +3 -5
  635. package/lib/module/trust/index.js.map +1 -1
  636. package/lib/module/trust/v1.0.0/build-chain.js +8 -0
  637. package/lib/module/trust/v1.0.0/build-chain.js.map +1 -0
  638. package/lib/module/trust/v1.0.0/entities.js +41 -0
  639. package/lib/module/trust/v1.0.0/entities.js.map +1 -0
  640. package/lib/module/trust/v1.0.0/index.js +11 -0
  641. package/lib/module/trust/v1.0.0/index.js.map +1 -0
  642. package/lib/module/trust/v1.0.0/mappers.js +14 -0
  643. package/lib/module/trust/v1.0.0/mappers.js.map +1 -0
  644. package/lib/module/trust/v1.0.0/types.js +150 -0
  645. package/lib/module/trust/v1.0.0/types.js.map +1 -0
  646. package/lib/module/trust/v1.0.0/verify-chain.js +12 -0
  647. package/lib/module/trust/v1.0.0/verify-chain.js.map +1 -0
  648. package/lib/module/trust/v1.3.3/entities.js +37 -0
  649. package/lib/module/trust/v1.3.3/entities.js.map +1 -0
  650. package/lib/module/trust/v1.3.3/types.js +46 -0
  651. package/lib/module/trust/v1.3.3/types.js.map +1 -0
  652. package/lib/module/utils/callbacks.js +94 -0
  653. package/lib/module/utils/callbacks.js.map +1 -0
  654. package/lib/module/utils/config.js +16 -0
  655. package/lib/module/utils/config.js.map +1 -0
  656. package/lib/module/utils/credentials.js +9 -6
  657. package/lib/module/utils/credentials.js.map +1 -1
  658. package/lib/module/utils/errors.js +62 -2
  659. package/lib/module/utils/errors.js.map +1 -1
  660. package/lib/module/utils/mappers.js +62 -0
  661. package/lib/module/utils/mappers.js.map +1 -0
  662. package/lib/module/utils/misc.js +15 -1
  663. package/lib/module/utils/misc.js.map +1 -1
  664. package/lib/module/utils/object.js +11 -0
  665. package/lib/module/utils/object.js.map +1 -0
  666. package/lib/module/utils/par.js +5 -4
  667. package/lib/module/utils/par.js.map +1 -1
  668. package/lib/module/utils/zod.js +1 -0
  669. package/lib/module/utils/zod.js.map +1 -1
  670. package/lib/module/wallet-instance/README.md +8 -5
  671. package/lib/module/wallet-instance/api/index.js +2 -0
  672. package/lib/module/wallet-instance/api/index.js.map +1 -0
  673. package/lib/module/wallet-instance/common/wallet-instance.js +65 -0
  674. package/lib/module/wallet-instance/common/wallet-instance.js.map +1 -0
  675. package/lib/module/wallet-instance/index.js +2 -78
  676. package/lib/module/wallet-instance/index.js.map +1 -1
  677. package/lib/module/wallet-instance/v1.0.0/index.js +8 -0
  678. package/lib/module/wallet-instance/v1.0.0/index.js.map +1 -0
  679. package/lib/module/wallet-instance/v1.3.3/index.js +8 -0
  680. package/lib/module/wallet-instance/v1.3.3/index.js.map +1 -0
  681. package/lib/module/wallet-instance-attestation/README.md +8 -2
  682. package/lib/module/wallet-instance-attestation/api/index.js +2 -0
  683. package/lib/module/wallet-instance-attestation/api/index.js.map +1 -0
  684. package/lib/module/wallet-instance-attestation/api/types.js +22 -0
  685. package/lib/module/wallet-instance-attestation/api/types.js.map +1 -0
  686. package/lib/module/wallet-instance-attestation/common/types.js +25 -0
  687. package/lib/module/wallet-instance-attestation/common/types.js.map +1 -0
  688. package/lib/module/wallet-instance-attestation/index.js +2 -51
  689. package/lib/module/wallet-instance-attestation/index.js.map +1 -1
  690. package/lib/module/wallet-instance-attestation/v1.0.0/index.js +10 -0
  691. package/lib/module/wallet-instance-attestation/v1.0.0/index.js.map +1 -0
  692. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js +100 -0
  693. package/lib/module/wallet-instance-attestation/v1.0.0/issuing.js.map +1 -0
  694. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js +11 -0
  695. package/lib/module/wallet-instance-attestation/v1.0.0/mappers.js.map +1 -0
  696. package/lib/module/wallet-instance-attestation/v1.0.0/types.js +35 -0
  697. package/lib/module/wallet-instance-attestation/v1.0.0/types.js.map +1 -0
  698. package/lib/module/wallet-instance-attestation/v1.0.0/utils.js +31 -0
  699. package/lib/module/wallet-instance-attestation/v1.0.0/utils.js.map +1 -0
  700. package/lib/module/wallet-instance-attestation/v1.3.3/index.js +12 -0
  701. package/lib/module/wallet-instance-attestation/v1.3.3/index.js.map +1 -0
  702. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js +5 -0
  703. package/lib/module/wallet-instance-attestation/v1.3.3/issuing.js.map +1 -0
  704. package/lib/module/wallet-instance-attestation/v1.3.3/types.js +32 -0
  705. package/lib/module/wallet-instance-attestation/v1.3.3/types.js.map +1 -0
  706. package/lib/typescript/IoWallet.d.ts +28 -0
  707. package/lib/typescript/IoWallet.d.ts.map +1 -0
  708. package/lib/typescript/api/index.d.ts +29 -0
  709. package/lib/typescript/api/index.d.ts.map +1 -0
  710. package/lib/typescript/client/generated/wallet-provider.d.ts +141 -138
  711. package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -1
  712. package/lib/typescript/credential/index.d.ts +1 -5
  713. package/lib/typescript/credential/index.d.ts.map +1 -1
  714. package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts +18 -0
  715. package/lib/typescript/credential/issuance/api/01-evaluate-issuer-trust.d.ts.map +1 -0
  716. package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts +48 -0
  717. package/lib/typescript/credential/issuance/api/02-start-user-authorization.d.ts.map +1 -0
  718. package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts +78 -0
  719. package/lib/typescript/credential/issuance/api/03-complete-user-authorization.d.ts.map +1 -0
  720. package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts +33 -0
  721. package/lib/typescript/credential/issuance/api/04-authorize-access.d.ts.map +1 -0
  722. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +36 -0
  723. package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -0
  724. package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts +36 -0
  725. package/lib/typescript/credential/issuance/api/06-verify-and-parse-credential.d.ts.map +1 -0
  726. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts +423 -0
  727. package/lib/typescript/credential/issuance/api/IssuerConfig.d.ts.map +1 -0
  728. package/lib/typescript/credential/issuance/api/index.d.ts +14 -0
  729. package/lib/typescript/credential/issuance/api/index.d.ts.map +1 -0
  730. package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts +74 -0
  731. package/lib/typescript/credential/issuance/api/mrtd-pop/index.d.ts.map +1 -0
  732. package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts +34 -0
  733. package/lib/typescript/credential/issuance/api/mrtd-pop/types.d.ts.map +1 -0
  734. package/lib/typescript/credential/issuance/api/types.d.ts +64 -0
  735. package/lib/typescript/credential/issuance/api/types.d.ts.map +1 -0
  736. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts +21 -0
  737. package/lib/typescript/credential/issuance/common/02-start-user-authorization.d.ts.map +1 -0
  738. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts +3 -0
  739. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.mdoc.d.ts.map +1 -0
  740. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts +3 -0
  741. package/lib/typescript/credential/issuance/common/06-verify-and-parse-credential.sdjwt.d.ts.map +1 -0
  742. package/lib/typescript/credential/issuance/common/authorization.d.ts +21 -0
  743. package/lib/typescript/credential/issuance/common/authorization.d.ts.map +1 -0
  744. package/lib/typescript/credential/issuance/common/errors.d.ts +19 -0
  745. package/lib/typescript/credential/issuance/common/errors.d.ts.map +1 -0
  746. package/lib/typescript/credential/issuance/index.d.ts +5 -11
  747. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  748. package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts +2 -24
  749. package/lib/typescript/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.d.ts.map +1 -1
  750. package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts +2 -22
  751. package/lib/typescript/credential/issuance/mrtd-pop/02-init-challenge.d.ts.map +1 -1
  752. package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts +3 -38
  753. package/lib/typescript/credential/issuance/mrtd-pop/03-validate-challenge.d.ts.map +1 -1
  754. package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts +2 -6
  755. package/lib/typescript/credential/issuance/mrtd-pop/index.d.ts.map +1 -1
  756. package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts +3 -0
  757. package/lib/typescript/credential/issuance/v1.0.0/01-evaluate-issuer-trust.d.ts.map +1 -0
  758. package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts +3 -0
  759. package/lib/typescript/credential/issuance/v1.0.0/02-start-user-authorization.d.ts.map +1 -0
  760. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts +16 -0
  761. package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -0
  762. package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts +3 -0
  763. package/lib/typescript/credential/issuance/v1.0.0/04-authorize-access.d.ts.map +1 -0
  764. package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts +5 -0
  765. package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -0
  766. package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts +3 -0
  767. package/lib/typescript/credential/issuance/v1.0.0/06-verify-and-parse-credential.d.ts.map +1 -0
  768. package/lib/typescript/credential/issuance/v1.0.0/index.d.ts +3 -0
  769. package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -0
  770. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts +307 -0
  771. package/lib/typescript/credential/issuance/v1.0.0/mappers.d.ts.map +1 -0
  772. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts +43 -0
  773. package/lib/typescript/credential/issuance/v1.0.0/types.d.ts.map +1 -0
  774. package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts +3 -0
  775. package/lib/typescript/credential/issuance/v1.3.3/01-evaluate-issuer-trust.d.ts.map +1 -0
  776. package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts +3 -0
  777. package/lib/typescript/credential/issuance/v1.3.3/02-start-user-authorization.d.ts.map +1 -0
  778. package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts +16 -0
  779. package/lib/typescript/credential/issuance/v1.3.3/03-complete-user-authorization.d.ts.map +1 -0
  780. package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts +3 -0
  781. package/lib/typescript/credential/issuance/v1.3.3/04-authorize-access.d.ts.map +1 -0
  782. package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +5 -0
  783. package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -0
  784. package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts +3 -0
  785. package/lib/typescript/credential/issuance/v1.3.3/06-verify-and-parse-credential.d.ts.map +1 -0
  786. package/lib/typescript/credential/issuance/v1.3.3/index.d.ts +3 -0
  787. package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -0
  788. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts +2309 -0
  789. package/lib/typescript/credential/issuance/v1.3.3/mappers.d.ts.map +1 -0
  790. package/lib/typescript/credential/issuance/v1.3.3/types.d.ts +10 -0
  791. package/lib/typescript/credential/issuance/v1.3.3/types.d.ts.map +1 -0
  792. package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts +22 -0
  793. package/lib/typescript/credential/offer/api/01-resolve-credential-offer.d.ts.map +1 -0
  794. package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts +13 -0
  795. package/lib/typescript/credential/offer/api/02-extract-grant-details.d.ts.map +1 -0
  796. package/lib/typescript/credential/offer/api/index.d.ts +6 -0
  797. package/lib/typescript/credential/offer/api/index.d.ts.map +1 -0
  798. package/lib/typescript/credential/offer/api/types.d.ts +5 -0
  799. package/lib/typescript/credential/offer/api/types.d.ts.map +1 -0
  800. package/lib/typescript/credential/offer/common/errors.d.ts +10 -0
  801. package/lib/typescript/credential/offer/common/errors.d.ts.map +1 -0
  802. package/lib/typescript/credential/offer/index.d.ts +5 -6
  803. package/lib/typescript/credential/offer/index.d.ts.map +1 -1
  804. package/lib/typescript/credential/offer/v1.0.0/index.d.ts +3 -0
  805. package/lib/typescript/credential/offer/v1.0.0/index.d.ts.map +1 -0
  806. package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts +25 -0
  807. package/lib/typescript/credential/offer/v1.3.3/01-resolve-credential-offer.d.ts.map +1 -0
  808. package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts +16 -0
  809. package/lib/typescript/credential/offer/v1.3.3/02-extract-grant-details.d.ts.map +1 -0
  810. package/lib/typescript/credential/offer/v1.3.3/index.d.ts +3 -0
  811. package/lib/typescript/credential/offer/v1.3.3/index.d.ts.map +1 -0
  812. package/lib/typescript/credential/presentation/api/01-start-flow.d.ts +18 -0
  813. package/lib/typescript/credential/presentation/api/01-start-flow.d.ts.map +1 -0
  814. package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts +18 -0
  815. package/lib/typescript/credential/presentation/api/02-evaluate-rp-trust.d.ts.map +1 -0
  816. package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts +19 -0
  817. package/lib/typescript/credential/presentation/api/03-get-request-object.d.ts.map +1 -0
  818. package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts +23 -0
  819. package/lib/typescript/credential/presentation/api/04-verify-request-object.d.ts.map +1 -0
  820. package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts +41 -0
  821. package/lib/typescript/credential/presentation/api/05-evaluate-dcql-query.d.ts.map +1 -0
  822. package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts +54 -0
  823. package/lib/typescript/credential/presentation/api/06-send-authorization-response.d.ts.map +1 -0
  824. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts +185 -0
  825. package/lib/typescript/credential/presentation/api/RelyingPartyConfig.d.ts.map +1 -0
  826. package/lib/typescript/credential/presentation/api/index.d.ts +12 -0
  827. package/lib/typescript/credential/presentation/api/index.d.ts.map +1 -0
  828. package/lib/typescript/credential/presentation/api/types.d.ts +207 -0
  829. package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -0
  830. package/lib/typescript/credential/presentation/common/errors.d.ts +80 -0
  831. package/lib/typescript/credential/presentation/common/errors.d.ts.map +1 -0
  832. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts +293 -0
  833. package/lib/typescript/credential/presentation/common/utils/dcql.d.ts.map +1 -0
  834. package/lib/typescript/credential/presentation/common/utils/http.d.ts +11 -0
  835. package/lib/typescript/credential/presentation/common/utils/http.d.ts.map +1 -0
  836. package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts +14 -0
  837. package/lib/typescript/credential/presentation/common/utils/sd-jwt.d.ts.map +1 -0
  838. package/lib/typescript/credential/presentation/common/utils.d.ts +11 -0
  839. package/lib/typescript/credential/presentation/common/utils.d.ts.map +1 -0
  840. package/lib/typescript/credential/presentation/index.d.ts +5 -12
  841. package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
  842. package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts +3 -0
  843. package/lib/typescript/credential/presentation/v1.0.0/01-start-flow.d.ts.map +1 -0
  844. package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts +3 -0
  845. package/lib/typescript/credential/presentation/v1.0.0/02-evaluate-rp-trust.d.ts.map +1 -0
  846. package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts +3 -0
  847. package/lib/typescript/credential/presentation/v1.0.0/03-get-request-object.d.ts.map +1 -0
  848. package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts +3 -0
  849. package/lib/typescript/credential/presentation/v1.0.0/04-verify-request-object.d.ts.map +1 -0
  850. package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts +3 -0
  851. package/lib/typescript/credential/presentation/v1.0.0/05-evaluate-dcql-query.d.ts.map +1 -0
  852. package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts +26 -0
  853. package/lib/typescript/credential/presentation/v1.0.0/06-send-authorization-response.d.ts.map +1 -0
  854. package/lib/typescript/credential/presentation/v1.0.0/index.d.ts +3 -0
  855. package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -0
  856. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +143 -0
  857. package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -0
  858. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +80 -0
  859. package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -0
  860. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts +11 -0
  861. package/lib/typescript/credential/presentation/v1.0.0/utils.d.ts.map +1 -0
  862. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts +11 -0
  863. package/lib/typescript/credential/presentation/v1.0.0/utils.jwks.d.ts.map +1 -0
  864. package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts +3 -0
  865. package/lib/typescript/credential/presentation/v1.3.3/01-start-flow.d.ts.map +1 -0
  866. package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts +3 -0
  867. package/lib/typescript/credential/presentation/v1.3.3/02-evaluate-rp-trust.d.ts.map +1 -0
  868. package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts +3 -0
  869. package/lib/typescript/credential/presentation/v1.3.3/03-get-request-object.d.ts.map +1 -0
  870. package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts +3 -0
  871. package/lib/typescript/credential/presentation/v1.3.3/04-verify-request-object.d.ts.map +1 -0
  872. package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts +3 -0
  873. package/lib/typescript/credential/presentation/v1.3.3/05-evaluate-dcql-query.d.ts.map +1 -0
  874. package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts +18 -0
  875. package/lib/typescript/credential/presentation/v1.3.3/06-send-authorization-response.d.ts.map +1 -0
  876. package/lib/typescript/credential/presentation/v1.3.3/index.d.ts +3 -0
  877. package/lib/typescript/credential/presentation/v1.3.3/index.d.ts.map +1 -0
  878. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +619 -0
  879. package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -0
  880. package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts +13 -0
  881. package/lib/typescript/credential/presentation/v1.3.3/sdkErrorMapper.d.ts.map +1 -0
  882. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +3730 -0
  883. package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -0
  884. package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts +28 -0
  885. package/lib/typescript/credential/presentation/v1.3.3/utils.mdoc.d.ts.map +1 -0
  886. package/lib/typescript/credential/status/api/index.d.ts +21 -0
  887. package/lib/typescript/credential/status/api/index.d.ts.map +1 -0
  888. package/lib/typescript/credential/status/api/status-assertion.d.ts +49 -0
  889. package/lib/typescript/credential/status/api/status-assertion.d.ts.map +1 -0
  890. package/lib/typescript/credential/status/api/status-list.d.ts +40 -0
  891. package/lib/typescript/credential/status/api/status-list.d.ts.map +1 -0
  892. package/lib/typescript/credential/status/api/types.d.ts +16 -0
  893. package/lib/typescript/credential/status/api/types.d.ts.map +1 -0
  894. package/lib/typescript/credential/status/index.d.ts +3 -6
  895. package/lib/typescript/credential/status/index.d.ts.map +1 -1
  896. package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts +3 -0
  897. package/lib/typescript/credential/status/v1.0.0/01-status-assertion.d.ts.map +1 -0
  898. package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts +3 -0
  899. package/lib/typescript/credential/status/v1.0.0/02-verify-and-parse-status-assertion.d.ts.map +1 -0
  900. package/lib/typescript/credential/status/v1.0.0/index.d.ts +3 -0
  901. package/lib/typescript/credential/status/v1.0.0/index.d.ts.map +1 -0
  902. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts +47 -0
  903. package/lib/typescript/credential/status/v1.0.0/mappers.d.ts.map +1 -0
  904. package/lib/typescript/credential/status/v1.0.0/types.d.ts +782 -0
  905. package/lib/typescript/credential/status/v1.0.0/types.d.ts.map +1 -0
  906. package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts +3 -0
  907. package/lib/typescript/credential/status/v1.3.3/01-status-list.d.ts.map +1 -0
  908. package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts +3 -0
  909. package/lib/typescript/credential/status/v1.3.3/02-verify-and-parse-status-list.d.ts.map +1 -0
  910. package/lib/typescript/credential/status/v1.3.3/index.d.ts +3 -0
  911. package/lib/typescript/credential/status/v1.3.3/index.d.ts.map +1 -0
  912. package/lib/typescript/credential/trustmark/api/index.d.ts +49 -0
  913. package/lib/typescript/credential/trustmark/api/index.d.ts.map +1 -0
  914. package/lib/typescript/credential/trustmark/index.d.ts +3 -3
  915. package/lib/typescript/credential/trustmark/index.d.ts.map +1 -1
  916. package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts +3 -0
  917. package/lib/typescript/credential/trustmark/v1.0.0/get-credential-trustmark.d.ts.map +1 -0
  918. package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts +3 -0
  919. package/lib/typescript/credential/trustmark/v1.0.0/index.d.ts.map +1 -0
  920. package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts +3 -0
  921. package/lib/typescript/credential/trustmark/v1.3.3/get-credential-trustmark.d.ts.map +1 -0
  922. package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts +3 -0
  923. package/lib/typescript/credential/trustmark/v1.3.3/index.d.ts.map +1 -0
  924. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +613 -0
  925. package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -0
  926. package/lib/typescript/credentials-catalogue/api/index.d.ts +18 -0
  927. package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -0
  928. package/lib/typescript/credentials-catalogue/index.d.ts +3 -2
  929. package/lib/typescript/credentials-catalogue/index.d.ts.map +1 -1
  930. package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts +3 -0
  931. package/lib/typescript/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.d.ts.map +1 -0
  932. package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts +3 -0
  933. package/lib/typescript/credentials-catalogue/v1.0.0/index.d.ts.map +1 -0
  934. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +54 -0
  935. package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -0
  936. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts +844 -0
  937. package/lib/typescript/credentials-catalogue/v1.0.0/types.d.ts.map +1 -0
  938. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts +3 -0
  939. package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts.map +1 -0
  940. package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts +3 -0
  941. package/lib/typescript/credentials-catalogue/v1.3.3/index.d.ts.map +1 -0
  942. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +168 -0
  943. package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -0
  944. package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +1074 -0
  945. package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -0
  946. package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts +26 -0
  947. package/lib/typescript/credentials-catalogue/v1.3.3/utils.d.ts.map +1 -0
  948. package/lib/typescript/index.d.ts +9 -4
  949. package/lib/typescript/index.d.ts.map +1 -1
  950. package/lib/typescript/mdoc/index.d.ts +4 -0
  951. package/lib/typescript/mdoc/index.d.ts.map +1 -1
  952. package/lib/typescript/mdoc/utils.d.ts +2 -2
  953. package/lib/typescript/mdoc/utils.d.ts.map +1 -1
  954. package/lib/typescript/sd-jwt/index.d.ts +58 -278
  955. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  956. package/lib/typescript/sd-jwt/types.d.ts +118 -153
  957. package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
  958. package/lib/typescript/sd-jwt/utils.d.ts.map +1 -1
  959. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts +247 -0
  960. package/lib/typescript/trust/api/TrustAnchorConfig.d.ts.map +1 -0
  961. package/lib/typescript/trust/api/index.d.ts +43 -0
  962. package/lib/typescript/trust/api/index.d.ts.map +1 -0
  963. package/lib/typescript/trust/common/build-chain.d.ts +21 -0
  964. package/lib/typescript/trust/common/build-chain.d.ts.map +1 -0
  965. package/lib/typescript/trust/common/errors.d.ts +103 -0
  966. package/lib/typescript/trust/common/errors.d.ts.map +1 -0
  967. package/lib/typescript/trust/common/types.d.ts +1306 -0
  968. package/lib/typescript/trust/common/types.d.ts.map +1 -0
  969. package/lib/typescript/trust/common/utils.d.ts +53 -0
  970. package/lib/typescript/trust/common/utils.d.ts.map +1 -0
  971. package/lib/typescript/trust/common/verify-chain.d.ts +27 -0
  972. package/lib/typescript/trust/common/verify-chain.d.ts.map +1 -0
  973. package/lib/typescript/trust/index.d.ts +4 -5
  974. package/lib/typescript/trust/index.d.ts.map +1 -1
  975. package/lib/typescript/trust/v1.0.0/build-chain.d.ts +54 -0
  976. package/lib/typescript/trust/v1.0.0/build-chain.d.ts.map +1 -0
  977. package/lib/typescript/trust/v1.0.0/entities.d.ts +968 -0
  978. package/lib/typescript/trust/v1.0.0/entities.d.ts.map +1 -0
  979. package/lib/typescript/trust/v1.0.0/index.d.ts +3 -0
  980. package/lib/typescript/trust/v1.0.0/index.d.ts.map +1 -0
  981. package/lib/typescript/trust/v1.0.0/mappers.d.ts +113 -0
  982. package/lib/typescript/trust/v1.0.0/mappers.d.ts.map +1 -0
  983. package/lib/typescript/trust/v1.0.0/types.d.ts +12744 -0
  984. package/lib/typescript/trust/v1.0.0/types.d.ts.map +1 -0
  985. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts +57 -0
  986. package/lib/typescript/trust/v1.0.0/verify-chain.d.ts.map +1 -0
  987. package/lib/typescript/trust/v1.3.3/entities.d.ts +103 -0
  988. package/lib/typescript/trust/v1.3.3/entities.d.ts.map +1 -0
  989. package/lib/typescript/trust/v1.3.3/types.d.ts +14620 -0
  990. package/lib/typescript/trust/v1.3.3/types.d.ts.map +1 -0
  991. package/lib/typescript/utils/auth.d.ts +2 -2
  992. package/lib/typescript/utils/callbacks.d.ts +21 -0
  993. package/lib/typescript/utils/callbacks.d.ts.map +1 -0
  994. package/lib/typescript/utils/config.d.ts +10 -0
  995. package/lib/typescript/utils/config.d.ts.map +1 -0
  996. package/lib/typescript/utils/credentials.d.ts +2 -3
  997. package/lib/typescript/utils/credentials.d.ts.map +1 -1
  998. package/lib/typescript/utils/errors.d.ts +41 -6
  999. package/lib/typescript/utils/errors.d.ts.map +1 -1
  1000. package/lib/typescript/utils/mappers.d.ts +47 -0
  1001. package/lib/typescript/utils/mappers.d.ts.map +1 -0
  1002. package/lib/typescript/utils/misc.d.ts +7 -1
  1003. package/lib/typescript/utils/misc.d.ts.map +1 -1
  1004. package/lib/typescript/utils/object.d.ts +4 -0
  1005. package/lib/typescript/utils/object.d.ts.map +1 -0
  1006. package/lib/typescript/utils/par.d.ts +2 -2
  1007. package/lib/typescript/utils/par.d.ts.map +1 -1
  1008. package/lib/typescript/utils/pop.d.ts +2 -2
  1009. package/lib/typescript/utils/zod.d.ts +2 -0
  1010. package/lib/typescript/utils/zod.d.ts.map +1 -1
  1011. package/lib/typescript/wallet-instance/api/index.d.ts +45 -0
  1012. package/lib/typescript/wallet-instance/api/index.d.ts.map +1 -0
  1013. package/lib/typescript/wallet-instance/common/wallet-instance.d.ts +6 -0
  1014. package/lib/typescript/wallet-instance/common/wallet-instance.d.ts.map +1 -0
  1015. package/lib/typescript/wallet-instance/index.d.ts +3 -34
  1016. package/lib/typescript/wallet-instance/index.d.ts.map +1 -1
  1017. package/lib/typescript/wallet-instance/v1.0.0/index.d.ts +3 -0
  1018. package/lib/typescript/wallet-instance/v1.0.0/index.d.ts.map +1 -0
  1019. package/lib/typescript/wallet-instance/v1.3.3/index.d.ts +3 -0
  1020. package/lib/typescript/wallet-instance/v1.3.3/index.d.ts.map +1 -0
  1021. package/lib/typescript/wallet-instance-attestation/api/index.d.ts +46 -0
  1022. package/lib/typescript/wallet-instance-attestation/api/index.d.ts.map +1 -0
  1023. package/lib/typescript/wallet-instance-attestation/api/types.d.ts +211 -0
  1024. package/lib/typescript/wallet-instance-attestation/api/types.d.ts.map +1 -0
  1025. package/lib/typescript/wallet-instance-attestation/common/types.d.ts +306 -0
  1026. package/lib/typescript/wallet-instance-attestation/common/types.d.ts.map +1 -0
  1027. package/lib/typescript/wallet-instance-attestation/index.d.ts +3 -34
  1028. package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
  1029. package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts +3 -0
  1030. package/lib/typescript/wallet-instance-attestation/v1.0.0/index.d.ts.map +1 -0
  1031. package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts +3 -0
  1032. package/lib/typescript/wallet-instance-attestation/v1.0.0/issuing.d.ts.map +1 -0
  1033. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts +91 -0
  1034. package/lib/typescript/wallet-instance-attestation/v1.0.0/mappers.d.ts.map +1 -0
  1035. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts +710 -0
  1036. package/lib/typescript/wallet-instance-attestation/v1.0.0/types.d.ts.map +1 -0
  1037. package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts +15 -0
  1038. package/lib/typescript/wallet-instance-attestation/v1.0.0/utils.d.ts.map +1 -0
  1039. package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts +3 -0
  1040. package/lib/typescript/wallet-instance-attestation/v1.3.3/index.d.ts.map +1 -0
  1041. package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts +3 -0
  1042. package/lib/typescript/wallet-instance-attestation/v1.3.3/issuing.d.ts.map +1 -0
  1043. package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts +925 -0
  1044. package/lib/typescript/wallet-instance-attestation/v1.3.3/types.d.ts.map +1 -0
  1045. package/package.json +20 -13
  1046. package/src/IoWallet.ts +50 -0
  1047. package/src/api/index.ts +55 -0
  1048. package/src/client/generated/wallet-provider.ts +53 -46
  1049. package/src/client/index.ts +3 -3
  1050. package/src/credential/index.ts +1 -5
  1051. package/src/credential/issuance/README.md +37 -44
  1052. package/src/credential/issuance/api/01-evaluate-issuer-trust.ts +17 -0
  1053. package/src/credential/issuance/api/02-start-user-authorization.ts +50 -0
  1054. package/src/credential/issuance/api/03-complete-user-authorization.ts +102 -0
  1055. package/src/credential/issuance/api/04-authorize-access.ts +37 -0
  1056. package/src/credential/issuance/api/05-obtain-credential.ts +42 -0
  1057. package/src/credential/issuance/api/06-verify-and-parse-credential.ts +42 -0
  1058. package/src/credential/issuance/api/IssuerConfig.ts +65 -0
  1059. package/src/credential/issuance/api/index.ts +21 -0
  1060. package/src/credential/issuance/api/mrtd-pop/index.ts +104 -0
  1061. package/src/credential/issuance/api/mrtd-pop/types.ts +37 -0
  1062. package/src/credential/issuance/api/types.ts +34 -0
  1063. package/src/credential/issuance/common/02-start-user-authorization.ts +86 -0
  1064. package/src/credential/issuance/common/06-verify-and-parse-credential.mdoc.ts +236 -0
  1065. package/src/credential/issuance/common/06-verify-and-parse-credential.sdjwt.ts +261 -0
  1066. package/src/credential/issuance/common/authorization.ts +89 -0
  1067. package/src/credential/issuance/common/errors.ts +29 -0
  1068. package/src/credential/issuance/index.ts +5 -62
  1069. package/src/credential/issuance/mrtd-pop/01-verify-and-parse-challenge-info.ts +20 -65
  1070. package/src/credential/issuance/mrtd-pop/02-init-challenge.ts +25 -56
  1071. package/src/credential/issuance/mrtd-pop/03-validate-challenge.ts +34 -90
  1072. package/src/credential/issuance/mrtd-pop/index.ts +4 -17
  1073. package/src/credential/issuance/v1.0.0/01-evaluate-issuer-trust.ts +14 -0
  1074. package/src/credential/issuance/v1.0.0/02-start-user-authorization.ts +68 -0
  1075. package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +279 -0
  1076. package/src/credential/issuance/v1.0.0/04-authorize-access.ts +93 -0
  1077. package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +212 -0
  1078. package/src/credential/issuance/v1.0.0/06-verify-and-parse-credential.ts +46 -0
  1079. package/src/credential/issuance/v1.0.0/index.ts +28 -0
  1080. package/src/credential/issuance/v1.0.0/mappers.ts +29 -0
  1081. package/src/credential/issuance/v1.0.0/types.ts +28 -0
  1082. package/src/credential/issuance/v1.3.3/01-evaluate-issuer-trust.ts +19 -0
  1083. package/src/credential/issuance/v1.3.3/02-start-user-authorization.ts +109 -0
  1084. package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +249 -0
  1085. package/src/credential/issuance/v1.3.3/04-authorize-access.ts +84 -0
  1086. package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +188 -0
  1087. package/src/credential/issuance/v1.3.3/06-verify-and-parse-credential.ts +46 -0
  1088. package/src/credential/issuance/v1.3.3/index.ts +28 -0
  1089. package/src/credential/issuance/v1.3.3/mappers.ts +87 -0
  1090. package/src/credential/issuance/v1.3.3/types.ts +6 -0
  1091. package/src/credential/offer/README.md +103 -119
  1092. package/src/credential/offer/api/01-resolve-credential-offer.ts +23 -0
  1093. package/src/credential/offer/api/02-extract-grant-details.ts +13 -0
  1094. package/src/credential/offer/api/index.ts +8 -0
  1095. package/src/credential/offer/api/types.ts +5 -0
  1096. package/src/credential/offer/common/errors.ts +17 -0
  1097. package/src/credential/offer/index.ts +5 -16
  1098. package/src/credential/offer/v1.0.0/index.ts +11 -0
  1099. package/src/credential/offer/v1.3.3/01-resolve-credential-offer.ts +60 -0
  1100. package/src/credential/offer/v1.3.3/02-extract-grant-details.ts +27 -0
  1101. package/src/credential/offer/v1.3.3/index.ts +8 -0
  1102. package/src/credential/presentation/README.md +12 -9
  1103. package/src/credential/presentation/api/01-start-flow.ts +18 -0
  1104. package/src/credential/presentation/api/02-evaluate-rp-trust.ts +19 -0
  1105. package/src/credential/presentation/api/03-get-request-object.ts +20 -0
  1106. package/src/credential/presentation/api/04-verify-request-object.ts +24 -0
  1107. package/src/credential/presentation/api/05-evaluate-dcql-query.ts +54 -0
  1108. package/src/credential/presentation/api/06-send-authorization-response.ts +67 -0
  1109. package/src/credential/presentation/api/RelyingPartyConfig.ts +25 -0
  1110. package/src/credential/presentation/api/index.ts +18 -0
  1111. package/src/credential/presentation/api/types.ts +129 -0
  1112. package/src/credential/presentation/common/errors.ts +116 -0
  1113. package/src/credential/presentation/common/utils/dcql.ts +188 -0
  1114. package/src/credential/presentation/common/utils/http.ts +30 -0
  1115. package/src/credential/presentation/common/utils/sd-jwt.ts +68 -0
  1116. package/src/credential/presentation/common/utils.ts +30 -0
  1117. package/src/credential/presentation/index.ts +5 -71
  1118. package/src/credential/presentation/v1.0.0/01-start-flow.ts +22 -0
  1119. package/src/credential/presentation/v1.0.0/02-evaluate-rp-trust.ts +14 -0
  1120. package/src/credential/presentation/v1.0.0/03-get-request-object.ts +61 -0
  1121. package/src/credential/presentation/v1.0.0/04-verify-request-object.ts +104 -0
  1122. package/src/credential/presentation/v1.0.0/05-evaluate-dcql-query.ts +97 -0
  1123. package/src/credential/presentation/v1.0.0/06-send-authorization-response.ts +196 -0
  1124. package/src/credential/presentation/v1.0.0/index.ts +22 -0
  1125. package/src/credential/presentation/v1.0.0/mappers.ts +35 -0
  1126. package/src/credential/presentation/v1.0.0/types.ts +40 -0
  1127. package/src/credential/presentation/v1.0.0/utils.jwks.ts +26 -0
  1128. package/src/credential/presentation/v1.0.0/utils.ts +26 -0
  1129. package/src/credential/presentation/v1.3.3/01-start-flow.ts +22 -0
  1130. package/src/credential/presentation/v1.3.3/02-evaluate-rp-trust.ts +15 -0
  1131. package/src/credential/presentation/v1.3.3/03-get-request-object.ts +28 -0
  1132. package/src/credential/presentation/v1.3.3/04-verify-request-object.ts +31 -0
  1133. package/src/credential/presentation/v1.3.3/05-evaluate-dcql-query.ts +119 -0
  1134. package/src/credential/presentation/v1.3.3/06-send-authorization-response.ts +160 -0
  1135. package/src/credential/presentation/v1.3.3/index.ts +22 -0
  1136. package/src/credential/presentation/v1.3.3/mappers.ts +34 -0
  1137. package/src/credential/presentation/v1.3.3/sdkErrorMapper.ts +93 -0
  1138. package/src/credential/presentation/v1.3.3/types.ts +12 -0
  1139. package/src/credential/presentation/v1.3.3/utils.mdoc.ts +98 -0
  1140. package/src/credential/status/README.md +77 -19
  1141. package/src/credential/status/api/index.ts +23 -0
  1142. package/src/credential/status/api/status-assertion.ts +57 -0
  1143. package/src/credential/status/api/status-list.ts +50 -0
  1144. package/src/credential/status/api/types.ts +15 -0
  1145. package/src/credential/status/index.ts +3 -15
  1146. package/src/credential/status/v1.0.0/01-status-assertion.ts +95 -0
  1147. package/src/credential/status/v1.0.0/02-verify-and-parse-status-assertion.ts +87 -0
  1148. package/src/credential/status/v1.0.0/index.ts +14 -0
  1149. package/src/credential/status/v1.0.0/mappers.ts +8 -0
  1150. package/src/credential/status/v1.0.0/types.ts +90 -0
  1151. package/src/credential/status/v1.3.3/01-status-list.ts +50 -0
  1152. package/src/credential/status/v1.3.3/02-verify-and-parse-status-list.ts +19 -0
  1153. package/src/credential/status/v1.3.3/index.ts +14 -0
  1154. package/src/credential/trustmark/README.md +5 -1
  1155. package/src/credential/trustmark/api/index.ts +50 -0
  1156. package/src/credential/trustmark/index.ts +3 -8
  1157. package/src/credential/trustmark/v1.0.0/get-credential-trustmark.ts +89 -0
  1158. package/src/credential/trustmark/v1.0.0/index.ts +6 -0
  1159. package/src/credential/trustmark/v1.3.3/get-credential-trustmark.ts +7 -0
  1160. package/src/credential/trustmark/v1.3.3/index.ts +6 -0
  1161. package/src/credentials-catalogue/README.md +8 -2
  1162. package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +82 -0
  1163. package/src/credentials-catalogue/api/index.ts +21 -0
  1164. package/src/credentials-catalogue/index.ts +3 -2
  1165. package/src/credentials-catalogue/v1.0.0/fetch-and-parse-catalogue.ts +41 -0
  1166. package/src/credentials-catalogue/v1.0.0/index.ts +6 -0
  1167. package/src/credentials-catalogue/v1.0.0/mappers.ts +20 -0
  1168. package/src/credentials-catalogue/v1.0.0/types.ts +97 -0
  1169. package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +52 -0
  1170. package/src/credentials-catalogue/v1.3.3/index.ts +6 -0
  1171. package/src/credentials-catalogue/v1.3.3/mappers.ts +75 -0
  1172. package/src/credentials-catalogue/v1.3.3/types.ts +162 -0
  1173. package/src/credentials-catalogue/v1.3.3/utils.ts +64 -0
  1174. package/src/index.ts +18 -7
  1175. package/src/mdoc/index.ts +43 -2
  1176. package/src/mdoc/utils.ts +4 -2
  1177. package/src/sd-jwt/__test__/types.test.ts +1 -77
  1178. package/src/sd-jwt/__test__/utils.test.ts +3 -13
  1179. package/src/sd-jwt/index.ts +19 -164
  1180. package/src/sd-jwt/types.ts +33 -63
  1181. package/src/sd-jwt/utils.ts +11 -8
  1182. package/src/trust/README.md +24 -11
  1183. package/src/trust/api/TrustAnchorConfig.ts +20 -0
  1184. package/src/trust/api/index.ts +57 -0
  1185. package/src/trust/common/build-chain.ts +161 -0
  1186. package/src/trust/common/errors.ts +138 -0
  1187. package/src/trust/common/types.ts +78 -0
  1188. package/src/trust/common/utils.ts +150 -0
  1189. package/src/trust/common/verify-chain.ts +293 -0
  1190. package/src/trust/index.ts +4 -6
  1191. package/src/trust/v1.0.0/build-chain.ts +8 -0
  1192. package/src/trust/v1.0.0/entities.ts +93 -0
  1193. package/src/trust/v1.0.0/index.ts +15 -0
  1194. package/src/trust/v1.0.0/mappers.ts +15 -0
  1195. package/src/trust/v1.0.0/types.ts +178 -0
  1196. package/src/trust/v1.0.0/verify-chain.ts +12 -0
  1197. package/src/trust/v1.3.3/entities.ts +51 -0
  1198. package/src/trust/v1.3.3/types.ts +68 -0
  1199. package/src/utils/callbacks.ts +84 -0
  1200. package/src/utils/config.ts +18 -0
  1201. package/src/utils/credentials.ts +10 -9
  1202. package/src/utils/errors.ts +72 -9
  1203. package/src/utils/mappers.ts +84 -0
  1204. package/src/utils/misc.ts +16 -2
  1205. package/src/utils/object.ts +15 -0
  1206. package/src/utils/par.ts +3 -5
  1207. package/src/utils/zod.ts +3 -0
  1208. package/src/wallet-instance/README.md +8 -5
  1209. package/src/wallet-instance/api/index.ts +53 -0
  1210. package/src/wallet-instance/common/wallet-instance.ts +96 -0
  1211. package/src/wallet-instance/index.ts +3 -118
  1212. package/src/wallet-instance/v1.0.0/index.ts +14 -0
  1213. package/src/wallet-instance/v1.3.3/index.ts +14 -0
  1214. package/src/wallet-instance-attestation/README.md +8 -2
  1215. package/src/wallet-instance-attestation/api/index.ts +48 -0
  1216. package/src/wallet-instance-attestation/api/types.ts +25 -0
  1217. package/src/wallet-instance-attestation/common/types.ts +25 -0
  1218. package/src/wallet-instance-attestation/index.ts +3 -56
  1219. package/src/wallet-instance-attestation/v1.0.0/index.ts +11 -0
  1220. package/src/wallet-instance-attestation/v1.0.0/issuing.ts +154 -0
  1221. package/src/wallet-instance-attestation/v1.0.0/mappers.ts +24 -0
  1222. package/src/wallet-instance-attestation/v1.0.0/types.ts +59 -0
  1223. package/src/wallet-instance-attestation/v1.0.0/utils.ts +37 -0
  1224. package/src/wallet-instance-attestation/v1.3.3/index.ts +13 -0
  1225. package/src/wallet-instance-attestation/v1.3.3/issuing.ts +7 -0
  1226. package/src/wallet-instance-attestation/v1.3.3/types.ts +48 -0
  1227. package/lib/commonjs/credential/issuance/01-start-flow.js +0 -2
  1228. package/lib/commonjs/credential/issuance/01-start-flow.js.map +0 -1
  1229. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -32
  1230. package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  1231. package/lib/commonjs/credential/issuance/03-start-user-authorization.js +0 -132
  1232. package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +0 -1
  1233. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +0 -259
  1234. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +0 -1
  1235. package/lib/commonjs/credential/issuance/05-authorize-access.js +0 -87
  1236. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +0 -1
  1237. package/lib/commonjs/credential/issuance/06-obtain-credential.js +0 -168
  1238. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +0 -1
  1239. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +0 -388
  1240. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
  1241. package/lib/commonjs/credential/issuance/errors.js +0 -35
  1242. package/lib/commonjs/credential/issuance/errors.js.map +0 -1
  1243. package/lib/commonjs/credential/issuance/mrtd-pop/types.js +0 -57
  1244. package/lib/commonjs/credential/issuance/mrtd-pop/types.js.map +0 -1
  1245. package/lib/commonjs/credential/issuance/types.js +0 -43
  1246. package/lib/commonjs/credential/issuance/types.js.map +0 -1
  1247. package/lib/commonjs/credential/offer/01-start-flow.js +0 -75
  1248. package/lib/commonjs/credential/offer/01-start-flow.js.map +0 -1
  1249. package/lib/commonjs/credential/offer/02-fetch-credential-offer.js +0 -45
  1250. package/lib/commonjs/credential/offer/02-fetch-credential-offer.js.map +0 -1
  1251. package/lib/commonjs/credential/offer/errors.js +0 -22
  1252. package/lib/commonjs/credential/offer/errors.js.map +0 -1
  1253. package/lib/commonjs/credential/offer/types.js +0 -51
  1254. package/lib/commonjs/credential/offer/types.js.map +0 -1
  1255. package/lib/commonjs/credential/presentation/01-start-flow.js +0 -45
  1256. package/lib/commonjs/credential/presentation/01-start-flow.js.map +0 -1
  1257. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +0 -34
  1258. package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
  1259. package/lib/commonjs/credential/presentation/03-get-request-object.js +0 -56
  1260. package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
  1261. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +0 -32
  1262. package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
  1263. package/lib/commonjs/credential/presentation/05-verify-request-object.js +0 -95
  1264. package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +0 -1
  1265. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +0 -39
  1266. package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
  1267. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js +0 -155
  1268. package/lib/commonjs/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
  1269. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +0 -307
  1270. package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
  1271. package/lib/commonjs/credential/presentation/08-send-authorization-response.js +0 -252
  1272. package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +0 -1
  1273. package/lib/commonjs/credential/presentation/errors.js +0 -121
  1274. package/lib/commonjs/credential/presentation/errors.js.map +0 -1
  1275. package/lib/commonjs/credential/presentation/types.js +0 -157
  1276. package/lib/commonjs/credential/presentation/types.js.map +0 -1
  1277. package/lib/commonjs/credential/status/01-start-flow.js +0 -2
  1278. package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
  1279. package/lib/commonjs/credential/status/02-status-assertion.js +0 -79
  1280. package/lib/commonjs/credential/status/02-status-assertion.js.map +0 -1
  1281. package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js +0 -85
  1282. package/lib/commonjs/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
  1283. package/lib/commonjs/credential/status/types.js +0 -81
  1284. package/lib/commonjs/credential/status/types.js.map +0 -1
  1285. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -86
  1286. package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
  1287. package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js +0 -42
  1288. package/lib/commonjs/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
  1289. package/lib/commonjs/credentials-catalogue/types.js +0 -99
  1290. package/lib/commonjs/credentials-catalogue/types.js.map +0 -1
  1291. package/lib/commonjs/pid/index.js +0 -11
  1292. package/lib/commonjs/pid/index.js.map +0 -1
  1293. package/lib/commonjs/pid/sd-jwt/converters.js +0 -25
  1294. package/lib/commonjs/pid/sd-jwt/converters.js.map +0 -1
  1295. package/lib/commonjs/pid/sd-jwt/index.js +0 -77
  1296. package/lib/commonjs/pid/sd-jwt/index.js.map +0 -1
  1297. package/lib/commonjs/pid/sd-jwt/types.js +0 -50
  1298. package/lib/commonjs/pid/sd-jwt/types.js.map +0 -1
  1299. package/lib/commonjs/sd-jwt/__test__/converters.test.js +0 -25
  1300. package/lib/commonjs/sd-jwt/__test__/converters.test.js.map +0 -1
  1301. package/lib/commonjs/sd-jwt/__test__/index.test.js +0 -134
  1302. package/lib/commonjs/sd-jwt/__test__/index.test.js.map +0 -1
  1303. package/lib/commonjs/sd-jwt/converters.js +0 -30
  1304. package/lib/commonjs/sd-jwt/converters.js.map +0 -1
  1305. package/lib/commonjs/sd-jwt/errors.js +0 -40
  1306. package/lib/commonjs/sd-jwt/errors.js.map +0 -1
  1307. package/lib/commonjs/sd-jwt/verifier.js +0 -24
  1308. package/lib/commonjs/sd-jwt/verifier.js.map +0 -1
  1309. package/lib/commonjs/trust/build-chain.js +0 -255
  1310. package/lib/commonjs/trust/build-chain.js.map +0 -1
  1311. package/lib/commonjs/trust/errors.js +0 -134
  1312. package/lib/commonjs/trust/errors.js.map +0 -1
  1313. package/lib/commonjs/trust/types.js +0 -234
  1314. package/lib/commonjs/trust/types.js.map +0 -1
  1315. package/lib/commonjs/trust/utils.js +0 -70
  1316. package/lib/commonjs/trust/utils.js.map +0 -1
  1317. package/lib/commonjs/trust/verify-chain.js +0 -188
  1318. package/lib/commonjs/trust/verify-chain.js.map +0 -1
  1319. package/lib/commonjs/wallet-instance-attestation/issuing.js +0 -117
  1320. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +0 -1
  1321. package/lib/commonjs/wallet-instance-attestation/types.js +0 -69
  1322. package/lib/commonjs/wallet-instance-attestation/types.js.map +0 -1
  1323. package/lib/module/credential/issuance/01-start-flow.js +0 -2
  1324. package/lib/module/credential/issuance/01-start-flow.js.map +0 -1
  1325. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -25
  1326. package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
  1327. package/lib/module/credential/issuance/03-start-user-authorization.js +0 -125
  1328. package/lib/module/credential/issuance/03-start-user-authorization.js.map +0 -1
  1329. package/lib/module/credential/issuance/04-complete-user-authorization.js +0 -247
  1330. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +0 -1
  1331. package/lib/module/credential/issuance/05-authorize-access.js +0 -78
  1332. package/lib/module/credential/issuance/05-authorize-access.js.map +0 -1
  1333. package/lib/module/credential/issuance/06-obtain-credential.js +0 -160
  1334. package/lib/module/credential/issuance/06-obtain-credential.js.map +0 -1
  1335. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +0 -382
  1336. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +0 -1
  1337. package/lib/module/credential/issuance/errors.js +0 -28
  1338. package/lib/module/credential/issuance/errors.js.map +0 -1
  1339. package/lib/module/credential/issuance/mrtd-pop/types.js +0 -46
  1340. package/lib/module/credential/issuance/mrtd-pop/types.js.map +0 -1
  1341. package/lib/module/credential/issuance/types.js +0 -30
  1342. package/lib/module/credential/issuance/types.js.map +0 -1
  1343. package/lib/module/credential/offer/01-start-flow.js +0 -66
  1344. package/lib/module/credential/offer/01-start-flow.js.map +0 -1
  1345. package/lib/module/credential/offer/02-fetch-credential-offer.js +0 -38
  1346. package/lib/module/credential/offer/02-fetch-credential-offer.js.map +0 -1
  1347. package/lib/module/credential/offer/errors.js +0 -14
  1348. package/lib/module/credential/offer/errors.js.map +0 -1
  1349. package/lib/module/credential/offer/types.js +0 -41
  1350. package/lib/module/credential/offer/types.js.map +0 -1
  1351. package/lib/module/credential/presentation/01-start-flow.js +0 -36
  1352. package/lib/module/credential/presentation/01-start-flow.js.map +0 -1
  1353. package/lib/module/credential/presentation/02-evaluate-rp-trust.js +0 -27
  1354. package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +0 -1
  1355. package/lib/module/credential/presentation/03-get-request-object.js +0 -49
  1356. package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
  1357. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +0 -25
  1358. package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +0 -1
  1359. package/lib/module/credential/presentation/05-verify-request-object.js +0 -88
  1360. package/lib/module/credential/presentation/05-verify-request-object.js.map +0 -1
  1361. package/lib/module/credential/presentation/06-fetch-presentation-definition.js +0 -32
  1362. package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +0 -1
  1363. package/lib/module/credential/presentation/07-evaluate-dcql-query.js +0 -148
  1364. package/lib/module/credential/presentation/07-evaluate-dcql-query.js.map +0 -1
  1365. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +0 -296
  1366. package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +0 -1
  1367. package/lib/module/credential/presentation/08-send-authorization-response.js +0 -239
  1368. package/lib/module/credential/presentation/08-send-authorization-response.js.map +0 -1
  1369. package/lib/module/credential/presentation/errors.js +0 -103
  1370. package/lib/module/credential/presentation/errors.js.map +0 -1
  1371. package/lib/module/credential/presentation/types.js +0 -146
  1372. package/lib/module/credential/presentation/types.js.map +0 -1
  1373. package/lib/module/credential/status/01-start-flow.js +0 -2
  1374. package/lib/module/credential/status/01-start-flow.js.map +0 -1
  1375. package/lib/module/credential/status/02-status-assertion.js +0 -72
  1376. package/lib/module/credential/status/02-status-assertion.js.map +0 -1
  1377. package/lib/module/credential/status/03-verify-and-parse-status-assertion.js +0 -78
  1378. package/lib/module/credential/status/03-verify-and-parse-status-assertion.js.map +0 -1
  1379. package/lib/module/credential/status/types.js +0 -71
  1380. package/lib/module/credential/status/types.js.map +0 -1
  1381. package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -77
  1382. package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
  1383. package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js +0 -35
  1384. package/lib/module/credentials-catalogue/fetch-and-parse-catalogue.js.map +0 -1
  1385. package/lib/module/credentials-catalogue/types.js +0 -89
  1386. package/lib/module/credentials-catalogue/types.js.map +0 -1
  1387. package/lib/module/pid/index.js +0 -3
  1388. package/lib/module/pid/index.js.map +0 -1
  1389. package/lib/module/pid/sd-jwt/converters.js +0 -19
  1390. package/lib/module/pid/sd-jwt/converters.js.map +0 -1
  1391. package/lib/module/pid/sd-jwt/index.js +0 -66
  1392. package/lib/module/pid/sd-jwt/index.js.map +0 -1
  1393. package/lib/module/pid/sd-jwt/types.js +0 -43
  1394. package/lib/module/pid/sd-jwt/types.js.map +0 -1
  1395. package/lib/module/sd-jwt/__test__/converters.test.js +0 -23
  1396. package/lib/module/sd-jwt/__test__/converters.test.js.map +0 -1
  1397. package/lib/module/sd-jwt/__test__/index.test.js +0 -132
  1398. package/lib/module/sd-jwt/__test__/index.test.js.map +0 -1
  1399. package/lib/module/sd-jwt/converters.js +0 -24
  1400. package/lib/module/sd-jwt/converters.js.map +0 -1
  1401. package/lib/module/sd-jwt/errors.js +0 -32
  1402. package/lib/module/sd-jwt/errors.js.map +0 -1
  1403. package/lib/module/sd-jwt/verifier.js +0 -17
  1404. package/lib/module/sd-jwt/verifier.js.map +0 -1
  1405. package/lib/module/trust/build-chain.js +0 -238
  1406. package/lib/module/trust/build-chain.js.map +0 -1
  1407. package/lib/module/trust/errors.js +0 -116
  1408. package/lib/module/trust/errors.js.map +0 -1
  1409. package/lib/module/trust/types.js +0 -221
  1410. package/lib/module/trust/types.js.map +0 -1
  1411. package/lib/module/trust/utils.js +0 -60
  1412. package/lib/module/trust/utils.js.map +0 -1
  1413. package/lib/module/trust/verify-chain.js +0 -179
  1414. package/lib/module/trust/verify-chain.js.map +0 -1
  1415. package/lib/module/wallet-instance-attestation/issuing.js +0 -110
  1416. package/lib/module/wallet-instance-attestation/issuing.js.map +0 -1
  1417. package/lib/module/wallet-instance-attestation/types.js +0 -58
  1418. package/lib/module/wallet-instance-attestation/types.js.map +0 -1
  1419. package/lib/typescript/credential/issuance/01-start-flow.d.ts +0 -12
  1420. package/lib/typescript/credential/issuance/01-start-flow.d.ts.map +0 -1
  1421. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
  1422. package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
  1423. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +0 -47
  1424. package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +0 -1
  1425. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +0 -79
  1426. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +0 -1
  1427. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +0 -34
  1428. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +0 -1
  1429. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +0 -36
  1430. package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +0 -1
  1431. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +0 -43
  1432. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +0 -1
  1433. package/lib/typescript/credential/issuance/errors.d.ts +0 -19
  1434. package/lib/typescript/credential/issuance/errors.d.ts.map +0 -1
  1435. package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts +0 -201
  1436. package/lib/typescript/credential/issuance/mrtd-pop/types.d.ts.map +0 -1
  1437. package/lib/typescript/credential/issuance/types.d.ts +0 -96
  1438. package/lib/typescript/credential/issuance/types.d.ts.map +0 -1
  1439. package/lib/typescript/credential/offer/01-start-flow.d.ts +0 -172
  1440. package/lib/typescript/credential/offer/01-start-flow.d.ts.map +0 -1
  1441. package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts +0 -20
  1442. package/lib/typescript/credential/offer/02-fetch-credential-offer.d.ts.map +0 -1
  1443. package/lib/typescript/credential/offer/errors.d.ts +0 -10
  1444. package/lib/typescript/credential/offer/errors.d.ts.map +0 -1
  1445. package/lib/typescript/credential/offer/types.d.ts +0 -264
  1446. package/lib/typescript/credential/offer/types.d.ts.map +0 -1
  1447. package/lib/typescript/credential/presentation/01-start-flow.d.ts +0 -39
  1448. package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +0 -1
  1449. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +0 -19
  1450. package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +0 -1
  1451. package/lib/typescript/credential/presentation/03-get-request-object.d.ts +0 -19
  1452. package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
  1453. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts +0 -23
  1454. package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +0 -1
  1455. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +0 -21
  1456. package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +0 -1
  1457. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +0 -21
  1458. package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +0 -1
  1459. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts +0 -29
  1460. package/lib/typescript/credential/presentation/07-evaluate-dcql-query.d.ts.map +0 -1
  1461. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +0 -97
  1462. package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +0 -1
  1463. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +0 -98
  1464. package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +0 -1
  1465. package/lib/typescript/credential/presentation/errors.d.ts +0 -73
  1466. package/lib/typescript/credential/presentation/errors.d.ts.map +0 -1
  1467. package/lib/typescript/credential/presentation/types.d.ts +0 -792
  1468. package/lib/typescript/credential/presentation/types.d.ts.map +0 -1
  1469. package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
  1470. package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
  1471. package/lib/typescript/credential/status/02-status-assertion.d.ts +0 -24
  1472. package/lib/typescript/credential/status/02-status-assertion.d.ts.map +0 -1
  1473. package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts +0 -22
  1474. package/lib/typescript/credential/status/03-verify-and-parse-status-assertion.d.ts.map +0 -1
  1475. package/lib/typescript/credential/status/types.d.ts +0 -782
  1476. package/lib/typescript/credential/status/types.d.ts.map +0 -1
  1477. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
  1478. package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
  1479. package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts +0 -15
  1480. package/lib/typescript/credentials-catalogue/fetch-and-parse-catalogue.d.ts.map +0 -1
  1481. package/lib/typescript/credentials-catalogue/types.d.ts +0 -844
  1482. package/lib/typescript/credentials-catalogue/types.d.ts.map +0 -1
  1483. package/lib/typescript/pid/index.d.ts +0 -3
  1484. package/lib/typescript/pid/index.d.ts.map +0 -1
  1485. package/lib/typescript/pid/sd-jwt/converters.d.ts +0 -4
  1486. package/lib/typescript/pid/sd-jwt/converters.d.ts.map +0 -1
  1487. package/lib/typescript/pid/sd-jwt/index.d.ts +0 -50
  1488. package/lib/typescript/pid/sd-jwt/index.d.ts.map +0 -1
  1489. package/lib/typescript/pid/sd-jwt/types.d.ts +0 -196
  1490. package/lib/typescript/pid/sd-jwt/types.d.ts.map +0 -1
  1491. package/lib/typescript/sd-jwt/__test__/converters.test.d.ts +0 -2
  1492. package/lib/typescript/sd-jwt/__test__/converters.test.d.ts.map +0 -1
  1493. package/lib/typescript/sd-jwt/__test__/index.test.d.ts +0 -2
  1494. package/lib/typescript/sd-jwt/__test__/index.test.d.ts.map +0 -1
  1495. package/lib/typescript/sd-jwt/converters.d.ts +0 -3
  1496. package/lib/typescript/sd-jwt/converters.d.ts.map +0 -1
  1497. package/lib/typescript/sd-jwt/errors.d.ts +0 -20
  1498. package/lib/typescript/sd-jwt/errors.d.ts.map +0 -1
  1499. package/lib/typescript/sd-jwt/verifier.d.ts +0 -3
  1500. package/lib/typescript/sd-jwt/verifier.d.ts.map +0 -1
  1501. package/lib/typescript/trust/build-chain.d.ts +0 -1299
  1502. package/lib/typescript/trust/build-chain.d.ts.map +0 -1
  1503. package/lib/typescript/trust/errors.d.ts +0 -103
  1504. package/lib/typescript/trust/errors.d.ts.map +0 -1
  1505. package/lib/typescript/trust/types.d.ts +0 -15945
  1506. package/lib/typescript/trust/types.d.ts.map +0 -1
  1507. package/lib/typescript/trust/utils.d.ts +0 -22
  1508. package/lib/typescript/trust/utils.d.ts.map +0 -1
  1509. package/lib/typescript/trust/verify-chain.d.ts +0 -39
  1510. package/lib/typescript/trust/verify-chain.d.ts.map +0 -1
  1511. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +0 -34
  1512. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +0 -1
  1513. package/lib/typescript/wallet-instance-attestation/types.d.ts +0 -715
  1514. package/lib/typescript/wallet-instance-attestation/types.d.ts.map +0 -1
  1515. package/src/credential/issuance/01-start-flow.ts +0 -11
  1516. package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -33
  1517. package/src/credential/issuance/03-start-user-authorization.ts +0 -196
  1518. package/src/credential/issuance/04-complete-user-authorization.ts +0 -372
  1519. package/src/credential/issuance/05-authorize-access.ts +0 -129
  1520. package/src/credential/issuance/06-obtain-credential.ts +0 -254
  1521. package/src/credential/issuance/07-verify-and-parse-credential.ts +0 -572
  1522. package/src/credential/issuance/errors.ts +0 -29
  1523. package/src/credential/issuance/mrtd-pop/types.ts +0 -65
  1524. package/src/credential/issuance/types.ts +0 -43
  1525. package/src/credential/offer/01-start-flow.ts +0 -89
  1526. package/src/credential/offer/02-fetch-credential-offer.ts +0 -54
  1527. package/src/credential/offer/errors.ts +0 -17
  1528. package/src/credential/offer/types.ts +0 -59
  1529. package/src/credential/presentation/01-start-flow.ts +0 -42
  1530. package/src/credential/presentation/02-evaluate-rp-trust.ts +0 -34
  1531. package/src/credential/presentation/03-get-request-object.ts +0 -61
  1532. package/src/credential/presentation/04-retrieve-rp-jwks.ts +0 -34
  1533. package/src/credential/presentation/05-verify-request-object.ts +0 -121
  1534. package/src/credential/presentation/06-fetch-presentation-definition.ts +0 -48
  1535. package/src/credential/presentation/07-evaluate-dcql-query.ts +0 -198
  1536. package/src/credential/presentation/07-evaluate-input-descriptor.ts +0 -408
  1537. package/src/credential/presentation/08-send-authorization-response.ts +0 -329
  1538. package/src/credential/presentation/errors.ts +0 -112
  1539. package/src/credential/presentation/types.ts +0 -169
  1540. package/src/credential/status/01-start-flow.ts +0 -9
  1541. package/src/credential/status/02-status-assertion.ts +0 -115
  1542. package/src/credential/status/03-verify-and-parse-status-assertion.ts +0 -110
  1543. package/src/credential/status/types.ts +0 -90
  1544. package/src/credential/trustmark/get-credential-trustmark.ts +0 -139
  1545. package/src/credentials-catalogue/fetch-and-parse-catalogue.ts +0 -54
  1546. package/src/credentials-catalogue/types.ts +0 -97
  1547. package/src/pid/index.ts +0 -2
  1548. package/src/pid/sd-jwt/converters.ts +0 -20
  1549. package/src/pid/sd-jwt/index.ts +0 -74
  1550. package/src/pid/sd-jwt/types.ts +0 -46
  1551. package/src/sd-jwt/__test__/converters.test.ts +0 -27
  1552. package/src/sd-jwt/__test__/index.test.ts +0 -152
  1553. package/src/sd-jwt/converters.ts +0 -24
  1554. package/src/sd-jwt/errors.ts +0 -39
  1555. package/src/sd-jwt/verifier.ts +0 -18
  1556. package/src/trust/build-chain.ts +0 -398
  1557. package/src/trust/errors.ts +0 -138
  1558. package/src/trust/types.ts +0 -259
  1559. package/src/trust/utils.ts +0 -70
  1560. package/src/trust/verify-chain.ts +0 -267
  1561. package/src/wallet-instance-attestation/issuing.ts +0 -164
  1562. package/src/wallet-instance-attestation/types.ts +0 -85
@@ -1 +0,0 @@
1
- {"version":3,"names":["_misc","require","_ioReactNativeJwt","_uuid","_types","_errors","_logging","_credentials","statusAssertion","issuerConf","credential","format","ctx","credentialCryptoContext","wiaCryptoContext","appFetch","fetch","jwk","extractJwkFromCredential","issuerJwk","getPublicKey","credentialHash","getCredentialHashWithouDiscloures","statusAttUrl","openid_credential_issuer","status_attestation_endpoint","credentialPop","SignJWT","setPayload","iss","kid","aud","jti","uuidv4","toString","credential_hash","credential_hash_alg","setProtectedHeader","alg","typ","setIssuedAt","setExpirationTime","sign","body","status_assertion_requests","Logger","log","LogLevel","DEBUG","result","method","headers","JSON","stringify","then","hasStatusOrThrow","raw","json","StatusAssertionResponse","parse","catch","handleStatusAssertionError","statusAttestationJwt","status_assertion_responses","exports","e","UnexpectedStatusCodeError","ResponseErrorBuilder","IssuerResponseError","handle","code","IssuerResponseErrorCodes","StatusAttestationRequestFailed","message","buildFrom"],"sourceRoot":"../../../../src","sources":["credential/status/02-status-assertion.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAMA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMO,eAAgC,GAAG,MAAAA,CAC9CC,UAAU,EACVC,UAAU,EACVC,MAAM,EACNC,GAAG,KACA;EACH,MAAM;IAAEC,uBAAuB;IAAEC,gBAAgB;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAGJ,GAAG;EAE3E,MAAMK,GAAG,GAAG,MAAM,IAAAC,qCAAwB,EAACR,UAAU,EAAEC,MAAM,CAAC;EAC9D,MAAMQ,SAAS,GAAG,MAAML,gBAAgB,CAACM,YAAY,CAAC,CAAC;EACvD,MAAMC,cAAc,GAAG,MAAM,IAAAC,uCAAiC,EAACZ,UAAU,CAAC;EAC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vD,eAAe,EAAEsD;EAAsB,CAAC;AACnD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AALAE,OAAA,CAAAxD,eAAA,GAAAA,eAAA;AAMA,MAAMqD,0BAA0B,GAAII,CAAU,IAAK;EACjD,IAAI,EAAEA,CAAC,YAAYC,iCAAyB,CAAC,EAAE;IAC7C,MAAMD,CAAC;EACT;EAEA,MAAM,IAAIE,4BAAoB,CAACC,2BAAmB,CAAC,CAChDC,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,gCAAwB,CAACC,8BAA8B;IAC7DC,OAAO,EAAG;EACZ,CAAC,CAAC,CACDC,SAAS,CAACT,CAAC,CAAC;AACjB,CAAC"}
@@ -1,85 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.verifyAndParseStatusAssertion = void 0;
7
- var _errors = require("../../utils/errors");
8
- var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
9
- var _types = require("./types");
10
- var _logging = require("../../utils/logging");
11
- var _credentials = require("../../utils/credentials");
12
- var _jwk = require("../../utils/jwk");
13
- /**
14
- * Given a status assertion, verifies that:
15
- * - It's in the supported format;
16
- * - The assertion is correctly signed;
17
- * - It's bound to the given key.
18
- * @param issuerConf The Issuer configuration returned by {@link evaluateIssuerTrust}
19
- * @param statusAssertion The encoded status assertion returned by {@link statusAssertion}
20
- * @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
21
- * @returns A parsed status assertion
22
- * @throws {IoWalletError} If the credential signature is not verified with the Issuer key set
23
- * @throws {IssuerResponseError} If the status assertion contains an error or the credential status is invalid
24
- */
25
- const verifyAndParseStatusAssertion = async (issuerConf, rawStatusAssertion, credential, format) => {
26
- const {
27
- statusAssertion
28
- } = rawStatusAssertion;
29
- await (0, _ioReactNativeJwt.verify)(statusAssertion, issuerConf.openid_credential_issuer.jwks.keys);
30
- const decodedJwt = (0, _ioReactNativeJwt.decode)(statusAssertion);
31
- const parsedStatusAssertion = _types.ParsedStatusAssertionResponse.parse({
32
- header: decodedJwt.protectedHeader,
33
- payload: decodedJwt.payload
34
- });
35
- _logging.Logger.log(_logging.LogLevel.DEBUG, `Parsed status assertion: ${JSON.stringify(parsedStatusAssertion)}`);
36
-
37
- // Errors are transmitted in the JWT and use a 200 HTTP status code
38
- if (isStatusAssertionError(parsedStatusAssertion)) {
39
- throw new _errors.IssuerResponseError({
40
- code: _errors.IssuerResponseErrorCodes.CredentialInvalidStatus,
41
- message: "The status assertion contains an error",
42
- statusCode: 200,
43
- reason: buildErrorReason(parsedStatusAssertion)
44
- });
45
- }
46
- const {
47
- cnf,
48
- credential_status_type
49
- } = parsedStatusAssertion.payload;
50
- const holderBindingKey = await (0, _credentials.extractJwkFromCredential)(credential, format);
51
- if (!(await (0, _jwk.isSameThumbprint)(cnf.jwk, holderBindingKey))) {
52
- const errorMessage = `Failed to verify holder binding for status assertion: the thumbprints of keys ${cnf.jwk.kid} and ${holderBindingKey.kid} do not match`;
53
- _logging.Logger.log(_logging.LogLevel.ERROR, errorMessage);
54
- throw new _errors.IoWalletError(errorMessage);
55
- }
56
- if (credential_status_type !== _types.StatusType.VALID) {
57
- throw new _errors.IssuerResponseError({
58
- code: _errors.IssuerResponseErrorCodes.CredentialInvalidStatus,
59
- message: "Invalid status found for the given credential",
60
- statusCode: 200,
61
- reason: buildErrorReason(parsedStatusAssertion)
62
- });
63
- }
64
- return {
65
- parsedStatusAssertion
66
- };
67
- };
68
- exports.verifyAndParseStatusAssertion = verifyAndParseStatusAssertion;
69
- const isStatusAssertionError = assertion => assertion.header.typ === "status-assertion-error+jwt";
70
-
71
- /**
72
- * Build an object containing the details on the error to use as the IssuerResponseError's reason
73
- * @param assertion The status assertion response, both success or failure
74
- * @returns The error's reason object
75
- */
76
- const buildErrorReason = _ref => {
77
- let {
78
- payload
79
- } = _ref;
80
- return "error" in payload ? payload : {
81
- error: payload.credential_status_detail.state,
82
- error_description: payload.credential_status_detail.description
83
- };
84
- };
85
- //# sourceMappingURL=03-verify-and-parse-status-assertion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_errors","require","_ioReactNativeJwt","_types","_logging","_credentials","_jwk","verifyAndParseStatusAssertion","issuerConf","rawStatusAssertion","credential","format","statusAssertion","verify","openid_credential_issuer","jwks","keys","decodedJwt","decodeJwt","parsedStatusAssertion","ParsedStatusAssertionResponse","parse","header","protectedHeader","payload","Logger","log","LogLevel","DEBUG","JSON","stringify","isStatusAssertionError","IssuerResponseError","code","IssuerResponseErrorCodes","CredentialInvalidStatus","message","statusCode","reason","buildErrorReason","cnf","credential_status_type","holderBindingKey","extractJwkFromCredential","isSameThumbprint","jwk","errorMessage","kid","ERROR","IoWalletError","StatusType","VALID","exports","assertion","typ","_ref","error","credential_status_detail","state","error_description","description"],"sourceRoot":"../../../../src","sources":["credential/status/03-verify-and-parse-status-assertion.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,6BAA4D,GACvE,MAAAA,CAAOC,UAAU,EAAEC,kBAAkB,EAAEC,UAAU,EAAEC,MAAM,KAAK;EAC5D,MAAM;IAAEC;EAAgB,CAAC,GAAGH,kBAAkB;EAE9C,MAAM,IAAAI,wBAAM,EACVD,eAAe,EACfJ,UAAU,CAACM,wBAAwB,CAACC,IAAI,CAACC,IAC3C,CAAC;EAED,MAAMC,UAAU,GAAG,IAAAC,wBAAS,EAACN,eAAe,CAAC;EAC7C,MAAMO,qBAAqB,GAAGC,oCAA6B,CAACC,KAAK,CAAC;IAChEC,MAAM,EAAEL,UAAU,CAACM,eAAe;IAClCC,OA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AA;AAEJ,MAAMwB,sBAAsB,GAC1BsB,SAAwC,IAExCA,SAAS,CAAC/B,MAAM,CAACgC,GAAG,KAAK,4BAA4B;;AAEvD;AACA;AACA;AACA;AACA;AACA,MAAMf,gBAAgB,GAAGgB,IAAA;EAAA,IAAC;IACxB/B;EAC6B,CAAC,GAAA+B,IAAA;EAAA,OAC9B,OAAO,IAAI/B,OAAO,GACdA,OAAO,GACP;IACEgC,KAAK,EAAEhC,OAAO,CAACiC,wBAAwB,CAAEC,KAAK;IAC9CC,iBAAiB,EAAEnC,OAAO,CAACiC,wBAAwB,CAAEG;EACvD,CAAC;AAAA"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.StatusType = exports.StatusAssertionResponse = exports.ParsedStatusAssertionResponse = exports.ParsedStatusAssertionError = exports.ParsedStatusAssertion = void 0;
7
- var _types = require("../../sd-jwt/types");
8
- var _jwk = require("../../utils/jwk");
9
- var z = _interopRequireWildcard(require("zod"));
10
- 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); }
11
- 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; }
12
- /**
13
- * Shape from parsing a status assertion response in case of 201.
14
- */
15
- const StatusAssertionResponse = z.object({
16
- status_assertion_responses: z.array(z.string())
17
- });
18
-
19
- /**
20
- * Type from parsing a status assertion response in case of 201.
21
- * Inferred from {@link StatusAssertionResponse}.
22
- */
23
- exports.StatusAssertionResponse = StatusAssertionResponse;
24
- /**
25
- * Shape for parsing a successful status assertion in a JWT.
26
- */
27
- const ParsedStatusAssertion = z.object({
28
- header: z.object({
29
- typ: z.literal("status-assertion+jwt"),
30
- alg: z.string(),
31
- kid: z.string().optional()
32
- }),
33
- payload: z.object({
34
- iss: z.string(),
35
- credential_status_type: z.string(),
36
- credential_status_detail: z.object({
37
- state: z.string(),
38
- description: z.string()
39
- }).optional(),
40
- credential_hash_alg: z.string(),
41
- credential_hash: z.string(),
42
- cnf: z.object({
43
- jwk: _jwk.JWK
44
- }),
45
- exp: _types.UnixTime,
46
- iat: _types.UnixTime
47
- })
48
- });
49
- exports.ParsedStatusAssertion = ParsedStatusAssertion;
50
- /**
51
- * The JWT that contains the errors occurred for the status assertion request.
52
- * @see https://italia.github.io/eid-wallet-it-docs/versione-corrente/en/credential-revocation.html#http-status-assertion-response
53
- */
54
- const ParsedStatusAssertionError = z.object({
55
- header: z.object({
56
- typ: z.literal("status-assertion-error+jwt"),
57
- alg: z.string(),
58
- kid: z.string().optional()
59
- }),
60
- payload: z.object({
61
- credential_hash_alg: z.string(),
62
- credential_hash: z.string(),
63
- error: z.string(),
64
- error_description: z.string()
65
- })
66
- });
67
-
68
- /**
69
- * The status assertion response that might include either a successful assertion or an error
70
- */
71
- exports.ParsedStatusAssertionError = ParsedStatusAssertionError;
72
- const ParsedStatusAssertionResponse = z.union([ParsedStatusAssertion, ParsedStatusAssertionError]);
73
- exports.ParsedStatusAssertionResponse = ParsedStatusAssertionResponse;
74
- let StatusType = /*#__PURE__*/function (StatusType) {
75
- StatusType["VALID"] = "0x00";
76
- StatusType["INVALID"] = "0x01";
77
- StatusType["SUSPENDED"] = "0x02";
78
- return StatusType;
79
- }({});
80
- exports.StatusType = StatusType;
81
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","StatusAssertionResponse","object","status_assertion_responses","array","string","exports","ParsedStatusAssertion","header","typ","literal","alg","kid","optional","payload","iss","credential_status_type","credential_status_detail","state","description","credential_hash_alg","credential_hash","cnf","jwk","JWK","exp","UnixTime","iat","ParsedStatusAssertionError","error","error_description","ParsedStatusAssertionResponse","union","StatusType"],"sourceRoot":"../../../../src","sources":["credential/status/types.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAyB,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,SAAAF,wBAAAM,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,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ACuD,KAAK,CAAC,CACnDzB,qBAAqB,EACrBqB,0BAA0B,CAC3B,CAAC;AAACtB,OAAA,CAAAyB,6BAAA,GAAAA,6BAAA;AAAA,IAESE,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAAA3B,OAAA,CAAA2B,UAAA,GAAAA,UAAA"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getCredentialTrustmark = void 0;
7
- var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
8
- var WalletInstanceAttestation = _interopRequireWildcard(require("../../wallet-instance-attestation"));
9
- var _errors = require("../../utils/errors");
10
- var _string = require("../../utils/string");
11
- var _logging = require("../../utils/logging");
12
- 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); }
13
- 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; }
14
- /**
15
- * Generates a trustmark signed JWT, which is used to verify the authenticity of a credential.
16
- * The public key used to sign the trustmark must the same used for the Wallet Instance Attestation.
17
- *
18
- * @param walletInstanceAttestation the Wallet Instance's attestation
19
- * @param wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
20
- * @param credentialType The type of credential for which the trustmark is generated
21
- * @param docNumber (Optional) Document number contained in the credential, if applicable
22
- * @param expirationTime (Optional) Expiration time for the trustmark, default is 2 minutes.
23
- * If a number is provided, it is interpreted as a timestamp in seconds.
24
- * If a string is provided, it is interpreted as a time span and added to the current timestamp.
25
- * @throws {IoWalletError} If the WIA is expired
26
- * @throws {IoWalletError} If the public key associated to the WIA is not the same for the CryptoContext
27
- * @throws {JWSSignatureVerificationFailed} If the WIA signature is not valid
28
- * @returns A promise containing the signed JWT and its expiration time in seconds
29
- */
30
- const getCredentialTrustmark = async _ref => {
31
- let {
32
- walletInstanceAttestation,
33
- wiaCryptoContext,
34
- credentialType,
35
- docNumber,
36
- expirationTime = "2m"
37
- } = _ref;
38
- /**
39
- * Check that the public key used to sign the trustmark is the one used for the WIA
40
- */
41
- const holderBindingKey = await wiaCryptoContext.getPublicKey();
42
- const decodedWia = WalletInstanceAttestation.decode(walletInstanceAttestation);
43
- _logging.Logger.log(_logging.LogLevel.DEBUG, `Decoded wia ${JSON.stringify(decodedWia.payload)} with holder binding key ${JSON.stringify(holderBindingKey)}`);
44
-
45
- /**
46
- * Check that the WIA is not expired
47
- */
48
- if (decodedWia.payload.exp * 1000 < Date.now()) {
49
- _logging.Logger.log(_logging.LogLevel.ERROR, `Wallet Instance Attestation expired with exp: ${decodedWia.payload.exp}`);
50
- throw new _errors.IoWalletError("Wallet Instance Attestation expired");
51
- }
52
-
53
- /**
54
- * Verify holder binding by comparing thumbprints of the WIA and the CryptoContext key
55
- */
56
- const wiaThumbprint = await (0, _ioReactNativeJwt.thumbprint)(decodedWia.payload.cnf.jwk);
57
- const cryptoContextThumbprint = await (0, _ioReactNativeJwt.thumbprint)(holderBindingKey);
58
- if (wiaThumbprint !== cryptoContextThumbprint) {
59
- _logging.Logger.log(_logging.LogLevel.ERROR, `Failed to verify holder binding for status attestation, expected thumbprint: ${cryptoContextThumbprint}, got: ${wiaThumbprint}`);
60
- throw new _errors.IoWalletError(`Failed to verify holder binding for status attestation, expected thumbprint: ${cryptoContextThumbprint}, got: ${wiaThumbprint}`);
61
- }
62
- _logging.Logger.log(_logging.LogLevel.DEBUG, `Wia thumbprint: ${wiaThumbprint} CryptoContext thumbprint: ${cryptoContextThumbprint}`);
63
-
64
- /**
65
- * Generate Trustmark signed JWT
66
- */
67
- const signedTrustmarkJwt = await new _ioReactNativeJwt.SignJWT(wiaCryptoContext).setProtectedHeader({
68
- alg: "ES256"
69
- }).setPayload({
70
- iss: walletInstanceAttestation,
71
- /**
72
- * If present, the document number is obfuscated before adding it to the payload
73
- */
74
- ...(docNumber ? {
75
- sub: (0, _string.obfuscateString)(docNumber)
76
- } : {}),
77
- subtyp: credentialType
78
- }).setIssuedAt().setExpirationTime(expirationTime).sign();
79
- const decodedTrustmark = (0, _ioReactNativeJwt.decode)(signedTrustmarkJwt);
80
- return {
81
- jwt: signedTrustmarkJwt,
82
- expirationTime: decodedTrustmark.payload.exp ?? 0
83
- };
84
- };
85
- exports.getCredentialTrustmark = getCredentialTrustmark;
86
- //# sourceMappingURL=get-credential-trustmark.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_ioReactNativeJwt","require","WalletInstanceAttestation","_interopRequireWildcard","_errors","_string","_logging","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","getCredentialTrustmark","_ref","walletInstanceAttestation","wiaCryptoContext","credentialType","docNumber","expirationTime","holderBindingKey","getPublicKey","decodedWia","decode","Logger","log","LogLevel","DEBUG","JSON","stringify","payload","exp","Date","now","ERROR","IoWalletError","wiaThumbprint","thumbprint","cnf","jwk","cryptoContextThumbprint","signedTrustmarkJwt","SignJWT","setProtectedHeader","alg","setPayload","iss","sub","obfuscateString","subtyp","setIssuedAt","setExpirationTime","sign","decodedTrustmark","decodeJwt","jwt","exports"],"sourceRoot":"../../../../src","sources":["credential/trustmark/get-credential-trustmark.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAMA,IAAAC,yBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAAuD,SAAAM,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,SAAAL,wBAAAS,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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uB,EAAE;IAC7ChB,eAAM,CAACC,GAAG,CACRC,iBAAQ,CAACQ,KAAK,EACb,gFAA+EM,uBAAwB,UAASJ,aAAc,EACjI,CAAC;IACD,MAAM,IAAID,qBAAa,CACpB,gFAA+EK,uBAAwB,UAASJ,aAAc,EACjI,CAAC;EACH;EAEAZ,eAAM,CAACC,GAAG,CACRC,iBAAQ,CAACC,KAAK,EACb,mBAAkBS,aAAc,8BAA6BI,uBAAwB,EACxF,CAAC;;EAED;AACF;AACA;EACE,MAAMC,kBAAkB,GAAG,MAAM,IAAIC,yBAAO,CAAC1B,gBAAgB,CAAC,CAC3D2B,kBAAkB,CAAC;IAClBC,GAAG,EAAE;EACP,CAAC,CAAC,CACDC,UAAU,CAAC;IACVC,GAAG,EAAE/B,yBAAyB;IAC9B;AACN;AACA;IACM,IAAIG,SAAS,GAAG;MAAE6B,GAAG,EAAE,IAAAC,uBAAe,EAAC9B,SAAS;IAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD+B,MAAM,EAAEhC;EACV,CAAC,CAAC,CACDiC,WAAW,CAAC,CAAC,CACbC,iBAAiB,CAAChC,cAAc,CAAC,CACjCiC,IAAI,CAAC,CAAC;EAET,MAAMC,gBAAgB,GAAG,IAAAC,wBAAS,EAACb,kBAAkB,CAAC;EAEtD,OAAO;IACLc,GAAG,EAAEd,kBAAkB;IACvBtB,cAAc,EAAEkC,gBAAgB,CAACvB,OAAO,CAACC,GAAG,IAAI;EAClD,CAAC;AACH,CAAC;AAACyB,OAAA,CAAA3C,sBAAA,GAAAA,sBAAA"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.fetchAndParseCatalogue = void 0;
7
- var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
8
- var _misc = require("../utils/misc");
9
- var _errors = require("../utils/errors");
10
- var _types = require("./types");
11
- var _buildChain = require("../trust/build-chain");
12
- /**
13
- * Fetch and parse the Digital Credential Catalogue from the Trust Anchor.
14
- * The catalogue's JWT signature is verified against the Trust Anchor's JWKs.
15
- *
16
- * @param trustAnchorUrl Base URL of the Trust Anchor
17
- * @param context.appFetch (optional) fetch API implementation. Default: built-in fetch
18
- * @returns The Digital Credential Catalogue payload
19
- */
20
- const fetchAndParseCatalogue = async function (trustAnchorBaseUrl) {
21
- let {
22
- appFetch = fetch
23
- } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24
- const trustAnchorConfig = await (0, _buildChain.getTrustAnchorEntityConfiguration)(trustAnchorBaseUrl);
25
- const responseText = await appFetch(`${trustAnchorConfig.payload.sub}/.well-known/credential-catalogue`, {
26
- method: "GET"
27
- }).then((0, _misc.hasStatusOrThrow)(200)).then(res => res.text());
28
- const responseJwt = (0, _ioReactNativeJwt.decode)(responseText);
29
- const catalogueKid = responseJwt.protectedHeader.kid;
30
- const trustAnchorJwk = trustAnchorConfig.payload.jwks.keys.find(jwk => jwk.kid === catalogueKid);
31
- if (!trustAnchorJwk) {
32
- throw new _errors.IoWalletError(`Could not find JWK with kid ${catalogueKid} in Trust Anchor's Entity Configuration`);
33
- }
34
- await (0, _ioReactNativeJwt.verify)(responseText, trustAnchorJwk);
35
- const parsedDigitalCredentialsCatalogue = _types.DigitalCredentialsCatalogue.parse({
36
- header: responseJwt.protectedHeader,
37
- payload: responseJwt.payload
38
- });
39
- return parsedDigitalCredentialsCatalogue.payload;
40
- };
41
- exports.fetchAndParseCatalogue = fetchAndParseCatalogue;
42
- //# sourceMappingURL=fetch-and-parse-catalogue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_buildChain","fetchAndParseCatalogue","trustAnchorBaseUrl","appFetch","fetch","arguments","length","undefined","trustAnchorConfig","getTrustAnchorEntityConfiguration","responseText","payload","sub","method","then","hasStatusOrThrow","res","text","responseJwt","decodeJwt","catalogueKid","protectedHeader","kid","trustAnchorJwk","jwks","keys","find","jwk","IoWalletError","verify","parsedDigitalCredentialsCatalogue","DigitalCredentialsCatalogue","parse","header","exports"],"sourceRoot":"../../../src","sources":["credentials-catalogue/fetch-and-parse-catalogue.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,sBAAsB,GAAG,eAAAA,CACpCC,kBAA0B,EAE0B;EAAA,IADpD;IAAEC,QAAQ,GAAGC;EAA2B,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE9C,MAAMG,iBAAiB,GACrB,MAAM,IAAAC,6CAAiC,EAACP,kBAAkB,CAAC;EAE7D,MAAMQ,YAAY,GAAG,MAAMP,QAAQ,CAChC,GAAEK,iBAAiB,CAACG,OAAO,CAACC,GAAI,mCAAkC,EACnE;IAAEC,MAAM,EAAE;EAAM,CAClB,CAAC,CACEC,IAAI,CAAC,IAAAC,sBAAgB,EAAC,GAAG,CAAC,CAAC,CAC3BD,IAAI,CAAEE,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC;EAE5B,MAAMC,WAAW,GAAG,IAAAC,wBAAS,EAACT,YAAY,CAAC;EAC3C,MAAMU,YAAY,GAAGF,WAAW,CAACG,eAAe,CAACC,GAAG;EAEpD,MAAMC,cAAc,GAAGf,iBAAiB,CAACG,OAAO,CAACa,IAAI,CAACC,IAAI,CAACC,IAAI,CAC5DC,GAAG,IAAKA,GAAG,CAACL,GAAG,KAAKF,YACvB,CAAC;EAED,IAAI,CAACG,cAAc,EAAE;IACnB,MAAM,IAAIK,qBAAa,CACpB,+BAA8BR,YAAa,yCAC9C,CAAC;EACH;EAEA,MAAM,IAAAS,wBAAM,EAACnB,YAAY,EAAEa,cAAc,CAAC;EAE1C,MAAMO,iCAAiC,GAAGC,kCAA2B,CAACC,KAAK,CAAC;IAC1EC,MAAM,EAAEf,WAAW,CAACG,eAAe;IACnCV,OAAO,EAAEO,WAAW,CAACP;EACvB,CAAC,CAAC;EAEF,OAAOmB,iCAAiC,CAACnB,OAAO;AAClD,CAAC;AAACuB,OAAA,CAAAjC,sBAAA,GAAAA,sBAAA"}
@@ -1,99 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.DigitalCredentialsCatalogue = exports.DigitalCredential = void 0;
7
- var z = _interopRequireWildcard(require("zod"));
8
- var _types = require("../sd-jwt/types");
9
- 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); }
10
- 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; }
11
- const CredentialPurpose = z.object({
12
- id: z.string(),
13
- description: z.string(),
14
- category: z.string(),
15
- subcategory: z.string(),
16
- claims_required: z.array(z.string()),
17
- claim_recommended: z.array(z.string())
18
- });
19
- const CredentialIssuer = z.object({
20
- id: z.string(),
21
- organization_name: z.string(),
22
- organization_code: z.string(),
23
- organization_country: z.string(),
24
- contacts: z.array(z.string()).optional(),
25
- homepage_uri: z.string().optional(),
26
- logo_uri: z.string().optional(),
27
- policy_uri: z.string().optional(),
28
- tos_uri: z.string().optional()
29
- });
30
- const AuthenticSource = z.object({
31
- id: z.string(),
32
- organization_name: z.string(),
33
- organization_code: z.string(),
34
- organization_country: z.string(),
35
- source_type: z.enum(["public", "private"]),
36
- contacts: z.array(z.string()).optional(),
37
- homepage_uri: z.string().optional(),
38
- logo_uri: z.string().optional(),
39
- user_information: z.string().optional()
40
- });
41
- const CredentialFormat = z.object({
42
- configuration_id: z.string(),
43
- format: z.enum(["dc+sd-jwt", "mso_mdoc"]),
44
- vct: z.string().url().optional(),
45
- docType: z.string().optional(),
46
- schema_uri: z.string().url().optional(),
47
- "schema_uri#integrity": z.string().optional()
48
- });
49
- const Claim = z.object({
50
- name: z.string(),
51
- taxonomy_ref: z.string(),
52
- display_name: z.string()
53
- });
54
- const DigitalCredential = z.object({
55
- version: z.string(),
56
- credential_type: z.string(),
57
- legal_type: z.string(),
58
- name: z.string(),
59
- description: z.string(),
60
- validity_info: z.object({
61
- max_validity_days: z.number(),
62
- status_methods: z.array(z.string()),
63
- allowed_states: z.array(z.string())
64
- }),
65
- authentication: z.object({
66
- user_auth_required: z.boolean(),
67
- min_loa: z.string(),
68
- supported_eid_schemes: z.array(z.string())
69
- }),
70
- purposes: z.array(CredentialPurpose),
71
- issuers: z.array(CredentialIssuer),
72
- authentic_sources: z.array(AuthenticSource),
73
- formats: z.array(CredentialFormat),
74
- claims: z.array(Claim)
75
- });
76
-
77
- /**
78
- * The Digital Credentials Catalogue published by the Trust Anchor
79
- *
80
- * @version 1.1.0
81
- * @see https://italia.github.io/eid-wallet-it-docs/releases/1.1.0/en/registry-catalogue.html
82
- */
83
- exports.DigitalCredential = DigitalCredential;
84
- const DigitalCredentialsCatalogue = z.object({
85
- header: z.object({
86
- typ: z.string(),
87
- alg: z.string(),
88
- kid: z.string()
89
- }),
90
- payload: z.object({
91
- catalog_version: z.string(),
92
- taxonomy_uri: z.string().url(),
93
- credentials: z.array(DigitalCredential),
94
- iat: _types.UnixTime,
95
- exp: _types.UnixTime
96
- })
97
- });
98
- exports.DigitalCredentialsCatalogue = DigitalCredentialsCatalogue;
99
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["z","_interopRequireWildcard","require","_types","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","CredentialPurpose","object","id","string","description","category","subcategory","claims_required","array","claim_recommended","CredentialIssuer","organization_name","organization_code","organization_country","contacts","optional","homepage_uri","logo_uri","policy_uri","tos_uri","AuthenticSource","source_type","enum","user_information","CredentialFormat","configuration_id","format","vct","url","docType","schema_uri","Claim","name","taxonomy_ref","display_name","DigitalCredential","version","credential_type","legal_type","validity_info","max_validity_days","number","status_methods","allowed_states","authentication","user_auth_required","boolean","min_loa","supported_eid_schemes","purposes","issuers","authentic_sources","formats","claims","exports","DigitalCredentialsCatalogue","header","typ","alg","kid","payload","catalog_version","taxonomy_uri","credentials","iat","UnixTime","exp"],"sourceRoot":"../../../src","sources":["credentials-catalogue/types.ts"],"mappings":";;;;;;AAAA,IAAAA,CAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAA2C,SAAAE,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,SAAAJ,wBAAAQ,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,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,GAAG,EAAEnF,CAAC,CAAC6B,MAAM,CAAC,CAAC;IACfuD,GAAG,EAAEpF,CAAC,CAAC6B,MAAM,CAAC,CAAC;IACfwD,GAAG,EAAErF,CAAC,CAAC6B,MAAM,CAAC;EAChB,CAAC,CAAC;EACFyD,OAAO,EAAEtF,CAAC,CAAC2B,MAAM,CAAC;IAChB4D,eAAe,EAAEvF,CAAC,CAAC6B,MAAM,CAAC,CAAC;IAC3B2D,YAAY,EAAExF,CAAC,CAAC6B,MAAM,CAAC,CAAC,CAACyB,GAAG,CAAC,CAAC;IAC9BmC,WAAW,EAAEzF,CAAC,CAACkC,KAAK,CAAC2B,iBAAiB,CAAC;IACvC6B,GAAG,EAAEC,eAAQ;IACbC,GAAG,EAAED;EACP,CAAC;AACH,CAAC,CAAC;AAACX,OAAA,CAAAC,2BAAA,GAAAA,2BAAA"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SdJwt = void 0;
7
- var SdJwt = _interopRequireWildcard(require("./sd-jwt"));
8
- exports.SdJwt = SdJwt;
9
- 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); }
10
- 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; }
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SdJwt","_interopRequireWildcard","require","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":["pid/index.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkCC,OAAA,CAAAH,KAAA,GAAAA,KAAA;AAAA,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,SAAAJ,wBAAAQ,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,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pidFromToken = pidFromToken;
7
- var _converters = require("../../sd-jwt/converters");
8
- var _types = require("./types");
9
- function pidFromToken(sdJwt, disclosures) {
10
- const placeOfBirth = (0, _converters.getValueFromDisclosures)(disclosures, "place_of_birth");
11
- return _types.PID.parse({
12
- issuer: sdJwt.payload.iss,
13
- issuedAt: new Date((0, _converters.getValueFromDisclosures)(disclosures, "iat") * 1000),
14
- expiration: new Date(sdJwt.payload.exp * 1000),
15
- claims: {
16
- uniqueId: (0, _converters.getValueFromDisclosures)(disclosures, "unique_id"),
17
- givenName: (0, _converters.getValueFromDisclosures)(disclosures, "given_name"),
18
- familyName: (0, _converters.getValueFromDisclosures)(disclosures, "family_name"),
19
- birthDate: (0, _converters.getValueFromDisclosures)(disclosures, "birth_date"),
20
- ...(placeOfBirth && placeOfBirth),
21
- taxIdCode: (0, _converters.getValueFromDisclosures)(disclosures, "tax_id_code")
22
- }
23
- });
24
- }
25
- //# sourceMappingURL=converters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_converters","require","_types","pidFromToken","sdJwt","disclosures","placeOfBirth","getValueFromDisclosures","PID","parse","issuer","payload","iss","issuedAt","Date","expiration","exp","claims","uniqueId","givenName","familyName","birthDate","taxIdCode"],"sourceRoot":"../../../../src","sources":["pid/sd-jwt/converters.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEO,SAASE,YAAYA,CAACC,KAAe,EAAEC,WAAyB,EAAO;EAC5E,MAAMC,YAAY,GAAG,IAAAC,mCAAuB,EAACF,WAAW,EAAE,gBAAgB,CAAC;EAC3E,OAAOG,UAAG,CAACC,KAAK,CAAC;IACfC,MAAM,EAAEN,KAAK,CAACO,OAAO,CAACC,GAAG;IACzBC,QAAQ,EAAE,IAAIC,IAAI,CAAC,IAAAP,mCAAuB,EAACF,WAAW,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;IACtEU,UAAU,EAAE,IAAID,IAAI,CAACV,KAAK,CAACO,OAAO,CAACK,GAAG,GAAG,IAAI,CAAC;IAC9CC,MAAM,EAAE;MACNC,QAAQ,EAAE,IAAAX,mCAAuB,EAACF,WAAW,EAAE,WAAW,CAAC;MAC3Dc,SAAS,EAAE,IAAAZ,mCAAuB,EAACF,WAAW,EAAE,YAAY,CAAC;MAC7De,UAAU,EAAE,IAAAb,mCAAuB,EAACF,WAAW,EAAE,aAAa,CAAC;MAC/DgB,SAAS,EAAE,IAAAd,mCAAuB,EAACF,WAAW,EAAE,YAAY,CAAC;MAC7D,IAAIC,YAAY,IAAIA,YAAY,CAAC;MACjCgB,SAAS,EAAE,IAAAf,mCAAuB,EAACF,WAAW,EAAE,aAAa;IAC/D;EACF,CAAC,CAAC;AACJ"}
@@ -1,77 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "PID", {
7
- enumerable: true,
8
- get: function () {
9
- return _types2.PID;
10
- }
11
- });
12
- exports.decode = decode;
13
- exports.verify = verify;
14
- var _sdJwt = require("../../sd-jwt");
15
- var _converters = require("./converters");
16
- var _types = require("../../sd-jwt/types");
17
- var _types2 = require("./types");
18
- /**
19
- * Decode a given SD-JWT with Disclosures to get the parsed PID object they define.
20
- * It ensures provided data is in a valid shape.
21
- *
22
- * It DOES NOT verify token signature nor check disclosures are correctly referenced by the SD-JWT.
23
- * Use {@link verify} instead
24
- *
25
- * @function
26
- * @param token The encoded token that represents a valid sd-jwt for verifiable credentials
27
- *
28
- * @returns The validated PID object along with the parsed SD-JWT token and the parsed disclosures
29
- * @throws A decoding error if the token doesn't resolve in a valid SD-JWT
30
- * @throws A validation error if the provided data doesn't result in a valid PID
31
- *
32
- */
33
- function decode(token) {
34
- let {
35
- sdJwt,
36
- disclosures: disclosuresWithOriginal
37
- } = (0, _sdJwt.decode)(token, _types.SdJwt4VC);
38
- const disclosures = disclosuresWithOriginal.map(d => d.decoded);
39
- const pid = (0, _converters.pidFromToken)(sdJwt, disclosures);
40
- return {
41
- pid,
42
- sdJwt,
43
- disclosures
44
- };
45
- }
46
-
47
- /**
48
- * Verify a given SD-JWT with Disclosures to get the parsed PID object they define.
49
- * Same as {@link decode} plus:
50
- * - token signature verification
51
- * - ensure disclosures are well-defined inside the SD-JWT
52
- *
53
- * @async @function
54
- *
55
- * @todo implement signature validation
56
- * @todo check disclosures in sd-jwt
57
- *
58
- * @param token The encoded token that represents a valid sd-jwt for verifiable credentials
59
- *
60
- * @returns {VerifyResult} The validated PID object along with the parsed SD-JWT token and the parsed disclosures
61
- * @throws A decoding error if the token doesn't resolve in a valid SD-JWT
62
- * @throws A validation error if the provided data doesn't result in a valid PID
63
- * @throws A validation error if the provided disclosures are not defined in the SD-JWT
64
- * @throws Invalid signature error if the token signature is not valid
65
- *
66
- */
67
- async function verify(token) {
68
- const decoded = decode(token);
69
- const publicKey = decoded.sdJwt.payload.cnf.jwk;
70
- await (0, _sdJwt.verify)(token, publicKey, _types.SdJwt4VC);
71
- return decoded;
72
- }
73
-
74
- /**
75
- * Result object for {@link verify}
76
- */
77
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_sdJwt","require","_converters","_types","_types2","decode","token","sdJwt","disclosures","disclosuresWithOriginal","decodeJwt","SdJwt4VC","map","d","decoded","pid","pidFromToken","verify","publicKey","payload","cnf","jwk","verifyJwt"],"sourceRoot":"../../../../src","sources":["pid/sd-jwt/index.ts"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAsEA,IAAAG,OAAA,GAAAH,OAAA;AApEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,MAAMA,CAACC,KAAa,EAAgB;EAClD,IAAI;IAAEC,KAAK;IAAEC,WAAW,EAAEC;EAAwB,CAAC,GAAG,IAAAC,aAAS,EAC7DJ,KAAK,EACLK,eACF,CAAC;EACD,MAAMH,WAAW,GAAGC,uBAAuB,CAACG,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,OAAO,CAAC;EACjE,MAAMC,GAAG,GAAG,IAAAC,wBAAY,EAACT,KAAK,EAAEC,WAAW,CAAC;EAE5C,OAAO;IAAEO,GAAG;IAAER,KAAK;IAAEC;EAAY,CAAC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeS,MAAMA,CAACX,KAAa,EAAyB;EACjE,MAAMQ,OAAO,GAAGT,MAAM,CAACC,KAAK,CAAC;EAC7B,MAAMY,SAAS,GAAGJ,OAAO,CAACP,KAAK,CAACY,OAAO,CAACC,GAAG,CAACC,GAAG;EAC/C,MAAM,IAAAC,aAAS,EAAChB,KAAK,EAAEY,SAAS,EAAEP,eAAQ,CAAC;EAE3C,OAAOG,OAAO;AAChB;;AAWA;AACA;AACA"}