@credo-ts/didcomm 0.6.0-pr-2392-20251010173905 → 0.6.0-pr-2457-20251016083534

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 (868) hide show
  1. package/build/BaseDidCommMessage.d.mts.map +1 -1
  2. package/build/BaseDidCommMessage.d.ts.map +1 -1
  3. package/build/BaseDidCommMessage.js +3 -3
  4. package/build/BaseDidCommMessage.mjs +2 -2
  5. package/build/BaseDidCommMessage.mjs.map +1 -1
  6. package/build/DidCommApi.d.mts +6 -10
  7. package/build/DidCommApi.d.mts.map +1 -1
  8. package/build/DidCommApi.d.ts +6 -10
  9. package/build/DidCommApi.d.ts.map +1 -1
  10. package/build/DidCommApi.js +16 -21
  11. package/build/DidCommApi.mjs +16 -21
  12. package/build/DidCommApi.mjs.map +1 -1
  13. package/build/DidCommDispatcher.d.mts.map +1 -1
  14. package/build/DidCommDispatcher.d.ts.map +1 -1
  15. package/build/DidCommDispatcher.js +7 -7
  16. package/build/DidCommDispatcher.mjs +7 -7
  17. package/build/DidCommDispatcher.mjs.map +1 -1
  18. package/build/DidCommEnvelopeService.d.mts.map +1 -1
  19. package/build/DidCommEnvelopeService.d.ts.map +1 -1
  20. package/build/DidCommEnvelopeService.js +5 -5
  21. package/build/DidCommEnvelopeService.mjs +5 -5
  22. package/build/DidCommEnvelopeService.mjs.map +1 -1
  23. package/build/DidCommFeatureRegistry.d.mts.map +1 -1
  24. package/build/DidCommFeatureRegistry.d.ts.map +1 -1
  25. package/build/DidCommFeatureRegistry.mjs.map +1 -1
  26. package/build/DidCommMessage.d.mts +1 -1
  27. package/build/DidCommMessage.d.mts.map +1 -1
  28. package/build/DidCommMessage.d.ts +1 -1
  29. package/build/DidCommMessage.d.ts.map +1 -1
  30. package/build/DidCommMessage.js +2 -2
  31. package/build/DidCommMessage.mjs +2 -2
  32. package/build/DidCommMessage.mjs.map +1 -1
  33. package/build/DidCommMessageHandlerRegistry.d.mts.map +1 -1
  34. package/build/DidCommMessageHandlerRegistry.d.ts.map +1 -1
  35. package/build/DidCommMessageHandlerRegistry.mjs.map +1 -1
  36. package/build/DidCommMessageReceiver.d.mts +1 -6
  37. package/build/DidCommMessageReceiver.d.mts.map +1 -1
  38. package/build/DidCommMessageReceiver.d.ts +1 -6
  39. package/build/DidCommMessageReceiver.d.ts.map +1 -1
  40. package/build/DidCommMessageReceiver.js +9 -21
  41. package/build/DidCommMessageReceiver.mjs +9 -21
  42. package/build/DidCommMessageReceiver.mjs.map +1 -1
  43. package/build/DidCommMessageSender.d.mts +1 -6
  44. package/build/DidCommMessageSender.d.mts.map +1 -1
  45. package/build/DidCommMessageSender.d.ts +1 -6
  46. package/build/DidCommMessageSender.d.ts.map +1 -1
  47. package/build/DidCommMessageSender.js +17 -29
  48. package/build/DidCommMessageSender.mjs +17 -29
  49. package/build/DidCommMessageSender.mjs.map +1 -1
  50. package/build/DidCommModule.d.mts +1 -1
  51. package/build/DidCommModule.d.mts.map +1 -1
  52. package/build/DidCommModule.d.ts +1 -1
  53. package/build/DidCommModule.d.ts.map +1 -1
  54. package/build/DidCommModule.js +9 -12
  55. package/build/DidCommModule.mjs +9 -12
  56. package/build/DidCommModule.mjs.map +1 -1
  57. package/build/DidCommModuleConfig.d.mts +14 -2
  58. package/build/DidCommModuleConfig.d.mts.map +1 -1
  59. package/build/DidCommModuleConfig.d.ts +14 -2
  60. package/build/DidCommModuleConfig.d.ts.map +1 -1
  61. package/build/DidCommModuleConfig.js +15 -1
  62. package/build/DidCommModuleConfig.mjs +15 -1
  63. package/build/DidCommModuleConfig.mjs.map +1 -1
  64. package/build/DidCommTransportService.d.mts.map +1 -1
  65. package/build/DidCommTransportService.d.ts.map +1 -1
  66. package/build/DidCommTransportService.js +1 -1
  67. package/build/DidCommTransportService.mjs +1 -1
  68. package/build/DidCommTransportService.mjs.map +1 -1
  69. package/build/decorators/ack/AckDecorator.js +1 -1
  70. package/build/decorators/ack/AckDecorator.mjs +1 -1
  71. package/build/decorators/ack/AckDecoratorExtension.js +3 -3
  72. package/build/decorators/ack/AckDecoratorExtension.mjs +2 -2
  73. package/build/decorators/ack/AckDecoratorExtension.mjs.map +1 -1
  74. package/build/decorators/attachment/AttachmentExtension.js +3 -3
  75. package/build/decorators/attachment/AttachmentExtension.mjs +2 -2
  76. package/build/decorators/attachment/AttachmentExtension.mjs.map +1 -1
  77. package/build/decorators/attachment/DidCommAttachment.js +3 -3
  78. package/build/decorators/attachment/DidCommAttachment.mjs +2 -2
  79. package/build/decorators/attachment/DidCommAttachment.mjs.map +1 -1
  80. package/build/decorators/l10n/L10nDecoratorExtension.js +3 -3
  81. package/build/decorators/l10n/L10nDecoratorExtension.mjs +2 -2
  82. package/build/decorators/l10n/L10nDecoratorExtension.mjs.map +1 -1
  83. package/build/decorators/service/ServiceDecorator.js +1 -1
  84. package/build/decorators/service/ServiceDecorator.mjs +1 -1
  85. package/build/decorators/service/ServiceDecoratorExtension.js +3 -3
  86. package/build/decorators/service/ServiceDecoratorExtension.mjs +2 -2
  87. package/build/decorators/service/ServiceDecoratorExtension.mjs.map +1 -1
  88. package/build/decorators/signature/SignatureDecorator.js +4 -4
  89. package/build/decorators/signature/SignatureDecorator.mjs +3 -3
  90. package/build/decorators/thread/ThreadDecorator.js +3 -3
  91. package/build/decorators/thread/ThreadDecorator.mjs +2 -2
  92. package/build/decorators/thread/ThreadDecoratorExtension.js +3 -3
  93. package/build/decorators/thread/ThreadDecoratorExtension.mjs +2 -2
  94. package/build/decorators/thread/ThreadDecoratorExtension.mjs.map +1 -1
  95. package/build/decorators/timing/TimingDecorator.js +3 -3
  96. package/build/decorators/timing/TimingDecorator.mjs +2 -2
  97. package/build/decorators/timing/TimingDecoratorExtension.js +3 -3
  98. package/build/decorators/timing/TimingDecoratorExtension.mjs +2 -2
  99. package/build/decorators/timing/TimingDecoratorExtension.mjs.map +1 -1
  100. package/build/decorators/transport/TransportDecorator.js +3 -3
  101. package/build/decorators/transport/TransportDecorator.mjs +2 -2
  102. package/build/decorators/transport/TransportDecoratorExtension.js +3 -3
  103. package/build/decorators/transport/TransportDecoratorExtension.mjs +2 -2
  104. package/build/decorators/transport/TransportDecoratorExtension.mjs.map +1 -1
  105. package/build/errors/MessageSendingError.d.mts.map +1 -1
  106. package/build/errors/MessageSendingError.d.ts.map +1 -1
  107. package/build/errors/MessageSendingError.mjs.map +1 -1
  108. package/build/errors/index.js +1 -1
  109. package/build/errors/index.mjs +1 -1
  110. package/build/getDidCommOutboundMessageContext.d.mts.map +1 -1
  111. package/build/getDidCommOutboundMessageContext.d.ts.map +1 -1
  112. package/build/getDidCommOutboundMessageContext.js +6 -6
  113. package/build/getDidCommOutboundMessageContext.mjs +6 -6
  114. package/build/getDidCommOutboundMessageContext.mjs.map +1 -1
  115. package/build/handlers/DidCommMessageHandlerMiddleware.mjs.map +1 -1
  116. package/build/index.d.mts +99 -99
  117. package/build/index.d.ts +99 -99
  118. package/build/index.js +114 -112
  119. package/build/index.mjs +108 -108
  120. package/build/messages/common/DidCommAckMessage.js +1 -1
  121. package/build/messages/common/DidCommAckMessage.mjs +1 -1
  122. package/build/messages/problem-reports/DidCommProblemReportMessage.js +3 -3
  123. package/build/messages/problem-reports/DidCommProblemReportMessage.mjs +2 -2
  124. package/build/models/DidCommInboundMessageContext.d.mts.map +1 -1
  125. package/build/models/DidCommInboundMessageContext.d.ts.map +1 -1
  126. package/build/models/DidCommInboundMessageContext.mjs.map +1 -1
  127. package/build/models/DidCommOutboundMessageContext.d.mts.map +1 -1
  128. package/build/models/DidCommOutboundMessageContext.d.ts.map +1 -1
  129. package/build/models/DidCommOutboundMessageContext.mjs.map +1 -1
  130. package/build/models/features/DidCommFeature.js +3 -3
  131. package/build/models/features/DidCommFeature.mjs +2 -2
  132. package/build/models/features/DidCommFeatureQuery.js +3 -3
  133. package/build/models/features/DidCommFeatureQuery.mjs +2 -2
  134. package/build/models/features/DidCommProtocol.d.mts.map +1 -1
  135. package/build/models/features/DidCommProtocol.d.ts.map +1 -1
  136. package/build/models/features/DidCommProtocol.js +1 -1
  137. package/build/models/features/DidCommProtocol.mjs +1 -1
  138. package/build/models/features/DidCommProtocol.mjs.map +1 -1
  139. package/build/models/index.js +3 -3
  140. package/build/models/index.mjs +3 -3
  141. package/build/modules/basic-messages/DidCommBasicMessagesApi.d.mts +1 -1
  142. package/build/modules/basic-messages/DidCommBasicMessagesApi.d.mts.map +1 -1
  143. package/build/modules/basic-messages/DidCommBasicMessagesApi.d.ts +1 -1
  144. package/build/modules/basic-messages/DidCommBasicMessagesApi.d.ts.map +1 -1
  145. package/build/modules/basic-messages/DidCommBasicMessagesApi.js +2 -2
  146. package/build/modules/basic-messages/DidCommBasicMessagesApi.mjs +2 -2
  147. package/build/modules/basic-messages/DidCommBasicMessagesApi.mjs.map +1 -1
  148. package/build/modules/basic-messages/DidCommBasicMessagesModule.d.mts.map +1 -1
  149. package/build/modules/basic-messages/DidCommBasicMessagesModule.d.ts.map +1 -1
  150. package/build/modules/basic-messages/DidCommBasicMessagesModule.js +2 -2
  151. package/build/modules/basic-messages/DidCommBasicMessagesModule.mjs +2 -2
  152. package/build/modules/basic-messages/DidCommBasicMessagesModule.mjs.map +1 -1
  153. package/build/modules/basic-messages/handlers/BasicMessageHandler.mjs.map +1 -1
  154. package/build/modules/basic-messages/index.js +2 -2
  155. package/build/modules/basic-messages/index.mjs +2 -2
  156. package/build/modules/basic-messages/messages/DidCommBasicMessage.js +3 -3
  157. package/build/modules/basic-messages/messages/DidCommBasicMessage.mjs +2 -2
  158. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.d.mts.map +1 -1
  159. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.d.ts.map +1 -1
  160. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.mjs.map +1 -1
  161. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.js +1 -1
  162. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.mjs +1 -1
  163. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.mjs.map +1 -1
  164. package/build/modules/basic-messages/services/DidCommBasicMessageService.d.mts.map +1 -1
  165. package/build/modules/basic-messages/services/DidCommBasicMessageService.d.ts.map +1 -1
  166. package/build/modules/basic-messages/services/DidCommBasicMessageService.js +4 -4
  167. package/build/modules/basic-messages/services/DidCommBasicMessageService.mjs +4 -4
  168. package/build/modules/basic-messages/services/DidCommBasicMessageService.mjs.map +1 -1
  169. package/build/modules/connections/DidCommConnectionsApi.d.mts +3 -3
  170. package/build/modules/connections/DidCommConnectionsApi.d.mts.map +1 -1
  171. package/build/modules/connections/DidCommConnectionsApi.d.ts +3 -3
  172. package/build/modules/connections/DidCommConnectionsApi.d.ts.map +1 -1
  173. package/build/modules/connections/DidCommConnectionsApi.js +5 -5
  174. package/build/modules/connections/DidCommConnectionsApi.mjs +5 -5
  175. package/build/modules/connections/DidCommConnectionsApi.mjs.map +1 -1
  176. package/build/modules/connections/DidCommConnectionsModule.d.mts.map +1 -1
  177. package/build/modules/connections/DidCommConnectionsModule.d.ts.map +1 -1
  178. package/build/modules/connections/DidCommConnectionsModule.js +20 -20
  179. package/build/modules/connections/DidCommConnectionsModule.mjs +20 -20
  180. package/build/modules/connections/DidCommConnectionsModule.mjs.map +1 -1
  181. package/build/modules/connections/DidExchangeProtocol.d.mts +2 -4
  182. package/build/modules/connections/DidExchangeProtocol.d.mts.map +1 -1
  183. package/build/modules/connections/DidExchangeProtocol.d.ts +2 -4
  184. package/build/modules/connections/DidExchangeProtocol.d.ts.map +1 -1
  185. package/build/modules/connections/DidExchangeProtocol.js +11 -15
  186. package/build/modules/connections/DidExchangeProtocol.mjs +11 -15
  187. package/build/modules/connections/DidExchangeProtocol.mjs.map +1 -1
  188. package/build/modules/connections/DidExchangeStateMachine.js +1 -1
  189. package/build/modules/connections/DidExchangeStateMachine.mjs +1 -1
  190. package/build/modules/connections/DidExchangeStateMachine.mjs.map +1 -1
  191. package/build/modules/connections/errors/ConnectionProblemReportError.d.mts +1 -1
  192. package/build/modules/connections/errors/ConnectionProblemReportError.d.mts.map +1 -1
  193. package/build/modules/connections/errors/ConnectionProblemReportError.d.ts +1 -1
  194. package/build/modules/connections/errors/ConnectionProblemReportError.d.ts.map +1 -1
  195. package/build/modules/connections/errors/ConnectionProblemReportError.mjs.map +1 -1
  196. package/build/modules/connections/errors/DidExchangeProblemReportError.d.mts +1 -1
  197. package/build/modules/connections/errors/DidExchangeProblemReportError.d.mts.map +1 -1
  198. package/build/modules/connections/errors/DidExchangeProblemReportError.d.ts +1 -1
  199. package/build/modules/connections/errors/DidExchangeProblemReportError.d.ts.map +1 -1
  200. package/build/modules/connections/errors/DidExchangeProblemReportError.mjs.map +1 -1
  201. package/build/modules/connections/handlers/DidCommAckMessageHandler.d.mts.map +1 -1
  202. package/build/modules/connections/handlers/DidCommAckMessageHandler.d.ts.map +1 -1
  203. package/build/modules/connections/handlers/DidCommAckMessageHandler.mjs.map +1 -1
  204. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.d.mts.map +1 -1
  205. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.d.ts.map +1 -1
  206. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.mjs.map +1 -1
  207. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.mts +1 -1
  208. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.mts.map +1 -1
  209. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.ts +1 -1
  210. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.ts.map +1 -1
  211. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.js +4 -4
  212. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.mjs +4 -4
  213. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.mjs.map +1 -1
  214. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.d.mts.map +1 -1
  215. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.d.ts.map +1 -1
  216. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.js +3 -3
  217. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.mjs +3 -3
  218. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.mjs.map +1 -1
  219. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.d.mts.map +1 -1
  220. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.d.ts.map +1 -1
  221. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.mjs.map +1 -1
  222. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.mts +1 -1
  223. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.mts.map +1 -1
  224. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.ts +1 -1
  225. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.ts.map +1 -1
  226. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.js +4 -4
  227. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.mjs +4 -4
  228. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.mjs.map +1 -1
  229. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.mts +1 -1
  230. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.mts.map +1 -1
  231. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.ts +1 -1
  232. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.ts.map +1 -1
  233. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.js +4 -4
  234. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.mjs +4 -4
  235. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.mjs.map +1 -1
  236. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.d.mts.map +1 -1
  237. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.d.ts.map +1 -1
  238. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.mjs.map +1 -1
  239. package/build/modules/connections/handlers/DidCommDidRotateHandler.d.mts +3 -5
  240. package/build/modules/connections/handlers/DidCommDidRotateHandler.d.mts.map +1 -1
  241. package/build/modules/connections/handlers/DidCommDidRotateHandler.d.ts +3 -5
  242. package/build/modules/connections/handlers/DidCommDidRotateHandler.d.ts.map +1 -1
  243. package/build/modules/connections/handlers/DidCommDidRotateHandler.js +1 -2
  244. package/build/modules/connections/handlers/DidCommDidRotateHandler.mjs +1 -2
  245. package/build/modules/connections/handlers/DidCommDidRotateHandler.mjs.map +1 -1
  246. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.d.mts.map +1 -1
  247. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.d.ts.map +1 -1
  248. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.mjs.map +1 -1
  249. package/build/modules/connections/handlers/DidCommHangupHandler.d.mts.map +1 -1
  250. package/build/modules/connections/handlers/DidCommHangupHandler.d.ts.map +1 -1
  251. package/build/modules/connections/handlers/DidCommHangupHandler.mjs.map +1 -1
  252. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.d.mts.map +1 -1
  253. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.d.ts.map +1 -1
  254. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.mjs.map +1 -1
  255. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.d.mts.map +1 -1
  256. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.d.ts.map +1 -1
  257. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.mjs.map +1 -1
  258. package/build/modules/connections/handlers/index.js +5 -5
  259. package/build/modules/connections/handlers/index.mjs +5 -5
  260. package/build/modules/connections/index.js +23 -23
  261. package/build/modules/connections/index.mjs +23 -23
  262. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.d.mts.map +1 -1
  263. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.d.ts.map +1 -1
  264. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.js +4 -4
  265. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.mjs +4 -4
  266. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.mjs.map +1 -1
  267. package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.js +1 -1
  268. package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.mjs +1 -1
  269. package/build/modules/connections/messages/DidCommConnectionRequestMessage.d.mts.map +1 -1
  270. package/build/modules/connections/messages/DidCommConnectionRequestMessage.d.ts.map +1 -1
  271. package/build/modules/connections/messages/DidCommConnectionRequestMessage.js +4 -4
  272. package/build/modules/connections/messages/DidCommConnectionRequestMessage.mjs +3 -3
  273. package/build/modules/connections/messages/DidCommConnectionRequestMessage.mjs.map +1 -1
  274. package/build/modules/connections/messages/DidCommConnectionResponseMessage.js +3 -3
  275. package/build/modules/connections/messages/DidCommConnectionResponseMessage.mjs +2 -2
  276. package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.js +1 -1
  277. package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.mjs +1 -1
  278. package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.js +1 -1
  279. package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.mjs +1 -1
  280. package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.js +4 -4
  281. package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.mjs +3 -3
  282. package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.js +4 -4
  283. package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.mjs +3 -3
  284. package/build/modules/connections/messages/DidCommDidRotateAckMessage.js +1 -1
  285. package/build/modules/connections/messages/DidCommDidRotateAckMessage.mjs +1 -1
  286. package/build/modules/connections/messages/DidCommDidRotateMessage.js +3 -3
  287. package/build/modules/connections/messages/DidCommDidRotateMessage.mjs +2 -2
  288. package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.js +1 -1
  289. package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.mjs +1 -1
  290. package/build/modules/connections/messages/DidCommHangupMessage.js +1 -1
  291. package/build/modules/connections/messages/DidCommHangupMessage.mjs +1 -1
  292. package/build/modules/connections/messages/DidCommTrustPingMessage.d.mts.map +1 -1
  293. package/build/modules/connections/messages/DidCommTrustPingMessage.d.ts.map +1 -1
  294. package/build/modules/connections/messages/DidCommTrustPingMessage.js +3 -3
  295. package/build/modules/connections/messages/DidCommTrustPingMessage.mjs +2 -2
  296. package/build/modules/connections/messages/DidCommTrustPingMessage.mjs.map +1 -1
  297. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.d.mts.map +1 -1
  298. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.d.ts.map +1 -1
  299. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.js +1 -1
  300. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.mjs +1 -1
  301. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.mjs.map +1 -1
  302. package/build/modules/connections/messages/index.js +7 -7
  303. package/build/modules/connections/messages/index.mjs +7 -7
  304. package/build/modules/connections/models/DidCommConnection.js +3 -3
  305. package/build/modules/connections/models/DidCommConnection.mjs +2 -2
  306. package/build/modules/connections/models/did/DidDoc.d.mts.map +1 -1
  307. package/build/modules/connections/models/did/DidDoc.d.ts.map +1 -1
  308. package/build/modules/connections/models/did/DidDoc.js +3 -3
  309. package/build/modules/connections/models/did/DidDoc.mjs +2 -2
  310. package/build/modules/connections/models/did/DidDoc.mjs.map +1 -1
  311. package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.js +1 -1
  312. package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.mjs +1 -1
  313. package/build/modules/connections/models/did/authentication/ReferencedAuthentication.js +3 -3
  314. package/build/modules/connections/models/did/authentication/ReferencedAuthentication.mjs +2 -2
  315. package/build/modules/connections/models/did/authentication/index.d.mts.map +1 -1
  316. package/build/modules/connections/models/did/authentication/index.d.ts.map +1 -1
  317. package/build/modules/connections/models/did/authentication/index.mjs.map +1 -1
  318. package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.js +3 -3
  319. package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.mjs +2 -2
  320. package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.js +3 -3
  321. package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.mjs +2 -2
  322. package/build/modules/connections/models/did/publicKey/PublicKey.js +1 -1
  323. package/build/modules/connections/models/did/publicKey/PublicKey.mjs +1 -1
  324. package/build/modules/connections/models/did/publicKey/RsaSig2018.js +3 -3
  325. package/build/modules/connections/models/did/publicKey/RsaSig2018.mjs +2 -2
  326. package/build/modules/connections/models/did/publicKey/index.mjs.map +1 -1
  327. package/build/modules/connections/models/index.js +1 -1
  328. package/build/modules/connections/models/index.mjs +1 -1
  329. package/build/modules/connections/repository/DidCommConnectionRecord.d.mts +1 -1
  330. package/build/modules/connections/repository/DidCommConnectionRecord.d.mts.map +1 -1
  331. package/build/modules/connections/repository/DidCommConnectionRecord.d.ts +1 -1
  332. package/build/modules/connections/repository/DidCommConnectionRecord.d.ts.map +1 -1
  333. package/build/modules/connections/repository/DidCommConnectionRecord.js +1 -1
  334. package/build/modules/connections/repository/DidCommConnectionRecord.mjs +1 -1
  335. package/build/modules/connections/repository/DidCommConnectionRecord.mjs.map +1 -1
  336. package/build/modules/connections/repository/DidCommConnectionRepository.js +2 -2
  337. package/build/modules/connections/repository/DidCommConnectionRepository.mjs +2 -2
  338. package/build/modules/connections/repository/DidCommConnectionRepository.mjs.map +1 -1
  339. package/build/modules/connections/services/DidCommConnectionService.d.mts +3 -3
  340. package/build/modules/connections/services/DidCommConnectionService.d.mts.map +1 -1
  341. package/build/modules/connections/services/DidCommConnectionService.d.ts +3 -3
  342. package/build/modules/connections/services/DidCommConnectionService.d.ts.map +1 -1
  343. package/build/modules/connections/services/DidCommConnectionService.js +13 -13
  344. package/build/modules/connections/services/DidCommConnectionService.mjs +13 -13
  345. package/build/modules/connections/services/DidCommConnectionService.mjs.map +1 -1
  346. package/build/modules/connections/services/DidCommDidRotateService.d.mts +2 -2
  347. package/build/modules/connections/services/DidCommDidRotateService.d.mts.map +1 -1
  348. package/build/modules/connections/services/DidCommDidRotateService.d.ts +2 -2
  349. package/build/modules/connections/services/DidCommDidRotateService.d.ts.map +1 -1
  350. package/build/modules/connections/services/DidCommDidRotateService.js +8 -8
  351. package/build/modules/connections/services/DidCommDidRotateService.mjs +8 -8
  352. package/build/modules/connections/services/DidCommDidRotateService.mjs.map +1 -1
  353. package/build/modules/connections/services/DidCommTrustPingService.d.mts.map +1 -1
  354. package/build/modules/connections/services/DidCommTrustPingService.d.ts.map +1 -1
  355. package/build/modules/connections/services/DidCommTrustPingService.js +1 -1
  356. package/build/modules/connections/services/DidCommTrustPingService.mjs +1 -1
  357. package/build/modules/connections/services/DidCommTrustPingService.mjs.map +1 -1
  358. package/build/modules/connections/services/helpers.js +1 -1
  359. package/build/modules/connections/services/helpers.mjs +1 -1
  360. package/build/modules/connections/services/helpers.mjs.map +1 -1
  361. package/build/modules/credentials/DidCommCredentialsApi.d.mts.map +1 -1
  362. package/build/modules/credentials/DidCommCredentialsApi.d.ts.map +1 -1
  363. package/build/modules/credentials/DidCommCredentialsApi.js +2 -2
  364. package/build/modules/credentials/DidCommCredentialsApi.mjs +2 -2
  365. package/build/modules/credentials/DidCommCredentialsApi.mjs.map +1 -1
  366. package/build/modules/credentials/DidCommCredentialsModule.d.mts.map +1 -1
  367. package/build/modules/credentials/DidCommCredentialsModule.d.ts.map +1 -1
  368. package/build/modules/credentials/DidCommCredentialsModule.js +2 -2
  369. package/build/modules/credentials/DidCommCredentialsModule.mjs +2 -2
  370. package/build/modules/credentials/DidCommCredentialsModule.mjs.map +1 -1
  371. package/build/modules/credentials/DidCommCredentialsModuleConfig.d.mts.map +1 -1
  372. package/build/modules/credentials/DidCommCredentialsModuleConfig.d.ts.map +1 -1
  373. package/build/modules/credentials/DidCommCredentialsModuleConfig.mjs.map +1 -1
  374. package/build/modules/credentials/formats/DidCommCredentialFormatServiceOptions.d.mts +1 -1
  375. package/build/modules/credentials/formats/DidCommCredentialFormatServiceOptions.d.ts +1 -1
  376. package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.js +3 -3
  377. package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.mjs +2 -2
  378. package/build/modules/credentials/formats/index.js +2 -2
  379. package/build/modules/credentials/formats/index.mjs +2 -2
  380. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.js +1 -1
  381. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.mjs +1 -1
  382. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.js +1 -1
  383. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.mjs +1 -1
  384. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.d.mts.map +1 -1
  385. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.d.ts.map +1 -1
  386. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.mjs.map +1 -1
  387. package/build/modules/credentials/index.js +5 -5
  388. package/build/modules/credentials/index.mjs +5 -5
  389. package/build/modules/credentials/models/DidCommCredentialFormatSpec.js +3 -3
  390. package/build/modules/credentials/models/DidCommCredentialFormatSpec.mjs +2 -2
  391. package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.js +3 -3
  392. package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.mjs +2 -2
  393. package/build/modules/credentials/models/DidCommRevocationNotification.js +1 -1
  394. package/build/modules/credentials/models/DidCommRevocationNotification.mjs +1 -1
  395. package/build/modules/credentials/models/index.js +3 -3
  396. package/build/modules/credentials/models/index.mjs +3 -3
  397. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.mts +1 -1
  398. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.mts.map +1 -1
  399. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.ts +1 -1
  400. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.ts.map +1 -1
  401. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.mjs.map +1 -1
  402. package/build/modules/credentials/protocol/DidCommCredentialProtocol.d.mts +1 -1
  403. package/build/modules/credentials/protocol/DidCommCredentialProtocol.d.ts +1 -1
  404. package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.d.mts +1 -1
  405. package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.d.ts +1 -1
  406. package/build/modules/credentials/protocol/index.js +1 -1
  407. package/build/modules/credentials/protocol/index.mjs +1 -1
  408. package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV1Handler.mjs.map +1 -1
  409. package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV2Handler.mjs.map +1 -1
  410. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.js +4 -4
  411. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.mjs +3 -3
  412. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.js +4 -4
  413. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.mjs +3 -3
  414. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.mts +1 -1
  415. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.mts.map +1 -1
  416. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.ts +1 -1
  417. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.ts.map +1 -1
  418. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.js +1 -1
  419. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.mjs +1 -1
  420. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.mjs.map +1 -1
  421. package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.js +2 -2
  422. package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.mjs +2 -2
  423. package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.mjs.map +1 -1
  424. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.mts +2 -2
  425. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.mts.map +1 -1
  426. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.ts +2 -2
  427. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.ts.map +1 -1
  428. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.js +5 -5
  429. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.mjs +5 -5
  430. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.mjs.map +1 -1
  431. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts +1 -1
  432. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts.map +1 -1
  433. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts +1 -1
  434. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts.map +1 -1
  435. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.mjs.map +1 -1
  436. package/build/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.mjs.map +1 -1
  437. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.mts.map +1 -1
  438. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.ts.map +1 -1
  439. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.mjs.map +1 -1
  440. package/build/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.mjs.map +1 -1
  441. package/build/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.mjs.map +1 -1
  442. package/build/modules/credentials/protocol/v2/handlers/index.js +1 -1
  443. package/build/modules/credentials/protocol/v2/handlers/index.mjs +1 -1
  444. package/build/modules/credentials/protocol/v2/index.js +1 -1
  445. package/build/modules/credentials/protocol/v2/index.mjs +1 -1
  446. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.js +1 -1
  447. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.mjs +1 -1
  448. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.mts +1 -1
  449. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.mts.map +1 -1
  450. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.ts +1 -1
  451. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.ts.map +1 -1
  452. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.js +3 -3
  453. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.mjs +2 -2
  454. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.mjs.map +1 -1
  455. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.js +1 -1
  456. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.mjs +1 -1
  457. package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.js +4 -4
  458. package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.mjs +3 -3
  459. package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.js +4 -4
  460. package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.mjs +3 -3
  461. package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.js +4 -4
  462. package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.mjs +3 -3
  463. package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.js +4 -4
  464. package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.mjs +3 -3
  465. package/build/modules/credentials/protocol/v2/messages/index.js +1 -1
  466. package/build/modules/credentials/protocol/v2/messages/index.mjs +1 -1
  467. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.mts +2 -2
  468. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.mts.map +1 -1
  469. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.ts +2 -2
  470. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.ts.map +1 -1
  471. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.js +2 -2
  472. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.mjs +2 -2
  473. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.mjs.map +1 -1
  474. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.js +1 -1
  475. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.mjs +1 -1
  476. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.mjs.map +1 -1
  477. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.mts +3 -3
  478. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.mts.map +1 -1
  479. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.ts +3 -3
  480. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.ts.map +1 -1
  481. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.js +3 -3
  482. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.mjs +3 -3
  483. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.mjs.map +1 -1
  484. package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.d.mts +1 -1
  485. package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.d.ts +1 -1
  486. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.d.mts.map +1 -1
  487. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.d.ts.map +1 -1
  488. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.js +2 -2
  489. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.mjs +2 -2
  490. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.mjs.map +1 -1
  491. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.mts +2 -2
  492. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.mts.map +1 -1
  493. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.ts +2 -2
  494. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.ts.map +1 -1
  495. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.js +4 -4
  496. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.mjs +4 -4
  497. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.mjs.map +1 -1
  498. package/build/modules/discover-features/protocol/v1/handlers/DidCommFeaturesQueryMessageHandler.mjs.map +1 -1
  499. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.js +3 -3
  500. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.mjs +2 -2
  501. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.js +1 -1
  502. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.mjs +1 -1
  503. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.mts +2 -2
  504. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.mts.map +1 -1
  505. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.ts +2 -2
  506. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.ts.map +1 -1
  507. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.js +2 -2
  508. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.mjs +2 -2
  509. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.mjs.map +1 -1
  510. package/build/modules/discover-features/protocol/v2/handlers/DidCommFeaturesQueriesMessageHandler.mjs.map +1 -1
  511. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.js +3 -3
  512. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.mjs +2 -2
  513. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.d.mts.map +1 -1
  514. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.d.ts.map +1 -1
  515. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.js +3 -3
  516. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.mjs +2 -2
  517. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.mjs.map +1 -1
  518. package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.d.mts +1 -1
  519. package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.d.ts +1 -1
  520. package/build/modules/index.js +66 -66
  521. package/build/modules/index.mjs +66 -66
  522. package/build/modules/message-pickup/DidCommMessagePickupApi.d.mts +1 -1
  523. package/build/modules/message-pickup/DidCommMessagePickupApi.d.mts.map +1 -1
  524. package/build/modules/message-pickup/DidCommMessagePickupApi.d.ts +1 -1
  525. package/build/modules/message-pickup/DidCommMessagePickupApi.d.ts.map +1 -1
  526. package/build/modules/message-pickup/DidCommMessagePickupApi.js +4 -4
  527. package/build/modules/message-pickup/DidCommMessagePickupApi.mjs +4 -4
  528. package/build/modules/message-pickup/DidCommMessagePickupApi.mjs.map +1 -1
  529. package/build/modules/message-pickup/DidCommMessagePickupModule.d.mts +1 -1
  530. package/build/modules/message-pickup/DidCommMessagePickupModule.d.mts.map +1 -1
  531. package/build/modules/message-pickup/DidCommMessagePickupModule.d.ts +1 -1
  532. package/build/modules/message-pickup/DidCommMessagePickupModule.d.ts.map +1 -1
  533. package/build/modules/message-pickup/DidCommMessagePickupModule.mjs.map +1 -1
  534. package/build/modules/message-pickup/index.js +1 -1
  535. package/build/modules/message-pickup/index.mjs +1 -1
  536. package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.d.mts +1 -1
  537. package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.d.ts +1 -1
  538. package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocol.d.mts +1 -1
  539. package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocol.d.ts +1 -1
  540. package/build/modules/message-pickup/protocol/index.js +1 -1
  541. package/build/modules/message-pickup/protocol/index.mjs +1 -1
  542. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.mts +1 -1
  543. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.mts.map +1 -1
  544. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.ts +1 -1
  545. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.ts.map +1 -1
  546. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.js +3 -3
  547. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.mjs +3 -3
  548. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.mjs.map +1 -1
  549. package/build/modules/message-pickup/protocol/v1/handlers/DidCommBatchHandler.mjs.map +1 -1
  550. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.js +4 -4
  551. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.mjs +3 -3
  552. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.js +3 -3
  553. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.mjs +2 -2
  554. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.mts +2 -2
  555. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.mts.map +1 -1
  556. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.ts +2 -2
  557. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.ts.map +1 -1
  558. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.js +5 -5
  559. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.mjs +5 -5
  560. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.mjs.map +1 -1
  561. package/build/modules/message-pickup/protocol/v2/handlers/DidCommMessageDeliveryV2Handler.mjs.map +1 -1
  562. package/build/modules/message-pickup/protocol/v2/handlers/DidCommStatusV2Handler.mjs.map +1 -1
  563. package/build/modules/message-pickup/protocol/v2/handlers/index.js +1 -1
  564. package/build/modules/message-pickup/protocol/v2/handlers/index.mjs +1 -1
  565. package/build/modules/message-pickup/protocol/v2/index.js +1 -1
  566. package/build/modules/message-pickup/protocol/v2/index.mjs +1 -1
  567. package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.js +4 -4
  568. package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.mjs +3 -3
  569. package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.js +4 -4
  570. package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.mjs +3 -3
  571. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.d.mts.map +1 -1
  572. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.d.ts.map +1 -1
  573. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.js +4 -4
  574. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.mjs +3 -3
  575. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.mjs.map +1 -1
  576. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.js +4 -4
  577. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.mjs +3 -3
  578. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.js +3 -3
  579. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.mjs +2 -2
  580. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.js +4 -4
  581. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.mjs +3 -3
  582. package/build/modules/message-pickup/protocol/v2/messages/index.js +1 -1
  583. package/build/modules/message-pickup/protocol/v2/messages/index.mjs +1 -1
  584. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.d.mts.map +1 -1
  585. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.d.ts.map +1 -1
  586. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.js +1 -1
  587. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.mjs +1 -1
  588. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.mjs.map +1 -1
  589. package/build/modules/oob/DidCommOutOfBandApi.d.mts +4 -4
  590. package/build/modules/oob/DidCommOutOfBandApi.d.mts.map +1 -1
  591. package/build/modules/oob/DidCommOutOfBandApi.d.ts +4 -4
  592. package/build/modules/oob/DidCommOutOfBandApi.d.ts.map +1 -1
  593. package/build/modules/oob/DidCommOutOfBandApi.js +16 -16
  594. package/build/modules/oob/DidCommOutOfBandApi.mjs +16 -16
  595. package/build/modules/oob/DidCommOutOfBandApi.mjs.map +1 -1
  596. package/build/modules/oob/DidCommOutOfBandModule.d.mts.map +1 -1
  597. package/build/modules/oob/DidCommOutOfBandModule.d.ts.map +1 -1
  598. package/build/modules/oob/DidCommOutOfBandModule.js +3 -3
  599. package/build/modules/oob/DidCommOutOfBandModule.mjs +3 -3
  600. package/build/modules/oob/DidCommOutOfBandModule.mjs.map +1 -1
  601. package/build/modules/oob/DidCommOutOfBandService.d.mts +2 -2
  602. package/build/modules/oob/DidCommOutOfBandService.d.mts.map +1 -1
  603. package/build/modules/oob/DidCommOutOfBandService.d.ts +2 -2
  604. package/build/modules/oob/DidCommOutOfBandService.d.ts.map +1 -1
  605. package/build/modules/oob/DidCommOutOfBandService.js +6 -6
  606. package/build/modules/oob/DidCommOutOfBandService.mjs +6 -6
  607. package/build/modules/oob/DidCommOutOfBandService.mjs.map +1 -1
  608. package/build/modules/oob/converters.js +1 -1
  609. package/build/modules/oob/converters.mjs +1 -1
  610. package/build/modules/oob/converters.mjs.map +1 -1
  611. package/build/modules/oob/domain/OutOfBandDidCommService.d.mts.map +1 -1
  612. package/build/modules/oob/domain/OutOfBandDidCommService.d.ts.map +1 -1
  613. package/build/modules/oob/domain/OutOfBandDidCommService.js +1 -1
  614. package/build/modules/oob/domain/OutOfBandDidCommService.mjs +1 -1
  615. package/build/modules/oob/domain/OutOfBandDidCommService.mjs.map +1 -1
  616. package/build/modules/oob/domain/index.js +2 -2
  617. package/build/modules/oob/domain/index.mjs +2 -2
  618. package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.js +1 -1
  619. package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.mjs +1 -1
  620. package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.mjs.map +1 -1
  621. package/build/modules/oob/helpers.mjs.map +1 -1
  622. package/build/modules/oob/index.js +3 -3
  623. package/build/modules/oob/index.mjs +3 -3
  624. package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.js +1 -1
  625. package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.mjs +1 -1
  626. package/build/modules/oob/messages/DidCommHandshakeReuseMessage.js +1 -1
  627. package/build/modules/oob/messages/DidCommHandshakeReuseMessage.mjs +1 -1
  628. package/build/modules/oob/messages/DidCommOutOfBandInvitation.d.mts.map +1 -1
  629. package/build/modules/oob/messages/DidCommOutOfBandInvitation.d.ts.map +1 -1
  630. package/build/modules/oob/messages/DidCommOutOfBandInvitation.js +6 -6
  631. package/build/modules/oob/messages/DidCommOutOfBandInvitation.mjs +6 -6
  632. package/build/modules/oob/messages/DidCommOutOfBandInvitation.mjs.map +1 -1
  633. package/build/modules/oob/messages/index.js +1 -1
  634. package/build/modules/oob/messages/index.mjs +1 -1
  635. package/build/modules/oob/repository/DidCommOutOfBandRecord.d.mts.map +1 -1
  636. package/build/modules/oob/repository/DidCommOutOfBandRecord.d.ts.map +1 -1
  637. package/build/modules/oob/repository/DidCommOutOfBandRecord.js +2 -2
  638. package/build/modules/oob/repository/DidCommOutOfBandRecord.mjs +2 -2
  639. package/build/modules/oob/repository/DidCommOutOfBandRecord.mjs.map +1 -1
  640. package/build/modules/oob/repository/DidCommOutOfBandRepository.js +2 -2
  641. package/build/modules/oob/repository/DidCommOutOfBandRepository.mjs +2 -2
  642. package/build/modules/oob/repository/DidCommOutOfBandRepository.mjs.map +1 -1
  643. package/build/modules/proofs/DidCommProofsApi.d.mts.map +1 -1
  644. package/build/modules/proofs/DidCommProofsApi.d.ts.map +1 -1
  645. package/build/modules/proofs/DidCommProofsApi.js +3 -3
  646. package/build/modules/proofs/DidCommProofsApi.mjs +3 -3
  647. package/build/modules/proofs/DidCommProofsApi.mjs.map +1 -1
  648. package/build/modules/proofs/DidCommProofsApiOptions.d.mts +1 -1
  649. package/build/modules/proofs/DidCommProofsApiOptions.d.ts +1 -1
  650. package/build/modules/proofs/DidCommProofsModule.d.mts +1 -1
  651. package/build/modules/proofs/DidCommProofsModule.d.mts.map +1 -1
  652. package/build/modules/proofs/DidCommProofsModule.d.ts +1 -1
  653. package/build/modules/proofs/DidCommProofsModule.d.ts.map +1 -1
  654. package/build/modules/proofs/DidCommProofsModule.js +1 -1
  655. package/build/modules/proofs/DidCommProofsModule.mjs +1 -1
  656. package/build/modules/proofs/DidCommProofsModule.mjs.map +1 -1
  657. package/build/modules/proofs/DidCommProofsModuleConfig.d.mts.map +1 -1
  658. package/build/modules/proofs/DidCommProofsModuleConfig.d.ts.map +1 -1
  659. package/build/modules/proofs/DidCommProofsModuleConfig.mjs.map +1 -1
  660. package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.d.mts +1 -1
  661. package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.d.ts +1 -1
  662. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.d.mts.map +1 -1
  663. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.d.ts.map +1 -1
  664. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.mjs.map +1 -1
  665. package/build/modules/proofs/index.js +11 -11
  666. package/build/modules/proofs/index.mjs +11 -11
  667. package/build/modules/proofs/models/DidCommProofFormatSpec.js +3 -3
  668. package/build/modules/proofs/models/DidCommProofFormatSpec.mjs +2 -2
  669. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.mts +1 -1
  670. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.mts.map +1 -1
  671. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.ts +1 -1
  672. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.ts.map +1 -1
  673. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.js +1 -1
  674. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.mjs +1 -1
  675. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.mjs.map +1 -1
  676. package/build/modules/proofs/protocol/DidCommProofProtocol.d.mts +1 -1
  677. package/build/modules/proofs/protocol/DidCommProofProtocol.d.ts +1 -1
  678. package/build/modules/proofs/protocol/DidCommProofProtocolOptions.d.mts +1 -1
  679. package/build/modules/proofs/protocol/DidCommProofProtocolOptions.d.ts +1 -1
  680. package/build/modules/proofs/protocol/index.js +1 -1
  681. package/build/modules/proofs/protocol/index.mjs +1 -1
  682. package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.js +1 -1
  683. package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.mjs +1 -1
  684. package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.mjs.map +1 -1
  685. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.mts +4 -4
  686. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.mts.map +1 -1
  687. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.ts +4 -4
  688. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.ts.map +1 -1
  689. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.js +12 -12
  690. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.mjs +12 -12
  691. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.mjs.map +1 -1
  692. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.mts +1 -1
  693. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.mts.map +1 -1
  694. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.ts +1 -1
  695. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.ts.map +1 -1
  696. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.mjs.map +1 -1
  697. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.js +1 -1
  698. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.mjs +1 -1
  699. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.mjs.map +1 -1
  700. package/build/modules/proofs/protocol/v2/handlers/DidCommProposePresentationV2Handler.mjs.map +1 -1
  701. package/build/modules/proofs/protocol/v2/handlers/DidCommRequestPresentationV2Handler.mjs.map +1 -1
  702. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.js +1 -1
  703. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.mjs +1 -1
  704. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.js +4 -4
  705. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.mjs +3 -3
  706. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.js +1 -1
  707. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.mjs +1 -1
  708. package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.js +4 -4
  709. package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.mjs +3 -3
  710. package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.js +4 -4
  711. package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.mjs +3 -3
  712. package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.mts +1 -1
  713. package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.mts.map +1 -1
  714. package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.ts +1 -1
  715. package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.ts.map +1 -1
  716. package/build/modules/proofs/repository/DidCommProofExchangeRecord.mjs.map +1 -1
  717. package/build/modules/proofs/repository/DidCommProofExchangeRepository.js +1 -1
  718. package/build/modules/proofs/repository/DidCommProofExchangeRepository.mjs +1 -1
  719. package/build/modules/proofs/repository/DidCommProofExchangeRepository.mjs.map +1 -1
  720. package/build/modules/routing/DidCommMediationRecipientApi.d.mts +3 -3
  721. package/build/modules/routing/DidCommMediationRecipientApi.d.mts.map +1 -1
  722. package/build/modules/routing/DidCommMediationRecipientApi.d.ts +3 -3
  723. package/build/modules/routing/DidCommMediationRecipientApi.d.ts.map +1 -1
  724. package/build/modules/routing/DidCommMediationRecipientApi.js +8 -8
  725. package/build/modules/routing/DidCommMediationRecipientApi.mjs +8 -8
  726. package/build/modules/routing/DidCommMediationRecipientApi.mjs.map +1 -1
  727. package/build/modules/routing/DidCommMediationRecipientModule.d.mts.map +1 -1
  728. package/build/modules/routing/DidCommMediationRecipientModule.d.ts.map +1 -1
  729. package/build/modules/routing/DidCommMediationRecipientModule.js +4 -4
  730. package/build/modules/routing/DidCommMediationRecipientModule.mjs +4 -4
  731. package/build/modules/routing/DidCommMediationRecipientModule.mjs.map +1 -1
  732. package/build/modules/routing/DidCommMediatorApi.d.mts +1 -1
  733. package/build/modules/routing/DidCommMediatorApi.d.mts.map +1 -1
  734. package/build/modules/routing/DidCommMediatorApi.d.ts +1 -1
  735. package/build/modules/routing/DidCommMediatorApi.d.ts.map +1 -1
  736. package/build/modules/routing/DidCommMediatorApi.js +2 -2
  737. package/build/modules/routing/DidCommMediatorApi.mjs +2 -2
  738. package/build/modules/routing/DidCommMediatorApi.mjs.map +1 -1
  739. package/build/modules/routing/DidCommMediatorModule.d.mts.map +1 -1
  740. package/build/modules/routing/DidCommMediatorModule.d.ts.map +1 -1
  741. package/build/modules/routing/DidCommMediatorModule.js +7 -7
  742. package/build/modules/routing/DidCommMediatorModule.mjs +7 -7
  743. package/build/modules/routing/DidCommMediatorModule.mjs.map +1 -1
  744. package/build/modules/routing/handlers/DidCommForwardHandler.mjs.map +1 -1
  745. package/build/modules/routing/handlers/DidCommKeylistUpdateHandler.mjs.map +1 -1
  746. package/build/modules/routing/handlers/DidCommKeylistUpdateResponseHandler.mjs.map +1 -1
  747. package/build/modules/routing/handlers/DidCommMediationDenyHandler.mjs.map +1 -1
  748. package/build/modules/routing/handlers/DidCommMediationGrantHandler.mjs.map +1 -1
  749. package/build/modules/routing/handlers/DidCommMediationRequestHandler.mjs.map +1 -1
  750. package/build/modules/routing/handlers/index.js +1 -1
  751. package/build/modules/routing/handlers/index.mjs +1 -1
  752. package/build/modules/routing/index.js +4 -4
  753. package/build/modules/routing/index.mjs +4 -4
  754. package/build/modules/routing/messages/DidCommForwardMessage.js +3 -3
  755. package/build/modules/routing/messages/DidCommForwardMessage.mjs +2 -2
  756. package/build/modules/routing/messages/DidCommKeylistUpdateMessage.js +3 -3
  757. package/build/modules/routing/messages/DidCommKeylistUpdateMessage.mjs +2 -2
  758. package/build/modules/routing/messages/DidCommKeylistUpdateResponseMessage.js +3 -3
  759. package/build/modules/routing/messages/DidCommKeylistUpdateResponseMessage.mjs +2 -2
  760. package/build/modules/routing/messages/DidCommMediationDenyMessage.js +1 -1
  761. package/build/modules/routing/messages/DidCommMediationDenyMessage.mjs +1 -1
  762. package/build/modules/routing/messages/DidCommMediationGrantMessage.js +3 -3
  763. package/build/modules/routing/messages/DidCommMediationGrantMessage.mjs +2 -2
  764. package/build/modules/routing/messages/DidCommMediationRequestMessage.js +1 -1
  765. package/build/modules/routing/messages/DidCommMediationRequestMessage.mjs +1 -1
  766. package/build/modules/routing/messages/index.js +1 -1
  767. package/build/modules/routing/messages/index.mjs +1 -1
  768. package/build/modules/routing/repository/DidCommMediationRecord.d.mts +1 -1
  769. package/build/modules/routing/repository/DidCommMediationRecord.d.mts.map +1 -1
  770. package/build/modules/routing/repository/DidCommMediationRecord.d.ts +1 -1
  771. package/build/modules/routing/repository/DidCommMediationRecord.d.ts.map +1 -1
  772. package/build/modules/routing/repository/DidCommMediationRecord.js +1 -1
  773. package/build/modules/routing/repository/DidCommMediationRecord.mjs +1 -1
  774. package/build/modules/routing/repository/DidCommMediationRecord.mjs.map +1 -1
  775. package/build/modules/routing/repository/DidCommMediationRepository.js +1 -1
  776. package/build/modules/routing/repository/DidCommMediationRepository.mjs +1 -1
  777. package/build/modules/routing/repository/DidCommMediationRepository.mjs.map +1 -1
  778. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.js +1 -1
  779. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.mjs +1 -1
  780. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.mjs.map +1 -1
  781. package/build/modules/routing/services/DidCommMediationRecipientService.d.mts +2 -2
  782. package/build/modules/routing/services/DidCommMediationRecipientService.d.mts.map +1 -1
  783. package/build/modules/routing/services/DidCommMediationRecipientService.d.ts +2 -2
  784. package/build/modules/routing/services/DidCommMediationRecipientService.d.ts.map +1 -1
  785. package/build/modules/routing/services/DidCommMediationRecipientService.js +4 -4
  786. package/build/modules/routing/services/DidCommMediationRecipientService.mjs +4 -4
  787. package/build/modules/routing/services/DidCommMediationRecipientService.mjs.map +1 -1
  788. package/build/modules/routing/services/DidCommMediatorService.d.mts.map +1 -1
  789. package/build/modules/routing/services/DidCommMediatorService.d.ts.map +1 -1
  790. package/build/modules/routing/services/DidCommMediatorService.js +3 -3
  791. package/build/modules/routing/services/DidCommMediatorService.mjs +3 -3
  792. package/build/modules/routing/services/DidCommMediatorService.mjs.map +1 -1
  793. package/build/modules/routing/services/DidCommRoutingService.d.mts.map +1 -1
  794. package/build/modules/routing/services/DidCommRoutingService.d.ts.map +1 -1
  795. package/build/modules/routing/services/DidCommRoutingService.js +1 -1
  796. package/build/modules/routing/services/DidCommRoutingService.mjs +1 -1
  797. package/build/modules/routing/services/DidCommRoutingService.mjs.map +1 -1
  798. package/build/repository/DidCommMessageRecord.d.mts.map +1 -1
  799. package/build/repository/DidCommMessageRecord.d.ts.map +1 -1
  800. package/build/repository/DidCommMessageRecord.mjs.map +1 -1
  801. package/build/repository/DidCommMessageRepository.d.mts.map +1 -1
  802. package/build/repository/DidCommMessageRepository.d.ts.map +1 -1
  803. package/build/repository/DidCommMessageRepository.js +1 -1
  804. package/build/repository/DidCommMessageRepository.mjs +1 -1
  805. package/build/repository/DidCommMessageRepository.mjs.map +1 -1
  806. package/build/repository/index.js +1 -1
  807. package/build/repository/index.mjs +1 -1
  808. package/build/services/DidCommDocumentService.d.mts.map +1 -1
  809. package/build/services/DidCommDocumentService.d.ts.map +1 -1
  810. package/build/services/DidCommDocumentService.js +1 -1
  811. package/build/services/DidCommDocumentService.mjs +1 -1
  812. package/build/services/DidCommDocumentService.mjs.map +1 -1
  813. package/build/transport/DidCommHttpOutboundTransport.d.mts.map +1 -1
  814. package/build/transport/DidCommHttpOutboundTransport.d.ts.map +1 -1
  815. package/build/transport/DidCommHttpOutboundTransport.js +3 -3
  816. package/build/transport/DidCommHttpOutboundTransport.mjs +3 -3
  817. package/build/transport/DidCommHttpOutboundTransport.mjs.map +1 -1
  818. package/build/transport/DidCommWsOutboundTransport.d.mts.map +1 -1
  819. package/build/transport/DidCommWsOutboundTransport.d.ts.map +1 -1
  820. package/build/transport/DidCommWsOutboundTransport.mjs.map +1 -1
  821. package/build/transport/index.js +2 -2
  822. package/build/transport/index.mjs +2 -2
  823. package/build/transport/queue/DidCommQueueTransportRepository.d.mts +1 -1
  824. package/build/transport/queue/DidCommQueueTransportRepository.d.ts +1 -1
  825. package/build/transport/queue/InMemoryQueueTransportRepository.d.mts +1 -1
  826. package/build/transport/queue/InMemoryQueueTransportRepository.d.mts.map +1 -1
  827. package/build/transport/queue/InMemoryQueueTransportRepository.d.ts +1 -1
  828. package/build/transport/queue/InMemoryQueueTransportRepository.d.ts.map +1 -1
  829. package/build/transport/queue/InMemoryQueueTransportRepository.js +1 -1
  830. package/build/transport/queue/InMemoryQueueTransportRepository.mjs +1 -1
  831. package/build/transport/queue/InMemoryQueueTransportRepository.mjs.map +1 -1
  832. package/build/transport/queue/index.js +1 -1
  833. package/build/transport/queue/index.mjs +1 -1
  834. package/build/updates/0.1-0.2/connection.js +3 -3
  835. package/build/updates/0.1-0.2/connection.mjs +3 -3
  836. package/build/updates/0.1-0.2/connection.mjs.map +1 -1
  837. package/build/updates/0.1-0.2/credential.js +1 -1
  838. package/build/updates/0.1-0.2/credential.mjs +1 -1
  839. package/build/updates/0.1-0.2/credential.mjs.map +1 -1
  840. package/build/updates/0.2-0.3/proof.js +1 -1
  841. package/build/updates/0.2-0.3/proof.mjs +1 -1
  842. package/build/updates/0.2-0.3/proof.mjs.map +1 -1
  843. package/build/updates/0.4-0.5/credentialExchangeRecord.js +2 -2
  844. package/build/updates/0.4-0.5/credentialExchangeRecord.mjs +2 -2
  845. package/build/updates/0.4-0.5/credentialExchangeRecord.mjs.map +1 -1
  846. package/build/updates/0.4-0.5/proofExchangeRecord.js +2 -2
  847. package/build/updates/0.4-0.5/proofExchangeRecord.mjs +2 -2
  848. package/build/util/DidCommLinkedAttachment.js +3 -3
  849. package/build/util/DidCommLinkedAttachment.mjs +2 -2
  850. package/build/util/JWE.mjs.map +1 -1
  851. package/build/util/attachment.d.mts.map +1 -1
  852. package/build/util/attachment.d.ts.map +1 -1
  853. package/build/util/attachment.mjs.map +1 -1
  854. package/build/util/messageType.d.mts +37 -1
  855. package/build/util/messageType.d.mts.map +1 -1
  856. package/build/util/messageType.d.ts +37 -1
  857. package/build/util/messageType.d.ts.map +1 -1
  858. package/build/util/messageType.js +4 -4
  859. package/build/util/messageType.mjs +4 -4
  860. package/build/util/messageType.mjs.map +1 -1
  861. package/build/util/parseInvitation.d.mts +8 -1
  862. package/build/util/parseInvitation.d.mts.map +1 -1
  863. package/build/util/parseInvitation.d.ts +8 -1
  864. package/build/util/parseInvitation.d.ts.map +1 -1
  865. package/build/util/parseInvitation.js +6 -5
  866. package/build/util/parseInvitation.mjs +7 -7
  867. package/build/util/parseInvitation.mjs.map +1 -1
  868. package/package.json +7 -7
