@credo-ts/didcomm 0.7.2-pr-2704-20260918194459 → 0.7.2

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 (1565) hide show
  1. package/README.md +0 -2
  2. package/build/BaseDidCommMessage.d.mts +1 -7
  3. package/build/BaseDidCommMessage.d.mts.map +1 -1
  4. package/build/BaseDidCommMessage.mjs +3 -6
  5. package/build/BaseDidCommMessage.mjs.map +1 -1
  6. package/build/DidCommApi.d.mts +3 -5
  7. package/build/DidCommApi.d.mts.map +1 -1
  8. package/build/DidCommApi.mjs +8 -10
  9. package/build/DidCommApi.mjs.map +1 -1
  10. package/build/DidCommDispatcher.d.mts +1 -3
  11. package/build/DidCommDispatcher.d.mts.map +1 -1
  12. package/build/DidCommDispatcher.mjs +13 -14
  13. package/build/DidCommDispatcher.mjs.map +1 -1
  14. package/build/DidCommEnvelopeService.d.mts +6 -18
  15. package/build/DidCommEnvelopeService.d.mts.map +1 -1
  16. package/build/DidCommEnvelopeService.mjs +16 -21
  17. package/build/DidCommEnvelopeService.mjs.map +1 -1
  18. package/build/DidCommEvents.d.mts +5 -7
  19. package/build/DidCommEvents.d.mts.map +1 -1
  20. package/build/DidCommEvents.mjs +1 -1
  21. package/build/DidCommEvents.mjs.map +1 -1
  22. package/build/DidCommFeatureRegistry.d.mts +1 -3
  23. package/build/DidCommFeatureRegistry.d.mts.map +1 -1
  24. package/build/DidCommFeatureRegistry.mjs +2 -3
  25. package/build/DidCommFeatureRegistry.mjs.map +1 -1
  26. package/build/DidCommMessage.d.mts +3 -27
  27. package/build/DidCommMessage.d.mts.map +1 -1
  28. package/build/DidCommMessage.mjs +3 -5
  29. package/build/DidCommMessage.mjs.map +1 -1
  30. package/build/DidCommMessageHandlerRegistry.d.mts +2 -4
  31. package/build/DidCommMessageHandlerRegistry.d.mts.map +1 -1
  32. package/build/DidCommMessageHandlerRegistry.mjs +2 -3
  33. package/build/DidCommMessageHandlerRegistry.mjs.map +1 -1
  34. package/build/DidCommMessageReceiver.d.mts +9 -28
  35. package/build/DidCommMessageReceiver.d.mts.map +1 -1
  36. package/build/DidCommMessageReceiver.mjs +35 -152
  37. package/build/DidCommMessageReceiver.mjs.map +1 -1
  38. package/build/DidCommMessageSender.d.mts +7 -30
  39. package/build/DidCommMessageSender.d.mts.map +1 -1
  40. package/build/DidCommMessageSender.mjs +40 -227
  41. package/build/DidCommMessageSender.mjs.map +1 -1
  42. package/build/DidCommModule.d.mts +1 -3
  43. package/build/DidCommModule.d.mts.map +1 -1
  44. package/build/DidCommModule.mjs +5 -18
  45. package/build/DidCommModule.mjs.map +1 -1
  46. package/build/DidCommModuleConfig.d.mts +8 -58
  47. package/build/DidCommModuleConfig.d.mts.map +1 -1
  48. package/build/DidCommModuleConfig.mjs +3 -28
  49. package/build/DidCommModuleConfig.mjs.map +1 -1
  50. package/build/DidCommTransportService.d.mts +2 -6
  51. package/build/DidCommTransportService.d.mts.map +1 -1
  52. package/build/DidCommTransportService.mjs +7 -9
  53. package/build/DidCommTransportService.mjs.map +1 -1
  54. package/build/_virtual/{_@oxc-project_runtime@0.112.0/helpers → _@oxc-project_runtime@0.151.0/helpers/esm}/assertClassBrand.mjs +2 -3
  55. package/build/_virtual/{_@oxc-project_runtime@0.112.0/helpers → _@oxc-project_runtime@0.151.0/helpers/esm}/checkPrivateRedeclaration.mjs +2 -3
  56. package/build/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldGet2.mjs +7 -0
  57. package/build/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldInitSpec.mjs +7 -0
  58. package/build/_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/classPrivateFieldSet2.mjs +7 -0
  59. package/build/_virtual/{_@oxc-project_runtime@0.112.0/helpers → _@oxc-project_runtime@0.151.0/helpers/esm}/decorate.mjs +2 -3
  60. package/build/_virtual/{_@oxc-project_runtime@0.112.0/helpers → _@oxc-project_runtime@0.151.0/helpers/esm}/decorateMetadata.mjs +2 -3
  61. package/build/_virtual/{_@oxc-project_runtime@0.112.0/helpers → _@oxc-project_runtime@0.151.0/helpers/esm}/decorateParam.mjs +2 -3
  62. package/build/_virtual/_rolldown/runtime.mjs +6 -11
  63. package/build/constants.mjs +1 -1
  64. package/build/decorators/ack/AckDecorator.d.mts +2 -3
  65. package/build/decorators/ack/AckDecorator.d.mts.map +1 -1
  66. package/build/decorators/ack/AckDecorator.mjs +4 -5
  67. package/build/decorators/ack/AckDecorator.mjs.map +1 -1
  68. package/build/decorators/ack/AckDecoratorExtension.mjs +6 -8
  69. package/build/decorators/ack/AckDecoratorExtension.mjs.map +1 -1
  70. package/build/decorators/attachment/AttachmentExtension.mjs +3 -4
  71. package/build/decorators/attachment/AttachmentExtension.mjs.map +1 -1
  72. package/build/decorators/attachment/DidCommAttachment.d.mts +4 -6
  73. package/build/decorators/attachment/DidCommAttachment.d.mts.map +1 -1
  74. package/build/decorators/attachment/DidCommAttachment.mjs +5 -7
  75. package/build/decorators/attachment/DidCommAttachment.mjs.map +1 -1
  76. package/build/decorators/l10n/L10nDecorator.d.mts +1 -2
  77. package/build/decorators/l10n/L10nDecorator.d.mts.map +1 -1
  78. package/build/decorators/l10n/L10nDecorator.mjs +1 -1
  79. package/build/decorators/l10n/L10nDecorator.mjs.map +1 -1
  80. package/build/decorators/l10n/L10nDecoratorExtension.mjs +4 -6
  81. package/build/decorators/l10n/L10nDecoratorExtension.mjs.map +1 -1
  82. package/build/decorators/service/ServiceDecorator.d.mts +2 -4
  83. package/build/decorators/service/ServiceDecorator.d.mts.map +1 -1
  84. package/build/decorators/service/ServiceDecorator.mjs +3 -4
  85. package/build/decorators/service/ServiceDecorator.mjs.map +1 -1
  86. package/build/decorators/service/ServiceDecoratorExtension.mjs +4 -6
  87. package/build/decorators/service/ServiceDecoratorExtension.mjs.map +1 -1
  88. package/build/decorators/signature/SignatureDecorator.d.mts +1 -2
  89. package/build/decorators/signature/SignatureDecorator.d.mts.map +1 -1
  90. package/build/decorators/signature/SignatureDecorator.mjs +3 -4
  91. package/build/decorators/signature/SignatureDecorator.mjs.map +1 -1
  92. package/build/decorators/signature/SignatureDecoratorUtils.mjs +1 -2
  93. package/build/decorators/signature/SignatureDecoratorUtils.mjs.map +1 -1
  94. package/build/decorators/thread/ThreadDecorator.d.mts +1 -2
  95. package/build/decorators/thread/ThreadDecorator.d.mts.map +1 -1
  96. package/build/decorators/thread/ThreadDecorator.mjs +3 -4
  97. package/build/decorators/thread/ThreadDecorator.mjs.map +1 -1
  98. package/build/decorators/thread/ThreadDecoratorExtension.mjs +4 -6
  99. package/build/decorators/thread/ThreadDecoratorExtension.mjs.map +1 -1
  100. package/build/decorators/timing/TimingDecorator.d.mts +1 -2
  101. package/build/decorators/timing/TimingDecorator.d.mts.map +1 -1
  102. package/build/decorators/timing/TimingDecorator.mjs +8 -10
  103. package/build/decorators/timing/TimingDecorator.mjs.map +1 -1
  104. package/build/decorators/timing/TimingDecoratorExtension.mjs +4 -6
  105. package/build/decorators/timing/TimingDecoratorExtension.mjs.map +1 -1
  106. package/build/decorators/transport/TransportDecorator.d.mts +2 -3
  107. package/build/decorators/transport/TransportDecorator.d.mts.map +1 -1
  108. package/build/decorators/transport/TransportDecorator.mjs +5 -7
  109. package/build/decorators/transport/TransportDecorator.mjs.map +1 -1
  110. package/build/decorators/transport/TransportDecoratorExtension.mjs +9 -11
  111. package/build/decorators/transport/TransportDecoratorExtension.mjs.map +1 -1
  112. package/build/errors/MessageSendingError.d.mts +2 -7
  113. package/build/errors/MessageSendingError.d.mts.map +1 -1
  114. package/build/errors/MessageSendingError.mjs +1 -2
  115. package/build/errors/MessageSendingError.mjs.map +1 -1
  116. package/build/errors/index.d.mts +2 -1
  117. package/build/errors/index.mjs +1 -0
  118. package/build/errors/problem-reports/DidCommProblemReportError.d.mts +3 -7
  119. package/build/errors/problem-reports/DidCommProblemReportError.d.mts.map +1 -1
  120. package/build/errors/problem-reports/DidCommProblemReportError.mjs +1 -2
  121. package/build/errors/problem-reports/DidCommProblemReportError.mjs.map +1 -1
  122. package/build/errors/problem-reports/index.d.mts +2 -1
  123. package/build/errors/problem-reports/index.mjs +1 -0
  124. package/build/getDidCommOutboundMessageContext.d.mts +2 -10
  125. package/build/getDidCommOutboundMessageContext.d.mts.map +1 -1
  126. package/build/getDidCommOutboundMessageContext.mjs +32 -50
  127. package/build/getDidCommOutboundMessageContext.mjs.map +1 -1
  128. package/build/handlers/DidCommMessageHandler.d.mts +3 -5
  129. package/build/handlers/DidCommMessageHandler.d.mts.map +1 -1
  130. package/build/handlers/DidCommMessageHandlerMiddleware.d.mts +2 -4
  131. package/build/handlers/DidCommMessageHandlerMiddleware.d.mts.map +1 -1
  132. package/build/handlers/DidCommMessageHandlerMiddleware.mjs +1 -1
  133. package/build/handlers/DidCommMessageHandlerMiddleware.mjs.map +1 -1
  134. package/build/handlers/index.d.mts +2 -1
  135. package/build/index.d.mts +22 -62
  136. package/build/index.mjs +21 -62
  137. package/build/messages/common/DidCommAckMessage.d.mts +3 -5
  138. package/build/messages/common/DidCommAckMessage.d.mts.map +1 -1
  139. package/build/messages/common/DidCommAckMessage.mjs +4 -6
  140. package/build/messages/common/DidCommAckMessage.mjs.map +1 -1
  141. package/build/messages/common/index.d.mts +1 -1
  142. package/build/messages/common/index.mjs +1 -1
  143. package/build/messages/index.d.mts +2 -2
  144. package/build/messages/index.mjs +1 -1
  145. package/build/messages/problem-reports/DidCommProblemReportMessage.d.mts +8 -10
  146. package/build/messages/problem-reports/DidCommProblemReportMessage.d.mts.map +1 -1
  147. package/build/messages/problem-reports/DidCommProblemReportMessage.mjs +6 -8
  148. package/build/messages/problem-reports/DidCommProblemReportMessage.mjs.map +1 -1
  149. package/build/messages/problem-reports/index.d.mts +2 -1
  150. package/build/messages/problem-reports/index.mjs +1 -0
  151. package/build/models/DidCommInboundMessageContext.d.mts +8 -15
  152. package/build/models/DidCommInboundMessageContext.d.mts.map +1 -1
  153. package/build/models/DidCommInboundMessageContext.mjs +1 -3
  154. package/build/models/DidCommInboundMessageContext.mjs.map +1 -1
  155. package/build/models/DidCommOutboundMessageContext.d.mts +4 -8
  156. package/build/models/DidCommOutboundMessageContext.d.mts.map +1 -1
  157. package/build/models/DidCommOutboundMessageContext.mjs +1 -2
  158. package/build/models/DidCommOutboundMessageContext.mjs.map +1 -1
  159. package/build/models/DidCommOutboundMessageSendStatus.d.mts +1 -2
  160. package/build/models/DidCommOutboundMessageSendStatus.d.mts.map +1 -1
  161. package/build/models/DidCommOutboundMessageSendStatus.mjs +1 -1
  162. package/build/models/DidCommOutboundMessageSendStatus.mjs.map +1 -1
  163. package/build/models/DidCommRouting.d.mts +2 -24
  164. package/build/models/DidCommRouting.d.mts.map +1 -1
  165. package/build/models/features/DidCommFeature.d.mts +2 -3
  166. package/build/models/features/DidCommFeature.d.mts.map +1 -1
  167. package/build/models/features/DidCommFeature.mjs +4 -5
  168. package/build/models/features/DidCommFeature.mjs.map +1 -1
  169. package/build/models/features/DidCommFeatureQuery.d.mts +2 -3
  170. package/build/models/features/DidCommFeatureQuery.d.mts.map +1 -1
  171. package/build/models/features/DidCommFeatureQuery.mjs +3 -4
  172. package/build/models/features/DidCommFeatureQuery.mjs.map +1 -1
  173. package/build/models/features/DidCommGoalCode.d.mts +2 -4
  174. package/build/models/features/DidCommGoalCode.d.mts.map +1 -1
  175. package/build/models/features/DidCommGoalCode.mjs +1 -2
  176. package/build/models/features/DidCommGoalCode.mjs.map +1 -1
  177. package/build/models/features/DidCommGovernanceFramework.d.mts +2 -4
  178. package/build/models/features/DidCommGovernanceFramework.d.mts.map +1 -1
  179. package/build/models/features/DidCommGovernanceFramework.mjs +1 -2
  180. package/build/models/features/DidCommGovernanceFramework.mjs.map +1 -1
  181. package/build/models/features/DidCommProtocol.d.mts +2 -4
  182. package/build/models/features/DidCommProtocol.d.mts.map +1 -1
  183. package/build/models/features/DidCommProtocol.mjs +3 -4
  184. package/build/models/features/DidCommProtocol.mjs.map +1 -1
  185. package/build/models/features/index.mjs +1 -0
  186. package/build/models/index.d.mts +3 -2
  187. package/build/models/index.mjs +1 -0
  188. package/build/models/problem-reports/DidCommProblemReportReason.d.mts +1 -2
  189. package/build/models/problem-reports/DidCommProblemReportReason.d.mts.map +1 -1
  190. package/build/models/problem-reports/DidCommProblemReportReason.mjs +1 -1
  191. package/build/models/problem-reports/DidCommProblemReportReason.mjs.map +1 -1
  192. package/build/modules/basic-messages/DidCommBasicMessageEvents.d.mts +5 -17
  193. package/build/modules/basic-messages/DidCommBasicMessageEvents.d.mts.map +1 -1
  194. package/build/modules/basic-messages/DidCommBasicMessageEvents.mjs +1 -2
  195. package/build/modules/basic-messages/DidCommBasicMessageEvents.mjs.map +1 -1
  196. package/build/modules/basic-messages/DidCommBasicMessageRole.d.mts +1 -2
  197. package/build/modules/basic-messages/DidCommBasicMessageRole.d.mts.map +1 -1
  198. package/build/modules/basic-messages/DidCommBasicMessageRole.mjs +1 -1
  199. package/build/modules/basic-messages/DidCommBasicMessageRole.mjs.map +1 -1
  200. package/build/modules/basic-messages/DidCommBasicMessagesApi.d.mts +2 -11
  201. package/build/modules/basic-messages/DidCommBasicMessagesApi.d.mts.map +1 -1
  202. package/build/modules/basic-messages/DidCommBasicMessagesApi.mjs +9 -21
  203. package/build/modules/basic-messages/DidCommBasicMessagesApi.mjs.map +1 -1
  204. package/build/modules/basic-messages/DidCommBasicMessagesModule.d.mts +1 -6
  205. package/build/modules/basic-messages/DidCommBasicMessagesModule.d.mts.map +1 -1
  206. package/build/modules/basic-messages/DidCommBasicMessagesModule.mjs +13 -13
  207. package/build/modules/basic-messages/DidCommBasicMessagesModule.mjs.map +1 -1
  208. package/build/modules/basic-messages/{protocol/v1/handlers/DidCommBasicMessageHandler.mjs → handlers/BasicMessageHandler.mjs} +3 -4
  209. package/build/modules/basic-messages/handlers/BasicMessageHandler.mjs.map +1 -0
  210. package/build/modules/basic-messages/handlers/index.mjs +2 -0
  211. package/build/modules/basic-messages/index.d.mts +4 -7
  212. package/build/modules/basic-messages/index.mjs +3 -6
  213. package/build/modules/basic-messages/{protocol/v1/messages → messages}/DidCommBasicMessage.d.mts +5 -7
  214. package/build/modules/basic-messages/messages/DidCommBasicMessage.d.mts.map +1 -0
  215. package/build/modules/basic-messages/{protocol/v1/messages → messages}/DidCommBasicMessage.mjs +8 -10
  216. package/build/modules/basic-messages/messages/DidCommBasicMessage.mjs.map +1 -0
  217. package/build/modules/basic-messages/{protocol/v1/messages/index.mjs → messages/index.d.mts} +1 -0
  218. package/build/modules/basic-messages/{protocol/v1/messages/index.d.mts → messages/index.mjs} +2 -1
  219. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.d.mts +5 -9
  220. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.d.mts.map +1 -1
  221. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.mjs +1 -3
  222. package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.mjs.map +1 -1
  223. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.d.mts +1 -3
  224. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.d.mts.map +1 -1
  225. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.mjs +5 -7
  226. package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.mjs.map +1 -1
  227. package/build/modules/basic-messages/repository/index.d.mts +2 -1
  228. package/build/modules/basic-messages/repository/index.mjs +1 -0
  229. package/build/modules/basic-messages/services/DidCommBasicMessageService.d.mts +12 -15
  230. package/build/modules/basic-messages/services/DidCommBasicMessageService.d.mts.map +1 -1
  231. package/build/modules/basic-messages/services/DidCommBasicMessageService.mjs +33 -34
  232. package/build/modules/basic-messages/services/DidCommBasicMessageService.mjs.map +1 -1
  233. package/build/modules/basic-messages/services/index.d.mts +2 -2
  234. package/build/modules/basic-messages/services/index.mjs +1 -1
  235. package/build/modules/connections/DidCommConnectionEvents.d.mts +3 -5
  236. package/build/modules/connections/DidCommConnectionEvents.d.mts.map +1 -1
  237. package/build/modules/connections/DidCommConnectionEvents.mjs +1 -1
  238. package/build/modules/connections/DidCommConnectionEvents.mjs.map +1 -1
  239. package/build/modules/connections/DidCommConnectionsApi.d.mts +3 -8
  240. package/build/modules/connections/DidCommConnectionsApi.d.mts.map +1 -1
  241. package/build/modules/connections/DidCommConnectionsApi.mjs +44 -116
  242. package/build/modules/connections/DidCommConnectionsApi.mjs.map +1 -1
  243. package/build/modules/connections/DidCommConnectionsModule.d.mts +1 -3
  244. package/build/modules/connections/DidCommConnectionsModule.d.mts.map +1 -1
  245. package/build/modules/connections/DidCommConnectionsModule.mjs +8 -16
  246. package/build/modules/connections/DidCommConnectionsModule.mjs.map +1 -1
  247. package/build/modules/connections/DidCommConnectionsModuleConfig.d.mts +2 -13
  248. package/build/modules/connections/DidCommConnectionsModuleConfig.d.mts.map +1 -1
  249. package/build/modules/connections/DidCommConnectionsModuleConfig.mjs +4 -12
  250. package/build/modules/connections/DidCommConnectionsModuleConfig.mjs.map +1 -1
  251. package/build/modules/connections/DidCommTrustPingEvents.d.mts +3 -5
  252. package/build/modules/connections/DidCommTrustPingEvents.d.mts.map +1 -1
  253. package/build/modules/connections/DidCommTrustPingEvents.mjs +1 -1
  254. package/build/modules/connections/DidCommTrustPingEvents.mjs.map +1 -1
  255. package/build/modules/connections/DidExchangeProtocol.d.mts +1 -3
  256. package/build/modules/connections/DidExchangeProtocol.d.mts.map +1 -1
  257. package/build/modules/connections/DidExchangeProtocol.mjs +51 -46
  258. package/build/modules/connections/DidExchangeProtocol.mjs.map +1 -1
  259. package/build/modules/connections/DidExchangeStateMachine.mjs +21 -22
  260. package/build/modules/connections/DidExchangeStateMachine.mjs.map +1 -1
  261. package/build/modules/connections/errors/ConnectionProblemReportError.d.mts +2 -6
  262. package/build/modules/connections/errors/ConnectionProblemReportError.d.mts.map +1 -1
  263. package/build/modules/connections/errors/ConnectionProblemReportError.mjs +1 -2
  264. package/build/modules/connections/errors/ConnectionProblemReportError.mjs.map +1 -1
  265. package/build/modules/connections/errors/ConnectionProblemReportReason.d.mts +1 -2
  266. package/build/modules/connections/errors/ConnectionProblemReportReason.d.mts.map +1 -1
  267. package/build/modules/connections/errors/ConnectionProblemReportReason.mjs +1 -1
  268. package/build/modules/connections/errors/ConnectionProblemReportReason.mjs.map +1 -1
  269. package/build/modules/connections/errors/DidExchangeProblemReportError.d.mts +2 -6
  270. package/build/modules/connections/errors/DidExchangeProblemReportError.d.mts.map +1 -1
  271. package/build/modules/connections/errors/DidExchangeProblemReportError.mjs +1 -2
  272. package/build/modules/connections/errors/DidExchangeProblemReportError.mjs.map +1 -1
  273. package/build/modules/connections/errors/DidExchangeProblemReportReason.d.mts +1 -2
  274. package/build/modules/connections/errors/DidExchangeProblemReportReason.d.mts.map +1 -1
  275. package/build/modules/connections/errors/DidExchangeProblemReportReason.mjs +1 -1
  276. package/build/modules/connections/errors/DidExchangeProblemReportReason.mjs.map +1 -1
  277. package/build/modules/connections/errors/index.d.mts +2 -1
  278. package/build/modules/connections/errors/index.mjs +1 -0
  279. package/build/modules/connections/handlers/DidCommAckMessageHandler.d.mts +3 -5
  280. package/build/modules/connections/handlers/DidCommAckMessageHandler.d.mts.map +1 -1
  281. package/build/modules/connections/handlers/DidCommAckMessageHandler.mjs +1 -2
  282. package/build/modules/connections/handlers/DidCommAckMessageHandler.mjs.map +1 -1
  283. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.d.mts +3 -5
  284. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.d.mts.map +1 -1
  285. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.mjs +1 -2
  286. package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.mjs.map +1 -1
  287. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.mts +3 -5
  288. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.mts.map +1 -1
  289. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.mjs +8 -9
  290. package/build/modules/connections/handlers/DidCommConnectionRequestHandler.mjs.map +1 -1
  291. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.d.mts +3 -5
  292. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.d.mts.map +1 -1
  293. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.mjs +9 -17
  294. package/build/modules/connections/handlers/DidCommConnectionResponseHandler.mjs.map +1 -1
  295. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.d.mts +3 -5
  296. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.d.mts.map +1 -1
  297. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.mjs +3 -4
  298. package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.mjs.map +1 -1
  299. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.mts +3 -5
  300. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.mts.map +1 -1
  301. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.mjs +10 -10
  302. package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.mjs.map +1 -1
  303. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.mts +3 -5
  304. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.mts.map +1 -1
  305. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.mjs +9 -10
  306. package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.mjs.map +1 -1
  307. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.d.mts +3 -5
  308. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.d.mts.map +1 -1
  309. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.mjs +1 -2
  310. package/build/modules/connections/handlers/DidCommDidRotateAckHandler.mjs.map +1 -1
  311. package/build/modules/connections/handlers/DidCommDidRotateHandler.d.mts +3 -5
  312. package/build/modules/connections/handlers/DidCommDidRotateHandler.d.mts.map +1 -1
  313. package/build/modules/connections/handlers/DidCommDidRotateHandler.mjs +1 -2
  314. package/build/modules/connections/handlers/DidCommDidRotateHandler.mjs.map +1 -1
  315. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.d.mts +3 -5
  316. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.d.mts.map +1 -1
  317. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.mjs +1 -2
  318. package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.mjs.map +1 -1
  319. package/build/modules/connections/handlers/DidCommHangupHandler.d.mts +3 -5
  320. package/build/modules/connections/handlers/DidCommHangupHandler.d.mts.map +1 -1
  321. package/build/modules/connections/handlers/DidCommHangupHandler.mjs +1 -2
  322. package/build/modules/connections/handlers/DidCommHangupHandler.mjs.map +1 -1
  323. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.d.mts +3 -5
  324. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.d.mts.map +1 -1
  325. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.mjs +3 -4
  326. package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.mjs.map +1 -1
  327. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.d.mts +3 -5
  328. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.d.mts.map +1 -1
  329. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.mjs +1 -2
  330. package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.mjs.map +1 -1
  331. package/build/modules/connections/handlers/index.d.mts +2 -2
  332. package/build/modules/connections/handlers/index.mjs +1 -1
  333. package/build/modules/connections/index.d.mts +2 -3
  334. package/build/modules/connections/index.mjs +1 -2
  335. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.d.mts +7 -12
  336. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.d.mts.map +1 -1
  337. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.mjs +3 -4
  338. package/build/modules/connections/messages/DidCommConnectionInvitationMessage.mjs.map +1 -1
  339. package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.d.mts +2 -4
  340. package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.d.mts.map +1 -1
  341. package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.mjs +3 -4
  342. package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.mjs.map +1 -1
  343. package/build/modules/connections/messages/DidCommConnectionRequestMessage.d.mts +3 -12
  344. package/build/modules/connections/messages/DidCommConnectionRequestMessage.d.mts.map +1 -1
  345. package/build/modules/connections/messages/DidCommConnectionRequestMessage.mjs +4 -7
  346. package/build/modules/connections/messages/DidCommConnectionRequestMessage.mjs.map +1 -1
  347. package/build/modules/connections/messages/DidCommConnectionResponseMessage.d.mts +3 -11
  348. package/build/modules/connections/messages/DidCommConnectionResponseMessage.d.mts.map +1 -1
  349. package/build/modules/connections/messages/DidCommConnectionResponseMessage.mjs +4 -7
  350. package/build/modules/connections/messages/DidCommConnectionResponseMessage.mjs.map +1 -1
  351. package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.d.mts +2 -4
  352. package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.d.mts.map +1 -1
  353. package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.mjs +3 -4
  354. package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.mjs.map +1 -1
  355. package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.d.mts +2 -4
  356. package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.d.mts.map +1 -1
  357. package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.mjs +3 -4
  358. package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.mjs.map +1 -1
  359. package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.d.mts +3 -5
  360. package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.d.mts.map +1 -1
  361. package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.mjs +4 -6
  362. package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.mjs.map +1 -1
  363. package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.d.mts +3 -5
  364. package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.d.mts.map +1 -1
  365. package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.mjs +5 -7
  366. package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.mjs.map +1 -1
  367. package/build/modules/connections/messages/DidCommDidRotateAckMessage.d.mts +2 -4
  368. package/build/modules/connections/messages/DidCommDidRotateAckMessage.d.mts.map +1 -1
  369. package/build/modules/connections/messages/DidCommDidRotateAckMessage.mjs +3 -4
  370. package/build/modules/connections/messages/DidCommDidRotateAckMessage.mjs.map +1 -1
  371. package/build/modules/connections/messages/DidCommDidRotateMessage.d.mts +2 -4
  372. package/build/modules/connections/messages/DidCommDidRotateMessage.d.mts.map +1 -1
  373. package/build/modules/connections/messages/DidCommDidRotateMessage.mjs +3 -4
  374. package/build/modules/connections/messages/DidCommDidRotateMessage.mjs.map +1 -1
  375. package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.d.mts +2 -4
  376. package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.d.mts.map +1 -1
  377. package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.mjs +3 -4
  378. package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.mjs.map +1 -1
  379. package/build/modules/connections/messages/DidCommHangupMessage.d.mts +2 -4
  380. package/build/modules/connections/messages/DidCommHangupMessage.d.mts.map +1 -1
  381. package/build/modules/connections/messages/DidCommHangupMessage.mjs +3 -4
  382. package/build/modules/connections/messages/DidCommHangupMessage.mjs.map +1 -1
  383. package/build/modules/connections/messages/DidCommTrustPingMessage.d.mts +2 -4
  384. package/build/modules/connections/messages/DidCommTrustPingMessage.d.mts.map +1 -1
  385. package/build/modules/connections/messages/DidCommTrustPingMessage.mjs +3 -4
  386. package/build/modules/connections/messages/DidCommTrustPingMessage.mjs.map +1 -1
  387. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.d.mts +2 -4
  388. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.d.mts.map +1 -1
  389. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.mjs +3 -4
  390. package/build/modules/connections/messages/DidCommTrustPingResponseMessage.mjs.map +1 -1
  391. package/build/modules/connections/messages/index.d.mts +2 -1
  392. package/build/modules/connections/messages/index.mjs +1 -0
  393. package/build/modules/connections/models/DidCommConnection.d.mts +2 -4
  394. package/build/modules/connections/models/DidCommConnection.d.mts.map +1 -1
  395. package/build/modules/connections/models/DidCommConnection.mjs +4 -6
  396. package/build/modules/connections/models/DidCommConnection.mjs.map +1 -1
  397. package/build/modules/connections/models/DidCommConnectionRole.d.mts +1 -2
  398. package/build/modules/connections/models/DidCommConnectionRole.d.mts.map +1 -1
  399. package/build/modules/connections/models/DidCommConnectionRole.mjs +1 -1
  400. package/build/modules/connections/models/DidCommConnectionRole.mjs.map +1 -1
  401. package/build/modules/connections/models/DidCommConnectionState.d.mts +2 -4
  402. package/build/modules/connections/models/DidCommConnectionState.d.mts.map +1 -1
  403. package/build/modules/connections/models/DidCommConnectionState.mjs +11 -12
  404. package/build/modules/connections/models/DidCommConnectionState.mjs.map +1 -1
  405. package/build/modules/connections/models/DidCommConnectionType.d.mts +1 -2
  406. package/build/modules/connections/models/DidCommConnectionType.d.mts.map +1 -1
  407. package/build/modules/connections/models/DidCommConnectionType.mjs +1 -1
  408. package/build/modules/connections/models/DidCommConnectionType.mjs.map +1 -1
  409. package/build/modules/connections/models/DidCommDidExchangeRole.d.mts +1 -2
  410. package/build/modules/connections/models/DidCommDidExchangeRole.d.mts.map +1 -1
  411. package/build/modules/connections/models/DidCommDidExchangeRole.mjs +1 -1
  412. package/build/modules/connections/models/DidCommDidExchangeRole.mjs.map +1 -1
  413. package/build/modules/connections/models/DidCommDidExchangeState.d.mts +1 -2
  414. package/build/modules/connections/models/DidCommDidExchangeState.d.mts.map +1 -1
  415. package/build/modules/connections/models/DidCommDidExchangeState.mjs +1 -1
  416. package/build/modules/connections/models/DidCommDidExchangeState.mjs.map +1 -1
  417. package/build/modules/connections/models/DidCommDidRotateRole.d.mts +1 -2
  418. package/build/modules/connections/models/DidCommDidRotateRole.d.mts.map +1 -1
  419. package/build/modules/connections/models/DidCommDidRotateRole.mjs +1 -1
  420. package/build/modules/connections/models/DidCommDidRotateRole.mjs.map +1 -1
  421. package/build/modules/connections/models/DidCommHandshakeProtocol.d.mts +2 -8
  422. package/build/modules/connections/models/DidCommHandshakeProtocol.d.mts.map +1 -1
  423. package/build/modules/connections/models/DidCommHandshakeProtocol.mjs +1 -6
  424. package/build/modules/connections/models/DidCommHandshakeProtocol.mjs.map +1 -1
  425. package/build/modules/connections/models/did/DidDoc.d.mts +1 -3
  426. package/build/modules/connections/models/did/DidDoc.d.mts.map +1 -1
  427. package/build/modules/connections/models/did/DidDoc.mjs +5 -6
  428. package/build/modules/connections/models/did/DidDoc.mjs.map +1 -1
  429. package/build/modules/connections/models/did/authentication/Authentication.d.mts +1 -3
  430. package/build/modules/connections/models/did/authentication/Authentication.d.mts.map +1 -1
  431. package/build/modules/connections/models/did/authentication/Authentication.mjs +1 -1
  432. package/build/modules/connections/models/did/authentication/Authentication.mjs.map +1 -1
  433. package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.d.mts +1 -3
  434. package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.d.mts.map +1 -1
  435. package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.mjs +4 -6
  436. package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.mjs.map +1 -1
  437. package/build/modules/connections/models/did/authentication/ReferencedAuthentication.d.mts +1 -3
  438. package/build/modules/connections/models/did/authentication/ReferencedAuthentication.d.mts.map +1 -1
  439. package/build/modules/connections/models/did/authentication/ReferencedAuthentication.mjs +4 -6
  440. package/build/modules/connections/models/did/authentication/ReferencedAuthentication.mjs.map +1 -1
  441. package/build/modules/connections/models/did/authentication/index.d.mts +3 -4
  442. package/build/modules/connections/models/did/authentication/index.d.mts.map +1 -1
  443. package/build/modules/connections/models/did/authentication/index.mjs +8 -5
  444. package/build/modules/connections/models/did/authentication/index.mjs.map +1 -1
  445. package/build/modules/connections/models/did/index.d.mts +2 -1
  446. package/build/modules/connections/models/did/index.mjs +1 -0
  447. package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.d.mts +1 -3
  448. package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.d.mts.map +1 -1
  449. package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.mjs +3 -4
  450. package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.mjs.map +1 -1
  451. package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.d.mts +1 -3
  452. package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.d.mts.map +1 -1
  453. package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.mjs +3 -4
  454. package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.mjs.map +1 -1
  455. package/build/modules/connections/models/did/publicKey/PublicKey.d.mts +1 -2
  456. package/build/modules/connections/models/did/publicKey/PublicKey.d.mts.map +1 -1
  457. package/build/modules/connections/models/did/publicKey/PublicKey.mjs +3 -4
  458. package/build/modules/connections/models/did/publicKey/PublicKey.mjs.map +1 -1
  459. package/build/modules/connections/models/did/publicKey/RsaSig2018.d.mts +1 -3
  460. package/build/modules/connections/models/did/publicKey/RsaSig2018.d.mts.map +1 -1
  461. package/build/modules/connections/models/did/publicKey/RsaSig2018.mjs +3 -4
  462. package/build/modules/connections/models/did/publicKey/RsaSig2018.mjs.map +1 -1
  463. package/build/modules/connections/models/did/publicKey/index.d.mts +3 -4
  464. package/build/modules/connections/models/did/publicKey/index.d.mts.map +1 -1
  465. package/build/modules/connections/models/did/publicKey/index.mjs +4 -4
  466. package/build/modules/connections/models/did/publicKey/index.mjs.map +1 -1
  467. package/build/modules/connections/models/index.d.mts +2 -1
  468. package/build/modules/connections/models/index.mjs +1 -0
  469. package/build/modules/connections/repository/DidCommConnectionMetadataTypes.d.mts +3 -10
  470. package/build/modules/connections/repository/DidCommConnectionMetadataTypes.d.mts.map +1 -1
  471. package/build/modules/connections/repository/DidCommConnectionRecord.d.mts +4 -12
  472. package/build/modules/connections/repository/DidCommConnectionRecord.d.mts.map +1 -1
  473. package/build/modules/connections/repository/DidCommConnectionRecord.mjs +9 -13
  474. package/build/modules/connections/repository/DidCommConnectionRecord.mjs.map +1 -1
  475. package/build/modules/connections/repository/DidCommConnectionRepository.d.mts +2 -7
  476. package/build/modules/connections/repository/DidCommConnectionRepository.d.mts.map +1 -1
  477. package/build/modules/connections/repository/DidCommConnectionRepository.mjs +5 -7
  478. package/build/modules/connections/repository/DidCommConnectionRepository.mjs.map +1 -1
  479. package/build/modules/connections/repository/index.d.mts +2 -1
  480. package/build/modules/connections/repository/index.mjs +1 -0
  481. package/build/modules/connections/services/DidCommConnectionService.d.mts +10 -30
  482. package/build/modules/connections/services/DidCommConnectionService.d.mts.map +1 -1
  483. package/build/modules/connections/services/DidCommConnectionService.mjs +61 -93
  484. package/build/modules/connections/services/DidCommConnectionService.mjs.map +1 -1
  485. package/build/modules/connections/services/DidCommDidRotateService.d.mts +1 -3
  486. package/build/modules/connections/services/DidCommDidRotateService.d.mts.map +1 -1
  487. package/build/modules/connections/services/DidCommDidRotateService.mjs +34 -32
  488. package/build/modules/connections/services/DidCommDidRotateService.mjs.map +1 -1
  489. package/build/modules/connections/services/DidCommTrustPingService.d.mts +2 -7
  490. package/build/modules/connections/services/DidCommTrustPingService.d.mts.map +1 -1
  491. package/build/modules/connections/services/DidCommTrustPingService.mjs +14 -13
  492. package/build/modules/connections/services/DidCommTrustPingService.mjs.map +1 -1
  493. package/build/modules/connections/services/helpers.mjs +22 -157
  494. package/build/modules/connections/services/helpers.mjs.map +1 -1
  495. package/build/modules/connections/services/index.d.mts +2 -2
  496. package/build/modules/connections/services/index.mjs +1 -1
  497. package/build/modules/credentials/DidCommCredentialEvents.d.mts +3 -5
  498. package/build/modules/credentials/DidCommCredentialEvents.d.mts.map +1 -1
  499. package/build/modules/credentials/DidCommCredentialEvents.mjs +1 -1
  500. package/build/modules/credentials/DidCommCredentialEvents.mjs.map +1 -1
  501. package/build/modules/credentials/DidCommCredentialsApi.d.mts +3 -5
  502. package/build/modules/credentials/DidCommCredentialsApi.d.mts.map +1 -1
  503. package/build/modules/credentials/DidCommCredentialsApi.mjs +14 -16
  504. package/build/modules/credentials/DidCommCredentialsApi.mjs.map +1 -1
  505. package/build/modules/credentials/DidCommCredentialsApiOptions.d.mts +18 -19
  506. package/build/modules/credentials/DidCommCredentialsApiOptions.d.mts.map +1 -1
  507. package/build/modules/credentials/DidCommCredentialsModule.d.mts +3 -5
  508. package/build/modules/credentials/DidCommCredentialsModule.d.mts.map +1 -1
  509. package/build/modules/credentials/DidCommCredentialsModule.mjs +1 -2
  510. package/build/modules/credentials/DidCommCredentialsModule.mjs.map +1 -1
  511. package/build/modules/credentials/DidCommCredentialsModuleConfig.d.mts +2 -4
  512. package/build/modules/credentials/DidCommCredentialsModuleConfig.d.mts.map +1 -1
  513. package/build/modules/credentials/DidCommCredentialsModuleConfig.mjs +3 -4
  514. package/build/modules/credentials/DidCommCredentialsModuleConfig.mjs.map +1 -1
  515. package/build/modules/credentials/formats/DidCommCredentialFormat.d.mts +2 -3
  516. package/build/modules/credentials/formats/DidCommCredentialFormat.d.mts.map +1 -1
  517. package/build/modules/credentials/formats/DidCommCredentialFormatService.d.mts +1 -3
  518. package/build/modules/credentials/formats/DidCommCredentialFormatService.d.mts.map +1 -1
  519. package/build/modules/credentials/formats/DidCommCredentialFormatServiceOptions.d.mts +17 -19
  520. package/build/modules/credentials/formats/DidCommCredentialFormatServiceOptions.d.mts.map +1 -1
  521. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityCredentialFormat.d.mts +6 -8
  522. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityCredentialFormat.d.mts.map +1 -1
  523. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityCredentialFormatService.d.mts +10 -51
  524. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityCredentialFormatService.d.mts.map +1 -1
  525. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityCredentialFormatService.mjs +33 -119
  526. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityCredentialFormatService.mjs.map +1 -1
  527. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityLinkSecretBinding.d.mts +6 -8
  528. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityLinkSecretBinding.d.mts.map +1 -1
  529. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityLinkSecretBinding.mjs +1 -1
  530. package/build/modules/credentials/formats/dataIntegrity/DidCommDataIntegrityLinkSecretBinding.mjs.map +1 -1
  531. package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.d.mts +16 -18
  532. package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.d.mts.map +1 -1
  533. package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.mjs +7 -9
  534. package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.mjs.map +1 -1
  535. package/build/modules/credentials/formats/dataIntegrity/index.d.mts +2 -1
  536. package/build/modules/credentials/formats/dataIntegrity/index.mjs +1 -0
  537. package/build/modules/credentials/formats/index.d.mts +7 -1
  538. package/build/modules/credentials/formats/index.mjs +5 -0
  539. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.d.mts +2 -4
  540. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.d.mts.map +1 -1
  541. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.mjs +5 -7
  542. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.mjs.map +1 -1
  543. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.d.mts +4 -5
  544. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.d.mts.map +1 -1
  545. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.mjs +4 -6
  546. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.mjs.map +1 -1
  547. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormat.d.mts +7 -9
  548. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormat.d.mts.map +1 -1
  549. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.d.mts +15 -56
  550. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.d.mts.map +1 -1
  551. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.mjs +1 -2
  552. package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.mjs.map +1 -1
  553. package/build/modules/credentials/formats/jsonld/index.d.mts +2 -1
  554. package/build/modules/credentials/formats/jsonld/index.mjs +1 -0
  555. package/build/modules/credentials/formats/w3cV2SdJwt/DidCommW3cV2SdJwtCredentialFormat.d.mts +79 -0
  556. package/build/modules/credentials/formats/w3cV2SdJwt/DidCommW3cV2SdJwtCredentialFormat.d.mts.map +1 -0
  557. package/build/modules/credentials/formats/w3cV2SdJwt/DidCommW3cV2SdJwtCredentialFormatService.d.mts +28 -0
  558. package/build/modules/credentials/formats/w3cV2SdJwt/DidCommW3cV2SdJwtCredentialFormatService.d.mts.map +1 -0
  559. package/build/modules/credentials/formats/w3cV2SdJwt/DidCommW3cV2SdJwtCredentialFormatService.mjs +244 -0
  560. package/build/modules/credentials/formats/w3cV2SdJwt/DidCommW3cV2SdJwtCredentialFormatService.mjs.map +1 -0
  561. package/build/modules/credentials/formats/w3cV2SdJwt/disclosureFrame.d.mts +41 -0
  562. package/build/modules/credentials/formats/w3cV2SdJwt/disclosureFrame.d.mts.map +1 -0
  563. package/build/modules/credentials/formats/w3cV2SdJwt/disclosureFrame.mjs +92 -0
  564. package/build/modules/credentials/formats/w3cV2SdJwt/disclosureFrame.mjs.map +1 -0
  565. package/build/modules/credentials/formats/w3cV2SdJwt/index.d.mts +5 -0
  566. package/build/modules/credentials/formats/w3cV2SdJwt/index.mjs +4 -0
  567. package/build/modules/credentials/formats/w3cV2SdJwt/w3cV2SdJwtExchange.d.mts +68 -0
  568. package/build/modules/credentials/formats/w3cV2SdJwt/w3cV2SdJwtExchange.d.mts.map +1 -0
  569. package/build/modules/credentials/formats/w3cV2SdJwt/w3cV2SdJwtExchange.mjs +86 -0
  570. package/build/modules/credentials/formats/w3cV2SdJwt/w3cV2SdJwtExchange.mjs.map +1 -0
  571. package/build/modules/credentials/index.d.mts +6 -1
  572. package/build/modules/credentials/index.mjs +4 -0
  573. package/build/modules/credentials/models/DidCommCredentialAutoAcceptType.d.mts +1 -2
  574. package/build/modules/credentials/models/DidCommCredentialAutoAcceptType.d.mts.map +1 -1
  575. package/build/modules/credentials/models/DidCommCredentialAutoAcceptType.mjs +1 -1
  576. package/build/modules/credentials/models/DidCommCredentialAutoAcceptType.mjs.map +1 -1
  577. package/build/modules/credentials/models/DidCommCredentialFormatSpec.d.mts +2 -3
  578. package/build/modules/credentials/models/DidCommCredentialFormatSpec.d.mts.map +1 -1
  579. package/build/modules/credentials/models/DidCommCredentialFormatSpec.mjs +3 -4
  580. package/build/modules/credentials/models/DidCommCredentialFormatSpec.mjs.map +1 -1
  581. package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.d.mts +3 -4
  582. package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.d.mts.map +1 -1
  583. package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.mjs +3 -4
  584. package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.mjs.map +1 -1
  585. package/build/modules/credentials/models/DidCommCredentialProblemReportReason.d.mts +1 -2
  586. package/build/modules/credentials/models/DidCommCredentialProblemReportReason.d.mts.map +1 -1
  587. package/build/modules/credentials/models/DidCommCredentialProblemReportReason.mjs +1 -1
  588. package/build/modules/credentials/models/DidCommCredentialProblemReportReason.mjs.map +1 -1
  589. package/build/modules/credentials/models/DidCommCredentialRole.d.mts +1 -2
  590. package/build/modules/credentials/models/DidCommCredentialRole.d.mts.map +1 -1
  591. package/build/modules/credentials/models/DidCommCredentialRole.mjs +1 -1
  592. package/build/modules/credentials/models/DidCommCredentialRole.mjs.map +1 -1
  593. package/build/modules/credentials/models/DidCommCredentialState.d.mts +1 -2
  594. package/build/modules/credentials/models/DidCommCredentialState.d.mts.map +1 -1
  595. package/build/modules/credentials/models/DidCommCredentialState.mjs +1 -1
  596. package/build/modules/credentials/models/DidCommCredentialState.mjs.map +1 -1
  597. package/build/modules/credentials/models/DidCommRevocationNotification.d.mts +1 -2
  598. package/build/modules/credentials/models/DidCommRevocationNotification.d.mts.map +1 -1
  599. package/build/modules/credentials/models/DidCommRevocationNotification.mjs +4 -6
  600. package/build/modules/credentials/models/DidCommRevocationNotification.mjs.map +1 -1
  601. package/build/modules/credentials/models/index.mjs +1 -0
  602. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.mts +3 -5
  603. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.mts.map +1 -1
  604. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.mjs +5 -6
  605. package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.mjs.map +1 -1
  606. package/build/modules/credentials/protocol/DidCommCredentialProtocol.d.mts +3 -5
  607. package/build/modules/credentials/protocol/DidCommCredentialProtocol.d.mts.map +1 -1
  608. package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.d.mts +17 -19
  609. package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.d.mts.map +1 -1
  610. package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.mjs +1 -2
  611. package/build/modules/credentials/protocol/index.d.mts +2 -1
  612. package/build/modules/credentials/protocol/index.mjs +1 -0
  613. package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV1Handler.mjs +1 -2
  614. package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV1Handler.mjs.map +1 -1
  615. package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV2Handler.mjs +1 -2
  616. package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV2Handler.mjs.map +1 -1
  617. package/build/modules/credentials/protocol/revocation-notification/handlers/index.mjs +1 -0
  618. package/build/modules/credentials/protocol/revocation-notification/index.d.mts +2 -1
  619. package/build/modules/credentials/protocol/revocation-notification/index.mjs +1 -0
  620. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.d.mts +2 -4
  621. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.d.mts.map +1 -1
  622. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.mjs +3 -4
  623. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.mjs.map +1 -1
  624. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.d.mts +2 -4
  625. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.d.mts.map +1 -1
  626. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.mjs +3 -4
  627. package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.mjs.map +1 -1
  628. package/build/modules/credentials/protocol/revocation-notification/messages/index.d.mts +2 -1
  629. package/build/modules/credentials/protocol/revocation-notification/messages/index.mjs +1 -0
  630. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.mts +1 -3
  631. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.mts.map +1 -1
  632. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.mjs +10 -12
  633. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.mjs.map +1 -1
  634. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationServiceOptions.d.mts +1 -2
  635. package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationServiceOptions.d.mts.map +1 -1
  636. package/build/modules/credentials/protocol/revocation-notification/services/index.d.mts +2 -1
  637. package/build/modules/credentials/protocol/revocation-notification/services/index.mjs +1 -0
  638. package/build/modules/credentials/protocol/revocation-notification/util/revocationIdentifier.mjs +1 -1
  639. package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.mjs +17 -18
  640. package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.mjs.map +1 -1
  641. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.mts +17 -82
  642. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.mts.map +1 -1
  643. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.mjs +69 -70
  644. package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.mjs.map +1 -1
  645. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts +3 -7
  646. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts.map +1 -1
  647. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.mjs +1 -2
  648. package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.mjs.map +1 -1
  649. package/build/modules/credentials/protocol/v2/errors/index.d.mts +2 -1
  650. package/build/modules/credentials/protocol/v2/errors/index.mjs +1 -0
  651. package/build/modules/credentials/protocol/v2/handlers/DidCommCredentialV2AckHandler.mjs +1 -2
  652. package/build/modules/credentials/protocol/v2/handlers/DidCommCredentialV2AckHandler.mjs.map +1 -1
  653. package/build/modules/credentials/protocol/v2/handlers/DidCommCredentialV2ProblemReportHandler.mjs +1 -2
  654. package/build/modules/credentials/protocol/v2/handlers/DidCommCredentialV2ProblemReportHandler.mjs.map +1 -1
  655. package/build/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.mjs +1 -2
  656. package/build/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.mjs.map +1 -1
  657. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.mts +2 -4
  658. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.mts.map +1 -1
  659. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.mjs +1 -2
  660. package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.mjs.map +1 -1
  661. package/build/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.mjs +1 -2
  662. package/build/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.mjs.map +1 -1
  663. package/build/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.mjs +1 -2
  664. package/build/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.mjs.map +1 -1
  665. package/build/modules/credentials/protocol/v2/handlers/index.d.mts +2 -1
  666. package/build/modules/credentials/protocol/v2/handlers/index.mjs +1 -0
  667. package/build/modules/credentials/protocol/v2/index.d.mts +2 -1
  668. package/build/modules/credentials/protocol/v2/index.mjs +1 -0
  669. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.d.mts +2 -4
  670. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.d.mts.map +1 -1
  671. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.mjs +3 -4
  672. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.mjs.map +1 -1
  673. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.mts +1 -3
  674. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.mts.map +1 -1
  675. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.mjs +6 -6
  676. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.mjs.map +1 -1
  677. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.d.mts +2 -4
  678. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.d.mts.map +1 -1
  679. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.mjs +3 -4
  680. package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.mjs.map +1 -1
  681. package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.d.mts +3 -5
  682. package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.d.mts.map +1 -1
  683. package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.mjs +3 -4
  684. package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.mjs.map +1 -1
  685. package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.d.mts +3 -5
  686. package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.d.mts.map +1 -1
  687. package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.mjs +4 -6
  688. package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.mjs.map +1 -1
  689. package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.d.mts +3 -5
  690. package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.d.mts.map +1 -1
  691. package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.mjs +4 -6
  692. package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.mjs.map +1 -1
  693. package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.d.mts +3 -5
  694. package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.d.mts.map +1 -1
  695. package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.mjs +3 -4
  696. package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.mjs.map +1 -1
  697. package/build/modules/credentials/protocol/v2/messages/index.d.mts +2 -1
  698. package/build/modules/credentials/protocol/v2/messages/index.mjs +1 -0
  699. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.mts +5 -7
  700. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.mts.map +1 -1
  701. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.mjs +4 -6
  702. package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.mjs.map +1 -1
  703. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.d.mts +1 -3
  704. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.d.mts.map +1 -1
  705. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.mjs +5 -7
  706. package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.mjs.map +1 -1
  707. package/build/modules/credentials/repository/index.d.mts +2 -1
  708. package/build/modules/credentials/repository/index.mjs +1 -0
  709. package/build/modules/credentials/util/composeAutoAccept.mjs +3 -4
  710. package/build/modules/credentials/util/composeAutoAccept.mjs.map +1 -1
  711. package/build/modules/credentials/util/credentialSubject.mjs +39 -0
  712. package/build/modules/credentials/util/credentialSubject.mjs.map +1 -0
  713. package/build/modules/credentials/util/didCommSignedAttachment.mjs +77 -0
  714. package/build/modules/credentials/util/didCommSignedAttachment.mjs.map +1 -0
  715. package/build/modules/credentials/util/formatData.mjs +21 -0
  716. package/build/modules/credentials/util/formatData.mjs.map +1 -0
  717. package/build/modules/credentials/util/previewAttributes.mjs +1 -1
  718. package/build/modules/credentials/util/previewAttributes.mjs.map +1 -1
  719. package/build/modules/credentials/util/signatureAlgorithm.mjs +36 -0
  720. package/build/modules/credentials/util/signatureAlgorithm.mjs.map +1 -0
  721. package/build/modules/credentials/util/verificationMethod.mjs +22 -0
  722. package/build/modules/credentials/util/verificationMethod.mjs.map +1 -0
  723. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.mts +3 -5
  724. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.mts.map +1 -1
  725. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.mjs +14 -16
  726. package/build/modules/discover-features/DidCommDiscoverFeaturesApi.mjs.map +1 -1
  727. package/build/modules/discover-features/DidCommDiscoverFeaturesApiOptions.d.mts +3 -5
  728. package/build/modules/discover-features/DidCommDiscoverFeaturesApiOptions.d.mts.map +1 -1
  729. package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.d.mts +4 -6
  730. package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.d.mts.map +1 -1
  731. package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.mjs +1 -1
  732. package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.mjs.map +1 -1
  733. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.d.mts +1 -3
  734. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.d.mts.map +1 -1
  735. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.mjs +1 -2
  736. package/build/modules/discover-features/DidCommDiscoverFeaturesModule.mjs.map +1 -1
  737. package/build/modules/discover-features/DidCommDiscoverFeaturesModuleConfig.d.mts +2 -3
  738. package/build/modules/discover-features/DidCommDiscoverFeaturesModuleConfig.d.mts.map +1 -1
  739. package/build/modules/discover-features/DidCommDiscoverFeaturesModuleConfig.mjs +1 -1
  740. package/build/modules/discover-features/DidCommDiscoverFeaturesModuleConfig.mjs.map +1 -1
  741. package/build/modules/discover-features/DidCommDiscoverFeaturesServiceOptions.d.mts +3 -5
  742. package/build/modules/discover-features/DidCommDiscoverFeaturesServiceOptions.d.mts.map +1 -1
  743. package/build/modules/discover-features/index.d.mts +2 -1
  744. package/build/modules/discover-features/index.mjs +1 -0
  745. package/build/modules/discover-features/protocol/index.d.mts +2 -1
  746. package/build/modules/discover-features/protocol/index.mjs +1 -0
  747. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.mts +2 -4
  748. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.mts.map +1 -1
  749. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.mjs +10 -12
  750. package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.mjs.map +1 -1
  751. package/build/modules/discover-features/protocol/v1/handlers/DidCommFeaturesDiscloseMessageHandler.mjs +1 -2
  752. package/build/modules/discover-features/protocol/v1/handlers/DidCommFeaturesDiscloseMessageHandler.mjs.map +1 -1
  753. package/build/modules/discover-features/protocol/v1/handlers/DidCommFeaturesQueryMessageHandler.mjs +1 -2
  754. package/build/modules/discover-features/protocol/v1/handlers/DidCommFeaturesQueryMessageHandler.mjs.map +1 -1
  755. package/build/modules/discover-features/protocol/v1/handlers/index.mjs +1 -0
  756. package/build/modules/discover-features/protocol/v1/index.d.mts +2 -1
  757. package/build/modules/discover-features/protocol/v1/index.mjs +1 -0
  758. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.d.mts +4 -6
  759. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.d.mts.map +1 -1
  760. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.mjs +3 -4
  761. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.mjs.map +1 -1
  762. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.d.mts +2 -4
  763. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.d.mts.map +1 -1
  764. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.mjs +3 -4
  765. package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.mjs.map +1 -1
  766. package/build/modules/discover-features/protocol/v1/messages/index.d.mts +2 -1
  767. package/build/modules/discover-features/protocol/v1/messages/index.mjs +1 -0
  768. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.mts +1 -3
  769. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.mts.map +1 -1
  770. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.mjs +10 -12
  771. package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.mjs.map +1 -1
  772. package/build/modules/discover-features/protocol/v2/handlers/DidCommFeaturesDisclosuresMessageHandler.mjs +1 -2
  773. package/build/modules/discover-features/protocol/v2/handlers/DidCommFeaturesDisclosuresMessageHandler.mjs.map +1 -1
  774. package/build/modules/discover-features/protocol/v2/handlers/DidCommFeaturesQueriesMessageHandler.mjs +1 -2
  775. package/build/modules/discover-features/protocol/v2/handlers/DidCommFeaturesQueriesMessageHandler.mjs.map +1 -1
  776. package/build/modules/discover-features/protocol/v2/handlers/index.mjs +1 -0
  777. package/build/modules/discover-features/protocol/v2/index.d.mts +2 -1
  778. package/build/modules/discover-features/protocol/v2/index.mjs +1 -0
  779. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.d.mts +2 -4
  780. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.d.mts.map +1 -1
  781. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.mjs +3 -4
  782. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.mjs.map +1 -1
  783. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.d.mts +2 -4
  784. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.d.mts.map +1 -1
  785. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.mjs +3 -4
  786. package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.mjs.map +1 -1
  787. package/build/modules/discover-features/protocol/v2/messages/index.d.mts +2 -1
  788. package/build/modules/discover-features/protocol/v2/messages/index.mjs +1 -0
  789. package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.d.mts +2 -4
  790. package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.d.mts.map +1 -1
  791. package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.mjs +1 -1
  792. package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.mjs.map +1 -1
  793. package/build/modules/discover-features/services/index.d.mts +2 -1
  794. package/build/modules/index.d.mts +15 -41
  795. package/build/modules/index.mjs +22 -49
  796. package/build/modules/message-pickup/DidCommMessagePickupApi.d.mts +2 -5
  797. package/build/modules/message-pickup/DidCommMessagePickupApi.d.mts.map +1 -1
  798. package/build/modules/message-pickup/DidCommMessagePickupApi.mjs +14 -26
  799. package/build/modules/message-pickup/DidCommMessagePickupApi.mjs.map +1 -1
  800. package/build/modules/message-pickup/DidCommMessagePickupApiOptions.d.mts +11 -13
  801. package/build/modules/message-pickup/DidCommMessagePickupApiOptions.d.mts.map +1 -1
  802. package/build/modules/message-pickup/DidCommMessagePickupEvents.d.mts +4 -6
  803. package/build/modules/message-pickup/DidCommMessagePickupEvents.d.mts.map +1 -1
  804. package/build/modules/message-pickup/DidCommMessagePickupEvents.mjs +1 -1
  805. package/build/modules/message-pickup/DidCommMessagePickupEvents.mjs.map +1 -1
  806. package/build/modules/message-pickup/DidCommMessagePickupModule.d.mts +3 -6
  807. package/build/modules/message-pickup/DidCommMessagePickupModule.d.mts.map +1 -1
  808. package/build/modules/message-pickup/DidCommMessagePickupModule.mjs +2 -8
  809. package/build/modules/message-pickup/DidCommMessagePickupModule.mjs.map +1 -1
  810. package/build/modules/message-pickup/DidCommMessagePickupModuleConfig.d.mts +2 -4
  811. package/build/modules/message-pickup/DidCommMessagePickupModuleConfig.d.mts.map +1 -1
  812. package/build/modules/message-pickup/DidCommMessagePickupModuleConfig.mjs +1 -1
  813. package/build/modules/message-pickup/DidCommMessagePickupModuleConfig.mjs.map +1 -1
  814. package/build/modules/message-pickup/DidCommMessagePickupSession.d.mts +2 -4
  815. package/build/modules/message-pickup/DidCommMessagePickupSession.d.mts.map +1 -1
  816. package/build/modules/message-pickup/DidCommMessagePickupSession.mjs +1 -1
  817. package/build/modules/message-pickup/DidCommMessagePickupSession.mjs.map +1 -1
  818. package/build/modules/message-pickup/index.d.mts +2 -16
  819. package/build/modules/message-pickup/index.mjs +1 -15
  820. package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.d.mts +2 -4
  821. package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.d.mts.map +1 -1
  822. package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.mjs +1 -1
  823. package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.mjs.map +1 -1
  824. package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocol.d.mts +2 -4
  825. package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocol.d.mts.map +1 -1
  826. package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocolOptions.d.mts +7 -10
  827. package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocolOptions.d.mts.map +1 -1
  828. package/build/modules/message-pickup/protocol/index.d.mts +1 -16
  829. package/build/modules/message-pickup/protocol/index.mjs +1 -16
  830. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.mts +2 -4
  831. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.mts.map +1 -1
  832. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.mjs +18 -17
  833. package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.mjs.map +1 -1
  834. package/build/modules/message-pickup/protocol/v1/handlers/DidCommBatchHandler.mjs +1 -2
  835. package/build/modules/message-pickup/protocol/v1/handlers/DidCommBatchHandler.mjs.map +1 -1
  836. package/build/modules/message-pickup/protocol/v1/handlers/DidCommBatchPickupHandler.mjs +1 -2
  837. package/build/modules/message-pickup/protocol/v1/handlers/DidCommBatchPickupHandler.mjs.map +1 -1
  838. package/build/modules/message-pickup/protocol/v1/handlers/index.mjs +1 -0
  839. package/build/modules/message-pickup/protocol/v1/index.d.mts +2 -1
  840. package/build/modules/message-pickup/protocol/v1/index.mjs +1 -0
  841. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.d.mts +3 -7
  842. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.d.mts.map +1 -1
  843. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.mjs +3 -5
  844. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.mjs.map +1 -1
  845. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.d.mts +2 -6
  846. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.d.mts.map +1 -1
  847. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.mjs +3 -5
  848. package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.mjs.map +1 -1
  849. package/build/modules/message-pickup/protocol/v1/messages/index.d.mts +2 -1
  850. package/build/modules/message-pickup/protocol/v1/messages/index.mjs +1 -0
  851. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.mts +2 -4
  852. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.mts.map +1 -1
  853. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.mjs +24 -21
  854. package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.mjs.map +1 -1
  855. package/build/modules/message-pickup/protocol/v2/handlers/DidCommDeliveryRequestV2Handler.mjs +1 -2
  856. package/build/modules/message-pickup/protocol/v2/handlers/DidCommDeliveryRequestV2Handler.mjs.map +1 -1
  857. package/build/modules/message-pickup/protocol/v2/handlers/DidCommLiveDeliveryChangeV2Handler.mjs +1 -2
  858. package/build/modules/message-pickup/protocol/v2/handlers/DidCommLiveDeliveryChangeV2Handler.mjs.map +1 -1
  859. package/build/modules/message-pickup/protocol/v2/handlers/DidCommMessageDeliveryV2Handler.mjs +1 -2
  860. package/build/modules/message-pickup/protocol/v2/handlers/DidCommMessageDeliveryV2Handler.mjs.map +1 -1
  861. package/build/modules/message-pickup/protocol/v2/handlers/DidCommMessagesReceivedV2Handler.mjs +1 -2
  862. package/build/modules/message-pickup/protocol/v2/handlers/DidCommMessagesReceivedV2Handler.mjs.map +1 -1
  863. package/build/modules/message-pickup/protocol/v2/handlers/DidCommStatusRequestV2Handler.mjs +1 -2
  864. package/build/modules/message-pickup/protocol/v2/handlers/DidCommStatusRequestV2Handler.mjs.map +1 -1
  865. package/build/modules/message-pickup/protocol/v2/handlers/DidCommStatusV2Handler.mjs +1 -2
  866. package/build/modules/message-pickup/protocol/v2/handlers/DidCommStatusV2Handler.mjs.map +1 -1
  867. package/build/modules/message-pickup/protocol/v2/handlers/index.mjs +1 -0
  868. package/build/modules/message-pickup/protocol/v2/index.d.mts +2 -1
  869. package/build/modules/message-pickup/protocol/v2/index.mjs +1 -0
  870. package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.d.mts +2 -6
  871. package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.d.mts.map +1 -1
  872. package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.mjs +5 -7
  873. package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.mjs.map +1 -1
  874. package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.d.mts +2 -6
  875. package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.d.mts.map +1 -1
  876. package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.mjs +5 -7
  877. package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.mjs.map +1 -1
  878. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.d.mts +3 -7
  879. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.d.mts.map +1 -1
  880. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.mjs +5 -7
  881. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.mjs.map +1 -1
  882. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.d.mts +2 -6
  883. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.d.mts.map +1 -1
  884. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.mjs +5 -7
  885. package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.mjs.map +1 -1
  886. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.d.mts +2 -6
  887. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.d.mts.map +1 -1
  888. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.mjs +3 -5
  889. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.mjs.map +1 -1
  890. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.d.mts +2 -6
  891. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.d.mts.map +1 -1
  892. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.mjs +7 -10
  893. package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.mjs.map +1 -1
  894. package/build/modules/message-pickup/protocol/v2/messages/index.d.mts +2 -1
  895. package/build/modules/message-pickup/protocol/v2/messages/index.mjs +1 -0
  896. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.d.mts +1 -3
  897. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.d.mts.map +1 -1
  898. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.mjs +8 -9
  899. package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.mjs.map +1 -1
  900. package/build/modules/message-pickup/services/index.d.mts +2 -1
  901. package/build/modules/message-pickup/services/index.mjs +1 -0
  902. package/build/modules/oob/DidCommOutOfBandApi.d.mts +12 -46
  903. package/build/modules/oob/DidCommOutOfBandApi.d.mts.map +1 -1
  904. package/build/modules/oob/DidCommOutOfBandApi.mjs +71 -209
  905. package/build/modules/oob/DidCommOutOfBandApi.mjs.map +1 -1
  906. package/build/modules/oob/DidCommOutOfBandModule.d.mts +1 -3
  907. package/build/modules/oob/DidCommOutOfBandModule.d.mts.map +1 -1
  908. package/build/modules/oob/DidCommOutOfBandModule.mjs +1 -2
  909. package/build/modules/oob/DidCommOutOfBandModule.mjs.map +1 -1
  910. package/build/modules/oob/DidCommOutOfBandService.d.mts +12 -16
  911. package/build/modules/oob/DidCommOutOfBandService.d.mts.map +1 -1
  912. package/build/modules/oob/DidCommOutOfBandService.mjs +30 -46
  913. package/build/modules/oob/DidCommOutOfBandService.mjs.map +1 -1
  914. package/build/modules/oob/converters.mjs +8 -47
  915. package/build/modules/oob/converters.mjs.map +1 -1
  916. package/build/modules/oob/domain/DidCommOutOfBandEvents.d.mts +3 -5
  917. package/build/modules/oob/domain/DidCommOutOfBandEvents.d.mts.map +1 -1
  918. package/build/modules/oob/domain/DidCommOutOfBandEvents.mjs +1 -1
  919. package/build/modules/oob/domain/DidCommOutOfBandEvents.mjs.map +1 -1
  920. package/build/modules/oob/domain/DidCommOutOfBandRole.d.mts +1 -2
  921. package/build/modules/oob/domain/DidCommOutOfBandRole.d.mts.map +1 -1
  922. package/build/modules/oob/domain/DidCommOutOfBandRole.mjs +1 -1
  923. package/build/modules/oob/domain/DidCommOutOfBandRole.mjs.map +1 -1
  924. package/build/modules/oob/domain/DidCommOutOfBandState.d.mts +1 -2
  925. package/build/modules/oob/domain/DidCommOutOfBandState.d.mts.map +1 -1
  926. package/build/modules/oob/domain/DidCommOutOfBandState.mjs +1 -1
  927. package/build/modules/oob/domain/DidCommOutOfBandState.mjs.map +1 -1
  928. package/build/modules/oob/domain/OutOfBandDidCommService.d.mts +1 -3
  929. package/build/modules/oob/domain/OutOfBandDidCommService.d.mts.map +1 -1
  930. package/build/modules/oob/domain/OutOfBandDidCommService.mjs +3 -4
  931. package/build/modules/oob/domain/OutOfBandDidCommService.mjs.map +1 -1
  932. package/build/modules/oob/domain/index.d.mts +2 -1
  933. package/build/modules/oob/domain/index.mjs +1 -0
  934. package/build/modules/oob/handlers/DidCommHandshakeReuseAcceptedHandler.mjs +1 -2
  935. package/build/modules/oob/handlers/DidCommHandshakeReuseAcceptedHandler.mjs.map +1 -1
  936. package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.mjs +3 -3
  937. package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.mjs.map +1 -1
  938. package/build/modules/oob/handlers/index.mjs +1 -0
  939. package/build/modules/oob/helpers.mjs +4 -4
  940. package/build/modules/oob/helpers.mjs.map +1 -1
  941. package/build/modules/oob/index.d.mts +2 -2
  942. package/build/modules/oob/index.mjs +2 -2
  943. package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.d.mts +2 -4
  944. package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.d.mts.map +1 -1
  945. package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.mjs +3 -4
  946. package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.mjs.map +1 -1
  947. package/build/modules/oob/messages/DidCommHandshakeReuseMessage.d.mts +2 -4
  948. package/build/modules/oob/messages/DidCommHandshakeReuseMessage.d.mts.map +1 -1
  949. package/build/modules/oob/messages/DidCommHandshakeReuseMessage.mjs +3 -4
  950. package/build/modules/oob/messages/DidCommHandshakeReuseMessage.mjs.map +1 -1
  951. package/build/modules/oob/messages/DidCommOutOfBandInvitation.d.mts +6 -25
  952. package/build/modules/oob/messages/DidCommOutOfBandInvitation.d.mts.map +1 -1
  953. package/build/modules/oob/messages/DidCommOutOfBandInvitation.mjs +5 -21
  954. package/build/modules/oob/messages/DidCommOutOfBandInvitation.mjs.map +1 -1
  955. package/build/modules/oob/messages/index.d.mts +2 -2
  956. package/build/modules/oob/messages/index.mjs +1 -1
  957. package/build/modules/oob/repository/DidCommOutOfBandRecord.d.mts +3 -11
  958. package/build/modules/oob/repository/DidCommOutOfBandRecord.d.mts.map +1 -1
  959. package/build/modules/oob/repository/DidCommOutOfBandRecord.mjs +5 -8
  960. package/build/modules/oob/repository/DidCommOutOfBandRecord.mjs.map +1 -1
  961. package/build/modules/oob/repository/DidCommOutOfBandRepository.d.mts +1 -3
  962. package/build/modules/oob/repository/DidCommOutOfBandRepository.d.mts.map +1 -1
  963. package/build/modules/oob/repository/DidCommOutOfBandRepository.mjs +5 -7
  964. package/build/modules/oob/repository/DidCommOutOfBandRepository.mjs.map +1 -1
  965. package/build/modules/oob/repository/index.d.mts +2 -1
  966. package/build/modules/oob/repository/index.mjs +1 -0
  967. package/build/modules/oob/repository/outOfBandRecordMetadataTypes.d.mts +3 -18
  968. package/build/modules/oob/repository/outOfBandRecordMetadataTypes.d.mts.map +1 -1
  969. package/build/modules/proofs/DidCommProofEvents.d.mts +2 -4
  970. package/build/modules/proofs/DidCommProofEvents.d.mts.map +1 -1
  971. package/build/modules/proofs/DidCommProofEvents.mjs +1 -1
  972. package/build/modules/proofs/DidCommProofEvents.mjs.map +1 -1
  973. package/build/modules/proofs/DidCommProofsApi.d.mts +3 -5
  974. package/build/modules/proofs/DidCommProofsApi.d.mts.map +1 -1
  975. package/build/modules/proofs/DidCommProofsApi.mjs +12 -14
  976. package/build/modules/proofs/DidCommProofsApi.mjs.map +1 -1
  977. package/build/modules/proofs/DidCommProofsApiOptions.d.mts +20 -21
  978. package/build/modules/proofs/DidCommProofsApiOptions.d.mts.map +1 -1
  979. package/build/modules/proofs/DidCommProofsModule.d.mts +3 -5
  980. package/build/modules/proofs/DidCommProofsModule.d.mts.map +1 -1
  981. package/build/modules/proofs/DidCommProofsModule.mjs +1 -2
  982. package/build/modules/proofs/DidCommProofsModule.mjs.map +1 -1
  983. package/build/modules/proofs/DidCommProofsModuleConfig.d.mts +2 -4
  984. package/build/modules/proofs/DidCommProofsModuleConfig.d.mts.map +1 -1
  985. package/build/modules/proofs/DidCommProofsModuleConfig.mjs +3 -4
  986. package/build/modules/proofs/DidCommProofsModuleConfig.mjs.map +1 -1
  987. package/build/modules/proofs/errors/DidCommPresentationProblemReportReason.d.mts +1 -2
  988. package/build/modules/proofs/errors/DidCommPresentationProblemReportReason.d.mts.map +1 -1
  989. package/build/modules/proofs/errors/DidCommPresentationProblemReportReason.mjs +1 -1
  990. package/build/modules/proofs/errors/DidCommPresentationProblemReportReason.mjs.map +1 -1
  991. package/build/modules/proofs/formats/DidCommProofFormat.d.mts +3 -4
  992. package/build/modules/proofs/formats/DidCommProofFormat.d.mts.map +1 -1
  993. package/build/modules/proofs/formats/DidCommProofFormatService.d.mts +1 -3
  994. package/build/modules/proofs/formats/DidCommProofFormatService.d.mts.map +1 -1
  995. package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.d.mts +17 -19
  996. package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.d.mts.map +1 -1
  997. package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.mjs +1 -2
  998. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormat.d.mts +5 -7
  999. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormat.d.mts.map +1 -1
  1000. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.d.mts +12 -47
  1001. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.d.mts.map +1 -1
  1002. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.mjs +24 -22
  1003. package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.mjs.map +1 -1
  1004. package/build/modules/proofs/formats/dif-presentation-exchange/index.d.mts +2 -1
  1005. package/build/modules/proofs/formats/dif-presentation-exchange/index.mjs +1 -0
  1006. package/build/modules/proofs/formats/index.d.mts +2 -1
  1007. package/build/modules/proofs/formats/index.mjs +1 -0
  1008. package/build/modules/proofs/index.d.mts +2 -1
  1009. package/build/modules/proofs/index.mjs +1 -0
  1010. package/build/modules/proofs/models/DidCommProofAutoAcceptType.d.mts +1 -2
  1011. package/build/modules/proofs/models/DidCommProofAutoAcceptType.d.mts.map +1 -1
  1012. package/build/modules/proofs/models/DidCommProofAutoAcceptType.mjs +1 -1
  1013. package/build/modules/proofs/models/DidCommProofAutoAcceptType.mjs.map +1 -1
  1014. package/build/modules/proofs/models/DidCommProofFormatSpec.d.mts +2 -3
  1015. package/build/modules/proofs/models/DidCommProofFormatSpec.d.mts.map +1 -1
  1016. package/build/modules/proofs/models/DidCommProofFormatSpec.mjs +3 -4
  1017. package/build/modules/proofs/models/DidCommProofFormatSpec.mjs.map +1 -1
  1018. package/build/modules/proofs/models/DidCommProofRole.d.mts +1 -2
  1019. package/build/modules/proofs/models/DidCommProofRole.d.mts.map +1 -1
  1020. package/build/modules/proofs/models/DidCommProofRole.mjs +1 -1
  1021. package/build/modules/proofs/models/DidCommProofRole.mjs.map +1 -1
  1022. package/build/modules/proofs/models/DidCommProofState.d.mts +1 -2
  1023. package/build/modules/proofs/models/DidCommProofState.d.mts.map +1 -1
  1024. package/build/modules/proofs/models/DidCommProofState.mjs +1 -1
  1025. package/build/modules/proofs/models/DidCommProofState.mjs.map +1 -1
  1026. package/build/modules/proofs/models/index.mjs +1 -0
  1027. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.mts +2 -4
  1028. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.mts.map +1 -1
  1029. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.mjs +5 -6
  1030. package/build/modules/proofs/protocol/DidCommBaseProofProtocol.mjs.map +1 -1
  1031. package/build/modules/proofs/protocol/DidCommProofProtocol.d.mts +2 -4
  1032. package/build/modules/proofs/protocol/DidCommProofProtocol.d.mts.map +1 -1
  1033. package/build/modules/proofs/protocol/DidCommProofProtocolOptions.d.mts +19 -21
  1034. package/build/modules/proofs/protocol/DidCommProofProtocolOptions.d.mts.map +1 -1
  1035. package/build/modules/proofs/protocol/DidCommProofProtocolOptions.mjs +1 -2
  1036. package/build/modules/proofs/protocol/index.d.mts +2 -1
  1037. package/build/modules/proofs/protocol/index.mjs +1 -0
  1038. package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.mjs +16 -17
  1039. package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.mjs.map +1 -1
  1040. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.mts +14 -76
  1041. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.mts.map +1 -1
  1042. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.mjs +64 -65
  1043. package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.mjs.map +1 -1
  1044. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.mts +2 -6
  1045. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.mts.map +1 -1
  1046. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.mjs +1 -2
  1047. package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.mjs.map +1 -1
  1048. package/build/modules/proofs/protocol/v2/errors/index.d.mts +2 -1
  1049. package/build/modules/proofs/protocol/v2/errors/index.mjs +1 -0
  1050. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2AckHandler.mjs +1 -2
  1051. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2AckHandler.mjs.map +1 -1
  1052. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.mjs +3 -4
  1053. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.mjs.map +1 -1
  1054. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2ProblemReportHandler.mjs +1 -2
  1055. package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2ProblemReportHandler.mjs.map +1 -1
  1056. package/build/modules/proofs/protocol/v2/handlers/DidCommProposePresentationV2Handler.mjs +1 -2
  1057. package/build/modules/proofs/protocol/v2/handlers/DidCommProposePresentationV2Handler.mjs.map +1 -1
  1058. package/build/modules/proofs/protocol/v2/handlers/DidCommRequestPresentationV2Handler.mjs +1 -2
  1059. package/build/modules/proofs/protocol/v2/handlers/DidCommRequestPresentationV2Handler.mjs.map +1 -1
  1060. package/build/modules/proofs/protocol/v2/index.d.mts +2 -1
  1061. package/build/modules/proofs/protocol/v2/index.mjs +1 -0
  1062. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.d.mts +1 -3
  1063. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.d.mts.map +1 -1
  1064. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.mjs +3 -4
  1065. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.mjs.map +1 -1
  1066. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.d.mts +3 -5
  1067. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.d.mts.map +1 -1
  1068. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.mjs +3 -4
  1069. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.mjs.map +1 -1
  1070. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.d.mts +1 -3
  1071. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.d.mts.map +1 -1
  1072. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.mjs +3 -4
  1073. package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.mjs.map +1 -1
  1074. package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.d.mts +3 -5
  1075. package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.d.mts.map +1 -1
  1076. package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.mjs +3 -4
  1077. package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.mjs.map +1 -1
  1078. package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.d.mts +3 -5
  1079. package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.d.mts.map +1 -1
  1080. package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.mjs +3 -4
  1081. package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.mjs.map +1 -1
  1082. package/build/modules/proofs/protocol/v2/messages/index.d.mts +2 -1
  1083. package/build/modules/proofs/protocol/v2/messages/index.mjs +1 -0
  1084. package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.mts +4 -6
  1085. package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.mts.map +1 -1
  1086. package/build/modules/proofs/repository/DidCommProofExchangeRecord.mjs +1 -2
  1087. package/build/modules/proofs/repository/DidCommProofExchangeRecord.mjs.map +1 -1
  1088. package/build/modules/proofs/repository/DidCommProofExchangeRepository.d.mts +1 -3
  1089. package/build/modules/proofs/repository/DidCommProofExchangeRepository.d.mts.map +1 -1
  1090. package/build/modules/proofs/repository/DidCommProofExchangeRepository.mjs +5 -7
  1091. package/build/modules/proofs/repository/DidCommProofExchangeRepository.mjs.map +1 -1
  1092. package/build/modules/proofs/repository/index.d.mts +2 -1
  1093. package/build/modules/proofs/repository/index.mjs +1 -0
  1094. package/build/modules/proofs/utils/composeAutoAccept.mjs +3 -4
  1095. package/build/modules/proofs/utils/composeAutoAccept.mjs.map +1 -1
  1096. package/build/modules/proofs/utils/index.mjs +1 -0
  1097. package/build/modules/routing/DidCommMediationRecipientApi.d.mts +8 -43
  1098. package/build/modules/routing/DidCommMediationRecipientApi.d.mts.map +1 -1
  1099. package/build/modules/routing/DidCommMediationRecipientApi.mjs +63 -218
  1100. package/build/modules/routing/DidCommMediationRecipientApi.mjs.map +1 -1
  1101. package/build/modules/routing/DidCommMediationRecipientModule.d.mts +1 -3
  1102. package/build/modules/routing/DidCommMediationRecipientModule.d.mts.map +1 -1
  1103. package/build/modules/routing/DidCommMediationRecipientModule.mjs +9 -25
  1104. package/build/modules/routing/DidCommMediationRecipientModule.mjs.map +1 -1
  1105. package/build/modules/routing/DidCommMediationRecipientModuleConfig.d.mts +2 -16
  1106. package/build/modules/routing/DidCommMediationRecipientModuleConfig.d.mts.map +1 -1
  1107. package/build/modules/routing/DidCommMediationRecipientModuleConfig.mjs +1 -5
  1108. package/build/modules/routing/DidCommMediationRecipientModuleConfig.mjs.map +1 -1
  1109. package/build/modules/routing/DidCommMediatorApi.d.mts +1 -7
  1110. package/build/modules/routing/DidCommMediatorApi.d.mts.map +1 -1
  1111. package/build/modules/routing/DidCommMediatorApi.mjs +9 -15
  1112. package/build/modules/routing/DidCommMediatorApi.mjs.map +1 -1
  1113. package/build/modules/routing/DidCommMediatorModule.d.mts +1 -3
  1114. package/build/modules/routing/DidCommMediatorModule.d.mts.map +1 -1
  1115. package/build/modules/routing/DidCommMediatorModule.mjs +8 -22
  1116. package/build/modules/routing/DidCommMediatorModule.mjs.map +1 -1
  1117. package/build/modules/routing/DidCommMediatorModuleConfig.d.mts +2 -21
  1118. package/build/modules/routing/DidCommMediatorModuleConfig.d.mts.map +1 -1
  1119. package/build/modules/routing/DidCommMediatorModuleConfig.mjs +3 -12
  1120. package/build/modules/routing/DidCommMediatorModuleConfig.mjs.map +1 -1
  1121. package/build/modules/routing/DidCommMediatorPickupStrategy.d.mts +1 -4
  1122. package/build/modules/routing/DidCommMediatorPickupStrategy.d.mts.map +1 -1
  1123. package/build/modules/routing/DidCommMediatorPickupStrategy.mjs +1 -3
  1124. package/build/modules/routing/DidCommMediatorPickupStrategy.mjs.map +1 -1
  1125. package/build/modules/routing/DidCommMessageForwardingStrategy.d.mts +1 -2
  1126. package/build/modules/routing/DidCommMessageForwardingStrategy.d.mts.map +1 -1
  1127. package/build/modules/routing/DidCommMessageForwardingStrategy.mjs +1 -1
  1128. package/build/modules/routing/DidCommMessageForwardingStrategy.mjs.map +1 -1
  1129. package/build/modules/routing/DidCommRoutingEvents.d.mts +5 -16
  1130. package/build/modules/routing/DidCommRoutingEvents.d.mts.map +1 -1
  1131. package/build/modules/routing/DidCommRoutingEvents.mjs +1 -2
  1132. package/build/modules/routing/DidCommRoutingEvents.mjs.map +1 -1
  1133. package/build/modules/routing/{protocol/v1/handlers → handlers}/DidCommForwardHandler.mjs +3 -6
  1134. package/build/modules/routing/handlers/DidCommForwardHandler.mjs.map +1 -0
  1135. package/build/modules/routing/{protocol/v1/handlers → handlers}/DidCommKeylistUpdateHandler.mjs +6 -6
  1136. package/build/modules/routing/handlers/DidCommKeylistUpdateHandler.mjs.map +1 -0
  1137. package/build/modules/routing/{protocol/v1/handlers → handlers}/DidCommKeylistUpdateResponseHandler.mjs +2 -3
  1138. package/build/modules/routing/handlers/DidCommKeylistUpdateResponseHandler.mjs.map +1 -0
  1139. package/build/modules/routing/{protocol/v1/handlers → handlers}/DidCommMediationDenyHandler.mjs +2 -3
  1140. package/build/modules/routing/handlers/DidCommMediationDenyHandler.mjs.map +1 -0
  1141. package/build/modules/routing/{protocol/v1/handlers → handlers}/DidCommMediationGrantHandler.mjs +2 -3
  1142. package/build/modules/routing/handlers/DidCommMediationGrantHandler.mjs.map +1 -0
  1143. package/build/modules/routing/{protocol/v1/handlers → handlers}/DidCommMediationRequestHandler.mjs +4 -5
  1144. package/build/modules/routing/handlers/DidCommMediationRequestHandler.mjs.map +1 -0
  1145. package/build/modules/routing/{protocol/v1/handlers → handlers}/index.mjs +1 -0
  1146. package/build/modules/routing/index.d.mts +10 -18
  1147. package/build/modules/routing/index.mjs +12 -20
  1148. package/build/modules/routing/messages/DidCommForwardMessage.d.mts +28 -0
  1149. package/build/modules/routing/messages/DidCommForwardMessage.d.mts.map +1 -0
  1150. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommForwardMessage.mjs +6 -8
  1151. package/build/modules/routing/messages/DidCommForwardMessage.mjs.map +1 -0
  1152. package/build/modules/routing/messages/DidCommKeylistUpdateMessage.d.mts +34 -0
  1153. package/build/modules/routing/messages/DidCommKeylistUpdateMessage.d.mts.map +1 -0
  1154. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommKeylistUpdateMessage.mjs +7 -10
  1155. package/build/modules/routing/messages/DidCommKeylistUpdateMessage.mjs.map +1 -0
  1156. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommKeylistUpdateResponseMessage.d.mts +8 -12
  1157. package/build/modules/routing/messages/DidCommKeylistUpdateResponseMessage.d.mts.map +1 -0
  1158. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommKeylistUpdateResponseMessage.mjs +8 -11
  1159. package/build/modules/routing/messages/DidCommKeylistUpdateResponseMessage.mjs.map +1 -0
  1160. package/build/modules/routing/messages/DidCommMediationDenyMessage.d.mts +19 -0
  1161. package/build/modules/routing/messages/DidCommMediationDenyMessage.d.mts.map +1 -0
  1162. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommMediationDenyMessage.mjs +6 -8
  1163. package/build/modules/routing/messages/DidCommMediationDenyMessage.mjs.map +1 -0
  1164. package/build/modules/routing/messages/DidCommMediationGrantMessage.d.mts +25 -0
  1165. package/build/modules/routing/messages/DidCommMediationGrantMessage.d.mts.map +1 -0
  1166. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommMediationGrantMessage.mjs +6 -8
  1167. package/build/modules/routing/messages/DidCommMediationGrantMessage.mjs.map +1 -0
  1168. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommMediationRequestMessage.d.mts +6 -10
  1169. package/build/modules/routing/messages/DidCommMediationRequestMessage.d.mts.map +1 -0
  1170. package/build/modules/routing/{protocol/v1/messages → messages}/DidCommMediationRequestMessage.mjs +6 -8
  1171. package/build/modules/routing/messages/DidCommMediationRequestMessage.mjs.map +1 -0
  1172. package/build/modules/routing/{protocol/v1/messages → messages}/index.d.mts +2 -2
  1173. package/build/modules/routing/{protocol/v1/messages → messages}/index.mjs +1 -1
  1174. package/build/modules/routing/models/DidCommMediationRole.d.mts +1 -2
  1175. package/build/modules/routing/models/DidCommMediationRole.d.mts.map +1 -1
  1176. package/build/modules/routing/models/DidCommMediationRole.mjs +1 -1
  1177. package/build/modules/routing/models/DidCommMediationRole.mjs.map +1 -1
  1178. package/build/modules/routing/models/DidCommMediationState.d.mts +1 -2
  1179. package/build/modules/routing/models/DidCommMediationState.d.mts.map +1 -1
  1180. package/build/modules/routing/models/DidCommMediationState.mjs +1 -1
  1181. package/build/modules/routing/models/DidCommMediationState.mjs.map +1 -1
  1182. package/build/modules/routing/repository/DidCommMediationRecord.d.mts +4 -22
  1183. package/build/modules/routing/repository/DidCommMediationRecord.d.mts.map +1 -1
  1184. package/build/modules/routing/repository/DidCommMediationRecord.mjs +9 -30
  1185. package/build/modules/routing/repository/DidCommMediationRecord.mjs.map +1 -1
  1186. package/build/modules/routing/repository/DidCommMediationRepository.d.mts +1 -12
  1187. package/build/modules/routing/repository/DidCommMediationRepository.d.mts.map +1 -1
  1188. package/build/modules/routing/repository/DidCommMediationRepository.mjs +6 -25
  1189. package/build/modules/routing/repository/DidCommMediationRepository.mjs.map +1 -1
  1190. package/build/modules/routing/repository/DidCommMediatorRoutingRecord.d.mts +4 -6
  1191. package/build/modules/routing/repository/DidCommMediatorRoutingRecord.d.mts.map +1 -1
  1192. package/build/modules/routing/repository/DidCommMediatorRoutingRecord.mjs +1 -2
  1193. package/build/modules/routing/repository/DidCommMediatorRoutingRecord.mjs.map +1 -1
  1194. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.d.mts +1 -3
  1195. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.d.mts.map +1 -1
  1196. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.mjs +5 -7
  1197. package/build/modules/routing/repository/DidCommMediatorRoutingRepository.mjs.map +1 -1
  1198. package/build/modules/routing/repository/index.d.mts +2 -1
  1199. package/build/modules/routing/repository/index.mjs +1 -0
  1200. package/build/modules/routing/services/DidCommMediationRecipientService.d.mts +11 -44
  1201. package/build/modules/routing/services/DidCommMediationRecipientService.d.mts.map +1 -1
  1202. package/build/modules/routing/services/DidCommMediationRecipientService.mjs +47 -175
  1203. package/build/modules/routing/services/DidCommMediationRecipientService.mjs.map +1 -1
  1204. package/build/modules/routing/services/DidCommMediatorService.d.mts +8 -36
  1205. package/build/modules/routing/services/DidCommMediatorService.d.mts.map +1 -1
  1206. package/build/modules/routing/services/DidCommMediatorService.mjs +55 -217
  1207. package/build/modules/routing/services/DidCommMediatorService.mjs.map +1 -1
  1208. package/build/modules/routing/services/DidCommRoutingService.d.mts +6 -19
  1209. package/build/modules/routing/services/DidCommRoutingService.d.mts.map +1 -1
  1210. package/build/modules/routing/services/DidCommRoutingService.mjs +9 -38
  1211. package/build/modules/routing/services/DidCommRoutingService.mjs.map +1 -1
  1212. package/build/modules/routing/services/helpers.mjs +3 -4
  1213. package/build/modules/routing/services/helpers.mjs.map +1 -1
  1214. package/build/modules/routing/services/index.d.mts +2 -1
  1215. package/build/modules/routing/services/index.mjs +1 -0
  1216. package/build/repository/DidCommMessageRecord.d.mts +3 -5
  1217. package/build/repository/DidCommMessageRecord.d.mts.map +1 -1
  1218. package/build/repository/DidCommMessageRecord.mjs +3 -3
  1219. package/build/repository/DidCommMessageRecord.mjs.map +1 -1
  1220. package/build/repository/DidCommMessageRepository.d.mts +6 -20
  1221. package/build/repository/DidCommMessageRepository.d.mts.map +1 -1
  1222. package/build/repository/DidCommMessageRepository.mjs +5 -7
  1223. package/build/repository/DidCommMessageRepository.mjs.map +1 -1
  1224. package/build/repository/DidCommMessageRole.d.mts +1 -2
  1225. package/build/repository/DidCommMessageRole.d.mts.map +1 -1
  1226. package/build/repository/DidCommMessageRole.mjs +1 -1
  1227. package/build/repository/DidCommMessageRole.mjs.map +1 -1
  1228. package/build/repository/index.d.mts +2 -1
  1229. package/build/repository/index.mjs +1 -0
  1230. package/build/services/DidCommDocumentService.d.mts +3 -55
  1231. package/build/services/DidCommDocumentService.d.mts.map +1 -1
  1232. package/build/services/DidCommDocumentService.mjs +22 -187
  1233. package/build/services/DidCommDocumentService.mjs.map +1 -1
  1234. package/build/services/index.d.mts +2 -1
  1235. package/build/services/index.mjs +1 -0
  1236. package/build/transport/DidCommHttpOutboundTransport.d.mts +1 -3
  1237. package/build/transport/DidCommHttpOutboundTransport.d.mts.map +1 -1
  1238. package/build/transport/DidCommHttpOutboundTransport.mjs +3 -4
  1239. package/build/transport/DidCommHttpOutboundTransport.mjs.map +1 -1
  1240. package/build/transport/DidCommInboundTransport.d.mts +1 -3
  1241. package/build/transport/DidCommInboundTransport.d.mts.map +1 -1
  1242. package/build/transport/DidCommOutboundTransport.d.mts +1 -3
  1243. package/build/transport/DidCommOutboundTransport.d.mts.map +1 -1
  1244. package/build/transport/DidCommTransportEventTypes.d.mts +5 -7
  1245. package/build/transport/DidCommTransportEventTypes.d.mts.map +1 -1
  1246. package/build/transport/DidCommTransportEventTypes.mjs +1 -1
  1247. package/build/transport/DidCommTransportEventTypes.mjs.map +1 -1
  1248. package/build/transport/DidCommWsOutboundTransport.d.mts +1 -3
  1249. package/build/transport/DidCommWsOutboundTransport.d.mts.map +1 -1
  1250. package/build/transport/DidCommWsOutboundTransport.mjs +6 -7
  1251. package/build/transport/DidCommWsOutboundTransport.mjs.map +1 -1
  1252. package/build/transport/index.d.mts +2 -1
  1253. package/build/transport/index.mjs +1 -0
  1254. package/build/transport/queue/DidCommQueueTransportRepository.d.mts +1 -3
  1255. package/build/transport/queue/DidCommQueueTransportRepository.d.mts.map +1 -1
  1256. package/build/transport/queue/DidCommQueueTransportRepository.mjs +1 -1
  1257. package/build/transport/queue/InMemoryQueueTransportRepository.d.mts +1 -3
  1258. package/build/transport/queue/InMemoryQueueTransportRepository.d.mts.map +1 -1
  1259. package/build/transport/queue/InMemoryQueueTransportRepository.mjs +4 -5
  1260. package/build/transport/queue/InMemoryQueueTransportRepository.mjs.map +1 -1
  1261. package/build/transport/queue/QueueTransportRepositoryOptions.d.mts +4 -6
  1262. package/build/transport/queue/QueueTransportRepositoryOptions.d.mts.map +1 -1
  1263. package/build/transport/queue/QueuedDidCommMessage.d.mts +1 -3
  1264. package/build/transport/queue/QueuedDidCommMessage.d.mts.map +1 -1
  1265. package/build/transport/queue/index.d.mts +2 -1
  1266. package/build/transport/queue/index.mjs +1 -0
  1267. package/build/types.d.mts +5 -6
  1268. package/build/types.d.mts.map +1 -1
  1269. package/build/types.mjs +1 -1
  1270. package/build/types.mjs.map +1 -1
  1271. package/build/updates/0.1-0.2/connection.mjs +36 -36
  1272. package/build/updates/0.1-0.2/connection.mjs.map +1 -1
  1273. package/build/updates/0.1-0.2/credential.mjs +25 -30
  1274. package/build/updates/0.1-0.2/credential.mjs.map +1 -1
  1275. package/build/updates/0.1-0.2/index.d.mts +1 -3
  1276. package/build/updates/0.1-0.2/index.d.mts.map +1 -1
  1277. package/build/updates/0.1-0.2/index.mjs +1 -2
  1278. package/build/updates/0.1-0.2/index.mjs.map +1 -1
  1279. package/build/updates/0.1-0.2/mediation.mjs +12 -16
  1280. package/build/updates/0.1-0.2/mediation.mjs.map +1 -1
  1281. package/build/updates/0.2-0.3/connection.mjs +5 -6
  1282. package/build/updates/0.2-0.3/connection.mjs.map +1 -1
  1283. package/build/updates/0.2-0.3/index.d.mts +1 -3
  1284. package/build/updates/0.2-0.3/index.d.mts.map +1 -1
  1285. package/build/updates/0.2-0.3/index.mjs +1 -2
  1286. package/build/updates/0.2-0.3/index.mjs.map +1 -1
  1287. package/build/updates/0.2-0.3/proof.mjs +23 -28
  1288. package/build/updates/0.2-0.3/proof.mjs.map +1 -1
  1289. package/build/updates/0.4-0.5/credentialExchangeRecord.mjs +24 -25
  1290. package/build/updates/0.4-0.5/credentialExchangeRecord.mjs.map +1 -1
  1291. package/build/updates/0.4-0.5/index.d.mts +1 -3
  1292. package/build/updates/0.4-0.5/index.d.mts.map +1 -1
  1293. package/build/updates/0.4-0.5/index.mjs +1 -2
  1294. package/build/updates/0.4-0.5/index.mjs.map +1 -1
  1295. package/build/updates/0.4-0.5/proofExchangeRecord.mjs +18 -19
  1296. package/build/updates/0.4-0.5/proofExchangeRecord.mjs.map +1 -1
  1297. package/build/util/JWE.d.mts +1 -3
  1298. package/build/util/JWE.d.mts.map +1 -1
  1299. package/build/util/JWE.mjs +1 -1
  1300. package/build/util/JWE.mjs.map +1 -1
  1301. package/build/util/messageType.d.mts +8 -14
  1302. package/build/util/messageType.d.mts.map +1 -1
  1303. package/build/util/messageType.mjs +2 -3
  1304. package/build/util/messageType.mjs.map +1 -1
  1305. package/build/util/parseInvitation.d.mts +4 -6
  1306. package/build/util/parseInvitation.d.mts.map +1 -1
  1307. package/build/util/parseInvitation.mjs +20 -21
  1308. package/build/util/parseInvitation.mjs.map +1 -1
  1309. package/build/util/thread.mjs +1 -1
  1310. package/build/util/thread.mjs.map +1 -1
  1311. package/build/util/transformers.mjs +1 -2
  1312. package/build/util/transformers.mjs.map +1 -1
  1313. package/package.json +3 -5
  1314. package/build/_virtual/_@oxc-project_runtime@0.112.0/helpers/classPrivateFieldGet2.mjs +0 -9
  1315. package/build/_virtual/_@oxc-project_runtime@0.112.0/helpers/classPrivateFieldInitSpec.mjs +0 -9
  1316. package/build/_virtual/_@oxc-project_runtime@0.112.0/helpers/classPrivateFieldSet2.mjs +0 -9
  1317. package/build/envelope/DidCommEnvelope.d.mts +0 -69
  1318. package/build/envelope/DidCommEnvelope.d.mts.map +0 -1
  1319. package/build/envelope/DidCommEnvelopeRegistry.d.mts +0 -72
  1320. package/build/envelope/DidCommEnvelopeRegistry.d.mts.map +0 -1
  1321. package/build/envelope/DidCommEnvelopeRegistry.mjs +0 -84
  1322. package/build/envelope/DidCommEnvelopeRegistry.mjs.map +0 -1
  1323. package/build/envelope/DidCommV1Envelope.d.mts +0 -37
  1324. package/build/envelope/DidCommV1Envelope.d.mts.map +0 -1
  1325. package/build/envelope/DidCommV1Envelope.mjs +0 -48
  1326. package/build/envelope/DidCommV1Envelope.mjs.map +0 -1
  1327. package/build/envelope/DidCommV2Envelope.d.mts +0 -84
  1328. package/build/envelope/DidCommV2Envelope.d.mts.map +0 -1
  1329. package/build/envelope/DidCommV2Envelope.mjs +0 -231
  1330. package/build/envelope/DidCommV2Envelope.mjs.map +0 -1
  1331. package/build/envelope/index.d.mts +0 -4
  1332. package/build/envelope/index.mjs +0 -3
  1333. package/build/messages/common/DidCommEmptyMessage.d.mts +0 -23
  1334. package/build/messages/common/DidCommEmptyMessage.d.mts.map +0 -1
  1335. package/build/messages/common/DidCommEmptyMessage.mjs +0 -40
  1336. package/build/messages/common/DidCommEmptyMessage.mjs.map +0 -1
  1337. package/build/modules/basic-messages/DidCommBasicMessagesModuleConfig.d.mts +0 -27
  1338. package/build/modules/basic-messages/DidCommBasicMessagesModuleConfig.d.mts.map +0 -1
  1339. package/build/modules/basic-messages/DidCommBasicMessagesModuleConfig.mjs +0 -14
  1340. package/build/modules/basic-messages/DidCommBasicMessagesModuleConfig.mjs.map +0 -1
  1341. package/build/modules/basic-messages/protocol/index.d.mts +0 -5
  1342. package/build/modules/basic-messages/protocol/index.mjs +0 -5
  1343. package/build/modules/basic-messages/protocol/v1/handlers/DidCommBasicMessageHandler.mjs.map +0 -1
  1344. package/build/modules/basic-messages/protocol/v1/handlers/index.mjs +0 -1
  1345. package/build/modules/basic-messages/protocol/v1/index.d.mts +0 -2
  1346. package/build/modules/basic-messages/protocol/v1/index.mjs +0 -2
  1347. package/build/modules/basic-messages/protocol/v1/messages/DidCommBasicMessage.d.mts.map +0 -1
  1348. package/build/modules/basic-messages/protocol/v1/messages/DidCommBasicMessage.mjs.map +0 -1
  1349. package/build/modules/basic-messages/protocol/v2/DidCommBasicMessageV2Service.d.mts +0 -32
  1350. package/build/modules/basic-messages/protocol/v2/DidCommBasicMessageV2Service.d.mts.map +0 -1
  1351. package/build/modules/basic-messages/protocol/v2/DidCommBasicMessageV2Service.mjs +0 -81
  1352. package/build/modules/basic-messages/protocol/v2/DidCommBasicMessageV2Service.mjs.map +0 -1
  1353. package/build/modules/basic-messages/protocol/v2/handlers/DidCommBasicMessageV2Handler.mjs +0 -18
  1354. package/build/modules/basic-messages/protocol/v2/handlers/DidCommBasicMessageV2Handler.mjs.map +0 -1
  1355. package/build/modules/basic-messages/protocol/v2/handlers/index.mjs +0 -1
  1356. package/build/modules/basic-messages/protocol/v2/index.d.mts +0 -3
  1357. package/build/modules/basic-messages/protocol/v2/index.mjs +0 -3
  1358. package/build/modules/basic-messages/protocol/v2/messages/DidCommBasicMessageV2.d.mts +0 -41
  1359. package/build/modules/basic-messages/protocol/v2/messages/DidCommBasicMessageV2.d.mts.map +0 -1
  1360. package/build/modules/basic-messages/protocol/v2/messages/DidCommBasicMessageV2.mjs +0 -72
  1361. package/build/modules/basic-messages/protocol/v2/messages/DidCommBasicMessageV2.mjs.map +0 -1
  1362. package/build/modules/basic-messages/protocol/v2/messages/index.d.mts +0 -1
  1363. package/build/modules/basic-messages/protocol/v2/messages/index.mjs +0 -1
  1364. package/build/modules/basic-messages/services/DidCommBaseBasicMessageService.d.mts +0 -23
  1365. package/build/modules/basic-messages/services/DidCommBaseBasicMessageService.d.mts.map +0 -1
  1366. package/build/modules/basic-messages/services/DidCommBaseBasicMessageService.mjs +0 -27
  1367. package/build/modules/basic-messages/services/DidCommBaseBasicMessageService.mjs.map +0 -1
  1368. package/build/modules/connections/handlers/DidCommEmptyMessageHandler.d.mts +0 -21
  1369. package/build/modules/connections/handlers/DidCommEmptyMessageHandler.d.mts.map +0 -1
  1370. package/build/modules/connections/handlers/DidCommEmptyMessageHandler.mjs +0 -22
  1371. package/build/modules/connections/handlers/DidCommEmptyMessageHandler.mjs.map +0 -1
  1372. package/build/modules/connections/repository/DidCommConnectionMetadataTypes.mjs +0 -11
  1373. package/build/modules/connections/repository/DidCommConnectionMetadataTypes.mjs.map +0 -1
  1374. package/build/modules/connections/services/DidCommDidRotateV2Service.d.mts +0 -105
  1375. package/build/modules/connections/services/DidCommDidRotateV2Service.d.mts.map +0 -1
  1376. package/build/modules/connections/services/DidCommDidRotateV2Service.mjs +0 -352
  1377. package/build/modules/connections/services/DidCommDidRotateV2Service.mjs.map +0 -1
  1378. package/build/modules/message-pickup/protocol/v4/DidCommMessagePickupV4Protocol.d.mts +0 -34
  1379. package/build/modules/message-pickup/protocol/v4/DidCommMessagePickupV4Protocol.d.mts.map +0 -1
  1380. package/build/modules/message-pickup/protocol/v4/DidCommMessagePickupV4Protocol.mjs +0 -222
  1381. package/build/modules/message-pickup/protocol/v4/DidCommMessagePickupV4Protocol.mjs.map +0 -1
  1382. package/build/modules/message-pickup/protocol/v4/errors/DidCommMessagePickupV4ProblemReportError.mjs +0 -18
  1383. package/build/modules/message-pickup/protocol/v4/errors/DidCommMessagePickupV4ProblemReportError.mjs.map +0 -1
  1384. package/build/modules/message-pickup/protocol/v4/errors/DidCommMessagePickupV4ProblemReportReason.mjs +0 -9
  1385. package/build/modules/message-pickup/protocol/v4/errors/DidCommMessagePickupV4ProblemReportReason.mjs.map +0 -1
  1386. package/build/modules/message-pickup/protocol/v4/errors/index.mjs +0 -2
  1387. package/build/modules/message-pickup/protocol/v4/handlers/DidCommDeliveryRequestV4Handler.d.mts +0 -19
  1388. package/build/modules/message-pickup/protocol/v4/handlers/DidCommDeliveryRequestV4Handler.d.mts.map +0 -1
  1389. package/build/modules/message-pickup/protocol/v4/handlers/DidCommDeliveryRequestV4Handler.mjs +0 -18
  1390. package/build/modules/message-pickup/protocol/v4/handlers/DidCommDeliveryRequestV4Handler.mjs.map +0 -1
  1391. package/build/modules/message-pickup/protocol/v4/handlers/DidCommLiveDeliveryChangeV4Handler.d.mts +0 -19
  1392. package/build/modules/message-pickup/protocol/v4/handlers/DidCommLiveDeliveryChangeV4Handler.d.mts.map +0 -1
  1393. package/build/modules/message-pickup/protocol/v4/handlers/DidCommLiveDeliveryChangeV4Handler.mjs +0 -18
  1394. package/build/modules/message-pickup/protocol/v4/handlers/DidCommLiveDeliveryChangeV4Handler.mjs.map +0 -1
  1395. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessageDeliveryV4Handler.d.mts +0 -19
  1396. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessageDeliveryV4Handler.d.mts.map +0 -1
  1397. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessageDeliveryV4Handler.mjs +0 -38
  1398. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessageDeliveryV4Handler.mjs.map +0 -1
  1399. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagePickupV4ProblemReportHandler.d.mts +0 -13
  1400. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagePickupV4ProblemReportHandler.d.mts.map +0 -1
  1401. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagePickupV4ProblemReportHandler.mjs +0 -14
  1402. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagePickupV4ProblemReportHandler.mjs.map +0 -1
  1403. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagesReceivedV4Handler.d.mts +0 -16
  1404. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagesReceivedV4Handler.d.mts.map +0 -1
  1405. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagesReceivedV4Handler.mjs +0 -18
  1406. package/build/modules/message-pickup/protocol/v4/handlers/DidCommMessagesReceivedV4Handler.mjs.map +0 -1
  1407. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusRequestV4Handler.d.mts +0 -19
  1408. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusRequestV4Handler.d.mts.map +0 -1
  1409. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusRequestV4Handler.mjs +0 -18
  1410. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusRequestV4Handler.mjs.map +0 -1
  1411. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusV4Handler.d.mts +0 -20
  1412. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusV4Handler.d.mts.map +0 -1
  1413. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusV4Handler.mjs +0 -24
  1414. package/build/modules/message-pickup/protocol/v4/handlers/DidCommStatusV4Handler.mjs.map +0 -1
  1415. package/build/modules/message-pickup/protocol/v4/handlers/index.d.mts +0 -7
  1416. package/build/modules/message-pickup/protocol/v4/handlers/index.mjs +0 -7
  1417. package/build/modules/message-pickup/protocol/v4/index.d.mts +0 -17
  1418. package/build/modules/message-pickup/protocol/v4/index.mjs +0 -17
  1419. package/build/modules/message-pickup/protocol/v4/messages/DidCommDeliveryRequestV4Message.d.mts +0 -23
  1420. package/build/modules/message-pickup/protocol/v4/messages/DidCommDeliveryRequestV4Message.d.mts.map +0 -1
  1421. package/build/modules/message-pickup/protocol/v4/messages/DidCommDeliveryRequestV4Message.mjs +0 -40
  1422. package/build/modules/message-pickup/protocol/v4/messages/DidCommDeliveryRequestV4Message.mjs.map +0 -1
  1423. package/build/modules/message-pickup/protocol/v4/messages/DidCommLiveDeliveryChangeV4Message.d.mts +0 -21
  1424. package/build/modules/message-pickup/protocol/v4/messages/DidCommLiveDeliveryChangeV4Message.d.mts.map +0 -1
  1425. package/build/modules/message-pickup/protocol/v4/messages/DidCommLiveDeliveryChangeV4Message.mjs +0 -33
  1426. package/build/modules/message-pickup/protocol/v4/messages/DidCommLiveDeliveryChangeV4Message.mjs.map +0 -1
  1427. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessageDeliveryV4Message.d.mts +0 -26
  1428. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessageDeliveryV4Message.d.mts.map +0 -1
  1429. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessageDeliveryV4Message.mjs +0 -48
  1430. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessageDeliveryV4Message.mjs.map +0 -1
  1431. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagePickupV4ProblemReportMessage.d.mts +0 -18
  1432. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagePickupV4ProblemReportMessage.d.mts.map +0 -1
  1433. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagePickupV4ProblemReportMessage.mjs +0 -33
  1434. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagePickupV4ProblemReportMessage.mjs.map +0 -1
  1435. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagesReceivedV4Message.d.mts +0 -21
  1436. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagesReceivedV4Message.d.mts.map +0 -1
  1437. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagesReceivedV4Message.mjs +0 -31
  1438. package/build/modules/message-pickup/protocol/v4/messages/DidCommMessagesReceivedV4Message.mjs.map +0 -1
  1439. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusRequestV4Message.d.mts +0 -21
  1440. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusRequestV4Message.d.mts.map +0 -1
  1441. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusRequestV4Message.mjs +0 -34
  1442. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusRequestV4Message.mjs.map +0 -1
  1443. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusV4Message.d.mts +0 -32
  1444. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusV4Message.d.mts.map +0 -1
  1445. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusV4Message.mjs +0 -67
  1446. package/build/modules/message-pickup/protocol/v4/messages/DidCommStatusV4Message.mjs.map +0 -1
  1447. package/build/modules/message-pickup/protocol/v4/messages/index.d.mts +0 -7
  1448. package/build/modules/message-pickup/protocol/v4/messages/index.mjs +0 -7
  1449. package/build/modules/oob/messages/DidCommOutOfBandInvitationV2.d.mts +0 -48
  1450. package/build/modules/oob/messages/DidCommOutOfBandInvitationV2.d.mts.map +0 -1
  1451. package/build/modules/oob/messages/DidCommOutOfBandInvitationV2.mjs +0 -114
  1452. package/build/modules/oob/messages/DidCommOutOfBandInvitationV2.mjs.map +0 -1
  1453. package/build/modules/oob/repository/outOfBandRecordMetadataTypes.mjs +0 -12
  1454. package/build/modules/oob/repository/outOfBandRecordMetadataTypes.mjs.map +0 -1
  1455. package/build/modules/routing/error/DidCommRoutingProblemReportReason.mjs +0 -9
  1456. package/build/modules/routing/error/DidCommRoutingProblemReportReason.mjs.map +0 -1
  1457. package/build/modules/routing/protocol/index.d.mts +0 -17
  1458. package/build/modules/routing/protocol/index.mjs +0 -17
  1459. package/build/modules/routing/protocol/v1/handlers/DidCommForwardHandler.mjs.map +0 -1
  1460. package/build/modules/routing/protocol/v1/handlers/DidCommKeylistUpdateHandler.mjs.map +0 -1
  1461. package/build/modules/routing/protocol/v1/handlers/DidCommKeylistUpdateResponseHandler.mjs.map +0 -1
  1462. package/build/modules/routing/protocol/v1/handlers/DidCommMediationDenyHandler.mjs.map +0 -1
  1463. package/build/modules/routing/protocol/v1/handlers/DidCommMediationGrantHandler.mjs.map +0 -1
  1464. package/build/modules/routing/protocol/v1/handlers/DidCommMediationRequestHandler.mjs.map +0 -1
  1465. package/build/modules/routing/protocol/v1/index.d.mts +0 -8
  1466. package/build/modules/routing/protocol/v1/index.mjs +0 -8
  1467. package/build/modules/routing/protocol/v1/messages/DidCommForwardMessage.d.mts +0 -32
  1468. package/build/modules/routing/protocol/v1/messages/DidCommForwardMessage.d.mts.map +0 -1
  1469. package/build/modules/routing/protocol/v1/messages/DidCommForwardMessage.mjs.map +0 -1
  1470. package/build/modules/routing/protocol/v1/messages/DidCommKeylistMessage.d.mts +0 -27
  1471. package/build/modules/routing/protocol/v1/messages/DidCommKeylistMessage.d.mts.map +0 -1
  1472. package/build/modules/routing/protocol/v1/messages/DidCommKeylistMessage.mjs +0 -37
  1473. package/build/modules/routing/protocol/v1/messages/DidCommKeylistMessage.mjs.map +0 -1
  1474. package/build/modules/routing/protocol/v1/messages/DidCommKeylistUpdateMessage.d.mts +0 -38
  1475. package/build/modules/routing/protocol/v1/messages/DidCommKeylistUpdateMessage.d.mts.map +0 -1
  1476. package/build/modules/routing/protocol/v1/messages/DidCommKeylistUpdateMessage.mjs.map +0 -1
  1477. package/build/modules/routing/protocol/v1/messages/DidCommKeylistUpdateResponseMessage.d.mts.map +0 -1
  1478. package/build/modules/routing/protocol/v1/messages/DidCommKeylistUpdateResponseMessage.mjs.map +0 -1
  1479. package/build/modules/routing/protocol/v1/messages/DidCommMediationDenyMessage.d.mts +0 -23
  1480. package/build/modules/routing/protocol/v1/messages/DidCommMediationDenyMessage.d.mts.map +0 -1
  1481. package/build/modules/routing/protocol/v1/messages/DidCommMediationDenyMessage.mjs.map +0 -1
  1482. package/build/modules/routing/protocol/v1/messages/DidCommMediationGrantMessage.d.mts +0 -29
  1483. package/build/modules/routing/protocol/v1/messages/DidCommMediationGrantMessage.d.mts.map +0 -1
  1484. package/build/modules/routing/protocol/v1/messages/DidCommMediationGrantMessage.mjs.map +0 -1
  1485. package/build/modules/routing/protocol/v1/messages/DidCommMediationRequestMessage.d.mts.map +0 -1
  1486. package/build/modules/routing/protocol/v1/messages/DidCommMediationRequestMessage.mjs.map +0 -1
  1487. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistQueryV2Handler.mjs +0 -23
  1488. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistQueryV2Handler.mjs.map +0 -1
  1489. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistUpdateResponseV2Handler.mjs +0 -18
  1490. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistUpdateResponseV2Handler.mjs.map +0 -1
  1491. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistUpdateV2Handler.mjs +0 -23
  1492. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistUpdateV2Handler.mjs.map +0 -1
  1493. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistV2Handler.mjs +0 -18
  1494. package/build/modules/routing/protocol/v2/handlers/DidCommKeylistV2Handler.mjs.map +0 -1
  1495. package/build/modules/routing/protocol/v2/handlers/DidCommMediationDenyV2Handler.mjs +0 -18
  1496. package/build/modules/routing/protocol/v2/handlers/DidCommMediationDenyV2Handler.mjs.map +0 -1
  1497. package/build/modules/routing/protocol/v2/handlers/DidCommMediationGrantV2Handler.mjs +0 -18
  1498. package/build/modules/routing/protocol/v2/handlers/DidCommMediationGrantV2Handler.mjs.map +0 -1
  1499. package/build/modules/routing/protocol/v2/handlers/DidCommMediationRequestV2Handler.mjs +0 -28
  1500. package/build/modules/routing/protocol/v2/handlers/DidCommMediationRequestV2Handler.mjs.map +0 -1
  1501. package/build/modules/routing/protocol/v2/handlers/index.mjs +0 -7
  1502. package/build/modules/routing/protocol/v2/index.d.mts +0 -9
  1503. package/build/modules/routing/protocol/v2/index.mjs +0 -9
  1504. package/build/modules/routing/protocol/v2/messages/DidCommForwardV2Message.d.mts +0 -60
  1505. package/build/modules/routing/protocol/v2/messages/DidCommForwardV2Message.d.mts.map +0 -1
  1506. package/build/modules/routing/protocol/v2/messages/DidCommForwardV2Message.mjs +0 -70
  1507. package/build/modules/routing/protocol/v2/messages/DidCommForwardV2Message.mjs.map +0 -1
  1508. package/build/modules/routing/protocol/v2/messages/DidCommKeylistQueryV2Message.d.mts +0 -35
  1509. package/build/modules/routing/protocol/v2/messages/DidCommKeylistQueryV2Message.d.mts.map +0 -1
  1510. package/build/modules/routing/protocol/v2/messages/DidCommKeylistQueryV2Message.mjs +0 -50
  1511. package/build/modules/routing/protocol/v2/messages/DidCommKeylistQueryV2Message.mjs.map +0 -1
  1512. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateResponseV2Message.d.mts +0 -45
  1513. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateResponseV2Message.d.mts.map +0 -1
  1514. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateResponseV2Message.mjs +0 -64
  1515. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateResponseV2Message.mjs.map +0 -1
  1516. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateV2Message.d.mts +0 -39
  1517. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateV2Message.d.mts.map +0 -1
  1518. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateV2Message.mjs +0 -60
  1519. package/build/modules/routing/protocol/v2/messages/DidCommKeylistUpdateV2Message.mjs.map +0 -1
  1520. package/build/modules/routing/protocol/v2/messages/DidCommKeylistV2Message.d.mts +0 -47
  1521. package/build/modules/routing/protocol/v2/messages/DidCommKeylistV2Message.d.mts.map +0 -1
  1522. package/build/modules/routing/protocol/v2/messages/DidCommKeylistV2Message.mjs +0 -68
  1523. package/build/modules/routing/protocol/v2/messages/DidCommKeylistV2Message.mjs.map +0 -1
  1524. package/build/modules/routing/protocol/v2/messages/DidCommMediateDenyV2Message.d.mts +0 -25
  1525. package/build/modules/routing/protocol/v2/messages/DidCommMediateDenyV2Message.d.mts.map +0 -1
  1526. package/build/modules/routing/protocol/v2/messages/DidCommMediateDenyV2Message.mjs +0 -29
  1527. package/build/modules/routing/protocol/v2/messages/DidCommMediateDenyV2Message.mjs.map +0 -1
  1528. package/build/modules/routing/protocol/v2/messages/DidCommMediateGrantV2Message.d.mts +0 -27
  1529. package/build/modules/routing/protocol/v2/messages/DidCommMediateGrantV2Message.d.mts.map +0 -1
  1530. package/build/modules/routing/protocol/v2/messages/DidCommMediateGrantV2Message.mjs +0 -38
  1531. package/build/modules/routing/protocol/v2/messages/DidCommMediateGrantV2Message.mjs.map +0 -1
  1532. package/build/modules/routing/protocol/v2/messages/DidCommMediateRequestV2Message.d.mts +0 -24
  1533. package/build/modules/routing/protocol/v2/messages/DidCommMediateRequestV2Message.d.mts.map +0 -1
  1534. package/build/modules/routing/protocol/v2/messages/DidCommMediateRequestV2Message.mjs +0 -28
  1535. package/build/modules/routing/protocol/v2/messages/DidCommMediateRequestV2Message.mjs.map +0 -1
  1536. package/build/modules/routing/protocol/v2/messages/index.d.mts +0 -8
  1537. package/build/modules/routing/protocol/v2/messages/index.mjs +0 -8
  1538. package/build/util/didcommVersion.d.mts +0 -35
  1539. package/build/util/didcommVersion.d.mts.map +0 -1
  1540. package/build/util/didcommVersion.mjs +0 -71
  1541. package/build/util/didcommVersion.mjs.map +0 -1
  1542. package/build/v2/DidCommV2EnvelopeService.d.mts +0 -87
  1543. package/build/v2/DidCommV2EnvelopeService.d.mts.map +0 -1
  1544. package/build/v2/DidCommV2EnvelopeService.mjs +0 -345
  1545. package/build/v2/DidCommV2EnvelopeService.mjs.map +0 -1
  1546. package/build/v2/apuApv.mjs +0 -14
  1547. package/build/v2/apuApv.mjs.map +0 -1
  1548. package/build/v2/index.d.mts +0 -5
  1549. package/build/v2/index.mjs +0 -5
  1550. package/build/v2/normalize.d.mts +0 -16
  1551. package/build/v2/normalize.d.mts.map +0 -1
  1552. package/build/v2/normalize.mjs +0 -53
  1553. package/build/v2/normalize.mjs.map +0 -1
  1554. package/build/v2/plaintextBuilder.d.mts +0 -22
  1555. package/build/v2/plaintextBuilder.d.mts.map +0 -1
  1556. package/build/v2/plaintextBuilder.mjs +0 -86
  1557. package/build/v2/plaintextBuilder.mjs.map +0 -1
  1558. package/build/v2/resolveV2Keys.d.mts +0 -61
  1559. package/build/v2/resolveV2Keys.d.mts.map +0 -1
  1560. package/build/v2/resolveV2Keys.mjs +0 -237
  1561. package/build/v2/resolveV2Keys.mjs.map +0 -1
  1562. package/build/v2/types.d.mts +0 -89
  1563. package/build/v2/types.d.mts.map +0 -1
  1564. package/build/v2/types.mjs +0 -29
  1565. package/build/v2/types.mjs.map +0 -1
