@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 +1 @@
1
- {"version":3,"file":"DidCommDocumentService.mjs","names":["DidCommDocumentService","resolvedServices: ResolvedDidCommService[]","routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]"],"sources":["../../src/services/DidCommDocumentService.ts"],"sourcesContent":["import { AgentContext, type ResolvedDidCommService, findMatchingEd25519Key } from '@credo-ts/core'\n\nimport {\n CredoError,\n DidCommV1Service,\n DidRecord,\n DidRepository,\n DidResolverService,\n IndyAgentService,\n Kms,\n RecordNotFoundError,\n getPublicJwkFromVerificationMethod,\n injectable,\n parseDid,\n verkeyToPublicJwk,\n} from '@credo-ts/core'\n\n@injectable()\nexport class DidCommDocumentService {\n private didResolverService: DidResolverService\n private didRepository: DidRepository\n\n public constructor(didResolverService: DidResolverService, didRepository: DidRepository) {\n this.didResolverService = didResolverService\n this.didRepository = didRepository\n }\n\n public async resolveServicesFromDid(agentContext: AgentContext, did: string): Promise<ResolvedDidCommService[]> {\n const didDocument = await this.didResolverService.resolveDidDocument(agentContext, did)\n\n const resolvedServices: ResolvedDidCommService[] = []\n\n // If did specifies a particular service, filter by its id\n const didCommServices = parseDid(did).fragment\n ? didDocument.didCommServices.filter((service) => service.id === did)\n : didDocument.didCommServices\n\n // FIXME: we currently retrieve did documents for all didcomm services in the did document, and we don't have caching\n // yet so this will re-trigger ledger resolves for each one. Should we only resolve the first service, then the second service, etc...?\n for (const didCommService of didCommServices) {\n if (didCommService.type === IndyAgentService.type) {\n // IndyAgentService (DidComm v0) has keys encoded as raw publicKeyBase58 (verkeys)\n resolvedServices.push({\n id: didCommService.id,\n recipientKeys: didCommService.recipientKeys.map(verkeyToPublicJwk),\n routingKeys: didCommService.routingKeys?.map(verkeyToPublicJwk) || [],\n serviceEndpoint: didCommService.serviceEndpoint,\n })\n } else if (didCommService.type === DidCommV1Service.type) {\n // Resolve dids to DIDDocs to retrieve routingKeys\n const routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[] = []\n for (const routingKey of didCommService.routingKeys ?? []) {\n const routingDidDocument = await this.didResolverService.resolveDidDocument(agentContext, routingKey)\n const publicJwk = getPublicJwkFromVerificationMethod(\n routingDidDocument.dereferenceKey(routingKey, ['authentication', 'keyAgreement'])\n )\n\n // FIXME: we should handle X25519 here as well\n if (!publicJwk.is(Kms.Ed25519PublicJwk)) {\n throw new CredoError(`Expected Ed25519PublicJwk but found ${publicJwk.JwkClass.name}`)\n }\n\n routingKeys.push(publicJwk)\n }\n\n // DidCommV1Service has keys encoded as key references\n\n // Dereference recipientKeys\n const recipientKeys = didCommService.recipientKeys.map((recipientKeyReference) => {\n // FIXME: we allow authentication keys as historically ed25519 keys have been used in did documents\n // for didcomm. In the future we should update this to only be allowed for IndyAgent and DidCommV1 services\n // as didcomm v2 doesn't have this issue anymore\n const publicJwk = getPublicJwkFromVerificationMethod(\n didDocument.dereferenceKey(recipientKeyReference, ['authentication', 'keyAgreement'])\n )\n\n // try to find a matching Ed25519 key (https://sovrin-foundation.github.io/sovrin/spec/did-method-spec-template.html#did-document-notes)\n // FIXME: Now that indy-sdk is deprecated, we should look into the possiblty of using the X25519 key directly\n // removing the need to also include the Ed25519 key in the did document.\n if (publicJwk.is(Kms.X25519PublicJwk)) {\n const matchingEd25519Key = findMatchingEd25519Key(publicJwk, didDocument)\n if (matchingEd25519Key) return matchingEd25519Key.publicJwk\n }\n\n if (!publicJwk.is(Kms.Ed25519PublicJwk)) {\n throw new CredoError(`Expected Ed25519PublicJwk but found ${publicJwk.JwkClass.name}`)\n }\n\n return publicJwk\n })\n\n resolvedServices.push({\n id: didCommService.id,\n recipientKeys,\n routingKeys,\n serviceEndpoint: didCommService.serviceEndpoint,\n })\n }\n }\n\n return resolvedServices\n }\n\n public async resolveCreatedDidDocumentWithKeysByRecipientKey(agentContext: AgentContext, publicJwk: Kms.PublicJwk) {\n const didRecord = await this.didRepository.findCreatedDidByRecipientKey(agentContext, publicJwk)\n\n if (!didRecord) {\n throw new RecordNotFoundError(`Created did for public jwk ${publicJwk.jwkTypehumanDescription} not found`, {\n recordType: DidRecord.type,\n })\n }\n\n if (didRecord.didDocument) {\n return {\n keys: didRecord.keys,\n didDocument: didRecord.didDocument,\n }\n }\n\n // TODO: we should somehow store the did document on the record if the did method allows it\n // E.g. for did:key we don't want to store it, but if we still have a did:indy record we do want to store it\n // If the did document is not stored on the did record, we resolve it\n const didDocument = await this.didResolverService.resolveDidDocument(agentContext, didRecord.did)\n\n return {\n keys: didRecord.keys,\n didDocument,\n }\n }\n}\n"],"mappings":";;;;;;AAkBO,mCAAMA,yBAAuB;CAIlC,AAAO,YAAY,oBAAwC,eAA8B;AACvF,OAAK,qBAAqB;AAC1B,OAAK,gBAAgB;;CAGvB,MAAa,uBAAuB,cAA4B,KAAgD;EAC9G,MAAM,cAAc,MAAM,KAAK,mBAAmB,mBAAmB,cAAc,IAAI;EAEvF,MAAMC,mBAA6C,EAAE;EAGrD,MAAM,kBAAkB,SAAS,IAAI,CAAC,WAClC,YAAY,gBAAgB,QAAQ,YAAY,QAAQ,OAAO,IAAI,GACnE,YAAY;AAIhB,OAAK,MAAM,kBAAkB,gBAC3B,KAAI,eAAe,SAAS,iBAAiB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xB;EAMH,MAAM,cAAc,MAAM,KAAK,mBAAmB,mBAAmB,cAAc,UAAU,IAAI;AAEjG,SAAO;GACL,MAAM,UAAU;GAChB;GACD;;;qCA9GJ,YAAY"}
1
+ {"version":3,"file":"DidCommDocumentService.mjs","names":["DidCommDocumentService","resolvedServices: ResolvedDidCommService[]","routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]"],"sources":["../../src/services/DidCommDocumentService.ts"],"sourcesContent":["import {\n AgentContext,\n CredoError,\n DidCommV1Service,\n DidRecord,\n DidRepository,\n DidResolverService,\n findMatchingEd25519Key,\n getPublicJwkFromVerificationMethod,\n IndyAgentService,\n injectable,\n Kms,\n parseDid,\n RecordNotFoundError,\n type ResolvedDidCommService,\n verkeyToPublicJwk,\n} from '@credo-ts/core'\n\n@injectable()\nexport class DidCommDocumentService {\n private didResolverService: DidResolverService\n private didRepository: DidRepository\n\n public constructor(didResolverService: DidResolverService, didRepository: DidRepository) {\n this.didResolverService = didResolverService\n this.didRepository = didRepository\n }\n\n public async resolveServicesFromDid(agentContext: AgentContext, did: string): Promise<ResolvedDidCommService[]> {\n const didDocument = await this.didResolverService.resolveDidDocument(agentContext, did)\n\n const resolvedServices: ResolvedDidCommService[] = []\n\n // If did specifies a particular service, filter by its id\n const didCommServices = parseDid(did).fragment\n ? didDocument.didCommServices.filter((service) => service.id === did)\n : didDocument.didCommServices\n\n // FIXME: we currently retrieve did documents for all didcomm services in the did document, and we don't have caching\n // yet so this will re-trigger ledger resolves for each one. Should we only resolve the first service, then the second service, etc...?\n for (const didCommService of didCommServices) {\n if (didCommService.type === IndyAgentService.type) {\n // IndyAgentService (DidComm v0) has keys encoded as raw publicKeyBase58 (verkeys)\n resolvedServices.push({\n id: didCommService.id,\n recipientKeys: didCommService.recipientKeys.map(verkeyToPublicJwk),\n routingKeys: didCommService.routingKeys?.map(verkeyToPublicJwk) || [],\n serviceEndpoint: didCommService.serviceEndpoint,\n })\n } else if (didCommService.type === DidCommV1Service.type) {\n // Resolve dids to DIDDocs to retrieve routingKeys\n const routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[] = []\n for (const routingKey of didCommService.routingKeys ?? []) {\n const routingDidDocument = await this.didResolverService.resolveDidDocument(agentContext, routingKey)\n const publicJwk = getPublicJwkFromVerificationMethod(\n routingDidDocument.dereferenceKey(routingKey, ['authentication', 'keyAgreement'])\n )\n\n // FIXME: we should handle X25519 here as well\n if (!publicJwk.is(Kms.Ed25519PublicJwk)) {\n throw new CredoError(`Expected Ed25519PublicJwk but found ${publicJwk.JwkClass.name}`)\n }\n\n routingKeys.push(publicJwk)\n }\n\n // DidCommV1Service has keys encoded as key references\n\n // Dereference recipientKeys\n const recipientKeys = didCommService.recipientKeys.map((recipientKeyReference) => {\n // FIXME: we allow authentication keys as historically ed25519 keys have been used in did documents\n // for didcomm. In the future we should update this to only be allowed for IndyAgent and DidCommV1 services\n // as didcomm v2 doesn't have this issue anymore\n const publicJwk = getPublicJwkFromVerificationMethod(\n didDocument.dereferenceKey(recipientKeyReference, ['authentication', 'keyAgreement'])\n )\n\n // try to find a matching Ed25519 key (https://sovrin-foundation.github.io/sovrin/spec/did-method-spec-template.html#did-document-notes)\n // FIXME: Now that indy-sdk is deprecated, we should look into the possiblty of using the X25519 key directly\n // removing the need to also include the Ed25519 key in the did document.\n if (publicJwk.is(Kms.X25519PublicJwk)) {\n const matchingEd25519Key = findMatchingEd25519Key(publicJwk, didDocument)\n if (matchingEd25519Key) return matchingEd25519Key.publicJwk\n }\n\n if (!publicJwk.is(Kms.Ed25519PublicJwk)) {\n throw new CredoError(`Expected Ed25519PublicJwk but found ${publicJwk.JwkClass.name}`)\n }\n\n return publicJwk\n })\n\n resolvedServices.push({\n id: didCommService.id,\n recipientKeys,\n routingKeys,\n serviceEndpoint: didCommService.serviceEndpoint,\n })\n }\n }\n\n return resolvedServices\n }\n\n public async resolveCreatedDidDocumentWithKeysByRecipientKey(agentContext: AgentContext, publicJwk: Kms.PublicJwk) {\n const didRecord = await this.didRepository.findCreatedDidByRecipientKey(agentContext, publicJwk)\n\n if (!didRecord) {\n throw new RecordNotFoundError(`Created did for public jwk ${publicJwk.jwkTypehumanDescription} not found`, {\n recordType: DidRecord.type,\n })\n }\n\n if (didRecord.didDocument) {\n return {\n keys: didRecord.keys,\n didDocument: didRecord.didDocument,\n }\n }\n\n // TODO: we should somehow store the did document on the record if the did method allows it\n // E.g. for did:key we don't want to store it, but if we still have a did:indy record we do want to store it\n // If the did document is not stored on the did record, we resolve it\n const didDocument = await this.didResolverService.resolveDidDocument(agentContext, didRecord.did)\n\n return {\n keys: didRecord.keys,\n didDocument,\n }\n }\n}\n"],"mappings":";;;;;;AAmBO,mCAAMA,yBAAuB;CAIlC,AAAO,YAAY,oBAAwC,eAA8B;AACvF,OAAK,qBAAqB;AAC1B,OAAK,gBAAgB;;CAGvB,MAAa,uBAAuB,cAA4B,KAAgD;EAC9G,MAAM,cAAc,MAAM,KAAK,mBAAmB,mBAAmB,cAAc,IAAI;EAEvF,MAAMC,mBAA6C,EAAE;EAGrD,MAAM,kBAAkB,SAAS,IAAI,CAAC,WAClC,YAAY,gBAAgB,QAAQ,YAAY,QAAQ,OAAO,IAAI,GACnE,YAAY;AAIhB,OAAK,MAAM,kBAAkB,gBAC3B,KAAI,eAAe,SAAS,iBAAiB,KAE3C,kBAAiB,KAAK;GACpB,IAAI,eAAe;GACnB,eAAe,eAAe,cAAc,IAAI,kBAAkB;GAClE,aAAa,eAAe,aAAa,IAAI,kBAAkB,IAAI,EAAE;GACrE,iBAAiB,eAAe;GACjC,CAAC;WACO,eAAe,SAAS,iBAAiB,MAAM;GAExD,MAAMC,cAAqD,EAAE;AAC7D,QAAK,MAAM,cAAc,eAAe,eAAe,EAAE,EAAE;IAEzD,MAAM,YAAY,oCADS,MAAM,KAAK,mBAAmB,mBAAmB,cAAc,WAAW,EAEhF,eAAe,YAAY,CAAC,kBAAkB,eAAe,CAAC,CAClF;AAGD,QAAI,CAAC,UAAU,GAAG,IAAI,iBAAiB,CACrC,OAAM,IAAI,WAAW,uCAAuC,UAAU,SAAS,OAAO;AAGxF,gBAAY,KAAK,UAAU;;GAM7B,MAAM,gBAAgB,eAAe,cAAc,KAAK,0BAA0B;IAIhF,MAAM,YAAY,mCAChB,YAAY,eAAe,uBAAuB,CAAC,kBAAkB,eAAe,CAAC,CACtF;AAKD,QAAI,UAAU,GAAG,IAAI,gBAAgB,EAAE;KACrC,MAAM,qBAAqB,uBAAuB,WAAW,YAAY;AACzE,SAAI,mBAAoB,QAAO,mBAAmB;;AAGpD,QAAI,CAAC,UAAU,GAAG,IAAI,iBAAiB,CACrC,OAAM,IAAI,WAAW,uCAAuC,UAAU,SAAS,OAAO;AAGxF,WAAO;KACP;AAEF,oBAAiB,KAAK;IACpB,IAAI,eAAe;IACnB;IACA;IACA,iBAAiB,eAAe;IACjC,CAAC;;AAIN,SAAO;;CAGT,MAAa,gDAAgD,cAA4B,WAA0B;EACjH,MAAM,YAAY,MAAM,KAAK,cAAc,6BAA6B,cAAc,UAAU;AAEhG,MAAI,CAAC,UACH,OAAM,IAAI,oBAAoB,8BAA8B,UAAU,wBAAwB,aAAa,EACzG,YAAY,UAAU,MACvB,CAAC;AAGJ,MAAI,UAAU,YACZ,QAAO;GACL,MAAM,UAAU;GAChB,aAAa,UAAU;GACxB;EAMH,MAAM,cAAc,MAAM,KAAK,mBAAmB,mBAAmB,cAAc,UAAU,IAAI;AAEjG,SAAO;GACL,MAAM,UAAU;GAChB;GACD;;;qCA9GJ,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommHttpOutboundTransport.d.mts","names":[],"sources":["../../src/transport/DidCommHttpOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAYa,4BAAA,YAAwC;;EAAxC,QAAA,MAAA;EAA6B,QAAA,KAAA;UAWP,QAAA;UAAe,oBAAA;UAU3B,0BAAA;kBA0BqB,EAAA,MAAA,EAAA;OAAsB,CAAA,YAAA,EApC/B,YAoC+B,CAAA,EApChB,OAoCgB,CAAA,IAAA,CAAA;MA/Cb,CAAA,CAAA,EAqB9B,OArB8B,CAAA,IAAA,CAAA;EAAwB,WAAA,CAAA,eAAA,EA+CjC,sBA/CiC,CAAA,EA+CX,OA/CW,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"DidCommHttpOutboundTransport.d.mts","names":[],"sources":["../../src/transport/DidCommHttpOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAUa,4BAAA,YAAwC;;EAAxC,QAAA,MAAA;EAA6B,QAAA,KAAA;UAWP,QAAA;UAAe,oBAAA;UAU3B,0BAAA;kBA0BqB,EAAA,MAAA,EAAA;OAAsB,CAAA,YAAA,EApC/B,YAoC+B,CAAA,EApChB,OAoCgB,CAAA,IAAA,CAAA;MA/Cb,CAAA,CAAA,EAqB9B,OArB8B,CAAA,IAAA,CAAA;EAAwB,WAAA,CAAA,eAAA,EA+CjC,sBA/CiC,CAAA,EA+CX,OA/CW,CAAA,IAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommHttpOutboundTransport.d.ts","names":[],"sources":["../../src/transport/DidCommHttpOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAYa,4BAAA,YAAwC;;EAAxC,QAAA,MAAA;EAA6B,QAAA,KAAA;UAWP,QAAA;UAAe,oBAAA;UAU3B,0BAAA;kBA0BqB,EAAA,MAAA,EAAA;OAAsB,CAAA,YAAA,EApC/B,YAoC+B,CAAA,EApChB,OAoCgB,CAAA,IAAA,CAAA;MA/Cb,CAAA,CAAA,EAqB9B,OArB8B,CAAA,IAAA,CAAA;EAAwB,WAAA,CAAA,eAAA,EA+CjC,sBA/CiC,CAAA,EA+CX,OA/CW,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"DidCommHttpOutboundTransport.d.ts","names":[],"sources":["../../src/transport/DidCommHttpOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAUa,4BAAA,YAAwC;;EAAxC,QAAA,MAAA;EAA6B,QAAA,KAAA;UAWP,QAAA;UAAe,oBAAA;UAU3B,0BAAA;kBA0BqB,EAAA,MAAA,EAAA;OAAsB,CAAA,YAAA,EApC/B,YAoC+B,CAAA,EApChB,OAoCgB,CAAA,IAAA,CAAA;MA/Cb,CAAA,CAAA,EAqB9B,OArB8B,CAAA,IAAA,CAAA;EAAwB,WAAA,CAAA,eAAA,EA+CjC,sBA/CiC,CAAA,EA+CX,OA/CW,CAAA,IAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
2
2
  const require_DidCommEvents = require('../DidCommEvents.js');
3
- const require_DidCommModuleConfig = require('../DidCommModuleConfig.js');
4
3
  const require_JWE = require('../util/JWE.js');
4
+ const require_DidCommModuleConfig = require('../DidCommModuleConfig.js');
5
5
  let __credo_ts_core = require("@credo-ts/core");
6
6
  __credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
7
7
  let rxjs = require("rxjs");
@@ -46,8 +46,8 @@ var DidCommHttpOutboundTransport = class {
46
46
  const abortController = new AbortController();
47
47
  const id = setTimeout(() => abortController.abort(), 15e3);
48
48
  this.outboundSessionCount++;
49
- let response = void 0;
50
- let responseMessage = void 0;
49
+ let response;
50
+ let responseMessage;
51
51
  try {
52
52
  response = await this.fetch(endpoint, {
53
53
  method: "POST",
@@ -1,6 +1,6 @@
1
1
  import { DidCommEventTypes } from "../DidCommEvents.mjs";
2
- import { DidCommModuleConfig } from "../DidCommModuleConfig.mjs";
3
2
  import { isValidJweStructure } from "../util/JWE.mjs";
3
+ import { DidCommModuleConfig } from "../DidCommModuleConfig.mjs";
4
4
  import { CredoError, EventEmitter, JsonEncoder } from "@credo-ts/core";
5
5
  import { Subject } from "rxjs";
6
6
 
@@ -43,8 +43,8 @@ var DidCommHttpOutboundTransport = class {
43
43
  const abortController = new AbortController();
44
44
  const id = setTimeout(() => abortController.abort(), 15e3);
45
45
  this.outboundSessionCount++;
46
- let response = void 0;
47
- let responseMessage = void 0;
46
+ let response;
47
+ let responseMessage;
48
48
  try {
49
49
  response = await this.fetch(endpoint, {
50
50
  method: "POST",
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommHttpOutboundTransport.mjs","names":["response: Response | undefined","responseMessage: string | undefined"],"sources":["../../src/transport/DidCommHttpOutboundTransport.ts"],"sourcesContent":["import type { AgentContext, Logger } from '@credo-ts/core'\nimport type { DidCommMessageReceivedEvent } from '../DidCommEvents'\nimport type { DidCommOutboundPackage } from '../types'\nimport type { DidCommOutboundTransport } from './DidCommOutboundTransport'\n\nimport { CredoError, EventEmitter, JsonEncoder } from '@credo-ts/core'\nimport { Subject } from 'rxjs'\n\nimport { DidCommEventTypes } from '../DidCommEvents'\nimport { DidCommModuleConfig } from '../DidCommModuleConfig'\nimport { isValidJweStructure } from '../util/JWE'\n\nexport class DidCommHttpOutboundTransport implements DidCommOutboundTransport {\n private agentContext!: AgentContext\n private logger!: Logger\n private fetch!: typeof fetch\n private isActive = false\n\n private outboundSessionCount = 0\n private outboundSessionsObservable = new Subject()\n\n public supportedSchemes = ['http', 'https']\n\n public async start(agentContext: AgentContext): Promise<void> {\n this.agentContext = agentContext\n this.logger = this.agentContext.config.logger\n this.fetch = this.agentContext.config.agentDependencies.fetch\n this.isActive = true\n this.outboundSessionCount = 0\n\n this.logger.debug('Starting HTTP outbound DIDComm transport')\n }\n\n public async stop(): Promise<void> {\n this.logger.debug('Stopping HTTP outbound DIDComm transport')\n this.isActive = false\n\n if (this.outboundSessionCount === 0) {\n this.agentContext.config.logger.debug(\n 'No open outbound HTTP sessions. Immediately stopping DidCommHttpOutboundTransport'\n )\n return\n }\n\n this.agentContext.config.logger.debug(\n `Still ${this.outboundSessionCount} open outbound HTTP sessions. Waiting for sessions to close before stopping DidCommHttpOutboundTransport`\n )\n // Track all 'closed' sessions\n // TODO: add timeout? -> we have a timeout on the request\n return new Promise((resolve) =>\n this.outboundSessionsObservable.subscribe(() => {\n this.agentContext.config.logger.debug(\n `${this.outboundSessionCount} DidCommHttpOutboundTransport sessions still active`\n )\n if (this.outboundSessionCount === 0) resolve()\n })\n )\n }\n\n public async sendMessage(outboundPackage: DidCommOutboundPackage) {\n const { payload, endpoint } = outboundPackage\n const didCommMimeType = this.agentContext.dependencyManager.resolve(DidCommModuleConfig).didCommMimeType\n\n if (!this.isActive) {\n throw new CredoError('Outbound transport is not active. Not sending message.')\n }\n\n if (!endpoint) {\n throw new CredoError(`Missing endpoint. I don't know how and where to send the message.`)\n }\n\n this.logger.debug(`Sending outbound message to endpoint '${outboundPackage.endpoint}'`, {\n payload: outboundPackage.payload,\n })\n\n try {\n const abortController = new AbortController()\n const id = setTimeout(() => abortController.abort(), 15000)\n this.outboundSessionCount++\n\n let response: Response | undefined = undefined\n let responseMessage: string | undefined = undefined\n try {\n response = await this.fetch(endpoint, {\n method: 'POST',\n body: JSON.stringify(payload),\n headers: { 'Content-Type': didCommMimeType },\n signal: abortController.signal as NonNullable<RequestInit['signal']>,\n })\n clearTimeout(id)\n responseMessage = await response.text()\n } catch (error) {\n // Request is aborted after 15 seconds, but that doesn't necessarily mean the request\n // went wrong. ACA-Py keeps the socket alive until it has a response message. So we assume\n // that if the error was aborted and we had return routing enabled, we should ignore the error.\n if (error.name === 'AbortError' && outboundPackage.responseRequested) {\n this.logger.debug(\n 'Request was aborted due to timeout. Not throwing error due to return routing on sent message'\n )\n } else {\n throw error\n }\n }\n\n // TODO: do we just want to ignore messages that were returned if we didn't request it?\n // TODO: check response header type (and also update inbound transports to use the correct headers types)\n if (response && responseMessage) {\n this.logger.debug('Response received', { responseMessage, status: response.status })\n\n // This should not happen\n if (!this.isActive) {\n this.logger.error(\n 'Received response message over DidCommHttpOutboundTransport while transport was not active.'\n )\n }\n\n try {\n const encryptedMessage = JsonEncoder.fromString(responseMessage)\n if (!isValidJweStructure(encryptedMessage)) {\n this.logger.error(\n `Received a response from the other agent but the structure of the incoming message is not a DIDComm message: ${responseMessage}`\n )\n return\n }\n // Emit event with the received agent message.\n const eventEmitter = this.agentContext.dependencyManager.resolve(EventEmitter)\n eventEmitter.emit<DidCommMessageReceivedEvent>(this.agentContext, {\n type: DidCommEventTypes.DidCommMessageReceived,\n payload: {\n message: encryptedMessage,\n },\n })\n } catch (_error) {\n this.logger.debug('Unable to parse response message')\n }\n } else {\n this.logger.debug('No response received.')\n }\n } catch (error) {\n this.logger.error(`Error sending message to ${endpoint}: ${error.message}`, {\n error,\n message: error.message,\n body: payload,\n didCommMimeType,\n })\n throw new CredoError(`Error sending message to ${endpoint}: ${error.message}`, { cause: error })\n } finally {\n this.outboundSessionCount--\n this.outboundSessionsObservable.next(undefined)\n }\n }\n}\n"],"mappings":";;;;;;;AAYA,IAAa,+BAAb,MAA8E;;OAIpE,WAAW;OAEX,uBAAuB;OACvB,6BAA6B,IAAI,SAAS;OAE3C,mBAAmB,CAAC,QAAQ,QAAQ;;CAE3C,MAAa,MAAM,cAA2C;AAC5D,OAAK,eAAe;AACpB,OAAK,SAAS,KAAK,aAAa,OAAO;AACvC,OAAK,QAAQ,KAAK,aAAa,OAAO,kBAAkB;AACxD,OAAK,WAAW;AAChB,OAAK,uBAAuB;AAE5B,OAAK,OAAO,MAAM,2CAA2C;;CAG/D,MAAa,OAAsB;AACjC,OAAK,OAAO,MAAM,2CAA2C;AAC7D,OAAK,WAAW;AAEhB,MAAI,KAAK,yBAAyB,GAAG;AACnC,QAAK,aAAa,OAAO,OAAO,MAC9B,oFACD;AACD;;AAGF,OAAK,aAAa,OAAO,OAAO,MAC9B,SAAS,KAAK,qBAAqB,0GACpC;AAGD,SAAO,IAAI,SAAS,YAClB,KAAK,2BAA2B,gBAAgB;AAC9C,QAAK,aAAa,OAAO,OAAO,MAC9B,GAAG,KAAK,qBAAqB,qDAC9B;AACD,OAAI,KAAK,yBAAyB,EAAG,UAAS;IAC9C,CACH;;CAGH,MAAa,YAAY,iBAAyC;EAChE,MAAM,EAAE,SAAS,aAAa;EAC9B,MAAM,kBAAkB,KAAK,aAAa,kBAAkB,Q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,MAAM,WAAW;IAC1E;IACA,SAAS,MAAM;IACf,MAAM;IACN;IACD,CAAC;AACF,SAAM,IAAI,WAAW,4BAA4B,SAAS,IAAI,MAAM,WAAW,EAAE,OAAO,OAAO,CAAC;YACxF;AACR,QAAK;AACL,QAAK,2BAA2B,KAAK,OAAU"}
1
+ {"version":3,"file":"DidCommHttpOutboundTransport.mjs","names":["response: Response | undefined","responseMessage: string | undefined"],"sources":["../../src/transport/DidCommHttpOutboundTransport.ts"],"sourcesContent":["import type { AgentContext, Logger } from '@credo-ts/core'\nimport { CredoError, EventEmitter, JsonEncoder } from '@credo-ts/core'\nimport { Subject } from 'rxjs'\nimport type { DidCommMessageReceivedEvent } from '../DidCommEvents'\nimport { DidCommEventTypes } from '../DidCommEvents'\nimport { DidCommModuleConfig } from '../DidCommModuleConfig'\nimport type { DidCommOutboundPackage } from '../types'\nimport { isValidJweStructure } from '../util/JWE'\nimport type { DidCommOutboundTransport } from './DidCommOutboundTransport'\n\nexport class DidCommHttpOutboundTransport implements DidCommOutboundTransport {\n private agentContext!: AgentContext\n private logger!: Logger\n private fetch!: typeof fetch\n private isActive = false\n\n private outboundSessionCount = 0\n private outboundSessionsObservable = new Subject()\n\n public supportedSchemes = ['http', 'https']\n\n public async start(agentContext: AgentContext): Promise<void> {\n this.agentContext = agentContext\n this.logger = this.agentContext.config.logger\n this.fetch = this.agentContext.config.agentDependencies.fetch\n this.isActive = true\n this.outboundSessionCount = 0\n\n this.logger.debug('Starting HTTP outbound DIDComm transport')\n }\n\n public async stop(): Promise<void> {\n this.logger.debug('Stopping HTTP outbound DIDComm transport')\n this.isActive = false\n\n if (this.outboundSessionCount === 0) {\n this.agentContext.config.logger.debug(\n 'No open outbound HTTP sessions. Immediately stopping DidCommHttpOutboundTransport'\n )\n return\n }\n\n this.agentContext.config.logger.debug(\n `Still ${this.outboundSessionCount} open outbound HTTP sessions. Waiting for sessions to close before stopping DidCommHttpOutboundTransport`\n )\n // Track all 'closed' sessions\n // TODO: add timeout? -> we have a timeout on the request\n return new Promise((resolve) =>\n this.outboundSessionsObservable.subscribe(() => {\n this.agentContext.config.logger.debug(\n `${this.outboundSessionCount} DidCommHttpOutboundTransport sessions still active`\n )\n if (this.outboundSessionCount === 0) resolve()\n })\n )\n }\n\n public async sendMessage(outboundPackage: DidCommOutboundPackage) {\n const { payload, endpoint } = outboundPackage\n const didCommMimeType = this.agentContext.dependencyManager.resolve(DidCommModuleConfig).didCommMimeType\n\n if (!this.isActive) {\n throw new CredoError('Outbound transport is not active. Not sending message.')\n }\n\n if (!endpoint) {\n throw new CredoError(`Missing endpoint. I don't know how and where to send the message.`)\n }\n\n this.logger.debug(`Sending outbound message to endpoint '${outboundPackage.endpoint}'`, {\n payload: outboundPackage.payload,\n })\n\n try {\n const abortController = new AbortController()\n const id = setTimeout(() => abortController.abort(), 15000)\n this.outboundSessionCount++\n\n let response: Response | undefined\n let responseMessage: string | undefined\n try {\n response = await this.fetch(endpoint, {\n method: 'POST',\n body: JSON.stringify(payload),\n headers: { 'Content-Type': didCommMimeType },\n signal: abortController.signal as NonNullable<RequestInit['signal']>,\n })\n clearTimeout(id)\n responseMessage = await response.text()\n } catch (error) {\n // Request is aborted after 15 seconds, but that doesn't necessarily mean the request\n // went wrong. ACA-Py keeps the socket alive until it has a response message. So we assume\n // that if the error was aborted and we had return routing enabled, we should ignore the error.\n if (error.name === 'AbortError' && outboundPackage.responseRequested) {\n this.logger.debug(\n 'Request was aborted due to timeout. Not throwing error due to return routing on sent message'\n )\n } else {\n throw error\n }\n }\n\n // TODO: do we just want to ignore messages that were returned if we didn't request it?\n // TODO: check response header type (and also update inbound transports to use the correct headers types)\n if (response && responseMessage) {\n this.logger.debug('Response received', { responseMessage, status: response.status })\n\n // This should not happen\n if (!this.isActive) {\n this.logger.error(\n 'Received response message over DidCommHttpOutboundTransport while transport was not active.'\n )\n }\n\n try {\n const encryptedMessage = JsonEncoder.fromString(responseMessage)\n if (!isValidJweStructure(encryptedMessage)) {\n this.logger.error(\n `Received a response from the other agent but the structure of the incoming message is not a DIDComm message: ${responseMessage}`\n )\n return\n }\n // Emit event with the received agent message.\n const eventEmitter = this.agentContext.dependencyManager.resolve(EventEmitter)\n eventEmitter.emit<DidCommMessageReceivedEvent>(this.agentContext, {\n type: DidCommEventTypes.DidCommMessageReceived,\n payload: {\n message: encryptedMessage,\n },\n })\n } catch (_error) {\n this.logger.debug('Unable to parse response message')\n }\n } else {\n this.logger.debug('No response received.')\n }\n } catch (error) {\n this.logger.error(`Error sending message to ${endpoint}: ${error.message}`, {\n error,\n message: error.message,\n body: payload,\n didCommMimeType,\n })\n throw new CredoError(`Error sending message to ${endpoint}: ${error.message}`, { cause: error })\n } finally {\n this.outboundSessionCount--\n this.outboundSessionsObservable.next(undefined)\n }\n }\n}\n"],"mappings":";;;;;;;AAUA,IAAa,+BAAb,MAA8E;;OAIpE,WAAW;OAEX,uBAAuB;OACvB,6BAA6B,IAAI,SAAS;OAE3C,mBAAmB,CAAC,QAAQ,QAAQ;;CAE3C,MAAa,MAAM,cAA2C;AAC5D,OAAK,eAAe;AACpB,OAAK,SAAS,KAAK,aAAa,OAAO;AACvC,OAAK,QAAQ,KAAK,aAAa,OAAO,kBAAkB;AACxD,OAAK,WAAW;AAChB,OAAK,uBAAuB;AAE5B,OAAK,OAAO,MAAM,2CAA2C;;CAG/D,MAAa,OAAsB;AACjC,OAAK,OAAO,MAAM,2CAA2C;AAC7D,OAAK,WAAW;AAEhB,MAAI,KAAK,yBAAyB,GAAG;AACnC,QAAK,aAAa,OAAO,OAAO,MAC9B,oFACD;AACD;;AAGF,OAAK,aAAa,OAAO,OAAO,MAC9B,SAAS,KAAK,qBAAqB,0GACpC;AAGD,SAAO,IAAI,SAAS,YAClB,KAAK,2BAA2B,gBAAgB;AAC9C,QAAK,aAAa,OAAO,OAAO,MAC9B,GAAG,KAAK,qBAAqB,qDAC9B;AACD,OAAI,KAAK,yBAAyB,EAAG,UAAS;IAC9C,CACH;;CAGH,MAAa,YAAY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AM,wBAAwB;WAErC,OAAO;AACd,QAAK,OAAO,MAAM,4BAA4B,SAAS,IAAI,MAAM,WAAW;IAC1E;IACA,SAAS,MAAM;IACf,MAAM;IACN;IACD,CAAC;AACF,SAAM,IAAI,WAAW,4BAA4B,SAAS,IAAI,MAAM,WAAW,EAAE,OAAO,OAAO,CAAC;YACxF;AACR,QAAK;AACL,QAAK,2BAA2B,KAAK,OAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommWsOutboundTransport.d.mts","names":[],"sources":["../../src/transport/DidCommWsOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAiBa,0BAAA,YAAsC;;EAAtC,QAAA,YAAA;EAA2B,QAAA,MAAA;UAQL,cAAA;kBAAe,EAAA,MAAA,EAAA;UAW/B,QAAA;OA4ByB,CAAA,YAAA,EAvCT,YAuCS,CAAA,EAvCM,OAuCN,CAAA,IAAA,CAAA;MAAsB,CAAA,CAAA,EA5B/C,OA4B+C,CAAA,IAAA,CAAA;aA/Cf,CAAA,eAAA,EA+CP,sBA/CO,CAAA,EA+Ce,OA/Cf,CAAA,IAAA,CAAA;EAAwB,QAAA,aAAA"}
1
+ {"version":3,"file":"DidCommWsOutboundTransport.d.mts","names":[],"sources":["../../src/transport/DidCommWsOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAea,0BAAA,YAAsC;;EAAtC,QAAA,YAAA;EAA2B,QAAA,MAAA;UAQL,cAAA;kBAAe,EAAA,MAAA,EAAA;UAW/B,QAAA;OA4ByB,CAAA,YAAA,EAvCT,YAuCS,CAAA,EAvCM,OAuCN,CAAA,IAAA,CAAA;MAAsB,CAAA,CAAA,EA5B/C,OA4B+C,CAAA,IAAA,CAAA;aA/Cf,CAAA,eAAA,EA+CP,sBA/CO,CAAA,EA+Ce,OA/Cf,CAAA,IAAA,CAAA;EAAwB,QAAA,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommWsOutboundTransport.d.ts","names":[],"sources":["../../src/transport/DidCommWsOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAiBa,0BAAA,YAAsC;;EAAtC,QAAA,YAAA;EAA2B,QAAA,MAAA;UAQL,cAAA;kBAAe,EAAA,MAAA,EAAA;UAW/B,QAAA;OA4ByB,CAAA,YAAA,EAvCT,YAuCS,CAAA,EAvCM,OAuCN,CAAA,IAAA,CAAA;MAAsB,CAAA,CAAA,EA5B/C,OA4B+C,CAAA,IAAA,CAAA;aA/Cf,CAAA,eAAA,EA+CP,sBA/CO,CAAA,EA+Ce,OA/Cf,CAAA,IAAA,CAAA;EAAwB,QAAA,aAAA"}
1
+ {"version":3,"file":"DidCommWsOutboundTransport.d.ts","names":[],"sources":["../../src/transport/DidCommWsOutboundTransport.ts"],"sourcesContent":[],"mappings":";;;;;cAea,0BAAA,YAAsC;;EAAtC,QAAA,YAAA;EAA2B,QAAA,MAAA;UAQL,cAAA;kBAAe,EAAA,MAAA,EAAA;UAW/B,QAAA;OA4ByB,CAAA,YAAA,EAvCT,YAuCS,CAAA,EAvCM,OAuCN,CAAA,IAAA,CAAA;MAAsB,CAAA,CAAA,EA5B/C,OA4B+C,CAAA,IAAA,CAAA;aA/Cf,CAAA,eAAA,EA+CP,sBA/CO,CAAA,EA+Ce,OA/Cf,CAAA,IAAA,CAAA;EAAwB,QAAA,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommWsOutboundTransport.mjs","names":["stillOpenSocketClosingPromises: Array<Promise<void>>"],"sources":["../../src/transport/DidCommWsOutboundTransport.ts"],"sourcesContent":["import type { AgentContext, Logger } from '@credo-ts/core'\nimport type { WebSocket } from 'ws'\nimport type { DidCommMessageReceivedEvent } from '../DidCommEvents'\nimport type { DidCommOutboundPackage } from '../types'\nimport type { DidCommOutboundTransport } from './DidCommOutboundTransport'\nimport type {\n DidCommOutboundWebSocketClosedEvent,\n DidCommOutboundWebSocketOpenedEvent,\n} from './DidCommTransportEventTypes'\n\nimport { Buffer, CredoError, EventEmitter, JsonEncoder } from '@credo-ts/core'\n\nimport { DidCommEventTypes } from '../DidCommEvents'\nimport { isValidJweStructure } from '../util/JWE'\n\nimport { DidCommTransportEventTypes } from './DidCommTransportEventTypes'\n\nexport class DidCommWsOutboundTransport implements DidCommOutboundTransport {\n private transportTable: Map<string, WebSocket> = new Map<string, WebSocket>()\n private agentContext!: AgentContext\n private logger!: Logger\n private WebSocketClass!: typeof WebSocket\n public supportedSchemes = ['ws', 'wss']\n private isActive = false\n\n public async start(agentContext: AgentContext): Promise<void> {\n this.agentContext = agentContext\n\n this.logger = agentContext.config.logger\n\n this.logger.debug('Starting WS outbound DIDComm transport')\n this.WebSocketClass = agentContext.config.agentDependencies.WebSocketClass\n\n this.isActive = true\n }\n\n public async stop() {\n this.logger.debug('Stopping WS outbound DIDComm transport')\n this.isActive = false\n\n const stillOpenSocketClosingPromises: Array<Promise<void>> = []\n\n for (const [, socket] of this.transportTable) {\n socket.removeEventListener('message', this.handleMessageEvent)\n if (socket.readyState !== this.WebSocketClass.CLOSED) {\n stillOpenSocketClosingPromises.push(\n new Promise((resolve) => {\n const closeHandler = () => {\n socket.removeEventListener('close', closeHandler)\n resolve()\n }\n\n socket.addEventListener('close', closeHandler)\n })\n )\n\n socket.close()\n }\n }\n\n // Wait for all open websocket connections to have been closed\n await Promise.all(stillOpenSocketClosingPromises)\n }\n\n public async sendMessage(outboundPackage: DidCommOutboundPackage) {\n const { payload, endpoint, connectionId } = outboundPackage\n this.logger.debug(`Sending outbound message to endpoint '${endpoint}' over WebSocket transport.`, {\n payload,\n })\n\n if (!this.isActive) {\n throw new CredoError('Outbound transport is not active. Not sending message.')\n }\n\n if (!endpoint) {\n throw new CredoError(\"Missing connection or endpoint. I don't know how and where to send the message.\")\n }\n\n const socketId = `${endpoint}-${connectionId}`\n const isNewSocket = !this.hasOpenSocket(socketId)\n const socket = await this.resolveSocket({ socketId, endpoint, connectionId })\n\n // If the socket was created for this message and we don't have return routing enabled\n // We can close the socket as it shouldn't return messages anymore\n // make sure to use the socket in a manner that is compliant with the https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n // (React Native) and https://github.com/websockets/ws (NodeJs)\n socket.send(Buffer.from(JSON.stringify(payload)))\n if (isNewSocket && !outboundPackage.responseRequested) {\n socket.close()\n }\n }\n\n private hasOpenSocket(socketId: string) {\n return this.transportTable.get(socketId) !== undefined\n }\n\n private async resolveSocket({\n socketId,\n endpoint,\n connectionId,\n }: {\n socketId: string\n endpoint?: string\n connectionId?: string\n }) {\n // If we already have a socket connection use it\n let socket = this.transportTable.get(socketId)\n\n if (!socket || socket.readyState === this.WebSocketClass.CLOSING) {\n if (!endpoint) {\n throw new CredoError(`Missing endpoint. I don't know how and where to send the message.`)\n }\n socket = await this.createSocketConnection({\n endpoint,\n socketId,\n connectionId,\n })\n this.transportTable.set(socketId, socket)\n this.listenOnWebSocketMessages(socket)\n }\n\n if (socket.readyState !== this.WebSocketClass.OPEN) {\n throw new CredoError('Socket is not open.')\n }\n\n return socket\n }\n\n // NOTE: Because this method is passed to the event handler this must be a lambda method\n // so 'this' is scoped to the 'WsDidCommOutboundTransport' class instance\n // biome-ignore lint/suspicious/noExplicitAny: <explanation>\n private handleMessageEvent = (event: any) => {\n this.logger.trace('WebSocket message event received.', { url: event.target.url })\n const payload = JsonEncoder.fromBuffer(event.data)\n if (!isValidJweStructure(payload)) {\n throw new Error(\n `Received a response from the other agent but the structure of the incoming message is not a DIDComm message: ${payload}`\n )\n }\n this.logger.debug('Payload received from mediator:', payload)\n\n const eventEmitter = this.agentContext.dependencyManager.resolve(EventEmitter)\n\n eventEmitter.emit<DidCommMessageReceivedEvent>(this.agentContext, {\n type: DidCommEventTypes.DidCommMessageReceived,\n payload: {\n message: payload,\n },\n })\n }\n\n private listenOnWebSocketMessages(socket: WebSocket) {\n socket.addEventListener('message', this.handleMessageEvent)\n }\n\n private createSocketConnection({\n socketId,\n endpoint,\n connectionId,\n }: {\n socketId: string\n endpoint: string\n connectionId?: string\n }): Promise<WebSocket> {\n return new Promise((resolve, reject) => {\n this.logger.debug(`Connecting to WebSocket ${endpoint}`)\n const socket = new this.WebSocketClass(endpoint)\n const eventEmitter = this.agentContext.dependencyManager.resolve(EventEmitter)\n\n socket.onopen = () => {\n this.logger.debug(`Successfully connected to WebSocket ${endpoint}`)\n resolve(socket)\n\n eventEmitter.emit<DidCommOutboundWebSocketOpenedEvent>(this.agentContext, {\n type: DidCommTransportEventTypes.DidCommOutboundWebSocketOpenedEvent,\n payload: {\n socketId,\n connectionId: connectionId,\n },\n })\n }\n\n socket.onerror = (error) => {\n this.logger.debug(`Error while connecting to WebSocket ${endpoint}`, {\n error,\n })\n reject(error)\n }\n\n socket.onclose = async () => {\n this.logger.debug(`WebSocket closing to ${endpoint}`)\n socket.removeEventListener('message', this.handleMessageEvent)\n this.transportTable.delete(socketId)\n\n eventEmitter.emit<DidCommOutboundWebSocketClosedEvent>(this.agentContext, {\n type: DidCommTransportEventTypes.DidCommOutboundWebSocketClosedEvent,\n payload: {\n socketId,\n connectionId: connectionId,\n },\n })\n }\n })\n }\n}\n"],"mappings":";;;;;;AAiBA,IAAa,6BAAb,MAA4E;;OAClE,iCAAyC,IAAI,KAAwB;OAItE,mBAAmB,CAAC,MAAM,MAAM;OAC/B,WAAW;OA4GX,sBAAsB,UAAe;AAC3C,QAAK,OAAO,MAAM,qCAAqC,EAAE,KAAK,MAAM,OAAO,KAAK,CAAC;GACjF,MAAM,UAAU,YAAY,WAAW,MAAM,KAAK;AAClD,OAAI,CAAC,oBAAoB,QAAQ,CAC/B,OAAM,IAAI,MACR,gHAAgH,UACjH;AAEH,QAAK,OAAO,MAAM,mCAAmC,QAAQ;AAI7D,GAFqB,KAAK,aAAa,kBAAkB,QAAQ,aAAa,CAEjE,KAAkC,KAAK,cAAc;IAChE,MAAM,kBAAkB;IACxB,SAAS,EACP,SAAS,SACV;IACF,CAAC;;;CA3HJ,MAAa,MAAM,cAA2C;AAC5D,OAAK,eAAe;AAEpB,OAAK,SAAS,aAAa,OAAO;A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e,SAAS;AAChE,OAAI,CAAC,SACH,OAAM,IAAI,WAAW,oEAAoE;AAE3F,YAAS,MAAM,KAAK,uBAAuB;IACzC;IACA;IACA;IACD,CAAC;AACF,QAAK,eAAe,IAAI,UAAU,OAAO;AACzC,QAAK,0BAA0B,OAAO;;AAGxC,MAAI,OAAO,eAAe,KAAK,eAAe,KAC5C,OAAM,IAAI,WAAW,sBAAsB;AAG7C,SAAO;;CA0BT,AAAQ,0BAA0B,QAAmB;AACnD,SAAO,iBAAiB,WAAW,KAAK,mBAAmB;;CAG7D,AAAQ,uBAAuB,EAC7B,UACA,UACA,gBAKqB;AACrB,SAAO,IAAI,SAAS,SAAS,WAAW;AACtC,QAAK,OAAO,MAAM,2BAA2B,WAAW;GACxD,MAAM,SAAS,IAAI,KAAK,eAAe,SAAS;GAChD,MAAM,eAAe,KAAK,aAAa,kBAAkB,QAAQ,aAAa;AAE9E,UAAO,eAAe;AACpB,SAAK,OAAO,MAAM,uCAAuC,WAAW;AACpE,YAAQ,OAAO;AAEf,iBAAa,KAA0C,KAAK,cAAc;KACxE,MAAM,2BAA2B;KACjC,SAAS;MACP;MACc;MACf;KACF,CAAC;;AAGJ,UAAO,WAAW,UAAU;AAC1B,SAAK,OAAO,MAAM,uCAAuC,YAAY,EACnE,OACD,CAAC;AACF,WAAO,MAAM;;AAGf,UAAO,UAAU,YAAY;AAC3B,SAAK,OAAO,MAAM,wBAAwB,WAAW;AACrD,WAAO,oBAAoB,WAAW,KAAK,mBAAmB;AAC9D,SAAK,eAAe,OAAO,SAAS;AAEpC,iBAAa,KAA0C,KAAK,cAAc;KACxE,MAAM,2BAA2B;KACjC,SAAS;MACP;MACc;MACf;KACF,CAAC;;IAEJ"}
1
+ {"version":3,"file":"DidCommWsOutboundTransport.mjs","names":["stillOpenSocketClosingPromises: Array<Promise<void>>"],"sources":["../../src/transport/DidCommWsOutboundTransport.ts"],"sourcesContent":["import type { AgentContext, Logger } from '@credo-ts/core'\nimport { Buffer, CredoError, EventEmitter, JsonEncoder } from '@credo-ts/core'\nimport type { WebSocket } from 'ws'\nimport type { DidCommMessageReceivedEvent } from '../DidCommEvents'\nimport { DidCommEventTypes } from '../DidCommEvents'\nimport type { DidCommOutboundPackage } from '../types'\nimport { isValidJweStructure } from '../util/JWE'\nimport type { DidCommOutboundTransport } from './DidCommOutboundTransport'\nimport type {\n DidCommOutboundWebSocketClosedEvent,\n DidCommOutboundWebSocketOpenedEvent,\n} from './DidCommTransportEventTypes'\n\nimport { DidCommTransportEventTypes } from './DidCommTransportEventTypes'\n\nexport class DidCommWsOutboundTransport implements DidCommOutboundTransport {\n private transportTable: Map<string, WebSocket> = new Map<string, WebSocket>()\n private agentContext!: AgentContext\n private logger!: Logger\n private WebSocketClass!: typeof WebSocket\n public supportedSchemes = ['ws', 'wss']\n private isActive = false\n\n public async start(agentContext: AgentContext): Promise<void> {\n this.agentContext = agentContext\n\n this.logger = agentContext.config.logger\n\n this.logger.debug('Starting WS outbound DIDComm transport')\n this.WebSocketClass = agentContext.config.agentDependencies.WebSocketClass\n\n this.isActive = true\n }\n\n public async stop() {\n this.logger.debug('Stopping WS outbound DIDComm transport')\n this.isActive = false\n\n const stillOpenSocketClosingPromises: Array<Promise<void>> = []\n\n for (const [, socket] of this.transportTable) {\n socket.removeEventListener('message', this.handleMessageEvent)\n if (socket.readyState !== this.WebSocketClass.CLOSED) {\n stillOpenSocketClosingPromises.push(\n new Promise((resolve) => {\n const closeHandler = () => {\n socket.removeEventListener('close', closeHandler)\n resolve()\n }\n\n socket.addEventListener('close', closeHandler)\n })\n )\n\n socket.close()\n }\n }\n\n // Wait for all open websocket connections to have been closed\n await Promise.all(stillOpenSocketClosingPromises)\n }\n\n public async sendMessage(outboundPackage: DidCommOutboundPackage) {\n const { payload, endpoint, connectionId } = outboundPackage\n this.logger.debug(`Sending outbound message to endpoint '${endpoint}' over WebSocket transport.`, {\n payload,\n })\n\n if (!this.isActive) {\n throw new CredoError('Outbound transport is not active. Not sending message.')\n }\n\n if (!endpoint) {\n throw new CredoError(\"Missing connection or endpoint. I don't know how and where to send the message.\")\n }\n\n const socketId = `${endpoint}-${connectionId}`\n const isNewSocket = !this.hasOpenSocket(socketId)\n const socket = await this.resolveSocket({ socketId, endpoint, connectionId })\n\n // If the socket was created for this message and we don't have return routing enabled\n // We can close the socket as it shouldn't return messages anymore\n // make sure to use the socket in a manner that is compliant with the https://developer.mozilla.org/en-US/docs/Web/API/WebSocket\n // (React Native) and https://github.com/websockets/ws (NodeJs)\n socket.send(Buffer.from(JSON.stringify(payload)))\n if (isNewSocket && !outboundPackage.responseRequested) {\n socket.close()\n }\n }\n\n private hasOpenSocket(socketId: string) {\n return this.transportTable.get(socketId) !== undefined\n }\n\n private async resolveSocket({\n socketId,\n endpoint,\n connectionId,\n }: {\n socketId: string\n endpoint?: string\n connectionId?: string\n }) {\n // If we already have a socket connection use it\n let socket = this.transportTable.get(socketId)\n\n if (!socket || socket.readyState === this.WebSocketClass.CLOSING) {\n if (!endpoint) {\n throw new CredoError(`Missing endpoint. I don't know how and where to send the message.`)\n }\n socket = await this.createSocketConnection({\n endpoint,\n socketId,\n connectionId,\n })\n this.transportTable.set(socketId, socket)\n this.listenOnWebSocketMessages(socket)\n }\n\n if (socket.readyState !== this.WebSocketClass.OPEN) {\n throw new CredoError('Socket is not open.')\n }\n\n return socket\n }\n\n // NOTE: Because this method is passed to the event handler this must be a lambda method\n // so 'this' is scoped to the 'WsDidCommOutboundTransport' class instance\n // biome-ignore lint/suspicious/noExplicitAny: no explanation\n private handleMessageEvent = (event: any) => {\n this.logger.trace('WebSocket message event received.', { url: event.target.url })\n const payload = JsonEncoder.fromBuffer(event.data)\n if (!isValidJweStructure(payload)) {\n throw new Error(\n `Received a response from the other agent but the structure of the incoming message is not a DIDComm message: ${payload}`\n )\n }\n this.logger.debug('Payload received from mediator:', payload)\n\n const eventEmitter = this.agentContext.dependencyManager.resolve(EventEmitter)\n\n eventEmitter.emit<DidCommMessageReceivedEvent>(this.agentContext, {\n type: DidCommEventTypes.DidCommMessageReceived,\n payload: {\n message: payload,\n },\n })\n }\n\n private listenOnWebSocketMessages(socket: WebSocket) {\n socket.addEventListener('message', this.handleMessageEvent)\n }\n\n private createSocketConnection({\n socketId,\n endpoint,\n connectionId,\n }: {\n socketId: string\n endpoint: string\n connectionId?: string\n }): Promise<WebSocket> {\n return new Promise((resolve, reject) => {\n this.logger.debug(`Connecting to WebSocket ${endpoint}`)\n const socket = new this.WebSocketClass(endpoint)\n const eventEmitter = this.agentContext.dependencyManager.resolve(EventEmitter)\n\n socket.onopen = () => {\n this.logger.debug(`Successfully connected to WebSocket ${endpoint}`)\n resolve(socket)\n\n eventEmitter.emit<DidCommOutboundWebSocketOpenedEvent>(this.agentContext, {\n type: DidCommTransportEventTypes.DidCommOutboundWebSocketOpenedEvent,\n payload: {\n socketId,\n connectionId: connectionId,\n },\n })\n }\n\n socket.onerror = (error) => {\n this.logger.debug(`Error while connecting to WebSocket ${endpoint}`, {\n error,\n })\n reject(error)\n }\n\n socket.onclose = async () => {\n this.logger.debug(`WebSocket closing to ${endpoint}`)\n socket.removeEventListener('message', this.handleMessageEvent)\n this.transportTable.delete(socketId)\n\n eventEmitter.emit<DidCommOutboundWebSocketClosedEvent>(this.agentContext, {\n type: DidCommTransportEventTypes.DidCommOutboundWebSocketClosedEvent,\n payload: {\n socketId,\n connectionId: connectionId,\n },\n })\n }\n })\n }\n}\n"],"mappings":";;;;;;AAeA,IAAa,6BAAb,MAA4E;;OAClE,iCAAyC,IAAI,KAAwB;OAItE,mBAAmB,CAAC,MAAM,MAAM;OAC/B,WAAW;OA4GX,sBAAsB,UAAe;AAC3C,QAAK,OAAO,MAAM,qCAAqC,EAAE,KAAK,MAAM,OAAO,KAAK,CAAC;GACjF,MAAM,UAAU,YAAY,WAAW,MAAM,KAAK;AAClD,OAAI,CAAC,oBAAoB,QAAQ,CAC/B,OAAM,IAAI,MACR,gHAAgH,UACjH;AAEH,QAAK,OAAO,MAAM,mCAAmC,QA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;KACjC,SAAS;MACP;MACc;MACf;KACF,CAAC;;IAEJ"}
@@ -1,5 +1,5 @@
1
- const require_InMemoryQueueTransportRepository = require('./queue/InMemoryQueueTransportRepository.js');
2
- require('./queue/index.js');
3
1
  const require_DidCommHttpOutboundTransport = require('./DidCommHttpOutboundTransport.js');
4
2
  const require_DidCommTransportEventTypes = require('./DidCommTransportEventTypes.js');
5
3
  const require_DidCommWsOutboundTransport = require('./DidCommWsOutboundTransport.js');
4
+ const require_InMemoryQueueTransportRepository = require('./queue/InMemoryQueueTransportRepository.js');
5
+ require('./queue/index.js');
@@ -1,5 +1,5 @@
1
- import { InMemoryQueueTransportRepository } from "./queue/InMemoryQueueTransportRepository.mjs";
2
- import "./queue/index.mjs";
3
1
  import { DidCommHttpOutboundTransport } from "./DidCommHttpOutboundTransport.mjs";
4
2
  import { DidCommTransportEventTypes } from "./DidCommTransportEventTypes.mjs";
5
3
  import { DidCommWsOutboundTransport } from "./DidCommWsOutboundTransport.mjs";
4
+ import { InMemoryQueueTransportRepository } from "./queue/InMemoryQueueTransportRepository.mjs";
5
+ import "./queue/index.mjs";
@@ -1,5 +1,5 @@
1
- import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.mjs";
2
1
  import { QueuedDidCommMessage } from "./QueuedDidCommMessage.mjs";
2
+ import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.mjs";
3
3
  import { AgentContext } from "@credo-ts/core";
4
4
 
5
5
  //#region src/transport/queue/DidCommQueueTransportRepository.d.ts
@@ -1,5 +1,5 @@
1
- import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.js";
2
1
  import { QueuedDidCommMessage } from "./QueuedDidCommMessage.js";
2
+ import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.js";
3
3
  import { AgentContext } from "@credo-ts/core";
4
4
 
5
5
  //#region src/transport/queue/DidCommQueueTransportRepository.d.ts
@@ -1,5 +1,5 @@
1
- import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.mjs";
2
1
  import { QueuedDidCommMessage } from "./QueuedDidCommMessage.mjs";
2
+ import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.mjs";
3
3
  import { DidCommQueueTransportRepository } from "./DidCommQueueTransportRepository.mjs";
4
4
  import { AgentContext } from "@credo-ts/core";
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"InMemoryQueueTransportRepository.d.mts","names":[],"sources":["../../../src/transport/queue/InMemoryQueueTransportRepository.ts"],"sourcesContent":[],"mappings":";;;;;;cAkBa,gCAAA,YAA4C;;EAA5C,WAAA,CAAA;EAAiC,wBAAA,CAAA,aAAA,EAQ3B,YAR2B,EAAA,OAAA,EASjC,+BATiC,CAAA,EAAA,MAAA,GAUhC,OAVgC,CAAA,MAAA,CAAA;eAQ3B,CAAA,YAAA,EAckB,YAdlB,EAAA,OAAA,EAcyC,oBAdzC,CAAA,EAcgE,oBAdhE,EAAA;YACN,CAAA,aAAA,EA0CsB,YA1CtB,EAAA,OAAA,EA0C6C,iBA1C7C,CAAA,EAAA,MAAA;gBACC,CAAA,aAAA,EAyDyB,YAzDzB,EAAA,OAAA,EAyDgD,qBAzDhD,CAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"InMemoryQueueTransportRepository.d.mts","names":[],"sources":["../../../src/transport/queue/InMemoryQueueTransportRepository.ts"],"sourcesContent":[],"mappings":";;;;;;cAiBa,gCAAA,YAA4C;;EAA5C,WAAA,CAAA;EAAiC,wBAAA,CAAA,aAAA,EAQ3B,YAR2B,EAAA,OAAA,EASjC,+BATiC,CAAA,EAAA,MAAA,GAUhC,OAVgC,CAAA,MAAA,CAAA;eAQ3B,CAAA,YAAA,EAckB,YAdlB,EAAA,OAAA,EAcyC,oBAdzC,CAAA,EAcgE,oBAdhE,EAAA;YACN,CAAA,aAAA,EA0CsB,YA1CtB,EAAA,OAAA,EA0C6C,iBA1C7C,CAAA,EAAA,MAAA;gBACC,CAAA,aAAA,EAyDyB,YAzDzB,EAAA,OAAA,EAyDgD,qBAzDhD,CAAA,EAAA,IAAA"}
@@ -1,5 +1,5 @@
1
- import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.js";
2
1
  import { QueuedDidCommMessage } from "./QueuedDidCommMessage.js";
2
+ import { AddMessageOptions, GetAvailableMessageCountOptions, RemoveMessagesOptions, TakeFromQueueOptions } from "./QueueTransportRepositoryOptions.js";
3
3
  import { DidCommQueueTransportRepository } from "./DidCommQueueTransportRepository.js";
4
4
  import { AgentContext } from "@credo-ts/core";
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"InMemoryQueueTransportRepository.d.ts","names":[],"sources":["../../../src/transport/queue/InMemoryQueueTransportRepository.ts"],"sourcesContent":[],"mappings":";;;;;;cAkBa,gCAAA,YAA4C;;EAA5C,WAAA,CAAA;EAAiC,wBAAA,CAAA,aAAA,EAQ3B,YAR2B,EAAA,OAAA,EASjC,+BATiC,CAAA,EAAA,MAAA,GAUhC,OAVgC,CAAA,MAAA,CAAA;eAQ3B,CAAA,YAAA,EAckB,YAdlB,EAAA,OAAA,EAcyC,oBAdzC,CAAA,EAcgE,oBAdhE,EAAA;YACN,CAAA,aAAA,EA0CsB,YA1CtB,EAAA,OAAA,EA0C6C,iBA1C7C,CAAA,EAAA,MAAA;gBACC,CAAA,aAAA,EAyDyB,YAzDzB,EAAA,OAAA,EAyDgD,qBAzDhD,CAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"InMemoryQueueTransportRepository.d.ts","names":[],"sources":["../../../src/transport/queue/InMemoryQueueTransportRepository.ts"],"sourcesContent":[],"mappings":";;;;;;cAiBa,gCAAA,YAA4C;;EAA5C,WAAA,CAAA;EAAiC,wBAAA,CAAA,aAAA,EAQ3B,YAR2B,EAAA,OAAA,EASjC,+BATiC,CAAA,EAAA,MAAA,GAUhC,OAVgC,CAAA,MAAA,CAAA;eAQ3B,CAAA,YAAA,EAckB,YAdlB,EAAA,OAAA,EAcyC,oBAdzC,CAAA,EAcgE,oBAdhE,EAAA;YACN,CAAA,aAAA,EA0CsB,YA1CtB,EAAA,OAAA,EA0C6C,iBA1C7C,CAAA,EAAA,MAAA;gBACC,CAAA,aAAA,EAyDyB,YAzDzB,EAAA,OAAA,EAyDgD,qBAzDhD,CAAA,EAAA,IAAA"}
@@ -1,6 +1,6 @@
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_decorateMetadata = require('../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
4
4
  let __credo_ts_core = require("@credo-ts/core");
5
5
  __credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
6
6
 
@@ -1,5 +1,5 @@
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 { AgentContext, injectable, utils } from "@credo-ts/core";
4
4
 
5
5
  //#region src/transport/queue/InMemoryQueueTransportRepository.ts
@@ -1 +1 @@
1
- {"version":3,"file":"InMemoryQueueTransportRepository.mjs","names":["InMemoryQueueTransportRepository"],"sources":["../../../src/transport/queue/InMemoryQueueTransportRepository.ts"],"sourcesContent":["import type { DidCommQueueTransportRepository } from './DidCommQueueTransportRepository'\nimport type {\n AddMessageOptions,\n GetAvailableMessageCountOptions,\n RemoveMessagesOptions,\n TakeFromQueueOptions,\n} from './QueueTransportRepositoryOptions'\nimport type { QueuedDidCommMessage } from './QueuedDidCommMessage'\n\nimport { AgentContext, injectable, utils } from '@credo-ts/core'\n\ninterface InMemoryQueuedMessage extends QueuedDidCommMessage {\n connectionId: string\n recipientDids: string[]\n state: 'pending' | 'sending'\n}\n\n@injectable()\nexport class InMemoryQueueTransportRepository implements DidCommQueueTransportRepository {\n private messages: InMemoryQueuedMessage[]\n\n public constructor() {\n this.messages = []\n }\n\n public getAvailableMessageCount(\n _agentContext: AgentContext,\n options: GetAvailableMessageCountOptions\n ): number | Promise<number> {\n const { connectionId, recipientDid } = options\n\n const messages = this.messages.filter(\n (msg) =>\n msg.connectionId === connectionId &&\n (recipientDid === undefined || msg.recipientDids.includes(recipientDid)) &&\n msg.state === 'pending'\n )\n return messages.length\n }\n\n public takeFromQueue(agentContext: AgentContext, options: TakeFromQueueOptions): QueuedDidCommMessage[] {\n const { connectionId, recipientDid, limit, deleteMessages } = options\n\n let messages = this.messages.filter(\n (msg) =>\n msg.connectionId === connectionId &&\n msg.state === 'pending' &&\n (recipientDid === undefined || msg.recipientDids.includes(recipientDid))\n )\n\n const messagesToTake = limit ?? messages.length\n\n messages = messages.slice(0, messagesToTake)\n\n agentContext.config.logger.debug(`Taking ${messagesToTake} messages from queue for connection ${connectionId}`)\n\n // Mark taken messages in order to prevent them of being retrieved again\n for (const msg of messages) {\n const index = this.messages.findIndex((item) => item.id === msg.id)\n if (index !== -1) this.messages[index].state = 'sending'\n }\n\n if (deleteMessages) {\n this.removeMessages(agentContext, { connectionId, messageIds: messages.map((msg) => msg.id) })\n }\n\n return messages\n }\n\n public addMessage(_agentContext: AgentContext, options: AddMessageOptions) {\n const { connectionId, recipientDids, payload } = options\n\n const id = utils.uuid()\n this.messages.push({\n id,\n receivedAt: options.receivedAt ?? new Date(),\n connectionId,\n encryptedMessage: payload,\n recipientDids,\n state: 'pending',\n })\n\n return id\n }\n\n public removeMessages(_agentContext: AgentContext, options: RemoveMessagesOptions) {\n const { messageIds } = options\n\n for (const messageId of messageIds) {\n const messageIndex = this.messages.findIndex((item) => item.id === messageId)\n if (messageIndex > -1) this.messages.splice(messageIndex, 1)\n }\n }\n}\n"],"mappings":";;;;;AAkBO,6CAAMA,mCAA4E;CAGvF,AAAO,cAAc;AACnB,OAAK,WAAW,EAAE;;CAGpB,AAAO,yBACL,eACA,SAC0B;EAC1B,MAAM,EAAE,cAAc,iBAAiB;AAQvC,SANiB,KAAK,SAAS,QAC5B,QACC,IAAI,iBAAiB,iBACpB,iBAAiB,UAAa,IAAI,cAAc,SAAS,aAAa,KACvE,IAAI,UAAU,UACjB,CACe;;CAGlB,AAAO,cAAc,cAA4B,SAAuD;EACtG,MAAM,EAAE,cAAc,cAAc,OAAO,mBAAmB;EAE9D,IAAI,WAAW,KAAK,SAAS,QAC1B,QACC,IAAI,iBAAiB,gBACrB,IAAI,UAAU,cACb,iBAAiB,UAAa,IAAI,cAAc,SAAS,aAAa,EAC1E;EAED,MAAM,iBAAiB,SAAS,SAAS;AAEzC,aAAW,SAAS,MAAM,GAAG,eAAe;AAE5C,eAAa,OAAO,OAAO,MAAM,UAAU,eAAe,sCAAsC,eAAe;AAG/G,OAAK,MAAM,OAAO,UAAU;GAC1B,MAAM,QAAQ,KAAK,SAAS,WAAW,SAAS,KAAK,OAAO,IAAI,GAAG;AACnE,OAAI,UAAU,GAAI,MAAK,SAAS,OAAO,QAAQ;;AAGjD,MAAI,eACF,MAAK,eAAe,cAAc;GAAE;GAAc,YAAY,SAAS,KAAK,QAAQ,IAAI,GAAG;GAAE,CAAC;AAGhG,SAAO;;CAGT,AAAO,WAAW,eAA6B,SAA4B;EACzE,MAAM,EAAE,cAAc,eAAe,YAAY;EAEjD,MAAM,KAAK,MAAM,MAAM;AACvB,OAAK,SAAS,KAAK;GACjB;GACA,YAAY,QAAQ,8BAAc,IAAI,MAAM;GAC5C;GACA,kBAAkB;GAClB;GACA,OAAO;GACR,CAAC;AAEF,SAAO;;CAGT,AAAO,eAAe,eAA6B,SAAgC;EACjF,MAAM,EAAE,eAAe;AAEvB,OAAK,MAAM,aAAa,YAAY;GAClC,MAAM,eAAe,KAAK,SAAS,WAAW,SAAS,KAAK,OAAO,UAAU;AAC7E,OAAI,eAAe,GAAI,MAAK,SAAS,OAAO,cAAc,EAAE;;;;+CAzEjE,YAAY"}
1
+ {"version":3,"file":"InMemoryQueueTransportRepository.mjs","names":["InMemoryQueueTransportRepository"],"sources":["../../../src/transport/queue/InMemoryQueueTransportRepository.ts"],"sourcesContent":["import { AgentContext, injectable, utils } from '@credo-ts/core'\nimport type { DidCommQueueTransportRepository } from './DidCommQueueTransportRepository'\nimport type { QueuedDidCommMessage } from './QueuedDidCommMessage'\nimport type {\n AddMessageOptions,\n GetAvailableMessageCountOptions,\n RemoveMessagesOptions,\n TakeFromQueueOptions,\n} from './QueueTransportRepositoryOptions'\n\ninterface InMemoryQueuedMessage extends QueuedDidCommMessage {\n connectionId: string\n recipientDids: string[]\n state: 'pending' | 'sending'\n}\n\n@injectable()\nexport class InMemoryQueueTransportRepository implements DidCommQueueTransportRepository {\n private messages: InMemoryQueuedMessage[]\n\n public constructor() {\n this.messages = []\n }\n\n public getAvailableMessageCount(\n _agentContext: AgentContext,\n options: GetAvailableMessageCountOptions\n ): number | Promise<number> {\n const { connectionId, recipientDid } = options\n\n const messages = this.messages.filter(\n (msg) =>\n msg.connectionId === connectionId &&\n (recipientDid === undefined || msg.recipientDids.includes(recipientDid)) &&\n msg.state === 'pending'\n )\n return messages.length\n }\n\n public takeFromQueue(agentContext: AgentContext, options: TakeFromQueueOptions): QueuedDidCommMessage[] {\n const { connectionId, recipientDid, limit, deleteMessages } = options\n\n let messages = this.messages.filter(\n (msg) =>\n msg.connectionId === connectionId &&\n msg.state === 'pending' &&\n (recipientDid === undefined || msg.recipientDids.includes(recipientDid))\n )\n\n const messagesToTake = limit ?? messages.length\n\n messages = messages.slice(0, messagesToTake)\n\n agentContext.config.logger.debug(`Taking ${messagesToTake} messages from queue for connection ${connectionId}`)\n\n // Mark taken messages in order to prevent them of being retrieved again\n for (const msg of messages) {\n const index = this.messages.findIndex((item) => item.id === msg.id)\n if (index !== -1) this.messages[index].state = 'sending'\n }\n\n if (deleteMessages) {\n this.removeMessages(agentContext, { connectionId, messageIds: messages.map((msg) => msg.id) })\n }\n\n return messages\n }\n\n public addMessage(_agentContext: AgentContext, options: AddMessageOptions) {\n const { connectionId, recipientDids, payload } = options\n\n const id = utils.uuid()\n this.messages.push({\n id,\n receivedAt: options.receivedAt ?? new Date(),\n connectionId,\n encryptedMessage: payload,\n recipientDids,\n state: 'pending',\n })\n\n return id\n }\n\n public removeMessages(_agentContext: AgentContext, options: RemoveMessagesOptions) {\n const { messageIds } = options\n\n for (const messageId of messageIds) {\n const messageIndex = this.messages.findIndex((item) => item.id === messageId)\n if (messageIndex > -1) this.messages.splice(messageIndex, 1)\n }\n }\n}\n"],"mappings":";;;;;AAiBO,6CAAMA,mCAA4E;CAGvF,AAAO,cAAc;AACnB,OAAK,WAAW,EAAE;;CAGpB,AAAO,yBACL,eACA,SAC0B;EAC1B,MAAM,EAAE,cAAc,iBAAiB;AAQvC,SANiB,KAAK,SAAS,QAC5B,QACC,IAAI,iBAAiB,iBACpB,iBAAiB,UAAa,IAAI,cAAc,SAAS,aAAa,KACvE,IAAI,UAAU,UACjB,CACe;;CAGlB,AAAO,cAAc,cAA4B,SAAuD;EACtG,MAAM,EAAE,cAAc,cAAc,OAAO,mBAAmB;EAE9D,IAAI,WAAW,KAAK,SAAS,QAC1B,QACC,IAAI,iBAAiB,gBACrB,IAAI,UAAU,cACb,iBAAiB,UAAa,IAAI,cAAc,SAAS,aAAa,EAC1E;EAED,MAAM,iBAAiB,SAAS,SAAS;AAEzC,aAAW,SAAS,MAAM,GAAG,eAAe;AAE5C,eAAa,OAAO,OAAO,MAAM,UAAU,eAAe,sCAAsC,eAAe;AAG/G,OAAK,MAAM,OAAO,UAAU;GAC1B,MAAM,QAAQ,KAAK,SAAS,WAAW,SAAS,KAAK,OAAO,IAAI,GAAG;AACnE,OAAI,UAAU,GAAI,MAAK,SAAS,OAAO,QAAQ;;AAGjD,MAAI,eACF,MAAK,eAAe,cAAc;GAAE;GAAc,YAAY,SAAS,KAAK,QAAQ,IAAI,GAAG;GAAE,CAAC;AAGhG,SAAO;;CAGT,AAAO,WAAW,eAA6B,SAA4B;EACzE,MAAM,EAAE,cAAc,eAAe,YAAY;EAEjD,MAAM,KAAK,MAAM,MAAM;AACvB,OAAK,SAAS,KAAK;GACjB;GACA,YAAY,QAAQ,8BAAc,IAAI,MAAM;GAC5C;GACA,kBAAkB;GAClB;GACA,OAAO;GACR,CAAC;AAEF,SAAO;;CAGT,AAAO,eAAe,eAA6B,SAAgC;EACjF,MAAM,EAAE,eAAe;AAEvB,OAAK,MAAM,aAAa,YAAY;GAClC,MAAM,eAAe,KAAK,SAAS,WAAW,SAAS,KAAK,OAAO,UAAU;AAC7E,OAAI,eAAe,GAAI,MAAK,SAAS,OAAO,cAAc,EAAE;;;;+CAzEjE,YAAY"}
@@ -1,2 +1,2 @@
1
- const require_InMemoryQueueTransportRepository = require('./InMemoryQueueTransportRepository.js');
2
1
  require('./DidCommQueueTransportRepository.js');
2
+ const require_InMemoryQueueTransportRepository = require('./InMemoryQueueTransportRepository.js');
@@ -1,2 +1,2 @@
1
- import { InMemoryQueueTransportRepository } from "./InMemoryQueueTransportRepository.mjs";
2
1
  import "./DidCommQueueTransportRepository.mjs";
2
+ import { InMemoryQueueTransportRepository } from "./InMemoryQueueTransportRepository.mjs";
@@ -4,15 +4,15 @@ const require_DidCommConnectionRole = require('../../modules/connections/models/
4
4
  const require_DidCommDidExchangeState = require('../../modules/connections/models/DidCommDidExchangeState.js');
5
5
  const require_DidCommConnectionState = require('../../modules/connections/models/DidCommConnectionState.js');
6
6
  const require_DidCommDidExchangeRole = require('../../modules/connections/models/DidCommDidExchangeRole.js');
7
- const require_DidCommConnectionInvitationMessage = require('../../modules/connections/messages/DidCommConnectionInvitationMessage.js');
8
- const require_DidCommOutOfBandState = require('../../modules/oob/domain/DidCommOutOfBandState.js');
9
- const require_DidCommConnectionRepository = require('../../modules/connections/repository/DidCommConnectionRepository.js');
10
7
  const require_helpers = require('../../modules/connections/services/helpers.js');
11
8
  const require_DidCommOutOfBandRole = require('../../modules/oob/domain/DidCommOutOfBandRole.js');
12
9
  const require_helpers$1 = require('../../modules/oob/helpers.js');
13
10
  const require_DidCommOutOfBandRecord = require('../../modules/oob/repository/DidCommOutOfBandRecord.js');
14
11
  const require_DidCommOutOfBandRepository = require('../../modules/oob/repository/DidCommOutOfBandRepository.js');
12
+ const require_DidCommOutOfBandState = require('../../modules/oob/domain/DidCommOutOfBandState.js');
15
13
  require('../../modules/oob/repository/index.js');
14
+ const require_DidCommConnectionInvitationMessage = require('../../modules/connections/messages/DidCommConnectionInvitationMessage.js');
15
+ const require_DidCommConnectionRepository = require('../../modules/connections/repository/DidCommConnectionRepository.js');
16
16
  require('../../modules/connections/index.js');
17
17
  const require_converters = require('../../modules/oob/converters.js');
18
18
  let __credo_ts_core = require("@credo-ts/core");
@@ -3,15 +3,15 @@ import { DidCommConnectionRole } from "../../modules/connections/models/DidCommC
3
3
  import { DidCommDidExchangeState } from "../../modules/connections/models/DidCommDidExchangeState.mjs";
4
4
  import { DidCommConnectionState } from "../../modules/connections/models/DidCommConnectionState.mjs";
5
5
  import { DidCommDidExchangeRole } from "../../modules/connections/models/DidCommDidExchangeRole.mjs";
6
- import { DidCommConnectionInvitationMessage } from "../../modules/connections/messages/DidCommConnectionInvitationMessage.mjs";
7
- import { DidCommOutOfBandState } from "../../modules/oob/domain/DidCommOutOfBandState.mjs";
8
- import { DidCommConnectionRepository } from "../../modules/connections/repository/DidCommConnectionRepository.mjs";
9
6
  import { convertToNewDidDocument } from "../../modules/connections/services/helpers.mjs";
10
7
  import { DidCommOutOfBandRole } from "../../modules/oob/domain/DidCommOutOfBandRole.mjs";
11
8
  import { outOfBandServiceToInlineKeysNumAlgo2Did } from "../../modules/oob/helpers.mjs";
12
9
  import { DidCommOutOfBandRecord } from "../../modules/oob/repository/DidCommOutOfBandRecord.mjs";
13
10
  import { DidCommOutOfBandRepository } from "../../modules/oob/repository/DidCommOutOfBandRepository.mjs";
11
+ import { DidCommOutOfBandState } from "../../modules/oob/domain/DidCommOutOfBandState.mjs";
14
12
  import "../../modules/oob/repository/index.mjs";
13
+ import { DidCommConnectionInvitationMessage } from "../../modules/connections/messages/DidCommConnectionInvitationMessage.mjs";
14
+ import { DidCommConnectionRepository } from "../../modules/connections/repository/DidCommConnectionRepository.mjs";
15
15
  import "../../modules/connections/index.mjs";
16
16
  import { convertToNewInvitation } from "../../modules/oob/converters.mjs";
17
17
  import { DidDocumentRole, DidKey, DidRecord, DidRecordMetadataKeys, DidRepository, JsonEncoder, JsonTransformer } from "@credo-ts/core";
@@ -1 +1 @@
1
- {"version":3,"file":"connection.mjs","names":["oobRecord: DidCommOutOfBandRecord | undefined"],"sources":["../../../src/updates/0.1-0.2/connection.ts"],"sourcesContent":["import type { BaseAgent, JsonObject } from '@credo-ts/core'\nimport type { DidCommConnectionRecord } from '../../modules/connections'\n\nimport {\n DidDocumentRole,\n DidKey,\n DidRecord,\n DidRecordMetadataKeys,\n DidRepository,\n JsonEncoder,\n JsonTransformer,\n} from '@credo-ts/core'\n\nimport {\n DidCommConnectionInvitationMessage,\n DidCommConnectionRepository,\n DidCommConnectionRole,\n DidCommConnectionState,\n DidCommDidExchangeRole,\n DidCommDidExchangeState,\n DidDoc,\n} from '../../modules/connections'\nimport { convertToNewDidDocument } from '../../modules/connections/services/helpers'\nimport { convertToNewInvitation } from '../../modules/oob/converters'\nimport { DidCommOutOfBandRole } from '../../modules/oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandState } from '../../modules/oob/domain/DidCommOutOfBandState'\nimport { outOfBandServiceToInlineKeysNumAlgo2Did } from '../../modules/oob/helpers'\nimport { DidCommOutOfBandRecord, DidCommOutOfBandRepository } from '../../modules/oob/repository'\n\n/**\n * Migrates the {@link DidCommConnectionRecord} to 0.2 compatible format. It fetches all records from storage\n * and applies the needed updates to the records. After a record has been transformed, it is updated\n * in storage and the next record will be transformed.\n *\n * The following transformations are applied:\n * - {@link updateConnectionRoleAndState}\n * - {@link extractDidDocument}\n * - {@link migrateToOobRecord}\n */\nexport async function migrateConnectionRecordToV0_2<Agent extends BaseAgent>(agent: Agent) {\n agent.config.logger.info('Migrating connection records to storage version 0.2')\n const connectionRepository = agent.dependencyManager.resolve(DidCommConnectionRepository)\n\n agent.config.logger.debug('Fetching all connection records from storage')\n const allConnections = await connectionRepository.getAll(agent.context)\n\n agent.config.logger.debug(`Found a total of ${allConnections.length} connection records to update.`)\n for (const connectionRecord of allConnections) {\n agent.config.logger.debug(`Migrating connection record with id ${connectionRecord.id} to storage version 0.2`)\n await updateConnectionRoleAndState(agent, connectionRecord)\n await extractDidDocument(agent, connectionRecord)\n\n // migration of oob record MUST run after extracting the did document as it relies on the updated did\n // it also MUST run after update the connection role and state as it assumes the values are\n // did exchange roles and states\n const _connectionRecord = await migrateToOobRecord(agent, connectionRecord)\n\n // migrateToOobRecord will return the connection record if it has not been deleted. When using multiUseInvitation the connection record\n // will be removed after processing, in which case the update method will throw an error.\n if (_connectionRecord) {\n await connectionRepository.update(agent.context, connectionRecord)\n }\n\n agent.config.logger.debug(\n `Successfully migrated connection record with id ${connectionRecord.id} to storage version 0.2`\n )\n }\n}\n\n/**\n * With the addition of the did exchange protocol there are now two states and roles related to the connection record; for the did exchange protocol and for the connection protocol.\n * To keep it easy to work with the connection record, all state and role values are updated to those of the {@link DidCommDidExchangeRole} and {@link DidCommDidExchangeState}.\n *\n * This migration method transforms all connection record state and role values to their respective values of the {@link DidCommDidExchangeRole} and {@link DidCommDidExchangeState}. For convenience a getter\n * property `rfc0160ConnectionState` is added to the connection record which returns the {@link DidCommConnectionState} value.\n *\n * The following 0.1.0 connection record structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"state\": \"invited\",\n * \"role\": \"inviter\"\n * }\n * ```\n *\n * Will be transformed into the following 0.2.0 structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"state\": \"invitation-sent\",\n * \"role\": \"responder\",\n * }\n * ```\n */\nexport async function updateConnectionRoleAndState<Agent extends BaseAgent>(\n agent: Agent,\n connectionRecord: DidCommConnectionRecord\n) {\n agent.config.logger.debug(\n `Extracting 'didDoc' and 'theirDidDoc' from connection record into separate DidRecord and updating unqualified dids to did:peer dids`\n )\n\n const oldState = connectionRecord.state\n const oldRole = connectionRecord.role\n\n const [didExchangeRole, didExchangeState] = didExchangeStateAndRoleFromRoleAndState(\n connectionRecord.role,\n connectionRecord.state\n )\n\n connectionRecord.role = didExchangeRole\n connectionRecord.state = didExchangeState\n\n agent.config.logger.debug(\n `Updated connection record state from ${oldState} to ${connectionRecord.state} and role from ${oldRole} to ${connectionRecord.role}`\n )\n}\n\n/**\n * The connection record previously stored both did documents from a connection in the connection record itself. Version 0.2.0 added a generic did storage that can be used for numerous usages, one of which\n * is the storage of did documents for connection records.\n *\n * This migration method extracts the did documents from the `didDoc` and `theirDidDoc` properties from the connection record, updates them to did documents compliant with the DID Core spec, and stores them\n * in the did repository. By doing so it also updates the unqualified dids in the `did` and `theirDid` fields generated by the indy-sdk to fully qualified `did:peer` dids compliant with\n * the [Peer DID Method Specification](https://identity.foundation/peer-did-method-spec/).\n *\n * To account for the fact that the mechanism to migrate legacy did document to peer did documents is not defined yet, the legacy did and did document are stored in the did record metadata.\n * This will be deleted later if we can be certain the did doc conversion to a did:peer did document is correct.\n *\n * The following 0.1.0 connection record structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"did\": \"BBPoJqRKatdcfLEAFL7exC\",\n * \"theirDid\": \"N8NQHLtCKfPmWMgCSdfa7h\",\n * \"didDoc\": <legacyDidDoc>,\n * \"theirDidDoc\": <legacyTheirDidDoc>,\n * \"verkey\": \"GjZWsBLgZCR18aL468JAT7w9CZRiBnpxUPPgyQxh4voa\"\n * }\n * ```\n *\n * Will be transformed into the following 0.2.0 structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"did\": \"did:peer:1zQmXUaPPhPCbUVZ3hGYmQmGxWTwyDfhqESXCpMFhKaF9Y2A\",\n * \"theirDid\": \"did:peer:1zQmZMygzYqNwU6Uhmewx5Xepf2VLp5S4HLSwwgf2aiKZuwa\"\n * }\n * ```\n */\nexport async function extractDidDocument<Agent extends BaseAgent>(\n agent: Agent,\n connectionRecord: DidCommConnectionRecord\n) {\n agent.config.logger.debug(\n `Extracting 'didDoc' and 'theirDidDoc' from connection record into separate DidRecord and updating unqualified dids to did:peer dids`\n )\n\n const didRepository = agent.dependencyManager.resolve(DidRepository)\n\n const untypedConnectionRecord = connectionRecord as unknown as JsonObject\n const oldOurDidDocJson = untypedConnectionRecord.didDoc as JsonObject | undefined\n const oldTheirDidDocJson = untypedConnectionRecord.theirDidDoc as JsonObject | undefined\n\n if (oldOurDidDocJson) {\n const oldOurDidDoc = JsonTransformer.fromJSON(oldOurDidDocJson, DidDoc)\n\n agent.config.logger.debug(\n `Found a legacy did document for did ${oldOurDidDoc.id} in connection record didDoc. Converting it to a peer did document.`\n )\n\n const { didDocument: newOurDidDocument } = convertToNewDidDocument(oldOurDidDoc)\n\n // Maybe we already have a record for this did because the migration failed previously\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. As this is the update from 0.1 to 0.2,\n // the `id` property of the record is still the did here.\n let ourDidRecord = await didRepository.findById(agent.context, newOurDidDocument.id)\n\n if (!ourDidRecord) {\n agent.config.logger.debug(`Creating did record for our did ${newOurDidDocument.id}`)\n ourDidRecord = new DidRecord({\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. Here we make the id and did property both the did.\n // In the 0.3.0 update the `id` property will be updated to an uuid.\n id: newOurDidDocument.id,\n did: newOurDidDocument.id,\n role: DidDocumentRole.Created,\n didDocument: newOurDidDocument,\n createdAt: connectionRecord.createdAt,\n })\n\n ourDidRecord.metadata.set(DidRecordMetadataKeys.LegacyDid, {\n unqualifiedDid: oldOurDidDoc.id,\n didDocumentString: JsonEncoder.toString(oldOurDidDocJson),\n })\n\n await didRepository.save(agent.context, ourDidRecord)\n\n agent.config.logger.debug(`Successfully saved did record for did ${newOurDidDocument.id}`)\n } else {\n agent.config.logger.debug(`Found existing did record for did ${newOurDidDocument.id}, not creating did record.`)\n }\n\n agent.config.logger.debug('Deleting old did document from connection record and storing new did:peer did')\n // Remove didDoc and assign the new did:peer did to did\n // biome-ignore lint/performance/noDelete: <explanation>\n delete untypedConnectionRecord.didDoc\n connectionRecord.did = newOurDidDocument.id\n } else {\n agent.config.logger.debug(\n 'Did not find a did document in connection record didDoc. Not converting it to a peer did document.'\n )\n }\n\n if (oldTheirDidDocJson) {\n const oldTheirDidDoc = JsonTransformer.fromJSON(oldTheirDidDocJson, DidDoc)\n\n agent.config.logger.debug(\n `Found a legacy did document for theirDid ${oldTheirDidDoc.id} in connection record theirDidDoc. Converting it to a peer did document.`\n )\n\n const { didDocument: newTheirDidDocument } = convertToNewDidDocument(oldTheirDidDoc)\n\n // Maybe we already have a record for this did because the migration failed previously\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. As this is the update from 0.1 to 0.2,\n // the `id` property of the record is still the did here.\n let theirDidRecord = await didRepository.findById(agent.context, newTheirDidDocument.id)\n\n if (!theirDidRecord) {\n agent.config.logger.debug(`Creating did record for theirDid ${newTheirDidDocument.id}`)\n\n theirDidRecord = new DidRecord({\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. Here we make the id and did property both the did.\n // In the 0.3.0 update the `id` property will be updated to an uuid.\n id: newTheirDidDocument.id,\n did: newTheirDidDocument.id,\n role: DidDocumentRole.Received,\n didDocument: newTheirDidDocument,\n createdAt: connectionRecord.createdAt,\n })\n\n theirDidRecord.metadata.set(DidRecordMetadataKeys.LegacyDid, {\n unqualifiedDid: oldTheirDidDoc.id,\n didDocumentString: JsonEncoder.toString(oldTheirDidDocJson),\n })\n\n await didRepository.save(agent.context, theirDidRecord)\n\n agent.config.logger.debug(`Successfully saved did record for theirDid ${newTheirDidDocument.id}`)\n } else {\n agent.config.logger.debug(\n `Found existing did record for theirDid ${newTheirDidDocument.id}, not creating did record.`\n )\n }\n\n agent.config.logger.debug('Deleting old theirDidDoc from connection record and storing new did:peer theirDid')\n // Remove theirDidDoc and assign the new did:peer did to theirDid\n // biome-ignore lint/performance/noDelete: <explanation>\n delete untypedConnectionRecord.theirDidDoc\n connectionRecord.theirDid = newTheirDidDocument.id\n } else {\n agent.config.logger.debug(\n 'Did not find a did document in connection record theirDidDoc. Not converting it to a peer did document.'\n )\n }\n\n // Delete legacy verkey property\n // biome-ignore lint/performance/noDelete: <explanation>\n delete untypedConnectionRecord.verkey\n}\n\n/**\n * With the addition of the out of band protocol, invitations are now stored in the {@link DidCommOutOfBandRecord}. In addition a new field `invitationDid` is added to the connection record that\n * is generated based on the invitation service or did. This allows to reuse existing connections.\n *\n * This migration method extracts the invitation and other relevant data into a separate {@link DidCommOutOfBandRecord}. By doing so it converts the old connection protocol invitation into the new\n * Out of band invitation message. Based on the service or did of the invitation, the `invitationDid` is populated.\n *\n * Previously when creating a multi use invitation, a connection record would be created with the `multiUseInvitation` set to true. The connection record would always be in state `invited`.\n * If a request for the multi use invitation came in, a new connection record would be created. With the addition of the out of band module, no connection records are created until a request\n * is received. So for multi use invitation this means that the connection record with multiUseInvitation=true will be deleted, and instead all connections created using that out of band invitation\n * will contain the `outOfBandId` of the multi use invitation.\n *\n * The following 0.1.0 connection record structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"invitation\": {\n * \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n * \"@id\": \"04a2c382-999e-4de9-a1d2-9dec0b2fa5e4\",\n * \"recipientKeys\": [\"E6D1m3eERqCueX4ZgMCY14B4NceAr6XP2HyVqt55gDhu\"],\n * \"serviceEndpoint\": \"https://example.com\",\n * \"label\": \"test\",\n * },\n * \"multiUseInvitation\": false\n * }\n * ```\n *\n * Will be transformed into the following 0.2.0 structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"invitationDid\": \"did:peer:2.Ez6MksYU4MHtfmNhNm1uGMvANr9j4CBv2FymjiJtRgA36bSVH.SeyJzIjoiaHR0cHM6Ly9leGFtcGxlLmNvbSJ9\",\n * \"outOfBandId\": \"04a2c382-999e-4de9-a1d2-9dec0b2fa5e4\"\n * }\n * ```\n */\nexport async function migrateToOobRecord<Agent extends BaseAgent>(\n agent: Agent,\n connectionRecord: DidCommConnectionRecord\n): Promise<DidCommConnectionRecord | undefined> {\n agent.config.logger.debug(\n `Migrating properties from connection record with id ${connectionRecord.id} to out of band record`\n )\n\n const oobRepository = agent.dependencyManager.resolve(DidCommOutOfBandRepository)\n const connectionRepository = agent.dependencyManager.resolve(DidCommConnectionRepository)\n\n const untypedConnectionRecord = connectionRecord as unknown as JsonObject\n const oldInvitationJson = untypedConnectionRecord.invitation as JsonObject | undefined\n const oldMultiUseInvitation = untypedConnectionRecord.multiUseInvitation as boolean | undefined\n\n // Only migrate if there is an invitation stored\n if (oldInvitationJson) {\n const oldInvitation = JsonTransformer.fromJSON(oldInvitationJson, DidCommConnectionInvitationMessage)\n\n agent.config.logger.debug('Found a legacy invitation in connection record. Migrating it to an out of band record.')\n\n const outOfBandInvitation = convertToNewInvitation(oldInvitation)\n\n // If both the recipientKeys, the @id and the role match we assume the connection was created using the same invitation.\n const recipientKeyFingerprints = outOfBandInvitation\n .getInlineServices()\n .map((s) => s.recipientKeys)\n // biome-ignore lint/performance/noAccumulatingSpread: <explanation>\n .reduce((acc, curr) => [...acc, ...curr], [])\n .map((didKey) => DidKey.fromDid(didKey).publicJwk.fingerprint)\n\n const oobRole =\n connectionRecord.role === DidCommDidExchangeRole.Responder\n ? DidCommOutOfBandRole.Sender\n : DidCommOutOfBandRole.Receiver\n const oobRecords = await oobRepository.findByQuery(agent.context, {\n invitationId: oldInvitation.id,\n recipientKeyFingerprints,\n role: oobRole,\n })\n\n let oobRecord: DidCommOutOfBandRecord | undefined = oobRecords[0]\n\n if (!oobRecord) {\n agent.config.logger.debug('Create out of band record.')\n\n const connectionRole = connectionRecord.role as DidCommDidExchangeRole\n const connectionState = connectionRecord.state as DidCommDidExchangeState\n const oobState = oobStateFromDidExchangeRoleAndState(connectionRole, connectionState)\n\n oobRecord = new DidCommOutOfBandRecord({\n role: oobRole,\n state: oobState,\n alias: connectionRecord.alias,\n autoAcceptConnection: connectionRecord.autoAcceptConnection,\n outOfBandInvitation,\n reusable: oldMultiUseInvitation,\n mediatorId: connectionRecord.mediatorId,\n createdAt: connectionRecord.createdAt,\n tags: { recipientKeyFingerprints },\n })\n\n await oobRepository.save(agent.context, oobRecord)\n agent.config.logger.debug(`Successfully saved out of band record for invitation @id ${oldInvitation.id}`)\n } else {\n agent.config.logger.debug(\n `Found existing out of band record for invitation @id ${oldInvitation.id} and did ${connectionRecord.did}, not creating a new out of band record.`\n )\n }\n\n // We need to update the oob record with the reusable data. We don't know initially if an oob record is reusable or not, as there can be 1..n connections for each invitation\n // only when we find the multiUseInvitation we can update it.\n if (oldMultiUseInvitation) {\n oobRecord.reusable = true\n oobRecord.state = DidCommOutOfBandState.AwaitResponse\n oobRecord.mediatorId = connectionRecord.mediatorId\n oobRecord.autoAcceptConnection = connectionRecord.autoAcceptConnection\n\n await oobRepository.update(agent.context, oobRecord)\n await connectionRepository.delete(agent.context, connectionRecord)\n agent.config.logger.debug(\n `Set reusable=true for out of band record with invitation @id ${oobRecord.outOfBandInvitation.id} and role ${oobRole}.`\n )\n\n return\n }\n\n agent.config.logger.debug('Setting invitationDid and outOfBand Id, and removing invitation from connection record')\n // All connections have been made using the connection protocol, which means we can be certain\n // that there was only one service, thus we can use the first oob message service\n // Note: since this is an update from 0.1 to 0.2, we use former way of calculating numAlgo2Dids\n const [invitationDid] = [\n ...oobRecord.outOfBandInvitation.getDidServices(),\n ...oobRecord.outOfBandInvitation.getInlineServices().map(outOfBandServiceToInlineKeysNumAlgo2Did),\n ]\n connectionRecord.invitationDid = invitationDid\n\n // Remove invitation and assign the oob id to the connection record\n // biome-ignore lint/performance/noDelete: <explanation>\n delete untypedConnectionRecord.invitation\n connectionRecord.outOfBandId = oobRecord.id\n }\n\n agent.config.logger.debug('Removing multiUseInvitation property from connection record')\n // multiUseInvitation is now stored as reusable in the out of band record\n // biome-ignore lint/performance/noDelete: <explanation>\n delete untypedConnectionRecord.multiUseInvitation\n\n return connectionRecord\n}\n\n/**\n * Determine the out of band state based on the did exchange role and state.\n */\nexport function oobStateFromDidExchangeRoleAndState(role: DidCommDidExchangeRole, state: DidCommDidExchangeState) {\n const stateMapping = {\n [DidCommDidExchangeState.InvitationReceived]: DidCommOutOfBandState.PrepareResponse,\n [DidCommDidExchangeState.InvitationSent]: DidCommOutOfBandState.AwaitResponse,\n\n [DidCommDidExchangeState.RequestReceived]: DidCommOutOfBandState.Done,\n [DidCommDidExchangeState.RequestSent]: DidCommOutOfBandState.Done,\n\n [DidCommDidExchangeState.ResponseReceived]: DidCommOutOfBandState.Done,\n [DidCommDidExchangeState.ResponseSent]: DidCommOutOfBandState.Done,\n\n [DidCommDidExchangeState.Completed]: DidCommOutOfBandState.Done,\n [DidCommDidExchangeState.Abandoned]: DidCommOutOfBandState.Done,\n }\n\n if (state === DidCommDidExchangeState.Start) {\n return role === DidCommDidExchangeRole.Requester\n ? DidCommOutOfBandState.PrepareResponse\n : DidCommOutOfBandState.AwaitResponse\n }\n\n return stateMapping[state]\n}\n\n/**\n * Determine the did exchange state based on the connection/did-exchange role and state.\n */\nexport function didExchangeStateAndRoleFromRoleAndState(\n role: DidCommConnectionRole | DidCommDidExchangeRole,\n state: DidCommConnectionState | DidCommDidExchangeState\n): [DidCommDidExchangeRole, DidCommDidExchangeState] {\n const roleMapping = {\n // Responder / Inviter\n [DidCommDidExchangeRole.Responder]: DidCommDidExchangeRole.Responder,\n [DidCommConnectionRole.Inviter]: DidCommDidExchangeRole.Responder,\n\n // Request / Invitee\n [DidCommDidExchangeRole.Requester]: DidCommDidExchangeRole.Requester,\n [DidCommConnectionRole.Invitee]: DidCommDidExchangeRole.Requester,\n }\n\n const roleStateMapping = {\n [DidCommDidExchangeRole.Requester]: {\n // DidCommDidExchangeRole.Requester\n [DidCommConnectionState.Invited]: DidCommDidExchangeState.InvitationReceived,\n [DidCommConnectionState.Requested]: DidCommDidExchangeState.RequestSent,\n [DidCommConnectionState.Responded]: DidCommDidExchangeState.ResponseReceived,\n [DidCommConnectionState.Complete]: DidCommDidExchangeState.Completed,\n [DidCommConnectionState.Null]: DidCommDidExchangeState.Start,\n },\n [DidCommDidExchangeRole.Responder]: {\n // DidCommDidExchangeRole.Responder\n [DidCommConnectionState.Invited]: DidCommDidExchangeState.InvitationSent,\n [DidCommConnectionState.Requested]: DidCommDidExchangeState.RequestReceived,\n [DidCommConnectionState.Responded]: DidCommDidExchangeState.ResponseSent,\n [DidCommConnectionState.Complete]: DidCommDidExchangeState.Completed,\n [DidCommConnectionState.Null]: DidCommDidExchangeState.Start,\n },\n }\n\n // Map the role to did exchange role. Can handle did exchange roles to make the function re-runnable\n const didExchangeRole = roleMapping[role]\n\n // Take into account possibility that the record state was already updated to\n // didExchange state and roles. This makes the script re-runnable and\n // adds some resiliency to the script.\n const stateMapping = roleStateMapping[didExchangeRole]\n\n // Check if state is a valid connection state\n if (isConnectionState(state)) {\n return [didExchangeRole, stateMapping[state]]\n }\n\n // If state is not a valid state we assume the state is already a did exchange state\n return [didExchangeRole, state]\n}\n\nfunction isConnectionState(state: string): state is DidCommConnectionState {\n return Object.values(DidCommConnectionState).includes(state as DidCommConnectionState)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,eAAsB,8BAAuD,OAAc;AACzF,OAAM,OAAO,OAAO,KAAK,sDAAsD;C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GAE/D,wBAAwB,kBAAkB,sBAAsB;GAChE,wBAAwB,cAAc,sBAAsB;GAE5D,wBAAwB,mBAAmB,sBAAsB;GACjE,wBAAwB,eAAe,sBAAsB;GAE7D,wBAAwB,YAAY,sBAAsB;GAC1D,wBAAwB,YAAY,sBAAsB;EAC5D;AAED,KAAI,UAAU,wBAAwB,MACpC,QAAO,SAAS,uBAAuB,YACnC,sBAAsB,kBACtB,sBAAsB;AAG5B,QAAO,aAAa;;;;;AAMtB,SAAgB,wCACd,MACA,OACmD;CACnD,MAAM,cAAc;GAEjB,uBAAuB,YAAY,uBAAuB;GAC1D,sBAAsB,UAAU,uBAAuB;GAGvD,uBAAuB,YAAY,uBAAuB;GAC1D,sBAAsB,UAAU,uBAAuB;EACzD;CAED,MAAM,mBAAmB;GACtB,uBAAuB,YAAY;IAEjC,uBAAuB,UAAU,wBAAwB;IACzD,uBAAuB,YAAY,wBAAwB;IAC3D,uBAAuB,YAAY,wBAAwB;IAC3D,uBAAuB,WAAW,wBAAwB;IAC1D,uBAAuB,OAAO,wBAAwB;GACxD;GACA,uBAAuB,YAAY;IAEjC,uBAAuB,UAAU,wBAAwB;IACzD,uBAAuB,YAAY,wBAAwB;IAC3D,uBAAuB,YAAY,wBAAwB;IAC3D,uBAAuB,WAAW,wBAAwB;IAC1D,uBAAuB,OAAO,wBAAwB;GACxD;EACF;CAGD,MAAM,kBAAkB,YAAY;CAKpC,MAAM,eAAe,iBAAiB;AAGtC,KAAI,kBAAkB,MAAM,CAC1B,QAAO,CAAC,iBAAiB,aAAa,OAAO;AAI/C,QAAO,CAAC,iBAAiB,MAAM;;AAGjC,SAAS,kBAAkB,OAAgD;AACzE,QAAO,OAAO,OAAO,uBAAuB,CAAC,SAAS,MAAgC"}
1
+ {"version":3,"file":"connection.mjs","names":["oobRecord: DidCommOutOfBandRecord | undefined"],"sources":["../../../src/updates/0.1-0.2/connection.ts"],"sourcesContent":["import type { BaseAgent, JsonObject } from '@credo-ts/core'\nimport {\n DidDocumentRole,\n DidKey,\n DidRecord,\n DidRecordMetadataKeys,\n DidRepository,\n JsonEncoder,\n JsonTransformer,\n} from '@credo-ts/core'\nimport type { DidCommConnectionRecord } from '../../modules/connections'\n\nimport {\n DidCommConnectionInvitationMessage,\n DidCommConnectionRepository,\n DidCommConnectionRole,\n DidCommConnectionState,\n DidCommDidExchangeRole,\n DidCommDidExchangeState,\n DidDoc,\n} from '../../modules/connections'\nimport { convertToNewDidDocument } from '../../modules/connections/services/helpers'\nimport { convertToNewInvitation } from '../../modules/oob/converters'\nimport { DidCommOutOfBandRole } from '../../modules/oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandState } from '../../modules/oob/domain/DidCommOutOfBandState'\nimport { outOfBandServiceToInlineKeysNumAlgo2Did } from '../../modules/oob/helpers'\nimport { DidCommOutOfBandRecord, DidCommOutOfBandRepository } from '../../modules/oob/repository'\n\n/**\n * Migrates the {@link DidCommConnectionRecord} to 0.2 compatible format. It fetches all records from storage\n * and applies the needed updates to the records. After a record has been transformed, it is updated\n * in storage and the next record will be transformed.\n *\n * The following transformations are applied:\n * - {@link updateConnectionRoleAndState}\n * - {@link extractDidDocument}\n * - {@link migrateToOobRecord}\n */\nexport async function migrateConnectionRecordToV0_2<Agent extends BaseAgent>(agent: Agent) {\n agent.config.logger.info('Migrating connection records to storage version 0.2')\n const connectionRepository = agent.dependencyManager.resolve(DidCommConnectionRepository)\n\n agent.config.logger.debug('Fetching all connection records from storage')\n const allConnections = await connectionRepository.getAll(agent.context)\n\n agent.config.logger.debug(`Found a total of ${allConnections.length} connection records to update.`)\n for (const connectionRecord of allConnections) {\n agent.config.logger.debug(`Migrating connection record with id ${connectionRecord.id} to storage version 0.2`)\n await updateConnectionRoleAndState(agent, connectionRecord)\n await extractDidDocument(agent, connectionRecord)\n\n // migration of oob record MUST run after extracting the did document as it relies on the updated did\n // it also MUST run after update the connection role and state as it assumes the values are\n // did exchange roles and states\n const _connectionRecord = await migrateToOobRecord(agent, connectionRecord)\n\n // migrateToOobRecord will return the connection record if it has not been deleted. When using multiUseInvitation the connection record\n // will be removed after processing, in which case the update method will throw an error.\n if (_connectionRecord) {\n await connectionRepository.update(agent.context, connectionRecord)\n }\n\n agent.config.logger.debug(\n `Successfully migrated connection record with id ${connectionRecord.id} to storage version 0.2`\n )\n }\n}\n\n/**\n * With the addition of the did exchange protocol there are now two states and roles related to the connection record; for the did exchange protocol and for the connection protocol.\n * To keep it easy to work with the connection record, all state and role values are updated to those of the {@link DidCommDidExchangeRole} and {@link DidCommDidExchangeState}.\n *\n * This migration method transforms all connection record state and role values to their respective values of the {@link DidCommDidExchangeRole} and {@link DidCommDidExchangeState}. For convenience a getter\n * property `rfc0160ConnectionState` is added to the connection record which returns the {@link DidCommConnectionState} value.\n *\n * The following 0.1.0 connection record structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"state\": \"invited\",\n * \"role\": \"inviter\"\n * }\n * ```\n *\n * Will be transformed into the following 0.2.0 structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"state\": \"invitation-sent\",\n * \"role\": \"responder\",\n * }\n * ```\n */\nexport async function updateConnectionRoleAndState<Agent extends BaseAgent>(\n agent: Agent,\n connectionRecord: DidCommConnectionRecord\n) {\n agent.config.logger.debug(\n `Extracting 'didDoc' and 'theirDidDoc' from connection record into separate DidRecord and updating unqualified dids to did:peer dids`\n )\n\n const oldState = connectionRecord.state\n const oldRole = connectionRecord.role\n\n const [didExchangeRole, didExchangeState] = didExchangeStateAndRoleFromRoleAndState(\n connectionRecord.role,\n connectionRecord.state\n )\n\n connectionRecord.role = didExchangeRole\n connectionRecord.state = didExchangeState\n\n agent.config.logger.debug(\n `Updated connection record state from ${oldState} to ${connectionRecord.state} and role from ${oldRole} to ${connectionRecord.role}`\n )\n}\n\n/**\n * The connection record previously stored both did documents from a connection in the connection record itself. Version 0.2.0 added a generic did storage that can be used for numerous usages, one of which\n * is the storage of did documents for connection records.\n *\n * This migration method extracts the did documents from the `didDoc` and `theirDidDoc` properties from the connection record, updates them to did documents compliant with the DID Core spec, and stores them\n * in the did repository. By doing so it also updates the unqualified dids in the `did` and `theirDid` fields generated by the indy-sdk to fully qualified `did:peer` dids compliant with\n * the [Peer DID Method Specification](https://identity.foundation/peer-did-method-spec/).\n *\n * To account for the fact that the mechanism to migrate legacy did document to peer did documents is not defined yet, the legacy did and did document are stored in the did record metadata.\n * This will be deleted later if we can be certain the did doc conversion to a did:peer did document is correct.\n *\n * The following 0.1.0 connection record structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"did\": \"BBPoJqRKatdcfLEAFL7exC\",\n * \"theirDid\": \"N8NQHLtCKfPmWMgCSdfa7h\",\n * \"didDoc\": <legacyDidDoc>,\n * \"theirDidDoc\": <legacyTheirDidDoc>,\n * \"verkey\": \"GjZWsBLgZCR18aL468JAT7w9CZRiBnpxUPPgyQxh4voa\"\n * }\n * ```\n *\n * Will be transformed into the following 0.2.0 structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"did\": \"did:peer:1zQmXUaPPhPCbUVZ3hGYmQmGxWTwyDfhqESXCpMFhKaF9Y2A\",\n * \"theirDid\": \"did:peer:1zQmZMygzYqNwU6Uhmewx5Xepf2VLp5S4HLSwwgf2aiKZuwa\"\n * }\n * ```\n */\nexport async function extractDidDocument<Agent extends BaseAgent>(\n agent: Agent,\n connectionRecord: DidCommConnectionRecord\n) {\n agent.config.logger.debug(\n `Extracting 'didDoc' and 'theirDidDoc' from connection record into separate DidRecord and updating unqualified dids to did:peer dids`\n )\n\n const didRepository = agent.dependencyManager.resolve(DidRepository)\n\n const untypedConnectionRecord = connectionRecord as unknown as JsonObject\n const oldOurDidDocJson = untypedConnectionRecord.didDoc as JsonObject | undefined\n const oldTheirDidDocJson = untypedConnectionRecord.theirDidDoc as JsonObject | undefined\n\n if (oldOurDidDocJson) {\n const oldOurDidDoc = JsonTransformer.fromJSON(oldOurDidDocJson, DidDoc)\n\n agent.config.logger.debug(\n `Found a legacy did document for did ${oldOurDidDoc.id} in connection record didDoc. Converting it to a peer did document.`\n )\n\n const { didDocument: newOurDidDocument } = convertToNewDidDocument(oldOurDidDoc)\n\n // Maybe we already have a record for this did because the migration failed previously\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. As this is the update from 0.1 to 0.2,\n // the `id` property of the record is still the did here.\n let ourDidRecord = await didRepository.findById(agent.context, newOurDidDocument.id)\n\n if (!ourDidRecord) {\n agent.config.logger.debug(`Creating did record for our did ${newOurDidDocument.id}`)\n ourDidRecord = new DidRecord({\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. Here we make the id and did property both the did.\n // In the 0.3.0 update the `id` property will be updated to an uuid.\n id: newOurDidDocument.id,\n did: newOurDidDocument.id,\n role: DidDocumentRole.Created,\n didDocument: newOurDidDocument,\n createdAt: connectionRecord.createdAt,\n })\n\n ourDidRecord.metadata.set(DidRecordMetadataKeys.LegacyDid, {\n unqualifiedDid: oldOurDidDoc.id,\n didDocumentString: JsonEncoder.toString(oldOurDidDocJson),\n })\n\n await didRepository.save(agent.context, ourDidRecord)\n\n agent.config.logger.debug(`Successfully saved did record for did ${newOurDidDocument.id}`)\n } else {\n agent.config.logger.debug(`Found existing did record for did ${newOurDidDocument.id}, not creating did record.`)\n }\n\n agent.config.logger.debug('Deleting old did document from connection record and storing new did:peer did')\n // Remove didDoc and assign the new did:peer did to did\n // biome-ignore lint/performance/noDelete: no explanation\n delete untypedConnectionRecord.didDoc\n connectionRecord.did = newOurDidDocument.id\n } else {\n agent.config.logger.debug(\n 'Did not find a did document in connection record didDoc. Not converting it to a peer did document.'\n )\n }\n\n if (oldTheirDidDocJson) {\n const oldTheirDidDoc = JsonTransformer.fromJSON(oldTheirDidDocJson, DidDoc)\n\n agent.config.logger.debug(\n `Found a legacy did document for theirDid ${oldTheirDidDoc.id} in connection record theirDidDoc. Converting it to a peer did document.`\n )\n\n const { didDocument: newTheirDidDocument } = convertToNewDidDocument(oldTheirDidDoc)\n\n // Maybe we already have a record for this did because the migration failed previously\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. As this is the update from 0.1 to 0.2,\n // the `id` property of the record is still the did here.\n let theirDidRecord = await didRepository.findById(agent.context, newTheirDidDocument.id)\n\n if (!theirDidRecord) {\n agent.config.logger.debug(`Creating did record for theirDid ${newTheirDidDocument.id}`)\n\n theirDidRecord = new DidRecord({\n // NOTE: in 0.3.0 the id property was updated to be a uuid, and a new did property was added. Here we make the id and did property both the did.\n // In the 0.3.0 update the `id` property will be updated to an uuid.\n id: newTheirDidDocument.id,\n did: newTheirDidDocument.id,\n role: DidDocumentRole.Received,\n didDocument: newTheirDidDocument,\n createdAt: connectionRecord.createdAt,\n })\n\n theirDidRecord.metadata.set(DidRecordMetadataKeys.LegacyDid, {\n unqualifiedDid: oldTheirDidDoc.id,\n didDocumentString: JsonEncoder.toString(oldTheirDidDocJson),\n })\n\n await didRepository.save(agent.context, theirDidRecord)\n\n agent.config.logger.debug(`Successfully saved did record for theirDid ${newTheirDidDocument.id}`)\n } else {\n agent.config.logger.debug(\n `Found existing did record for theirDid ${newTheirDidDocument.id}, not creating did record.`\n )\n }\n\n agent.config.logger.debug('Deleting old theirDidDoc from connection record and storing new did:peer theirDid')\n // Remove theirDidDoc and assign the new did:peer did to theirDid\n // biome-ignore lint/performance/noDelete: no explanation\n delete untypedConnectionRecord.theirDidDoc\n connectionRecord.theirDid = newTheirDidDocument.id\n } else {\n agent.config.logger.debug(\n 'Did not find a did document in connection record theirDidDoc. Not converting it to a peer did document.'\n )\n }\n\n // Delete legacy verkey property\n // biome-ignore lint/performance/noDelete: no explanation\n delete untypedConnectionRecord.verkey\n}\n\n/**\n * With the addition of the out of band protocol, invitations are now stored in the {@link DidCommOutOfBandRecord}. In addition a new field `invitationDid` is added to the connection record that\n * is generated based on the invitation service or did. This allows to reuse existing connections.\n *\n * This migration method extracts the invitation and other relevant data into a separate {@link DidCommOutOfBandRecord}. By doing so it converts the old connection protocol invitation into the new\n * Out of band invitation message. Based on the service or did of the invitation, the `invitationDid` is populated.\n *\n * Previously when creating a multi use invitation, a connection record would be created with the `multiUseInvitation` set to true. The connection record would always be in state `invited`.\n * If a request for the multi use invitation came in, a new connection record would be created. With the addition of the out of band module, no connection records are created until a request\n * is received. So for multi use invitation this means that the connection record with multiUseInvitation=true will be deleted, and instead all connections created using that out of band invitation\n * will contain the `outOfBandId` of the multi use invitation.\n *\n * The following 0.1.0 connection record structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"invitation\": {\n * \"@type\": \"https://didcomm.org/connections/1.0/invitation\",\n * \"@id\": \"04a2c382-999e-4de9-a1d2-9dec0b2fa5e4\",\n * \"recipientKeys\": [\"E6D1m3eERqCueX4ZgMCY14B4NceAr6XP2HyVqt55gDhu\"],\n * \"serviceEndpoint\": \"https://example.com\",\n * \"label\": \"test\",\n * },\n * \"multiUseInvitation\": false\n * }\n * ```\n *\n * Will be transformed into the following 0.2.0 structure (unrelated keys omitted):\n *\n * ```json\n * {\n * \"invitationDid\": \"did:peer:2.Ez6MksYU4MHtfmNhNm1uGMvANr9j4CBv2FymjiJtRgA36bSVH.SeyJzIjoiaHR0cHM6Ly9leGFtcGxlLmNvbSJ9\",\n * \"outOfBandId\": \"04a2c382-999e-4de9-a1d2-9dec0b2fa5e4\"\n * }\n * ```\n */\nexport async function migrateToOobRecord<Agent extends BaseAgent>(\n agent: Agent,\n connectionRecord: DidCommConnectionRecord\n): Promise<DidCommConnectionRecord | undefined> {\n agent.config.logger.debug(\n `Migrating properties from connection record with id ${connectionRecord.id} to out of band record`\n )\n\n const oobRepository = agent.dependencyManager.resolve(DidCommOutOfBandRepository)\n const connectionRepository = agent.dependencyManager.resolve(DidCommConnectionRepository)\n\n const untypedConnectionRecord = connectionRecord as unknown as JsonObject\n const oldInvitationJson = untypedConnectionRecord.invitation as JsonObject | undefined\n const oldMultiUseInvitation = untypedConnectionRecord.multiUseInvitation as boolean | undefined\n\n // Only migrate if there is an invitation stored\n if (oldInvitationJson) {\n const oldInvitation = JsonTransformer.fromJSON(oldInvitationJson, DidCommConnectionInvitationMessage)\n\n agent.config.logger.debug('Found a legacy invitation in connection record. Migrating it to an out of band record.')\n\n const outOfBandInvitation = convertToNewInvitation(oldInvitation)\n\n // If both the recipientKeys, the @id and the role match we assume the connection was created using the same invitation.\n const recipientKeyFingerprints = outOfBandInvitation\n .getInlineServices()\n .map((s) => s.recipientKeys)\n // biome-ignore lint/performance/noAccumulatingSpread: no explanation\n .reduce((acc, curr) => [...acc, ...curr], [])\n .map((didKey) => DidKey.fromDid(didKey).publicJwk.fingerprint)\n\n const oobRole =\n connectionRecord.role === DidCommDidExchangeRole.Responder\n ? DidCommOutOfBandRole.Sender\n : DidCommOutOfBandRole.Receiver\n const oobRecords = await oobRepository.findByQuery(agent.context, {\n invitationId: oldInvitation.id,\n recipientKeyFingerprints,\n role: oobRole,\n })\n\n let oobRecord: DidCommOutOfBandRecord | undefined = oobRecords[0]\n\n if (!oobRecord) {\n agent.config.logger.debug('Create out of band record.')\n\n const connectionRole = connectionRecord.role as DidCommDidExchangeRole\n const connectionState = connectionRecord.state as DidCommDidExchangeState\n const oobState = oobStateFromDidExchangeRoleAndState(connectionRole, connectionState)\n\n oobRecord = new DidCommOutOfBandRecord({\n role: oobRole,\n state: oobState,\n alias: connectionRecord.alias,\n autoAcceptConnection: connectionRecord.autoAcceptConnection,\n outOfBandInvitation,\n reusable: oldMultiUseInvitation,\n mediatorId: connectionRecord.mediatorId,\n createdAt: connectionRecord.createdAt,\n tags: { recipientKeyFingerprints },\n })\n\n await oobRepository.save(agent.context, oobRecord)\n agent.config.logger.debug(`Successfully saved out of band record for invitation @id ${oldInvitation.id}`)\n } else {\n agent.config.logger.debug(\n `Found existing out of band record for invitation @id ${oldInvitation.id} and did ${connectionRecord.did}, not creating a new out of band record.`\n )\n }\n\n // We need to update the oob record with the reusable data. We don't know initially if an oob record is reusable or not, as there can be 1..n connections for each invitation\n // only when we find the multiUseInvitation we can update it.\n if (oldMultiUseInvitation) {\n oobRecord.reusable = true\n oobRecord.state = DidCommOutOfBandState.AwaitResponse\n oobRecord.mediatorId = connectionRecord.mediatorId\n oobRecord.autoAcceptConnection = connectionRecord.autoAcceptConnection\n\n await oobRepository.update(agent.context, oobRecord)\n await connectionRepository.delete(agent.context, connectionRecord)\n agent.config.logger.debug(\n `Set reusable=true for out of band record with invitation @id ${oobRecord.outOfBandInvitation.id} and role ${oobRole}.`\n )\n\n return\n }\n\n agent.config.logger.debug('Setting invitationDid and outOfBand Id, and removing invitation from connection record')\n // All connections have been made using the connection protocol, which means we can be certain\n // that there was only one service, thus we can use the first oob message service\n // Note: since this is an update from 0.1 to 0.2, we use former way of calculating numAlgo2Dids\n const [invitationDid] = [\n ...oobRecord.outOfBandInvitation.getDidServices(),\n ...oobRecord.outOfBandInvitation.getInlineServices().map(outOfBandServiceToInlineKeysNumAlgo2Did),\n ]\n connectionRecord.invitationDid = invitationDid\n\n // Remove invitation and assign the oob id to the connection record\n // biome-ignore lint/performance/noDelete: no explanation\n delete untypedConnectionRecord.invitation\n connectionRecord.outOfBandId = oobRecord.id\n }\n\n agent.config.logger.debug('Removing multiUseInvitation property from connection record')\n // multiUseInvitation is now stored as reusable in the out of band record\n // biome-ignore lint/performance/noDelete: no explanation\n delete untypedConnectionRecord.multiUseInvitation\n\n return connectionRecord\n}\n\n/**\n * Determine the out of band state based on the did exchange role and state.\n */\nexport function oobStateFromDidExchangeRoleAndState(role: DidCommDidExchangeRole, state: DidCommDidExchangeState) {\n const stateMapping = {\n [DidCommDidExchangeState.InvitationReceived]: DidCommOutOfBandState.PrepareResponse,\n [DidCommDidExchangeState.InvitationSent]: DidCommOutOfBandState.AwaitResponse,\n\n [DidCommDidExchangeState.RequestReceived]: DidCommOutOfBandState.Done,\n [DidCommDidExchangeState.RequestSent]: DidCommOutOfBandState.Done,\n\n [DidCommDidExchangeState.ResponseReceived]: DidCommOutOfBandState.Done,\n [DidCommDidExchangeState.ResponseSent]: DidCommOutOfBandState.Done,\n\n [DidCommDidExchangeState.Completed]: DidCommOutOfBandState.Done,\n [DidCommDidExchangeState.Abandoned]: DidCommOutOfBandState.Done,\n }\n\n if (state === DidCommDidExchangeState.Start) {\n return role === DidCommDidExchangeRole.Requester\n ? DidCommOutOfBandState.PrepareResponse\n : DidCommOutOfBandState.AwaitResponse\n }\n\n return stateMapping[state]\n}\n\n/**\n * Determine the did exchange state based on the connection/did-exchange role and state.\n */\nexport function didExchangeStateAndRoleFromRoleAndState(\n role: DidCommConnectionRole | DidCommDidExchangeRole,\n state: DidCommConnectionState | DidCommDidExchangeState\n): [DidCommDidExchangeRole, DidCommDidExchangeState] {\n const roleMapping = {\n // Responder / Inviter\n [DidCommDidExchangeRole.Responder]: DidCommDidExchangeRole.Responder,\n [DidCommConnectionRole.Inviter]: DidCommDidExchangeRole.Responder,\n\n // Request / Invitee\n [DidCommDidExchangeRole.Requester]: DidCommDidExchangeRole.Requester,\n [DidCommConnectionRole.Invitee]: DidCommDidExchangeRole.Requester,\n }\n\n const roleStateMapping = {\n [DidCommDidExchangeRole.Requester]: {\n // DidCommDidExchangeRole.Requester\n [DidCommConnectionState.Invited]: DidCommDidExchangeState.InvitationReceived,\n [DidCommConnectionState.Requested]: DidCommDidExchangeState.RequestSent,\n [DidCommConnectionState.Responded]: DidCommDidExchangeState.ResponseReceived,\n [DidCommConnectionState.Complete]: DidCommDidExchangeState.Completed,\n [DidCommConnectionState.Null]: DidCommDidExchangeState.Start,\n },\n [DidCommDidExchangeRole.Responder]: {\n // DidCommDidExchangeRole.Responder\n [DidCommConnectionState.Invited]: DidCommDidExchangeState.InvitationSent,\n [DidCommConnectionState.Requested]: DidCommDidExchangeState.RequestReceived,\n [DidCommConnectionState.Responded]: DidCommDidExchangeState.ResponseSent,\n [DidCommConnectionState.Complete]: DidCommDidExchangeState.Completed,\n [DidCommConnectionState.Null]: DidCommDidExchangeState.Start,\n },\n }\n\n // Map the role to did exchange role. Can handle did exchange roles to make the function re-runnable\n const didExchangeRole = roleMapping[role]\n\n // Take into account possibility that the record state was already updated to\n // didExchange state and roles. This makes the script re-runnable and\n // adds some resiliency to the script.\n const stateMapping = roleStateMapping[didExchangeRole]\n\n // Check if state is a valid connection state\n if (isConnectionState(state)) {\n return [didExchangeRole, stateMapping[state]]\n }\n\n // If state is not a valid state we assume the state is already a did exchange state\n return [didExchangeRole, state]\n}\n\nfunction isConnectionState(state: string): state is DidCommConnectionState {\n return Object.values(DidCommConnectionState).includes(state as DidCommConnectionState)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,eAAsB,8BAAuD,OAAc;AACzF,OAAM,OAAO,OAAO,KAAK,sDAAsD;CAC/E,MAAM,uBAAuB,MAAM,kBAAkB,QAAQ,4BAA4B;AAEzF,OAAM,OAAO,OAAO,MAAM,+CAA+C;CACzE,MAAM,iBAAiB,MAAM,qBAAqB,OAAO,MAAM,QAAQ;AAEvE,OAAM,OAAO,OAAO,MAAM,oBAAoB,eAAe,OAAO,gCAAgC;AACpG,MAAK,MAAM,oBAAoB,gBAAgB;AAC7C,QAAM,OAAO,OAAO,MAAM,uCAAuC,iBAAiB,GAAG,yBAAyB;AAC9G,QAAM,6BAA6B,OAAO,iBAAiB;AAC3D,QAAM,mBAAmB,OAAO,iBAAiB;AASjD,MAJ0B,MAAM,mBAAmB,OAAO,iBAAiB,CAKzE,OAAM,qBAAqB,OAAO,MAAM,SAAS,iBAAiB;AAGpE,QAAM,OAAO,OAAO,MAClB,mDAAmD,iBAAiB,GAAG,yBACxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BL,eAAsB,6BACpB,OACA,kBACA;AACA,OAAM,OAAO,OAAO,MAClB,sIACD;CAED,MAAM,WAAW,iBAAiB;CAClC,MAAM,UAAU,iBAAiB;CAEjC,MAAM,CAAC,iBAAiB,oBAAoB,wCAC1C,iBAAiB,MACjB,iBAAiB,MAClB;AAED,kBAAiB,OAAO;AACxB,kBAAiB,QAAQ;AAEzB,OAAM,OAAO,OA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AAuB,OAAO,wBAAwB;GACxD;EACF;CAGD,MAAM,kBAAkB,YAAY;CAKpC,MAAM,eAAe,iBAAiB;AAGtC,KAAI,kBAAkB,MAAM,CAC1B,QAAO,CAAC,iBAAiB,aAAa,OAAO;AAI/C,QAAO,CAAC,iBAAiB,MAAM;;AAGjC,SAAS,kBAAkB,OAAgD;AACzE,QAAO,OAAO,OAAO,uBAAuB,CAAC,SAAS,MAAgC"}
@@ -1,7 +1,7 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.js');
2
2
  const require_DidCommMessageRecord = require('../../repository/DidCommMessageRecord.js');
3
- const require_DidCommMessageRole = require('../../repository/DidCommMessageRole.js');
4
3
  const require_DidCommMessageRepository = require('../../repository/DidCommMessageRepository.js');
4
+ const require_DidCommMessageRole = require('../../repository/DidCommMessageRole.js');
5
5
  require('../../repository/index.js');
6
6
  const require_DidCommCredentialState = require('../../modules/credentials/models/DidCommCredentialState.js');
7
7
  const require_DidCommCredentialExchangeRepository = require('../../modules/credentials/repository/DidCommCredentialExchangeRepository.js');
@@ -1,6 +1,6 @@
1
1
  import { DidCommMessageRecord } from "../../repository/DidCommMessageRecord.mjs";
2
- import { DidCommMessageRole } from "../../repository/DidCommMessageRole.mjs";
3
2
  import { DidCommMessageRepository } from "../../repository/DidCommMessageRepository.mjs";
3
+ import { DidCommMessageRole } from "../../repository/DidCommMessageRole.mjs";
4
4
  import "../../repository/index.mjs";
5
5
  import { DidCommCredentialState } from "../../modules/credentials/models/DidCommCredentialState.mjs";
6
6
  import { DidCommCredentialExchangeRepository } from "../../modules/credentials/repository/DidCommCredentialExchangeRepository.mjs";