@@ -1,14 +1,14 @@
1
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
2
1
  import { __decorate } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
2
+ import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
3
3
  import { DidCommModuleConfig } from "./DidCommModuleConfig.mjs";
4
- import { __decorateParam } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.mjs";
5
- import { DidCommDocumentService } from "./services/DidCommDocumentService.mjs";
6
4
  import { getResolvedDidcommServiceWithSigningKeyId } from "./modules/connections/services/helpers.mjs";
7
5
  import { DidCommOutOfBandRole } from "./modules/oob/domain/DidCommOutOfBandRole.mjs";
6
+ import { __decorateParam } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.mjs";
8
7
  import { DidCommOutOfBandRepository } from "./modules/oob/repository/DidCommOutOfBandRepository.mjs";
9
8
  import { DidCommOutOfBandRecordMetadataKeys } from "./modules/oob/repository/outOfBandRecordMetadataTypes.mjs";
10
9
  import { DidCommForwardMessage } from "./modules/routing/messages/DidCommForwardMessage.mjs";
11
10
  import { DidCommMediatorRoutingRepository } from "./modules/routing/repository/DidCommMediatorRoutingRepository.mjs";
11
+ import { DidCommDocumentService } from "./services/DidCommDocumentService.mjs";
12
12
  import { AgentContext, CredoError, InjectionSymbols, JsonEncoder, Kms, RecordNotFoundError, TypedArrayEncoder, inject, injectable } from "@credo-ts/core";