package/README.md CHANGED
@@ -30,8 +30,6 @@
30
30
 
31
31
  Base DIDComm package for [Credo](https://github.com/openwallet-foundation/credo-ts.git). Adds all [DIDComm v1](https://hyperledger.github.io/aries-rfcs/latest/concepts/0005-didcomm/) Core protocols, such as Connections, Out-of-Band, Discover Features, Mediation Coordination, Message Pickup, Proofs and Credentials as defined in [Aries RFCs](https://github.com/hyperledger/aries-rfcs/tree/main/features).
32
32
 
33
- DIDComm v1 is the default. [DIDComm v2](https://identity.foundation/didcomm-messaging/spec/v2.0/) support is **opt-in** and experimental. See [DIDComm v2 Usage](../../docs/DIDCOMM-V2-USAGE.md) for how to enable it.
34
-
35
33
  ### Quick start
36
34
 
37
35
  In order for this module to work, we have to inject it into the agent to access agent functionality. See the example for more information.
@@ -1,17 +1,11 @@
1
1
  import { ParsedMessageType } from "./util/messageType.mjs";
2
2
  import { Constructor } from "@credo-ts/core";
3
-
4
3
  //#region src/BaseDidCommMessage.d.ts
5
- declare class BaseDidCommMessage {
4
+ export declare class BaseDidCommMessage {
6
5
  id: string;
7
6
  readonly type: string;
8
7
  static readonly type: ParsedMessageType;
9
- /** Sender DID (DIDComm v2 plaintext). Set when normalized from v2 envelope. */
10
- from?: string;
11
- /** Recipient DID(s) (DIDComm v2 plaintext). Set when normalized from v2 envelope. */
12
- to?: string | string[];
13
8
  generateId(): string;
14
9
  }
15
10
  //#endregion
16
- export { BaseDidCommMessage };
17
11
  //# sourceMappingURL=BaseDidCommMessage.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseDidCommMessage.d.mts","names":[],"sources":["../src/BaseDidCommMessage.ts"],"mappings":";;;;cAWa,kBAAA;EAGJ,EAAA;EAAA,SAIS,IAAA;EAAA,gBACO,IAAA,EAAM,iBAAA;EADb;EAKT,IAAA;EAJsB;EAQtB,EAAA;EAEA,UAAA,CAAA;AAAA"}
1
+ {"version":3,"file":"BaseDidCommMessage.d.mts","names":[],"sources":["../src/BaseDidCommMessage.ts"],"mappings":";;;qBAWa;EAGJ;WAIS;kBACO,MAAM;EAEtB"}
@@ -1,9 +1,8 @@
1
- import { __decorate } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
2
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
1
+ import __decorate from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.mjs";
2
+ import __decorateMetadata from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.mjs";
3
3
  import { utils } from "@credo-ts/core";
4
4
  import { Matches } from "class-validator";
5
5
  import { Expose } from "class-transformer";
6
-
7
6
  //#region src/BaseDidCommMessage.ts
8
7
  const MessageIdRegExp = /[-_./a-zA-Z0-9]{8,64}/;
9
8
  const MessageTypeRegExp = /(.*?)([a-zA-Z0-9._-]+)\/(\d[^/]*)\/([a-zA-Z0-9._-]+)$/;
@@ -22,9 +21,7 @@ __decorate([
22
21
  Matches(MessageTypeRegExp),
23
22
  __decorateMetadata("design:type", String)
24
23
  ], BaseDidCommMessage.prototype, "type", void 0);
25
- __decorate([Expose(), __decorateMetadata("design:type", String)], BaseDidCommMessage.prototype, "from", void 0);
26
- __decorate([Expose(), __decorateMetadata("design:type", Object)], BaseDidCommMessage.prototype, "to", void 0);
27
-
28
24
  //#endregion
29
25
  export { BaseDidCommMessage, MessageIdRegExp, MessageTypeRegExp };
26
+
30
27
  //# sourceMappingURL=BaseDidCommMessage.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseDidCommMessage.mjs","names":[],"sources":["../src/BaseDidCommMessage.ts"],"sourcesContent":["import type { Constructor } from '@credo-ts/core'\nimport { utils } from '@credo-ts/core'\nimport { Expose } from 'class-transformer'\nimport { Matches } from 'class-validator'\nimport type { ParsedMessageType } from './util/messageType'\n\nexport const MessageIdRegExp = /[-_./a-zA-Z0-9]{8,64}/\nexport const MessageTypeRegExp = /(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$/\n\nexport type BaseMessageConstructor = Constructor<BaseDidCommMessage>\n\nexport class BaseDidCommMessage {\n @Matches(MessageIdRegExp)\n @Expose({ name: '@id' })\n public id!: string\n\n @Expose({ name: '@type' })\n @Matches(MessageTypeRegExp)\n public readonly type!: string\n public static readonly type: ParsedMessageType\n\n /** Sender DID (DIDComm v2 plaintext). Set when normalized from v2 envelope. */\n @Expose()\n public from?: string\n\n /** Recipient DID(s) (DIDComm v2 plaintext). Set when normalized from v2 envelope. */\n @Expose()\n public to?: string | string[]\n\n public generateId() {\n return utils.uuid()\n }\n}\n"],"mappings":";;;;;;;AAMA,MAAa,kBAAkB;AAC/B,MAAa,oBAAoB;AAIjC,IAAa,qBAAb,MAAgC;CAkB9B,AAAO,aAAa;AAClB,SAAO,MAAM,MAAM;;;;CAlBpB,QAAQ,gBAAgB;CACxB,OAAO,EAAE,MAAM,OAAO,CAAC;;;;CAGvB,OAAO,EAAE,MAAM,SAAS,CAAC;CACzB,QAAQ,kBAAkB;;;YAK1B,QAAQ;YAIR,QAAQ"}
1
+ {"version":3,"file":"BaseDidCommMessage.mjs","names":[],"sources":["../src/BaseDidCommMessage.ts"],"sourcesContent":["import type { Constructor } from '@credo-ts/core'\nimport { utils } from '@credo-ts/core'\nimport { Expose } from 'class-transformer'\nimport { Matches } from 'class-validator'\nimport type { ParsedMessageType } from './util/messageType'\n\nexport const MessageIdRegExp = /[-_./a-zA-Z0-9]{8,64}/\nexport const MessageTypeRegExp = /(.*?)([a-zA-Z0-9._-]+)\\/(\\d[^/]*)\\/([a-zA-Z0-9._-]+)$/\n\nexport type BaseMessageConstructor = Constructor<BaseDidCommMessage>\n\nexport class BaseDidCommMessage {\n @Matches(MessageIdRegExp)\n @Expose({ name: '@id' })\n public id!: string\n\n @Expose({ name: '@type' })\n @Matches(MessageTypeRegExp)\n public readonly type!: string\n public static readonly type: ParsedMessageType\n\n public generateId() {\n return utils.uuid()\n }\n}\n"],"mappings":";;;;;;AAMA,MAAa,kBAAkB;AAC/B,MAAa,oBAAoB;AAIjC,IAAa,qBAAb,MAAgC;CAU9B,aAAoB;EAClB,OAAO,MAAM,KAAK;CACpB;AACF;;CAZG,QAAQ,eAAe;CACvB,OAAO,EAAE,MAAM,MAAM,CAAC;;;;CAGtB,OAAO,EAAE,MAAM,QAAQ,CAAC;CACxB,QAAQ,iBAAiB"}
@@ -1,11 +1,11 @@
1
1
  import { DidCommMessageHandler } from "./handlers/DidCommMessageHandler.mjs";
2
2
  import { DidCommMessageHandlerMiddleware } from "./handlers/DidCommMessageHandlerMiddleware.mjs";
3
- import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
3
+ import "./handlers/index.mjs";
4
4
  import { DidCommBasicMessagesApi } from "./modules/basic-messages/DidCommBasicMessagesApi.mjs";
5
+ import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
5
6
  import { DidCommCredentialProtocol } from "./modules/credentials/protocol/DidCommCredentialProtocol.mjs";
6
7
  import { DidCommCredentialsModuleConfigOptions } from "./modules/credentials/DidCommCredentialsModuleConfig.mjs";
7
8
  import { DidCommCredentialsApi } from "./modules/credentials/DidCommCredentialsApi.mjs";
8
- import "./handlers/index.mjs";
9
9
  import { DefaultDidCommCredentialProtocols } from "./modules/credentials/DidCommCredentialsModule.mjs";
10
10
  import { DidCommDiscoverFeaturesApi } from "./modules/discover-features/DidCommDiscoverFeaturesApi.mjs";
11
11
  import { DidCommMessagePickupProtocol } from "./modules/message-pickup/protocol/DidCommMessagePickupProtocol.mjs";
@@ -32,10 +32,9 @@ import { DidCommFeatureRegistry } from "./DidCommFeatureRegistry.mjs";
32
32
  import { DidCommDiscoverFeaturesService } from "./modules/discover-features/services/DidCommDiscoverFeaturesService.mjs";
33
33
  import "./modules/discover-features/services/index.mjs";
34
34
  import { AgentContext } from "@credo-ts/core";
35
-
36
35
  //#region src/DidCommApi.d.ts
37
36
  type ApiOrUndefined<Config, Api> = Config extends false ? never : Api;
38
- declare class DidCommApi<Options extends DidCommModuleConfigOptions> {
37
+ export declare class DidCommApi<Options extends DidCommModuleConfigOptions> {
39
38
  agentContext: AgentContext;
40
39
  private messageHandlerRegistry;
41
40
  private featureRegistry;
@@ -72,5 +71,4 @@ declare class DidCommApi<Options extends DidCommModuleConfigOptions> {
72
71
  private apiOrUndefined;
73
72
  }
74
73
  //#endregion
75
- export { DidCommApi };
76
74
  //# sourceMappingURL=DidCommApi.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommApi.d.mts","names":[],"sources":["../src/DidCommApi.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BK,cAA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vD,sBAAA,CAAA,KAAsB,cAAA,EAJgE,4BAAA,KAIhE,OAAA,CAAA,6BAAA;EAAA,IAItB,yBAAA,CAAA,GAAyB,+BAAA;EAlGV;;;;EA0GnB,yBAAA,CAA0B,sBAAA,EAAwB,qBAAA;EAAA,IAI9C,QAAA,CAAA,GAAQ,sBAAA;EAAA,QAIX,cAAA;AAAA"}
1
+ {"version":3,"file":"DidCommApi.d.mts","names":[],"sources":["../src/DidCommApi.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BK,eAAe,QAAQ,OAAO,+BAA+B;qBAGrD,WAAW,gBAAgB;EA6C7B,cAAc;UACb;UACA;EACD,QAAQ;EA/CV,aAAW;EACX,KAAG;EACH,WAAS,2BADN;EAEH,QAAQ,eACb,mBACA,iBACE,0BAA0B,iCAAiC,0BACvD,sCACA;EAID,aAAa,eAClB,wBACA,sBACE,+BAA+B,sCAAsC,+BACjE,gDACA;EAID,eAAe,eACpB,0BACA,wBACE,iCAAiC,wCAAwC,kCACrE,wCACA;EAID,eAAe,eAAe,0BAA0B;EAKxD,UAAU,eAAe,qBAAqB;EAK9C,oBAAoB,eAAe,+BAA+B;EAIhE,YAAA,cAAc,cACb,wBAAwB,+BACxB,iBAAiB,wBAClB,QAAQ;EAGV,yBAAyB,kBAAkB;EAIrC,2BAA2B,kBAAkB,0BAAuB;MAKtE,qBAAiB;EAIrB,0BAA0B,mBAAmB;EAIvC,4BAA4B,mBAAmB,2BAAwB;MAMzE,sBAAkB;;;;EAOtB,wBAAwB,iBAAiB;EAMzC,iCAAiC,0BAA0B;MAIvD,4BAAsB,gBAJiC,iCAIjC,QAAA;MAItB,6BAAyB;;;;;EAQ7B,0BAA0B,wBAAwB;MAI9C,YAAQ;UAIX"}
@@ -1,10 +1,10 @@
1
- import { __decorate } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
1
+ import __decorate from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.mjs";
2
2
  import { DidCommFeatureRegistry } from "./DidCommFeatureRegistry.mjs";
3
3
  import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
4
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
4
+ import __decorateMetadata from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.mjs";
5
5
  import { DidCommModuleConfig } from "./DidCommModuleConfig.mjs";
6
- import { DidCommBasicMessagesApi } from "./modules/basic-messages/DidCommBasicMessagesApi.mjs";
7
6
  import { DidCommConnectionsApi } from "./modules/connections/DidCommConnectionsApi.mjs";
7
+ import { DidCommBasicMessagesApi } from "./modules/basic-messages/DidCommBasicMessagesApi.mjs";
8
8
  import { DidCommOutOfBandApi } from "./modules/oob/DidCommOutOfBandApi.mjs";
9
9
  import { DidCommDiscoverFeaturesApi } from "./modules/discover-features/DidCommDiscoverFeaturesApi.mjs";
10
10
  import { DidCommMessagePickupApi } from "./modules/message-pickup/DidCommMessagePickupApi.mjs";
@@ -14,9 +14,7 @@ import { DidCommCredentialsApi } from "./modules/credentials/DidCommCredentialsA
14
14
  import { DidCommProofsApi } from "./modules/proofs/DidCommProofsApi.mjs";
15
15
  import "./modules/index.mjs";
16
16
  import { AgentContext, injectable } from "@credo-ts/core";
17
-
18
17
  //#region src/DidCommApi.ts
19
- var _ref, _ref2, _ref3, _ref4;
20
18
  let DidCommApi = class DidCommApi {
21
19
  constructor(agentContext, messageHandlerRegistry, featureRegistry, config) {
22
20
  this.agentContext = agentContext;
@@ -82,12 +80,12 @@ let DidCommApi = class DidCommApi {
82
80
  }
83
81
  };
84
82
  DidCommApi = __decorate([injectable(), __decorateMetadata("design:paramtypes", [
85
- typeof (_ref = typeof AgentContext !== "undefined" && AgentContext) === "function" ? _ref : Object,
86
- typeof (_ref2 = typeof DidCommMessageHandlerRegistry !== "undefined" && DidCommMessageHandlerRegistry) === "function" ? _ref2 : Object,
87
- typeof (_ref3 = typeof DidCommFeatureRegistry !== "undefined" && DidCommFeatureRegistry) === "function" ? _ref3 : Object,
88
- typeof (_ref4 = typeof DidCommModuleConfig !== "undefined" && DidCommModuleConfig) === "function" ? _ref4 : Object
83
+ typeof AgentContext === "undefined" ? Object : AgentContext,
84
+ typeof DidCommMessageHandlerRegistry === "undefined" ? Object : DidCommMessageHandlerRegistry,
85
+ typeof DidCommFeatureRegistry === "undefined" ? Object : DidCommFeatureRegistry,
86
+ typeof DidCommModuleConfig === "undefined" ? Object : DidCommModuleConfig
89
87
  ])], DidCommApi);
90
-
91
88
  //#endregion
92
89
  export { DidCommApi };
90
+
93
91
  //# sourceMappingURL=DidCommApi.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommApi.mjs","names":[],"sources":["../src/DidCommApi.ts"],"sourcesContent":["import { AgentContext, type InjectionToken, injectable } from '@credo-ts/core'\nimport { DidCommFeatureRegistry } from './DidCommFeatureRegistry'\nimport { DidCommMessageHandlerRegistry } from './DidCommMessageHandlerRegistry'\nimport { DidCommModuleConfig, type DidCommModuleConfigOptions } from './DidCommModuleConfig'\nimport type { DidCommMessageHandler, DidCommMessageHandlerMiddleware } from './handlers'\nimport {\n type DefaultDidCommMessagePickupProtocols,\n type DefaultDidCommProofProtocols,\n DidCommBasicMessagesApi,\n DidCommConnectionsApi,\n type DidCommCredentialProtocol,\n DidCommDiscoverFeaturesApi,\n DidCommMessagePickupApi,\n type DidCommMessagePickupModuleConfigOptions,\n type DidCommMessagePickupProtocol,\n DidCommOutOfBandApi,\n type DidCommProofProtocol,\n DidCommProofsApi,\n type DidCommProofsModuleConfigOptions,\n} from './modules'\nimport { DidCommCredentialsApi } from './modules/credentials/DidCommCredentialsApi'\nimport type { DefaultDidCommCredentialProtocols } from './modules/credentials/DidCommCredentialsModule'\nimport type { DidCommCredentialsModuleConfigOptions } from './modules/credentials/DidCommCredentialsModuleConfig'\nimport { DidCommMediationRecipientApi } from './modules/routing/DidCommMediationRecipientApi'\nimport { DidCommMediatorApi } from './modules/routing/DidCommMediatorApi'\nimport type { DidCommInboundTransport, DidCommOutboundTransport } from './transport'\n\ntype ApiOrUndefined<Config, Api> = Config extends false ? never : Api\n\n@injectable()\nexport class DidCommApi<Options extends DidCommModuleConfigOptions> {\n public connections = this.agentContext.resolve(DidCommConnectionsApi)\n public oob = this.agentContext.resolve(DidCommOutOfBandApi)\n public discovery = this.agentContext.resolve(DidCommDiscoverFeaturesApi)\n public proofs: ApiOrUndefined<\n Options['proofs'],\n DidCommProofsApi<\n Options['proofs'] extends DidCommProofsModuleConfigOptions<DidCommProofProtocol[]>\n ? Options['proofs']['proofProtocols']\n : DefaultDidCommProofProtocols\n >\n > = this.apiOrUndefined(this.config.enabledModules.proofs, DidCommProofsApi)\n\n public credentials: ApiOrUndefined<\n Options['credentials'],\n DidCommCredentialsApi<\n Options['credentials'] extends DidCommCredentialsModuleConfigOptions<DidCommCredentialProtocol[]>\n ? Options['credentials']['credentialProtocols']\n : DefaultDidCommCredentialProtocols\n >\n > = this.apiOrUndefined(this.config.enabledModules.credentials, DidCommCredentialsApi)\n\n public messagePickup: ApiOrUndefined<\n Options['messagePickup'],\n DidCommMessagePickupApi<\n Options['messagePickup'] extends DidCommMessagePickupModuleConfigOptions<DidCommMessagePickupProtocol[]>\n ? Options['messagePickup']['protocols']\n : DefaultDidCommMessagePickupProtocols\n >\n > = this.apiOrUndefined(this.config.enabledModules.messagePickup, DidCommMessagePickupApi)\n\n public basicMessages: ApiOrUndefined<Options['basicMessages'], DidCommBasicMessagesApi> = this.apiOrUndefined(\n this.config.enabledModules.basicMessages,\n DidCommBasicMessagesApi\n )\n\n public mediator: ApiOrUndefined<Options['mediator'], DidCommMediatorApi> = this.apiOrUndefined(\n this.config.enabledModules.mediator,\n DidCommMediatorApi\n )\n\n public mediationRecipient: ApiOrUndefined<Options['mediationRecipient'], DidCommMediationRecipientApi> =\n this.apiOrUndefined(this.config.enabledModules.mediationRecipient, DidCommMediationRecipientApi)\n\n public constructor(\n public agentContext: AgentContext,\n private messageHandlerRegistry: DidCommMessageHandlerRegistry,\n private featureRegistry: DidCommFeatureRegistry,\n public config: DidCommModuleConfig\n ) {}\n\n public registerInboundTransport(inboundTransport: DidCommInboundTransport) {\n this.config.inboundTransports.push(inboundTransport)\n }\n\n public async unregisterInboundTransport(inboundTransport: DidCommInboundTransport) {\n this.config.inboundTransports = this.config.inboundTransports.filter((transport) => transport !== inboundTransport)\n await inboundTransport.stop()\n }\n\n public get inboundTransports() {\n return this.config.inboundTransports\n }\n\n public registerOutboundTransport(outboundTransport: DidCommOutboundTransport) {\n this.config.outboundTransports.push(outboundTransport)\n }\n\n public async unregisterOutboundTransport(outboundTransport: DidCommOutboundTransport) {\n this.config.outboundTransports = this.config.outboundTransports.filter(\n (transport) => transport !== outboundTransport\n )\n }\n\n public get outboundTransports() {\n return this.config.outboundTransports\n }\n\n /**\n * Agent's feature registry\n */\n public registerMessageHandlers(messageHandlers: DidCommMessageHandler[]) {\n for (const messageHandler of messageHandlers) {\n this.messageHandlerRegistry.registerMessageHandler(messageHandler)\n }\n }\n\n public registerMessageHandlerMiddleware(messageHandlerMiddleware: DidCommMessageHandlerMiddleware) {\n this.messageHandlerRegistry.registerMessageHandlerMiddleware(messageHandlerMiddleware)\n }\n\n public get fallbackMessageHandler() {\n return this.messageHandlerRegistry.fallbackMessageHandler\n }\n\n public get messageHandlerMiddlewares() {\n return this.messageHandlerRegistry.messageHandlerMiddlewares\n }\n\n /**\n * Sets the fallback message handler, the message handler that will be called if no handler\n * is registered for an incoming message type.\n */\n public setFallbackMessageHandler(fallbackMessageHandler: DidCommMessageHandler['handle']) {\n this.messageHandlerRegistry.setFallbackMessageHandler(fallbackMessageHandler)\n }\n\n public get features() {\n return this.featureRegistry\n }\n\n private apiOrUndefined(isEnabled: boolean, apiClass: InjectionToken) {\n if (isEnabled) {\n return this.agentContext.resolve(apiClass)\n }\n\n return undefined\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA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AAW,yBAAyB;AAClC,SAAO,KAAK,uBAAuB;;CAGrC,IAAW,4BAA4B;AACrC,SAAO,KAAK,uBAAuB;;;;;;CAOrC,AAAO,0BAA0B,wBAAyD;AACxF,OAAK,uBAAuB,0BAA0B,uBAAuB;;CAG/E,IAAW,WAAW;AACpB,SAAO,KAAK;;CAGd,AAAQ,eAAe,WAAoB,UAA0B;AACnE,MAAI,UACF,QAAO,KAAK,aAAa,QAAQ,SAAS;;;yBAlH/C,YAAY"}
1
+ {"version":3,"file":"DidCommApi.mjs","names":[],"sources":["../src/DidCommApi.ts"],"sourcesContent":["import { AgentContext, type InjectionToken, injectable } from '@credo-ts/core'\nimport { DidCommFeatureRegistry } from './DidCommFeatureRegistry'\nimport { DidCommMessageHandlerRegistry } from './DidCommMessageHandlerRegistry'\nimport { DidCommModuleConfig, type DidCommModuleConfigOptions } from './DidCommModuleConfig'\nimport type { DidCommMessageHandler, DidCommMessageHandlerMiddleware } from './handlers'\nimport {\n type DefaultDidCommMessagePickupProtocols,\n type DefaultDidCommProofProtocols,\n DidCommBasicMessagesApi,\n DidCommConnectionsApi,\n type DidCommCredentialProtocol,\n DidCommDiscoverFeaturesApi,\n DidCommMessagePickupApi,\n type DidCommMessagePickupModuleConfigOptions,\n type DidCommMessagePickupProtocol,\n DidCommOutOfBandApi,\n type DidCommProofProtocol,\n DidCommProofsApi,\n type DidCommProofsModuleConfigOptions,\n} from './modules'\nimport { DidCommCredentialsApi } from './modules/credentials/DidCommCredentialsApi'\nimport type { DefaultDidCommCredentialProtocols } from './modules/credentials/DidCommCredentialsModule'\nimport type { DidCommCredentialsModuleConfigOptions } from './modules/credentials/DidCommCredentialsModuleConfig'\nimport { DidCommMediationRecipientApi } from './modules/routing/DidCommMediationRecipientApi'\nimport { DidCommMediatorApi } from './modules/routing/DidCommMediatorApi'\nimport type { DidCommInboundTransport, DidCommOutboundTransport } from './transport'\n\ntype ApiOrUndefined<Config, Api> = Config extends false ? never : Api\n\n@injectable()\nexport class DidCommApi<Options extends DidCommModuleConfigOptions> {\n public connections = this.agentContext.resolve(DidCommConnectionsApi)\n public oob = this.agentContext.resolve(DidCommOutOfBandApi)\n public discovery = this.agentContext.resolve(DidCommDiscoverFeaturesApi)\n public proofs: ApiOrUndefined<\n Options['proofs'],\n DidCommProofsApi<\n Options['proofs'] extends DidCommProofsModuleConfigOptions<DidCommProofProtocol[]>\n ? Options['proofs']['proofProtocols']\n : DefaultDidCommProofProtocols\n >\n > = this.apiOrUndefined(this.config.enabledModules.proofs, DidCommProofsApi)\n\n public credentials: ApiOrUndefined<\n Options['credentials'],\n DidCommCredentialsApi<\n Options['credentials'] extends DidCommCredentialsModuleConfigOptions<DidCommCredentialProtocol[]>\n ? Options['credentials']['credentialProtocols']\n : DefaultDidCommCredentialProtocols\n >\n > = this.apiOrUndefined(this.config.enabledModules.credentials, DidCommCredentialsApi)\n\n public messagePickup: ApiOrUndefined<\n Options['messagePickup'],\n DidCommMessagePickupApi<\n Options['messagePickup'] extends DidCommMessagePickupModuleConfigOptions<DidCommMessagePickupProtocol[]>\n ? Options['messagePickup']['protocols']\n : DefaultDidCommMessagePickupProtocols\n >\n > = this.apiOrUndefined(this.config.enabledModules.messagePickup, DidCommMessagePickupApi)\n\n public basicMessages: ApiOrUndefined<Options['basicMessages'], DidCommBasicMessagesApi> = this.apiOrUndefined(\n this.config.enabledModules.basicMessages,\n DidCommBasicMessagesApi\n )\n\n public mediator: ApiOrUndefined<Options['mediator'], DidCommMediatorApi> = this.apiOrUndefined(\n this.config.enabledModules.mediator,\n DidCommMediatorApi\n )\n\n public mediationRecipient: ApiOrUndefined<Options['mediationRecipient'], DidCommMediationRecipientApi> =\n this.apiOrUndefined(this.config.enabledModules.mediationRecipient, DidCommMediationRecipientApi)\n\n public constructor(\n public agentContext: AgentContext,\n private messageHandlerRegistry: DidCommMessageHandlerRegistry,\n private featureRegistry: DidCommFeatureRegistry,\n public config: DidCommModuleConfig\n ) {}\n\n public registerInboundTransport(inboundTransport: DidCommInboundTransport) {\n this.config.inboundTransports.push(inboundTransport)\n }\n\n public async unregisterInboundTransport(inboundTransport: DidCommInboundTransport) {\n this.config.inboundTransports = this.config.inboundTransports.filter((transport) => transport !== inboundTransport)\n await inboundTransport.stop()\n }\n\n public get inboundTransports() {\n return this.config.inboundTransports\n }\n\n public registerOutboundTransport(outboundTransport: DidCommOutboundTransport) {\n this.config.outboundTransports.push(outboundTransport)\n }\n\n public async unregisterOutboundTransport(outboundTransport: DidCommOutboundTransport) {\n this.config.outboundTransports = this.config.outboundTransports.filter(\n (transport) => transport !== outboundTransport\n )\n }\n\n public get outboundTransports() {\n return this.config.outboundTransports\n }\n\n /**\n * Agent's feature registry\n */\n public registerMessageHandlers(messageHandlers: DidCommMessageHandler[]) {\n for (const messageHandler of messageHandlers) {\n this.messageHandlerRegistry.registerMessageHandler(messageHandler)\n }\n }\n\n public registerMessageHandlerMiddleware(messageHandlerMiddleware: DidCommMessageHandlerMiddleware) {\n this.messageHandlerRegistry.registerMessageHandlerMiddleware(messageHandlerMiddleware)\n }\n\n public get fallbackMessageHandler() {\n return this.messageHandlerRegistry.fallbackMessageHandler\n }\n\n public get messageHandlerMiddlewares() {\n return this.messageHandlerRegistry.messageHandlerMiddlewares\n }\n\n /**\n * Sets the fallback message handler, the message handler that will be called if no handler\n * is registered for an incoming message type.\n */\n public setFallbackMessageHandler(fallbackMessageHandler: DidCommMessageHandler['handle']) {\n this.messageHandlerRegistry.setFallbackMessageHandler(fallbackMessageHandler)\n }\n\n public get features() {\n return this.featureRegistry\n }\n\n private apiOrUndefined(isEnabled: boolean, apiClass: InjectionToken) {\n if (isEnabled) {\n return this.agentContext.resolve(apiClass)\n }\n\n return undefined\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BO,IAAM,aAAN,MAAM,WAAuD;CA4ClE,YACE,cACA,wBACA,iBACA,QACA;EAJO,KAAA,eAAA;EACC,KAAA,yBAAA;EACA,KAAA,kBAAA;EACD,KAAA,SAAA;EA/CT,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AEA,IAAW,4BAA4B;EACrC,OAAO,KAAK,uBAAuB;CACrC;;;;;CAMA,0BAAiC,wBAAyD;EACxF,KAAK,uBAAuB,0BAA0B,sBAAsB;CAC9E;CAEA,IAAW,WAAW;EACpB,OAAO,KAAK;CACd;CAEA,eAAuB,WAAoB,UAA0B;EACnE,IAAI,WACF,OAAO,KAAK,aAAa,QAAQ,QAAQ;CAI7C;AACF;AAvHC,aAAA,WAAA,CAAA,WAAW,GAAA,mBAAA,qBAAA"}
@@ -2,9 +2,8 @@ import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.m
2
2
  import { DidCommMessageSender } from "./DidCommMessageSender.mjs";
3
3
  import { DidCommInboundMessageContext } from "./models/DidCommInboundMessageContext.mjs";
4
4
  import { EventEmitter, Logger } from "@credo-ts/core";
5
-
6
5
  //#region src/DidCommDispatcher.d.ts
7
- declare class DidCommDispatcher {
6
+ export declare class DidCommDispatcher {
8
7
  private messageHandlerRegistry;
9
8
  private messageSender;
10
9
  private eventEmitter;
@@ -14,5 +13,4 @@ declare class DidCommDispatcher {
14
13
  dispatch(messageContext: DidCommInboundMessageContext): Promise<void>;
15
14
  }
16
15
  //#endregion
17
- export { DidCommDispatcher };
18
16
  //# sourceMappingURL=DidCommDispatcher.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommDispatcher.d.mts","names":[],"sources":["../src/DidCommDispatcher.ts"],"mappings":";;;;;;cAgBa,iBAAA;EAAA,QACH,sBAAA;EAAA,QACA,aAAA;EAAA,QACA,YAAA;EAAA,QACA,MAAA;cAGN,aAAA,EAAe,oBAAA,EACf,YAAA,EAAc,YAAA,EACd,sBAAA,EAAwB,6BAAA,EACS,MAAA,EAAQ,MAAA;EAAA,QAQnC,wBAAA;EA6BK,QAAA,CAAS,cAAA,EAAgB,4BAAA,GAA+B,OAAA;AAAA"}
1
+ {"version":3,"file":"DidCommDispatcher.d.mts","names":[],"sources":["../src/DidCommDispatcher.ts"],"mappings":";;;;;qBAgBa;UACH;UACA;UACA;UACA;EAGN,YAAA,eAAe,sBACf,cAAc,cACd,wBAAwB,+BACS,QAAQ;UAQnC;EA6BK,SAAS,gBAAgB,+BAA+B"}
@@ -1,22 +1,20 @@
1
- import { __decorate } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
1
+ import __decorate from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.mjs";
2
2
  import { canHandleMessageType, parseMessageType } from "./util/messageType.mjs";
3
3
  import { DidCommMessageHandlerRegistry } from "./DidCommMessageHandlerRegistry.mjs";
4
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
5
- import { __decorateParam } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateParam.mjs";
6
- import { DidCommEventTypes } from "./DidCommEvents.mjs";
4
+ import __decorateMetadata from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.mjs";
5
+ import __decorateParam from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.mjs";
6
+ import "./DidCommEvents.mjs";
7
7
  import { DidCommProblemReportMessage } from "./messages/problem-reports/DidCommProblemReportMessage.mjs";
8
8
  import { DidCommProblemReportError } from "./errors/problem-reports/DidCommProblemReportError.mjs";
9
9
  import "./errors/problem-reports/index.mjs";
10
10
  import { DidCommOutboundMessageContext } from "./models/DidCommOutboundMessageContext.mjs";
11
- import { DidCommProblemReportReason } from "./models/problem-reports/DidCommProblemReportReason.mjs";
11
+ import "./models/problem-reports/DidCommProblemReportReason.mjs";
12
12
  import "./models/index.mjs";
13
13
  import { DidCommMessageSender } from "./DidCommMessageSender.mjs";
14
14
  import "./messages/index.mjs";
15
15
  import { DidCommMessageHandlerMiddlewareRunner } from "./handlers/DidCommMessageHandlerMiddleware.mjs";
16
16
  import { CredoError, EventEmitter, InjectionSymbols, inject, injectable } from "@credo-ts/core";
17
-
18
17
  //#region src/DidCommDispatcher.ts
19
- var _ref, _ref2, _ref3;
20
18
  let DidCommDispatcher = class DidCommDispatcher {
21
19
  constructor(messageSender, eventEmitter, messageHandlerRegistry, logger) {
22
20
  this.defaultHandlerMiddleware = async (inboundMessageContext, next) => {
@@ -26,7 +24,7 @@ let DidCommDispatcher = class DidCommDispatcher {
26
24
  supportedMessages: [],
27
25
  handle: fallbackMessageHandler
28
26
  };
29
- if (!messageHandler) throw new DidCommProblemReportError(`Error handling message ${inboundMessageContext.message.id} with type ${inboundMessageContext.message.type}. The message type is not supported`, { problemCode: DidCommProblemReportReason.MessageParseFailure });
27
+ if (!messageHandler) throw new DidCommProblemReportError(`Error handling message ${inboundMessageContext.message.id} with type ${inboundMessageContext.message.type}. The message type is not supported`, { problemCode: "message-parse-failure" });
30
28
  const outboundMessage = await messageHandler.handle(inboundMessageContext);
31
29
  if (outboundMessage) inboundMessageContext.setResponseMessage(outboundMessage);
32
30
  await next();
@@ -48,7 +46,8 @@ let DidCommDispatcher = class DidCommDispatcher {
48
46
  } catch (error) {
49
47
  const problemReportMessage = error.problemReport;
50
48
  if (problemReportMessage instanceof DidCommProblemReportMessage && messageContext.connection) {
51
- if (canHandleMessageType(DidCommProblemReportMessage, parseMessageType(messageContext.message.type))) throw new CredoError(`Not sending problem report in response to problem report: ${message}`);
49
+ const messageType = parseMessageType(messageContext.message.type);
50
+ if (canHandleMessageType(DidCommProblemReportMessage, messageType)) throw new CredoError(`Not sending problem report in response to problem report: ${message}`);
52
51
  const { protocolUri: problemReportProtocolUri } = parseMessageType(problemReportMessage.type);
53
52
  const { protocolUri: inboundProtocolUri } = parseMessageType(messageContext.message.type);
54
53
  if (inboundProtocolUri === problemReportProtocolUri) problemReportMessage.setThread({ threadId: message.threadId });
@@ -74,7 +73,7 @@ let DidCommDispatcher = class DidCommDispatcher {
74
73
  await this.messageSender.sendMessage(outboundMessage);
75
74
  }
76
75
  this.eventEmitter.emit(agentContext, {
77
- type: DidCommEventTypes.DidCommMessageProcessed,
76
+ type: "DidCommMessageProcessed",
78
77
  payload: {
79
78
  message,
80
79
  connection,
@@ -88,13 +87,13 @@ DidCommDispatcher = __decorate([
88
87
  injectable(),
89
88
  __decorateParam(3, inject(InjectionSymbols.Logger)),
90
89
  __decorateMetadata("design:paramtypes", [
91
- typeof (_ref = typeof DidCommMessageSender !== "undefined" && DidCommMessageSender) === "function" ? _ref : Object,
92
- typeof (_ref2 = typeof EventEmitter !== "undefined" && EventEmitter) === "function" ? _ref2 : Object,
93
- typeof (_ref3 = typeof DidCommMessageHandlerRegistry !== "undefined" && DidCommMessageHandlerRegistry) === "function" ? _ref3 : Object,
90
+ typeof DidCommMessageSender === "undefined" ? Object : DidCommMessageSender,
91
+ typeof EventEmitter === "undefined" ? Object : EventEmitter,
92
+ typeof DidCommMessageHandlerRegistry === "undefined" ? Object : DidCommMessageHandlerRegistry,
94
93
  Object
95
94
  ])
96
95
  ], DidCommDispatcher);
97
-
98
96
  //#endregion
99
97
  export { DidCommDispatcher };
98
+
100
99
  //# sourceMappingURL=DidCommDispatcher.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommDispatcher.mjs","names":[],"sources":["../src/DidCommDispatcher.ts"],"sourcesContent":["import { CredoError, EventEmitter, InjectionSymbols, inject, injectable, type Logger } from '@credo-ts/core'\nimport type { DidCommMessageProcessedEvent } from './DidCommEvents'\nimport { DidCommEventTypes } from './DidCommEvents'\nimport type { DidCommMessage } from './DidCommMessage'\nimport { DidCommMessageHandlerRegistry } from './DidCommMessageHandlerRegistry'\nimport { DidCommMessageSender } from './DidCommMessageSender'\nimport { DidCommProblemReportError } from './errors/problem-reports'\nimport { DidCommMessageHandlerMiddlewareRunner } from './handlers'\nimport type { DidCommMessageHandlerMiddleware } from './handlers/DidCommMessageHandlerMiddleware'\nimport { DidCommProblemReportMessage } from './messages'\nimport { DidCommOutboundMessageContext } from './models'\nimport type { DidCommInboundMessageContext } from './models/DidCommInboundMessageContext'\nimport { DidCommProblemReportReason } from './models/problem-reports'\nimport { canHandleMessageType, parseMessageType } from './util/messageType'\n\n@injectable()\nexport class DidCommDispatcher {\n private messageHandlerRegistry: DidCommMessageHandlerRegistry\n private messageSender: DidCommMessageSender\n private eventEmitter: EventEmitter\n private logger: Logger\n\n public constructor(\n messageSender: DidCommMessageSender,\n eventEmitter: EventEmitter,\n messageHandlerRegistry: DidCommMessageHandlerRegistry,\n @inject(InjectionSymbols.Logger) logger: Logger\n ) {\n this.messageSender = messageSender\n this.eventEmitter = eventEmitter\n this.messageHandlerRegistry = messageHandlerRegistry\n this.logger = logger\n }\n\n private defaultHandlerMiddleware: DidCommMessageHandlerMiddleware = async (inboundMessageContext, next) => {\n let messageHandler = inboundMessageContext.messageHandler\n\n const fallbackMessageHandler =\n inboundMessageContext.agentContext.dependencyManager.resolve(DidCommMessageHandlerRegistry).fallbackMessageHandler\n if (!messageHandler && fallbackMessageHandler) {\n messageHandler = {\n supportedMessages: [],\n handle: fallbackMessageHandler,\n }\n }\n\n if (!messageHandler) {\n throw new DidCommProblemReportError(\n `Error handling message ${inboundMessageContext.message.id} with type ${inboundMessageContext.message.type}. The message type is not supported`,\n {\n problemCode: DidCommProblemReportReason.MessageParseFailure,\n }\n )\n }\n\n const outboundMessage = await messageHandler.handle(inboundMessageContext)\n if (outboundMessage) {\n inboundMessageContext.setResponseMessage(outboundMessage)\n }\n\n await next()\n }\n\n public async dispatch(messageContext: DidCommInboundMessageContext): Promise<void> {\n const { agentContext, connection, senderKey, recipientKey, message, encryptedMessage } = messageContext\n\n // Set default handler if available, middleware can still override the message handler\n const messageHandler = this.messageHandlerRegistry.getHandlerForMessageType(message.type)\n if (messageHandler) {\n messageContext.setMessageHandler(messageHandler)\n }\n\n let outboundMessage: DidCommOutboundMessageContext<DidCommMessage> | undefined\n\n try {\n const messageHandlerMiddlewares =\n agentContext.dependencyManager.resolve(DidCommMessageHandlerRegistry).messageHandlerMiddlewares\n const middlewares = [...messageHandlerMiddlewares, this.defaultHandlerMiddleware]\n await DidCommMessageHandlerMiddlewareRunner.run(middlewares, messageContext)\n\n outboundMessage = messageContext.responseMessage\n } catch (error) {\n const problemReportMessage = error.problemReport\n\n if (problemReportMessage instanceof DidCommProblemReportMessage && messageContext.connection) {\n const messageType = parseMessageType(messageContext.message.type)\n if (canHandleMessageType(DidCommProblemReportMessage, messageType)) {\n throw new CredoError(`Not sending problem report in response to problem report: ${message}`)\n }\n\n const { protocolUri: problemReportProtocolUri } = parseMessageType(problemReportMessage.type)\n const { protocolUri: inboundProtocolUri } = parseMessageType(messageContext.message.type)\n\n // If the inbound protocol uri is the same as the problem report protocol uri, we can see the interaction as the same thread\n // However if it is no the same we should see it as a new thread, where the inbound message `@id` is the parentThreadId\n if (inboundProtocolUri === problemReportProtocolUri) {\n problemReportMessage.setThread({\n threadId: message.threadId,\n })\n } else {\n problemReportMessage.setThread({\n parentThreadId: message.id,\n })\n }\n\n outboundMessage = new DidCommOutboundMessageContext(problemReportMessage, {\n agentContext,\n connection: messageContext.connection,\n inboundMessageContext: messageContext,\n })\n } else {\n this.logger.error(`Error handling message with type ${message.type}`, {\n message: message.toJSON(),\n error,\n senderKey: senderKey?.fingerprint,\n recipientKey: recipientKey?.fingerprint,\n connectionId: connection?.id,\n })\n\n throw error\n }\n }\n\n if (outboundMessage) {\n // set the inbound message context, if not already defined\n if (!outboundMessage.inboundMessageContext) {\n outboundMessage.inboundMessageContext = messageContext\n }\n\n await this.messageSender.sendMessage(outboundMessage)\n }\n\n // Emit event that allows to hook into received messages\n this.eventEmitter.emit<DidCommMessageProcessedEvent>(agentContext, {\n type: DidCommEventTypes.DidCommMessageProcessed,\n payload: {\n message,\n connection,\n receivedAt: messageContext.receivedAt,\n encryptedMessage,\n },\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBO,8BAAM,kBAAkB;CAM7B,AAAO,YACL,eACA,cACA,wBACA,AAAiC,QACjC;OAOM,2BAA4D,OAAO,uBAAuB,SAAS;GACzG,IAAI,iBAAiB,sBAAsB;GAE3C,MAAM,yB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,IACzB,CAAC;AAGJ,sBAAkB,IAAI,8BAA8B,sBAAsB;KACxE;KACA,YAAY,eAAe;KAC3B,uBAAuB;KACxB,CAAC;UACG;AACL,SAAK,OAAO,MAAM,oCAAoC,QAAQ,QAAQ;KACpE,SAAS,QAAQ,QAAQ;KACzB;KACA,WAAW,WAAW;KACtB,cAAc,cAAc;KAC5B,cAAc,YAAY;KAC3B,CAAC;AAEF,UAAM;;;AAIV,MAAI,iBAAiB;AAEnB,OAAI,CAAC,gBAAgB,sBACnB,iBAAgB,wBAAwB;AAG1C,SAAM,KAAK,cAAc,YAAY,gBAAgB;;AAIvD,OAAK,aAAa,KAAmC,cAAc;GACjE,MAAM,kBAAkB;GACxB,SAAS;IACP;IACA;IACA,YAAY,eAAe;IAC3B;IACD;GACF,CAAC;;;;CA9HL,YAAY;oBAWR,OAAO,iBAAiB,OAAO"}
1
+ {"version":3,"file":"DidCommDispatcher.mjs","names":[],"sources":["../src/DidCommDispatcher.ts"],"sourcesContent":["import { CredoError, EventEmitter, InjectionSymbols, inject, injectable, type Logger } from '@credo-ts/core'\nimport type { DidCommMessageProcessedEvent } from './DidCommEvents'\nimport { DidCommEventTypes } from './DidCommEvents'\nimport type { DidCommMessage } from './DidCommMessage'\nimport { DidCommMessageHandlerRegistry } from './DidCommMessageHandlerRegistry'\nimport { DidCommMessageSender } from './DidCommMessageSender'\nimport { DidCommProblemReportError } from './errors/problem-reports'\nimport { DidCommMessageHandlerMiddlewareRunner } from './handlers'\nimport type { DidCommMessageHandlerMiddleware } from './handlers/DidCommMessageHandlerMiddleware'\nimport { DidCommProblemReportMessage } from './messages'\nimport { DidCommOutboundMessageContext } from './models'\nimport type { DidCommInboundMessageContext } from './models/DidCommInboundMessageContext'\nimport { DidCommProblemReportReason } from './models/problem-reports'\nimport { canHandleMessageType, parseMessageType } from './util/messageType'\n\n@injectable()\nexport class DidCommDispatcher {\n private messageHandlerRegistry: DidCommMessageHandlerRegistry\n private messageSender: DidCommMessageSender\n private eventEmitter: EventEmitter\n private logger: Logger\n\n public constructor(\n messageSender: DidCommMessageSender,\n eventEmitter: EventEmitter,\n messageHandlerRegistry: DidCommMessageHandlerRegistry,\n @inject(InjectionSymbols.Logger) logger: Logger\n ) {\n this.messageSender = messageSender\n this.eventEmitter = eventEmitter\n this.messageHandlerRegistry = messageHandlerRegistry\n this.logger = logger\n }\n\n private defaultHandlerMiddleware: DidCommMessageHandlerMiddleware = async (inboundMessageContext, next) => {\n let messageHandler = inboundMessageContext.messageHandler\n\n const fallbackMessageHandler =\n inboundMessageContext.agentContext.dependencyManager.resolve(DidCommMessageHandlerRegistry).fallbackMessageHandler\n if (!messageHandler && fallbackMessageHandler) {\n messageHandler = {\n supportedMessages: [],\n handle: fallbackMessageHandler,\n }\n }\n\n if (!messageHandler) {\n throw new DidCommProblemReportError(\n `Error handling message ${inboundMessageContext.message.id} with type ${inboundMessageContext.message.type}. The message type is not supported`,\n {\n problemCode: DidCommProblemReportReason.MessageParseFailure,\n }\n )\n }\n\n const outboundMessage = await messageHandler.handle(inboundMessageContext)\n if (outboundMessage) {\n inboundMessageContext.setResponseMessage(outboundMessage)\n }\n\n await next()\n }\n\n public async dispatch(messageContext: DidCommInboundMessageContext): Promise<void> {\n const { agentContext, connection, senderKey, recipientKey, message, encryptedMessage } = messageContext\n\n // Set default handler if available, middleware can still override the message handler\n const messageHandler = this.messageHandlerRegistry.getHandlerForMessageType(message.type)\n if (messageHandler) {\n messageContext.setMessageHandler(messageHandler)\n }\n\n let outboundMessage: DidCommOutboundMessageContext<DidCommMessage> | undefined\n\n try {\n const messageHandlerMiddlewares =\n agentContext.dependencyManager.resolve(DidCommMessageHandlerRegistry).messageHandlerMiddlewares\n const middlewares = [...messageHandlerMiddlewares, this.defaultHandlerMiddleware]\n await DidCommMessageHandlerMiddlewareRunner.run(middlewares, messageContext)\n\n outboundMessage = messageContext.responseMessage\n } catch (error) {\n const problemReportMessage = error.problemReport\n\n if (problemReportMessage instanceof DidCommProblemReportMessage && messageContext.connection) {\n const messageType = parseMessageType(messageContext.message.type)\n if (canHandleMessageType(DidCommProblemReportMessage, messageType)) {\n throw new CredoError(`Not sending problem report in response to problem report: ${message}`)\n }\n\n const { protocolUri: problemReportProtocolUri } = parseMessageType(problemReportMessage.type)\n const { protocolUri: inboundProtocolUri } = parseMessageType(messageContext.message.type)\n\n // If the inbound protocol uri is the same as the problem report protocol uri, we can see the interaction as the same thread\n // However if it is no the same we should see it as a new thread, where the inbound message `@id` is the parentThreadId\n if (inboundProtocolUri === problemReportProtocolUri) {\n problemReportMessage.setThread({\n threadId: message.threadId,\n })\n } else {\n problemReportMessage.setThread({\n parentThreadId: message.id,\n })\n }\n\n outboundMessage = new DidCommOutboundMessageContext(problemReportMessage, {\n agentContext,\n connection: messageContext.connection,\n inboundMessageContext: messageContext,\n })\n } else {\n this.logger.error(`Error handling message with type ${message.type}`, {\n message: message.toJSON(),\n error,\n senderKey: senderKey?.fingerprint,\n recipientKey: recipientKey?.fingerprint,\n connectionId: connection?.id,\n })\n\n throw error\n }\n }\n\n if (outboundMessage) {\n // set the inbound message context, if not already defined\n if (!outboundMessage.inboundMessageContext) {\n outboundMessage.inboundMessageContext = messageContext\n }\n\n await this.messageSender.sendMessage(outboundMessage)\n }\n\n // Emit event that allows to hook into received messages\n this.eventEmitter.emit<DidCommMessageProcessedEvent>(agentContext, {\n type: DidCommEventTypes.DidCommMessageProcessed,\n payload: {\n message,\n connection,\n receivedAt: messageContext.receivedAt,\n encryptedMessage,\n },\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAgBO,IAAM,oBAAN,MAAM,kBAAkB;CAM7B,YACE,eACA,cACA,wBACA,QACA;EAOF,KAAQ,2BAA4D,OAAO,uBAAuB,SAAS;GACzG,IAAI,iBAAiB,sBAAsB;GAE3C,MAAM,yBACJ,sBAAsB,aAAa,kBAAkB,QAAQ,6BAA6B,CAAC,CAAC;GAC9F,IAAI,CAAC,kBAAkB,wBACrB,iBAAiB;IACf,mBAAmB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C3B,uBAAuB;IACzB,CAAC;GACH,OAAO;IACL,KAAK,OAAO,MAAM,oCAAoC,QAAQ,QAAQ;KACpE,SAAS,QAAQ,OAAO;KACxB;KACA,WAAW,WAAW;KACtB,cAAc,cAAc;KAC5B,cAAc,YAAY;IAC5B,CAAC;IAED,MAAM;GACR;EACF;EAEA,IAAI,iBAAiB;GAEnB,IAAI,CAAC,gBAAgB,uBACnB,gBAAgB,wBAAwB;GAG1C,MAAM,KAAK,cAAc,YAAY,eAAe;EACtD;EAGA,KAAK,aAAa,KAAmC,cAAc;GACjE,MAAA;GACA,SAAS;IACP;IACA;IACA,YAAY,eAAe;IAC3B;GACF;EACF,CAAC;CACH;AACF;;CAhIC,WAAW;CAWP,gBAAA,GAAA,OAAO,iBAAiB,MAAM,CAAA"}
@@ -1,17 +1,14 @@
1
1
  import { DidCommEncryptedMessage, DidCommPlaintextMessage } from "./types.mjs";
2
- import { DidCommDocumentService } from "./services/DidCommDocumentService.mjs";
3
2
  import { DidCommMessage } from "./DidCommMessage.mjs";
3
+ import { DidCommDocumentService } from "./services/DidCommDocumentService.mjs";
4
4
  import { AgentContext, Kms, Logger } from "@credo-ts/core";
5
-
6
5
  //#region src/DidCommEnvelopeService.d.ts
7
- interface EnvelopeKeys {
6
+ export interface EnvelopeKeys {
8
7
  recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[];
9
8
  routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[];
10
9
  senderKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null;
11
- /** DID URL of the sender key; used as skid in DIDComm v2 so recipient can resolve it */
12
- senderKeySkid?: string;
13
10
  }
14
- declare class DidCommEnvelopeService {
11
+ export declare class DidCommEnvelopeService {
15
12
  private logger;
16
13
  private didcommDocumentService;
17
14
  constructor(logger: Logger, didcommDocumentService: DidCommDocumentService);
@@ -21,19 +18,10 @@ declare class DidCommEnvelopeService {
21
18
  unpackMessage(agentContext: AgentContext, encryptedMessage: DidCommEncryptedMessage): Promise<DecryptedDidCommMessageContext>;
22
19
  private extractOurRecipientKeyWithKeyId;
23
20
  }
24
- /**
25
- * A key that can appear on a DIDComm envelope.
26
- *
27
- * V1 uses Ed25519 keys throughout. V2 uses the key-agreement curves that the DIDComm Messaging
28
- * v2.1 specification requires. Both versions produce a decrypted context, so the context carries
29
- * the union rather than the v1 type with a cast over it.
30
- */
31
- type DidCommEnvelopeKey = Kms.PublicJwk<Kms.Ed25519PublicJwk | Kms.X25519PublicJwk | Kms.P256PublicJwk | Kms.P384PublicJwk>;
32
- interface DecryptedDidCommMessageContext {
21
+ export interface DecryptedDidCommMessageContext {
33
22
  plaintextMessage: DidCommPlaintextMessage;
34
- senderKey?: DidCommEnvelopeKey;
35
- recipientKey: DidCommEnvelopeKey;
23
+ senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk>;
24
+ recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk>;
36
25
  }
37
26
  //#endregion
38
- export { DecryptedDidCommMessageContext, DidCommEnvelopeKey, DidCommEnvelopeService, EnvelopeKeys };
39
27
  //# sourceMappingURL=DidCommEnvelopeService.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommEnvelopeService.d.mts","names":[],"sources":["../src/DidCommEnvelopeService.ts"],"mappings":";;;;;;UAuBiB,YAAA;EACf,aAAA,EAAe,GAAA,CAAI,SAAA,CAAU,GAAA,CAAI,gBAAA;EACjC,WAAA,EAAa,GAAA,CAAI,SAAA,CAAU,GAAA,CAAI,gBAAA;EAC/B,SAAA,EAAW,GAAA,CAAI,SAAA,CAAU,GAAA,CAAI,gBAAA;;EAE7B,aAAA;AAAA;AAAA,cAIW,sBAAA;EAAA,QACH,MAAA;EAAA,QACA,sBAAA;cAE4C,MAAA,EAAQ,MAAA,EAAQ,sBAAA,EAAwB,sBAAA;EAAA,QAK9E,uBAAA;EAAA,QA8GA,uBAAA;EAsGD,WAAA,CACX,YAAA,EAAc,YAAA,EACd,OAAA,EAAS,cAAA,EACT,IAAA,EAAM,YAAA,GACL,OAAA,CAAQ,uBAAA;EAsCE,aAAA,CACX,YAAA,EAAc,YAAA,EACd,gBAAA,EAAkB,uBAAA,GACjB,OAAA,CAAQ,8BAAA;EAAA,QAKG,+BAAA;AAAA;;;;;;;;KAsJJ,kBAAA,GAAqB,GAAA,CAAI,SAAA,CACnC,GAAA,CAAI,gBAAA,GAAmB,GAAA,CAAI,eAAA,GAAkB,GAAA,CAAI,aAAA,GAAgB,GAAA,CAAI,aAAA;AAAA,UAGtD,8BAAA;EACf,gBAAA,EAAkB,uBAAA;EAClB,SAAA,GAAY,kBAAA;EACZ,YAAA,EAAc,kBAAA;AAAA"}
1
+ {"version":3,"file":"DidCommEnvelopeService.d.mts","names":[],"sources":["../src/DidCommEnvelopeService.ts"],"mappings":";;;;;iBAuBiB;EACf,eAAe,IAAI,UAAU,IAAI;EACjC,aAAa,IAAI,UAAU,IAAI;EAC/B,WAAW,IAAI,UAAU,IAAI;;qBAIlB;UACH;UACA;EAE4C,YAAA,QAAQ,QAAQ,wBAAwB;UAK9E;UA0GA;EAsGD,YACX,cAAc,cACd,SAAS,gBACT,MAAM,eACL,QAAQ;EAsCE,cACX,cAAc,cACd,kBAAkB,0BACjB,QAAQ;UAKG;;iBA+IC;EACf,kBAAkB;EAClB,YAAY,IAAI,UAAU,IAAI;EAC9B,cAAc,IAAI,UAAU,IAAI"}
@@ -1,18 +1,15 @@
1
- import { __decorate } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
2
- import { __decorateMetadata } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
1
+ import __decorate from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorate.mjs";
2
+ import __decorateMetadata from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateMetadata.mjs";
3
3
  import { DidCommModuleConfig } from "./DidCommModuleConfig.mjs";
4
- import { getResolvedDidcommServiceWithSigningKeyId, toX25519 } from "./modules/connections/services/helpers.mjs";
5
- import { DidCommOutOfBandRole } from "./modules/oob/domain/DidCommOutOfBandRole.mjs";
6
- import { __decorateParam } from "./_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateParam.mjs";
4
+ import { getResolvedDidcommServiceWithSigningKeyId } from "./modules/connections/services/helpers.mjs";
5
+ import "./modules/oob/domain/DidCommOutOfBandRole.mjs";
6
+ import __decorateParam from "./_virtual/_@oxc-project_runtime@0.151.0/helpers/esm/decorateParam.mjs";
7
7
  import { DidCommOutOfBandRepository } from "./modules/oob/repository/DidCommOutOfBandRepository.mjs";
8
- import { DidCommOutOfBandRecordMetadataKeys } from "./modules/oob/repository/outOfBandRecordMetadataTypes.mjs";
9
- import { DidCommForwardMessage } from "./modules/routing/protocol/v1/messages/DidCommForwardMessage.mjs";
8
+ import { DidCommForwardMessage } from "./modules/routing/messages/DidCommForwardMessage.mjs";
10
9
  import { DidCommMediatorRoutingRepository } from "./modules/routing/repository/DidCommMediatorRoutingRepository.mjs";
11
10
  import { DidCommDocumentService } from "./services/DidCommDocumentService.mjs";
12
- import { AgentContext, CredoError, InjectionSymbols, JsonEncoder, Kms, RecordNotFoundError, TypedArrayEncoder, inject, injectable } from "@credo-ts/core";
13
-
11
+ import { CredoError, InjectionSymbols, JsonEncoder, Kms, RecordNotFoundError, TypedArrayEncoder, inject, injectable } from "@credo-ts/core";
14
12
  //#region src/DidCommEnvelopeService.ts
15
- var _ref;
16
13
  let DidCommEnvelopeService = class DidCommEnvelopeService {
17
14
  constructor(logger, didcommDocumentService) {
18
15
  this.logger = logger;
@@ -25,22 +22,20 @@ let DidCommEnvelopeService = class DidCommEnvelopeService {
25
22
  for (const recipientKey of recipientKeys) {
26
23
  let encryptedSender;
27
24
  if (senderKey) {
28
- const recipientX25519Jwk = toX25519(recipientKey).toJson();
29
25
  const { encrypted } = await kms.encrypt({
30
26
  key: { keyAgreement: {
31
27
  algorithm: "ECDH-HSALSA20",
32
- externalPublicJwk: recipientX25519Jwk
28
+ externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson()
33
29
  } },
34
30
  encryption: { algorithm: "XSALSA20-POLY1305" },
35
31
  data: TypedArrayEncoder.fromUtf8String(TypedArrayEncoder.toBase58(senderKey.publicKey.publicKey))
36
32
  });
37
33
  encryptedSender = TypedArrayEncoder.toBase64Url(encrypted);
38
34
  }
39
- const recipientX25519JwkForKey = toX25519(recipientKey).toJson();
40
35
  const { encrypted, iv } = await kms.encrypt({
41
36
  key: { keyAgreement: {
42
37
  algorithm: "ECDH-HSALSA20",
43
- externalPublicJwk: recipientX25519JwkForKey,
38
+ externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),
44
39
  keyId: senderKey?.keyId
45
40
  } },
46
41
  data: contentEncryptionKey,
@@ -189,21 +184,21 @@ let DidCommEnvelopeService = class DidCommEnvelopeService {
189
184
  if (routingKey) return routingKey;
190
185
  }
191
186
  const outOfBandRecord = await agentContext.dependencyManager.resolve(DidCommOutOfBandRepository).findSingleByQuery(agentContext, { $or: [{
192
- role: DidCommOutOfBandRole.Sender,
187
+ role: "sender",
193
188
  recipientKeyFingerprints: [publicKey.fingerprint]
194
189
  }, {
195
- role: DidCommOutOfBandRole.Receiver,
190
+ role: "receiver",
196
191
  recipientRoutingKeyFingerprint: publicKey.fingerprint
197
192
  }] });
198
- if (outOfBandRecord?.role === DidCommOutOfBandRole.Sender) {
193
+ if (outOfBandRecord?.role === "sender") {
199
194
  agentContext.config.logger.debug(`Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`);
200
195
  for (const service of outOfBandRecord.outOfBandInvitation.getInlineServices()) {
201
196
  const _recipientKey = getResolvedDidcommServiceWithSigningKeyId(service, outOfBandRecord.invitationInlineServiceKeys).recipientKeys.find((recipientKey) => recipientKey.equals(publicKey));
202
197
  if (_recipientKey) return _recipientKey;
203
198
  }
204
- } else if (outOfBandRecord?.role === DidCommOutOfBandRole.Receiver) {
199
+ } else if (outOfBandRecord?.role === "receiver") {
205
200
  agentContext.config.logger.debug(`Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`);
206
- const recipieintRouting = outOfBandRecord.metadata.get(DidCommOutOfBandRecordMetadataKeys.RecipientRouting);
201
+ const recipieintRouting = outOfBandRecord.metadata.get("_internal/recipientRouting");
207
202
  if (recipieintRouting?.recipientKeyFingerprint === publicKey.fingerprint) {
208
203
  publicKey.keyId = recipieintRouting.recipientKeyId ?? publicKey.legacyKeyId;
209
204
  return publicKey;
@@ -225,9 +220,9 @@ let DidCommEnvelopeService = class DidCommEnvelopeService {
225
220
  DidCommEnvelopeService = __decorate([
226
221
  injectable(),
227
222
  __decorateParam(0, inject(InjectionSymbols.Logger)),
228
- __decorateMetadata("design:paramtypes", [Object, typeof (_ref = typeof DidCommDocumentService !== "undefined" && DidCommDocumentService) === "function" ? _ref : Object])
223
+ __decorateMetadata("design:paramtypes", [Object, typeof DidCommDocumentService === "undefined" ? Object : DidCommDocumentService])
229
224
  ], DidCommEnvelopeService);
230
-
231
225
  //#endregion
232
226
  export { DidCommEnvelopeService };
227
+
233
228
  //# sourceMappingURL=DidCommEnvelopeService.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"DidCommEnvelopeService.mjs","names":[],"sources":["../src/DidCommEnvelopeService.ts"],"sourcesContent":["import {\n AgentContext,\n CredoError,\n InjectionSymbols,\n inject,\n injectable,\n JsonEncoder,\n Kms,\n type Logger,\n RecordNotFoundError,\n TypedArrayEncoder,\n} from '@credo-ts/core'\nimport type { DidCommMessage } from './DidCommMessage'\nimport { DidCommModuleConfig } from './DidCommModuleConfig'\nimport { getResolvedDidcommServiceWithSigningKeyId, toX25519 } from './modules/connections/services/helpers'\nimport { DidCommOutOfBandRole } from './modules/oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandRepository } from './modules/oob/repository/DidCommOutOfBandRepository'\nimport { DidCommOutOfBandRecordMetadataKeys } from './modules/oob/repository/outOfBandRecordMetadataTypes'\nimport { DidCommForwardMessage } from './modules/routing/protocol/v1/messages/DidCommForwardMessage'\nimport { DidCommMediatorRoutingRepository } from './modules/routing/repository/DidCommMediatorRoutingRepository'\nimport { DidCommDocumentService } from './services/DidCommDocumentService'\nimport type { DidCommEncryptedMessage, DidCommPlaintextMessage } from './types'\n\nexport interface EnvelopeKeys {\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n senderKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n /** DID URL of the sender key; used as skid in DIDComm v2 so recipient can resolve it */\n senderKeySkid?: string\n}\n\n@injectable()\nexport class DidCommEnvelopeService {\n private logger: Logger\n private didcommDocumentService: DidCommDocumentService\n\n public constructor(@inject(InjectionSymbols.Logger) logger: Logger, didcommDocumentService: DidCommDocumentService) {\n this.logger = logger\n this.didcommDocumentService = didcommDocumentService\n }\n\n private async encryptDidcommV1Message(\n agentContext: AgentContext,\n message: DidCommPlaintextMessage,\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[],\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n ): Promise<DidCommEncryptedMessage> {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n // Generally we would never generate the content encryption key outside of the KMS\n // However how DIDcommV1 is specified to calcualte the aad we need the encrypted content\n // encryption key, and thus we can't use the normal combined key agrement + encryption flow\n const contentEncryptionKey = kms.randomBytes({ length: 32 })\n\n const recipients: Array<{\n encrypted_key: string\n header: {\n kid: string\n\n // In case of Authcrypt\n sender?: string\n iv?: string\n }\n }> = []\n\n for (const recipientKey of recipientKeys) {\n let encryptedSender: string | undefined\n\n if (senderKey) {\n // DIDComm v1 uses Ed25519 keys but encryption happens with X25519 keys.\n const recipientX25519Jwk = toX25519(recipientKey).toJson()\n\n // Encrypt the sender\n const { encrypted } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n externalPublicJwk: recipientX25519Jwk,\n },\n },\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n data: TypedArrayEncoder.fromUtf8String(TypedArrayEncoder.toBase58(senderKey.publicKey.publicKey)),\n })\n\n encryptedSender = TypedArrayEncoder.toBase64Url(encrypted)\n }\n\n // Encrypt the key\n const recipientX25519JwkForKey = toX25519(recipientKey).toJson()\n\n const { encrypted, iv } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n externalPublicJwk: recipientX25519JwkForKey,\n\n // Sender key only needed for Authcrypt\n keyId: senderKey?.keyId,\n },\n },\n data: contentEncryptionKey,\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n })\n\n recipients.push({\n encrypted_key: TypedArrayEncoder.toBase64Url(encrypted),\n header: {\n kid: TypedArrayEncoder.toBase58(recipientKey.publicKey.publicKey),\n iv: iv ? TypedArrayEncoder.toBase64Url(iv) : undefined,\n sender: encryptedSender,\n },\n })\n }\n\n const protectedString = JsonEncoder.toBase64Url({\n enc: 'xchacha20poly1305_ietf',\n typ: 'JWM/1.0',\n alg: senderKey ? 'Authcrypt' : 'Anoncrypt',\n recipients,\n })\n\n // Perofrm the actual encryption\n const { encrypted, iv, tag } = await kms.encrypt({\n encryption: {\n algorithm: 'C20P',\n aad: TypedArrayEncoder.fromUtf8String(protectedString),\n },\n data: JsonEncoder.toUint8Array(message),\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64Url(contentEncryptionKey),\n },\n },\n })\n\n if (!iv || !tag) {\n throw new CredoError(\"Expected 'iv' and 'tag' to be defined\")\n }\n\n return {\n ciphertext: TypedArrayEncoder.toBase64Url(encrypted),\n iv: TypedArrayEncoder.toBase64Url(iv),\n tag: TypedArrayEncoder.toBase64Url(tag),\n protected: protectedString,\n } satisfies DidCommEncryptedMessage\n }\n\n private async decryptDidcommV1Message(agentContext: AgentContext, encryptedMessage: DidCommEncryptedMessage) {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n const protectedJson = JsonEncoder.fromBase64Url(encryptedMessage.protected)\n\n const alg = protectedJson.alg as 'Anoncrypt' | 'Authcrypt'\n if (alg !== 'Anoncrypt' && alg !== 'Authcrypt') {\n throw new CredoError(`Unsupported pack algorithm: ${alg}`)\n }\n\n if (protectedJson.enc !== 'xchacha20poly1305_ietf') {\n throw new CredoError(`Unsupported enc algorithm: ${protectedJson.enc}`)\n }\n\n let recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null = null\n let recipient: {\n header: {\n kid: string\n iv?: string\n sender?: string\n }\n encrypted_key: string\n } | null = null\n\n for (const _recipient of protectedJson.recipients) {\n recipientKey = await this.extractOurRecipientKeyWithKeyId(agentContext, _recipient)\n\n if (recipientKey) {\n recipient = _recipient\n }\n }\n\n if (!recipientKey || !recipient) {\n throw new CredoError('No corresponding recipient key found')\n }\n\n if (alg === 'Authcrypt' && (!recipient.header.sender || !recipient.header.iv)) {\n throw new CredoError('Sender and iv header values are required for Authcrypt')\n }\n\n let senderPublicJwk: Kms.PublicJwk<Kms.Ed25519PublicJwk> | undefined\n if (recipient.header.sender) {\n const { data } = await kms.decrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n },\n },\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n encrypted: TypedArrayEncoder.fromBase64Url(recipient.header.sender),\n })\n\n senderPublicJwk = Kms.PublicJwk.fromPublicKey({\n crv: 'Ed25519',\n kty: 'OKP',\n publicKey: TypedArrayEncoder.fromBase58(TypedArrayEncoder.toUtf8String(data)),\n })\n }\n\n // Perofrm the actual decryption\n const { data: contentEncryptionKey } = await kms.decrypt({\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n iv: recipient.header.iv ? TypedArrayEncoder.fromBase64Url(recipient.header.iv) : undefined,\n },\n encrypted: TypedArrayEncoder.fromBase64Url(recipient.encrypted_key),\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n\n // Optionally we have a sender\n externalPublicJwk: senderPublicJwk?.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n })\n\n const { data: message } = await kms.decrypt({\n decryption: {\n algorithm: 'C20P',\n iv: TypedArrayEncoder.fromBase64Url(encryptedMessage.iv),\n tag: TypedArrayEncoder.fromBase64Url(encryptedMessage.tag),\n aad: TypedArrayEncoder.fromUtf8String(encryptedMessage.protected),\n },\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64Url(contentEncryptionKey),\n },\n },\n encrypted: TypedArrayEncoder.fromBase64Url(encryptedMessage.ciphertext),\n })\n\n return {\n plaintextMessage: JsonEncoder.fromUint8Array(message),\n senderKey: senderPublicJwk,\n recipientKey,\n }\n }\n\n public async packMessage(\n agentContext: AgentContext,\n payload: DidCommMessage,\n keys: EnvelopeKeys\n ): Promise<DidCommEncryptedMessage> {\n const didcommConfig = agentContext.dependencyManager.resolve(DidCommModuleConfig)\n\n const { routingKeys, senderKey } = keys\n let recipientKeys = keys.recipientKeys\n\n // pass whether we want to use legacy did sov prefix\n const message = payload.toJSON({ useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed })\n\n this.logger.debug(`Pack outbound message ${message['@type']}`)\n\n let encryptedMessage = await this.encryptDidcommV1Message(agentContext, message, recipientKeys, senderKey)\n\n // If the message has routing keys (mediator) pack for each mediator\n for (const routingKey of routingKeys) {\n const forwardMessage = new DidCommForwardMessage({\n // Forward to first recipient key\n to: TypedArrayEncoder.toBase58(recipientKeys[0].publicKey.publicKey),\n message: encryptedMessage,\n })\n recipientKeys = [routingKey]\n this.logger.debug('Forward message created', forwardMessage)\n\n const forwardJson = forwardMessage.toJSON({\n useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed,\n })\n\n // Forward messages are anon packed\n encryptedMessage = await this.encryptDidcommV1Message(agentContext, forwardJson, [routingKey])\n }\n\n this.logger.debug(`Packed outbound message ${message['@type']}`, {\n routingKeys: routingKeys.map((routingKey) => routingKey.fingerprint),\n })\n\n return encryptedMessage\n }\n\n public async unpackMessage(\n agentContext: AgentContext,\n encryptedMessage: DidCommEncryptedMessage\n ): Promise<DecryptedDidCommMessageContext> {\n const decryptedMessage = await this.decryptDidcommV1Message(agentContext, encryptedMessage)\n return decryptedMessage\n }\n\n private async extractOurRecipientKeyWithKeyId(\n agentContext: AgentContext,\n recipient: {\n header: {\n kid: string\n }\n }\n ): Promise<Kms.PublicJwk<Kms.Ed25519PublicJwk> | null> {\n const kms = agentContext.resolve(Kms.KeyManagementApi)\n\n const publicKey = Kms.PublicJwk.fromPublicKey({\n kty: 'OKP',\n crv: 'Ed25519',\n publicKey: TypedArrayEncoder.fromBase58(recipient.header.kid),\n })\n\n // We need to find the associated did based on the recipient key\n // so we can extract the kms key id from the did record.\n try {\n const { didDocument, keys } = await this.didcommDocumentService.resolveCreatedDidDocumentWithKeysByRecipientKey(\n agentContext,\n publicKey\n )\n\n const verificationMethod = didDocument.findVerificationMethodByPublicKey(publicKey)\n const kmsKeyId = keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n agentContext.config.logger.debug(\n `Found did '${didDocument.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = kmsKeyId ?? publicKey.legacyKeyId\n return publicKey\n } catch (error) {\n // If there is no did record yet, we first look at the mediator routing record\n const mediatorRoutingRepository = agentContext.dependencyManager.resolve(DidCommMediatorRoutingRepository)\n if (error instanceof RecordNotFoundError) {\n const mediatorRoutingRecord = await mediatorRoutingRepository.findSingleByQuery(agentContext, {\n routingKeyFingerprints: [publicKey.fingerprint],\n })\n\n if (mediatorRoutingRecord) {\n agentContext.config.logger.debug(\n `Found mediator routing record with id '${mediatorRoutingRecord.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n const routingKey = mediatorRoutingRecord.routingKeysWithKeyId.find((routingKey) =>\n publicKey.equals(routingKey)\n )\n\n // This should not happen as we only get here if the tag matches\n if (!routingKey) {\n throw new CredoError(\n `Expected to find key with fingerprint '${publicKey.fingerprint}' in routing keys of mediator routing record '${mediatorRoutingRecord.id}'`\n )\n }\n\n if (routingKey) {\n return routingKey\n }\n }\n\n // If there is no mediator routing record, we look at the out of band record\n const outOfBandRepository = agentContext.dependencyManager.resolve(DidCommOutOfBandRepository)\n const outOfBandRecord = await outOfBandRepository.findSingleByQuery(agentContext, {\n $or: [\n // In case we are the creator of the out of band invitation we can query based on\n // out of band invitation recipient key fingerprint\n {\n role: DidCommOutOfBandRole.Sender,\n recipientKeyFingerprints: [publicKey.fingerprint],\n },\n // In case we are the receiver of the out of band invitation we need to query\n // for the recipient routing fingerprint\n {\n role: DidCommOutOfBandRole.Receiver,\n recipientRoutingKeyFingerprint: publicKey.fingerprint,\n },\n ],\n })\n\n if (outOfBandRecord?.role === DidCommOutOfBandRole.Sender) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n for (const service of outOfBandRecord.outOfBandInvitation.getInlineServices()) {\n const resolvedService = getResolvedDidcommServiceWithSigningKeyId(\n service,\n outOfBandRecord.invitationInlineServiceKeys\n )\n const _recipientKey = resolvedService.recipientKeys.find((recipientKey) => recipientKey.equals(publicKey))\n\n if (_recipientKey) {\n return _recipientKey\n }\n }\n } else if (outOfBandRecord?.role === DidCommOutOfBandRole.Receiver) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n // If there is still no key we need to look at the metadata\n const recipieintRouting = outOfBandRecord.metadata.get(DidCommOutOfBandRecordMetadataKeys.RecipientRouting)\n if (recipieintRouting?.recipientKeyFingerprint === publicKey.fingerprint) {\n publicKey.keyId = recipieintRouting.recipientKeyId ?? publicKey.legacyKeyId\n return publicKey\n }\n }\n\n // If there is no did found, no out of band record found, and not mediator routing record\n // this is either:\n // - a connectionless oob exchange initiated before we added key ids.\n // - a message for a mediator, where the mediator routing record is created before we added key ids\n //\n // We will check if the public key exists based on the base58 encoded public key. We can remove this flow once we create a migration\n // that optimizes this flow.\n const kmsJwkPublic = await kms\n .getPublicKey({\n keyId: publicKey.legacyKeyId,\n })\n .catch((error) => {\n if (error instanceof Kms.KeyManagementKeyNotFoundError) return null\n throw error\n })\n if (kmsJwkPublic) {\n agentContext.config.logger.debug(\n `Found public key with legacy key id '${publicKey.legacyKeyId}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = publicKey.legacyKeyId\n return publicKey\n }\n }\n }\n\n // no match found\n return null\n }\n}\n\n/**\n * A key that can appear on a DIDComm envelope.\n *\n * V1 uses Ed25519 keys throughout. V2 uses the key-agreement curves that the DIDComm Messaging\n * v2.1 specification requires. Both versions produce a decrypted context, so the context carries\n * the union rather than the v1 type with a cast over it.\n */\nexport type DidCommEnvelopeKey = Kms.PublicJwk<\n Kms.Ed25519PublicJwk | Kms.X25519PublicJwk | Kms.P256PublicJwk | Kms.P384PublicJwk\n>\n\nexport interface DecryptedDidCommMessageContext {\n plaintextMessage: DidCommPlaintextMessage\n senderKey?: DidCommEnvelopeKey\n recipientKey: DidCommEnvelopeKey\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgCO,mCAAM,uBAAuB;CAIlC,AAAO,YAAY,AAAiC,QAAgB,wBAAgD;AAClH,OAAK,SAAS;AACd,OAAK,yBAAyB;;CAGhC,MAAc,wBACZ,cACA,SACA,eACA,WACkC;EAClC,MAAM,MAAM,aAAa,kBAAkB,QAAQ,IAAI,iBAAiB;EAIxE,MAAM,uBAAuB,IAAI,YAAY,EAAE,QA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BAA2B,CAC5C,kBAAkB,cAAc,EAChF,KAAK,CAGH;KACE,MAAM,qBAAqB;KAC3B,0BAA0B,CAAC,UAAU,YAAY;KAClD,EAGD;KACE,MAAM,qBAAqB;KAC3B,gCAAgC,UAAU;KAC3C,CACF,EACF,CAAC;AAEF,QAAI,iBAAiB,SAAS,qBAAqB,QAAQ;AACzD,kBAAa,OAAO,OAAO,MACzB,qCAAqC,gBAAgB,GAAG,cAAc,gBAAgB,KAAK,uBAAuB,UAAU,YAAY,gCACzI;AAED,UAAK,MAAM,WAAW,gBAAgB,oBAAoB,mBAAmB,EAAE;MAK7E,MAAM,gBAJkB,0CACtB,SACA,gBAAgB,4BACjB,CACqC,cAAc,MAAM,iBAAiB,aAAa,OAAO,UAAU,CAAC;AAE1G,UAAI,cACF,QAAO;;eAGF,iBAAiB,SAAS,qBAAqB,UAAU;AAClE,kBAAa,OAAO,OAAO,MACzB,qCAAqC,gBAAgB,GAAG,cAAc,gBAAgB,KAAK,uBAAuB,UAAU,YAAY,gCACzI;KAGD,MAAM,oBAAoB,gBAAgB,SAAS,IAAI,mCAAmC,iBAAiB;AAC3G,SAAI,mBAAmB,4BAA4B,UAAU,aAAa;AACxE,gBAAU,QAAQ,kBAAkB,kBAAkB,UAAU;AAChE,aAAO;;;AAmBX,QARqB,MAAM,IACxB,aAAa,EACZ,OAAO,UAAU,aAClB,CAAC,CACD,OAAO,UAAU;AAChB,SAAI,iBAAiB,IAAI,8BAA+B,QAAO;AAC/D,WAAM;MACN,EACc;AAChB,kBAAa,OAAO,OAAO,MACzB,wCAAwC,UAAU,YAAY,uBAAuB,UAAU,YAAY,gCAC5G;AAED,eAAU,QAAQ,UAAU;AAC5B,YAAO;;;;AAMb,SAAO;;;;CA3ZV,YAAY;oBAKS,OAAO,iBAAiB,OAAO"}
1
+ {"version":3,"file":"DidCommEnvelopeService.mjs","names":[],"sources":["../src/DidCommEnvelopeService.ts"],"sourcesContent":["import {\n AgentContext,\n CredoError,\n InjectionSymbols,\n inject,\n injectable,\n JsonEncoder,\n Kms,\n type Logger,\n RecordNotFoundError,\n TypedArrayEncoder,\n} from '@credo-ts/core'\nimport type { DidCommMessage } from './DidCommMessage'\nimport { DidCommModuleConfig } from './DidCommModuleConfig'\nimport { getResolvedDidcommServiceWithSigningKeyId } from './modules/connections/services/helpers'\nimport { DidCommOutOfBandRole } from './modules/oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandRepository } from './modules/oob/repository/DidCommOutOfBandRepository'\nimport { DidCommOutOfBandRecordMetadataKeys } from './modules/oob/repository/outOfBandRecordMetadataTypes'\nimport { DidCommForwardMessage } from './modules/routing/messages/DidCommForwardMessage'\nimport { DidCommMediatorRoutingRepository } from './modules/routing/repository/DidCommMediatorRoutingRepository'\nimport { DidCommDocumentService } from './services/DidCommDocumentService'\nimport type { DidCommEncryptedMessage, DidCommPlaintextMessage } from './types'\n\nexport interface EnvelopeKeys {\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n routingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n senderKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n}\n\n@injectable()\nexport class DidCommEnvelopeService {\n private logger: Logger\n private didcommDocumentService: DidCommDocumentService\n\n public constructor(@inject(InjectionSymbols.Logger) logger: Logger, didcommDocumentService: DidCommDocumentService) {\n this.logger = logger\n this.didcommDocumentService = didcommDocumentService\n }\n\n private async encryptDidcommV1Message(\n agentContext: AgentContext,\n message: DidCommPlaintextMessage,\n recipientKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[],\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null\n ): Promise<DidCommEncryptedMessage> {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n // Generally we would never generate the content encryption key outside of the KMS\n // However how DIDcommV1 is specified to calcualte the aad we need the encrypted content\n // encryption key, and thus we can't use the normal combined key agrement + encryption flow\n const contentEncryptionKey = kms.randomBytes({ length: 32 })\n\n const recipients: Array<{\n encrypted_key: string\n header: {\n kid: string\n\n // In case of Authcrypt\n sender?: string\n iv?: string\n }\n }> = []\n\n for (const recipientKey of recipientKeys) {\n let encryptedSender: string | undefined\n\n if (senderKey) {\n // Encrypt the sender\n const { encrypted } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n // DIDComm v1 uses Ed25519 keys but encryption happens with X25519 keys\n externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n data: TypedArrayEncoder.fromUtf8String(TypedArrayEncoder.toBase58(senderKey.publicKey.publicKey)),\n })\n\n encryptedSender = TypedArrayEncoder.toBase64Url(encrypted)\n }\n\n // Encrypt the key\n const { encrypted, iv } = await kms.encrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n externalPublicJwk: recipientKey.convertTo(Kms.X25519PublicJwk).toJson(),\n\n // Sender key only needed for Authcrypt\n keyId: senderKey?.keyId,\n },\n },\n data: contentEncryptionKey,\n encryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n })\n\n recipients.push({\n encrypted_key: TypedArrayEncoder.toBase64Url(encrypted),\n header: {\n kid: TypedArrayEncoder.toBase58(recipientKey.publicKey.publicKey),\n iv: iv ? TypedArrayEncoder.toBase64Url(iv) : undefined,\n sender: encryptedSender,\n },\n })\n }\n\n const protectedString = JsonEncoder.toBase64Url({\n enc: 'xchacha20poly1305_ietf',\n typ: 'JWM/1.0',\n alg: senderKey ? 'Authcrypt' : 'Anoncrypt',\n recipients,\n })\n\n // Perofrm the actual encryption\n const { encrypted, iv, tag } = await kms.encrypt({\n encryption: {\n algorithm: 'C20P',\n aad: TypedArrayEncoder.fromUtf8String(protectedString),\n },\n data: JsonEncoder.toUint8Array(message),\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64Url(contentEncryptionKey),\n },\n },\n })\n\n if (!iv || !tag) {\n throw new CredoError(\"Expected 'iv' and 'tag' to be defined\")\n }\n\n return {\n ciphertext: TypedArrayEncoder.toBase64Url(encrypted),\n iv: TypedArrayEncoder.toBase64Url(iv),\n tag: TypedArrayEncoder.toBase64Url(tag),\n protected: protectedString,\n } satisfies DidCommEncryptedMessage\n }\n\n private async decryptDidcommV1Message(agentContext: AgentContext, encryptedMessage: DidCommEncryptedMessage) {\n const kms = agentContext.dependencyManager.resolve(Kms.KeyManagementApi)\n const protectedJson = JsonEncoder.fromBase64Url(encryptedMessage.protected)\n\n const alg = protectedJson.alg as 'Anoncrypt' | 'Authcrypt'\n if (alg !== 'Anoncrypt' && alg !== 'Authcrypt') {\n throw new CredoError(`Unsupported pack algorithm: ${alg}`)\n }\n\n if (protectedJson.enc !== 'xchacha20poly1305_ietf') {\n throw new CredoError(`Unsupported enc algorithm: ${protectedJson.enc}`)\n }\n\n let recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk> | null = null\n let recipient: {\n header: {\n kid: string\n iv?: string\n sender?: string\n }\n encrypted_key: string\n } | null = null\n\n for (const _recipient of protectedJson.recipients) {\n recipientKey = await this.extractOurRecipientKeyWithKeyId(agentContext, _recipient)\n\n if (recipientKey) {\n recipient = _recipient\n }\n }\n\n if (!recipientKey || !recipient) {\n throw new CredoError('No corresponding recipient key found')\n }\n\n if (alg === 'Authcrypt' && (!recipient.header.sender || !recipient.header.iv)) {\n throw new CredoError('Sender and iv header values are required for Authcrypt')\n }\n\n let senderPublicJwk: Kms.PublicJwk<Kms.Ed25519PublicJwk> | undefined\n if (recipient.header.sender) {\n const { data } = await kms.decrypt({\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n },\n },\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n },\n encrypted: TypedArrayEncoder.fromBase64Url(recipient.header.sender),\n })\n\n senderPublicJwk = Kms.PublicJwk.fromPublicKey({\n crv: 'Ed25519',\n kty: 'OKP',\n publicKey: TypedArrayEncoder.fromBase58(TypedArrayEncoder.toUtf8String(data)),\n })\n }\n\n // Perofrm the actual decryption\n const { data: contentEncryptionKey } = await kms.decrypt({\n decryption: {\n algorithm: 'XSALSA20-POLY1305',\n iv: recipient.header.iv ? TypedArrayEncoder.fromBase64Url(recipient.header.iv) : undefined,\n },\n encrypted: TypedArrayEncoder.fromBase64Url(recipient.encrypted_key),\n key: {\n keyAgreement: {\n algorithm: 'ECDH-HSALSA20',\n keyId: recipientKey.keyId,\n\n // Optionally we have a sender\n externalPublicJwk: senderPublicJwk?.convertTo(Kms.X25519PublicJwk).toJson(),\n },\n },\n })\n\n const { data: message } = await kms.decrypt({\n decryption: {\n algorithm: 'C20P',\n iv: TypedArrayEncoder.fromBase64Url(encryptedMessage.iv),\n tag: TypedArrayEncoder.fromBase64Url(encryptedMessage.tag),\n aad: TypedArrayEncoder.fromUtf8String(encryptedMessage.protected),\n },\n key: {\n privateJwk: {\n kty: 'oct',\n k: TypedArrayEncoder.toBase64Url(contentEncryptionKey),\n },\n },\n encrypted: TypedArrayEncoder.fromBase64Url(encryptedMessage.ciphertext),\n })\n\n return {\n plaintextMessage: JsonEncoder.fromUint8Array(message),\n senderKey: senderPublicJwk,\n recipientKey,\n }\n }\n\n public async packMessage(\n agentContext: AgentContext,\n payload: DidCommMessage,\n keys: EnvelopeKeys\n ): Promise<DidCommEncryptedMessage> {\n const didcommConfig = agentContext.dependencyManager.resolve(DidCommModuleConfig)\n\n const { routingKeys, senderKey } = keys\n let recipientKeys = keys.recipientKeys\n\n // pass whether we want to use legacy did sov prefix\n const message = payload.toJSON({ useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed })\n\n this.logger.debug(`Pack outbound message ${message['@type']}`)\n\n let encryptedMessage = await this.encryptDidcommV1Message(agentContext, message, recipientKeys, senderKey)\n\n // If the message has routing keys (mediator) pack for each mediator\n for (const routingKey of routingKeys) {\n const forwardMessage = new DidCommForwardMessage({\n // Forward to first recipient key\n to: TypedArrayEncoder.toBase58(recipientKeys[0].publicKey.publicKey),\n message: encryptedMessage,\n })\n recipientKeys = [routingKey]\n this.logger.debug('Forward message created', forwardMessage)\n\n const forwardJson = forwardMessage.toJSON({\n useDidSovPrefixWhereAllowed: didcommConfig.useDidSovPrefixWhereAllowed,\n })\n\n // Forward messages are anon packed\n encryptedMessage = await this.encryptDidcommV1Message(agentContext, forwardJson, [routingKey])\n }\n\n this.logger.debug(`Packed outbound message ${message['@type']}`, {\n routingKeys: routingKeys.map((routingKey) => routingKey.fingerprint),\n })\n\n return encryptedMessage\n }\n\n public async unpackMessage(\n agentContext: AgentContext,\n encryptedMessage: DidCommEncryptedMessage\n ): Promise<DecryptedDidCommMessageContext> {\n const decryptedMessage = await this.decryptDidcommV1Message(agentContext, encryptedMessage)\n return decryptedMessage\n }\n\n private async extractOurRecipientKeyWithKeyId(\n agentContext: AgentContext,\n recipient: {\n header: {\n kid: string\n }\n }\n ): Promise<Kms.PublicJwk<Kms.Ed25519PublicJwk> | null> {\n const kms = agentContext.resolve(Kms.KeyManagementApi)\n\n const publicKey = Kms.PublicJwk.fromPublicKey({\n kty: 'OKP',\n crv: 'Ed25519',\n publicKey: TypedArrayEncoder.fromBase58(recipient.header.kid),\n })\n\n // We need to find the associated did based on the recipient key\n // so we can extract the kms key id from the did record.\n try {\n const { didDocument, keys } = await this.didcommDocumentService.resolveCreatedDidDocumentWithKeysByRecipientKey(\n agentContext,\n publicKey\n )\n\n const verificationMethod = didDocument.findVerificationMethodByPublicKey(publicKey)\n const kmsKeyId = keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n agentContext.config.logger.debug(\n `Found did '${didDocument.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = kmsKeyId ?? publicKey.legacyKeyId\n return publicKey\n } catch (error) {\n // If there is no did record yet, we first look at the mediator routing record\n const mediatorRoutingRepository = agentContext.dependencyManager.resolve(DidCommMediatorRoutingRepository)\n if (error instanceof RecordNotFoundError) {\n const mediatorRoutingRecord = await mediatorRoutingRepository.findSingleByQuery(agentContext, {\n routingKeyFingerprints: [publicKey.fingerprint],\n })\n\n if (mediatorRoutingRecord) {\n agentContext.config.logger.debug(\n `Found mediator routing record with id '${mediatorRoutingRecord.id}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n const routingKey = mediatorRoutingRecord.routingKeysWithKeyId.find((routingKey) =>\n publicKey.equals(routingKey)\n )\n\n // This should not happen as we only get here if the tag matches\n if (!routingKey) {\n throw new CredoError(\n `Expected to find key with fingerprint '${publicKey.fingerprint}' in routing keys of mediator routing record '${mediatorRoutingRecord.id}'`\n )\n }\n\n if (routingKey) {\n return routingKey\n }\n }\n\n // If there is no mediator routing record, we look at the out of band record\n const outOfBandRepository = agentContext.dependencyManager.resolve(DidCommOutOfBandRepository)\n const outOfBandRecord = await outOfBandRepository.findSingleByQuery(agentContext, {\n $or: [\n // In case we are the creator of the out of band invitation we can query based on\n // out of band invitation recipient key fingerprint\n {\n role: DidCommOutOfBandRole.Sender,\n recipientKeyFingerprints: [publicKey.fingerprint],\n },\n // In case we are the receiver of the out of band invitation we need to query\n // for the recipient routing fingerprint\n {\n role: DidCommOutOfBandRole.Receiver,\n recipientRoutingKeyFingerprint: publicKey.fingerprint,\n },\n ],\n })\n\n if (outOfBandRecord?.role === DidCommOutOfBandRole.Sender) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n for (const service of outOfBandRecord.outOfBandInvitation.getInlineServices()) {\n const resolvedService = getResolvedDidcommServiceWithSigningKeyId(\n service,\n outOfBandRecord.invitationInlineServiceKeys\n )\n const _recipientKey = resolvedService.recipientKeys.find((recipientKey) => recipientKey.equals(publicKey))\n\n if (_recipientKey) {\n return _recipientKey\n }\n }\n } else if (outOfBandRecord?.role === DidCommOutOfBandRole.Receiver) {\n agentContext.config.logger.debug(\n `Found out of band record with id '${outOfBandRecord.id}' and role '${outOfBandRecord.role}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n // If there is still no key we need to look at the metadata\n const recipieintRouting = outOfBandRecord.metadata.get(DidCommOutOfBandRecordMetadataKeys.RecipientRouting)\n if (recipieintRouting?.recipientKeyFingerprint === publicKey.fingerprint) {\n publicKey.keyId = recipieintRouting.recipientKeyId ?? publicKey.legacyKeyId\n return publicKey\n }\n }\n\n // If there is no did found, no out of band record found, and not mediator routing record\n // this is either:\n // - a connectionless oob exchange initiated before we added key ids.\n // - a message for a mediator, where the mediator routing record is created before we added key ids\n //\n // We will check if the public key exists based on the base58 encoded public key. We can remove this flow once we create a migration\n // that optimizes this flow.\n const kmsJwkPublic = await kms\n .getPublicKey({\n keyId: publicKey.legacyKeyId,\n })\n .catch((error) => {\n if (error instanceof Kms.KeyManagementKeyNotFoundError) return null\n throw error\n })\n if (kmsJwkPublic) {\n agentContext.config.logger.debug(\n `Found public key with legacy key id '${publicKey.legacyKeyId}' for recipient key '${publicKey.fingerprint}' for incoming didcomm message`\n )\n\n publicKey.keyId = publicKey.legacyKeyId\n return publicKey\n }\n }\n }\n\n // no match found\n return null\n }\n}\n\nexport interface DecryptedDidCommMessageContext {\n plaintextMessage: DidCommPlaintextMessage\n senderKey?: Kms.PublicJwk<Kms.Ed25519PublicJwk>\n recipientKey: Kms.PublicJwk<Kms.Ed25519PublicJwk>\n}\n"],"mappings":";;;;;;;;;;;;AA8BO,IAAM,yBAAN,MAAM,uBAAuB;CAIlC,YAAmB,QAAiD,wBAAgD;EAClH,KAAK,SAAS;EACd,KAAK,yBAAyB;CAChC;CAEA,MAAc,wBACZ,cACA,SACA,eACA,WACkC;EAClC,MAAM,MAAM,aAAa,kBAAkB,QAAQ,IAAI,gBAAgB;EAIvE,MAAM,uBAAuB,IAAI,YAAY,EAAE,QAAQ,GAAG,CAAC;EAE3D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