@credo-ts/openid4vc 0.6.1-pr-2091-20241119140918 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/build/OpenId4VcApi.d.mts +24 -0
  2. package/build/OpenId4VcApi.d.mts.map +1 -0
  3. package/build/OpenId4VcApi.mjs +35 -0
  4. package/build/OpenId4VcApi.mjs.map +1 -0
  5. package/build/OpenId4VcModule.d.mts +30 -0
  6. package/build/OpenId4VcModule.d.mts.map +1 -0
  7. package/build/OpenId4VcModule.mjs +42 -0
  8. package/build/OpenId4VcModule.mjs.map +1 -0
  9. package/build/OpenId4VcModuleConfig.d.mts +44 -0
  10. package/build/OpenId4VcModuleConfig.d.mts.map +1 -0
  11. package/build/OpenId4VcModuleConfig.mjs +24 -0
  12. package/build/OpenId4VcModuleConfig.mjs.map +1 -0
  13. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
  14. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
  15. package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
  16. package/build/index.d.mts +42 -0
  17. package/build/index.mjs +37 -0
  18. package/build/openid4vc-holder/OpenId4VcHolderApi.d.mts +238 -0
  19. package/build/openid4vc-holder/OpenId4VcHolderApi.d.mts.map +1 -0
  20. package/build/openid4vc-holder/OpenId4VcHolderApi.mjs +174 -0
  21. package/build/openid4vc-holder/OpenId4VcHolderApi.mjs.map +1 -0
  22. package/build/openid4vc-holder/OpenId4VcHolderModule.d.mts +17 -0
  23. package/build/openid4vc-holder/OpenId4VcHolderModule.d.mts.map +1 -0
  24. package/build/openid4vc-holder/OpenId4VcHolderModule.mjs +23 -0
  25. package/build/openid4vc-holder/OpenId4VcHolderModule.mjs.map +1 -0
  26. package/build/openid4vc-holder/OpenId4VciHolderService.d.mts +69 -0
  27. package/build/openid4vc-holder/OpenId4VciHolderService.d.mts.map +1 -0
  28. package/build/openid4vc-holder/OpenId4VciHolderService.mjs +751 -0
  29. package/build/openid4vc-holder/OpenId4VciHolderService.mjs.map +1 -0
  30. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.mts +398 -0
  31. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.mts.map +1 -0
  32. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.mjs +16 -0
  33. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.mjs.map +1 -0
  34. package/build/openid4vc-holder/OpenId4vpHolderService.d.mts +130 -0
  35. package/build/openid4vc-holder/OpenId4vpHolderService.d.mts.map +1 -0
  36. package/build/openid4vc-holder/OpenId4vpHolderService.mjs +278 -0
  37. package/build/openid4vc-holder/OpenId4vpHolderService.mjs.map +1 -0
  38. package/build/openid4vc-holder/OpenId4vpHolderServiceOptions.d.mts +112 -0
  39. package/build/openid4vc-holder/OpenId4vpHolderServiceOptions.d.mts.map +1 -0
  40. package/build/openid4vc-holder/index.d.mts +6 -0
  41. package/build/openid4vc-holder/index.mjs +5 -0
  42. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.mts +16 -0
  43. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.mts.map +1 -0
  44. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.mjs +18 -0
  45. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.mjs.map +1 -0
  46. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.mts +137 -0
  47. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.mts.map +1 -0
  48. package/build/openid4vc-issuer/OpenId4VcIssuerApi.mjs +108 -0
  49. package/build/openid4vc-issuer/OpenId4VcIssuerApi.mjs.map +1 -0
  50. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.mts +19 -0
  51. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.mts.map +1 -0
  52. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.mjs +9 -0
  53. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.mjs.map +1 -0
  54. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.mts +27 -0
  55. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.mts.map +1 -0
  56. package/build/openid4vc-issuer/OpenId4VcIssuerModule.mjs +150 -0
  57. package/build/openid4vc-issuer/OpenId4VcIssuerModule.mjs.map +1 -0
  58. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.mts +279 -0
  59. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.mts.map +1 -0
  60. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.mjs +179 -0
  61. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.mjs.map +1 -0
  62. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.mts +182 -0
  63. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.mts.map +1 -0
  64. package/build/openid4vc-issuer/OpenId4VcIssuerService.mjs +881 -0
  65. package/build/openid4vc-issuer/OpenId4VcIssuerService.mjs.map +1 -0
  66. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.mts +340 -0
  67. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.mts.map +1 -0
  68. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.mjs +1 -0
  69. package/build/openid4vc-issuer/index.d.mts +11 -0
  70. package/build/openid4vc-issuer/index.mjs +11 -0
  71. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.mts +300 -0
  72. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.mts.map +1 -0
  73. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.mjs +102 -0
  74. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.mjs.map +1 -0
  75. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.mts +10 -0
  76. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.mts.map +1 -0
  77. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.mjs +22 -0
  78. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.mjs.map +1 -0
  79. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.mts +84 -0
  80. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.mts.map +1 -0
  81. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.mjs +89 -0
  82. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.mjs.map +1 -0
  83. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.mts +12 -0
  84. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.mts.map +1 -0
  85. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs +28 -0
  86. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.mjs.map +1 -0
  87. package/build/openid4vc-issuer/repository/index.d.mts +4 -0
  88. package/build/openid4vc-issuer/repository/index.mjs +4 -0
  89. package/build/openid4vc-issuer/router/accessTokenEndpoint.mjs +199 -0
  90. package/build/openid4vc-issuer/router/accessTokenEndpoint.mjs.map +1 -0
  91. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.mjs +241 -0
  92. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.mjs.map +1 -0
  93. package/build/openid4vc-issuer/router/authorizationEndpoint.mjs +51 -0
  94. package/build/openid4vc-issuer/router/authorizationEndpoint.mjs.map +1 -0
  95. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.mjs +25 -0
  96. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.mjs.map +1 -0
  97. package/build/openid4vc-issuer/router/credentialEndpoint.mjs +142 -0
  98. package/build/openid4vc-issuer/router/credentialEndpoint.mjs.map +1 -0
  99. package/build/openid4vc-issuer/router/credentialOfferEndpoint.mjs +38 -0
  100. package/build/openid4vc-issuer/router/credentialOfferEndpoint.mjs.map +1 -0
  101. package/build/openid4vc-issuer/router/deferredCredentialEndpoint.mjs +84 -0
  102. package/build/openid4vc-issuer/router/deferredCredentialEndpoint.mjs.map +1 -0
  103. package/build/openid4vc-issuer/router/index.mjs +12 -0
  104. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.mjs +43 -0
  105. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.mjs.map +1 -0
  106. package/build/openid4vc-issuer/router/jwksEndpoint.mjs +18 -0
  107. package/build/openid4vc-issuer/router/jwksEndpoint.mjs.map +1 -0
  108. package/build/openid4vc-issuer/router/nonceEndpoint.mjs +29 -0
  109. package/build/openid4vc-issuer/router/nonceEndpoint.mjs.map +1 -0
  110. package/build/openid4vc-issuer/router/pushedAuthorizationRequestEndpoint.mjs +164 -0
  111. package/build/openid4vc-issuer/router/pushedAuthorizationRequestEndpoint.mjs.map +1 -0
  112. package/build/openid4vc-issuer/router/redirectEndpoint.mjs +124 -0
  113. package/build/openid4vc-issuer/router/redirectEndpoint.mjs.map +1 -0
  114. package/build/openid4vc-issuer/util/txCode.mjs +18 -0
  115. package/build/openid4vc-issuer/util/txCode.mjs.map +1 -0
  116. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.mts +10 -0
  117. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.mts.map +1 -0
  118. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.mjs +12 -0
  119. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.mjs.map +1 -0
  120. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.mts +60 -0
  121. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.mts.map +1 -0
  122. package/build/openid4vc-verifier/OpenId4VcVerifierApi.mjs +83 -0
  123. package/build/openid4vc-verifier/OpenId4VcVerifierApi.mjs.map +1 -0
  124. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.mts +19 -0
  125. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.mts.map +1 -0
  126. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.mjs +9 -0
  127. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.mjs.map +1 -0
  128. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.mts +25 -0
  129. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.mts.map +1 -0
  130. package/build/openid4vc-verifier/OpenId4VcVerifierModule.mjs +91 -0
  131. package/build/openid4vc-verifier/OpenId4VcVerifierModule.mjs.map +1 -0
  132. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.mts +55 -0
  133. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.mts.map +1 -0
  134. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.mjs +36 -0
  135. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.mjs.map +1 -0
  136. package/build/openid4vc-verifier/OpenId4VpVerifierService.d.mts +60 -0
  137. package/build/openid4vc-verifier/OpenId4VpVerifierService.d.mts.map +1 -0
  138. package/build/openid4vc-verifier/OpenId4VpVerifierService.mjs +714 -0
  139. package/build/openid4vc-verifier/OpenId4VpVerifierService.mjs.map +1 -0
  140. package/build/openid4vc-verifier/OpenId4VpVerifierServiceOptions.d.mts +194 -0
  141. package/build/openid4vc-verifier/OpenId4VpVerifierServiceOptions.d.mts.map +1 -0
  142. package/build/openid4vc-verifier/index.d.mts +12 -0
  143. package/build/openid4vc-verifier/index.mjs +11 -0
  144. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.mts +129 -0
  145. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.mts.map +1 -0
  146. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.mjs +64 -0
  147. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.mjs.map +1 -0
  148. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.mts +10 -0
  149. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.mts.map +1 -0
  150. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.mjs +22 -0
  151. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.mjs.map +1 -0
  152. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.mts +33 -0
  153. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.mts.map +1 -0
  154. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.mjs +32 -0
  155. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.mjs.map +1 -0
  156. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.mts +12 -0
  157. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.mts.map +1 -0
  158. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.mjs +28 -0
  159. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.mjs.map +1 -0
  160. package/build/openid4vc-verifier/repository/index.d.mts +4 -0
  161. package/build/openid4vc-verifier/repository/index.mjs +4 -0
  162. package/build/openid4vc-verifier/router/authorizationEndpoint.mjs +117 -0
  163. package/build/openid4vc-verifier/router/authorizationEndpoint.mjs.map +1 -0
  164. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.mjs +39 -0
  165. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.mjs.map +1 -0
  166. package/build/openid4vc-verifier/router/index.mjs +1 -0
  167. package/build/shared/callbacks.d.mts +47 -0
  168. package/build/shared/callbacks.d.mts.map +1 -0
  169. package/build/shared/callbacks.mjs +279 -0
  170. package/build/shared/callbacks.mjs.map +1 -0
  171. package/build/shared/index.d.mts +7 -0
  172. package/build/shared/index.mjs +4 -0
  173. package/build/shared/issuerMetadataUtils.d.mts +22 -0
  174. package/build/shared/issuerMetadataUtils.d.mts.map +1 -0
  175. package/build/shared/issuerMetadataUtils.mjs +30 -0
  176. package/build/shared/issuerMetadataUtils.mjs.map +1 -0
  177. package/build/shared/models/CredentialHolderBinding.d.mts +71 -0
  178. package/build/shared/models/CredentialHolderBinding.d.mts.map +1 -0
  179. package/build/shared/models/CredentialHolderBinding.mjs +1 -0
  180. package/build/shared/models/OpenId4VcJwtIssuer.d.mts +46 -0
  181. package/build/shared/models/OpenId4VcJwtIssuer.d.mts.map +1 -0
  182. package/build/shared/models/OpenId4VcJwtIssuer.mjs +1 -0
  183. package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.mts +71 -0
  184. package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.mts.map +1 -0
  185. package/build/shared/models/OpenId4VciCredentialFormatProfile.d.mts +12 -0
  186. package/build/shared/models/OpenId4VciCredentialFormatProfile.d.mts.map +1 -0
  187. package/build/shared/models/OpenId4VciCredentialFormatProfile.mjs +14 -0
  188. package/build/shared/models/OpenId4VciCredentialFormatProfile.mjs.map +1 -0
  189. package/build/shared/models/index.d.mts +30 -0
  190. package/build/shared/models/index.d.mts.map +1 -0
  191. package/build/shared/models/index.mjs +6 -0
  192. package/build/shared/router/context.mjs +52 -0
  193. package/build/shared/router/context.mjs.map +1 -0
  194. package/build/shared/router/express.browser.d.mts +5 -0
  195. package/build/shared/router/express.browser.d.mts.map +1 -0
  196. package/build/shared/router/express.browser.mjs +8 -0
  197. package/build/shared/router/express.browser.mjs.map +1 -0
  198. package/build/shared/router/express.mjs +10 -0
  199. package/build/shared/router/express.mjs.map +1 -0
  200. package/build/shared/router/express.native.d.mts +5 -0
  201. package/build/shared/router/express.native.d.mts.map +1 -0
  202. package/build/shared/router/express.native.mjs +8 -0
  203. package/build/shared/router/express.native.mjs.map +1 -0
  204. package/build/shared/router/index.mjs +3 -0
  205. package/build/shared/router/tenants.mjs +36 -0
  206. package/build/shared/router/tenants.mjs.map +1 -0
  207. package/build/shared/transactionData.mjs +19 -0
  208. package/build/shared/transactionData.mjs.map +1 -0
  209. package/build/shared/utils.mjs +90 -0
  210. package/build/shared/utils.mjs.map +1 -0
  211. package/package.json +30 -23
  212. package/build/index.d.ts +0 -4
  213. package/build/index.js +0 -21
  214. package/build/index.js.map +0 -1
  215. package/build/openid4vc-holder/OpenId4VcHolderApi.d.ts +0 -124
  216. package/build/openid4vc-holder/OpenId4VcHolderApi.js +0 -155
  217. package/build/openid4vc-holder/OpenId4VcHolderApi.js.map +0 -1
  218. package/build/openid4vc-holder/OpenId4VcHolderModule.d.ts +0 -13
  219. package/build/openid4vc-holder/OpenId4VcHolderModule.js +0 -35
  220. package/build/openid4vc-holder/OpenId4VcHolderModule.js.map +0 -1
  221. package/build/openid4vc-holder/OpenId4VciHolderService.d.ts +0 -72
  222. package/build/openid4vc-holder/OpenId4VciHolderService.js +0 -569
  223. package/build/openid4vc-holder/OpenId4VciHolderService.js.map +0 -1
  224. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.d.ts +0 -238
  225. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js +0 -14
  226. package/build/openid4vc-holder/OpenId4VciHolderServiceOptions.js.map +0 -1
  227. package/build/openid4vc-holder/OpenId4vcSiopHolderService.d.ts +0 -32
  228. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js +0 -302
  229. package/build/openid4vc-holder/OpenId4vcSiopHolderService.js.map +0 -1
  230. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.d.ts +0 -38
  231. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.js +0 -3
  232. package/build/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.js.map +0 -1
  233. package/build/openid4vc-holder/index.d.ts +0 -6
  234. package/build/openid4vc-holder/index.js +0 -23
  235. package/build/openid4vc-holder/index.js.map +0 -1
  236. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.d.ts +0 -12
  237. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.js +0 -19
  238. package/build/openid4vc-issuer/OpenId4VcIssuanceSessionState.js.map +0 -1
  239. package/build/openid4vc-issuer/OpenId4VcIssuerApi.d.ts +0 -101
  240. package/build/openid4vc-issuer/OpenId4VcIssuerApi.js +0 -110
  241. package/build/openid4vc-issuer/OpenId4VcIssuerApi.js.map +0 -1
  242. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.d.ts +0 -13
  243. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.js +0 -8
  244. package/build/openid4vc-issuer/OpenId4VcIssuerEvents.js.map +0 -1
  245. package/build/openid4vc-issuer/OpenId4VcIssuerModule.d.ts +0 -21
  246. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js +0 -121
  247. package/build/openid4vc-issuer/OpenId4VcIssuerModule.js.map +0 -1
  248. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.d.ts +0 -190
  249. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js +0 -141
  250. package/build/openid4vc-issuer/OpenId4VcIssuerModuleConfig.js.map +0 -1
  251. package/build/openid4vc-issuer/OpenId4VcIssuerService.d.ts +0 -116
  252. package/build/openid4vc-issuer/OpenId4VcIssuerService.js +0 -698
  253. package/build/openid4vc-issuer/OpenId4VcIssuerService.js.map +0 -1
  254. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.d.ts +0 -229
  255. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.js +0 -3
  256. package/build/openid4vc-issuer/OpenId4VcIssuerServiceOptions.js.map +0 -1
  257. package/build/openid4vc-issuer/index.d.ts +0 -8
  258. package/build/openid4vc-issuer/index.js +0 -27
  259. package/build/openid4vc-issuer/index.js.map +0 -1
  260. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.d.ts +0 -160
  261. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js +0 -88
  262. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRecord.js.map +0 -1
  263. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.d.ts +0 -5
  264. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.js +0 -29
  265. package/build/openid4vc-issuer/repository/OpenId4VcIssuanceSessionRepository.js.map +0 -1
  266. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.d.ts +0 -56
  267. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js +0 -83
  268. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRecord.js.map +0 -1
  269. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.d.ts +0 -8
  270. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.js +0 -35
  271. package/build/openid4vc-issuer/repository/OpenId4VcIssuerRepository.js.map +0 -1
  272. package/build/openid4vc-issuer/repository/index.d.ts +0 -4
  273. package/build/openid4vc-issuer/repository/index.js +0 -21
  274. package/build/openid4vc-issuer/repository/index.js.map +0 -1
  275. package/build/openid4vc-issuer/router/accessTokenEndpoint.d.ts +0 -5
  276. package/build/openid4vc-issuer/router/accessTokenEndpoint.js +0 -164
  277. package/build/openid4vc-issuer/router/accessTokenEndpoint.js.map +0 -1
  278. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.d.ts +0 -3
  279. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js +0 -213
  280. package/build/openid4vc-issuer/router/authorizationChallengeEndpoint.js.map +0 -1
  281. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.d.ts +0 -6
  282. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js +0 -25
  283. package/build/openid4vc-issuer/router/authorizationServerMetadataEndpoint.js.map +0 -1
  284. package/build/openid4vc-issuer/router/credentialEndpoint.d.ts +0 -3
  285. package/build/openid4vc-issuer/router/credentialEndpoint.js +0 -176
  286. package/build/openid4vc-issuer/router/credentialEndpoint.js.map +0 -1
  287. package/build/openid4vc-issuer/router/credentialOfferEndpoint.d.ts +0 -3
  288. package/build/openid4vc-issuer/router/credentialOfferEndpoint.js +0 -45
  289. package/build/openid4vc-issuer/router/credentialOfferEndpoint.js.map +0 -1
  290. package/build/openid4vc-issuer/router/index.d.ts +0 -9
  291. package/build/openid4vc-issuer/router/index.js +0 -20
  292. package/build/openid4vc-issuer/router/index.js.map +0 -1
  293. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.d.ts +0 -2
  294. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js +0 -26
  295. package/build/openid4vc-issuer/router/issuerMetadataEndpoint.js.map +0 -1
  296. package/build/openid4vc-issuer/router/jwksEndpoint.d.ts +0 -3
  297. package/build/openid4vc-issuer/router/jwksEndpoint.js +0 -20
  298. package/build/openid4vc-issuer/router/jwksEndpoint.js.map +0 -1
  299. package/build/openid4vc-issuer/router/nonceEndpoint.d.ts +0 -3
  300. package/build/openid4vc-issuer/router/nonceEndpoint.js +0 -26
  301. package/build/openid4vc-issuer/router/nonceEndpoint.js.map +0 -1
  302. package/build/openid4vc-issuer/router/requestContext.d.ts +0 -5
  303. package/build/openid4vc-issuer/router/requestContext.js +0 -3
  304. package/build/openid4vc-issuer/router/requestContext.js.map +0 -1
  305. package/build/openid4vc-issuer/util/txCode.d.ts +0 -3
  306. package/build/openid4vc-issuer/util/txCode.js +0 -18
  307. package/build/openid4vc-issuer/util/txCode.js.map +0 -1
  308. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.d.ts +0 -55
  309. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js +0 -498
  310. package/build/openid4vc-verifier/OpenId4VcSiopVerifierService.js.map +0 -1
  311. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.d.ts +0 -77
  312. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.js +0 -3
  313. package/build/openid4vc-verifier/OpenId4VcSiopVerifierServiceOptions.js.map +0 -1
  314. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.d.ts +0 -6
  315. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.js +0 -11
  316. package/build/openid4vc-verifier/OpenId4VcVerificationSessionState.js.map +0 -1
  317. package/build/openid4vc-verifier/OpenId4VcVerifierApi.d.ts +0 -61
  318. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js +0 -108
  319. package/build/openid4vc-verifier/OpenId4VcVerifierApi.js.map +0 -1
  320. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.d.ts +0 -13
  321. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.js +0 -8
  322. package/build/openid4vc-verifier/OpenId4VcVerifierEvents.js.map +0 -1
  323. package/build/openid4vc-verifier/OpenId4VcVerifierModule.d.ts +0 -21
  324. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js +0 -109
  325. package/build/openid4vc-verifier/OpenId4VcVerifierModule.js.map +0 -1
  326. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.d.ts +0 -31
  327. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js +0 -28
  328. package/build/openid4vc-verifier/OpenId4VcVerifierModuleConfig.js.map +0 -1
  329. package/build/openid4vc-verifier/index.d.ts +0 -8
  330. package/build/openid4vc-verifier/index.js +0 -25
  331. package/build/openid4vc-verifier/index.js.map +0 -1
  332. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.d.ts +0 -49
  333. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js +0 -234
  334. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.js.map +0 -1
  335. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.d.ts +0 -19
  336. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js +0 -146
  337. package/build/openid4vc-verifier/repository/OpenId4VcRelyingPartySessionManager.js.map +0 -1
  338. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.d.ts +0 -71
  339. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js +0 -46
  340. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRecord.js.map +0 -1
  341. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.d.ts +0 -5
  342. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.js +0 -29
  343. package/build/openid4vc-verifier/repository/OpenId4VcVerificationSessionRepository.js.map +0 -1
  344. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.d.ts +0 -29
  345. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js +0 -29
  346. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRecord.js.map +0 -1
  347. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.d.ts +0 -8
  348. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.js +0 -35
  349. package/build/openid4vc-verifier/repository/OpenId4VcVerifierRepository.js.map +0 -1
  350. package/build/openid4vc-verifier/repository/index.d.ts +0 -4
  351. package/build/openid4vc-verifier/repository/index.js +0 -21
  352. package/build/openid4vc-verifier/repository/index.js.map +0 -1
  353. package/build/openid4vc-verifier/router/authorizationEndpoint.d.ts +0 -11
  354. package/build/openid4vc-verifier/router/authorizationEndpoint.js +0 -102
  355. package/build/openid4vc-verifier/router/authorizationEndpoint.js.map +0 -1
  356. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.d.ts +0 -11
  357. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js +0 -63
  358. package/build/openid4vc-verifier/router/authorizationRequestEndpoint.js.map +0 -1
  359. package/build/openid4vc-verifier/router/index.d.ts +0 -2
  360. package/build/openid4vc-verifier/router/index.js +0 -6
  361. package/build/openid4vc-verifier/router/index.js.map +0 -1
  362. package/build/openid4vc-verifier/router/requestContext.d.ts +0 -5
  363. package/build/openid4vc-verifier/router/requestContext.js +0 -3
  364. package/build/openid4vc-verifier/router/requestContext.js.map +0 -1
  365. package/build/shared/callbacks.d.ts +0 -18
  366. package/build/shared/callbacks.js +0 -81
  367. package/build/shared/callbacks.js.map +0 -1
  368. package/build/shared/index.d.ts +0 -2
  369. package/build/shared/index.js +0 -19
  370. package/build/shared/index.js.map +0 -1
  371. package/build/shared/issuerMetadataUtils.d.ts +0 -158
  372. package/build/shared/issuerMetadataUtils.js +0 -38
  373. package/build/shared/issuerMetadataUtils.js.map +0 -1
  374. package/build/shared/models/CredentialHolderBinding.d.ts +0 -13
  375. package/build/shared/models/CredentialHolderBinding.js +0 -3
  376. package/build/shared/models/CredentialHolderBinding.js.map +0 -1
  377. package/build/shared/models/OpenId4VcJwtIssuer.d.ts +0 -28
  378. package/build/shared/models/OpenId4VcJwtIssuer.js +0 -3
  379. package/build/shared/models/OpenId4VcJwtIssuer.js.map +0 -1
  380. package/build/shared/models/OpenId4VciAuthorizationServerConfig.d.ts +0 -10
  381. package/build/shared/models/OpenId4VciAuthorizationServerConfig.js +0 -3
  382. package/build/shared/models/OpenId4VciAuthorizationServerConfig.js.map +0 -1
  383. package/build/shared/models/OpenId4VciCredentialFormatProfile.d.ts +0 -7
  384. package/build/shared/models/OpenId4VciCredentialFormatProfile.js +0 -12
  385. package/build/shared/models/OpenId4VciCredentialFormatProfile.js.map +0 -1
  386. package/build/shared/models/index.d.ts +0 -24
  387. package/build/shared/models/index.js +0 -25
  388. package/build/shared/models/index.js.map +0 -1
  389. package/build/shared/router/context.d.ts +0 -17
  390. package/build/shared/router/context.js +0 -76
  391. package/build/shared/router/context.js.map +0 -1
  392. package/build/shared/router/express.d.ts +0 -2
  393. package/build/shared/router/express.js +0 -15
  394. package/build/shared/router/express.js.map +0 -1
  395. package/build/shared/router/express.native.d.ts +0 -1
  396. package/build/shared/router/express.native.js +0 -7
  397. package/build/shared/router/express.native.js.map +0 -1
  398. package/build/shared/router/index.d.ts +0 -3
  399. package/build/shared/router/index.js +0 -20
  400. package/build/shared/router/index.js.map +0 -1
  401. package/build/shared/router/tenants.d.ts +0 -13
  402. package/build/shared/router/tenants.js +0 -49
  403. package/build/shared/router/tenants.js.map +0 -1
  404. package/build/shared/transform.d.ts +0 -5
  405. package/build/shared/transform.js +0 -73
  406. package/build/shared/transform.js.map +0 -1
  407. package/build/shared/utils.d.ts +0 -22
  408. package/build/shared/utils.js +0 -154
  409. package/build/shared/utils.js.map +0 -1