13
13
 
14
14
  //#region src/DidCommEnvelopeService.ts
@@ -23,7 +23,7 @@ let DidCommEnvelopeService = class DidCommEnvelopeService$1 {
23
23
  const contentEncryptionKey = kms.randomBytes({ length: 32 });
24
24
  const recipients = [];
25
25
  for (const recipientKey of recipientKeys) {
26
- let encryptedSender = void 0;
26
+ let encryptedSender;
27
27
  if (senderKey) {
28
28
  const { encrypted: encrypted$2 } = await kms.encrypt({
29
29
  key: { keyAgreement: {
@@ -92,7 +92,7 @@ let DidCommEnvelopeService = class DidCommEnvelopeService$1 {
92
92
  }
93
93
  if (!recipientKey || !recipient) throw new CredoError("No corresponding recipient key found");
94
94
  if (alg === "Authcrypt" && (!recipient.header.sender || !recipient.header.iv)) throw new CredoError("Sender and iv header values are required for Authcrypt");
95
- let senderPublicJwk = void 0;
95
+ let senderPublicJwk;
96
96
  if (recipient.header.sender) {
97
97
  const { data } = await kms.decrypt({
98
98
  key: { keyAgreement: {
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommEnvelopeService.mjs","names":["DidCommEnvelopeService","logger: Logger","recipients: Array<{\n encrypted_key: string\n header: {\n kid: string\n\n // In case of Authcrypt\n sender?: string\n iv?: string\n }\n }>","encryptedSender: string | undefined","encrypted","iv","recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null","recipient: {\n header: {\n kid: string\n iv?: string\n sender?: string\n }\n encrypted_key: string\n } | null","senderPublicJwk: Kms.PublicJwk<Kms.Ed25519PublicJwk> | undefined","routingKey","error"],"sources":["../src/DidCommEnvelopeService.ts"],"sourcesContent":["import {\n AgentContext,\n CredoError,\n InjectionSymbols,\n JsonEncoder,\n Kms,\n RecordNotFoundError,\n TypedArrayEncoder,\n inject,\n} from '@credo-ts/core'\nimport type { DidCommMessage } from './DidCommMessage'\nimport type { DidCommEncryptedMessage, DidCommPlaintextMessage } from './types'\n\nimport { type Logger, injectable } from '@credo-ts/core'\n\nimport { DidCommModuleConfig } from './DidCommModuleConfig'\nimport { getResolvedDidcommServiceWithSigningKeyId } from './modules/connections/services/helpers'\nimport { DidCommOutOfBandRole } from './modules/oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandRepository } from './modules/oob/repository/DidCommOutOfBandRepository'\nimport { DidCommOutOfBandRecordMetadataKeys } from './modules/oob/repository/outOfBandRecordMetadataTypes'\nimport { DidCommForwardMessage } from './modules/routing/messages/DidCommForwardMessage'\nimport { DidCommMediatorRoutingRepository } from './modules/routing/repository/DidCommMediatorRoutingRepository'\nimport { DidCommDocumentService } from './services/DidCommDocumentService'\n\nexport interface EnvelopeKeys {\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n senderKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n}\n\n@injectable()\nexport class DidCommEnvelopeService {\n private logger: Logger\n private didcommDocumentService: DidCommDocumentService\n\n public constructor(@inject(InjectionSymbols.Logger) logger: Logger, didcommDocumentService: DidCommDocumentService) {\n this.logger = logger\n this.didcommDocumentService = didcommDocumentService\n }\n\n private async encryptDidcommV1Message(\n agentContext: AgentContext,\n message: DidCommPlaintextMessage,\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[],\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n ): Promise<DidCommEncryptedMessage> {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n // Generally we would never generate the content encryption key outside of the KMS\n // However how DIDcommV1 is specified to calcualte the aad we need the encrypted content\n // encryption key, and thus we can't use the normal combined key agrement + encryption flow\n const contentEncryptionKey = kms.randomBytes({ length: 32 })\n\n const recipients: Array<{\n encrypted_key: string\n header: {\n kid: string\n\n // In case of Authcrypt\n sender?: string\n iv?: string\n }\n }> = []\n\n for (const recipientKey of recipientKeys) {\n let encryptedSender: string | undefined = undefined\n\n if (senderKey) {\n // Encrypt the sender\n const { encrypted } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n // DIDComm v1 uses Ed25519 keys but encryption happens with X25519 keys\n externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n data: TypedArrayEncoder.fromString(TypedArrayEncoder.toBase58(senderKey.publicKey.publicKey)),\n })\n\n encryptedSender = TypedArrayEncoder.toBase64URL(encrypted)\n }\n\n // Encrypt the key\n const { encrypted, iv } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),\n\n // Sender key only needed for Authcrypt\n keyId: senderKey?.keyId,\n },\n },\n data: contentEncryptionKey,\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n })\n\n recipients.push({\n encrypted_key: TypedArrayEncoder.toBase64URL(encrypted),\n header: {\n kid: TypedArrayEncoder.toBase58(recipientKey.publicKey.publicKey),\n iv: iv ? TypedArrayEncoder.toBase64URL(iv) : undefined,\n sender: encryptedSender,\n },\n })\n }\n\n const protectedString = JsonEncoder.toBase64URL({\n enc: 'xchacha20poly1305_ietf',\n typ: 'JWM/1.0',\n alg: senderKey ? 'Authcrypt' : 'Anoncrypt',\n recipients,\n })\n\n // Perofrm the actual encryption\n const { encrypted, iv, tag } = await kms.encrypt({\n encryption: {\n algorithm: 'C20P',\n aad: TypedArrayEncoder.fromString(protectedString),\n },\n data: JsonEncoder.toBuffer(message),\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64URL(contentEncryptionKey),\n },\n },\n })\n\n if (!iv || !tag) {\n throw new CredoError(\"Expected 'iv' and 'tag' to be defined\")\n }\n\n return {\n ciphertext: TypedArrayEncoder.toBase64URL(encrypted),\n iv: TypedArrayEncoder.toBase64URL(iv),\n tag: TypedArrayEncoder.toBase64URL(tag),\n protected: protectedString,\n } satisfies DidCommEncryptedMessage\n }\n\n private async decryptDidcommV1Message(agentContext: AgentContext, encryptedMessage: DidCommEncryptedMessage) {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n const protectedJson = JsonEncoder.fromBase64(encryptedMessage.protected)\n\n const alg = protectedJson.alg as 'Anoncrypt' | 'Authcrypt'\n if (alg !== 'Anoncrypt' && alg !== 'Authcrypt') {\n throw new CredoError(`Unsupported pack algorithm: ${alg}`)\n }\n\n if (protectedJson.enc !== 'xchacha20poly1305_ietf') {\n throw new CredoError(`Unsupported enc algorithm: ${protectedJson.enc}`)\n }\n\n let recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null = null\n let recipient: {\n header: {\n kid: string\n iv?: string\n sender?: string\n }\n encrypted_key: string\n } | null = null\n\n for (const _recipient of protectedJson.recipients) {\n recipientKey = await this.extractOurRecipientKeyWithKeyId(agentContext, _recipient)\n\n if (recipientKey) {\n recipient = _recipient\n }\n }\n\n if (!recipientKey || !recipient) {\n throw new CredoError('No corresponding recipient key found')\n }\n\n if (alg === 'Authcrypt' && (!recipient.header.sender || !recipient.header.iv)) {\n throw new CredoError('Sender and iv header values are required for Authcrypt')\n }\n\n let senderPublicJwk: Kms.PublicJwk<Kms.Ed25519PublicJwk> | undefined = undefined\n if (recipient.header.sender) {\n const { data } = await kms.decrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n },\n },\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n encrypted: TypedArrayEncoder.fromBase64(recipient.header.sender),\n })\n\n senderPublicJwk = Kms.PublicJwk.fromPublicKey({\n crv: 'Ed25519',\n kty: 'OKP',\n publicKey: TypedArrayEncoder.fromBase58(TypedArrayEncoder.toUtf8String(data)),\n })\n }\n\n // Perofrm the actual decryption\n const { data: contentEncryptionKey } = await kms.decrypt({\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n iv: recipient.header.iv ? TypedArrayEncoder.fromBase64(recipient.header.iv) : undefined,\n },\n encrypted: TypedArrayEncoder.fromBase64(recipient.encrypted_key),\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n\n // Optionally we have a sender\n externalPublicJwk: senderPublicJwk?.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n })\n\n const { data: message } = await kms.decrypt({\n decryption: {\n algorithm: 'C20P',\n iv: TypedArrayEncoder.fromBase64(encryptedMessage.iv),\n tag: TypedArrayEncoder.fromBase64(encryptedMessage.tag),\n aad: TypedArrayEncoder.fromString(encryptedMessage.protected),\n },\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64URL(contentEncryptionKey),\n },\n },\n encrypted: TypedArrayEncoder.fromBase64(encryptedMessage.ciphertext),\n })\n\n return {\n plaintextMessage: JsonEncoder.fromBuffer(message),\n senderKey: senderPublicJwk,\n recipientKey,\n }\n }\n\n public async packMessage(\n agentContext: AgentContext,\n payload: DidCommMessage,\n keys: EnvelopeKeys\n ): Promise<DidCommEncryptedMessage> {\n const didcommConfig = agentContext.dependencyManager.resolve(DidCommModuleConfig)\n\n const { routingKeys, senderKey } = keys\n let recipientKeys = keys.recipientKeys\n\n // pass whether we want to use legacy did sov prefix\n const message = payload.toJSON({ useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed })\n\n this.logger.debug(`Pack outbound message ${message['@type']}`)\n\n let encryptedMessage = await this.encryptDidcommV1Message(agentContext, message, recipientKeys, senderKey)\n\n // If the message has routing keys (mediator) pack for each mediator\n for (const routingKey of routingKeys) {\n const forwardMessage = new DidCommForwardMessage({\n // Forward to first recipient key\n to: TypedArrayEncoder.toBase58(recipientKeys[0].publicKey.publicKey),\n message: encryptedMessage,\n })\n recipientKeys = [routingKey]\n this.logger.debug('Forward message created', forwardMessage)\n\n const forwardJson = forwardMessage.toJSON({\n useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed,\n })\n\n // Forward messages are anon packed\n encryptedMessage = await this.encryptDidcommV1Message(agentContext, forwardJson, [routingKey])\n }\n\n this.logger.debug(`Packed outbound message ${message['@type']}`, {\n routingKeys: routingKeys.map((routingKey) => routingKey.fingerprint),\n })\n\n return encryptedMessage\n }\n\n public async unpackMessage(\n agentContext: AgentContext,\n encryptedMessage: DidCommEncryptedMessage\n ): Promise<DecryptedDidCommMessageContext> {\n const decryptedMessage = await this.decryptDidcommV1Message(agentContext, encryptedMessage)\n return decryptedMessage\n }\n\n private async extractOurRecipientKeyWithKeyId(\n agentContext: AgentContext,\n recipient: {\n header: {\n kid: string\n }\n }\n ): Promise<Kms.PublicJwk<Kms.Ed25519PublicJwk> | null> {\n const kms = agentContext.resolve(Kms.KeyManagementApi)\n\n const publicKey = Kms.PublicJwk.fromPublicKey({\n kty: 'OKP',\n crv: 'Ed25519',\n publicKey: TypedArrayEncoder.fromBase58(recipient.header.kid),\n })\n\n // We need to find the associated did based on the recipient key\n // so we can extract the kms key id from the did record.\n try {\n const { didDocument, keys } = await this.didcommDocumentService.resolveCreatedDidDocumentWithKeysByRecipientKey(\n agentContext,\n publicKey\n )\n\n const verificationMethod = didDocument.findVerificationMethodByPublicKey(publicKey)\n const kmsKeyId = keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n agentContext.config.logger.debug(\n `Found did '${didDocument.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = kmsKeyId ?? publicKey.legacyKeyId\n return publicKey\n } catch (error) {\n // If there is no did record yet, we first look at the mediator routing record\n const mediatorRoutingRepository = agentContext.dependencyManager.resolve(DidCommMediatorRoutingRepository)\n if (error instanceof RecordNotFoundError) {\n const mediatorRoutingRecord = await mediatorRoutingRepository.findSingleByQuery(agentContext, {\n routingKeyFingerprints: [publicKey.fingerprint],\n })\n\n if (mediatorRoutingRecord) {\n agentContext.config.logger.debug(\n `Found mediator routing record with id '${mediatorRoutingRecord.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n const routingKey = mediatorRoutingRecord.routingKeysWithKeyId.find((routingKey) =>\n publicKey.equals(routingKey)\n )\n\n // This should not happen as we only get here if the tag matches\n if (!routingKey) {\n throw new CredoError(\n `Expected to find key with fingerprint '${publicKey.fingerprint}' in routing keys of mediator routing record '${mediatorRoutingRecord.id}'`\n )\n }\n\n if (routingKey) {\n return routingKey\n }\n }\n\n // If there is no mediator routing record, we look at the out of band record\n const outOfBandRepository = agentContext.dependencyManager.resolve(DidCommOutOfBandRepository)\n const outOfBandRecord = await outOfBandRepository.findSingleByQuery(agentContext, {\n $or: [\n // In case we are the creator of the out of band invitation we can query based on\n // out of band invitation recipient key fingerprint\n {\n role: DidCommOutOfBandRole.Sender,\n recipientKeyFingerprints: [publicKey.fingerprint],\n },\n // In case we are the receiver of the out of band invitation we need to query\n // for the recipient routing fingerprint\n {\n role: DidCommOutOfBandRole.Receiver,\n recipientRoutingKeyFingerprint: publicKey.fingerprint,\n },\n ],\n })\n\n if (outOfBandRecord?.role === DidCommOutOfBandRole.Sender) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n for (const service of outOfBandRecord.outOfBandInvitation.getInlineServices()) {\n const resolvedService = getResolvedDidcommServiceWithSigningKeyId(\n service,\n outOfBandRecord.invitationInlineServiceKeys\n )\n const _recipientKey = resolvedService.recipientKeys.find((recipientKey) => recipientKey.equals(publicKey))\n\n if (_recipientKey) {\n return _recipientKey\n }\n }\n } else if (outOfBandRecord?.role === DidCommOutOfBandRole.Receiver) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n // If there is still no key we need to look at the metadata\n const recipieintRouting = outOfBandRecord.metadata.get(DidCommOutOfBandRecordMetadataKeys.RecipientRouting)\n if (recipieintRouting?.recipientKeyFingerprint === publicKey.fingerprint) {\n publicKey.keyId = recipieintRouting.recipientKeyId ?? publicKey.legacyKeyId\n return publicKey\n }\n }\n\n // If there is no did found, no out of band record found, and not mediator routing record\n // this is either:\n // - a connectionless oob exchange initiated before we added key ids.\n // - a message for a mediator, where the mediator routing record is created before we added key ids\n //\n // We will check if the public key exists based on the base58 encoded public key. We can remove this flow once we create a migration\n // that optimizes this flow.\n const kmsJwkPublic = await kms\n .getPublicKey({\n keyId: publicKey.legacyKeyId,\n })\n .catch((error) => {\n if (error instanceof Kms.KeyManagementKeyNotFoundError) return null\n throw error\n })\n if (kmsJwkPublic) {\n agentContext.config.logger.debug(\n `Found public key with legacy key id '${publicKey.legacyKeyId}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = publicKey.legacyKeyId\n return publicKey\n }\n }\n }\n\n // no match found\n return null\n }\n}\n\nexport interface DecryptedDidCommMessageContext {\n plaintextMessage: DidCommPlaintextMessage\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk>\n recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk>\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+BO,mCAAMA,yBAAuB;CAIlC,AAAO,YAAY,AAAiCC,QAAgB,wBAAgD;AAClH,OAAK,SAAS;AACd,OAAK,yBAAyB;;CAGhC,MAAc,wBACZ,cACA,SACA,eACA,WACkC;EAClC,MAAM,MAAM,aAAa,kBAAkB,QAAQ,IAAI,iBAAiB;EAIxE,MAAM,uBAAuB,IAAI,YAAY,EAAE,QAAQ,IAAI,CAAC;EAE5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AA2B,CAC5C,kBAAkB,cAAc,EAChF,KAAK,CAGH;KACE,MAAM,qBAAqB;KAC3B,0BAA0B,CAAC,UAAU,YAAY;KAClD,EAGD;KACE,MAAM,qBAAqB;KAC3B,gCAAgC,UAAU;KAC3C,CACF,EACF,CAAC;AAEF,QAAI,iBAAiB,SAAS,qBAAqB,QAAQ;AACzD,kBAAa,OAAO,OAAO,MACzB,qCAAqC,gBAAgB,GAAG,cAAc,gBAAgB,KAAK,uBAAuB,UAAU,YAAY,gCACzI;AAED,UAAK,MAAM,WAAW,gBAAgB,oBAAoB,mBAAmB,EAAE;MAK7E,MAAM,gBAJkB,0CACtB,SACA,gBAAgB,4BACjB,CACqC,cAAc,MAAM,iBAAiB,aAAa,OAAO,UAAU,CAAC;AAE1G,UAAI,cACF,QAAO;;eAGF,iBAAiB,SAAS,qBAAqB,UAAU;AAClE,kBAAa,OAAO,OAAO,MACzB,qCAAqC,gBAAgB,GAAG,cAAc,gBAAgB,KAAK,uBAAuB,UAAU,YAAY,gCACzI;KAGD,MAAM,oBAAoB,gBAAgB,SAAS,IAAI,mCAAmC,iBAAiB;AAC3G,SAAI,mBAAmB,4BAA4B,UAAU,aAAa;AACxE,gBAAU,QAAQ,kBAAkB,kBAAkB,UAAU;AAChE,aAAO;;;AAmBX,QARqB,MAAM,IACxB,aAAa,EACZ,OAAO,UAAU,aAClB,CAAC,CACD,OAAO,YAAU;AAChB,SAAIC,mBAAiB,IAAI,8BAA+B,QAAO;AAC/D,WAAMA;MACN,EACc;AAChB,kBAAa,OAAO,OAAO,MACzB,wCAAwC,UAAU,YAAY,uBAAuB,UAAU,YAAY,gCAC5G;AAED,eAAU,QAAQ,UAAU;AAC5B,YAAO;;;;AAMb,SAAO;;;;CAvZV,YAAY;oBAKS,OAAO,iBAAiB,OAAO"}
1
+ {"version":3,"file":"DidCommEnvelopeService.mjs","names":["DidCommEnvelopeService","logger: Logger","recipients: Array<{\n encrypted_key: string\n header: {\n kid: string\n\n // In case of Authcrypt\n sender?: string\n iv?: string\n }\n }>","encryptedSender: string | undefined","encrypted","iv","recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null","recipient: {\n header: {\n kid: string\n iv?: string\n sender?: string\n }\n encrypted_key: string\n } | null","senderPublicJwk: Kms.PublicJwk<Kms.Ed25519PublicJwk> | undefined","routingKey","error"],"sources":["../src/DidCommEnvelopeService.ts"],"sourcesContent":["import {\n AgentContext,\n CredoError,\n InjectionSymbols,\n inject,\n injectable,\n JsonEncoder,\n Kms,\n type Logger,\n RecordNotFoundError,\n TypedArrayEncoder,\n} from '@credo-ts/core'\nimport type { DidCommMessage } from './DidCommMessage'\nimport { DidCommModuleConfig } from './DidCommModuleConfig'\nimport { getResolvedDidcommServiceWithSigningKeyId } from './modules/connections/services/helpers'\nimport { DidCommOutOfBandRole } from './modules/oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandRepository } from './modules/oob/repository/DidCommOutOfBandRepository'\nimport { DidCommOutOfBandRecordMetadataKeys } from './modules/oob/repository/outOfBandRecordMetadataTypes'\nimport { DidCommForwardMessage } from './modules/routing/messages/DidCommForwardMessage'\nimport { DidCommMediatorRoutingRepository } from './modules/routing/repository/DidCommMediatorRoutingRepository'\nimport { DidCommDocumentService } from './services/DidCommDocumentService'\nimport type { DidCommEncryptedMessage, DidCommPlaintextMessage } from './types'\n\nexport interface EnvelopeKeys {\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n senderKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n}\n\n@injectable()\nexport class DidCommEnvelopeService {\n private logger: Logger\n private didcommDocumentService: DidCommDocumentService\n\n public constructor(@inject(InjectionSymbols.Logger) logger: Logger, didcommDocumentService: DidCommDocumentService) {\n this.logger = logger\n this.didcommDocumentService = didcommDocumentService\n }\n\n private async encryptDidcommV1Message(\n agentContext: AgentContext,\n message: DidCommPlaintextMessage,\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[],\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n ): Promise<DidCommEncryptedMessage> {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n // Generally we would never generate the content encryption key outside of the KMS\n // However how DIDcommV1 is specified to calcualte the aad we need the encrypted content\n // encryption key, and thus we can't use the normal combined key agrement + encryption flow\n const contentEncryptionKey = kms.randomBytes({ length: 32 })\n\n const recipients: Array<{\n encrypted_key: string\n header: {\n kid: string\n\n // In case of Authcrypt\n sender?: string\n iv?: string\n }\n }> = []\n\n for (const recipientKey of recipientKeys) {\n let encryptedSender: string | undefined\n\n if (senderKey) {\n // Encrypt the sender\n const { encrypted } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n // DIDComm v1 uses Ed25519 keys but encryption happens with X25519 keys\n externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n data: TypedArrayEncoder.fromString(TypedArrayEncoder.toBase58(senderKey.publicKey.publicKey)),\n })\n\n encryptedSender = TypedArrayEncoder.toBase64URL(encrypted)\n }\n\n // Encrypt the key\n const { encrypted, iv } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),\n\n // Sender key only needed for Authcrypt\n keyId: senderKey?.keyId,\n },\n },\n data: contentEncryptionKey,\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n })\n\n recipients.push({\n encrypted_key: TypedArrayEncoder.toBase64URL(encrypted),\n header: {\n kid: TypedArrayEncoder.toBase58(recipientKey.publicKey.publicKey),\n iv: iv ? TypedArrayEncoder.toBase64URL(iv) : undefined,\n sender: encryptedSender,\n },\n })\n }\n\n const protectedString = JsonEncoder.toBase64URL({\n enc: 'xchacha20poly1305_ietf',\n typ: 'JWM/1.0',\n alg: senderKey ? 'Authcrypt' : 'Anoncrypt',\n recipients,\n })\n\n // Perofrm the actual encryption\n const { encrypted, iv, tag } = await kms.encrypt({\n encryption: {\n algorithm: 'C20P',\n aad: TypedArrayEncoder.fromString(protectedString),\n },\n data: JsonEncoder.toBuffer(message),\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64URL(contentEncryptionKey),\n },\n },\n })\n\n if (!iv || !tag) {\n throw new CredoError(\"Expected 'iv' and 'tag' to be defined\")\n }\n\n return {\n ciphertext: TypedArrayEncoder.toBase64URL(encrypted),\n iv: TypedArrayEncoder.toBase64URL(iv),\n tag: TypedArrayEncoder.toBase64URL(tag),\n protected: protectedString,\n } satisfies DidCommEncryptedMessage\n }\n\n private async decryptDidcommV1Message(agentContext: AgentContext, encryptedMessage: DidCommEncryptedMessage) {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n const protectedJson = JsonEncoder.fromBase64(encryptedMessage.protected)\n\n const alg = protectedJson.alg as 'Anoncrypt' | 'Authcrypt'\n if (alg !== 'Anoncrypt' && alg !== 'Authcrypt') {\n throw new CredoError(`Unsupported pack algorithm: ${alg}`)\n }\n\n if (protectedJson.enc !== 'xchacha20poly1305_ietf') {\n throw new CredoError(`Unsupported enc algorithm: ${protectedJson.enc}`)\n }\n\n let recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null = null\n let recipient: {\n header: {\n kid: string\n iv?: string\n sender?: string\n }\n encrypted_key: string\n } | null = null\n\n for (const _recipient of protectedJson.recipients) {\n recipientKey = await this.extractOurRecipientKeyWithKeyId(agentContext, _recipient)\n\n if (recipientKey) {\n recipient = _recipient\n }\n }\n\n if (!recipientKey || !recipient) {\n throw new CredoError('No corresponding recipient key found')\n }\n\n if (alg === 'Authcrypt' && (!recipient.header.sender || !recipient.header.iv)) {\n throw new CredoError('Sender and iv header values are required for Authcrypt')\n }\n\n let senderPublicJwk: Kms.PublicJwk<Kms.Ed25519PublicJwk> | undefined\n if (recipient.header.sender) {\n const { data } = await kms.decrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n },\n },\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n encrypted: TypedArrayEncoder.fromBase64(recipient.header.sender),\n })\n\n senderPublicJwk = Kms.PublicJwk.fromPublicKey({\n crv: 'Ed25519',\n kty: 'OKP',\n publicKey: TypedArrayEncoder.fromBase58(TypedArrayEncoder.toUtf8String(data)),\n })\n }\n\n // Perofrm the actual decryption\n const { data: contentEncryptionKey } = await kms.decrypt({\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n iv: recipient.header.iv ? TypedArrayEncoder.fromBase64(recipient.header.iv) : undefined,\n },\n encrypted: TypedArrayEncoder.fromBase64(recipient.encrypted_key),\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n\n // Optionally we have a sender\n externalPublicJwk: senderPublicJwk?.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n })\n\n const { data: message } = await kms.decrypt({\n decryption: {\n algorithm: 'C20P',\n iv: TypedArrayEncoder.fromBase64(encryptedMessage.iv),\n tag: TypedArrayEncoder.fromBase64(encryptedMessage.tag),\n aad: TypedArrayEncoder.fromString(encryptedMessage.protected),\n },\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64URL(contentEncryptionKey),\n },\n },\n encrypted: TypedArrayEncoder.fromBase64(encryptedMessage.ciphertext),\n })\n\n return {\n plaintextMessage: JsonEncoder.fromBuffer(message),\n senderKey: senderPublicJwk,\n recipientKey,\n }\n }\n\n public async packMessage(\n agentContext: AgentContext,\n payload: DidCommMessage,\n keys: EnvelopeKeys\n ): Promise<DidCommEncryptedMessage> {\n const didcommConfig = agentContext.dependencyManager.resolve(DidCommModuleConfig)\n\n const { routingKeys, senderKey } = keys\n let recipientKeys = keys.recipientKeys\n\n // pass whether we want to use legacy did sov prefix\n const message = payload.toJSON({ useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed })\n\n this.logger.debug(`Pack outbound message ${message['@type']}`)\n\n let encryptedMessage = await this.encryptDidcommV1Message(agentContext, message, recipientKeys, senderKey)\n\n // If the message has routing keys (mediator) pack for each mediator\n for (const routingKey of routingKeys) {\n const forwardMessage = new DidCommForwardMessage({\n // Forward to first recipient key\n to: TypedArrayEncoder.toBase58(recipientKeys[0].publicKey.publicKey),\n message: encryptedMessage,\n })\n recipientKeys = [routingKey]\n this.logger.debug('Forward message created', forwardMessage)\n\n const forwardJson = forwardMessage.toJSON({\n useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed,\n })\n\n // Forward messages are anon packed\n encryptedMessage = await this.encryptDidcommV1Message(agentContext, forwardJson, [routingKey])\n }\n\n this.logger.debug(`Packed outbound message ${message['@type']}`, {\n routingKeys: routingKeys.map((routingKey) => routingKey.fingerprint),\n })\n\n return encryptedMessage\n }\n\n public async unpackMessage(\n agentContext: AgentContext,\n encryptedMessage: DidCommEncryptedMessage\n ): Promise<DecryptedDidCommMessageContext> {\n const decryptedMessage = await this.decryptDidcommV1Message(agentContext, encryptedMessage)\n return decryptedMessage\n }\n\n private async extractOurRecipientKeyWithKeyId(\n agentContext: AgentContext,\n recipient: {\n header: {\n kid: string\n }\n }\n ): Promise<Kms.PublicJwk<Kms.Ed25519PublicJwk> | null> {\n const kms = agentContext.resolve(Kms.KeyManagementApi)\n\n const publicKey = Kms.PublicJwk.fromPublicKey({\n kty: 'OKP',\n crv: 'Ed25519',\n publicKey: TypedArrayEncoder.fromBase58(recipient.header.kid),\n })\n\n // We need to find the associated did based on the recipient key\n // so we can extract the kms key id from the did record.\n try {\n const { didDocument, keys } = await this.didcommDocumentService.resolveCreatedDidDocumentWithKeysByRecipientKey(\n agentContext,\n publicKey\n )\n\n const verificationMethod = didDocument.findVerificationMethodByPublicKey(publicKey)\n const kmsKeyId = keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n agentContext.config.logger.debug(\n `Found did '${didDocument.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = kmsKeyId ?? publicKey.legacyKeyId\n return publicKey\n } catch (error) {\n // If there is no did record yet, we first look at the mediator routing record\n const mediatorRoutingRepository = agentContext.dependencyManager.resolve(DidCommMediatorRoutingRepository)\n if (error instanceof RecordNotFoundError) {\n const mediatorRoutingRecord = await mediatorRoutingRepository.findSingleByQuery(agentContext, {\n routingKeyFingerprints: [publicKey.fingerprint],\n })\n\n if (mediatorRoutingRecord) {\n agentContext.config.logger.debug(\n `Found mediator routing record with id '${mediatorRoutingRecord.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n const routingKey = mediatorRoutingRecord.routingKeysWithKeyId.find((routingKey) =>\n publicKey.equals(routingKey)\n )\n\n // This should not happen as we only get here if the tag matches\n if (!routingKey) {\n throw new CredoError(\n `Expected to find key with fingerprint '${publicKey.fingerprint}' in routing keys of mediator routing record '${mediatorRoutingRecord.id}'`\n )\n }\n\n if (routingKey) {\n return routingKey\n }\n }\n\n // If there is no mediator routing record, we look at the out of band record\n const outOfBandRepository = agentContext.dependencyManager.resolve(DidCommOutOfBandRepository)\n const outOfBandRecord = await outOfBandRepository.findSingleByQuery(agentContext, {\n $or: [\n // In case we are the creator of the out of band invitation we can query based on\n // out of band invitation recipient key fingerprint\n {\n role: DidCommOutOfBandRole.Sender,\n recipientKeyFingerprints: [publicKey.fingerprint],\n },\n // In case we are the receiver of the out of band invitation we need to query\n // for the recipient routing fingerprint\n {\n role: DidCommOutOfBandRole.Receiver,\n recipientRoutingKeyFingerprint: publicKey.fingerprint,\n },\n ],\n })\n\n if (outOfBandRecord?.role === DidCommOutOfBandRole.Sender) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n for (const service of outOfBandRecord.outOfBandInvitation.getInlineServices()) {\n const resolvedService = getResolvedDidcommServiceWithSigningKeyId(\n service,\n outOfBandRecord.invitationInlineServiceKeys\n )\n const _recipientKey = resolvedService.recipientKeys.find((recipientKey) => recipientKey.equals(publicKey))\n\n if (_recipientKey) {\n return _recipientKey\n }\n }\n } else if (outOfBandRecord?.role === DidCommOutOfBandRole.Receiver) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n // If there is still no key we need to look at the metadata\n const recipieintRouting = outOfBandRecord.metadata.get(DidCommOutOfBandRecordMetadataKeys.RecipientRouting)\n if (recipieintRouting?.recipientKeyFingerprint === publicKey.fingerprint) {\n publicKey.keyId = recipieintRouting.recipientKeyId ?? publicKey.legacyKeyId\n return publicKey\n }\n }\n\n // If there is no did found, no out of band record found, and not mediator routing record\n // this is either:\n // - a connectionless oob exchange initiated before we added key ids.\n // - a message for a mediator, where the mediator routing record is created before we added key ids\n //\n // We will check if the public key exists based on the base58 encoded public key. We can remove this flow once we create a migration\n // that optimizes this flow.\n const kmsJwkPublic = await kms\n .getPublicKey({\n keyId: publicKey.legacyKeyId,\n })\n .catch((error) => {\n if (error instanceof Kms.KeyManagementKeyNotFoundError) return null\n throw error\n })\n if (kmsJwkPublic) {\n agentContext.config.logger.debug(\n `Found public key with legacy key id '${publicKey.legacyKeyId}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = publicKey.legacyKeyId\n return publicKey\n }\n }\n }\n\n // no match found\n return null\n }\n}\n\nexport interface DecryptedDidCommMessageContext {\n plaintextMessage: DidCommPlaintextMessage\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk>\n recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk>\n}\n"],"mappings":";;;;;;;;;;;;;;;AA8BO,mCA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B,UAAU,YAAY,gCAC5G;AAED,eAAU,QAAQ,UAAU;AAC5B,YAAO;;;;AAMb,SAAO;;;;CAvZV,YAAY;oBAKS,OAAO,iBAAiB,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommFeatureRegistry.d.mts","names":[],"sources":["../src/DidCommFeatureRegistry.ts"],"sourcesContent":[],"mappings":";;;;cAKa,sBAAA;;;AADb;;;;UA8BgD,CAAA,GAAA,QAAA,EArBjB,cAqBiB,EAAA,CAAA,EAAA,IAAA;EAAA;;;;;;;;;oBAArB,wBAAqB"}
1
+ {"version":3,"file":"DidCommFeatureRegistry.d.mts","names":[],"sources":["../src/DidCommFeatureRegistry.ts"],"sourcesContent":[],"mappings":";;;;cAIa,sBAAA;;;AADb;;;;UA8BgD,CAAA,GAAA,QAAA,EArBjB,cAqBiB,EAAA,CAAA,EAAA,IAAA;EAAA;;;;;;;;;oBAArB,wBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommFeatureRegistry.d.ts","names":[],"sources":["../src/DidCommFeatureRegistry.ts"],"sourcesContent":[],"mappings":";;;;cAKa,sBAAA;;;AADb;;;;UA8BgD,CAAA,GAAA,QAAA,EArBjB,cAqBiB,EAAA,CAAA,EAAA,IAAA;EAAA;;;;;;;;;oBAArB,wBAAqB"}
1
+ {"version":3,"file":"DidCommFeatureRegistry.d.ts","names":[],"sources":["../src/DidCommFeatureRegistry.ts"],"sourcesContent":[],"mappings":";;;;cAIa,sBAAA;;;AADb;;;;UA8BgD,CAAA,GAAA,QAAA,EArBjB,cAqBiB,EAAA,CAAA,EAAA,IAAA;EAAA;;;;;;;;;oBAArB,wBAAqB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommFeatureRegistry.mjs","names":["DidCommFeatureRegistry"],"sources":["../src/DidCommFeatureRegistry.ts"],"sourcesContent":["import type { DidCommFeature, DidCommFeatureQuery } from './models'\n\nimport { injectable } from '@credo-ts/core'\n\n@injectable()\nexport class DidCommFeatureRegistry {\n private features: DidCommFeature[] = []\n\n /**\n * Register a single or set of Features on the registry\n *\n * @param features set of {Feature} objects or any inherited class\n */\n public register(...features: DidCommFeature[]) {\n for (const feature of features) {\n const index = this.features.findIndex((item) => item.type === feature.type && item.id === feature.id)\n\n if (index > -1) {\n this.features[index] = this.features[index].combine(feature)\n } else {\n this.features.push(feature)\n }\n }\n }\n\n /**\n * Perform a set of queries in the registry, supporting wildcards (*) as\n * expressed in Aries RFC 0557.\n *\n * @see https://github.com/hyperledger/aries-rfcs/blob/560ffd23361f16a01e34ccb7dcc908ec28c5ddb1/features/0557-discover-features-v2/README.md\n *\n * @param queries set of {FeatureQuery} objects to query features\n * @returns array containing all matching features (can be empty)\n */\n public query(...queries: DidCommFeatureQuery[]) {\n const output = []\n for (const query of queries) {\n const items = this.features.filter((item) => item.type === query.featureType)\n // An * will return all features of a given type (e.g. all protocols, all goal codes, all AIP configs)\n if (query.match === '*') {\n output.push(...items)\n // An string ending with * will return a family of features of a certain type\n // (e.g. all versions of a given protocol, all subsets of an AIP, etc.)\n } else if (query.match.endsWith('*')) {\n const match = query.match.slice(0, -1)\n output.push(...items.filter((m) => m.id.startsWith(match)))\n // Exact matching (single feature)\n } else {\n output.push(...items.filter((m) => m.id === query.match))\n }\n }\n return output\n }\n}\n"],"mappings":";;;;AAKO,mCAAMA,yBAAuB;;OAC1B,WAA6B,EAAE;;;;;;;CAOvC,AAAO,SAAS,GAAG,UAA4B;AAC7C,OAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,QAAQ,KAAK,SAAS,WAAW,SAAS,KAAK,SAAS,QAAQ,QAAQ,KAAK,OAAO,QAAQ,GAAG;AAErG,OAAI,QAAQ,GACV,MAAK,SAAS,SAAS,KAAK,SAAS,OAAO,QAAQ,QAAQ;OAE5D,MAAK,SAAS,KAAK,QAAQ;;;;;;;;;;;;CAcjC,AAAO,MAAM,GAAG,SAAgC;EAC9C,MAAM,SAAS,EAAE;AACjB,OAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,QAAQ,KAAK,SAAS,QAAQ,SAAS,KAAK,SAAS,MAAM,YAAY;AAE7E,OAAI,MAAM,UAAU,IAClB,QAAO,KAAK,GAAG,MAAM;YAGZ,MAAM,MAAM,SAAS,IAAI,EAAE;IACpC,MAAM,QAAQ,MAAM,MAAM,MAAM,GAAG,GAAG;AACtC,WAAO,KAAK,GAAG,MAAM,QAAQ,MAAM,EAAE,GAAG,WAAW,MAAM,CAAC,CAAC;SAG3D,QAAO,KAAK,GAAG,MAAM,QAAQ,MAAM,EAAE,OAAO,MAAM,MAAM,CAAC;;AAG7D,SAAO;;;qCA/CV,YAAY"}
1
+ {"version":3,"file":"DidCommFeatureRegistry.mjs","names":["DidCommFeatureRegistry"],"sources":["../src/DidCommFeatureRegistry.ts"],"sourcesContent":["import { injectable } from '@credo-ts/core'\nimport type { DidCommFeature, DidCommFeatureQuery } from './models'\n\n@injectable()\nexport class DidCommFeatureRegistry {\n private features: DidCommFeature[] = []\n\n /**\n * Register a single or set of Features on the registry\n *\n * @param features set of {Feature} objects or any inherited class\n */\n public register(...features: DidCommFeature[]) {\n for (const feature of features) {\n const index = this.features.findIndex((item) => item.type === feature.type && item.id === feature.id)\n\n if (index > -1) {\n this.features[index] = this.features[index].combine(feature)\n } else {\n this.features.push(feature)\n }\n }\n }\n\n /**\n * Perform a set of queries in the registry, supporting wildcards (*) as\n * expressed in Aries RFC 0557.\n *\n * @see https://github.com/hyperledger/aries-rfcs/blob/560ffd23361f16a01e34ccb7dcc908ec28c5ddb1/features/0557-discover-features-v2/README.md\n *\n * @param queries set of {FeatureQuery} objects to query features\n * @returns array containing all matching features (can be empty)\n */\n public query(...queries: DidCommFeatureQuery[]) {\n const output = []\n for (const query of queries) {\n const items = this.features.filter((item) => item.type === query.featureType)\n // An * will return all features of a given type (e.g. all protocols, all goal codes, all AIP configs)\n if (query.match === '*') {\n output.push(...items)\n // An string ending with * will return a family of features of a certain type\n // (e.g. all versions of a given protocol, all subsets of an AIP, etc.)\n } else if (query.match.endsWith('*')) {\n const match = query.match.slice(0, -1)\n output.push(...items.filter((m) => m.id.startsWith(match)))\n // Exact matching (single feature)\n } else {\n output.push(...items.filter((m) => m.id === query.match))\n }\n }\n return output\n }\n}\n"],"mappings":";;;;AAIO,mCAAMA,yBAAuB;;OAC1B,WAA6B,EAAE;;;;;;;CAOvC,AAAO,SAAS,GAAG,UAA4B;AAC7C,OAAK,MAAM,WAAW,UAAU;GAC9B,MAAM,QAAQ,KAAK,SAAS,WAAW,SAAS,KAAK,SAAS,QAAQ,QAAQ,KAAK,OAAO,QAAQ,GAAG;AAErG,OAAI,QAAQ,GACV,MAAK,SAAS,SAAS,KAAK,SAAS,OAAO,QAAQ,QAAQ;OAE5D,MAAK,SAAS,KAAK,QAAQ;;;;;;;;;;;;CAcjC,AAAO,MAAM,GAAG,SAAgC;EAC9C,MAAM,SAAS,EAAE;AACjB,OAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,QAAQ,KAAK,SAAS,QAAQ,SAAS,KAAK,SAAS,MAAM,YAAY;AAE7E,OAAI,MAAM,UAAU,IAClB,QAAO,KAAK,GAAG,MAAM;YAGZ,MAAM,MAAM,SAAS,IAAI,EAAE;IACpC,MAAM,QAAQ,MAAM,MAAM,MAAM,GAAG,GAAG;AACtC,WAAO,KAAK,GAAG,MAAM,QAAQ,MAAM,EAAE,GAAG,WAAW,MAAM,CAAC,CAAC;SAG3D,QAAO,KAAK,GAAG,MAAM,QAAQ,MAAM,EAAE,OAAO,MAAM,MAAM,CAAC;;AAG7D,SAAO;;;qCA/CV,YAAY"}
@@ -17,7 +17,7 @@ type ConstructableAgentMessage = Constructor<DidCommMessage> & {
17
17
  declare const Decorated: {
18
18
  new (...args: any[]): {
19
19
  thread?: ThreadDecorator;
20
- readonly threadId: string;
20
+ get threadId(): string;
21
21
  setThread(options: Partial<ThreadDecorator>): void;
22
22
  id: string;
23
23
  readonly type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessage.d.mts","names":[],"sources":["../src/DidCommMessage.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAiBY,yBAAA,GAA4B,YAAY;QAA0B;;cAExE;;aAIL;;;;IANW,SAAA,IAAA,EAAA,MAAA;IAAyB,UAAA,EAAA,EAAA,MAAA;;;OAAyC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAiB,IAAA,CAAA,eAAA;IAEzF,SAIL,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;IAAA,SAAA,EAAA,EAAA,MAAA,GAAA,SAAA;IAAA,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;IAAA,EAAA,EAAA,MAAA;IAEY,SAAA,IAAe,EAAA,MAAA;IAAA,UAAA,EAAA,EAAA,MAAA;;;OAkCC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAuB,SAAA,CAAA,cAAA;IAAyB,YAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,CAAA,EAAA,IAAA;IAAb,YAAA,EAAA,iBAAA,SAAA;IAlC5B,WAAA,EAAA,EAAA,OAAA;IAAS,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;cAAhC,cAAA,SAAuB,SAAA;;;;;;;;;;;;;;;;;;;MAqBkB;sBAazB,uBAAuB,YAAY,aAAa"}
1
+ {"version":3,"file":"DidCommMessage.d.mts","names":[],"sources":["../src/DidCommMessage.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAeY,yBAAA,GAA4B,YAAY;QAA0B;;cAExE;;aAIL;;;;IANW,SAAA,IAAA,EAAA,MAAA;IAAyB,UAAA,EAAA,EAAA,MAAA;;;OAAyC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAiB,IAAA,CAAA,eAAA;IAEzF,SAIL,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;IAAA,SAAA,EAAA,EAAA,MAAA,GAAA,SAAA;IAAA,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;IAAA,EAAA,EAAA,MAAA;IAEY,SAAA,IAAe,EAAA,MAAA;IAAA,UAAA,EAAA,EAAA,MAAA;;;OAoCC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAuB,SAAA,CAAA,cAAA;IAAyB,YAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,CAAA,EAAA,IAAA;IAAb,YAAA,EAAA,iBAAA,SAAA;IApC5B,WAAA,EAAA,EAAA,OAAA;IAAS,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;cAAhC,cAAA,SAAuB,SAAA;;;;;;;;;;;;;;;;;;;MAuBzB;sBAakB,uBAAuB,YAAY,aAAa"}
@@ -17,7 +17,7 @@ type ConstructableAgentMessage = Constructor<DidCommMessage> & {
17
17
  declare const Decorated: {
18
18
  new (...args: any[]): {
19
19
  thread?: ThreadDecorator;
20
- readonly threadId: string;
20
+ get threadId(): string;
21
21
  setThread(options: Partial<ThreadDecorator>): void;
22
22
  id: string;
23
23
  readonly type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessage.d.ts","names":[],"sources":["../src/DidCommMessage.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAiBY,yBAAA,GAA4B,YAAY;QAA0B;;cAExE;;aAIL;;;;IANW,SAAA,IAAA,EAAA,MAAA;IAAyB,UAAA,EAAA,EAAA,MAAA;;;OAAyC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAiB,IAAA,CAAA,eAAA;IAEzF,SAIL,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;IAAA,SAAA,EAAA,EAAA,MAAA,GAAA,SAAA;IAAA,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;IAAA,EAAA,EAAA,MAAA;IAEY,SAAA,IAAe,EAAA,MAAA;IAAA,UAAA,EAAA,EAAA,MAAA;;;OAkCC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAuB,SAAA,CAAA,cAAA;IAAyB,YAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,CAAA,EAAA,IAAA;IAAb,YAAA,EAAA,iBAAA,SAAA;IAlC5B,WAAA,EAAA,EAAA,OAAA;IAAS,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;cAAhC,cAAA,SAAuB,SAAA;;;;;;;;;;;;;;;;;;;MAqBkB;sBAazB,uBAAuB,YAAY,aAAa"}
1
+ {"version":3,"file":"DidCommMessage.d.ts","names":[],"sources":["../src/DidCommMessage.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAeY,yBAAA,GAA4B,YAAY;QAA0B;;cAExE;;aAIL;;;;IANW,SAAA,IAAA,EAAA,MAAA;IAAyB,UAAA,EAAA,EAAA,MAAA;;;OAAyC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAiB,IAAA,CAAA,eAAA;IAEzF,SAIL,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,IAAA;IAAA,SAAA,EAAA,EAAA,MAAA,GAAA,SAAA;IAAA,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;IAAA,EAAA,EAAA,MAAA;IAEY,SAAA,IAAe,EAAA,MAAA;IAAA,UAAA,EAAA,EAAA,MAAA;;;OAoCC,GAAA,IAAA,EAAA,GAAA,EAAA,CAAA,EAAA;IAAuB,SAAA,CAAA,cAAA;IAAyB,YAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,CAAA,EAAA,IAAA;IAAb,YAAA,EAAA,iBAAA,SAAA;IApC5B,WAAA,EAAA,EAAA,OAAA;IAAS,EAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;cAAhC,cAAA,SAAuB,SAAA;;;;;;;;;;;;;;;;;;;MAuBzB;sBAakB,uBAAuB,YAAY,aAAa"}
@@ -1,6 +1,7 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.js');
2
- const require_decorateMetadata = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
3
2
  const require_decorate = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
3
+ const require_messageType = require('./util/messageType.js');
4
+ const require_decorateMetadata = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
4
5
  const require_BaseDidCommMessage = require('./BaseDidCommMessage.js');
5
6
  const require_AckDecoratorExtension = require('./decorators/ack/AckDecoratorExtension.js');
6
7
  const require_AttachmentExtension = require('./decorators/attachment/AttachmentExtension.js');
@@ -9,7 +10,6 @@ const require_ServiceDecoratorExtension = require('./decorators/service/ServiceD
9
10
  const require_ThreadDecoratorExtension = require('./decorators/thread/ThreadDecoratorExtension.js');
10
11
  const require_TimingDecoratorExtension = require('./decorators/timing/TimingDecoratorExtension.js');
11
12
  const require_TransportDecoratorExtension = require('./decorators/transport/TransportDecoratorExtension.js');
12
- const require_messageType = require('./util/messageType.js');
13
13
  let __credo_ts_core = require("@credo-ts/core");
14
14
  __credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
15
15
  let class_transformer = require("class-transformer");
@@ -1,5 +1,6 @@
1
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
2
1
  import { __decorate } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
2
+ import { replaceNewDidCommPrefixWithLegacyDidSovOnMessage } from "./util/messageType.mjs";
3
+ import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
3
4
  import { BaseDidCommMessage } from "./BaseDidCommMessage.mjs";
4
5
  import { AckDecorated } from "./decorators/ack/AckDecoratorExtension.mjs";
5
6
  import { AttachmentDecorated } from "./decorators/attachment/AttachmentExtension.mjs";
@@ -8,7 +9,6 @@ import { ServiceDecorated } from "./decorators/service/ServiceDecoratorExtension
8
9
  import { ThreadDecorated } from "./decorators/thread/ThreadDecoratorExtension.mjs";
9
10
  import { TimingDecorated } from "./decorators/timing/TimingDecoratorExtension.mjs";
10
11
  import { TransportDecorated } from "./decorators/transport/TransportDecoratorExtension.mjs";
11
- import { replaceNewDidCommPrefixWithLegacyDidSovOnMessage } from "./util/messageType.mjs";
12
12
  import { JsonTransformer } from "@credo-ts/core";
13
13
  import { Exclude } from "class-transformer";
14
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessage.mjs","names":[],"sources":["../src/DidCommMessage.ts"],"sourcesContent":["import type { Constructor } from '@credo-ts/core'\nimport type { DidCommPlaintextMessage } from './types'\nimport type { ParsedMessageType } from './util/messageType'\n\nimport { JsonTransformer } from '@credo-ts/core'\nimport { Exclude } from 'class-transformer'\n\nimport { BaseDidCommMessage } from './BaseDidCommMessage'\nimport { AckDecorated } from './decorators/ack/AckDecoratorExtension'\nimport { AttachmentDecorated } from './decorators/attachment/AttachmentExtension'\nimport { L10nDecorated } from './decorators/l10n/L10nDecoratorExtension'\nimport { ServiceDecorated } from './decorators/service/ServiceDecoratorExtension'\nimport { ThreadDecorated } from './decorators/thread/ThreadDecoratorExtension'\nimport { TimingDecorated } from './decorators/timing/TimingDecoratorExtension'\nimport { TransportDecorated } from './decorators/transport/TransportDecoratorExtension'\nimport { replaceNewDidCommPrefixWithLegacyDidSovOnMessage } from './util/messageType'\n\nexport type ConstructableAgentMessage = Constructor<DidCommMessage> & { type: ParsedMessageType }\n\nconst Decorated = ThreadDecorated(\n L10nDecorated(\n TransportDecorated(TimingDecorated(AckDecorated(AttachmentDecorated(ServiceDecorated(BaseDidCommMessage)))))\n )\n)\n\nexport class DidCommMessage extends Decorated {\n /**\n * Whether the protocol RFC was initially written using the legacy did:prefix instead of the\n * new https://didcomm.org message type prefix.\n *\n * @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0348-transition-msg-type-to-https/README.md\n */\n @Exclude()\n public readonly allowDidSovPrefix: boolean = false\n\n /**\n * Whether to use Queue Transport in case the recipient of this message does not have a reliable\n * endpoint available\n *\n * @see https://github.com/decentralized-identity/didcomm-messaging/blob/main/extensions/return_route/main.md#queue-transport\n */\n @Exclude()\n public readonly allowQueueTransport: boolean = true\n\n public toJSON({\n useDidSovPrefixWhereAllowed,\n }: { useDidSovPrefixWhereAllowed?: boolean } = {}): DidCommPlaintextMessage {\n const json = JsonTransformer.toJSON(this)\n\n // If we have `useDidSovPrefixWhereAllowed` enabled, we want to replace the new https://didcomm.org prefix with the legacy did:sov prefix.\n // However, we only do this if the protocol RFC was initially written with the did:sov message type prefix\n // See https://github.com/hyperledger/aries-rfcs/blob/main/features/0348-transition-msg-type-to-https/README.md\n if (this.allowDidSovPrefix && useDidSovPrefixWhereAllowed) {\n replaceNewDidCommPrefixWithLegacyDidSovOnMessage(json)\n }\n\n return json as DidCommPlaintextMessage\n }\n\n public is<C extends typeof DidCommMessage>(Class: C): this is InstanceType<C> {\n return this.type === Class.type.messageTypeUri\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAM,YAAY,gBAChB,cACE,mBAAmB,gBAAgB,aAAa,oBAAoB,iBAAiB,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAC7G,CACF;AAED,IAAa,iBAAb,cAAoC,UAAU;;;OAQ5B,oBAA6B;OAS7B,sBAA+B;;CAE/C,AAAO,OAAO,EACZ,gCAC6C,EAAE,EAA2B;EAC1E,MAAM,OAAO,gBAAgB,OAAO,KAAK;AAKzC,MAAI,KAAK,qBAAqB,4BAC5B,kDAAiD,KAAK;AAGxD,SAAO;;CAGT,AAAO,GAAoC,OAAmC;AAC5E,SAAO,KAAK,SAAS,MAAM,KAAK;;;YA5BjC,SAAS;YAST,SAAS"}
1
+ {"version":3,"file":"DidCommMessage.mjs","names":[],"sources":["../src/DidCommMessage.ts"],"sourcesContent":["import type { Constructor } from '@credo-ts/core'\nimport { JsonTransformer } from '@credo-ts/core'\nimport { Exclude } from 'class-transformer'\nimport { BaseDidCommMessage } from './BaseDidCommMessage'\nimport { AckDecorated } from './decorators/ack/AckDecoratorExtension'\nimport { AttachmentDecorated } from './decorators/attachment/AttachmentExtension'\nimport { L10nDecorated } from './decorators/l10n/L10nDecoratorExtension'\nimport { ServiceDecorated } from './decorators/service/ServiceDecoratorExtension'\nimport { ThreadDecorated } from './decorators/thread/ThreadDecoratorExtension'\nimport { TimingDecorated } from './decorators/timing/TimingDecoratorExtension'\nimport { TransportDecorated } from './decorators/transport/TransportDecoratorExtension'\nimport type { DidCommPlaintextMessage } from './types'\nimport type { ParsedMessageType } from './util/messageType'\nimport { replaceNewDidCommPrefixWithLegacyDidSovOnMessage } from './util/messageType'\n\nexport type ConstructableAgentMessage = Constructor<DidCommMessage> & { type: ParsedMessageType }\n\nconst Decorated = ThreadDecorated(\n L10nDecorated(\n TransportDecorated(TimingDecorated(AckDecorated(AttachmentDecorated(ServiceDecorated(BaseDidCommMessage)))))\n )\n)\n\nexport class DidCommMessage extends Decorated {\n /**\n * Whether the protocol RFC was initially written using the legacy did:prefix instead of the\n * new https://didcomm.org message type prefix.\n *\n * @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0348-transition-msg-type-to-https/README.md\n */\n @Exclude()\n public readonly allowDidSovPrefix: boolean = false\n\n /**\n * Whether to use Queue Transport in case the recipient of this message does not have a reliable\n * endpoint available\n *\n * @see https://github.com/decentralized-identity/didcomm-messaging/blob/main/extensions/return_route/main.md#queue-transport\n */\n @Exclude()\n public readonly allowQueueTransport: boolean = true\n\n public toJSON({\n useDidSovPrefixWhereAllowed,\n }: {\n useDidSovPrefixWhereAllowed?: boolean\n } = {}): DidCommPlaintextMessage {\n const json = JsonTransformer.toJSON(this)\n\n // If we have `useDidSovPrefixWhereAllowed` enabled, we want to replace the new https://didcomm.org prefix with the legacy did:sov prefix.\n // However, we only do this if the protocol RFC was initially written with the did:sov message type prefix\n // See https://github.com/hyperledger/aries-rfcs/blob/main/features/0348-transition-msg-type-to-https/README.md\n if (this.allowDidSovPrefix && useDidSovPrefixWhereAllowed) {\n replaceNewDidCommPrefixWithLegacyDidSovOnMessage(json)\n }\n\n return json as DidCommPlaintextMessage\n }\n\n public is<C extends typeof DidCommMessage>(Class: C): this is InstanceType<C> {\n return this.type === Class.type.messageTypeUri\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,YAAY,gBAChB,cACE,mBAAmB,gBAAgB,aAAa,oBAAoB,iBAAiB,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAC7G,CACF;AAED,IAAa,iBAAb,cAAoC,UAAU;;;OAQ5B,oBAA6B;OAS7B,sBAA+B;;CAE/C,AAAO,OAAO,EACZ,gCAGE,EAAE,EAA2B;EAC/B,MAAM,OAAO,gBAAgB,OAAO,KAAK;AAKzC,MAAI,KAAK,qBAAqB,4BAC5B,kDAAiD,KAAK;AAGxD,SAAO;;CAGT,AAAO,GAAoC,OAAmC;AAC5E,SAAO,KAAK,SAAS,MAAM,KAAK;;;YA9BjC,SAAS;YAST,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessageHandlerRegistry.d.mts","names":[],"sources":["../src/DidCommMessageHandlerRegistry.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAUa,6BAAA;;sCAEgC;;EAFhC,sBAAA,CAAA,cAA6B,EAKM,qBALN,CAAA,EAAA,IAAA;EAAA,uBAAA,CAAA,eAAA,EASQ,qBATR,EAAA,CAAA,EAAA,IAAA;kCAEG,CAAA,wBAAA,EAauB,+BAbvB,CAAA,EAAA,IAAA;MAGG,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,cAAA,EAUmD,4BAVnD,EAAA,GAcb,OAda,CAcb,6BAAA,GAda,SAAA,CAAA,CAAA,GAAA,SAAA;;;;;2BAcb,CAAA,sBAAA,EAQwB,qBARxB,CAAA,QAAA,CAAA,CAAA,EAAA,IAAA;0BAQwB,CAAA,WAAA,EAAA,MAAA,CAAA,EAIH,qBAJG,GAAA,SAAA;+BAIH,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,OAUY,cAVZ,GAAA,SAAA;;;;;MAmDsC,qBAAA,CAAA,CAAA,EAzCZ,iBAAA,EAyCY;EAAA;;;;+BAd5D;6DAckC,6BAA0B"}
1
+ {"version":3,"file":"DidCommMessageHandlerRegistry.d.mts","names":[],"sources":["../src/DidCommMessageHandlerRegistry.ts"],"sourcesContent":[],"mappings":";;;;;;;;cASa,6BAAA;;sCAEgC;;EAFhC,sBAAA,CAAA,cAA6B,EAKM,qBALN,CAAA,EAAA,IAAA;EAAA,uBAAA,CAAA,eAAA,EASQ,qBATR,EAAA,CAAA,EAAA,IAAA;kCAEG,CAAA,wBAAA,EAauB,+BAbvB,CAAA,EAAA,IAAA;MAGG,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,cAAA,EAUmD,4BAVnD,EAAA,GAcb,OAda,CAcb,6BAAA,GAda,SAAA,CAAA,CAAA,GAAA,SAAA;;;;;2BAcb,CAAA,sBAAA,EAQwB,qBARxB,CAAA,QAAA,CAAA,CAAA,EAAA,IAAA;0BAQwB,CAAA,WAAA,EAAA,MAAA,CAAA,EAIH,qBAJG,GAAA,SAAA;+BAIH,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,OAUY,cAVZ,GAAA,SAAA;;;;;MAmDsC,qBAAA,CAAA,CAAA,EAzCZ,iBAAA,EAyCY;EAAA;;;;+BAd5D;6DAckC,6BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessageHandlerRegistry.d.ts","names":[],"sources":["../src/DidCommMessageHandlerRegistry.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAUa,6BAAA;;sCAEgC;;EAFhC,sBAAA,CAAA,cAA6B,EAKM,qBALN,CAAA,EAAA,IAAA;EAAA,uBAAA,CAAA,eAAA,EASQ,qBATR,EAAA,CAAA,EAAA,IAAA;kCAEG,CAAA,wBAAA,EAauB,+BAbvB,CAAA,EAAA,IAAA;MAGG,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,cAAA,EAUmD,4BAVnD,EAAA,GAcb,OAda,CAcb,6BAAA,GAda,SAAA,CAAA,CAAA,GAAA,SAAA;;;;;2BAcb,CAAA,sBAAA,EAQwB,qBARxB,CAAA,QAAA,CAAA,CAAA,EAAA,IAAA;0BAQwB,CAAA,WAAA,EAAA,MAAA,CAAA,EAIH,qBAJG,GAAA,SAAA;+BAIH,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,OAUY,cAVZ,GAAA,SAAA;;;;;MAmDsC,qBAAA,CAAA,CAAA,EAzCZ,iBAAA,EAyCY;EAAA;;;;+BAd5D;6DAckC,6BAA0B"}
1
+ {"version":3,"file":"DidCommMessageHandlerRegistry.d.ts","names":[],"sources":["../src/DidCommMessageHandlerRegistry.ts"],"sourcesContent":[],"mappings":";;;;;;;;cASa,6BAAA;;sCAEgC;;EAFhC,sBAAA,CAAA,cAA6B,EAKM,qBALN,CAAA,EAAA,IAAA;EAAA,uBAAA,CAAA,eAAA,EASQ,qBATR,EAAA,CAAA,EAAA,IAAA;kCAEG,CAAA,wBAAA,EAauB,+BAbvB,CAAA,EAAA,IAAA;MAGG,sBAAA,CAAA,CAAA,EAAA,CAAA,CAAA,cAAA,EAUmD,4BAVnD,EAAA,GAcb,OAda,CAcb,6BAAA,GAda,SAAA,CAAA,CAAA,GAAA,SAAA;;;;;2BAcb,CAAA,sBAAA,EAQwB,qBARxB,CAAA,QAAA,CAAA,CAAA,EAAA,IAAA;0BAQwB,CAAA,WAAA,EAAA,MAAA,CAAA,EAIH,qBAJG,GAAA,SAAA;+BAIH,CAAA,WAAA,EAAA,MAAA,CAAA,EAAA,OAUY,cAVZ,GAAA,SAAA;;;;;MAmDsC,qBAAA,CAAA,CAAA,EAzCZ,iBAAA,EAyCY;EAAA;;;;+BAd5D;6DAckC,6BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessageHandlerRegistry.mjs","names":["DidCommMessageHandlerRegistry"],"sources":["../src/DidCommMessageHandlerRegistry.ts"],"sourcesContent":["import type { DidCommMessage } from './DidCommMessage'\nimport type { DidCommMessageHandler } from './handlers/DidCommMessageHandler'\nimport type { DidCommMessageHandlerMiddleware } from './handlers/DidCommMessageHandlerMiddleware'\nimport type { ParsedDidCommProtocolUri } from './util/messageType'\n\nimport { injectable } from '@credo-ts/core'\n\nimport { canHandleMessageType, parseMessageType, supportsIncomingDidCommProtocolUri } from './util/messageType'\n\n@injectable()\nexport class DidCommMessageHandlerRegistry {\n private messageHandlers: DidCommMessageHandler[] = []\n public readonly messageHandlerMiddlewares: DidCommMessageHandlerMiddleware[] = []\n private _fallbackMessageHandler?: DidCommMessageHandler['handle']\n\n public registerMessageHandler(messageHandler: DidCommMessageHandler) {\n this.messageHandlers.push(messageHandler)\n }\n\n public registerMessageHandlers(messageHandlers: DidCommMessageHandler[]) {\n for (const messageHandler of messageHandlers) {\n this.registerMessageHandler(messageHandler)\n }\n }\n\n public registerMessageHandlerMiddleware(messageHandlerMiddleware: DidCommMessageHandlerMiddleware) {\n this.messageHandlerMiddlewares.push(messageHandlerMiddleware)\n }\n\n public get fallbackMessageHandler() {\n return this._fallbackMessageHandler\n }\n\n /**\n * Sets the fallback message handler, the message handler that will be called if no handler\n * is registered for an incoming message type.\n */\n public setFallbackMessageHandler(fallbackMessageHandler: DidCommMessageHandler['handle']) {\n this._fallbackMessageHandler = fallbackMessageHandler\n }\n\n public getHandlerForMessageType(messageType: string): DidCommMessageHandler | undefined {\n const incomingMessageType = parseMessageType(messageType)\n\n for (const handler of this.messageHandlers) {\n for (const MessageClass of handler.supportedMessages) {\n if (canHandleMessageType(MessageClass, incomingMessageType)) return handler\n }\n }\n }\n\n public getMessageClassForMessageType(messageType: string): typeof DidCommMessage | undefined {\n const incomingMessageType = parseMessageType(messageType)\n\n for (const handler of this.messageHandlers) {\n for (const MessageClass of handler.supportedMessages) {\n if (canHandleMessageType(MessageClass, incomingMessageType)) return MessageClass\n }\n }\n }\n\n /**\n * Returns array of message types that dispatcher is able to handle.\n * Message type format is MTURI specified at https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0003-protocols/README.md#mturi.\n */\n public get supportedMessageTypes() {\n return (\n this.messageHandlers\n // biome-ignore lint/performance/noAccumulatingSpread: <explanation>\n .reduce<(typeof DidCommMessage)[]>((all, cur) => [...all, ...cur.supportedMessages], [])\n .map((m) => m.type)\n )\n }\n\n /**\n * Returns array of protocol IDs that dispatcher is able to handle.\n * Protocol ID format is PIURI specified at https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0003-protocols/README.md#piuri.\n */\n public get supportedProtocolUris() {\n const seenProtocolUris = new Set<string>()\n\n const protocolUris: ParsedDidCommProtocolUri[] = this.supportedMessageTypes\n .filter((m) => {\n const has = seenProtocolUris.has(m.protocolUri)\n seenProtocolUris.add(m.protocolUri)\n return !has\n })\n .map(({ messageName, messageTypeUri, ...parsedProtocolUri }) => parsedProtocolUri)\n\n return protocolUris\n }\n\n public filterSupportedProtocolsByProtocolUris(parsedProtocolUris: ParsedDidCommProtocolUri[]) {\n return this.supportedProtocolUris.filter((supportedProtocol) =>\n parsedProtocolUris.some((p) => supportsIncomingDidCommProtocolUri(supportedProtocol, p))\n )\n }\n}\n"],"mappings":";;;;;AAUO,0CAAMA,gCAA8B;;OACjC,kBAA2C,EAAE;OACrC,4BAA+D,EAAE;;CAGjF,AAAO,uBAAuB,gBAAuC;AACnE,OAAK,gBAAgB,KAAK,eAAe;;CAG3C,AAAO,wBAAwB,iBAA0C;AACvE,OAAK,MAAM,kBAAkB,gBAC3B,MAAK,uBAAuB,eAAe;;CAI/C,AAAO,iCAAiC,0BAA2D;AACjG,OAAK,0BAA0B,KAAK,yBAAyB;;CAG/D,IAAW,yBAAyB;AAClC,SAAO,KAAK;;;;;;CAOd,AAAO,0BAA0B,wBAAyD;AACxF,OAAK,0BAA0B;;CAGjC,AAAO,yBAAyB,aAAwD;EACtF,MAAM,sBAAsB,iBAAiB,YAAY;AAEzD,OAAK,MAAM,WAAW,KAAK,gBACzB,MAAK,MAAM,gBAAgB,QAAQ,kBACjC,KAAI,qBAAqB,cAAc,oBAAoB,CAAE,QAAO;;CAK1E,AAAO,8BAA8B,aAAwD;EAC3F,MAAM,sBAAsB,iBAAiB,YAAY;AAEzD,OAAK,MAAM,WAAW,KAAK,gBACzB,MAAK,MAAM,gBAAgB,QAAQ,kBACjC,KAAI,qBAAqB,cAAc,oBAAoB,CAAE,QAAO;;;;;;CAS1E,IAAW,wBAAwB;AACjC,SACE,KAAK,gBAEF,QAAmC,KAAK,QAAQ,CAAC,GAAG,KAAK,GAAG,IAAI,kBAAkB,EAAE,EAAE,CAAC,CACvF,KAAK,MAAM,EAAE,KAAK;;;;;;CAQzB,IAAW,wBAAwB;EACjC,MAAM,mCAAmB,IAAI,KAAa;AAU1C,SARiD,KAAK,sBACnD,QAAQ,MAAM;GACb,MAAM,MAAM,iBAAiB,IAAI,EAAE,YAAY;AAC/C,oBAAiB,IAAI,EAAE,YAAY;AACnC,UAAO,CAAC;IACR,CACD,KAAK,EAAE,aAAa,eAAgB,GAAG,wBAAwB,kBAAkB;;CAKtF,AAAO,uCAAuC,oBAAgD;AAC5F,SAAO,KAAK,sBAAsB,QAAQ,sBACxC,mBAAmB,MAAM,MAAM,mCAAmC,mBAAmB,EAAE,CAAC,CACzF;;;4CAtFJ,YAAY"}
1
+ {"version":3,"file":"DidCommMessageHandlerRegistry.mjs","names":["DidCommMessageHandlerRegistry"],"sources":["../src/DidCommMessageHandlerRegistry.ts"],"sourcesContent":["import { injectable } from '@credo-ts/core'\nimport type { DidCommMessage } from './DidCommMessage'\nimport type { DidCommMessageHandler } from './handlers/DidCommMessageHandler'\nimport type { DidCommMessageHandlerMiddleware } from './handlers/DidCommMessageHandlerMiddleware'\nimport type { ParsedDidCommProtocolUri } from './util/messageType'\n\nimport { canHandleMessageType, parseMessageType, supportsIncomingDidCommProtocolUri } from './util/messageType'\n\n@injectable()\nexport class DidCommMessageHandlerRegistry {\n private messageHandlers: DidCommMessageHandler[] = []\n public readonly messageHandlerMiddlewares: DidCommMessageHandlerMiddleware[] = []\n private _fallbackMessageHandler?: DidCommMessageHandler['handle']\n\n public registerMessageHandler(messageHandler: DidCommMessageHandler) {\n this.messageHandlers.push(messageHandler)\n }\n\n public registerMessageHandlers(messageHandlers: DidCommMessageHandler[]) {\n for (const messageHandler of messageHandlers) {\n this.registerMessageHandler(messageHandler)\n }\n }\n\n public registerMessageHandlerMiddleware(messageHandlerMiddleware: DidCommMessageHandlerMiddleware) {\n this.messageHandlerMiddlewares.push(messageHandlerMiddleware)\n }\n\n public get fallbackMessageHandler() {\n return this._fallbackMessageHandler\n }\n\n /**\n * Sets the fallback message handler, the message handler that will be called if no handler\n * is registered for an incoming message type.\n */\n public setFallbackMessageHandler(fallbackMessageHandler: DidCommMessageHandler['handle']) {\n this._fallbackMessageHandler = fallbackMessageHandler\n }\n\n public getHandlerForMessageType(messageType: string): DidCommMessageHandler | undefined {\n const incomingMessageType = parseMessageType(messageType)\n\n for (const handler of this.messageHandlers) {\n for (const MessageClass of handler.supportedMessages) {\n if (canHandleMessageType(MessageClass, incomingMessageType)) return handler\n }\n }\n }\n\n public getMessageClassForMessageType(messageType: string): typeof DidCommMessage | undefined {\n const incomingMessageType = parseMessageType(messageType)\n\n for (const handler of this.messageHandlers) {\n for (const MessageClass of handler.supportedMessages) {\n if (canHandleMessageType(MessageClass, incomingMessageType)) return MessageClass\n }\n }\n }\n\n /**\n * Returns array of message types that dispatcher is able to handle.\n * Message type format is MTURI specified at https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0003-protocols/README.md#mturi.\n */\n public get supportedMessageTypes() {\n return (\n this.messageHandlers\n // biome-ignore lint/performance/noAccumulatingSpread: no explanation\n .reduce<(typeof DidCommMessage)[]>((all, cur) => [...all, ...cur.supportedMessages], [])\n .map((m) => m.type)\n )\n }\n\n /**\n * Returns array of protocol IDs that dispatcher is able to handle.\n * Protocol ID format is PIURI specified at https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0003-protocols/README.md#piuri.\n */\n public get supportedProtocolUris() {\n const seenProtocolUris = new Set<string>()\n\n const protocolUris: ParsedDidCommProtocolUri[] = this.supportedMessageTypes\n .filter((m) => {\n const has = seenProtocolUris.has(m.protocolUri)\n seenProtocolUris.add(m.protocolUri)\n return !has\n })\n .map(({ messageName, messageTypeUri, ...parsedProtocolUri }) => parsedProtocolUri)\n\n return protocolUris\n }\n\n public filterSupportedProtocolsByProtocolUris(parsedProtocolUris: ParsedDidCommProtocolUri[]) {\n return this.supportedProtocolUris.filter((supportedProtocol) =>\n parsedProtocolUris.some((p) => supportsIncomingDidCommProtocolUri(supportedProtocol, p))\n )\n }\n}\n"],"mappings":";;;;;AASO,0CAAMA,gCAA8B;;OACjC,kBAA2C,EAAE;OACrC,4BAA+D,EAAE;;CAGjF,AAAO,uBAAuB,gBAAuC;AACnE,OAAK,gBAAgB,KAAK,eAAe;;CAG3C,AAAO,wBAAwB,iBAA0C;AACvE,OAAK,MAAM,kBAAkB,gBAC3B,MAAK,uBAAuB,eAAe;;CAI/C,AAAO,iCAAiC,0BAA2D;AACjG,OAAK,0BAA0B,KAAK,yBAAyB;;CAG/D,IAAW,yBAAyB;AAClC,SAAO,KAAK;;;;;;CAOd,AAAO,0BAA0B,wBAAyD;AACxF,OAAK,0BAA0B;;CAGjC,AAAO,yBAAyB,aAAwD;EACtF,MAAM,sBAAsB,iBAAiB,YAAY;AAEzD,OAAK,MAAM,WAAW,KAAK,gBACzB,MAAK,MAAM,gBAAgB,QAAQ,kBACjC,KAAI,qBAAqB,cAAc,oBAAoB,CAAE,QAAO;;CAK1E,AAAO,8BAA8B,aAAwD;EAC3F,MAAM,sBAAsB,iBAAiB,YAAY;AAEzD,OAAK,MAAM,WAAW,KAAK,gBACzB,MAAK,MAAM,gBAAgB,QAAQ,kBACjC,KAAI,qBAAqB,cAAc,oBAAoB,CAAE,QAAO;;;;;;CAS1E,IAAW,wBAAwB;AACjC,SACE,KAAK,gBAEF,QAAmC,KAAK,QAAQ,CAAC,GAAG,KAAK,GAAG,IAAI,kBAAkB,EAAE,EAAE,CAAC,CACvF,KAAK,MAAM,EAAE,KAAK;;;;;;CAQzB,IAAW,wBAAwB;EACjC,MAAM,mCAAmB,IAAI,KAAa;AAU1C,SARiD,KAAK,sBACnD,QAAQ,MAAM;GACb,MAAM,MAAM,iBAAiB,IAAI,EAAE,YAAY;AAC/C,oBAAiB,IAAI,EAAE,YAAY;AACnC,UAAO,CAAC;IACR,CACD,KAAK,EAAE,aAAa,eAAgB,GAAG,wBAAwB,kBAAkB;;CAKtF,AAAO,uCAAuC,oBAAgD;AAC5F,SAAO,KAAK,sBAAsB,QAAQ,sBACxC,mBAAmB,MAAM,MAAM,mCAAmC,mBAAmB,EAAE,CAAC,CACzF;;;4CAtFJ,YAAY"}
@@ -1,7 +1,6 @@
1
- import { DidCommConnectionService } from "./modules/connections/services/DidCommConnectionService.mjs";
2
1
  import { DidCommEnvelopeService } from "./DidCommEnvelopeService.mjs";
2
+ import { DidCommConnectionService } from "./modules/connections/services/DidCommConnectionService.mjs";
3
3
  import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
4
- import { DidCommInboundTransport } from "./transport/DidCommInboundTransport.mjs";
5
4
  import { DidCommTransportService, DidCommTransportSession } from "./DidCommTransportService.mjs";
6
5
  import { DidCommMessageSender } from "./DidCommMessageSender.mjs";
7
6
  import { DidCommConnectionRecord } from "./modules/connections/repository/DidCommConnectionRecord.mjs";
@@ -18,11 +17,7 @@ declare class DidCommMessageReceiver {
18
17
  private connectionService;
19
18
  private messageHandlerRegistry;
20
19
  private agentContextProvider;
21
- private _inboundTransports;
22
20
  constructor(envelopeService: DidCommEnvelopeService, transportService: DidCommTransportService, messageSender: DidCommMessageSender, connectionService: DidCommConnectionService, dispatcher: DidCommDispatcher, messageHandlerRegistry: DidCommMessageHandlerRegistry, agentContextProvider: AgentContextProvider, logger: Logger);
23
- get inboundTransports(): DidCommInboundTransport[];
24
- registerInboundTransport(inboundTransport: DidCommInboundTransport): void;
25
- unregisterInboundTransport(inboundTransport: DidCommInboundTransport): Promise<void>;
26
21
  /**
27
22
  * Receive and handle an inbound DIDComm message. It will determine the agent context, decrypt the message, transform it
28
23
  * to it's corresponding message class and finally dispatch it to the dispatcher.
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessageReceiver.d.mts","names":[],"sources":["../src/DidCommMessageReceiver.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cA+Ba,sBAAA;EAAA,QAAA,eAAA;EAAsB,QAAA,gBAAA;UAYd,aAAA;UACC,UAAA;UACH,MAAA;UACI,iBAAA;UACP,sBAAA;UACY,oBAAA;UAC6C,kBAAA;aAC5B,CAAA,eAAA,EAPxB,sBAOwB,EAAA,gBAAA,EANvB,uBAMuB,EAAA,aAAA,EAL1B,oBAK0B,EAAA,iBAAA,EAJtB,wBAIsB,EAAA,UAAA,EAH7B,iBAG6B,EAAA,sBAAA,EAFjB,6BAEiB,EAAA,oBAAA,EAD4B,oBAC5B,EAAA,MAAA,EAAA,MAAA;MAaf,iBAAA,CAAA,CAAA,EAAA,uBAAA,EAAA;0BAIsB,CAAA,gBAAA,EAAA,uBAAA,CAAA,EAAA,IAAA;4BAIQ,CAAA,gBAAA,EAAA,uBAAA,CAAA,EAAuB,OAAvB,CAAA,IAAA,CAAA;;;;;;;gBAoBzC,CAAA,cAAA,EAAA,OAAA,EAAA;IAAA,OAAA;IAAA,UAAA;IAAA,oBAAA;IAAA;IAAA,EAAA;IAEA,OAAA,CAAA,EAHH,uBAGG;IACT,UAAA,CAAA,EAHS,uBAGT;IAAA,oBAAA,CAAA,EAAA,MAAA;iBADS;MACT"}
1
+ {"version":3,"file":"DidCommMessageReceiver.d.mts","names":[],"sources":["../src/DidCommMessageReceiver.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cA4Ba,sBAAA;EAAA,QAAA,eAAA;EAAsB,QAAA,gBAAA;UAWd,aAAA;UACC,UAAA;UACH,MAAA;UACI,iBAAA;UACP,sBAAA;UACY,oBAAA;aAC6C,CAAA,eAAA,EANpD,sBAMoD,EAAA,gBAAA,EALnD,uBAKmD,EAAA,aAAA,EAJtD,oBAIsD,EAAA,iBAAA,EAHlD,wBAGkD,EAAA,UAAA,EAFzD,iBAEyD,EAAA,sBAAA,EAD7C,6BAC6C,EAAA,oBAAA,EAAA,oBAAA,EAAA,MAAA,EAC5B,MAD4B;;;;;;;gBA4BtD,CAAA,cAAA,EAAA,OAAA,EAAA;IAAA,OAAA;IAAA,UAAA;IAAA,oBAAA;IAAA;IAAA,EAAA;IAEA,OAAA,CAAA,EAHH,uBAGG;IACT,UAAA,CAAA,EAHS,uBAGT;IAAA,oBAAA,CAAA,EAAA,MAAA;iBADS;MACT"}
@@ -1,7 +1,6 @@
1
- import { DidCommConnectionService } from "./modules/connections/services/DidCommConnectionService.js";
2
1
  import { DidCommEnvelopeService } from "./DidCommEnvelopeService.js";
2
+ import { DidCommConnectionService } from "./modules/connections/services/DidCommConnectionService.js";
3
3
  import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.js";
4
- import { DidCommInboundTransport } from "./transport/DidCommInboundTransport.js";
5
4
  import { DidCommTransportService, DidCommTransportSession } from "./DidCommTransportService.js";
6
5
  import { DidCommMessageSender } from "./DidCommMessageSender.js";
7
6
  import { DidCommConnectionRecord } from "./modules/connections/repository/DidCommConnectionRecord.js";
@@ -18,11 +17,7 @@ declare class DidCommMessageReceiver {
18
17
  private connectionService;
19
18
  private messageHandlerRegistry;
20
19
  private agentContextProvider;
21
- private _inboundTransports;
22
20
  constructor(envelopeService: DidCommEnvelopeService, transportService: DidCommTransportService, messageSender: DidCommMessageSender, connectionService: DidCommConnectionService, dispatcher: DidCommDispatcher, messageHandlerRegistry: DidCommMessageHandlerRegistry, agentContextProvider: AgentContextProvider, logger: Logger);
23
- get inboundTransports(): DidCommInboundTransport[];
24
- registerInboundTransport(inboundTransport: DidCommInboundTransport): void;
25
- unregisterInboundTransport(inboundTransport: DidCommInboundTransport): Promise<void>;
26
21
  /**
27
22
  * Receive and handle an inbound DIDComm message. It will determine the agent context, decrypt the message, transform it
28
23
  * to it's corresponding message class and finally dispatch it to the dispatcher.
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessageReceiver.d.ts","names":[],"sources":["../src/DidCommMessageReceiver.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cA+Ba,sBAAA;EAAA,QAAA,eAAA;EAAsB,QAAA,gBAAA;UAYd,aAAA;UACC,UAAA;UACH,MAAA;UACI,iBAAA;UACP,sBAAA;UACY,oBAAA;UAC6C,kBAAA;aAC5B,CAAA,eAAA,EAPxB,sBAOwB,EAAA,gBAAA,EANvB,uBAMuB,EAAA,aAAA,EAL1B,oBAK0B,EAAA,iBAAA,EAJtB,wBAIsB,EAAA,UAAA,EAH7B,iBAG6B,EAAA,sBAAA,EAFjB,6BAEiB,EAAA,oBAAA,EAD4B,oBAC5B,EAAA,MAAA,EAAA,MAAA;MAaf,iBAAA,CAAA,CAAA,EAAA,uBAAA,EAAA;0BAIsB,CAAA,gBAAA,EAAA,uBAAA,CAAA,EAAA,IAAA;4BAIQ,CAAA,gBAAA,EAAA,uBAAA,CAAA,EAAuB,OAAvB,CAAA,IAAA,CAAA;;;;;;;gBAoBzC,CAAA,cAAA,EAAA,OAAA,EAAA;IAAA,OAAA;IAAA,UAAA;IAAA,oBAAA;IAAA;IAAA,EAAA;IAEA,OAAA,CAAA,EAHH,uBAGG;IACT,UAAA,CAAA,EAHS,uBAGT;IAAA,oBAAA,CAAA,EAAA,MAAA;iBADS;MACT"}
1
+ {"version":3,"file":"DidCommMessageReceiver.d.ts","names":[],"sources":["../src/DidCommMessageReceiver.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cA4Ba,sBAAA;EAAA,QAAA,eAAA;EAAsB,QAAA,gBAAA;UAWd,aAAA;UACC,UAAA;UACH,MAAA;UACI,iBAAA;UACP,sBAAA;UACY,oBAAA;aAC6C,CAAA,eAAA,EANpD,sBAMoD,EAAA,gBAAA,EALnD,uBAKmD,EAAA,aAAA,EAJtD,oBAIsD,EAAA,iBAAA,EAHlD,wBAGkD,EAAA,UAAA,EAFzD,iBAEyD,EAAA,sBAAA,EAD7C,6BAC6C,EAAA,oBAAA,EAAA,oBAAA,EAAA,MAAA,EAC5B,MAD4B;;;;;;;gBA4BtD,CAAA,cAAA,EAAA,OAAA,EAAA;IAAA,OAAA;IAAA,UAAA;IAAA,oBAAA;IAAA;IAAA,EAAA;IAEA,OAAA,CAAA,EAHH,uBAGG;IACT,UAAA,CAAA,EAHS,uBAGT;IAAA,oBAAA,CAAA,EAAA,MAAA;iBADS;MACT"}
@@ -1,24 +1,24 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.js');
2
- const require_decorateMetadata = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
3
2
  const require_decorate = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
4
3
  const require_messageType = require('./util/messageType.js');
4
+ const require_DidCommMessageHandlerRegistry = require('./DidCommMessageHandlerRegistry.js');
5
+ const require_JWE = require('./util/JWE.js');
6
+ const require_decorateMetadata = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
5
7
  const require_DidCommMessage = require('./DidCommMessage.js');
8
+ const require_decorateParam = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.js');
9
+ const require_DidCommEnvelopeService = require('./DidCommEnvelopeService.js');
10
+ const require_DidCommTransportService = require('./DidCommTransportService.js');
6
11
  const require_DidCommProblemReportMessage = require('./messages/problem-reports/DidCommProblemReportMessage.js');
7
12
  const require_DidCommProblemReportError = require('./errors/problem-reports/DidCommProblemReportError.js');
8
13
  require('./errors/index.js');
9
- require('./messages/index.js');
10
- const require_DidCommProblemReportReason = require('./models/problem-reports/DidCommProblemReportReason.js');
11
14
  const require_DidCommInboundMessageContext = require('./models/DidCommInboundMessageContext.js');
12
15
  const require_DidCommOutboundMessageContext = require('./models/DidCommOutboundMessageContext.js');
16
+ const require_DidCommProblemReportReason = require('./models/problem-reports/DidCommProblemReportReason.js');
13
17
  require('./models/index.js');
14
- const require_JWE = require('./util/JWE.js');
15
- const require_DidCommTransportService = require('./DidCommTransportService.js');
16
- const require_decorateParam = require('./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.js');
17
- const require_DidCommConnectionService = require('./modules/connections/services/DidCommConnectionService.js');
18
- const require_DidCommEnvelopeService = require('./DidCommEnvelopeService.js');
19
18
  const require_DidCommMessageSender = require('./DidCommMessageSender.js');
19
+ require('./messages/index.js');
20
+ const require_DidCommConnectionService = require('./modules/connections/services/DidCommConnectionService.js');
20
21
  require('./modules/connections/services/index.js');
21
- const require_DidCommMessageHandlerRegistry = require('./DidCommMessageHandlerRegistry.js');
22
22
  const require_DidCommDispatcher = require('./DidCommDispatcher.js');
23
23
  let __credo_ts_core = require("@credo-ts/core");
24
24
  __credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
@@ -27,7 +27,6 @@ __credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
27
27
  var _ref, _ref2, _ref3, _ref4, _ref5, _ref6;
28
28
  let DidCommMessageReceiver = class DidCommMessageReceiver$1 {
29
29
  constructor(envelopeService, transportService, messageSender, connectionService, dispatcher, messageHandlerRegistry, agentContextProvider, logger) {
30
- this._inboundTransports = [];
31
30
  this.envelopeService = envelopeService;
32
31
  this.transportService = transportService;
33
32
  this.messageSender = messageSender;
@@ -36,17 +35,6 @@ let DidCommMessageReceiver = class DidCommMessageReceiver$1 {
36
35
  this.messageHandlerRegistry = messageHandlerRegistry;
37
36
  this.agentContextProvider = agentContextProvider;
38
37
  this.logger = logger;
39
- this._inboundTransports = [];
40
- }
41
- get inboundTransports() {
42
- return this._inboundTransports;
43
- }
44
- registerInboundTransport(inboundTransport) {
45
- this._inboundTransports.push(inboundTransport);
46
- }
47
- async unregisterInboundTransport(inboundTransport) {
48
- this._inboundTransports = this._inboundTransports.filter((transport) => transport !== inboundTransport);
49
- await inboundTransport.stop();
50
38
  }
51
39
  /**
52
40
  * Receive and handle an inbound DIDComm message. It will determine the agent context, decrypt the message, transform it
@@ -1,23 +1,23 @@
1
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
2
1
  import { __decorate } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
3
2
  import { canHandleMessageType, parseMessageType, replaceLegacyDidSovPrefixOnMessage } from "./util/messageType.mjs";
3
+ import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
4
+ import { isValidJweStructure } from "./util/JWE.mjs";
5
+ import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
4
6
  import { DidCommMessage } from "./DidCommMessage.mjs";
7
+ import { __decorateParam } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.mjs";
8
+ import { DidCommEnvelopeService } from "./DidCommEnvelopeService.mjs";
9
+ import { DidCommTransportService } from "./DidCommTransportService.mjs";
5
10
  import { DidCommProblemReportMessage } from "./messages/problem-reports/DidCommProblemReportMessage.mjs";
6
11
  import { DidCommProblemReportError } from "./errors/problem-reports/DidCommProblemReportError.mjs";
7
12
  import "./errors/index.mjs";
8
- import "./messages/index.mjs";
9
- import { DidCommProblemReportReason } from "./models/problem-reports/DidCommProblemReportReason.mjs";
10
13
  import { DidCommInboundMessageContext } from "./models/DidCommInboundMessageContext.mjs";
11
14
  import { DidCommOutboundMessageContext } from "./models/DidCommOutboundMessageContext.mjs";
15
+ import { DidCommProblemReportReason } from "./models/problem-reports/DidCommProblemReportReason.mjs";
12
16
  import "./models/index.mjs";
13
- import { isValidJweStructure } from "./util/JWE.mjs";
14
- import { DidCommTransportService } from "./DidCommTransportService.mjs";
15
- import { __decorateParam } from "./_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateParam.mjs";
16
- import { DidCommConnectionService } from "./modules/connections/services/DidCommConnectionService.mjs";
17
- import { DidCommEnvelopeService } from "./DidCommEnvelopeService.mjs";
18
17
  import { DidCommMessageSender } from "./DidCommMessageSender.mjs";
18
+ import "./messages/index.mjs";
19
+ import { DidCommConnectionService } from "./modules/connections/services/DidCommConnectionService.mjs";
19
20
  import "./modules/connections/services/index.mjs";
20
- import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
21
21
  import { DidCommDispatcher } from "./DidCommDispatcher.mjs";
22
22
  import { CredoError, InjectionSymbols, JsonTransformer, inject, injectable } from "@credo-ts/core";
23
23
 
@@ -25,7 +25,6 @@ import { CredoError, InjectionSymbols, JsonTransformer, inject, injectable } fro
25
25
  var _ref, _ref2, _ref3, _ref4, _ref5, _ref6;
26
26
  let DidCommMessageReceiver = class DidCommMessageReceiver$1 {
27
27
  constructor(envelopeService, transportService, messageSender, connectionService, dispatcher, messageHandlerRegistry, agentContextProvider, logger) {
28
- this._inboundTransports = [];
29
28
  this.envelopeService = envelopeService;
30
29
  this.transportService = transportService;
31
30
  this.messageSender = messageSender;
@@ -34,17 +33,6 @@ let DidCommMessageReceiver = class DidCommMessageReceiver$1 {
34
33
  this.messageHandlerRegistry = messageHandlerRegistry;
35
34
  this.agentContextProvider = agentContextProvider;
36
35
  this.logger = logger;
37
- this._inboundTransports = [];
38
- }
39
- get inboundTransports() {
40
- return this._inboundTransports;
41
- }
42
- registerInboundTransport(inboundTransport) {
43
- this._inboundTransports.push(inboundTransport);
44
- }
45
- async unregisterInboundTransport(inboundTransport) {
46
- this._inboundTransports = this._inboundTransports.filter((transport) => transport !== inboundTransport);
47
- await inboundTransport.stop();
48
36
  }
49
37
  /**
50
38
  * Receive and handle an inbound DIDComm message. It will determine the agent context, decrypt the message, transform it
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommMessageReceiver.mjs","names":["DidCommMessageReceiver","agentContextProvider: AgentContextProvider","logger: Logger","message: DidCommMessage","messageTransformed: DidCommMessage"],"sources":["../src/DidCommMessageReceiver.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport type { DecryptedDidCommMessageContext } from './DidCommEnvelopeService'\nimport type { DidCommTransportSession } from './DidCommTransportService'\nimport type { DidCommConnectionRecord } from './modules/connections/repository'\nimport type { DidCommInboundTransport } from './transport'\nimport type { DidCommEncryptedMessage, DidCommPlaintextMessage } from './types'\n\nimport {\n type AgentContextProvider,\n CredoError,\n InjectionSymbols,\n JsonTransformer,\n type Logger,\n inject,\n injectable,\n} from '@credo-ts/core'\n\nimport { DidCommDispatcher } from './DidCommDispatcher'\nimport { DidCommEnvelopeService } from './DidCommEnvelopeService'\nimport { DidCommMessage } from './DidCommMessage'\nimport { DidCommMessageHandlerRegistry } from './DidCommMessageHandlerRegistry'\nimport { DidCommMessageSender } from './DidCommMessageSender'\nimport { DidCommTransportService } from './DidCommTransportService'\nimport { DidCommProblemReportError } from './errors'\nimport { DidCommProblemReportMessage } from './messages'\nimport { DidCommInboundMessageContext, DidCommOutboundMessageContext, DidCommProblemReportReason } from './models'\nimport { DidCommConnectionService } from './modules/connections/services'\nimport { isValidJweStructure } from './util/JWE'\nimport { canHandleMessageType, parseMessageType, replaceLegacyDidSovPrefixOnMessage } from './util/messageType'\n\n@injectable()\nexport class DidCommMessageReceiver {\n private envelopeService: DidCommEnvelopeService\n private transportService: DidCommTransportService\n private messageSender: DidCommMessageSender\n private dispatcher: DidCommDispatcher\n private logger: Logger\n private connectionService: DidCommConnectionService\n private messageHandlerRegistry: DidCommMessageHandlerRegistry\n private agentContextProvider: AgentContextProvider\n private _inboundTransports: DidCommInboundTransport[] = []\n\n public constructor(\n envelopeService: DidCommEnvelopeService,\n transportService: DidCommTransportService,\n messageSender: DidCommMessageSender,\n connectionService: DidCommConnectionService,\n dispatcher: DidCommDispatcher,\n messageHandlerRegistry: DidCommMessageHandlerRegistry,\n @inject(InjectionSymbols.AgentContextProvider) agentContextProvider: AgentContextProvider,\n @inject(InjectionSymbols.Logger) logger: Logger\n ) {\n this.envelopeService = envelopeService\n this.transportService = transportService\n this.messageSender = messageSender\n this.connectionService = connectionService\n this.dispatcher = dispatcher\n this.messageHandlerRegistry = messageHandlerRegistry\n this.agentContextProvider = agentContextProvider\n this.logger = logger\n this._inboundTransports = []\n }\n\n public get inboundTransports() {\n return this._inboundTransports\n }\n\n public registerInboundTransport(inboundTransport: DidCommInboundTransport) {\n this._inboundTransports.push(inboundTransport)\n }\n\n public async unregisterInboundTransport(inboundTransport: DidCommInboundTransport) {\n this._inboundTransports = this._inboundTransports.filter((transport) => transport !== inboundTransport)\n await inboundTransport.stop()\n }\n\n /**\n * Receive and handle an inbound DIDComm message. It will determine the agent context, decrypt the message, transform it\n * to it's corresponding message class and finally dispatch it to the dispatcher.\n *\n * @param inboundMessage the message to receive and handle\n */\n public async receiveMessage(\n inboundMessage: unknown,\n {\n session,\n connection,\n contextCorrelationId,\n receivedAt,\n }: {\n session?: DidCommTransportSession\n connection?: DidCommConnectionRecord\n contextCorrelationId?: string\n receivedAt?: Date\n } = {}\n ) {\n this.logger.debug('Agent received message')\n\n // Find agent context for the inbound message\n const agentContext = await this.agentContextProvider.getContextForInboundMessage(inboundMessage, {\n contextCorrelationId,\n })\n\n try {\n if (this.isEncryptedMessage(inboundMessage)) {\n await this.receiveEncryptedMessage(agentContext, inboundMessage as DidCommEncryptedMessage, session, receivedAt)\n } else if (this.isPlaintextMessage(inboundMessage)) {\n await this.receivePlaintextMessage(agentContext, inboundMessage, connection, receivedAt)\n } else {\n throw new CredoError('Unable to parse incoming message: unrecognized format')\n }\n } finally {\n // Always end the session for the agent context after handling the message.\n await agentContext.endSession()\n }\n }\n\n private async receivePlaintextMessage(\n agentContext: AgentContext,\n plaintextMessage: DidCommPlaintextMessage,\n connection?: DidCommConnectionRecord,\n receivedAt?: Date\n ) {\n const message = await this.transformAndValidate(agentContext, plaintextMessage)\n const messageContext = new DidCommInboundMessageContext(message, { connection, agentContext, receivedAt })\n await this.dispatcher.dispatch(messageContext)\n }\n\n private async receiveEncryptedMessage(\n agentContext: AgentContext,\n encryptedMessage: DidCommEncryptedMessage,\n session?: DidCommTransportSession,\n receivedAt?: Date\n ) {\n const decryptedMessage = await this.decryptMessage(agentContext, encryptedMessage)\n const { plaintextMessage, senderKey, recipientKey } = decryptedMessage\n\n this.logger.info(\n `Received message with type '${plaintextMessage['@type']}', recipient key ${recipientKey?.fingerprint} and sender key ${senderKey?.fingerprint}`,\n plaintextMessage\n )\n\n const connection = await this.findConnectionByMessageKeys(agentContext, decryptedMessage)\n\n const message = await this.transformAndValidate(agentContext, plaintextMessage, connection)\n\n const messageContext = new DidCommInboundMessageContext(message, {\n // Only make the connection available in message context if the connection is ready\n // To prevent unwanted usage of unready connections. Connections can still be retrieved from\n // Storage if the specific protocol allows an unready connection to be used.\n connection: connection?.isReady ? connection : undefined,\n senderKey,\n recipientKey,\n agentContext,\n receivedAt,\n encryptedMessage,\n })\n\n // We want to save a session if there is a chance of returning outbound message via inbound transport.\n // That can happen when inbound message has `return_route` set to `all` or `thread`.\n // If `return_route` defines just `thread`, we decide later whether to use session according to outbound message `threadId`.\n if (senderKey && recipientKey && message.hasAnyReturnRoute() && session) {\n this.logger.debug(`Storing session for inbound message '${message.id}'`)\n const keys = {\n recipientKeys: [senderKey],\n routingKeys: [],\n senderKey: recipientKey,\n }\n session.keys = keys\n session.inboundMessage = message\n // We allow unready connections to be attached to the session as we want to be able to\n // use return routing to make connections. This is especially useful for creating connections\n // with mediators when you don't have a public endpoint yet.\n session.connectionId = connection?.id\n messageContext.sessionId = session.id\n this.transportService.saveSession(session)\n } else if (session) {\n // No need to wait for session to stay open if we're not actually going to respond to the message.\n await session.close()\n }\n\n await this.dispatcher.dispatch(messageContext)\n }\n\n /**\n * Decrypt a message using the envelope service.\n *\n * @param message the received inbound message to decrypt\n */\n private async decryptMessage(\n agentContext: AgentContext,\n message: DidCommEncryptedMessage\n ): Promise<DecryptedDidCommMessageContext> {\n try {\n return await this.envelopeService.unpackMessage(agentContext, message)\n } catch (error) {\n this.logger.error('Error while decrypting message', {\n error,\n encryptedMessage: message,\n errorMessage: error instanceof Error ? error.message : error,\n })\n throw error\n }\n }\n\n private isPlaintextMessage(message: unknown): message is DidCommPlaintextMessage {\n if (typeof message !== 'object' || message == null) {\n return false\n }\n // If the message has a @type field we assume the message is in plaintext and it is not encrypted.\n return '@type' in message\n }\n\n private isEncryptedMessage(message: unknown): message is DidCommEncryptedMessage {\n // If the message does has valid JWE structure, we can assume the message is encrypted.\n return isValidJweStructure(message)\n }\n\n private async transformAndValidate(\n agentContext: AgentContext,\n plaintextMessage: DidCommPlaintextMessage,\n connection?: DidCommConnectionRecord | null\n ): Promise<DidCommMessage> {\n let message: DidCommMessage\n try {\n message = await this.transformMessage(plaintextMessage)\n } catch (error) {\n if (connection) await this.sendProblemReportMessage(agentContext, error.message, connection, plaintextMessage)\n throw error\n }\n return message\n }\n\n private async findConnectionByMessageKeys(\n agentContext: AgentContext,\n { recipientKey, senderKey }: DecryptedDidCommMessageContext\n ): Promise<DidCommConnectionRecord | null> {\n // We only fetch connections that are sent in AuthCrypt mode\n if (!recipientKey || !senderKey) return null\n\n // Try to find the did records that holds the sender and recipient keys\n return this.connectionService.findByKeys(agentContext, {\n senderKey,\n recipientKey,\n })\n }\n\n /**\n * Transform an plaintext DIDComm message into it's corresponding message class. Will look at all message types in the registered handlers.\n *\n * @param message the plaintext message for which to transform the message in to a class instance\n */\n private async transformMessage(message: DidCommPlaintextMessage): Promise<DidCommMessage> {\n // replace did:sov:BzCbsNYhMrjHiqZDTUASHg;spec prefix for message type with https://didcomm.org\n replaceLegacyDidSovPrefixOnMessage(message)\n\n const messageType = message['@type']\n const MessageClass = this.messageHandlerRegistry.getMessageClassForMessageType(messageType) ?? DidCommMessage\n\n // Cast the plain JSON object to specific instance of Message extended from DidCommMessage\n let messageTransformed: DidCommMessage\n try {\n messageTransformed = JsonTransformer.fromJSON(message, MessageClass)\n } catch (error) {\n this.logger.error(`Error validating message ${message['@type']}`, {\n errors: error,\n message: JSON.stringify(message),\n })\n throw new DidCommProblemReportError(`Error validating message ${message['@type']}`, {\n problemCode: DidCommProblemReportReason.MessageParseFailure,\n })\n }\n return messageTransformed\n }\n\n /**\n * Send the problem report message (https://didcomm.org/notification/1.0/problem-report) to the recipient.\n * @param message error message to send\n * @param connection connection to send the message to\n * @param plaintextMessage received inbound message\n */\n private async sendProblemReportMessage(\n agentContext: AgentContext,\n message: string,\n connection: DidCommConnectionRecord,\n plaintextMessage: DidCommPlaintextMessage\n ) {\n const messageType = parseMessageType(plaintextMessage['@type'])\n if (canHandleMessageType(DidCommProblemReportMessage, messageType)) {\n throw new CredoError(`Not sending problem report in response to problem report: ${message}`)\n }\n const problemReportMessage = new DidCommProblemReportMessage({\n description: {\n en: message,\n code: DidCommProblemReportReason.MessageParseFailure,\n },\n })\n problemReportMessage.setThread({\n parentThreadId: plaintextMessage['@id'],\n })\n const outboundMessageContext = new DidCommOutboundMessageContext(problemReportMessage, { agentContext, connection })\n if (outboundMessageContext) {\n await this.messageSender.sendMessage(outboundMessageContext)\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+BO,mCAAMA,yBAAuB;CAWlC,AAAO,YACL,iBACA,kBACA,eACA,mBACA,YACA,wBACA,AAA+CC,sBAC/C,AAAiCC,QACjC;OAXM,qBAAgD,EAAE;AAYxD,OAAK,kBAAkB;AACvB,OAAK,mBAAmB;AACxB,OAAK,gBAAgB;AACrB,OAAK,oBAAoB;AACzB,OAAK,aAAa;AAClB,OAAK,yBAAyB;AAC9B,OAAK,uBAAuB;AAC5B,OAAK,SAAS;AACd,OAAK,qBAAqB,EAAE;;CAG9B,IAAW,oBAAoB;AAC7B,SAAO,KAAK;;CAGd,AAAO,yBAAyB,kBAA2C;AACzE,OAAK,mBAAmB,KAAK,iBAAiB;;CAGhD,MAAa,2BAA2B,kBAA2C;AACjF,OAAK,qBAAqB,KAAK,mBAAmB,QAAQ,cAAc,cAAc,iBAAiB;AACvG,QAAM,iBAAiB,MAAM;;;;;;;;CAS/B,MAAa,eACX,gBACA,EACE,SACA,YACA,sBACA,eA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ClF,aAAa,2BAA2B,qBACzC,CAAC;;AAEJ,SAAO;;;;;;;;CAST,MAAc,yBACZ,cACA,SACA,YACA,kBACA;AAEA,MAAI,qBAAqB,6BADL,iBAAiB,iBAAiB,SAAS,CACG,CAChE,OAAM,IAAI,WAAW,6DAA6D,UAAU;EAE9F,MAAM,uBAAuB,IAAI,4BAA4B,EAC3D,aAAa;GACX,IAAI;GACJ,MAAM,2BAA2B;GAClC,EACF,CAAC;AACF,uBAAqB,UAAU,EAC7B,gBAAgB,iBAAiB,QAClC,CAAC;EACF,MAAM,yBAAyB,IAAI,8BAA8B,sBAAsB;GAAE;GAAc;GAAY,CAAC;AACpH,MAAI,uBACF,OAAM,KAAK,cAAc,YAAY,uBAAuB;;;;CAhRjE,YAAY;oBAmBR,OAAO,iBAAiB,qBAAqB;oBAC7C,OAAO,iBAAiB,OAAO"}
1
+ {"version":3,"file":"DidCommMessageReceiver.mjs","names":["DidCommMessageReceiver","agentContextProvider: AgentContextProvider","logger: Logger","message: DidCommMessage","messageTransformed: DidCommMessage"],"sources":["../src/DidCommMessageReceiver.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport {\n type AgentContextProvider,\n CredoError,\n InjectionSymbols,\n inject,\n injectable,\n JsonTransformer,\n type Logger,\n} from '@credo-ts/core'\nimport { DidCommDispatcher } from './DidCommDispatcher'\nimport type { DecryptedDidCommMessageContext } from './DidCommEnvelopeService'\nimport { DidCommEnvelopeService } from './DidCommEnvelopeService'\nimport { DidCommMessage } from './DidCommMessage'\nimport { DidCommMessageHandlerRegistry } from './DidCommMessageHandlerRegistry'\nimport { DidCommMessageSender } from './DidCommMessageSender'\nimport type { DidCommTransportSession } from './DidCommTransportService'\nimport { DidCommTransportService } from './DidCommTransportService'\nimport { DidCommProblemReportError } from './errors'\nimport { DidCommProblemReportMessage } from './messages'\nimport { DidCommInboundMessageContext, DidCommOutboundMessageContext, DidCommProblemReportReason } from './models'\nimport type { DidCommConnectionRecord } from './modules/connections/repository'\nimport { DidCommConnectionService } from './modules/connections/services'\nimport type { DidCommEncryptedMessage, DidCommPlaintextMessage } from './types'\nimport { isValidJweStructure } from './util/JWE'\nimport { canHandleMessageType, parseMessageType, replaceLegacyDidSovPrefixOnMessage } from './util/messageType'\n\n@injectable()\nexport class DidCommMessageReceiver {\n private envelopeService: DidCommEnvelopeService\n private transportService: DidCommTransportService\n private messageSender: DidCommMessageSender\n private dispatcher: DidCommDispatcher\n private logger: Logger\n private connectionService: DidCommConnectionService\n private messageHandlerRegistry: DidCommMessageHandlerRegistry\n private agentContextProvider: AgentContextProvider\n\n public constructor(\n envelopeService: DidCommEnvelopeService,\n transportService: DidCommTransportService,\n messageSender: DidCommMessageSender,\n connectionService: DidCommConnectionService,\n dispatcher: DidCommDispatcher,\n messageHandlerRegistry: DidCommMessageHandlerRegistry,\n @inject(InjectionSymbols.AgentContextProvider) agentContextProvider: AgentContextProvider,\n @inject(InjectionSymbols.Logger) logger: Logger\n ) {\n this.envelopeService = envelopeService\n this.transportService = transportService\n this.messageSender = messageSender\n this.connectionService = connectionService\n this.dispatcher = dispatcher\n this.messageHandlerRegistry = messageHandlerRegistry\n this.agentContextProvider = agentContextProvider\n this.logger = logger\n }\n\n /**\n * Receive and handle an inbound DIDComm message. It will determine the agent context, decrypt the message, transform it\n * to it's corresponding message class and finally dispatch it to the dispatcher.\n *\n * @param inboundMessage the message to receive and handle\n */\n public async receiveMessage(\n inboundMessage: unknown,\n {\n session,\n connection,\n contextCorrelationId,\n receivedAt,\n }: {\n session?: DidCommTransportSession\n connection?: DidCommConnectionRecord\n contextCorrelationId?: string\n receivedAt?: Date\n } = {}\n ) {\n this.logger.debug('Agent received message')\n\n // Find agent context for the inbound message\n const agentContext = await this.agentContextProvider.getContextForInboundMessage(inboundMessage, {\n contextCorrelationId,\n })\n\n try {\n if (this.isEncryptedMessage(inboundMessage)) {\n await this.receiveEncryptedMessage(agentContext, inboundMessage as DidCommEncryptedMessage, session, receivedAt)\n } else if (this.isPlaintextMessage(inboundMessage)) {\n await this.receivePlaintextMessage(agentContext, inboundMessage, connection, receivedAt)\n } else {\n throw new CredoError('Unable to parse incoming message: unrecognized format')\n }\n } finally {\n // Always end the session for the agent context after handling the message.\n await agentContext.endSession()\n }\n }\n\n private async receivePlaintextMessage(\n agentContext: AgentContext,\n plaintextMessage: DidCommPlaintextMessage,\n connection?: DidCommConnectionRecord,\n receivedAt?: Date\n ) {\n const message = await this.transformAndValidate(agentContext, plaintextMessage)\n const messageContext = new DidCommInboundMessageContext(message, { connection, agentContext, receivedAt })\n await this.dispatcher.dispatch(messageContext)\n }\n\n private async receiveEncryptedMessage(\n agentContext: AgentContext,\n encryptedMessage: DidCommEncryptedMessage,\n session?: DidCommTransportSession,\n receivedAt?: Date\n ) {\n const decryptedMessage = await this.decryptMessage(agentContext, encryptedMessage)\n const { plaintextMessage, senderKey, recipientKey } = decryptedMessage\n\n this.logger.info(\n `Received message with type '${plaintextMessage['@type']}', recipient key ${recipientKey?.fingerprint} and sender key ${senderKey?.fingerprint}`,\n plaintextMessage\n )\n\n const connection = await this.findConnectionByMessageKeys(agentContext, decryptedMessage)\n\n const message = await this.transformAndValidate(agentContext, plaintextMessage, connection)\n\n const messageContext = new DidCommInboundMessageContext(message, {\n // Only make the connection available in message context if the connection is ready\n // To prevent unwanted usage of unready connections. Connections can still be retrieved from\n // Storage if the specific protocol allows an unready connection to be used.\n connection: connection?.isReady ? connection : undefined,\n senderKey,\n recipientKey,\n agentContext,\n receivedAt,\n encryptedMessage,\n })\n\n // We want to save a session if there is a chance of returning outbound message via inbound transport.\n // That can happen when inbound message has `return_route` set to `all` or `thread`.\n // If `return_route` defines just `thread`, we decide later whether to use session according to outbound message `threadId`.\n if (senderKey && recipientKey && message.hasAnyReturnRoute() && session) {\n this.logger.debug(`Storing session for inbound message '${message.id}'`)\n const keys = {\n recipientKeys: [senderKey],\n routingKeys: [],\n senderKey: recipientKey,\n }\n session.keys = keys\n session.inboundMessage = message\n // We allow unready connections to be attached to the session as we want to be able to\n // use return routing to make connections. This is especially useful for creating connections\n // with mediators when you don't have a public endpoint yet.\n session.connectionId = connection?.id\n messageContext.sessionId = session.id\n this.transportService.saveSession(session)\n } else if (session) {\n // No need to wait for session to stay open if we're not actually going to respond to the message.\n await session.close()\n }\n\n await this.dispatcher.dispatch(messageContext)\n }\n\n /**\n * Decrypt a message using the envelope service.\n *\n * @param message the received inbound message to decrypt\n */\n private async decryptMessage(\n agentContext: AgentContext,\n message: DidCommEncryptedMessage\n ): Promise<DecryptedDidCommMessageContext> {\n try {\n return await this.envelopeService.unpackMessage(agentContext, message)\n } catch (error) {\n this.logger.error('Error while decrypting message', {\n error,\n encryptedMessage: message,\n errorMessage: error instanceof Error ? error.message : error,\n })\n throw error\n }\n }\n\n private isPlaintextMessage(message: unknown): message is DidCommPlaintextMessage {\n if (typeof message !== 'object' || message == null) {\n return false\n }\n // If the message has a @type field we assume the message is in plaintext and it is not encrypted.\n return '@type' in message\n }\n\n private isEncryptedMessage(message: unknown): message is DidCommEncryptedMessage {\n // If the message does has valid JWE structure, we can assume the message is encrypted.\n return isValidJweStructure(message)\n }\n\n private async transformAndValidate(\n agentContext: AgentContext,\n plaintextMessage: DidCommPlaintextMessage,\n connection?: DidCommConnectionRecord | null\n ): Promise<DidCommMessage> {\n let message: DidCommMessage\n try {\n message = await this.transformMessage(plaintextMessage)\n } catch (error) {\n if (connection) await this.sendProblemReportMessage(agentContext, error.message, connection, plaintextMessage)\n throw error\n }\n return message\n }\n\n private async findConnectionByMessageKeys(\n agentContext: AgentContext,\n { recipientKey, senderKey }: DecryptedDidCommMessageContext\n ): Promise<DidCommConnectionRecord | null> {\n // We only fetch connections that are sent in AuthCrypt mode\n if (!recipientKey || !senderKey) return null\n\n // Try to find the did records that holds the sender and recipient keys\n return this.connectionService.findByKeys(agentContext, {\n senderKey,\n recipientKey,\n })\n }\n\n /**\n * Transform an plaintext DIDComm message into it's corresponding message class. Will look at all message types in the registered handlers.\n *\n * @param message the plaintext message for which to transform the message in to a class instance\n */\n private async transformMessage(message: DidCommPlaintextMessage): Promise<DidCommMessage> {\n // replace did:sov:BzCbsNYhMrjHiqZDTUASHg;spec prefix for message type with https://didcomm.org\n replaceLegacyDidSovPrefixOnMessage(message)\n\n const messageType = message['@type']\n const MessageClass = this.messageHandlerRegistry.getMessageClassForMessageType(messageType) ?? DidCommMessage\n\n // Cast the plain JSON object to specific instance of Message extended from DidCommMessage\n let messageTransformed: DidCommMessage\n try {\n messageTransformed = JsonTransformer.fromJSON(message, MessageClass)\n } catch (error) {\n this.logger.error(`Error validating message ${message['@type']}`, {\n errors: error,\n message: JSON.stringify(message),\n })\n throw new DidCommProblemReportError(`Error validating message ${message['@type']}`, {\n problemCode: DidCommProblemReportReason.MessageParseFailure,\n })\n }\n return messageTransformed\n }\n\n /**\n * Send the problem report message (https://didcomm.org/notification/1.0/problem-report) to the recipient.\n * @param message error message to send\n * @param connection connection to send the message to\n * @param plaintextMessage received inbound message\n */\n private async sendProblemReportMessage(\n agentContext: AgentContext,\n message: string,\n connection: DidCommConnectionRecord,\n plaintextMessage: DidCommPlaintextMessage\n ) {\n const messageType = parseMessageType(plaintextMessage['@type'])\n if (canHandleMessageType(DidCommProblemReportMessage, messageType)) {\n throw new CredoError(`Not sending problem report in response to problem report: ${message}`)\n }\n const problemReportMessage = new DidCommProblemReportMessage({\n description: {\n en: message,\n code: DidCommProblemReportReason.MessageParseFailure,\n },\n })\n problemReportMessage.setThread({\n parentThreadId: plaintextMessage['@id'],\n })\n const outboundMessageContext = new DidCommOutboundMessageContext(problemReportMessage, { agentContext, connection })\n if (outboundMessageContext) {\n await this.messageSender.sendMessage(outboundMessageContext)\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,mCAAMA,yBAAuB;CAUlC,AAAO,YACL,iBACA,kBACA,eACA,mBACA,YACA,wBACA,AAA+CC,sBAC/C,AAAiCC,QACjC;AACA,OAAK,kBAAkB;AACvB,OAAK,mBAAmB;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SAAS,aAAa;WAC7D,OAAO;AACd,QAAK,OAAO,MAAM,4BAA4B,QAAQ,YAAY;IAChE,QAAQ;IACR,SAAS,KAAK,UAAU,QAAQ;IACjC,CAAC;AACF,SAAM,IAAI,0BAA0B,4BAA4B,QAAQ,YAAY,EAClF,aAAa,2BAA2B,qBACzC,CAAC;;AAEJ,SAAO;;;;;;;;CAST,MAAc,yBACZ,cACA,SACA,YACA,kBACA;AAEA,MAAI,qBAAqB,6BADL,iBAAiB,iBAAiB,SAAS,CACG,CAChE,OAAM,IAAI,WAAW,6DAA6D,UAAU;EAE9F,MAAM,uBAAuB,IAAI,4BAA4B,EAC3D,aAAa;GACX,IAAI;GACJ,MAAM,2BAA2B;GAClC,EACF,CAAC;AACF,uBAAqB,UAAU,EAC7B,gBAAgB,iBAAiB,QAClC,CAAC;EACF,MAAM,yBAAyB,IAAI,8BAA8B,sBAAsB;GAAE;GAAc;GAAY,CAAC;AACpH,MAAI,uBACF,OAAM,KAAK,cAAc,YAAY,uBAAuB;;;;CAjQjE,YAAY;oBAkBR,OAAO,iBAAiB,qBAAqB;oBAC7C,OAAO,iBAAiB,OAAO"}
@@ -2,7 +2,6 @@ import { DidCommEncryptedMessage, DidCommOutboundPackage } from "./types.mjs";
2
2
  import { DidCommMessage } from "./DidCommMessage.mjs";
3
3
  import { DidCommDocumentService } from "./services/DidCommDocumentService.mjs";
4
4
  import { DidCommEnvelopeService, EnvelopeKeys } from "./DidCommEnvelopeService.mjs";
5
- import { DidCommOutboundTransport } from "./transport/DidCommOutboundTransport.mjs";
6
5
  import { DidCommTransportService } from "./DidCommTransportService.mjs";
7
6
  import { DidCommModuleConfig } from "./DidCommModuleConfig.mjs";
8
7
  import { DidCommConnectionRecord } from "./modules/connections/repository/DidCommConnectionRecord.mjs";
@@ -17,14 +16,10 @@ interface TransportPriorityOptions {
17
16
  declare class DidCommMessageSender {
18
17
  private envelopeService;
19
18
  private transportService;
20
- private queueTransportRepository;
19
+ private didCommModuleConfig;
21
20
  private didCommDocumentService;
22
21
  private eventEmitter;
23
- private _outboundTransports;
24
22
  constructor(envelopeService: DidCommEnvelopeService, transportService: DidCommTransportService, didCommModuleConfig: DidCommModuleConfig, didCommDocumentService: DidCommDocumentService, eventEmitter: EventEmitter);
25
- get outboundTransports(): DidCommOutboundTransport[];
26
- registerOutboundTransport(outboundTransport: DidCommOutboundTransport): void;
27
- unregisterOutboundTransport(outboundTransport: DidCommOutboundTransport): Promise<void>;
28
23
  packMessage(agentContext: AgentContext, {
29
24
  keys,
30
25
  message,