@nmshd/consumption 7.0.0-openid4vc.5 → 7.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 (302) hide show
  1. package/LICENSE +659 -3
  2. package/README.md +1 -1
  3. package/dist/buildInformation.js +5 -5
  4. package/dist/consumption/ConsumptionConfig.d.ts +1 -1
  5. package/dist/consumption/ConsumptionConfig.d.ts.map +1 -1
  6. package/dist/consumption/ConsumptionController.d.ts +1 -3
  7. package/dist/consumption/ConsumptionController.d.ts.map +1 -1
  8. package/dist/consumption/ConsumptionController.js +5 -9
  9. package/dist/consumption/ConsumptionController.js.map +1 -1
  10. package/dist/consumption/ConsumptionControllerName.d.ts +1 -2
  11. package/dist/consumption/ConsumptionControllerName.d.ts.map +1 -1
  12. package/dist/consumption/ConsumptionControllerName.js +0 -1
  13. package/dist/consumption/ConsumptionControllerName.js.map +1 -1
  14. package/dist/consumption/ConsumptionCoreErrors.d.ts +7 -37
  15. package/dist/consumption/ConsumptionCoreErrors.d.ts.map +1 -1
  16. package/dist/consumption/ConsumptionCoreErrors.js +18 -114
  17. package/dist/consumption/ConsumptionCoreErrors.js.map +1 -1
  18. package/dist/consumption/ConsumptionIds.d.ts +1 -0
  19. package/dist/consumption/ConsumptionIds.d.ts.map +1 -1
  20. package/dist/consumption/ConsumptionIds.js +1 -0
  21. package/dist/consumption/ConsumptionIds.js.map +1 -1
  22. package/dist/modules/attributes/AttributesController.d.ts +108 -69
  23. package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
  24. package/dist/modules/attributes/AttributesController.js +664 -734
  25. package/dist/modules/attributes/AttributesController.js.map +1 -1
  26. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts +1 -1
  27. package/dist/modules/attributes/events/AttributeCreatedEvent.d.ts.map +1 -1
  28. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts +1 -1
  29. package/dist/modules/attributes/events/AttributeDeletedEvent.d.ts.map +1 -1
  30. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts +9 -0
  31. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.d.ts.map +1 -0
  32. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js +12 -0
  33. package/dist/modules/attributes/events/AttributeForwardingDetailsChangedEvent.js.map +1 -0
  34. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts +11 -0
  35. package/dist/modules/attributes/events/AttributeSucceededEvent.d.ts.map +1 -0
  36. package/dist/modules/attributes/events/AttributeSucceededEvent.js +12 -0
  37. package/dist/modules/attributes/events/AttributeSucceededEvent.js.map +1 -0
  38. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts +1 -1
  39. package/dist/modules/attributes/events/AttributeWasViewedAtChangedEvent.d.ts.map +1 -1
  40. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts +7 -0
  41. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.d.ts.map +1 -0
  42. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js +12 -0
  43. package/dist/modules/attributes/events/ForwardedAttributeDeletedByPeerEvent.js.map +1 -0
  44. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts +7 -0
  45. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.d.ts.map +1 -0
  46. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js +12 -0
  47. package/dist/modules/attributes/events/OwnAttributeDeletedByOwnerEvent.js.map +1 -0
  48. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts +7 -0
  49. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.d.ts.map +1 -0
  50. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js +12 -0
  51. package/dist/modules/attributes/events/PeerRelationshipAttributeDeletedByPeerEvent.js.map +1 -0
  52. package/dist/modules/attributes/events/index.d.ts +5 -9
  53. package/dist/modules/attributes/events/index.d.ts.map +1 -1
  54. package/dist/modules/attributes/events/index.js +5 -9
  55. package/dist/modules/attributes/events/index.js.map +1 -1
  56. package/dist/modules/attributes/index.d.ts +9 -7
  57. package/dist/modules/attributes/index.d.ts.map +1 -1
  58. package/dist/modules/attributes/index.js +9 -7
  59. package/dist/modules/attributes/index.js.map +1 -1
  60. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts +28 -0
  61. package/dist/modules/attributes/local/AttributeForwardingDetails.d.ts.map +1 -0
  62. package/dist/modules/attributes/local/AttributeForwardingDetails.js +62 -0
  63. package/dist/modules/attributes/local/AttributeForwardingDetails.js.map +1 -0
  64. package/dist/modules/attributes/local/QueryTranslator.d.ts.map +1 -1
  65. package/dist/modules/attributes/local/QueryTranslator.js +1 -1
  66. package/dist/modules/attributes/local/QueryTranslator.js.map +1 -1
  67. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts +29 -0
  68. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.d.ts.map +1 -0
  69. package/dist/modules/attributes/local/{AttributeSuccessorParams.js → attributeTypes/LocalAttribute.js} +34 -26
  70. package/dist/modules/attributes/local/attributeTypes/LocalAttribute.js.map +1 -0
  71. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts +19 -0
  72. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.d.ts.map +1 -0
  73. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js +40 -0
  74. package/dist/modules/attributes/local/attributeTypes/OwnIdentityAttribute.js.map +1 -0
  75. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts +29 -0
  76. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.d.ts.map +1 -0
  77. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js +73 -0
  78. package/dist/modules/attributes/local/attributeTypes/OwnRelationshipAttribute.js.map +1 -0
  79. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts +29 -0
  80. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.d.ts.map +1 -0
  81. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js +76 -0
  82. package/dist/modules/attributes/local/attributeTypes/PeerIdentityAttribute.js.map +1 -0
  83. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts +30 -0
  84. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.d.ts.map +1 -0
  85. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js +76 -0
  86. package/dist/modules/attributes/local/attributeTypes/PeerRelationshipAttribute.js.map +1 -0
  87. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts +33 -0
  88. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.d.ts.map +1 -0
  89. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js +85 -0
  90. package/dist/modules/attributes/local/attributeTypes/ThirdPartyRelationshipAttribute.js.map +1 -0
  91. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts +15 -0
  92. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.d.ts.map +1 -0
  93. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js +28 -0
  94. package/dist/modules/attributes/local/deletionInfos/AbstractAttributeDeletionInfo.js.map +1 -0
  95. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts +18 -0
  96. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.d.ts.map +1 -0
  97. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js +38 -0
  98. package/dist/modules/attributes/local/deletionInfos/EmittedAttributeDeletionInfo.js.map +1 -0
  99. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts +16 -0
  100. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.d.ts.map +1 -0
  101. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js +36 -0
  102. package/dist/modules/attributes/local/deletionInfos/ReceivedAttributeDeletionInfo.js.map +1 -0
  103. package/dist/modules/attributes/local/deletionInfos/index.d.ts +4 -0
  104. package/dist/modules/attributes/local/deletionInfos/index.d.ts.map +1 -0
  105. package/dist/modules/attributes/local/deletionInfos/index.js +20 -0
  106. package/dist/modules/attributes/local/deletionInfos/index.js.map +1 -0
  107. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts +13 -0
  108. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.d.ts.map +1 -0
  109. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js +29 -0
  110. package/dist/modules/attributes/local/successorParams/OwnIdentityAttributeSuccessorParams.js.map +1 -0
  111. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts +17 -0
  112. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  113. package/dist/modules/attributes/local/{CreateAttributeParams.js → successorParams/OwnRelationshipAttributeSuccessorParams.js} +10 -15
  114. package/dist/modules/attributes/local/successorParams/OwnRelationshipAttributeSuccessorParams.js.map +1 -0
  115. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts +20 -0
  116. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.d.ts.map +1 -0
  117. package/dist/modules/attributes/local/{CreateRepositoryAttributeParams.js → successorParams/PeerIdentityAttributeSuccessorParams.js} +16 -13
  118. package/dist/modules/attributes/local/successorParams/PeerIdentityAttributeSuccessorParams.js.map +1 -0
  119. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts +20 -0
  120. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  121. package/dist/modules/attributes/local/{CreateSharedLocalAttributeCopyParams.js → successorParams/PeerRelationshipAttributeSuccessorParams.js} +15 -16
  122. package/dist/modules/attributes/local/successorParams/PeerRelationshipAttributeSuccessorParams.js.map +1 -0
  123. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts +20 -0
  124. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.d.ts.map +1 -0
  125. package/dist/modules/attributes/local/{CreateSharedLocalAttributeParams.js → successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js} +15 -22
  126. package/dist/modules/attributes/local/successorParams/ThirdPartyRelationshipAttributeSuccessorParams.js.map +1 -0
  127. package/dist/modules/attributes/local/successorParams/index.d.ts +6 -0
  128. package/dist/modules/attributes/local/successorParams/index.d.ts.map +1 -0
  129. package/dist/modules/{openid4vc → attributes/local/successorParams}/index.js +5 -7
  130. package/dist/modules/attributes/local/successorParams/index.js.map +1 -0
  131. package/dist/modules/index.d.ts +0 -1
  132. package/dist/modules/index.d.ts.map +1 -1
  133. package/dist/modules/index.js +0 -1
  134. package/dist/modules/index.js.map +1 -1
  135. package/dist/modules/notifications/index.d.ts +4 -4
  136. package/dist/modules/notifications/index.d.ts.map +1 -1
  137. package/dist/modules/notifications/index.js +4 -4
  138. package/dist/modules/notifications/index.js.map +1 -1
  139. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  140. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  141. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js +53 -0
  142. package/dist/modules/notifications/itemProcessors/attributeDeleted/ForwardedAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  143. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts +14 -0
  144. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +1 -0
  145. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js +59 -0
  146. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnAttributeDeletedByOwnerNotificationItemProcessor.js.map +1 -0
  147. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +14 -0
  148. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +1 -0
  149. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +63 -0
  150. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +1 -0
  151. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts +15 -0
  152. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.d.ts.map +1 -0
  153. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js +102 -0
  154. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerAttributeSucceededNotificationItemProcessor.js.map +1 -0
  155. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts +2 -2
  156. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.d.ts.map +1 -1
  157. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js +54 -20
  158. package/dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js.map +1 -1
  159. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts +4 -2
  160. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.d.ts.map +1 -1
  161. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js +50 -43
  162. package/dist/modules/requests/itemProcessors/deleteAttribute/DeleteAttributeRequestItemProcessor.js.map +1 -1
  163. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts +2 -2
  164. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.d.ts.map +1 -1
  165. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js +83 -97
  166. package/dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js.map +1 -1
  167. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts +2 -2
  168. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.d.ts.map +1 -1
  169. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js +136 -133
  170. package/dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js.map +1 -1
  171. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts +3 -5
  172. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.d.ts.map +1 -1
  173. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js +94 -90
  174. package/dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js.map +1 -1
  175. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts +2 -2
  176. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.d.ts.map +1 -1
  177. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js +7 -11
  178. package/dist/modules/requests/itemProcessors/transferFileOwnership/TransferFileOwnershipRequestItemProcessor.js.map +1 -1
  179. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.d.ts.map +1 -1
  180. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js +31 -53
  181. package/dist/modules/requests/itemProcessors/utility/createAppropriateResponseItem.js.map +1 -1
  182. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js +2 -2
  183. package/dist/modules/requests/itemProcessors/utility/validateAttributeMatchesWithQuery.js.map +1 -1
  184. package/dist/modules/requests/local/LocalRequest.js +1 -1
  185. package/dist/modules/requests/local/LocalRequest.js.map +1 -1
  186. package/dist/modules/requests/local/LocalResponse.js +1 -1
  187. package/dist/modules/requests/local/LocalResponse.js.map +1 -1
  188. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts +1 -1
  189. package/dist/modules/requests/outgoing/OutgoingRequestsController.d.ts.map +1 -1
  190. package/dist/modules/requests/outgoing/OutgoingRequestsController.js +17 -16
  191. package/dist/modules/requests/outgoing/OutgoingRequestsController.js.map +1 -1
  192. package/package.json +6 -14
  193. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts +0 -6
  194. package/dist/modules/attributes/events/AttributeSucceededEventData.d.ts.map +0 -1
  195. package/dist/modules/attributes/events/AttributeSucceededEventData.js +0 -3
  196. package/dist/modules/attributes/events/AttributeSucceededEventData.js.map +0 -1
  197. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts +0 -7
  198. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.d.ts.map +0 -1
  199. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js +0 -12
  200. package/dist/modules/attributes/events/OwnSharedAttributeDeletedByOwnerEvent.js.map +0 -1
  201. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts +0 -8
  202. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.d.ts.map +0 -1
  203. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js +0 -12
  204. package/dist/modules/attributes/events/OwnSharedAttributeSucceededEvent.js.map +0 -1
  205. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts +0 -7
  206. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.d.ts.map +0 -1
  207. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js +0 -12
  208. package/dist/modules/attributes/events/PeerSharedAttributeDeletedByPeerEvent.js.map +0 -1
  209. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts +0 -8
  210. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.d.ts.map +0 -1
  211. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js +0 -12
  212. package/dist/modules/attributes/events/PeerSharedAttributeSucceededEvent.js.map +0 -1
  213. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts +0 -8
  214. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.d.ts.map +0 -1
  215. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js +0 -12
  216. package/dist/modules/attributes/events/RepositoryAttributeSucceededEvent.js.map +0 -1
  217. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts +0 -7
  218. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.d.ts.map +0 -1
  219. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js +0 -12
  220. package/dist/modules/attributes/events/SharedAttributeCopyCreatedEvent.js.map +0 -1
  221. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts +0 -7
  222. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
  223. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js +0 -12
  224. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
  225. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts +0 -8
  226. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.d.ts.map +0 -1
  227. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js +0 -12
  228. package/dist/modules/attributes/events/ThirdPartyRelationshipAttributeSucceededEvent.js.map +0 -1
  229. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts +0 -24
  230. package/dist/modules/attributes/local/AttributeSuccessorParams.d.ts.map +0 -1
  231. package/dist/modules/attributes/local/AttributeSuccessorParams.js.map +0 -1
  232. package/dist/modules/attributes/local/CreateAttributeParams.d.ts +0 -15
  233. package/dist/modules/attributes/local/CreateAttributeParams.d.ts.map +0 -1
  234. package/dist/modules/attributes/local/CreateAttributeParams.js.map +0 -1
  235. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts +0 -20
  236. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.d.ts.map +0 -1
  237. package/dist/modules/attributes/local/CreateRepositoryAttributeParams.js.map +0 -1
  238. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts +0 -22
  239. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.d.ts.map +0 -1
  240. package/dist/modules/attributes/local/CreateSharedLocalAttributeCopyParams.js.map +0 -1
  241. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts +0 -26
  242. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.d.ts.map +0 -1
  243. package/dist/modules/attributes/local/CreateSharedLocalAttributeParams.js.map +0 -1
  244. package/dist/modules/attributes/local/LocalAttribute.d.ts +0 -112
  245. package/dist/modules/attributes/local/LocalAttribute.d.ts.map +0 -1
  246. package/dist/modules/attributes/local/LocalAttribute.js +0 -186
  247. package/dist/modules/attributes/local/LocalAttribute.js.map +0 -1
  248. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts +0 -24
  249. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.d.ts.map +0 -1
  250. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js +0 -42
  251. package/dist/modules/attributes/local/LocalAttributeDeletionInfo.js.map +0 -1
  252. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts +0 -26
  253. package/dist/modules/attributes/local/LocalAttributeShareInfo.d.ts.map +0 -1
  254. package/dist/modules/attributes/local/LocalAttributeShareInfo.js +0 -59
  255. package/dist/modules/attributes/local/LocalAttributeShareInfo.js.map +0 -1
  256. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts +0 -14
  257. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.d.ts.map +0 -1
  258. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js +0 -56
  259. package/dist/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map +0 -1
  260. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  261. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  262. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  263. package/dist/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  264. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts +0 -14
  265. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map +0 -1
  266. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js +0 -57
  267. package/dist/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map +0 -1
  268. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts +0 -15
  269. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.d.ts.map +0 -1
  270. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js +0 -74
  271. package/dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js.map +0 -1
  272. package/dist/modules/openid4vc/OpenId4VcController.d.ts +0 -12
  273. package/dist/modules/openid4vc/OpenId4VcController.d.ts.map +0 -1
  274. package/dist/modules/openid4vc/OpenId4VcController.js +0 -82
  275. package/dist/modules/openid4vc/OpenId4VcController.js.map +0 -1
  276. package/dist/modules/openid4vc/index.d.ts +0 -8
  277. package/dist/modules/openid4vc/index.d.ts.map +0 -1
  278. package/dist/modules/openid4vc/index.js.map +0 -1
  279. package/dist/modules/openid4vc/local/BaseAgent.d.ts +0 -20
  280. package/dist/modules/openid4vc/local/BaseAgent.d.ts.map +0 -1
  281. package/dist/modules/openid4vc/local/BaseAgent.js +0 -69
  282. package/dist/modules/openid4vc/local/BaseAgent.js.map +0 -1
  283. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.d.ts +0 -18
  284. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.d.ts.map +0 -1
  285. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.js +0 -94
  286. package/dist/modules/openid4vc/local/EnmeshedHolderFileSystem.js.map +0 -1
  287. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.d.ts +0 -34
  288. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.d.ts.map +0 -1
  289. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.js +0 -364
  290. package/dist/modules/openid4vc/local/EnmeshedHolderKeyManagmentService.js.map +0 -1
  291. package/dist/modules/openid4vc/local/EnmeshedStorageService.d.ts +0 -19
  292. package/dist/modules/openid4vc/local/EnmeshedStorageService.d.ts.map +0 -1
  293. package/dist/modules/openid4vc/local/EnmeshedStorageService.js +0 -218
  294. package/dist/modules/openid4vc/local/EnmeshedStorageService.js.map +0 -1
  295. package/dist/modules/openid4vc/local/Holder.d.ts +0 -34
  296. package/dist/modules/openid4vc/local/Holder.d.ts.map +0 -1
  297. package/dist/modules/openid4vc/local/Holder.js +0 -225
  298. package/dist/modules/openid4vc/local/Holder.js.map +0 -1
  299. package/dist/modules/openid4vc/local/LocalAgentDependencies.d.ts +0 -3
  300. package/dist/modules/openid4vc/local/LocalAgentDependencies.d.ts.map +0 -1
  301. package/dist/modules/openid4vc/local/LocalAgentDependencies.js +0 -18
  302. package/dist/modules/openid4vc/local/LocalAgentDependencies.js.map +0 -1