@@ -1,238 +0,0 @@
1
- import type { OpenId4VcCredentialHolderBinding, OpenId4VciCredentialConfigurationsSupportedWithFormats } from '../shared';
2
- import type { CredentialOfferObject, IssuerMetadataResult } from '@animo-id/oid4vci';
3
- import type { AgentContext, JwaSignatureAlgorithm, Jwk, KeyType, VerifiableCredential } from '@credo-ts/core';
4
- import { AuthorizationFlow as OpenId4VciAuthorizationFlow } from '@animo-id/oid4vci';
5
- import { OpenId4VciCredentialFormatProfile } from '../shared/models/OpenId4VciCredentialFormatProfile';
6
- export { OpenId4VciAuthorizationFlow };
7
- export type OpenId4VciSupportedCredentialFormats = OpenId4VciCredentialFormatProfile.JwtVcJson | OpenId4VciCredentialFormatProfile.JwtVcJsonLd | OpenId4VciCredentialFormatProfile.SdJwtVc | OpenId4VciCredentialFormatProfile.LdpVc | OpenId4VciCredentialFormatProfile.MsoMdoc;
8
- export declare const openId4VciSupportedCredentialFormats: OpenId4VciSupportedCredentialFormats[];
9
- export interface OpenId4VciDpopRequestOptions {
10
- jwk: Jwk;
11
- alg: JwaSignatureAlgorithm;
12
- nonce?: string;
13
- }
14
- /**
15
- * 'credential_accepted' The Credential was successfully stored in the Wallet.
16
- * 'credential_deleted' when the unsuccessful Credential issuance was caused by a user action.
17
- * 'credential_failure' otherwise.
18
- */
19
- export type OpenId4VciNotificationEvent = 'credential_accepted' | 'credential_failure' | 'credential_deleted';
20
- export type OpenId4VciRequestTokenResponse = {
21
- accessToken: string;
22
- cNonce?: string;
23
- dpop?: OpenId4VciDpopRequestOptions;
24
- };
25
- type UnionToArrayUnion<T> = T extends any ? T[] : never;
26
- export interface OpenId4VciCredentialResponse {
27
- credentialConfigurationId: string;
28
- credentials: UnionToArrayUnion<VerifiableCredential>;
29
- notificationId?: string;
30
- }
31
- export interface OpenId4VciResolvedCredentialOffer {
32
- metadata: IssuerMetadataResult;
33
- credentialOfferPayload: CredentialOfferObject;
34
- /**
35
- * Offered credential configurations with known formats
36
- */
37
- offeredCredentialConfigurations: OpenId4VciCredentialConfigurationsSupportedWithFormats;
38
- }
39
- export type OpenId4VciResolvedAuthorizationRequest = {
40
- oid4vpRequestUrl: string;
41
- authorizationFlow: OpenId4VciAuthorizationFlow.PresentationDuringIssuance;
42
- authSession: string;
43
- } | {
44
- authorizationRequestUrl: string;
45
- authorizationFlow: OpenId4VciAuthorizationFlow.Oauth2Redirect;
46
- codeVerifier?: string;
47
- };
48
- export interface OpenId4VciSendNotificationOptions {
49
- metadata: IssuerMetadataResult;
50
- notificationId: string;
51
- /**
52
- * The access token obtained through @see requestToken
53
- */
54
- accessToken: string;
55
- /**
56
- * The notification event
57
- *
58
- * 'credential_accepted' The Credential was successfully stored in the Wallet.
59
- * 'credential_deleted' when the unsuccessful Credential issuance was caused by a user action.
60
- * 'credential_failure' otherwise.
61
- */
62
- notificationEvent: OpenId4VciNotificationEvent;
63
- dpop?: OpenId4VciDpopRequestOptions;
64
- }
65
- export interface OpenId4VcAuthorizationCodeTokenRequestOptions {
66
- resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer;
67
- code: string;
68
- clientId: string;
69
- codeVerifier?: string;
70
- redirectUri?: string;
71
- txCode?: never;
72
- }
73
- export interface OpenId4VciPreAuthorizedTokenRequestOptions {
74
- resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer;
75
- txCode?: string;
76
- code?: undefined;
77
- }
78
- export type OpenId4VciTokenRequestOptions = OpenId4VciPreAuthorizedTokenRequestOptions | OpenId4VcAuthorizationCodeTokenRequestOptions;
79
- export interface OpenId4VciRetrieveAuthorizationCodeUsingPresentationOptions {
80
- resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer;
81
- dpop?: OpenId4VciDpopRequestOptions;
82
- /**
83
- * auth session returned at an earlier call to the authorization challenge endpoint
84
- */
85
- authSession: string;
86
- /**
87
- * Presentation during issuance session returned by the verifier after submitting a valid presentation
88
- */
89
- presentationDuringIssuanceSession?: string;
90
- }
91
- export interface OpenId4VciCredentialRequestOptions extends Omit<OpenId4VciAcceptCredentialOfferOptions, 'userPin'> {
92
- resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer;
93
- accessToken: string;
94
- cNonce?: string;
95
- dpop?: OpenId4VciDpopRequestOptions;
96
- /**
97
- * The client id used for authorization. Only required if authorization_code flow was used.
98
- */
99
- clientId?: string;
100
- }
101
- /**
102
- * Options that are used to accept a credential offer for both the pre-authorized code flow and authorization code flow.
103
- * NOTE: Merge with @see OpenId4VciCredentialRequestOptions for 0.6
104
- */
105
- export interface OpenId4VciAcceptCredentialOfferOptions {
106
- /**
107
- * This is the list of credentials configuration ids that will be requested from the issuer.
108
- * Should be a list of ids of the credentials that are included in the credential offer.
109
- * If not provided all offered credentials will be requested.
110
- */
111
- credentialConfigurationIds?: string[];
112
- /**
113
- * Whether to request a batch of credentials if supported by the crednetial issuer.
114
- *
115
- * You can also provide a number to indicate the batch size. If `true` is provided
116
- * the max size from the credential issuer will be used.
117
- *
118
- * If a number is passed that is higher than the max batch size of the credential issuer,
119
- * an error will be thrown.
120
- *
121
- * @default false
122
- */
123
- requestBatch?: boolean | number;
124
- verifyCredentialStatus?: boolean;
125
- /**
126
- * A list of allowed proof of possession signature algorithms in order of preference.
127
- *
128
- * Note that the signature algorithms must be supported by the wallet implementation.
129
- * Signature algorithms that are not supported by the wallet will be ignored.
130
- *
131
- * The proof of possession (pop) signature algorithm is used in the credential request
132
- * to bind the credential to a did. In most cases the JWA signature algorithm
133
- * that is used in the pop will determine the cryptographic suite that is used
134
- * for signing the credential, but this not a requirement for the spec. E.g. if the
135
- * pop uses EdDsa, the credential will most commonly also use EdDsa, or Ed25519Signature2018/2020.
136
- */
137
- allowedProofOfPossessionSignatureAlgorithms?: JwaSignatureAlgorithm[];
138
- /**
139
- * A function that should resolve key material for binding the to-be-issued credential
140
- * to the holder based on the options passed. This key material will be used for signing
141
- * the proof of possession included in the credential request.
142
- *
143
- * This method will be called once for each of the credentials that are included
144
- * in the credential offer.
145
- *
146
- * Based on the credential format, JWA signature algorithm, verification method types
147
- * and binding methods (did methods, jwk), the resolver must return an object
148
- * conformant to the `CredentialHolderBinding` interface, which will be used
149
- * for the proof of possession signature.
150
- */
151
- credentialBindingResolver: OpenId4VciCredentialBindingResolver;
152
- }
153
- /**
154
- * Options that are used for the authorization code flow.
155
- * Extends the pre-authorized code flow options.
156
- */
157
- export interface OpenId4VciAuthCodeFlowOptions {
158
- clientId: string;
159
- redirectUri: string;
160
- scope?: string[];
161
- }
162
- export interface OpenId4VciCredentialBindingOptions {
163
- agentContext: AgentContext;
164
- /**
165
- * The credential format that will be requested from the issuer.
166
- * E.g. `jwt_vc` or `ldp_vc`.
167
- */
168
- credentialFormat: OpenId4VciSupportedCredentialFormats;
169
- /**
170
- * The JWA Signature Algorithm(s) that can be used in the proof of possession.
171
- * This is based on the `allowedProofOfPossessionSignatureAlgorithms` passed
172
- * to the request credential method, and the supported signature algorithms.
173
- */
174
- signatureAlgorithms: JwaSignatureAlgorithm[];
175
- /**
176
- * This is a list of verification methods types that are supported
177
- * for creating the proof of possession signature. The returned
178
- * verification method type must be of one of these types.
179
- */
180
- supportedVerificationMethods: string[];
181
- /**
182
- * The key type that can be used to create the proof of possession signature.
183
- * This is related to the verification method and the signature algorithm, and
184
- * is added for convenience.
185
- */
186
- keyTypes: KeyType[];
187
- /**
188
- * The credential type that will be requested from the issuer. This is
189
- * based on the credential types that are included the credential offer.
190
- */
191
- credentialConfigurationId?: string;
192
- /**
193
- * Whether the issuer supports the `did` cryptographic binding method,
194
- * indicating they support all did methods. In most cases, they do not
195
- * support all did methods, and it means we have to make an assumption
196
- * about the did methods they support.
197
- *
198
- * If this value is `false`, the `supportedDidMethods` property will
199
- * contain a list of supported did methods.
200
- */
201
- supportsAllDidMethods: boolean;
202
- /**
203
- * A list of supported did methods. This is only used if the `supportsAllDidMethods`
204
- * property is `false`. When this array is populated, the returned verification method
205
- * MUST be based on one of these did methods.
206
- *
207
- * The did methods are returned in the format `did:<method>`, e.g. `did:web`.
208
- *
209
- * The value is undefined in the case the supported did methods could not be extracted.
210
- * This is the case when an inline credential was used, or when the issuer didn't include
211
- * the supported did methods in the issuer metadata.
212
- *
213
- * NOTE: an empty array (no did methods supported) has a different meaning from the value
214
- * being undefined (the supported did methods could not be extracted). If `supportsAllDidMethods`
215
- * is true, the value of this property MUST be ignored.
216
- */
217
- supportedDidMethods?: string[];
218
- /**
219
- * Whether the issuer supports the `jwk` cryptographic binding method,
220
- * indicating they support proof of possession signatures bound to a jwk.
221
- */
222
- supportsJwk: boolean;
223
- }
224
- /**
225
- * The proof of possession verification method resolver is a function that can be passed by the
226
- * user of the framework and allows them to determine which verification method should be used
227
- * for the proof of possession signature.
228
- */
229
- export type OpenId4VciCredentialBindingResolver = (options: OpenId4VciCredentialBindingOptions) => Promise<OpenId4VcCredentialHolderBinding> | OpenId4VcCredentialHolderBinding;
230
- /**
231
- * @internal
232
- */
233
- export interface OpenId4VciProofOfPossessionRequirements {
234
- signatureAlgorithms: JwaSignatureAlgorithm[];
235
- supportedDidMethods?: string[];
236
- supportsAllDidMethods: boolean;
237
- supportsJwk: boolean;
238
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.openId4VciSupportedCredentialFormats = exports.OpenId4VciAuthorizationFlow = void 0;
4
- const oid4vci_1 = require("@animo-id/oid4vci");
5
- Object.defineProperty(exports, "OpenId4VciAuthorizationFlow", { enumerable: true, get: function () { return oid4vci_1.AuthorizationFlow; } });
6
- const OpenId4VciCredentialFormatProfile_1 = require("../shared/models/OpenId4VciCredentialFormatProfile");
7
- exports.openId4VciSupportedCredentialFormats = [
8
- OpenId4VciCredentialFormatProfile_1.OpenId4VciCredentialFormatProfile.JwtVcJson,
9
- OpenId4VciCredentialFormatProfile_1.OpenId4VciCredentialFormatProfile.JwtVcJsonLd,
10
- OpenId4VciCredentialFormatProfile_1.OpenId4VciCredentialFormatProfile.SdJwtVc,
11
- OpenId4VciCredentialFormatProfile_1.OpenId4VciCredentialFormatProfile.LdpVc,
12
- OpenId4VciCredentialFormatProfile_1.OpenId4VciCredentialFormatProfile.MsoMdoc,
13
- ];
14
- //# sourceMappingURL=OpenId4VciHolderServiceOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VciHolderServiceOptions.js","sourceRoot":"","sources":["../../src/openid4vc-holder/OpenId4VciHolderServiceOptions.ts"],"names":[],"mappings":";;;AAOA,+CAAoF;AAI3E,4GAJqB,2BAA2B,OAIrB;AAFpC,0GAAsG;AAWzF,QAAA,oCAAoC,GAA2C;IAC1F,qEAAiC,CAAC,SAAS;IAC3C,qEAAiC,CAAC,WAAW;IAC7C,qEAAiC,CAAC,OAAO;IACzC,qEAAiC,CAAC,KAAK;IACvC,qEAAiC,CAAC,OAAO;CAC1C,CAAA"}
@@ -1,32 +0,0 @@
1
- import type { OpenId4VcSiopAcceptAuthorizationRequestOptions, OpenId4VcSiopResolvedAuthorizationRequest } from './OpenId4vcSiopHolderServiceOptions';
2
- import type { AgentContext } from '@credo-ts/core';
3
- import type { AuthorizationResponsePayload } from '@sphereon/did-auth-siop';
4
- import { DifPresentationExchangeService } from '@credo-ts/core';
5
- export declare class OpenId4VcSiopHolderService {
6
- private presentationExchangeService;
7
- constructor(presentationExchangeService: DifPresentationExchangeService);
8
- resolveAuthorizationRequest(agentContext: AgentContext, requestJwtOrUri: string): Promise<OpenId4VcSiopResolvedAuthorizationRequest>;
9
- acceptAuthorizationRequest(agentContext: AgentContext, options: OpenId4VcSiopAcceptAuthorizationRequestOptions): Promise<{
10
- readonly ok: false;
11
- readonly serverResponse: {
12
- readonly status: number;
13
- readonly body: string | Record<string, unknown> | null;
14
- };
15
- readonly submittedResponse: AuthorizationResponsePayload;
16
- readonly redirectUri?: undefined;
17
- readonly presentationDuringIssuanceSession?: undefined;
18
- } | {
19
- readonly ok: true;
20
- readonly serverResponse: {
21
- readonly status: number;
22
- readonly body: Record<string, unknown>;
23
- };
24
- readonly submittedResponse: AuthorizationResponsePayload;
25
- readonly redirectUri: string | undefined;
26
- readonly presentationDuringIssuanceSession: string | undefined;
27
- }>;
28
- private getOpenIdProvider;
29
- private getOpenIdTokenIssuerFromVerifiablePresentation;
30
- private assertValidTokenIssuer;
31
- private encryptJarmResponse;
32
- }
@@ -1,302 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.OpenId4VcSiopHolderService = void 0;
13
- const core_1 = require("@credo-ts/core");
14
- const did_auth_siop_1 = require("@sphereon/did-auth-siop");
15
- const transform_1 = require("../shared/transform");
16
- const utils_1 = require("../shared/utils");
17
- let OpenId4VcSiopHolderService = class OpenId4VcSiopHolderService {
18
- constructor(presentationExchangeService) {
19
- this.presentationExchangeService = presentationExchangeService;
20
- }
21
- async resolveAuthorizationRequest(agentContext, requestJwtOrUri) {
22
- var _a, _b;
23
- const openidProvider = await this.getOpenIdProvider(agentContext);
24
- // parsing happens automatically in verifyAuthorizationRequest
25
- const verifiedAuthorizationRequest = await openidProvider.verifyAuthorizationRequest(requestJwtOrUri);
26
- agentContext.config.logger.debug(`verified SIOP Authorization Request for issuer '${verifiedAuthorizationRequest.issuer}'`);
27
- agentContext.config.logger.debug(`requestJwtOrUri '${requestJwtOrUri}'`);
28
- if (verifiedAuthorizationRequest.presentationDefinitions &&
29
- verifiedAuthorizationRequest.presentationDefinitions.length > 1) {
30
- throw new core_1.CredoError('Only a single presentation definition is supported.');
31
- }
32
- const presentationDefinition = (_b = (_a = verifiedAuthorizationRequest.presentationDefinitions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.definition;
33
- return {
34
- authorizationRequest: verifiedAuthorizationRequest,
35
- // Parameters related to DIF Presentation Exchange
36
- presentationExchange: presentationDefinition
37
- ? {
38
- definition: presentationDefinition,
39
- credentialsForRequest: await this.presentationExchangeService.getCredentialsForRequest(agentContext, presentationDefinition),
40
- }
41
- : undefined,
42
- };
43
- }
44
- async acceptAuthorizationRequest(agentContext, options) {
45
- var _a;
46
- const { authorizationRequest, presentationExchange } = options;
47
- let openIdTokenIssuer = options.openIdTokenIssuer;
48
- let presentationExchangeOptions = undefined;
49
- const wantsIdToken = await authorizationRequest.authorizationRequest.containsResponseType(did_auth_siop_1.ResponseType.ID_TOKEN);
50
- const authorizationResponseNonce = await agentContext.wallet.generateNonce();
51
- // Handle presentation exchange part
52
- if (authorizationRequest.presentationDefinitions && authorizationRequest.presentationDefinitions.length > 0) {
53
- if (!presentationExchange) {
54
- throw new core_1.CredoError('Authorization request included presentation definition. `presentationExchange` MUST be supplied to accept authorization requests.');
55
- }
56
- const nonce = await authorizationRequest.authorizationRequest.getMergedProperty('nonce');
57
- if (!nonce) {
58
- throw new core_1.CredoError("Unable to extract 'nonce' from authorization request");
59
- }
60
- const clientId = await authorizationRequest.authorizationRequest.getMergedProperty('client_id');
61
- if (!clientId) {
62
- throw new core_1.CredoError("Unable to extract 'client_id' from authorization request");
63
- }
64
- const responseUri = (_a = (await authorizationRequest.authorizationRequest.getMergedProperty('response_uri'))) !== null && _a !== void 0 ? _a : (await authorizationRequest.authorizationRequest.getMergedProperty('redirect_uri'));
65
- if (!responseUri) {
66
- throw new core_1.CredoError("Unable to extract 'response_uri' from authorization request");
67
- }
68
- const { verifiablePresentations, presentationSubmission } = await this.presentationExchangeService.createPresentation(agentContext, {
69
- credentialsForInputDescriptor: presentationExchange.credentials,
70
- presentationDefinition: authorizationRequest.presentationDefinitions[0].definition,
71
- challenge: nonce,
72
- domain: clientId,
73
- presentationSubmissionLocation: core_1.DifPresentationExchangeSubmissionLocation.EXTERNAL,
74
- openid4vp: {
75
- mdocGeneratedNonce: authorizationResponseNonce,
76
- responseUri,
77
- },
78
- });
79
- presentationExchangeOptions = {
80
- verifiablePresentations: verifiablePresentations.map((vp) => (0, transform_1.getSphereonVerifiablePresentation)(vp)),
81
- presentationSubmission,
82
- vpTokenLocation: did_auth_siop_1.VPTokenLocation.AUTHORIZATION_RESPONSE,
83
- };
84
- if (wantsIdToken && !openIdTokenIssuer) {
85
- openIdTokenIssuer = this.getOpenIdTokenIssuerFromVerifiablePresentation(verifiablePresentations[0]);
86
- }
87
- }
88
- else if (options.presentationExchange) {
89
- throw new core_1.CredoError('`presentationExchange` was supplied, but no presentation definition was found in the presentation request.');
90
- }
91
- if (wantsIdToken) {
92
- if (!openIdTokenIssuer) {
93
- throw new core_1.CredoError('Unable to create authorization response. openIdTokenIssuer MUST be supplied when no presentation is active and the ResponseType includes id_token.');
94
- }
95
- this.assertValidTokenIssuer(authorizationRequest, openIdTokenIssuer);
96
- }
97
- const jwtIssuer = wantsIdToken && openIdTokenIssuer
98
- ? await (0, utils_1.openIdTokenIssuerToJwtIssuer)(agentContext, openIdTokenIssuer)
99
- : undefined;
100
- const openidProvider = await this.getOpenIdProvider(agentContext);
101
- const authorizationResponseWithCorrelationId = await openidProvider.createAuthorizationResponse(authorizationRequest, {
102
- jwtIssuer,
103
- presentationExchange: presentationExchangeOptions,
104
- // https://openid.net/specs/openid-connect-self-issued-v2-1_0.html#name-aud-of-a-request-object
105
- audience: authorizationRequest.authorizationRequestPayload.client_id,
106
- });
107
- const getCreateJarmResponseCallback = (authorizationResponseNonce) => {
108
- return async (opts) => {
109
- var _a;
110
- const { authorizationResponsePayload, requestObjectPayload } = opts;
111
- const jwk = await did_auth_siop_1.OP.extractEncJwksFromClientMetadata(requestObjectPayload.client_metadata);
112
- if (!jwk.kty) {
113
- throw new core_1.CredoError('Missing kty in jwk.');
114
- }
115
- const validatedMetadata = did_auth_siop_1.OP.validateJarmMetadata({
116
- client_metadata: requestObjectPayload.client_metadata,
117
- server_metadata: {
118
- authorization_encryption_alg_values_supported: ['ECDH-ES'],
119
- authorization_encryption_enc_values_supported: ['A256GCM'],
120
- },
121
- });
122
- if (validatedMetadata.type !== 'encrypted') {
123
- throw new core_1.CredoError('Only encrypted JARM responses are supported.');
124
- }
125
- // Extract nonce from the request, we use this as the `apv`
126
- const nonce = (_a = authorizationRequest.payload) === null || _a === void 0 ? void 0 : _a.nonce;
127
- if (!nonce || typeof nonce !== 'string') {
128
- throw new core_1.CredoError('Missing nonce in authorization request payload');
129
- }
130
- const jwe = await this.encryptJarmResponse(agentContext, {
131
- jwkJson: jwk,
132
- payload: authorizationResponsePayload,
133
- authorizationRequestNonce: nonce,
134
- alg: validatedMetadata.client_metadata.authorization_encrypted_response_alg,
135
- enc: validatedMetadata.client_metadata.authorization_encrypted_response_enc,
136
- authorizationResponseNonce,
137
- });
138
- return { response: jwe };
139
- };
140
- };
141
- const response = await openidProvider.submitAuthorizationResponse(authorizationResponseWithCorrelationId, getCreateJarmResponseCallback(authorizationResponseNonce));
142
- const responseText = await response
143
- .clone()
144
- .text()
145
- .catch(() => null);
146
- const responseJson = (await response
147
- .clone()
148
- .json()
149
- .catch(() => null));
150
- if (!response.ok) {
151
- return {
152
- ok: false,
153
- serverResponse: {
154
- status: response.status,
155
- body: responseJson !== null && responseJson !== void 0 ? responseJson : responseText,
156
- },
157
- submittedResponse: authorizationResponseWithCorrelationId.response.payload,
158
- };
159
- }
160
- return {
161
- ok: true,
162
- serverResponse: {
163
- status: response.status,
164
- body: responseJson !== null && responseJson !== void 0 ? responseJson : {},
165
- },
166
- submittedResponse: authorizationResponseWithCorrelationId.response.payload,
167
- redirectUri: responseJson === null || responseJson === void 0 ? void 0 : responseJson.redirect_uri,
168
- presentationDuringIssuanceSession: responseJson === null || responseJson === void 0 ? void 0 : responseJson.presentation_during_issuance_session,
169
- };
170
- }
171
- async getOpenIdProvider(agentContext) {
172
- const builder = did_auth_siop_1.OP.builder()
173
- .withExpiresIn(6000)
174
- .withIssuer(did_auth_siop_1.ResponseIss.SELF_ISSUED_V2)
175
- .withResponseMode(did_auth_siop_1.ResponseMode.POST)
176
- .withSupportedVersions([
177
- did_auth_siop_1.SupportedVersion.SIOPv2_D11,
178
- did_auth_siop_1.SupportedVersion.SIOPv2_D12_OID4VP_D18,
179
- did_auth_siop_1.SupportedVersion.SIOPv2_D12_OID4VP_D20,
180
- ])
181
- .withCreateJwtCallback((0, utils_1.getCreateJwtCallback)(agentContext))
182
- .withVerifyJwtCallback((0, utils_1.getVerifyJwtCallback)(agentContext))
183
- .withHasher(core_1.Hasher.hash);
184
- const openidProvider = builder.build();
185
- return openidProvider;
186
- }
187
- getOpenIdTokenIssuerFromVerifiablePresentation(verifiablePresentation) {
188
- let openIdTokenIssuer;
189
- if (verifiablePresentation instanceof core_1.W3cJsonLdVerifiablePresentation) {
190
- const [firstProof] = (0, core_1.asArray)(verifiablePresentation.proof);
191
- if (!firstProof)
192
- throw new core_1.CredoError('Verifiable presentation does not contain a proof');
193
- if (!firstProof.verificationMethod.startsWith('did:')) {
194
- throw new core_1.CredoError('Verifiable presentation proof verificationMethod is not a did. Unable to extract openIdTokenIssuer from verifiable presentation');
195
- }
196
- openIdTokenIssuer = {
197
- method: 'did',
198
- didUrl: firstProof.verificationMethod,
199
- };
200
- }
201
- else if (verifiablePresentation instanceof core_1.W3cJwtVerifiablePresentation) {
202
- const kid = verifiablePresentation.jwt.header.kid;
203
- if (!kid)
204
- throw new core_1.CredoError('Verifiable Presentation does not contain a kid in the jwt header');
205
- if (kid.startsWith('#') && verifiablePresentation.presentation.holderId) {
206
- openIdTokenIssuer = {
207
- didUrl: `${verifiablePresentation.presentation.holderId}${kid}`,
208
- method: 'did',
209
- };
210
- }
211
- else if (kid.startsWith('did:')) {
212
- openIdTokenIssuer = {
213
- didUrl: kid,
214
- method: 'did',
215
- };
216
- }
217
- else {
218
- throw new core_1.CredoError("JWT W3C Verifiable presentation does not include did in JWT header 'kid'. Unable to extract openIdTokenIssuer from verifiable presentation");
219
- }
220
- }
221
- else if (verifiablePresentation instanceof core_1.MdocDeviceResponse) {
222
- throw new core_1.CredoError('Mdoc Verifiable Presentations are not yet supported');
223
- }
224
- else {
225
- const cnf = verifiablePresentation.payload.cnf;
226
- // FIXME: SD-JWT VC should have better payload typing, so this doesn't become so ugly
227
- if (!cnf ||
228
- typeof cnf !== 'object' ||
229
- !('kid' in cnf) ||
230
- typeof cnf.kid !== 'string' ||
231
- !cnf.kid.startsWith('did:') ||
232
- !cnf.kid.includes('#')) {
233
- throw new core_1.CredoError("SD-JWT Verifiable presentation has no 'cnf' claim or does not include 'cnf' claim where 'kid' is a didUrl pointing to a key. Unable to extract openIdTokenIssuer from verifiable presentation");
234
- }
235
- openIdTokenIssuer = {
236
- didUrl: cnf.kid,
237
- method: 'did',
238
- };
239
- }
240
- return openIdTokenIssuer;
241
- }
242
- assertValidTokenIssuer(authorizationRequest, openIdTokenIssuer) {
243
- const subjectSyntaxTypesSupported = authorizationRequest.registrationMetadataPayload.subject_syntax_types_supported;
244
- if (!subjectSyntaxTypesSupported) {
245
- throw new core_1.CredoError('subject_syntax_types_supported is not supplied in the registration metadata. subject_syntax_types is REQUIRED.');
246
- }
247
- let allowedSubjectSyntaxTypes = [];
248
- if (openIdTokenIssuer.method === 'did') {
249
- const parsedDid = (0, core_1.parseDid)(openIdTokenIssuer.didUrl);
250
- // Either did:<method> or did (for all did methods) is allowed
251
- allowedSubjectSyntaxTypes = [`did:${parsedDid.method}`, 'did'];
252
- }
253
- else if (openIdTokenIssuer.method === 'jwk') {
254
- allowedSubjectSyntaxTypes = ['urn:ietf:params:oauth:jwk-thumbprint'];
255
- }
256
- else {
257
- throw new core_1.CredoError("Only 'did' and 'jwk' are supported as openIdTokenIssuer at the moment");
258
- }
259
- // At least one of the allowed subject syntax types must be supported by the RP
260
- if (!allowedSubjectSyntaxTypes.some((allowed) => subjectSyntaxTypesSupported.includes(allowed))) {
261
- throw new core_1.CredoError([
262
- 'The provided openIdTokenIssuer is not supported by the relying party.',
263
- `Supported subject syntax types: '${subjectSyntaxTypesSupported.join(', ')}'`,
264
- ].join('\n'));
265
- }
266
- }
267
- async encryptJarmResponse(agentContext, options) {
268
- const { payload, jwkJson } = options;
269
- const jwk = (0, core_1.getJwkFromJson)(jwkJson);
270
- const key = jwk.key;
271
- if (!agentContext.wallet.directEncryptCompactJweEcdhEs) {
272
- throw new core_1.CredoError('Cannot decrypt Jarm Response, wallet does not support directEncryptCompactJweEcdhEs. You need to upgrade your wallet implementation.');
273
- }
274
- if (options.alg !== 'ECDH-ES') {
275
- throw new core_1.CredoError("Only 'ECDH-ES' is supported as 'alg' value for JARM response encryption");
276
- }
277
- if (options.enc !== 'A256GCM') {
278
- throw new core_1.CredoError("Only 'A256GCM' is supported as 'enc' value for JARM response encryption");
279
- }
280
- if (key.keyType !== core_1.KeyType.P256) {
281
- throw new core_1.CredoError(`Only '${core_1.KeyType.P256}' key type is supported for JARM response encryption`);
282
- }
283
- const data = core_1.Buffer.from(JSON.stringify(payload));
284
- const jwe = await agentContext.wallet.directEncryptCompactJweEcdhEs({
285
- data,
286
- recipientKey: key,
287
- header: {
288
- kid: jwkJson.kid,
289
- },
290
- encryptionAlgorithm: options.enc,
291
- apu: core_1.TypedArrayEncoder.toBase64URL(core_1.TypedArrayEncoder.fromString(options.authorizationResponseNonce)),
292
- apv: core_1.TypedArrayEncoder.toBase64URL(core_1.TypedArrayEncoder.fromString(options.authorizationRequestNonce)),
293
- });
294
- return jwe;
295
- }
296
- };
297
- exports.OpenId4VcSiopHolderService = OpenId4VcSiopHolderService;
298
- exports.OpenId4VcSiopHolderService = OpenId4VcSiopHolderService = __decorate([
299
- (0, core_1.injectable)(),
300
- __metadata("design:paramtypes", [core_1.DifPresentationExchangeService])
301
- ], OpenId4VcSiopHolderService);
302
- //# sourceMappingURL=OpenId4vcSiopHolderService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4vcSiopHolderService.js","sourceRoot":"","sources":["../../src/openid4vc-holder/OpenId4vcSiopHolderService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAaA,yCAeuB;AACvB,2DAAwH;AAExH,mDAAuE;AACvE,2CAA0G;AAGnG,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACrC,YAA2B,2BAA2D;QAA3D,gCAA2B,GAA3B,2BAA2B,CAAgC;IAAG,CAAC;IAEnF,KAAK,CAAC,2BAA2B,CACtC,YAA0B,EAC1B,eAAuB;;QAEvB,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAA;QAEjE,8DAA8D;QAC9D,MAAM,4BAA4B,GAAG,MAAM,cAAc,CAAC,0BAA0B,CAAC,eAAe,CAAC,CAAA;QAErG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAC9B,mDAAmD,4BAA4B,CAAC,MAAM,GAAG,CAC1F,CAAA;QACD,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,eAAe,GAAG,CAAC,CAAA;QAExE,IACE,4BAA4B,CAAC,uBAAuB;YACpD,4BAA4B,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC,EAC/D,CAAC;YACD,MAAM,IAAI,iBAAU,CAAC,qDAAqD,CAAC,CAAA;QAC7E,CAAC;QAED,MAAM,sBAAsB,GAAG,MAAA,MAAA,4BAA4B,CAAC,uBAAuB,0CAAG,CAAC,CAAC,0CAAE,UAAU,CAAA;QAEpG,OAAO;YACL,oBAAoB,EAAE,4BAA4B;YAElD,kDAAkD;YAClD,oBAAoB,EAAE,sBAAsB;gBAC1C,CAAC,CAAC;oBACE,UAAU,EAAE,sBAAsB;oBAClC,qBAAqB,EAAE,MAAM,IA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AiB,CAAC,UAAU,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;YACpG,GAAG,EAAE,wBAAiB,CAAC,WAAW,CAAC,wBAAiB,CAAC,UAAU,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;SACpG,CAAC,CAAA;QAEF,OAAO,GAAG,CAAA;IACZ,CAAC;CACF,CAAA;AAxXY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,iBAAU,GAAE;qCAE6C,qCAA8B;GAD3E,0BAA0B,CAwXtC"}
@@ -1,38 +0,0 @@
1
- import type { OpenId4VcJwtIssuer, OpenId4VcSiopVerifiedAuthorizationRequest } from '../shared';
2
- import type { DifPexCredentialsForRequest, DifPexInputDescriptorToCredentials, DifPresentationExchangeDefinition } from '@credo-ts/core';
3
- export interface OpenId4VcSiopResolvedAuthorizationRequest {
4
- /**
5
- * Parameters related to DIF Presentation Exchange. Only defined when
6
- * the request included
7
- */
8
- presentationExchange?: {
9
- definition: DifPresentationExchangeDefinition;
10
- credentialsForRequest: DifPexCredentialsForRequest;
11
- };
12
- /**
13
- * The verified authorization request.
14
- */
15
- authorizationRequest: OpenId4VcSiopVerifiedAuthorizationRequest;
16
- }
17
- export interface OpenId4VcSiopAcceptAuthorizationRequestOptions {
18
- /**
19
- * Parameters related to DIF Presentation Exchange. MUST be present when the resolved
20
- * authorization request included a `presentationExchange` parameter.
21
- */
22
- presentationExchange?: {
23
- credentials: DifPexInputDescriptorToCredentials;
24
- };
25
- /**
26
- * The issuer of the ID Token.
27
- *
28
- * REQUIRED when presentation exchange is not used.
29
- *
30
- * In case presentation exchange is used, and `openIdTokenIssuer` is not provided, the issuer of the ID Token
31
- * will be extracted from the signer of the first verifiable presentation.
32
- */
33
- openIdTokenIssuer?: OpenId4VcJwtIssuer;
34
- /**
35
- * The verified authorization request.
36
- */
37
- authorizationRequest: OpenId4VcSiopVerifiedAuthorizationRequest;
38
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=OpenId4vcSiopHolderServiceOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4vcSiopHolderServiceOptions.js","sourceRoot":"","sources":["../../src/openid4vc-holder/OpenId4vcSiopHolderServiceOptions.ts"],"names":[],"mappings":""}