@nmshd/consumption 7.0.0-openid4vc.6 → 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 -17
  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 -20
  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,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OwnSharedAttributeDeletedByOwnerNotificationItemProcessor = void 0;
4
- const core_types_1 = require("@nmshd/core-types");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const common_1 = require("../../../common");
9
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
10
- class OwnSharedAttributeDeletedByOwnerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
11
- constructor(consumptionController) {
12
- super(consumptionController);
13
- this._logger = transport_1.TransportLoggerFactory.getLogger(OwnSharedAttributeDeletedByOwnerNotificationItemProcessor);
14
- }
15
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
16
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
17
- if (!attribute)
18
- return common_1.ValidationResult.success();
19
- if (!attribute.isPeerSharedAttribute()) {
20
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.isNotPeerSharedAttribute(notificationItem.attributeId));
21
- }
22
- if (!notification.peer.equals(attribute.shareInfo.peer)) {
23
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
24
- }
25
- return common_1.ValidationResult.success();
26
- }
27
- async process(notificationItem, _notification) {
28
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
29
- if (!attribute)
30
- return;
31
- const deletionInfo = attributes_1.LocalAttributeDeletionInfo.from({
32
- deletionStatus: attributes_1.LocalAttributeDeletionStatus.DeletedByOwner,
33
- deletionDate: core_types_1.CoreDate.utc()
34
- });
35
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
36
- for (const attr of [attribute, ...predecessors]) {
37
- if (!attr.deletionInfo) {
38
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
39
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
40
- }
41
- }
42
- return new attributes_1.OwnSharedAttributeDeletedByOwnerEvent(this.currentIdentityAddress.toString(), attribute);
43
- }
44
- async rollback(notificationItem, _notification) {
45
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
46
- if (!attribute)
47
- return;
48
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
49
- for (const attr of [attribute, ...predecessors]) {
50
- attr.deletionInfo = undefined;
51
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
52
- }
53
- }
54
- }
55
- exports.OwnSharedAttributeDeletedByOwnerNotificationItemProcessor = OwnSharedAttributeDeletedByOwnerNotificationItemProcessor;
56
- //# sourceMappingURL=OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/OwnSharedAttributeDeletedByOwnerNotificationItemProcessor.ts"],"names":[],"mappings":";;;AAEA,kDAA6C;AAC7C,gDAA0D;AAE1D,yFAAsF;AACtF,oDAAsI;AACtI,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,yDAA0D,SAAQ,qEAAmF;IAG9J,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,yDAAyD,CAAC,CAAC;IAC/G,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAAkE,EAClE,YAA+B;QAE/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,CAAC,SAAS;YAAE,OAAO,yBAAgB,CAAC,OAAO,EAAE,CAAC;QAElD,IAAI,CAAC,SAAS,CAAC,qBAAqB,EAAE,EAAE,CAAC;YACrC,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;QAC3H,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACtD,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,gCAAgC,CAAC,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;QACtJ,CAAC;QAED,OAAO,yBAAgB,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAEe,KAAK,CAAC,OAAO,CACzB,gBAAkE,EAClE,aAAgC;QAEhC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC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C,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACL,CAAC;CACJ;AA7DD,8HA6DC"}
@@ -1,14 +0,0 @@
1
- import { PeerSharedAttributeDeletedByPeerNotificationItem } from "@nmshd/content";
2
- import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
- import { PeerSharedAttributeDeletedByPeerEvent } from "../../../attributes";
4
- import { ValidationResult } from "../../../common";
5
- import { LocalNotification } from "../../local/LocalNotification";
6
- import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
- export declare class PeerSharedAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor<PeerSharedAttributeDeletedByPeerNotificationItem> {
8
- private readonly _logger;
9
- constructor(consumptionController: ConsumptionController);
10
- checkPrerequisitesOfIncomingNotificationItem(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
- process(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<PeerSharedAttributeDeletedByPeerEvent | void>;
12
- rollback(notificationItem: PeerSharedAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<void>;
13
- }
14
- //# sourceMappingURL=PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PeerSharedAttributeDeletedByPeerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gDAAgD,EAAE,MAAM,gBAAgB,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,yDAA0D,SAAQ,iCAAiC,CAAC,gDAAgD,CAAC;IAC9J,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,gDAAgD,EAClE,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAgBN,OAAO,CACzB,gBAAgB,EAAE,gDAAgD,EAClE,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,qCAAqC,GAAG,IAAI,CAAC;IAoBlC,QAAQ,CAAC,gBAAgB,EAAE,gDAAgD,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYtJ"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PeerSharedAttributeDeletedByPeerNotificationItemProcessor = void 0;
4
- const core_types_1 = require("@nmshd/core-types");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const LocalAttributeDeletionInfo_1 = require("../../../attributes/local/LocalAttributeDeletionInfo");
9
- const common_1 = require("../../../common");
10
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
11
- class PeerSharedAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
12
- constructor(consumptionController) {
13
- super(consumptionController);
14
- this._logger = transport_1.TransportLoggerFactory.getLogger(PeerSharedAttributeDeletedByPeerNotificationItemProcessor);
15
- }
16
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
17
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
18
- if (!attribute)
19
- return common_1.ValidationResult.success();
20
- if (!attribute.isOwnSharedAttribute(this.currentIdentityAddress)) {
21
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.isNotOwnSharedAttribute(notificationItem.attributeId));
22
- }
23
- if (!notification.peer.equals(attribute.shareInfo.peer)) {
24
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
25
- }
26
- return common_1.ValidationResult.success();
27
- }
28
- async process(notificationItem, _notification) {
29
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
30
- if (!attribute)
31
- return;
32
- const deletionDate = core_types_1.CoreDate.utc();
33
- const deletionInfo = LocalAttributeDeletionInfo_1.LocalAttributeDeletionInfo.from({
34
- deletionStatus: LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByPeer,
35
- deletionDate: deletionDate
36
- });
37
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
38
- for (const attr of [attribute, ...predecessors]) {
39
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
40
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
41
- }
42
- return new attributes_1.PeerSharedAttributeDeletedByPeerEvent(this.currentIdentityAddress.toString(), attribute);
43
- }
44
- async rollback(notificationItem, _notification) {
45
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
46
- if (!attribute)
47
- return;
48
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
49
- for (const attr of [attribute, ...predecessors]) {
50
- // the previous deletionState cannot be unambiguously known, either it was undefined or 'toBeDeletedByPeer'
51
- attr.deletionInfo = undefined;
52
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
53
- }
54
- }
55
- }
56
- exports.PeerSharedAttributeDeletedByPeerNotificationItemProcessor = PeerSharedAttributeDeletedByPeerNotificationItemProcessor;
57
- //# sourceMappingURL=PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PeerSharedAttributeDeletedByPeerNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/PeerSharedAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":";;;AAEA,kDAA6C;AAC7C,gDAA0D;AAE1D,yFAAsF;AACtF,oDAA4E;AAC5E,qGAAgI;AAChI,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,yDAA0D,SAAQ,qEAAmF;IAG9J,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,yDAAyD,CAAC,CAAC;IAC/G,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAAkE,EAClE,YAA+B;QAE/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,CAAC,SAAS;YAAE,OAAO,yBAAgB,CAAC,OAAO,EAAE,CAAC;QAElD,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,sBAAsB,CAAC,EAAE,CAAC;YAC/D,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;QAC1H,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;YACtD,OAAO,yBAAgB,CAAC,KAAK,CAAC,6CAAqB,CAAC,UAAU,CAAC,gCAAgC,CAAC,YAAY,CAAC,IAAI,EAA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AAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAE1G,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC9C,2GAA2G;YAC3G,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACL,CAAC;CACJ;AA9DD,8HA8DC"}
@@ -1,14 +0,0 @@
1
- import { ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem } from "@nmshd/content";
2
- import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
- import { ThirdPartyRelationshipAttributeDeletedByPeerEvent } from "../../../attributes";
4
- import { ValidationResult } from "../../../common";
5
- import { LocalNotification } from "../../local/LocalNotification";
6
- import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
- export declare class ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor<ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem> {
8
- private readonly _logger;
9
- constructor(consumptionController: ConsumptionController);
10
- checkPrerequisitesOfIncomingNotificationItem(notificationItem: ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
- process(notificationItem: ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<ThirdPartyRelationshipAttributeDeletedByPeerEvent | void>;
12
- rollback(notificationItem: ThirdPartyRelationshipAttributeDeletedByPeerNotificationItem, _notification: LocalNotification): Promise<void>;
13
- }
14
- //# sourceMappingURL=ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4DAA4D,EAAE,MAAM,gBAAgB,CAAC;AAG9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAE,iDAAiD,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,qEAAsE,SAAQ,iCAAiC,CAAC,4DAA4D,CAAC;IACtL,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,4DAA4D,EAC9E,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAgBN,OAAO,CACzB,gBAAgB,EAAE,4DAA4D,EAC9E,aAAa,EAAE,iBAAiB,GACjC,OAAO,CAAC,iDAAiD,GAAG,IAAI,CAAC;IAoB9C,QAAQ,CAAC,gBAAgB,EAAE,4DAA4D,EAAE,aAAa,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAYlK"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor = void 0;
4
- const core_types_1 = require("@nmshd/core-types");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const LocalAttributeDeletionInfo_1 = require("../../../attributes/local/LocalAttributeDeletionInfo");
9
- const common_1 = require("../../../common");
10
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
11
- class ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
12
- constructor(consumptionController) {
13
- super(consumptionController);
14
- this._logger = transport_1.TransportLoggerFactory.getLogger(ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor);
15
- }
16
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
17
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
18
- if (!attribute)
19
- return common_1.ValidationResult.success();
20
- if (!attribute.isThirdPartyRelationshipAttribute()) {
21
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.isNotThirdPartyRelationshipAttribute(notificationItem.attributeId));
22
- }
23
- if (!notification.peer.equals(attribute.shareInfo.peer)) {
24
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.senderIsNotPeerOfSharedAttribute(notification.peer, notificationItem.attributeId));
25
- }
26
- return common_1.ValidationResult.success();
27
- }
28
- async process(notificationItem, _notification) {
29
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
30
- if (!attribute)
31
- return;
32
- const deletionDate = core_types_1.CoreDate.utc();
33
- const deletionInfo = LocalAttributeDeletionInfo_1.LocalAttributeDeletionInfo.from({
34
- deletionStatus: LocalAttributeDeletionInfo_1.LocalAttributeDeletionStatus.DeletedByPeer,
35
- deletionDate: deletionDate
36
- });
37
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
38
- for (const attr of [attribute, ...predecessors]) {
39
- attr.setDeletionInfo(deletionInfo, this.accountController.identity.address);
40
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
41
- }
42
- return new attributes_1.ThirdPartyRelationshipAttributeDeletedByPeerEvent(this.currentIdentityAddress.toString(), attribute);
43
- }
44
- async rollback(notificationItem, _notification) {
45
- const attribute = await this.consumptionController.attributes.getLocalAttribute(notificationItem.attributeId);
46
- if (!attribute)
47
- return;
48
- const predecessors = await this.consumptionController.attributes.getPredecessorsOfAttribute(attribute.id);
49
- for (const attr of [attribute, ...predecessors]) {
50
- // the previous deletionState cannot be unambiguously known, either it was undefined or 'toBeDeletedByPeer'
51
- attr.deletionInfo = undefined;
52
- await this.consumptionController.attributes.updateAttributeUnsafe(attr);
53
- }
54
- }
55
- }
56
- exports.ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor = ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor;
57
- //# sourceMappingURL=ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeDeleted/ThirdPartyRelationshipAttributeDeletedByPeerNotificationItemProcessor.ts"],"names":[],"mappings":";;;AAEA,kDAA6C;AAC7C,gDAA0D;AAE1D,yFAAsF;AACtF,oDAAwF;AACxF,qGAAgI;AAChI,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,qEAAsE,SAAQ,qEAA+F;IAGtL,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,qEAAqE,CAAC,CAAC;IAC3H,CAAC;IAEe,KAAK,CAAC,4CAA4C,CAC9D,gBAA8E,EAC9E,YAA+B;QAE/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAE9G,IAAI,CAAC,SAAS;YAAE,OAAO,yBAAgB,CAAC,OAAO,EAAE,CAAC;QAElD,IAAI,CAAC,SAAS,CAAC,iCAAiC,EAAE,EAAE,CAAC;YACjD,OAAO,yBAAgB,CAAC,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AC,IAAI,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAC;IACpH,CAAC;IAEe,KAAK,CAAC,QAAQ,CAAC,gBAA8E,EAAE,aAAgC;QAC3I,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC9G,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,0BAA0B,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAE1G,KAAK,MAAM,IAAI,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,EAAE,CAAC;YAC9C,2GAA2G;YAC3G,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;YAC9B,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;IACL,CAAC;CACJ;AA9DD,sJA8DC"}
@@ -1,15 +0,0 @@
1
- import { PeerSharedAttributeSucceededNotificationItem } from "@nmshd/content";
2
- import { ConsumptionController } from "../../../../consumption/ConsumptionController";
3
- import { PeerSharedAttributeSucceededEvent } from "../../../attributes";
4
- import { ValidationResult } from "../../../common";
5
- import { LocalNotification } from "../../local/LocalNotification";
6
- import { AbstractNotificationItemProcessor } from "../AbstractNotificationItemProcessor";
7
- export declare class PeerSharedAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor<PeerSharedAttributeSucceededNotificationItem> {
8
- private readonly _logger;
9
- constructor(consumptionController: ConsumptionController);
10
- checkPrerequisitesOfIncomingNotificationItem(notificationItem: PeerSharedAttributeSucceededNotificationItem, notification: LocalNotification): Promise<ValidationResult>;
11
- process(notificationItem: PeerSharedAttributeSucceededNotificationItem, notification: LocalNotification): Promise<PeerSharedAttributeSucceededEvent>;
12
- rollback(notificationItem: PeerSharedAttributeSucceededNotificationItem, notification: LocalNotification): Promise<void>;
13
- private rollbackPartialWork;
14
- }
15
- //# sourceMappingURL=PeerSharedAttributeSucceededNotificationItemProcessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PeerSharedAttributeSucceededNotificationItemProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,4CAA4C,EAAE,MAAM,gBAAgB,CAAC;AAEjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF,OAAO,EAAkB,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAEzF,qBAAa,qDAAsD,SAAQ,iCAAiC,CAAC,4CAA4C,CAAC;IACtJ,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,qBAAqB,EAAE,qBAAqB;IAKzC,4CAA4C,CAC9D,gBAAgB,EAAE,4CAA4C,EAC9D,YAAY,EAAE,iBAAiB,GAChC,OAAO,CAAC,gBAAgB,CAAC;IAoBN,OAAO,CAAC,gBAAgB,EAAE,4CAA4C,EAAE,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,iCAAiC,CAAC;IAkCpJ,QAAQ,CAAC,gBAAgB,EAAE,4CAA4C,EAAE,YAAY,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;YAIhI,mBAAmB;CAgBpC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PeerSharedAttributeSucceededNotificationItemProcessor = void 0;
4
- const content_1 = require("@nmshd/content");
5
- const transport_1 = require("@nmshd/transport");
6
- const ConsumptionCoreErrors_1 = require("../../../../consumption/ConsumptionCoreErrors");
7
- const attributes_1 = require("../../../attributes");
8
- const common_1 = require("../../../common");
9
- const AbstractNotificationItemProcessor_1 = require("../AbstractNotificationItemProcessor");
10
- class PeerSharedAttributeSucceededNotificationItemProcessor extends AbstractNotificationItemProcessor_1.AbstractNotificationItemProcessor {
11
- constructor(consumptionController) {
12
- super(consumptionController);
13
- this._logger = transport_1.TransportLoggerFactory.getLogger(PeerSharedAttributeSucceededNotificationItemProcessor);
14
- }
15
- async checkPrerequisitesOfIncomingNotificationItem(notificationItem, notification) {
16
- if (!notification.peer.equals(notificationItem.successorContent.owner)) {
17
- return common_1.ValidationResult.error(ConsumptionCoreErrors_1.ConsumptionCoreErrors.attributes.successionPeerIsNotOwner());
18
- }
19
- const successorParams = {
20
- id: notificationItem.successorId,
21
- content: notificationItem.successorContent,
22
- shareInfo: { notificationReference: notification.id, peer: notification.peer }
23
- };
24
- if (notificationItem.successorContent instanceof content_1.IdentityAttribute) {
25
- const validationResult = await this.consumptionController.attributes.validatePeerSharedIdentityAttributeSuccession(notificationItem.predecessorId, successorParams);
26
- return validationResult;
27
- }
28
- const validationResult = await this.consumptionController.attributes.validatePeerSharedRelationshipAttributeSuccession(notificationItem.predecessorId, successorParams);
29
- return validationResult;
30
- }
31
- async process(notificationItem, notification) {
32
- const successorParams = {
33
- id: notificationItem.successorId,
34
- content: notificationItem.successorContent,
35
- shareInfo: { notificationReference: notification.id, peer: notification.peer }
36
- };
37
- let predecessor;
38
- let successor;
39
- try {
40
- if (notificationItem.successorContent instanceof content_1.IdentityAttribute) {
41
- ({ predecessor, successor } = await this.consumptionController.attributes.succeedPeerSharedIdentityAttribute(notificationItem.predecessorId, successorParams, false));
42
- }
43
- else {
44
- ({ predecessor, successor } = await this.consumptionController.attributes.succeedPeerSharedRelationshipAttribute(notificationItem.predecessorId, successorParams, false));
45
- }
46
- }
47
- catch (e) {
48
- await this.rollbackPartialWork(notificationItem, notification).catch((e) => this._logger.error(`Rollback failed for notification item (notification id: ${notification.id}).`, e));
49
- throw e;
50
- }
51
- const myAddress = this.consumptionController.accountController.identity.address;
52
- return new attributes_1.PeerSharedAttributeSucceededEvent(myAddress.toString(), predecessor, successor);
53
- }
54
- async rollback(notificationItem, notification) {
55
- await this.rollbackPartialWork(notificationItem, notification);
56
- }
57
- async rollbackPartialWork(notificationItem, _notification) {
58
- const successor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.successorId);
59
- if (successor) {
60
- await this.consumptionController.attributes
61
- .deleteAttributeUnsafe(successor.id)
62
- .catch((e) => this._logger.error(`Deletion failed for attribute (attribute id: ${successor.id}).`, e));
63
- }
64
- const predecessor = await this.consumptionController.attributes.getLocalAttribute(notificationItem.predecessorId);
65
- if (predecessor?.succeededBy) {
66
- predecessor.succeededBy = undefined;
67
- await this.consumptionController.attributes
68
- .updateAttributeUnsafe(predecessor)
69
- .catch((e) => this._logger.error(`Update failed for attribute (attribute id: ${notificationItem.predecessorId}).`, e));
70
- }
71
- }
72
- }
73
- exports.PeerSharedAttributeSucceededNotificationItemProcessor = PeerSharedAttributeSucceededNotificationItemProcessor;
74
- //# sourceMappingURL=PeerSharedAttributeSucceededNotificationItemProcessor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PeerSharedAttributeSucceededNotificationItemProcessor.js","sourceRoot":"","sources":["../../../../../src/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.ts"],"names":[],"mappings":";;;AACA,4CAAiG;AACjG,gDAA0D;AAE1D,yFAAsF;AACtF,oDAAwF;AACxF,4CAAmD;AAEnD,4FAAyF;AAEzF,MAAa,qDAAsD,SAAQ,qEAA+E;IAGtJ,YAAmB,qBAA4C;QAC3D,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,kCAAsB,CAAC,SAAS,CAAC,qDAAqD,CAAC,CAAC;IAC3G,CAAC;IAEe,KAAK,CAA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ACZ,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU;iBACtC,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;iBACnC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,gDAAgD,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/G,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAClH,IAAI,WAAW,EAAE,WAAW,EAAE,CAAC;YAC3B,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC;YACpC,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU;iBACtC,qBAAqB,CAAC,WAAW,CAAC;iBAClC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,8CAA8C,gBAAgB,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/H,CAAC;IACL,CAAC;CACJ;AArFD,sHAqFC"}
@@ -1,17 +0,0 @@
1
- import { ConsumptionBaseController } from "../../consumption/ConsumptionBaseController";
2
- import { ConsumptionController } from "../../consumption/ConsumptionController";
3
- export declare class OpenId4VcController extends ConsumptionBaseController {
4
- constructor(parent: ConsumptionController);
5
- fetchCredentialOffer(credentialOfferUrl: string): Promise<any>;
6
- processFetchedCredentialOffer(fetchedCredentialOffer: string, requestedCredentialOffers: string[], pinCode?: string): Promise<{
7
- data: string;
8
- id: string;
9
- type: string;
10
- displayInformation: string | undefined;
11
- }>;
12
- processCredentialOffer(credentialOffer: string): Promise<any>;
13
- fetchProofRequest(proofRequestUrl: string): Promise<any>;
14
- acceptProofRequest(jsonEncodedRequest: string): Promise<any>;
15
- getVerifiableCredentials(ids: string[] | undefined): Promise<any[]>;
16
- }
17
- //# sourceMappingURL=OpenId4VcController.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VcController.d.ts","sourceRoot":"","sources":["../../../src/modules/openid4vc/OpenId4VcController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAIhF,qBAAa,mBAAoB,SAAQ,yBAAyB;gBAC3C,MAAM,EAAE,qBAAqB;IAInC,oBAAoB,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAS9D,6BAA6B,CACtC,sBAAsB,EAAE,MAAM,EAC9B,yBAAyB,EAAE,MAAM,EAAE,EACnC,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAkBjF,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAY7D,iBAAiB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IASxD,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAa5D,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CAiBnF"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpenId4VcController = void 0;
4
- const ConsumptionBaseController_1 = require("../../consumption/ConsumptionBaseController");
5
- const ConsumptionControllerName_1 = require("../../consumption/ConsumptionControllerName");
6
- const Holder_1 = require("./local/Holder");
7
- class OpenId4VcController extends ConsumptionBaseController_1.ConsumptionBaseController {
8
- constructor(parent) {
9
- super(ConsumptionControllerName_1.ConsumptionControllerName.OpenId4VcController, parent);
10
- }
11
- async fetchCredentialOffer(credentialOfferUrl) {
12
- const holder = new Holder_1.Holder(this.parent.accountController, this.parent.attributes);
13
- await holder.initializeAgent("96213c3d7fc8d4d6754c7a0fd969598e");
14
- const res = await holder.resolveCredentialOffer(credentialOfferUrl);
15
- return {
16
- data: JSON.stringify(res)
17
- };
18
- }
19
- async processFetchedCredentialOffer(fetchedCredentialOffer, requestedCredentialOffers, pinCode) {
20
- const holder = new Holder_1.Holder(this.parent.accountController, this.parent.attributes);
21
- await holder.initializeAgent("96213c3d7fc8d4d6754c7a0fd969598e");
22
- const credentialOffer = JSON.parse(fetchedCredentialOffer);
23
- const credentials = await holder.requestAndStoreCredentials(credentialOffer, { credentialsToRequest: requestedCredentialOffers, txCode: pinCode });
24
- // TODO: support multiple credentials
25
- const credential = credentials[0].content.value;
26
- return {
27
- data: credential.value,
28
- // multi credentials not supported yet
29
- id: credentials[0].id.toString(),
30
- type: credential.type,
31
- displayInformation: credential.displayInformation
32
- };
33
- }
34
- async processCredentialOffer(credentialOffer) {
35
- const holder = new Holder_1.Holder(this.parent.accountController, this.parent.attributes);
36
- await holder.initializeAgent("96213c3d7fc8d4d6754c7a0fd969598e");
37
- const res = await holder.resolveCredentialOffer(credentialOffer);
38
- const credentials = await holder.requestAndStoreCredentials(res, { credentialsToRequest: ["EmployeeIdCard-sdjwt"] });
39
- return {
40
- id: credentials.length > 0 ? credentials[0].id : undefined,
41
- data: JSON.stringify(credentials)
42
- };
43
- }
44
- async fetchProofRequest(proofRequestUrl) {
45
- const holder = new Holder_1.Holder(this.parent.accountController, this.parent.attributes);
46
- await holder.initializeAgent("96213c3d7fc8d4d6754c7a0fd969598e");
47
- const res = await holder.resolveProofRequest(proofRequestUrl);
48
- return {
49
- data: JSON.stringify(res)
50
- };
51
- }
52
- async acceptProofRequest(jsonEncodedRequest) {
53
- const holder = new Holder_1.Holder(this.parent.accountController, this.parent.attributes);
54
- await holder.initializeAgent("96213c3d7fc8d4d6754c7a0fd969598e");
55
- const fetchedRequest = JSON.parse(jsonEncodedRequest);
56
- // parse the credential type to be sdjwt
57
- const serverResponse = await holder.acceptPresentationRequest(fetchedRequest);
58
- return {
59
- status: serverResponse.status,
60
- message: serverResponse.body
61
- };
62
- }
63
- async getVerifiableCredentials(ids) {
64
- const holder = new Holder_1.Holder(this.parent.accountController, this.parent.attributes);
65
- await holder.initializeAgent("96213c3d7fc8d4d6754c7a0fd969598e");
66
- // eslint-disable-next-line no-console
67
- console.log("Fetching credentials with ids:", JSON.stringify(ids));
68
- const credentials = await holder.getVerifiableCredentials(ids);
69
- const result = [];
70
- for (const credential of credentials) {
71
- result.push({
72
- id: credential.id.toString(),
73
- data: credential.content.value.value.toString(),
74
- displayInformation: credential.content.value.displayInformation ?? undefined,
75
- type: credential.content.value.type ?? undefined
76
- });
77
- }
78
- return result;
79
- }
80
- }
81
- exports.OpenId4VcController = OpenId4VcController;
82
- //# sourceMappingURL=OpenId4VcController.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OpenId4VcController.js","sourceRoot":"","sources":["../../../src/modules/openid4vc/OpenId4VcController.ts"],"names":[],"mappings":";;;AACA,2FAAwF;AAExF,2FAAwF;AACxF,2CAAwC;AAExC,MAAa,mBAAoB,SAAQ,qDAAyB;IAC9D,YAAmB,MAA6B;QAC5C,KAAK,CAAC,qDAAyB,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,kBAA0B;QACxD,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACjF,MAAM,MAAM,CAAC,eAAe,CAAC,kCAAkC,CAAC,CAAC;QACjE,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC;QACpE,OAAO;YACH,IAAI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M,CAAC,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACjF,MAAM,MAAM,CAAC,eAAe,CAAC,kCAAkC,CAAC,CAAC;QACjE,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACnC,MAAM,CAAC,IAAI,CAAC;gBACR,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE;gBAC5B,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;gBAC/C,kBAAkB,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,IAAI,SAAS;gBAC5E,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS;aACnD,CAAC,CAAC;QACP,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAvFD,kDAuFC"}
@@ -1,8 +0,0 @@
1
- export * from "./local/BaseAgent";
2
- export * from "./local/EnmeshedHolderFileSystem";
3
- export * from "./local/EnmeshedHolderKeyManagmentService";
4
- export * from "./local/EnmeshedStorageService";
5
- export * from "./local/Holder";
6
- export * from "./local/LocalAgentDependencies";
7
- export * from "./OpenId4VcController";
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/openid4vc/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC;AACjD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/openid4vc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,mEAAiD;AACjD,4EAA0D;AAC1D,iEAA+C;AAC/C,iDAA+B;AAC/B,iEAA+C;AAC/C,wDAAsC"}
@@ -1,20 +0,0 @@
1
- import { Agent, DidKey, type InitConfig, type ModulesMap, type VerificationMethod } from "@credo-ts/core";
2
- import { AccountController } from "@nmshd/transport";
3
- import { AttributesController } from "../../attributes";
4
- export declare class BaseAgent<AgentModules extends ModulesMap> {
5
- readonly port: number;
6
- readonly name: string;
7
- readonly modules: AgentModules;
8
- readonly accountController: AccountController;
9
- readonly attributeController: AttributesController;
10
- config: InitConfig;
11
- agent: Agent<AgentModules>;
12
- did: string;
13
- didKey: DidKey;
14
- kid: string;
15
- verificationMethod: VerificationMethod;
16
- constructor(port: number, name: string, modules: AgentModules, accountController: AccountController, attributeController: AttributesController);
17
- initializeAgent(privateKey: string): Promise<void>;
18
- shutdown(): Promise<void>;
19
- }
20
- //# sourceMappingURL=BaseAgent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseAgent.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/BaseAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EAGL,MAAM,EAGN,KAAK,UAAU,EAEf,KAAK,UAAU,EACf,KAAK,kBAAkB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAKxD,qBAAa,SAAS,CAAC,YAAY,SAAS,UAAU;aAS9B,IAAI,EAAE,MAAM;aACZ,IAAI,EAAE,MAAM;aACZ,OAAO,EAAE,YAAY;aACrB,iBAAiB,EAAE,iBAAiB;aACpC,mBAAmB,EAAE,oBAAoB;IAZtD,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,GAAG,EAAG,MAAM,CAAC;IACb,MAAM,EAAG,MAAM,CAAC;IAChB,GAAG,EAAG,MAAM,CAAC;IACb,kBAAkB,EAAG,kBAAkB,CAAC;gBAG3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,oBAAoB;IA0BhD,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoClD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGzC"}
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseAgent = void 0;
4
- const core_1 = require("@credo-ts/core");
5
- const kms_1 = require("@credo-ts/core/build/modules/kms");
6
- const EnmeshedHolderKeyManagmentService_1 = require("./EnmeshedHolderKeyManagmentService");
7
- const EnmeshedStorageService_1 = require("./EnmeshedStorageService");
8
- const LocalAgentDependencies_1 = require("./LocalAgentDependencies");
9
- class BaseAgent {
10
- constructor(port, name, modules, accountController, attributeController) {
11
- this.port = port;
12
- this.name = name;
13
- this.modules = modules;
14
- this.accountController = accountController;
15
- this.attributeController = attributeController;
16
- this.name = name;
17
- this.port = port;
18
- const config = {
19
- allowInsecureHttpUrls: true,
20
- logger: new core_1.ConsoleLogger(core_1.LogLevel.off)
21
- };
22
- this.config = config;
23
- this.accountController = accountController;
24
- this.attributeController = attributeController;
25
- const dependencyManager = new core_1.DependencyManager();
26
- dependencyManager.registerInstance(core_1.InjectionSymbols.StorageService, new EnmeshedStorageService_1.EnmeshedStorageService(accountController, attributeController));
27
- this.agent = new core_1.Agent({
28
- config,
29
- dependencies: LocalAgentDependencies_1.agentDependencies,
30
- modules
31
- }, dependencyManager);
32
- }
33
- async initializeAgent(privateKey) {
34
- // as we are not using askar we need to set the storage version
35
- const storrage = this.agent.dependencyManager.resolve(core_1.InjectionSymbols.StorageService);
36
- const versionRecord = { id: "STORAGE_VERSION_RECORD_ID", storageVersion: "0.5.0", value: "0.5.0" };
37
- await storrage.save(this.agent.context, versionRecord);
38
- const kmsConfig = this.agent.dependencyManager.resolve(kms_1.KeyManagementModuleConfig);
39
- kmsConfig.registerBackend(new EnmeshedHolderKeyManagmentService_1.EnmshedHolderKeyManagmentService());
40
- if (kmsConfig.backends.length === 0)
41
- throw new Error("No KMS backend registered");
42
- await this.agent.initialize();
43
- const keyId = privateKey;
44
- const didCreateResult = await this.agent.dids.create({
45
- method: "key",
46
- options: {
47
- createKey: {
48
- type: {
49
- crv: "Ed25519",
50
- kty: "OKP"
51
- },
52
- keyId: keyId
53
- }
54
- }
55
- });
56
- this.did = didCreateResult.didState.did;
57
- this.didKey = core_1.DidKey.fromDid(this.did);
58
- this.kid = `${this.did}#${this.didKey.publicJwk.fingerprint}`;
59
- const verificationMethod = didCreateResult.didState.didDocument?.dereferenceKey(this.kid, ["authentication"]);
60
- if (!verificationMethod)
61
- throw new Error("No verification method found");
62
- this.verificationMethod = verificationMethod;
63
- }
64
- async shutdown() {
65
- await this.agent.shutdown();
66
- }
67
- }
68
- exports.BaseAgent = BaseAgent;
69
- //# sourceMappingURL=BaseAgent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseAgent.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/BaseAgent.ts"],"names":[],"mappings":";;;AAAA,yCAWwB;AACxB,0DAA6E;AAG7E,2FAAuF;AACvF,qEAAkE;AAClE,qEAA6D;AAE7D,MAAa,SAAS;IAQlB,YACoB,IAAY,EACZ,IAAY,EACZ,OAAqB,EACrB,iBAAoC,EACpC,mBAAyC;QAJzC,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ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ileSystem } from "@credo-ts/core";
2
- export declare class EnmeshedHolderFileSystem implements FileSystem {
3
- readonly dataPath: string;
4
- readonly cachePath: string;
5
- readonly tempPath: string;
6
- private readonly fileSystem;
7
- private readonly directories;
8
- constructor();
9
- static updateGlobalInstance(toStore: EnmeshedHolderFileSystem): void;
10
- exists(path: string): Promise<boolean>;
11
- createDirectory(path: string): Promise<void>;
12
- copyFile(sourcePath: string, destinationPath: string): Promise<void>;
13
- write(path: string, data: string): Promise<void>;
14
- read(path: string): Promise<string>;
15
- delete(path: string): Promise<void>;
16
- downloadToFile(url: string, path: string, options?: DownloadToFileOptions): Promise<void>;
17
- }
18
- //# sourceMappingURL=EnmeshedHolderFileSystem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EnmeshedHolderFileSystem.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/EnmeshedHolderFileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEnE,qBAAa,wBAAyB,YAAW,UAAU;IACvD,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAClC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;IAC7D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;;WA2BjD,oBAAoB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI;IAIpE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQtC,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc1E,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU1C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAanC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBzC,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnG"}