@@ -1,218 +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.EnmeshedStorageService = void 0;
13
- const core_1 = require("@credo-ts/core");
14
- const content_1 = require("@nmshd/content");
15
- const core_types_1 = require("@nmshd/core-types");
16
- const transport_1 = require("@nmshd/transport");
17
- const AttributesController_1 = require("../../attributes/AttributesController");
18
- let EnmeshedStorageService = class EnmeshedStorageService {
19
- constructor(accountController, attributeController) {
20
- this.accountController = accountController;
21
- this.attributeController = attributeController;
22
- this.storrage = new Map();
23
- }
24
- async save(agentContext, record) {
25
- if (record.id === "STORAGE_VERSION_RECORD_ID") {
26
- this.storrage.set(record.id, record);
27
- return;
28
- }
29
- if (record.type === "DidRecord") {
30
- this.storrage.set(record.id, record);
31
- return;
32
- }
33
- let value = record.encoded;
34
- if (typeof value !== "string") {
35
- agentContext.config.logger.warn(`Record is not a string, serializing to JSON`);
36
- value = JSON.stringify(value);
37
- }
38
- const owner = this.accountController.identity.address;
39
- agentContext.config.logger.debug(`Saving record with id ${record.id} and value ${value}`);
40
- const identityAttribute = content_1.IdentityAttribute.from({
41
- value: {
42
- "@type": "VerifiableCredential",
43
- title: record.credential?.payload?.vct ?? "Credential",
44
- value: value,
45
- type: record.type
46
- },
47
- owner: owner
48
- });
49
- const result = await this.attributeController.createRepositoryAttribute({
50
- content: identityAttribute
51
- });
52
- agentContext.config.logger.debug(`Saved record: ${JSON.stringify(result)}`);
53
- return await Promise.resolve();
54
- }
55
- async saveWithDisplay(agentContext, value, type, displayInformation, title) {
56
- const owner = this.accountController.identity.address;
57
- const identityAttribute = content_1.IdentityAttribute.from({
58
- value: {
59
- "@type": "VerifiableCredential",
60
- value: value,
61
- type: type,
62
- displayInformation: displayInformation,
63
- title: title
64
- },
65
- owner: owner
66
- });
67
- const result = await this.attributeController.createRepositoryAttribute({
68
- content: identityAttribute
69
- });
70
- agentContext.config.logger.debug(`Saved record: ${JSON.stringify(result)}`);
71
- return await Promise.resolve(result);
72
- }
73
- async update(agentContext, record) {
74
- agentContext.config.logger.debug(`Updating record with id ${record.id}`);
75
- const value = core_1.JsonTransformer.serialize(record);
76
- const owner = this.accountController.identity.address;
77
- const oldAttribute = await this.attributeController.getLocalAttribute(core_types_1.CoreId.from(record.id));
78
- if (!oldAttribute)
79
- throw new Error(`Attribute with id ${record.id} not found`);
80
- const identityAttribute = content_1.IdentityAttribute.from({
81
- value: {
82
- "@type": "VerifiableCredential",
83
- value: value,
84
- title: "Employee ID Card",
85
- displayInformation: oldAttribute.content.value.displayInformation
86
- },
87
- owner: owner
88
- });
89
- await this.attributeController.createRepositoryAttribute({
90
- content: identityAttribute,
91
- id: core_types_1.CoreId.from(record.id)
92
- });
93
- return await Promise.resolve();
94
- }
95
- async delete(agentContext, record) {
96
- agentContext.config.logger.debug(`Deleting record with id ${record.id}`);
97
- const attribute = await this.attributeController.getLocalAttribute(core_types_1.CoreId.from(record.id));
98
- if (attribute === undefined) {
99
- throw new Error(`Attribute with id ${record.id} not found`);
100
- }
101
- await this.attributeController.deleteAttribute(attribute);
102
- }
103
- async deleteById(agentContext, recordClass, id) {
104
- agentContext.config.logger.debug(`Deleting record with id ${id} - with record class ${recordClass.name}`);
105
- const attribute = await this.attributeController.getLocalAttribute(core_types_1.CoreId.from(id));
106
- if (attribute === undefined) {
107
- throw new Error(`Attribute with id ${id} not found`);
108
- }
109
- await this.attributeController.deleteAttribute(attribute);
110
- }
111
- async getById(agentContext, recordClass, id) {
112
- if (this.storrage.has(id)) {
113
- const record = this.storrage.get(id);
114
- if (!record)
115
- throw new Error(`Record with id ${id} not found`);
116
- return record;
117
- }
118
- agentContext.config.logger.debug(`Getting record with id ${id}`);
119
- const attribute = await this.attributeController.getLocalAttribute(core_types_1.CoreId.from(id));
120
- // parse the value field of attribute as JSON into T
121
- if (attribute === undefined) {
122
- throw new Error(`Attribute with id ${id} not found`);
123
- }
124
- const record = core_1.JsonTransformer.deserialize(attribute.content.value.value, recordClass);
125
- return record;
126
- }
127
- async getAll(agentContext, recordClass) {
128
- const records = [];
129
- const attributes = await this.attributeController.getLocalAttributes({ "content.value.@type": "VerifiableCredential", shareInfo: { $exists: false } });
130
- for (const attribute of attributes) {
131
- // TODO: Correct casting
132
- const type = attribute.content.value.type;
133
- let record;
134
- if (type === core_1.ClaimFormat.SdJwtDc.toString() && recordClass.name === core_1.SdJwtVcRecord.name) {
135
- record = new core_1.SdJwtVcRecord({ id: attribute.content.id, compactSdJwtVc: attribute.content.value.value });
136
- }
137
- else if (type === core_1.ClaimFormat.MsoMdoc.toString() && recordClass.name === core_1.MdocRecord.name) {
138
- record = new core_1.MdocRecord({ id: attribute.content.id, mdoc: core_1.Mdoc.fromBase64Url(attribute.content.value.value) });
139
- }
140
- else if (type === core_1.ClaimFormat.SdJwtW3cVc.toString() && recordClass.name === core_1.W3cCredentialRecord.name) {
141
- const credential = core_1.W3cJwtVerifiableCredential.fromSerializedJwt(attribute.content.value.value);
142
- record = new core_1.W3cCredentialRecord({
143
- id: attribute.content.id,
144
- credential: credential,
145
- tags: {}
146
- });
147
- }
148
- else {
149
- agentContext.config.logger.info(`Skipping attribute with id ${attribute.id} and type ${type} as it does not match record class ${recordClass.name}`);
150
- continue;
151
- }
152
- if (attribute.content.value.key !== undefined) {
153
- // TODO: Remove as this is only a workaround for demo purposes
154
- agentContext.config.logger.info("Found keys to possibly import");
155
- const parsed = JSON.parse(attribute.content.value.key);
156
- for (const [k, v] of parsed) {
157
- const currentKeys = globalThis.fakeKeyStorage;
158
- if (!currentKeys.has(k)) {
159
- globalThis.fakeKeyStorage.set(k, v);
160
- agentContext.config.logger.info(`Added key ${k} to fake keystore`);
161
- }
162
- else {
163
- agentContext.config.logger.info(`Key ${k} already in fake keystore`);
164
- }
165
- }
166
- }
167
- records.push(record);
168
- }
169
- return records;
170
- }
171
- // should only be used for exporting data out of the credo environment
172
- async getAllAsAttributes(agentContext, recordClass) {
173
- agentContext.config.logger.debug(`Getting all records of type ${recordClass.name}`);
174
- const attributes = await this.attributeController.getLocalAttributes({ "content.value.@type": "VerifiableCredential", shareInfo: { $exists: false } });
175
- return attributes;
176
- }
177
- async findByQuery(agentContext, recordClass, query, queryOptions) {
178
- agentContext.config.logger.debug(`Finding records by query ${JSON.stringify(query)} and options ${JSON.stringify(queryOptions)}`);
179
- const records = [];
180
- for (const record of await this.getAll(agentContext, recordClass)) {
181
- let match = true;
182
- for (const [key, value] of Object.entries(query)) {
183
- if (record[key] !== value) {
184
- match = false;
185
- break;
186
- }
187
- }
188
- if (match) {
189
- records.push(record);
190
- }
191
- }
192
- if (records.length === 0) {
193
- // try to recover over local storrage - temporary fix
194
- for (const record of this.storrage.values()) {
195
- let match = true;
196
- // there may be keys labeled with an $or - solve them accordingly
197
- // TODO: $or and other operators not yet supported
198
- for (const [key, value] of Object.entries(query)) {
199
- if (record[key] !== value) {
200
- match = false;
201
- break;
202
- }
203
- }
204
- if (match) {
205
- records.push(record);
206
- }
207
- }
208
- }
209
- return records;
210
- }
211
- };
212
- exports.EnmeshedStorageService = EnmeshedStorageService;
213
- exports.EnmeshedStorageService = EnmeshedStorageService = __decorate([
214
- (0, core_1.injectable)(),
215
- __metadata("design:paramtypes", [transport_1.AccountController,
216
- AttributesController_1.AttributesController])
217
- ], EnmeshedStorageService);
218
- //# sourceMappingURL=EnmeshedStorageService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EnmeshedStorageService.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/EnmeshedStorageService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAgBwB;AACxB,4CAAmD;AACnD,kDAA2C;AAC3C,gDAAqD;AACrD,gFAA6E;AAGtE,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAG/B,YACW,iBAAoC,EACpC,mBAAyC;QADzC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,wBAAmB,GAAnB,mBAAmB,CAAsB;QAJ7C,aAAQ,GAAmB,IAAI,GAAG,EAAa,CAAC;IAKpD,CAAC;IAEG,KAAK,CAAC,IAAI,CAAC,YAA0B,EAAE,MAAS;QACnD,IAAI,MAAM,CAAC,EAAE,KAAK,2BAA2B,EAAE,CAAC;YAC5C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YACrC,OAAO;QACX,CAAC;QAED,IAAI,MAAM,CA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AAC,KAAK,CAAC,EAAE,CAAC;oBAC/C,IAAK,MAAc,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE,CAAC;wBACjC,KAAK,GAAG,KAAK,CAAC;wBACd,MAAM;oBACV,CAAC;gBACL,CAAC;gBACD,IAAI,KAAK,EAAE,CAAC;oBACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACzB,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAA;AA1MY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,iBAAU,GAAE;qCAKqB,6BAAiB;QACf,2CAAoB;GAL3C,sBAAsB,CA0MlC"}
@@ -1,34 +0,0 @@
1
- import { X509Module } from "@credo-ts/core";
2
- import { OpenId4VcModule, type OpenId4VciMetadata, type OpenId4VciResolvedCredentialOffer, type OpenId4VpResolvedAuthorizationRequest } from "@credo-ts/openid4vc";
3
- import { AccountController } from "@nmshd/transport";
4
- import { AttributesController } from "../../attributes";
5
- import { BaseAgent } from "./BaseAgent";
6
- declare function getOpenIdHolderModules(): {
7
- readonly openid4vc: OpenId4VcModule<null, null>;
8
- readonly x509: X509Module;
9
- };
10
- export declare class Holder extends BaseAgent<ReturnType<typeof getOpenIdHolderModules>> {
11
- client: {
12
- clientId: string;
13
- redirectUri: string;
14
- };
15
- constructor(accountController: AccountController, attributeController: AttributesController);
16
- getVerifiableCredentials(ids: string[] | undefined): Promise<any[]>;
17
- resolveCredentialOffer(credentialOffer: string): Promise<any>;
18
- resolveIssuerMetadata(credentialIssuer: string): Promise<OpenId4VciMetadata>;
19
- initiateAuthorization(resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, credentialsToRequest: string[]): Promise<any>;
20
- requestAndStoreCredentials(resolvedCredentialOffer: OpenId4VciResolvedCredentialOffer, options: {
21
- clientId?: string;
22
- codeVerifier?: string;
23
- credentialsToRequest: string[];
24
- code?: string;
25
- redirectUri?: string;
26
- txCode?: string;
27
- }): Promise<any>;
28
- resolveProofRequest(proofRequest: string): Promise<any>;
29
- acceptPresentationRequest(resolvedPresentationRequest: OpenId4VpResolvedAuthorizationRequest): Promise<any>;
30
- exit(): Promise<any>;
31
- restart(): Promise<any>;
32
- }
33
- export {};
34
- //# sourceMappingURL=Holder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Holder.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/Holder.ts"],"names":[],"mappings":"AAAA,OAAO,EAYH,UAAU,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,eAAe,EAIf,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,EACtC,KAAK,qCAAqC,EAC7C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,iBAAS,sBAAsB;;;EAW9B;AAED,qBAAa,MAAO,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACrE,MAAM;;;MAGX;gBAEiB,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB;IAIrF,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IASnE,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI7D,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI5E,qBAAqB,CAAC,uBAAuB,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAgC/H,0BAA0B,CACnC,uBAAuB,EAAE,iCAAiC,EAC1D,OAAO,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,oBAAoB,EAAE,MAAM,EAAE,CAAC;QAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,GACF,OAAO,CAAC,GAAG,CAAC;IA2HF,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAMvD,yBAAyB,CAAC,2BAA2B,EAAE,qCAAqC,GAAG,OAAO,CAAC,GAAG,CAAC;IAuD3G,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAKpB,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;CAGvC"}
@@ -1,225 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Holder = void 0;
4
- const core_1 = require("@credo-ts/core");
5
- const openid4vc_1 = require("@credo-ts/openid4vc");
6
- const BaseAgent_1 = require("./BaseAgent");
7
- function getOpenIdHolderModules() {
8
- return {
9
- openid4vc: new openid4vc_1.OpenId4VcModule(),
10
- x509: new core_1.X509Module({
11
- getTrustedCertificatesForVerification: (_agentContext, { certificateChain, verification }) => {
12
- // eslint-disable-next-line no-console
13
- console.log(`dyncamically trusting certificate ${certificateChain[0].getIssuerNameField("C")} for verification of ${verification.type}`);
14
- return [certificateChain[0].toString("pem")];
15
- }
16
- })
17
- };
18
- }
19
- class Holder extends BaseAgent_1.BaseAgent {
20
- constructor(accountController, attributeController) {
21
- super(3000, `OpenId4VcHolder ${Math.random().toString()}`, getOpenIdHolderModules(), accountController, attributeController);
22
- this.client = {
23
- clientId: "wallet",
24
- redirectUri: "http://localhost:3000/redirect"
25
- };
26
- }
27
- async getVerifiableCredentials(ids) {
28
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
29
- const storageService = this.agent.dependencyManager.resolve(core_1.InjectionSymbols.StorageService);
30
- const allCredentials = await storageService.getAllAsAttributes(this.agent.context, core_1.SdJwtVcRecord);
31
- if (!ids)
32
- return allCredentials;
33
- return allCredentials.filter((vc) => ids.includes(vc.id.toString()));
34
- }
35
- async resolveCredentialOffer(credentialOffer) {
36
- return await this.agent.openid4vc.holder.resolveCredentialOffer(credentialOffer);
37
- }
38
- async resolveIssuerMetadata(credentialIssuer) {
39
- return await this.agent.openid4vc.holder.resolveIssuerMetadata(credentialIssuer);
40
- }
41
- async initiateAuthorization(resolvedCredentialOffer, credentialsToRequest) {
42
- const grants = resolvedCredentialOffer.credentialOfferPayload.grants;
43
- if (grants?.[openid4vc_1.preAuthorizedCodeGrantIdentifier]) {
44
- return {
45
- authorizationFlow: "PreAuthorized",
46
- preAuthorizedCode: grants[openid4vc_1.preAuthorizedCodeGrantIdentifier]["pre-authorized_code"]
47
- };
48
- }
49
- if (resolvedCredentialOffer.credentialOfferPayload.grants?.[openid4vc_1.authorizationCodeGrantIdentifier]) {
50
- const resolvedAuthorizationRequest = await this.agent.openid4vc.holder.resolveOpenId4VciAuthorizationRequest(resolvedCredentialOffer, {
51
- clientId: this.client.clientId,
52
- redirectUri: this.client.redirectUri,
53
- scope: Object.entries(resolvedCredentialOffer.offeredCredentialConfigurations)
54
- .map(([id, value]) => (credentialsToRequest.includes(id) ? value.scope : undefined))
55
- .filter((v) => Boolean(v))
56
- });
57
- if (resolvedAuthorizationRequest.authorizationFlow === openid4vc_1.OpenId4VciAuthorizationFlow.PresentationDuringIssuance) {
58
- return {
59
- ...resolvedAuthorizationRequest,
60
- authorizationFlow: `${openid4vc_1.OpenId4VciAuthorizationFlow.PresentationDuringIssuance}`
61
- };
62
- }
63
- return {
64
- ...resolvedAuthorizationRequest,
65
- authorizationFlow: `${openid4vc_1.OpenId4VciAuthorizationFlow.Oauth2Redirect}`
66
- };
67
- }
68
- throw new Error("Unsupported grant type");
69
- }
70
- async requestAndStoreCredentials(resolvedCredentialOffer, options) {
71
- const tokenResponse = await this.agent.openid4vc.holder.requestToken(options.code && options.clientId
72
- ? {
73
- resolvedCredentialOffer,
74
- clientId: options.clientId,
75
- codeVerifier: options.codeVerifier,
76
- code: options.code,
77
- redirectUri: options.redirectUri
78
- }
79
- : {
80
- resolvedCredentialOffer,
81
- txCode: options.txCode
82
- });
83
- const credentialResponse = await this.agent.openid4vc.holder.requestCredentials({
84
- resolvedCredentialOffer,
85
- clientId: options.clientId,
86
- credentialConfigurationIds: options.credentialsToRequest,
87
- credentialBindingResolver: async ({ supportedDidMethods, supportsAllDidMethods, proofTypes }) => {
88
- const key = await this.agent.kms.createKeyForSignatureAlgorithm({
89
- algorithm: proofTypes.jwt?.supportedSignatureAlgorithms[0] ?? "EdDSA"
90
- });
91
- const publicJwk = core_1.Kms.PublicJwk.fromPublicJwk(key.publicJwk);
92
- if (supportsAllDidMethods || supportedDidMethods?.includes("did:key")) {
93
- await this.agent.dids.create({
94
- method: "key",
95
- options: {
96
- keyId: key.keyId
97
- }
98
- });
99
- const didKey = new core_1.DidKey(publicJwk);
100
- return {
101
- method: "did",
102
- didUrls: [`${didKey.did}#${didKey.publicJwk.fingerprint}`]
103
- };
104
- }
105
- if (supportedDidMethods?.includes("did:jwk")) {
106
- const didJwk = core_1.DidJwk.fromPublicJwk(publicJwk);
107
- await this.agent.dids.create({
108
- method: "jwk",
109
- options: {
110
- keyId: key.keyId
111
- }
112
- });
113
- return {
114
- method: "did",
115
- didUrls: [`${didJwk.did}#0`]
116
- };
117
- }
118
- // We fall back on jwk binding
119
- return {
120
- method: "jwk",
121
- keys: [publicJwk]
122
- };
123
- },
124
- ...tokenResponse
125
- });
126
- this.agent.config.logger.info("Credential response:", credentialResponse);
127
- const storedCredentials = await Promise.all(credentialResponse.credentials.map((response) => {
128
- // TODO: batch issuance not yet supported
129
- const credential = response.credentials[0];
130
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
131
- const enmeshedStorageService = this.agent.dependencyManager.resolve(core_1.InjectionSymbols.StorageService);
132
- let credentialKey = "";
133
- for (const resolved in resolvedCredentialOffer.offeredCredentialConfigurations) {
134
- credentialKey = resolved;
135
- }
136
- const displayInfo = resolvedCredentialOffer.offeredCredentialConfigurations[credentialKey].display;
137
- // if the displayInfo does not provide a logo - we try to load a logo from the issuers attributes
138
- if (displayInfo !== undefined &&
139
- displayInfo[0]?.logo === undefined &&
140
- resolvedCredentialOffer.metadata.credentialIssuer.display !== undefined &&
141
- resolvedCredentialOffer.metadata.credentialIssuer.display?.[0] !== undefined &&
142
- resolvedCredentialOffer.metadata.credentialIssuer.display?.[0]?.["logo"] !== undefined) {
143
- const logoInformation = resolvedCredentialOffer.metadata.credentialIssuer.display?.[0]?.["logo"];
144
- displayInfo[0]["logo"] = logoInformation;
145
- }
146
- if (credential.claimFormat === core_1.ClaimFormat.MsoMdoc) {
147
- return enmeshedStorageService.saveWithDisplay(this.agent.context, credential.base64Url, credential.claimFormat.toString(), JSON.stringify(displayInfo), credentialKey);
148
- }
149
- else if (credential.claimFormat === core_1.ClaimFormat.SdJwtDc) {
150
- return enmeshedStorageService.saveWithDisplay(this.agent.context, credential.compact, credential.claimFormat.toString(), JSON.stringify(displayInfo), credentialKey);
151
- }
152
- else if (credential.claimFormat === core_1.ClaimFormat.SdJwtW3cVc) {
153
- return enmeshedStorageService.saveWithDisplay(this.agent.context, credential.encoded, credential.claimFormat.toString(), JSON.stringify(displayInfo), credentialKey);
154
- }
155
- throw new Error("Unsupported credential format");
156
- }));
157
- this.agent.config.logger.info(`Stored credentials: ${JSON.stringify(storedCredentials)}`);
158
- return storedCredentials;
159
- }
160
- async resolveProofRequest(proofRequest) {
161
- const resolvedProofRequest = await this.agent.openid4vc.holder.resolveOpenId4VpAuthorizationRequest(proofRequest);
162
- return resolvedProofRequest;
163
- }
164
- async acceptPresentationRequest(resolvedPresentationRequest) {
165
- if (!resolvedPresentationRequest.presentationExchange && !resolvedPresentationRequest.dcql) {
166
- throw new Error("Missing presentation exchange or dcql on resolved authorization request");
167
- }
168
- // This fix ensures that the credential records which have been loaded here actually do provide the encoded() method
169
- // this issue arises as the records are loaded and then communicated to the app as a json object, losing the class prototype
170
- if (resolvedPresentationRequest.presentationExchange) {
171
- for (const requirementKey in resolvedPresentationRequest.presentationExchange.credentialsForRequest.requirements) {
172
- const requirement = resolvedPresentationRequest.presentationExchange.credentialsForRequest.requirements[requirementKey];
173
- for (const submissionEntry of requirement.submissionEntry) {
174
- for (const vc of submissionEntry.verifiableCredentials) {
175
- if (vc.claimFormat === core_1.ClaimFormat.SdJwtDc) {
176
- const recordUncast = vc.credentialRecord;
177
- const record = new core_1.SdJwtVcRecord({
178
- id: recordUncast.id,
179
- createdAt: recordUncast.createdAt,
180
- compactSdJwtVc: recordUncast.compactSdJwtVc
181
- });
182
- vc.credentialRecord = record;
183
- }
184
- else if (vc.claimFormat === core_1.ClaimFormat.MsoMdoc) {
185
- const recordUncast = vc.credentialRecord;
186
- const record = new core_1.MdocRecord({
187
- id: recordUncast.id,
188
- createdAt: recordUncast.createdAt,
189
- mdoc: core_1.Mdoc.fromBase64Url(recordUncast.base64Url)
190
- });
191
- vc.credentialRecord = record;
192
- }
193
- else {
194
- // eslint-disable-next-line no-console
195
- console.log("Unsupported credential format in demo app, only sd-jwt-vc is supported at the moment");
196
- }
197
- }
198
- }
199
- }
200
- }
201
- const submissionResult = await this.agent.openid4vc.holder.acceptOpenId4VpAuthorizationRequest({
202
- authorizationRequestPayload: resolvedPresentationRequest.authorizationRequestPayload,
203
- presentationExchange: resolvedPresentationRequest.presentationExchange
204
- ? {
205
- credentials: this.agent.openid4vc.holder.selectCredentialsForPresentationExchangeRequest(resolvedPresentationRequest.presentationExchange.credentialsForRequest)
206
- }
207
- : undefined,
208
- dcql: resolvedPresentationRequest.dcql
209
- ? {
210
- credentials: this.agent.openid4vc.holder.selectCredentialsForDcqlRequest(resolvedPresentationRequest.dcql.queryResult)
211
- }
212
- : undefined
213
- });
214
- return submissionResult.serverResponse;
215
- }
216
- async exit() {
217
- await this.shutdown();
218
- process.exit(0);
219
- }
220
- async restart() {
221
- await this.shutdown();
222
- }
223
- }
224
- exports.Holder = Holder;
225
- //# sourceMappingURL=Holder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Holder.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/Holder.ts"],"names":[],"mappings":";;;AAAA,yCAawB;AACxB,mDAQ6B;AAG7B,2CAAwC;AAGxC,SAAS,sBAAsB;IAC3B,OAAO;QACH,SAAS,EAAE,IAAI,2BAAe,EAAE;QAChC,IAAI,EAAE,IAAI,iBAAU,CAAC;YACjB,qCAAqC,EAAE,CAAC,aAAa,EAAE,EAAE,gBAAgB,EAAE,YAAY,EAAE,EAAE,EAAE;gBACzF,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,qCAAqC,gBAAgB,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,wBAAwB,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC;gBACzI,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YACjD,CAAC;SACJ,CAAC;KACI,CAAC;AACf,CAAC;AAED,MAAa,MAAO,SAAQ,qBAAoD;IAM5E,YAAmB,iBAAoC,EAAE,mBAAyC;QAC9F,KAAK,CAAC,IAAI,EAAE,mBAAmB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,sBAAsB,EAAE,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;QAN1H,WAAM,GAAG;YACZ,QAAQ,EAAE,QAAQ;YAClB,WAAW,EAAE,gCAAgC;SAChD,CAAC;IAIF,CAAC;IAEM,KAAK,CAAC,wBAAwB,CAAC,GAAyB;QAC3D,4EAA4E;QAC5E,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,uBAAgB,CAAC,cAAc,CAAuC,CAAC;QACnI,MAAM,cAAc,GAAG,MAAM,cAAc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IAC3C,CAAC;IAEM,KAAK,CAAC,IAAI;QACb,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAEM,KAAK,CAAC,OAAO;QAChB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACJ;AArQD,wBAqQC"}
@@ -1,3 +0,0 @@
1
- import { AgentDependencies } from "@credo-ts/core";
2
- export declare const agentDependencies: AgentDependencies;
3
- //# sourceMappingURL=LocalAgentDependencies.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAgentDependencies.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/LocalAgentDependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQnD,eAAO,MAAM,iBAAiB,EAAE,iBAK/B,CAAC"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.agentDependencies = void 0;
7
- const events_1 = require("events");
8
- const ws_1 = __importDefault(require("ws"));
9
- const EnmeshedHolderFileSystem_1 = require("./EnmeshedHolderFileSystem");
10
- const fetchImpl = globalThis.fetch;
11
- const webSocketImpl = ws_1.default;
12
- exports.agentDependencies = {
13
- FileSystem: EnmeshedHolderFileSystem_1.EnmeshedHolderFileSystem,
14
- EventEmitterClass: events_1.EventEmitter,
15
- fetch: fetchImpl,
16
- WebSocketClass: webSocketImpl
17
- };
18
- //# sourceMappingURL=LocalAgentDependencies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocalAgentDependencies.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/LocalAgentDependencies.ts"],"names":[],"mappings":";;;;;;AAEA,mCAAsC;AACtC,4CAA2B;AAC3B,yEAAsE;AAEtE,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC;AACnC,MAAM,aAAa,GAAG,YAAS,CAAC;AAEnB,QAAA,iBAAiB,GAAsB;IAChD,UAAU,EAAE,mDAAwB;IACpC,iBAAiB,EAAE,qBAAY;IAC/B,KAAK,EAAE,SAAS;IAChB,cAAc,EAAE,aAAa;CAChC,CAAC"}