@credo-ts/didcomm 0.6.0-pr-2392-20251010173905 → 0.6.0-pr-2457-20251016083534
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/BaseDidCommMessage.d.mts.map +1 -1
- package/build/BaseDidCommMessage.d.ts.map +1 -1
- package/build/BaseDidCommMessage.js +3 -3
- package/build/BaseDidCommMessage.mjs +2 -2
- package/build/BaseDidCommMessage.mjs.map +1 -1
- package/build/DidCommApi.d.mts +6 -10
- package/build/DidCommApi.d.mts.map +1 -1
- package/build/DidCommApi.d.ts +6 -10
- package/build/DidCommApi.d.ts.map +1 -1
- package/build/DidCommApi.js +16 -21
- package/build/DidCommApi.mjs +16 -21
- package/build/DidCommApi.mjs.map +1 -1
- package/build/DidCommDispatcher.d.mts.map +1 -1
- package/build/DidCommDispatcher.d.ts.map +1 -1
- package/build/DidCommDispatcher.js +7 -7
- package/build/DidCommDispatcher.mjs +7 -7
- package/build/DidCommDispatcher.mjs.map +1 -1
- package/build/DidCommEnvelopeService.d.mts.map +1 -1
- package/build/DidCommEnvelopeService.d.ts.map +1 -1
- package/build/DidCommEnvelopeService.js +5 -5
- package/build/DidCommEnvelopeService.mjs +5 -5
- package/build/DidCommEnvelopeService.mjs.map +1 -1
- package/build/DidCommFeatureRegistry.d.mts.map +1 -1
- package/build/DidCommFeatureRegistry.d.ts.map +1 -1
- package/build/DidCommFeatureRegistry.mjs.map +1 -1
- package/build/DidCommMessage.d.mts +1 -1
- package/build/DidCommMessage.d.mts.map +1 -1
- package/build/DidCommMessage.d.ts +1 -1
- package/build/DidCommMessage.d.ts.map +1 -1
- package/build/DidCommMessage.js +2 -2
- package/build/DidCommMessage.mjs +2 -2
- package/build/DidCommMessage.mjs.map +1 -1
- package/build/DidCommMessageHandlerRegistry.d.mts.map +1 -1
- package/build/DidCommMessageHandlerRegistry.d.ts.map +1 -1
- package/build/DidCommMessageHandlerRegistry.mjs.map +1 -1
- package/build/DidCommMessageReceiver.d.mts +1 -6
- package/build/DidCommMessageReceiver.d.mts.map +1 -1
- package/build/DidCommMessageReceiver.d.ts +1 -6
- package/build/DidCommMessageReceiver.d.ts.map +1 -1
- package/build/DidCommMessageReceiver.js +9 -21
- package/build/DidCommMessageReceiver.mjs +9 -21
- package/build/DidCommMessageReceiver.mjs.map +1 -1
- package/build/DidCommMessageSender.d.mts +1 -6
- package/build/DidCommMessageSender.d.mts.map +1 -1
- package/build/DidCommMessageSender.d.ts +1 -6
- package/build/DidCommMessageSender.d.ts.map +1 -1
- package/build/DidCommMessageSender.js +17 -29
- package/build/DidCommMessageSender.mjs +17 -29
- package/build/DidCommMessageSender.mjs.map +1 -1
- package/build/DidCommModule.d.mts +1 -1
- package/build/DidCommModule.d.mts.map +1 -1
- package/build/DidCommModule.d.ts +1 -1
- package/build/DidCommModule.d.ts.map +1 -1
- package/build/DidCommModule.js +9 -12
- package/build/DidCommModule.mjs +9 -12
- package/build/DidCommModule.mjs.map +1 -1
- package/build/DidCommModuleConfig.d.mts +14 -2
- package/build/DidCommModuleConfig.d.mts.map +1 -1
- package/build/DidCommModuleConfig.d.ts +14 -2
- package/build/DidCommModuleConfig.d.ts.map +1 -1
- package/build/DidCommModuleConfig.js +15 -1
- package/build/DidCommModuleConfig.mjs +15 -1
- package/build/DidCommModuleConfig.mjs.map +1 -1
- package/build/DidCommTransportService.d.mts.map +1 -1
- package/build/DidCommTransportService.d.ts.map +1 -1
- package/build/DidCommTransportService.js +1 -1
- package/build/DidCommTransportService.mjs +1 -1
- package/build/DidCommTransportService.mjs.map +1 -1
- package/build/decorators/ack/AckDecorator.js +1 -1
- package/build/decorators/ack/AckDecorator.mjs +1 -1
- package/build/decorators/ack/AckDecoratorExtension.js +3 -3
- package/build/decorators/ack/AckDecoratorExtension.mjs +2 -2
- package/build/decorators/ack/AckDecoratorExtension.mjs.map +1 -1
- package/build/decorators/attachment/AttachmentExtension.js +3 -3
- package/build/decorators/attachment/AttachmentExtension.mjs +2 -2
- package/build/decorators/attachment/AttachmentExtension.mjs.map +1 -1
- package/build/decorators/attachment/DidCommAttachment.js +3 -3
- package/build/decorators/attachment/DidCommAttachment.mjs +2 -2
- package/build/decorators/attachment/DidCommAttachment.mjs.map +1 -1
- package/build/decorators/l10n/L10nDecoratorExtension.js +3 -3
- package/build/decorators/l10n/L10nDecoratorExtension.mjs +2 -2
- package/build/decorators/l10n/L10nDecoratorExtension.mjs.map +1 -1
- package/build/decorators/service/ServiceDecorator.js +1 -1
- package/build/decorators/service/ServiceDecorator.mjs +1 -1
- package/build/decorators/service/ServiceDecoratorExtension.js +3 -3
- package/build/decorators/service/ServiceDecoratorExtension.mjs +2 -2
- package/build/decorators/service/ServiceDecoratorExtension.mjs.map +1 -1
- package/build/decorators/signature/SignatureDecorator.js +4 -4
- package/build/decorators/signature/SignatureDecorator.mjs +3 -3
- package/build/decorators/thread/ThreadDecorator.js +3 -3
- package/build/decorators/thread/ThreadDecorator.mjs +2 -2
- package/build/decorators/thread/ThreadDecoratorExtension.js +3 -3
- package/build/decorators/thread/ThreadDecoratorExtension.mjs +2 -2
- package/build/decorators/thread/ThreadDecoratorExtension.mjs.map +1 -1
- package/build/decorators/timing/TimingDecorator.js +3 -3
- package/build/decorators/timing/TimingDecorator.mjs +2 -2
- package/build/decorators/timing/TimingDecoratorExtension.js +3 -3
- package/build/decorators/timing/TimingDecoratorExtension.mjs +2 -2
- package/build/decorators/timing/TimingDecoratorExtension.mjs.map +1 -1
- package/build/decorators/transport/TransportDecorator.js +3 -3
- package/build/decorators/transport/TransportDecorator.mjs +2 -2
- package/build/decorators/transport/TransportDecoratorExtension.js +3 -3
- package/build/decorators/transport/TransportDecoratorExtension.mjs +2 -2
- package/build/decorators/transport/TransportDecoratorExtension.mjs.map +1 -1
- package/build/errors/MessageSendingError.d.mts.map +1 -1
- package/build/errors/MessageSendingError.d.ts.map +1 -1
- package/build/errors/MessageSendingError.mjs.map +1 -1
- package/build/errors/index.js +1 -1
- package/build/errors/index.mjs +1 -1
- package/build/getDidCommOutboundMessageContext.d.mts.map +1 -1
- package/build/getDidCommOutboundMessageContext.d.ts.map +1 -1
- package/build/getDidCommOutboundMessageContext.js +6 -6
- package/build/getDidCommOutboundMessageContext.mjs +6 -6
- package/build/getDidCommOutboundMessageContext.mjs.map +1 -1
- package/build/handlers/DidCommMessageHandlerMiddleware.mjs.map +1 -1
- package/build/index.d.mts +99 -99
- package/build/index.d.ts +99 -99
- package/build/index.js +114 -112
- package/build/index.mjs +108 -108
- package/build/messages/common/DidCommAckMessage.js +1 -1
- package/build/messages/common/DidCommAckMessage.mjs +1 -1
- package/build/messages/problem-reports/DidCommProblemReportMessage.js +3 -3
- package/build/messages/problem-reports/DidCommProblemReportMessage.mjs +2 -2
- package/build/models/DidCommInboundMessageContext.d.mts.map +1 -1
- package/build/models/DidCommInboundMessageContext.d.ts.map +1 -1
- package/build/models/DidCommInboundMessageContext.mjs.map +1 -1
- package/build/models/DidCommOutboundMessageContext.d.mts.map +1 -1
- package/build/models/DidCommOutboundMessageContext.d.ts.map +1 -1
- package/build/models/DidCommOutboundMessageContext.mjs.map +1 -1
- package/build/models/features/DidCommFeature.js +3 -3
- package/build/models/features/DidCommFeature.mjs +2 -2
- package/build/models/features/DidCommFeatureQuery.js +3 -3
- package/build/models/features/DidCommFeatureQuery.mjs +2 -2
- package/build/models/features/DidCommProtocol.d.mts.map +1 -1
- package/build/models/features/DidCommProtocol.d.ts.map +1 -1
- package/build/models/features/DidCommProtocol.js +1 -1
- package/build/models/features/DidCommProtocol.mjs +1 -1
- package/build/models/features/DidCommProtocol.mjs.map +1 -1
- package/build/models/index.js +3 -3
- package/build/models/index.mjs +3 -3
- package/build/modules/basic-messages/DidCommBasicMessagesApi.d.mts +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesApi.d.mts.map +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesApi.d.ts +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesApi.d.ts.map +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesApi.js +2 -2
- package/build/modules/basic-messages/DidCommBasicMessagesApi.mjs +2 -2
- package/build/modules/basic-messages/DidCommBasicMessagesApi.mjs.map +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesModule.d.mts.map +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesModule.d.ts.map +1 -1
- package/build/modules/basic-messages/DidCommBasicMessagesModule.js +2 -2
- package/build/modules/basic-messages/DidCommBasicMessagesModule.mjs +2 -2
- package/build/modules/basic-messages/DidCommBasicMessagesModule.mjs.map +1 -1
- package/build/modules/basic-messages/handlers/BasicMessageHandler.mjs.map +1 -1
- package/build/modules/basic-messages/index.js +2 -2
- package/build/modules/basic-messages/index.mjs +2 -2
- package/build/modules/basic-messages/messages/DidCommBasicMessage.js +3 -3
- package/build/modules/basic-messages/messages/DidCommBasicMessage.mjs +2 -2
- package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.d.mts.map +1 -1
- package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.d.ts.map +1 -1
- package/build/modules/basic-messages/repository/DidCommBasicMessageRecord.mjs.map +1 -1
- package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.js +1 -1
- package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.mjs +1 -1
- package/build/modules/basic-messages/repository/DidCommBasicMessageRepository.mjs.map +1 -1
- package/build/modules/basic-messages/services/DidCommBasicMessageService.d.mts.map +1 -1
- package/build/modules/basic-messages/services/DidCommBasicMessageService.d.ts.map +1 -1
- package/build/modules/basic-messages/services/DidCommBasicMessageService.js +4 -4
- package/build/modules/basic-messages/services/DidCommBasicMessageService.mjs +4 -4
- package/build/modules/basic-messages/services/DidCommBasicMessageService.mjs.map +1 -1
- package/build/modules/connections/DidCommConnectionsApi.d.mts +3 -3
- package/build/modules/connections/DidCommConnectionsApi.d.mts.map +1 -1
- package/build/modules/connections/DidCommConnectionsApi.d.ts +3 -3
- package/build/modules/connections/DidCommConnectionsApi.d.ts.map +1 -1
- package/build/modules/connections/DidCommConnectionsApi.js +5 -5
- package/build/modules/connections/DidCommConnectionsApi.mjs +5 -5
- package/build/modules/connections/DidCommConnectionsApi.mjs.map +1 -1
- package/build/modules/connections/DidCommConnectionsModule.d.mts.map +1 -1
- package/build/modules/connections/DidCommConnectionsModule.d.ts.map +1 -1
- package/build/modules/connections/DidCommConnectionsModule.js +20 -20
- package/build/modules/connections/DidCommConnectionsModule.mjs +20 -20
- package/build/modules/connections/DidCommConnectionsModule.mjs.map +1 -1
- package/build/modules/connections/DidExchangeProtocol.d.mts +2 -4
- package/build/modules/connections/DidExchangeProtocol.d.mts.map +1 -1
- package/build/modules/connections/DidExchangeProtocol.d.ts +2 -4
- package/build/modules/connections/DidExchangeProtocol.d.ts.map +1 -1
- package/build/modules/connections/DidExchangeProtocol.js +11 -15
- package/build/modules/connections/DidExchangeProtocol.mjs +11 -15
- package/build/modules/connections/DidExchangeProtocol.mjs.map +1 -1
- package/build/modules/connections/DidExchangeStateMachine.js +1 -1
- package/build/modules/connections/DidExchangeStateMachine.mjs +1 -1
- package/build/modules/connections/DidExchangeStateMachine.mjs.map +1 -1
- package/build/modules/connections/errors/ConnectionProblemReportError.d.mts +1 -1
- package/build/modules/connections/errors/ConnectionProblemReportError.d.mts.map +1 -1
- package/build/modules/connections/errors/ConnectionProblemReportError.d.ts +1 -1
- package/build/modules/connections/errors/ConnectionProblemReportError.d.ts.map +1 -1
- package/build/modules/connections/errors/ConnectionProblemReportError.mjs.map +1 -1
- package/build/modules/connections/errors/DidExchangeProblemReportError.d.mts +1 -1
- package/build/modules/connections/errors/DidExchangeProblemReportError.d.mts.map +1 -1
- package/build/modules/connections/errors/DidExchangeProblemReportError.d.ts +1 -1
- package/build/modules/connections/errors/DidExchangeProblemReportError.d.ts.map +1 -1
- package/build/modules/connections/errors/DidExchangeProblemReportError.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommAckMessageHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommAckMessageHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommAckMessageHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionProblemReportHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.mts +1 -1
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.ts +1 -1
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.js +4 -4
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.mjs +4 -4
- package/build/modules/connections/handlers/DidCommConnectionRequestHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionResponseHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionResponseHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommConnectionResponseHandler.js +3 -3
- package/build/modules/connections/handlers/DidCommConnectionResponseHandler.mjs +3 -3
- package/build/modules/connections/handlers/DidCommConnectionResponseHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeCompleteHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.mts +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.ts +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.js +4 -4
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.mjs +4 -4
- package/build/modules/connections/handlers/DidCommDidExchangeRequestHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.mts +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.ts +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.js +4 -4
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.mjs +4 -4
- package/build/modules/connections/handlers/DidCommDidExchangeResponseHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateAckHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateAckHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateAckHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateHandler.d.mts +3 -5
- package/build/modules/connections/handlers/DidCommDidRotateHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateHandler.d.ts +3 -5
- package/build/modules/connections/handlers/DidCommDidRotateHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateHandler.js +1 -2
- package/build/modules/connections/handlers/DidCommDidRotateHandler.mjs +1 -2
- package/build/modules/connections/handlers/DidCommDidRotateHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommDidRotateProblemReportHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommHangupHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommHangupHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommHangupHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommTrustPingMessageHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.d.mts.map +1 -1
- package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.d.ts.map +1 -1
- package/build/modules/connections/handlers/DidCommTrustPingResponseMessageHandler.mjs.map +1 -1
- package/build/modules/connections/handlers/index.js +5 -5
- package/build/modules/connections/handlers/index.mjs +5 -5
- package/build/modules/connections/index.js +23 -23
- package/build/modules/connections/index.mjs +23 -23
- package/build/modules/connections/messages/DidCommConnectionInvitationMessage.d.mts.map +1 -1
- package/build/modules/connections/messages/DidCommConnectionInvitationMessage.d.ts.map +1 -1
- package/build/modules/connections/messages/DidCommConnectionInvitationMessage.js +4 -4
- package/build/modules/connections/messages/DidCommConnectionInvitationMessage.mjs +4 -4
- package/build/modules/connections/messages/DidCommConnectionInvitationMessage.mjs.map +1 -1
- package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.js +1 -1
- package/build/modules/connections/messages/DidCommConnectionProblemReportMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommConnectionRequestMessage.d.mts.map +1 -1
- package/build/modules/connections/messages/DidCommConnectionRequestMessage.d.ts.map +1 -1
- package/build/modules/connections/messages/DidCommConnectionRequestMessage.js +4 -4
- package/build/modules/connections/messages/DidCommConnectionRequestMessage.mjs +3 -3
- package/build/modules/connections/messages/DidCommConnectionRequestMessage.mjs.map +1 -1
- package/build/modules/connections/messages/DidCommConnectionResponseMessage.js +3 -3
- package/build/modules/connections/messages/DidCommConnectionResponseMessage.mjs +2 -2
- package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.js +1 -1
- package/build/modules/connections/messages/DidCommDidExchangeCompleteMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.js +1 -1
- package/build/modules/connections/messages/DidCommDidExchangeProblemReportMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.js +4 -4
- package/build/modules/connections/messages/DidCommDidExchangeRequestMessage.mjs +3 -3
- package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.js +4 -4
- package/build/modules/connections/messages/DidCommDidExchangeResponseMessage.mjs +3 -3
- package/build/modules/connections/messages/DidCommDidRotateAckMessage.js +1 -1
- package/build/modules/connections/messages/DidCommDidRotateAckMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommDidRotateMessage.js +3 -3
- package/build/modules/connections/messages/DidCommDidRotateMessage.mjs +2 -2
- package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.js +1 -1
- package/build/modules/connections/messages/DidCommDidRotateProblemReportMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommHangupMessage.js +1 -1
- package/build/modules/connections/messages/DidCommHangupMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommTrustPingMessage.d.mts.map +1 -1
- package/build/modules/connections/messages/DidCommTrustPingMessage.d.ts.map +1 -1
- package/build/modules/connections/messages/DidCommTrustPingMessage.js +3 -3
- package/build/modules/connections/messages/DidCommTrustPingMessage.mjs +2 -2
- package/build/modules/connections/messages/DidCommTrustPingMessage.mjs.map +1 -1
- package/build/modules/connections/messages/DidCommTrustPingResponseMessage.d.mts.map +1 -1
- package/build/modules/connections/messages/DidCommTrustPingResponseMessage.d.ts.map +1 -1
- package/build/modules/connections/messages/DidCommTrustPingResponseMessage.js +1 -1
- package/build/modules/connections/messages/DidCommTrustPingResponseMessage.mjs +1 -1
- package/build/modules/connections/messages/DidCommTrustPingResponseMessage.mjs.map +1 -1
- package/build/modules/connections/messages/index.js +7 -7
- package/build/modules/connections/messages/index.mjs +7 -7
- package/build/modules/connections/models/DidCommConnection.js +3 -3
- package/build/modules/connections/models/DidCommConnection.mjs +2 -2
- package/build/modules/connections/models/did/DidDoc.d.mts.map +1 -1
- package/build/modules/connections/models/did/DidDoc.d.ts.map +1 -1
- package/build/modules/connections/models/did/DidDoc.js +3 -3
- package/build/modules/connections/models/did/DidDoc.mjs +2 -2
- package/build/modules/connections/models/did/DidDoc.mjs.map +1 -1
- package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.js +1 -1
- package/build/modules/connections/models/did/authentication/EmbeddedAuthentication.mjs +1 -1
- package/build/modules/connections/models/did/authentication/ReferencedAuthentication.js +3 -3
- package/build/modules/connections/models/did/authentication/ReferencedAuthentication.mjs +2 -2
- package/build/modules/connections/models/did/authentication/index.d.mts.map +1 -1
- package/build/modules/connections/models/did/authentication/index.d.ts.map +1 -1
- package/build/modules/connections/models/did/authentication/index.mjs.map +1 -1
- package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.js +3 -3
- package/build/modules/connections/models/did/publicKey/Ed25119Sig2018.mjs +2 -2
- package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.js +3 -3
- package/build/modules/connections/models/did/publicKey/EddsaSaSigSecp256k1.mjs +2 -2
- package/build/modules/connections/models/did/publicKey/PublicKey.js +1 -1
- package/build/modules/connections/models/did/publicKey/PublicKey.mjs +1 -1
- package/build/modules/connections/models/did/publicKey/RsaSig2018.js +3 -3
- package/build/modules/connections/models/did/publicKey/RsaSig2018.mjs +2 -2
- package/build/modules/connections/models/did/publicKey/index.mjs.map +1 -1
- package/build/modules/connections/models/index.js +1 -1
- package/build/modules/connections/models/index.mjs +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.d.mts +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.d.mts.map +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.d.ts +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.d.ts.map +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.js +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.mjs +1 -1
- package/build/modules/connections/repository/DidCommConnectionRecord.mjs.map +1 -1
- package/build/modules/connections/repository/DidCommConnectionRepository.js +2 -2
- package/build/modules/connections/repository/DidCommConnectionRepository.mjs +2 -2
- package/build/modules/connections/repository/DidCommConnectionRepository.mjs.map +1 -1
- package/build/modules/connections/services/DidCommConnectionService.d.mts +3 -3
- package/build/modules/connections/services/DidCommConnectionService.d.mts.map +1 -1
- package/build/modules/connections/services/DidCommConnectionService.d.ts +3 -3
- package/build/modules/connections/services/DidCommConnectionService.d.ts.map +1 -1
- package/build/modules/connections/services/DidCommConnectionService.js +13 -13
- package/build/modules/connections/services/DidCommConnectionService.mjs +13 -13
- package/build/modules/connections/services/DidCommConnectionService.mjs.map +1 -1
- package/build/modules/connections/services/DidCommDidRotateService.d.mts +2 -2
- package/build/modules/connections/services/DidCommDidRotateService.d.mts.map +1 -1
- package/build/modules/connections/services/DidCommDidRotateService.d.ts +2 -2
- package/build/modules/connections/services/DidCommDidRotateService.d.ts.map +1 -1
- package/build/modules/connections/services/DidCommDidRotateService.js +8 -8
- package/build/modules/connections/services/DidCommDidRotateService.mjs +8 -8
- package/build/modules/connections/services/DidCommDidRotateService.mjs.map +1 -1
- package/build/modules/connections/services/DidCommTrustPingService.d.mts.map +1 -1
- package/build/modules/connections/services/DidCommTrustPingService.d.ts.map +1 -1
- package/build/modules/connections/services/DidCommTrustPingService.js +1 -1
- package/build/modules/connections/services/DidCommTrustPingService.mjs +1 -1
- package/build/modules/connections/services/DidCommTrustPingService.mjs.map +1 -1
- package/build/modules/connections/services/helpers.js +1 -1
- package/build/modules/connections/services/helpers.mjs +1 -1
- package/build/modules/connections/services/helpers.mjs.map +1 -1
- package/build/modules/credentials/DidCommCredentialsApi.d.mts.map +1 -1
- package/build/modules/credentials/DidCommCredentialsApi.d.ts.map +1 -1
- package/build/modules/credentials/DidCommCredentialsApi.js +2 -2
- package/build/modules/credentials/DidCommCredentialsApi.mjs +2 -2
- package/build/modules/credentials/DidCommCredentialsApi.mjs.map +1 -1
- package/build/modules/credentials/DidCommCredentialsModule.d.mts.map +1 -1
- package/build/modules/credentials/DidCommCredentialsModule.d.ts.map +1 -1
- package/build/modules/credentials/DidCommCredentialsModule.js +2 -2
- package/build/modules/credentials/DidCommCredentialsModule.mjs +2 -2
- package/build/modules/credentials/DidCommCredentialsModule.mjs.map +1 -1
- package/build/modules/credentials/DidCommCredentialsModuleConfig.d.mts.map +1 -1
- package/build/modules/credentials/DidCommCredentialsModuleConfig.d.ts.map +1 -1
- package/build/modules/credentials/DidCommCredentialsModuleConfig.mjs.map +1 -1
- package/build/modules/credentials/formats/DidCommCredentialFormatServiceOptions.d.mts +1 -1
- package/build/modules/credentials/formats/DidCommCredentialFormatServiceOptions.d.ts +1 -1
- package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.js +3 -3
- package/build/modules/credentials/formats/dataIntegrity/dataIntegrityExchange.mjs +2 -2
- package/build/modules/credentials/formats/index.js +2 -2
- package/build/modules/credentials/formats/index.mjs +2 -2
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.js +1 -1
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetail.mjs +1 -1
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.js +1 -1
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialDetailOptions.mjs +1 -1
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.d.mts.map +1 -1
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.d.ts.map +1 -1
- package/build/modules/credentials/formats/jsonld/DidCommJsonLdCredentialFormatService.mjs.map +1 -1
- package/build/modules/credentials/index.js +5 -5
- package/build/modules/credentials/index.mjs +5 -5
- package/build/modules/credentials/models/DidCommCredentialFormatSpec.js +3 -3
- package/build/modules/credentials/models/DidCommCredentialFormatSpec.mjs +2 -2
- package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.js +3 -3
- package/build/modules/credentials/models/DidCommCredentialPreviewAttribute.mjs +2 -2
- package/build/modules/credentials/models/DidCommRevocationNotification.js +1 -1
- package/build/modules/credentials/models/DidCommRevocationNotification.mjs +1 -1
- package/build/modules/credentials/models/index.js +3 -3
- package/build/modules/credentials/models/index.mjs +3 -3
- package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.mts +1 -1
- package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.mts.map +1 -1
- package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.ts +1 -1
- package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.d.ts.map +1 -1
- package/build/modules/credentials/protocol/DidCommBaseCredentialProtocol.mjs.map +1 -1
- package/build/modules/credentials/protocol/DidCommCredentialProtocol.d.mts +1 -1
- package/build/modules/credentials/protocol/DidCommCredentialProtocol.d.ts +1 -1
- package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.d.mts +1 -1
- package/build/modules/credentials/protocol/DidCommCredentialProtocolOptions.d.ts +1 -1
- package/build/modules/credentials/protocol/index.js +1 -1
- package/build/modules/credentials/protocol/index.mjs +1 -1
- package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV1Handler.mjs.map +1 -1
- package/build/modules/credentials/protocol/revocation-notification/handlers/DidCommRevocationNotificationV2Handler.mjs.map +1 -1
- package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.js +4 -4
- package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV1Message.mjs +3 -3
- package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.js +4 -4
- package/build/modules/credentials/protocol/revocation-notification/messages/DidCommRevocationNotificationV2Message.mjs +3 -3
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.mts +1 -1
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.mts.map +1 -1
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.ts +1 -1
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.d.ts.map +1 -1
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.js +1 -1
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.mjs +1 -1
- package/build/modules/credentials/protocol/revocation-notification/services/DidCommRevocationNotificationService.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.js +2 -2
- package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.mjs +2 -2
- package/build/modules/credentials/protocol/v2/DidCommCredentialFormatCoordinator.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.mts +2 -2
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.mts.map +1 -1
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.ts +2 -2
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.d.ts.map +1 -1
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.js +5 -5
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.mjs +5 -5
- package/build/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts +1 -1
- package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts.map +1 -1
- package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts +1 -1
- package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts.map +1 -1
- package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.mts.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.ts.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/handlers/index.js +1 -1
- package/build/modules/credentials/protocol/v2/handlers/index.mjs +1 -1
- package/build/modules/credentials/protocol/v2/index.js +1 -1
- package/build/modules/credentials/protocol/v2/index.mjs +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.js +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2AckMessage.mjs +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.mts +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.mts.map +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.ts +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.d.ts.map +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.js +3 -3
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.mjs +2 -2
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.mjs.map +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.js +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommCredentialV2ProblemReportMessage.mjs +1 -1
- package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.js +4 -4
- package/build/modules/credentials/protocol/v2/messages/DidCommIssueCredentialV2Message.mjs +3 -3
- package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.js +4 -4
- package/build/modules/credentials/protocol/v2/messages/DidCommOfferCredentialV2Message.mjs +3 -3
- package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.js +4 -4
- package/build/modules/credentials/protocol/v2/messages/DidCommProposeCredentialV2Message.mjs +3 -3
- package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.js +4 -4
- package/build/modules/credentials/protocol/v2/messages/DidCommRequestCredentialV2Message.mjs +3 -3
- package/build/modules/credentials/protocol/v2/messages/index.js +1 -1
- package/build/modules/credentials/protocol/v2/messages/index.mjs +1 -1
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.mts +2 -2
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.mts.map +1 -1
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.ts +2 -2
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.d.ts.map +1 -1
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.js +2 -2
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.mjs +2 -2
- package/build/modules/credentials/repository/DidCommCredentialExchangeRecord.mjs.map +1 -1
- package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.js +1 -1
- package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.mjs +1 -1
- package/build/modules/credentials/repository/DidCommCredentialExchangeRepository.mjs.map +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.mts +3 -3
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.mts.map +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.ts +3 -3
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.d.ts.map +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.js +3 -3
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.mjs +3 -3
- package/build/modules/discover-features/DidCommDiscoverFeaturesApi.mjs.map +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.d.mts +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesEvents.d.ts +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesModule.d.mts.map +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesModule.d.ts.map +1 -1
- package/build/modules/discover-features/DidCommDiscoverFeaturesModule.js +2 -2
- package/build/modules/discover-features/DidCommDiscoverFeaturesModule.mjs +2 -2
- package/build/modules/discover-features/DidCommDiscoverFeaturesModule.mjs.map +1 -1
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.mts +2 -2
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.mts.map +1 -1
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.ts +2 -2
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.d.ts.map +1 -1
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.js +4 -4
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.mjs +4 -4
- package/build/modules/discover-features/protocol/v1/DidCommDiscoverFeaturesV1Service.mjs.map +1 -1
- package/build/modules/discover-features/protocol/v1/handlers/DidCommFeaturesQueryMessageHandler.mjs.map +1 -1
- package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.js +3 -3
- package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesDiscloseMessage.mjs +2 -2
- package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.js +1 -1
- package/build/modules/discover-features/protocol/v1/messages/DidCommFeaturesQueryMessage.mjs +1 -1
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.mts +2 -2
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.mts.map +1 -1
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.ts +2 -2
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.d.ts.map +1 -1
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.js +2 -2
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.mjs +2 -2
- package/build/modules/discover-features/protocol/v2/DidCommDiscoverFeaturesV2Service.mjs.map +1 -1
- package/build/modules/discover-features/protocol/v2/handlers/DidCommFeaturesQueriesMessageHandler.mjs.map +1 -1
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.js +3 -3
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesDisclosuresMessage.mjs +2 -2
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.d.mts.map +1 -1
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.d.ts.map +1 -1
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.js +3 -3
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.mjs +2 -2
- package/build/modules/discover-features/protocol/v2/messages/DidCommFeaturesQueriesMessage.mjs.map +1 -1
- package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.d.mts +1 -1
- package/build/modules/discover-features/services/DidCommDiscoverFeaturesService.d.ts +1 -1
- package/build/modules/index.js +66 -66
- package/build/modules/index.mjs +66 -66
- package/build/modules/message-pickup/DidCommMessagePickupApi.d.mts +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupApi.d.mts.map +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupApi.d.ts +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupApi.d.ts.map +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupApi.js +4 -4
- package/build/modules/message-pickup/DidCommMessagePickupApi.mjs +4 -4
- package/build/modules/message-pickup/DidCommMessagePickupApi.mjs.map +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupModule.d.mts +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupModule.d.mts.map +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupModule.d.ts +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupModule.d.ts.map +1 -1
- package/build/modules/message-pickup/DidCommMessagePickupModule.mjs.map +1 -1
- package/build/modules/message-pickup/index.js +1 -1
- package/build/modules/message-pickup/index.mjs +1 -1
- package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.d.mts +1 -1
- package/build/modules/message-pickup/protocol/DidCommBaseMessagePickupProtocol.d.ts +1 -1
- package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocol.d.mts +1 -1
- package/build/modules/message-pickup/protocol/DidCommMessagePickupProtocol.d.ts +1 -1
- package/build/modules/message-pickup/protocol/index.js +1 -1
- package/build/modules/message-pickup/protocol/index.mjs +1 -1
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.mts +1 -1
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.mts.map +1 -1
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.ts +1 -1
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.d.ts.map +1 -1
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.js +3 -3
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.mjs +3 -3
- package/build/modules/message-pickup/protocol/v1/DidCommMessagePickupV1Protocol.mjs.map +1 -1
- package/build/modules/message-pickup/protocol/v1/handlers/DidCommBatchHandler.mjs.map +1 -1
- package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.js +4 -4
- package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchMessage.mjs +3 -3
- package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.js +3 -3
- package/build/modules/message-pickup/protocol/v1/messages/DidCommBatchPickupMessage.mjs +2 -2
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.mts +2 -2
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.mts.map +1 -1
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.ts +2 -2
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.d.ts.map +1 -1
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.js +5 -5
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.mjs +5 -5
- package/build/modules/message-pickup/protocol/v2/DidCommMessagePickupV2Protocol.mjs.map +1 -1
- package/build/modules/message-pickup/protocol/v2/handlers/DidCommMessageDeliveryV2Handler.mjs.map +1 -1
- package/build/modules/message-pickup/protocol/v2/handlers/DidCommStatusV2Handler.mjs.map +1 -1
- package/build/modules/message-pickup/protocol/v2/handlers/index.js +1 -1
- package/build/modules/message-pickup/protocol/v2/handlers/index.mjs +1 -1
- package/build/modules/message-pickup/protocol/v2/index.js +1 -1
- package/build/modules/message-pickup/protocol/v2/index.mjs +1 -1
- package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.js +4 -4
- package/build/modules/message-pickup/protocol/v2/messages/DidCommDeliveryRequestV2Message.mjs +3 -3
- package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.js +4 -4
- package/build/modules/message-pickup/protocol/v2/messages/DidCommLiveDeliveryChangeV2Message.mjs +3 -3
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.d.mts.map +1 -1
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.d.ts.map +1 -1
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.js +4 -4
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.mjs +3 -3
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessageDeliveryV2Message.mjs.map +1 -1
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.js +4 -4
- package/build/modules/message-pickup/protocol/v2/messages/DidCommMessagesReceivedV2Message.mjs +3 -3
- package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.js +3 -3
- package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusRequestV2Message.mjs +2 -2
- package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.js +4 -4
- package/build/modules/message-pickup/protocol/v2/messages/DidCommStatusV2Message.mjs +3 -3
- package/build/modules/message-pickup/protocol/v2/messages/index.js +1 -1
- package/build/modules/message-pickup/protocol/v2/messages/index.mjs +1 -1
- package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.d.mts.map +1 -1
- package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.d.ts.map +1 -1
- package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.js +1 -1
- package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.mjs +1 -1
- package/build/modules/message-pickup/services/DidCommMessagePickupSessionService.mjs.map +1 -1
- package/build/modules/oob/DidCommOutOfBandApi.d.mts +4 -4
- package/build/modules/oob/DidCommOutOfBandApi.d.mts.map +1 -1
- package/build/modules/oob/DidCommOutOfBandApi.d.ts +4 -4
- package/build/modules/oob/DidCommOutOfBandApi.d.ts.map +1 -1
- package/build/modules/oob/DidCommOutOfBandApi.js +16 -16
- package/build/modules/oob/DidCommOutOfBandApi.mjs +16 -16
- package/build/modules/oob/DidCommOutOfBandApi.mjs.map +1 -1
- package/build/modules/oob/DidCommOutOfBandModule.d.mts.map +1 -1
- package/build/modules/oob/DidCommOutOfBandModule.d.ts.map +1 -1
- package/build/modules/oob/DidCommOutOfBandModule.js +3 -3
- package/build/modules/oob/DidCommOutOfBandModule.mjs +3 -3
- package/build/modules/oob/DidCommOutOfBandModule.mjs.map +1 -1
- package/build/modules/oob/DidCommOutOfBandService.d.mts +2 -2
- package/build/modules/oob/DidCommOutOfBandService.d.mts.map +1 -1
- package/build/modules/oob/DidCommOutOfBandService.d.ts +2 -2
- package/build/modules/oob/DidCommOutOfBandService.d.ts.map +1 -1
- package/build/modules/oob/DidCommOutOfBandService.js +6 -6
- package/build/modules/oob/DidCommOutOfBandService.mjs +6 -6
- package/build/modules/oob/DidCommOutOfBandService.mjs.map +1 -1
- package/build/modules/oob/converters.js +1 -1
- package/build/modules/oob/converters.mjs +1 -1
- package/build/modules/oob/converters.mjs.map +1 -1
- package/build/modules/oob/domain/OutOfBandDidCommService.d.mts.map +1 -1
- package/build/modules/oob/domain/OutOfBandDidCommService.d.ts.map +1 -1
- package/build/modules/oob/domain/OutOfBandDidCommService.js +1 -1
- package/build/modules/oob/domain/OutOfBandDidCommService.mjs +1 -1
- package/build/modules/oob/domain/OutOfBandDidCommService.mjs.map +1 -1
- package/build/modules/oob/domain/index.js +2 -2
- package/build/modules/oob/domain/index.mjs +2 -2
- package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.js +1 -1
- package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.mjs +1 -1
- package/build/modules/oob/handlers/DidCommHandshakeReuseHandler.mjs.map +1 -1
- package/build/modules/oob/helpers.mjs.map +1 -1
- package/build/modules/oob/index.js +3 -3
- package/build/modules/oob/index.mjs +3 -3
- package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.js +1 -1
- package/build/modules/oob/messages/DidCommHandshakeReuseAcceptedMessage.mjs +1 -1
- package/build/modules/oob/messages/DidCommHandshakeReuseMessage.js +1 -1
- package/build/modules/oob/messages/DidCommHandshakeReuseMessage.mjs +1 -1
- package/build/modules/oob/messages/DidCommOutOfBandInvitation.d.mts.map +1 -1
- package/build/modules/oob/messages/DidCommOutOfBandInvitation.d.ts.map +1 -1
- package/build/modules/oob/messages/DidCommOutOfBandInvitation.js +6 -6
- package/build/modules/oob/messages/DidCommOutOfBandInvitation.mjs +6 -6
- package/build/modules/oob/messages/DidCommOutOfBandInvitation.mjs.map +1 -1
- package/build/modules/oob/messages/index.js +1 -1
- package/build/modules/oob/messages/index.mjs +1 -1
- package/build/modules/oob/repository/DidCommOutOfBandRecord.d.mts.map +1 -1
- package/build/modules/oob/repository/DidCommOutOfBandRecord.d.ts.map +1 -1
- package/build/modules/oob/repository/DidCommOutOfBandRecord.js +2 -2
- package/build/modules/oob/repository/DidCommOutOfBandRecord.mjs +2 -2
- package/build/modules/oob/repository/DidCommOutOfBandRecord.mjs.map +1 -1
- package/build/modules/oob/repository/DidCommOutOfBandRepository.js +2 -2
- package/build/modules/oob/repository/DidCommOutOfBandRepository.mjs +2 -2
- package/build/modules/oob/repository/DidCommOutOfBandRepository.mjs.map +1 -1
- package/build/modules/proofs/DidCommProofsApi.d.mts.map +1 -1
- package/build/modules/proofs/DidCommProofsApi.d.ts.map +1 -1
- package/build/modules/proofs/DidCommProofsApi.js +3 -3
- package/build/modules/proofs/DidCommProofsApi.mjs +3 -3
- package/build/modules/proofs/DidCommProofsApi.mjs.map +1 -1
- package/build/modules/proofs/DidCommProofsApiOptions.d.mts +1 -1
- package/build/modules/proofs/DidCommProofsApiOptions.d.ts +1 -1
- package/build/modules/proofs/DidCommProofsModule.d.mts +1 -1
- package/build/modules/proofs/DidCommProofsModule.d.mts.map +1 -1
- package/build/modules/proofs/DidCommProofsModule.d.ts +1 -1
- package/build/modules/proofs/DidCommProofsModule.d.ts.map +1 -1
- package/build/modules/proofs/DidCommProofsModule.js +1 -1
- package/build/modules/proofs/DidCommProofsModule.mjs +1 -1
- package/build/modules/proofs/DidCommProofsModule.mjs.map +1 -1
- package/build/modules/proofs/DidCommProofsModuleConfig.d.mts.map +1 -1
- package/build/modules/proofs/DidCommProofsModuleConfig.d.ts.map +1 -1
- package/build/modules/proofs/DidCommProofsModuleConfig.mjs.map +1 -1
- package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.d.mts +1 -1
- package/build/modules/proofs/formats/DidCommProofFormatServiceOptions.d.ts +1 -1
- package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.d.mts.map +1 -1
- package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.d.ts.map +1 -1
- package/build/modules/proofs/formats/dif-presentation-exchange/DidCommDifPresentationExchangeProofFormatService.mjs.map +1 -1
- package/build/modules/proofs/index.js +11 -11
- package/build/modules/proofs/index.mjs +11 -11
- package/build/modules/proofs/models/DidCommProofFormatSpec.js +3 -3
- package/build/modules/proofs/models/DidCommProofFormatSpec.mjs +2 -2
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.mts +1 -1
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.mts.map +1 -1
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.ts +1 -1
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.d.ts.map +1 -1
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.js +1 -1
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.mjs +1 -1
- package/build/modules/proofs/protocol/DidCommBaseProofProtocol.mjs.map +1 -1
- package/build/modules/proofs/protocol/DidCommProofProtocol.d.mts +1 -1
- package/build/modules/proofs/protocol/DidCommProofProtocol.d.ts +1 -1
- package/build/modules/proofs/protocol/DidCommProofProtocolOptions.d.mts +1 -1
- package/build/modules/proofs/protocol/DidCommProofProtocolOptions.d.ts +1 -1
- package/build/modules/proofs/protocol/index.js +1 -1
- package/build/modules/proofs/protocol/index.mjs +1 -1
- package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.js +1 -1
- package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.mjs +1 -1
- package/build/modules/proofs/protocol/v2/DidCommProofFormatCoordinator.mjs.map +1 -1
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.mts +4 -4
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.mts.map +1 -1
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.ts +4 -4
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.d.ts.map +1 -1
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.js +12 -12
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.mjs +12 -12
- package/build/modules/proofs/protocol/v2/DidCommProofV2Protocol.mjs.map +1 -1
- package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.mts +1 -1
- package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.mts.map +1 -1
- package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.ts +1 -1
- package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.d.ts.map +1 -1
- package/build/modules/proofs/protocol/v2/errors/V2PresentationProblemReportError.mjs.map +1 -1
- package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.js +1 -1
- package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.mjs +1 -1
- package/build/modules/proofs/protocol/v2/handlers/DidCommPresentationV2Handler.mjs.map +1 -1
- package/build/modules/proofs/protocol/v2/handlers/DidCommProposePresentationV2Handler.mjs.map +1 -1
- package/build/modules/proofs/protocol/v2/handlers/DidCommRequestPresentationV2Handler.mjs.map +1 -1
- package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.js +1 -1
- package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2AckMessage.mjs +1 -1
- package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.js +4 -4
- package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2Message.mjs +3 -3
- package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.js +1 -1
- package/build/modules/proofs/protocol/v2/messages/DidCommPresentationV2ProblemReportMessage.mjs +1 -1
- package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.js +4 -4
- package/build/modules/proofs/protocol/v2/messages/DidCommProposePresentationV2Message.mjs +3 -3
- package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.js +4 -4
- package/build/modules/proofs/protocol/v2/messages/DidCommRequestPresentationV2Message.mjs +3 -3
- package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.mts +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.mts.map +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.ts +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRecord.d.ts.map +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRecord.mjs.map +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRepository.js +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRepository.mjs +1 -1
- package/build/modules/proofs/repository/DidCommProofExchangeRepository.mjs.map +1 -1
- package/build/modules/routing/DidCommMediationRecipientApi.d.mts +3 -3
- package/build/modules/routing/DidCommMediationRecipientApi.d.mts.map +1 -1
- package/build/modules/routing/DidCommMediationRecipientApi.d.ts +3 -3
- package/build/modules/routing/DidCommMediationRecipientApi.d.ts.map +1 -1
- package/build/modules/routing/DidCommMediationRecipientApi.js +8 -8
- package/build/modules/routing/DidCommMediationRecipientApi.mjs +8 -8
- package/build/modules/routing/DidCommMediationRecipientApi.mjs.map +1 -1
- package/build/modules/routing/DidCommMediationRecipientModule.d.mts.map +1 -1
- package/build/modules/routing/DidCommMediationRecipientModule.d.ts.map +1 -1
- package/build/modules/routing/DidCommMediationRecipientModule.js +4 -4
- package/build/modules/routing/DidCommMediationRecipientModule.mjs +4 -4
- package/build/modules/routing/DidCommMediationRecipientModule.mjs.map +1 -1
- package/build/modules/routing/DidCommMediatorApi.d.mts +1 -1
- package/build/modules/routing/DidCommMediatorApi.d.mts.map +1 -1
- package/build/modules/routing/DidCommMediatorApi.d.ts +1 -1
- package/build/modules/routing/DidCommMediatorApi.d.ts.map +1 -1
- package/build/modules/routing/DidCommMediatorApi.js +2 -2
- package/build/modules/routing/DidCommMediatorApi.mjs +2 -2
- package/build/modules/routing/DidCommMediatorApi.mjs.map +1 -1
- package/build/modules/routing/DidCommMediatorModule.d.mts.map +1 -1
- package/build/modules/routing/DidCommMediatorModule.d.ts.map +1 -1
- package/build/modules/routing/DidCommMediatorModule.js +7 -7
- package/build/modules/routing/DidCommMediatorModule.mjs +7 -7
- package/build/modules/routing/DidCommMediatorModule.mjs.map +1 -1
- package/build/modules/routing/handlers/DidCommForwardHandler.mjs.map +1 -1
- package/build/modules/routing/handlers/DidCommKeylistUpdateHandler.mjs.map +1 -1
- package/build/modules/routing/handlers/DidCommKeylistUpdateResponseHandler.mjs.map +1 -1
- package/build/modules/routing/handlers/DidCommMediationDenyHandler.mjs.map +1 -1
- package/build/modules/routing/handlers/DidCommMediationGrantHandler.mjs.map +1 -1
- package/build/modules/routing/handlers/DidCommMediationRequestHandler.mjs.map +1 -1
- package/build/modules/routing/handlers/index.js +1 -1
- package/build/modules/routing/handlers/index.mjs +1 -1
- package/build/modules/routing/index.js +4 -4
- package/build/modules/routing/index.mjs +4 -4
- package/build/modules/routing/messages/DidCommForwardMessage.js +3 -3
- package/build/modules/routing/messages/DidCommForwardMessage.mjs +2 -2
- package/build/modules/routing/messages/DidCommKeylistUpdateMessage.js +3 -3
- package/build/modules/routing/messages/DidCommKeylistUpdateMessage.mjs +2 -2
- package/build/modules/routing/messages/DidCommKeylistUpdateResponseMessage.js +3 -3
- package/build/modules/routing/messages/DidCommKeylistUpdateResponseMessage.mjs +2 -2
- package/build/modules/routing/messages/DidCommMediationDenyMessage.js +1 -1
- package/build/modules/routing/messages/DidCommMediationDenyMessage.mjs +1 -1
- package/build/modules/routing/messages/DidCommMediationGrantMessage.js +3 -3
- package/build/modules/routing/messages/DidCommMediationGrantMessage.mjs +2 -2
- package/build/modules/routing/messages/DidCommMediationRequestMessage.js +1 -1
- package/build/modules/routing/messages/DidCommMediationRequestMessage.mjs +1 -1
- package/build/modules/routing/messages/index.js +1 -1
- package/build/modules/routing/messages/index.mjs +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.d.mts +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.d.mts.map +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.d.ts +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.d.ts.map +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.js +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.mjs +1 -1
- package/build/modules/routing/repository/DidCommMediationRecord.mjs.map +1 -1
- package/build/modules/routing/repository/DidCommMediationRepository.js +1 -1
- package/build/modules/routing/repository/DidCommMediationRepository.mjs +1 -1
- package/build/modules/routing/repository/DidCommMediationRepository.mjs.map +1 -1
- package/build/modules/routing/repository/DidCommMediatorRoutingRepository.js +1 -1
- package/build/modules/routing/repository/DidCommMediatorRoutingRepository.mjs +1 -1
- package/build/modules/routing/repository/DidCommMediatorRoutingRepository.mjs.map +1 -1
- package/build/modules/routing/services/DidCommMediationRecipientService.d.mts +2 -2
- package/build/modules/routing/services/DidCommMediationRecipientService.d.mts.map +1 -1
- package/build/modules/routing/services/DidCommMediationRecipientService.d.ts +2 -2
- package/build/modules/routing/services/DidCommMediationRecipientService.d.ts.map +1 -1
- package/build/modules/routing/services/DidCommMediationRecipientService.js +4 -4
- package/build/modules/routing/services/DidCommMediationRecipientService.mjs +4 -4
- package/build/modules/routing/services/DidCommMediationRecipientService.mjs.map +1 -1
- package/build/modules/routing/services/DidCommMediatorService.d.mts.map +1 -1
- package/build/modules/routing/services/DidCommMediatorService.d.ts.map +1 -1
- package/build/modules/routing/services/DidCommMediatorService.js +3 -3
- package/build/modules/routing/services/DidCommMediatorService.mjs +3 -3
- package/build/modules/routing/services/DidCommMediatorService.mjs.map +1 -1
- package/build/modules/routing/services/DidCommRoutingService.d.mts.map +1 -1
- package/build/modules/routing/services/DidCommRoutingService.d.ts.map +1 -1
- package/build/modules/routing/services/DidCommRoutingService.js +1 -1
- package/build/modules/routing/services/DidCommRoutingService.mjs +1 -1
- package/build/modules/routing/services/DidCommRoutingService.mjs.map +1 -1
- package/build/repository/DidCommMessageRecord.d.mts.map +1 -1
- package/build/repository/DidCommMessageRecord.d.ts.map +1 -1
- package/build/repository/DidCommMessageRecord.mjs.map +1 -1
- package/build/repository/DidCommMessageRepository.d.mts.map +1 -1
- package/build/repository/DidCommMessageRepository.d.ts.map +1 -1
- package/build/repository/DidCommMessageRepository.js +1 -1
- package/build/repository/DidCommMessageRepository.mjs +1 -1
- package/build/repository/DidCommMessageRepository.mjs.map +1 -1
- package/build/repository/index.js +1 -1
- package/build/repository/index.mjs +1 -1
- package/build/services/DidCommDocumentService.d.mts.map +1 -1
- package/build/services/DidCommDocumentService.d.ts.map +1 -1
- package/build/services/DidCommDocumentService.js +1 -1
- package/build/services/DidCommDocumentService.mjs +1 -1
- package/build/services/DidCommDocumentService.mjs.map +1 -1
- package/build/transport/DidCommHttpOutboundTransport.d.mts.map +1 -1
- package/build/transport/DidCommHttpOutboundTransport.d.ts.map +1 -1
- package/build/transport/DidCommHttpOutboundTransport.js +3 -3
- package/build/transport/DidCommHttpOutboundTransport.mjs +3 -3
- package/build/transport/DidCommHttpOutboundTransport.mjs.map +1 -1
- package/build/transport/DidCommWsOutboundTransport.d.mts.map +1 -1
- package/build/transport/DidCommWsOutboundTransport.d.ts.map +1 -1
- package/build/transport/DidCommWsOutboundTransport.mjs.map +1 -1
- package/build/transport/index.js +2 -2
- package/build/transport/index.mjs +2 -2
- package/build/transport/queue/DidCommQueueTransportRepository.d.mts +1 -1
- package/build/transport/queue/DidCommQueueTransportRepository.d.ts +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.d.mts +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.d.mts.map +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.d.ts +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.d.ts.map +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.js +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.mjs +1 -1
- package/build/transport/queue/InMemoryQueueTransportRepository.mjs.map +1 -1
- package/build/transport/queue/index.js +1 -1
- package/build/transport/queue/index.mjs +1 -1
- package/build/updates/0.1-0.2/connection.js +3 -3
- package/build/updates/0.1-0.2/connection.mjs +3 -3
- package/build/updates/0.1-0.2/connection.mjs.map +1 -1
- package/build/updates/0.1-0.2/credential.js +1 -1
- package/build/updates/0.1-0.2/credential.mjs +1 -1
- package/build/updates/0.1-0.2/credential.mjs.map +1 -1
- package/build/updates/0.2-0.3/proof.js +1 -1
- package/build/updates/0.2-0.3/proof.mjs +1 -1
- package/build/updates/0.2-0.3/proof.mjs.map +1 -1
- package/build/updates/0.4-0.5/credentialExchangeRecord.js +2 -2
- package/build/updates/0.4-0.5/credentialExchangeRecord.mjs +2 -2
- package/build/updates/0.4-0.5/credentialExchangeRecord.mjs.map +1 -1
- package/build/updates/0.4-0.5/proofExchangeRecord.js +2 -2
- package/build/updates/0.4-0.5/proofExchangeRecord.mjs +2 -2
- package/build/util/DidCommLinkedAttachment.js +3 -3
- package/build/util/DidCommLinkedAttachment.mjs +2 -2
- package/build/util/JWE.mjs.map +1 -1
- package/build/util/attachment.d.mts.map +1 -1
- package/build/util/attachment.d.ts.map +1 -1
- package/build/util/attachment.mjs.map +1 -1
- package/build/util/messageType.d.mts +37 -1
- package/build/util/messageType.d.mts.map +1 -1
- package/build/util/messageType.d.ts +37 -1
- package/build/util/messageType.d.ts.map +1 -1
- package/build/util/messageType.js +4 -4
- package/build/util/messageType.mjs +4 -4
- package/build/util/messageType.mjs.map +1 -1
- package/build/util/parseInvitation.d.mts +8 -1
- package/build/util/parseInvitation.d.mts.map +1 -1
- package/build/util/parseInvitation.d.ts +8 -1
- package/build/util/parseInvitation.d.ts.map +1 -1
- package/build/util/parseInvitation.js +6 -5
- package/build/util/parseInvitation.mjs +7 -7
- package/build/util/parseInvitation.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidExchangeProtocol.mjs","names":["DidExchangeProtocol","logger: Logger","didDocument: DidDocument","keys: DidDocumentKey[] | undefined","mediatorId: string | undefined","services: ResolvedDidCommService[]"],"sources":["../../../src/modules/connections/DidExchangeProtocol.ts"],"sourcesContent":["import type { AgentContext, DidDocumentKey, ResolvedDidCommService } from '@credo-ts/core'\nimport type { DidCommRouting } from '../../models'\nimport type { DidCommOutOfBandRecord } from '../oob/repository'\nimport type { DidCommConnectionRecord } from './repository'\n\nimport {\n Buffer,\n CredoError,\n DidDocument,\n DidKey,\n DidRepository,\n DidsApi,\n InjectionSymbols,\n JsonEncoder,\n JsonTransformer,\n JwsService,\n Kms,\n type Logger,\n PeerDidNumAlgo,\n TypedArrayEncoder,\n base64ToBase64URL,\n getAlternativeDidsForPeerDid,\n getNumAlgoFromPeerDid,\n getPublicJwkFromVerificationMethod,\n inject,\n injectable,\n isDid,\n isValidPeerDid,\n parseDid,\n tryParseDid,\n} from '@credo-ts/core'\n\nimport { DidCommAttachment, DidCommAttachmentData } from '../../decorators/attachment/DidCommAttachment'\nimport { DidCommInboundMessageContext } from '../../models'\nimport type { ParsedMessageType } from '../../util/messageType'\nimport { DidCommOutOfBandRole } from '../oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandState } from '../oob/domain/DidCommOutOfBandState'\nimport { getMediationRecordForDidDocument } from '../routing/services/helpers'\n\nimport { DidCommDocumentService } from '../../services'\nimport { DidCommConnectionsModuleConfig } from './DidCommConnectionsModuleConfig'\nimport { DidExchangeStateMachine } from './DidExchangeStateMachine'\nimport { DidExchangeProblemReportError, DidExchangeProblemReportReason } from './errors'\nimport {\n DidCommDidExchangeCompleteMessage,\n DidCommDidExchangeRequestMessage,\n DidCommDidExchangeResponseMessage,\n} from './messages'\nimport { DidCommDidExchangeRole, DidCommDidExchangeState, DidCommHandshakeProtocol } from './models'\nimport { DidCommConnectionService } from './services'\nimport {\n createPeerDidFromServices,\n getResolvedDidcommServiceWithSigningKeyId,\n routingToServices,\n} from './services/helpers'\n\ninterface DidExchangeRequestParams {\n label: string\n alias?: string\n goal?: string\n goalCode?: string\n routing?: DidCommRouting\n autoAcceptConnection?: boolean\n ourDid?: string\n}\n\n@injectable()\nexport class DidExchangeProtocol {\n private connectionService: DidCommConnectionService\n private didcommDocumentService: DidCommDocumentService\n private jwsService: JwsService\n private didRepository: DidRepository\n private logger: Logger\n\n public constructor(\n connectionService: DidCommConnectionService,\n didRepository: DidRepository,\n jwsService: JwsService,\n didcommDocumentService: DidCommDocumentService,\n @inject(InjectionSymbols.Logger) logger: Logger\n ) {\n this.connectionService = connectionService\n this.didRepository = didRepository\n this.jwsService = jwsService\n this.didcommDocumentService = didcommDocumentService\n this.logger = logger\n }\n\n public async createRequest(\n agentContext: AgentContext,\n outOfBandRecord: DidCommOutOfBandRecord,\n params: DidExchangeRequestParams\n ): Promise<{ message: DidCommDidExchangeRequestMessage; connectionRecord: DidCommConnectionRecord }> {\n this.logger.debug(`Create message ${DidCommDidExchangeRequestMessage.type.messageTypeUri} start`, {\n outOfBandRecord,\n params,\n })\n const config = agentContext.dependencyManager.resolve(DidCommConnectionsModuleConfig)\n\n const { outOfBandInvitation } = outOfBandRecord\n const { alias, goal, goalCode, routing, autoAcceptConnection, ourDid: did } = params\n // TODO: We should store only one did that we'll use to send the request message with success.\n // We take just the first one for now.\n const [invitationDid] = outOfBandInvitation.invitationDids\n\n // Create message\n const label = params.label\n\n let didDocument: DidDocument\n let keys: DidDocumentKey[] | undefined\n let mediatorId: string | undefined\n\n // If our did is specified, make sure we have all key material for it\n if (did) {\n const dids = agentContext.resolve(DidsApi)\n const resolved = await dids.resolveCreatedDidDocumentWithKeys(did)\n didDocument = resolved.didDocument\n keys = resolved.keys\n mediatorId = (await getMediationRecordForDidDocument(agentContext, didDocument))?.id\n }\n // Otherwise, create a did:peer based on the provided routing\n else {\n if (!routing) throw new CredoError(`'routing' must be defined if 'ourDid' is not specified`)\n\n const resolved = await createPeerDidFromServices(\n agentContext,\n routingToServices(routing),\n config.peerNumAlgoForDidExchangeRequests\n )\n didDocument = resolved.didDocument\n keys = resolved.keys\n mediatorId = routing.mediatorId\n }\n\n const parentThreadId = outOfBandRecord.outOfBandInvitation.id\n\n const message = new DidCommDidExchangeRequestMessage({ label, parentThreadId, did: didDocument.id, goal, goalCode })\n\n const signingKeys = didDocument\n .getRecipientKeysWithVerificationMethod({ mapX25519ToEd25519: true })\n .map(({ publicJwk, verificationMethod }) => {\n // Bind the kmsKeyIds\n const kmsKeyId = keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n publicJwk.keyId = kmsKeyId ?? publicJwk.legacyKeyId\n\n return publicJwk\n })\n\n // Create sign attachment containing didDoc\n if (isValidPeerDid(didDocument.id) && getNumAlgoFromPeerDid(didDocument.id) === PeerDidNumAlgo.GenesisDoc) {\n const didDocAttach = await this.createSignedAttachment(agentContext, didDocument.toJSON(), signingKeys)\n message.didDoc = didDocAttach\n }\n\n const connectionRecord = await this.connectionService.createConnection(agentContext, {\n protocol: DidCommHandshakeProtocol.DidExchange,\n role: DidCommDidExchangeRole.Requester,\n alias,\n state: DidCommDidExchangeState.InvitationReceived,\n theirLabel: outOfBandInvitation.label,\n mediatorId,\n autoAcceptConnection: outOfBandRecord.autoAcceptConnection,\n outOfBandId: outOfBandRecord.id,\n invitationDid,\n imageUrl: outOfBandInvitation.imageUrl,\n })\n\n DidExchangeStateMachine.assertCreateMessageState(DidCommDidExchangeRequestMessage.type, connectionRecord)\n\n connectionRecord.did = didDocument.id\n connectionRecord.threadId = message.id\n\n if (autoAcceptConnection !== undefined || autoAcceptConnection !== null) {\n connectionRecord.autoAcceptConnection = autoAcceptConnection\n }\n\n await this.updateState(agentContext, DidCommDidExchangeRequestMessage.type, connectionRecord)\n this.logger.debug(`Create message ${DidCommDidExchangeRequestMessage.type.messageTypeUri} end`, {\n connectionRecord,\n message,\n })\n return { message, connectionRecord }\n }\n\n public async processRequest(\n messageContext: DidCommInboundMessageContext<DidCommDidExchangeRequestMessage>,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommConnectionRecord> {\n this.logger.debug(`Process message ${messageContext.message.type} start`, {\n message: messageContext.message,\n })\n\n outOfBandRecord.assertRole(DidCommOutOfBandRole.Sender)\n outOfBandRecord.assertState(DidCommOutOfBandState.AwaitResponse)\n\n // TODO check there is no connection record for particular oob record\n\n const { message, agentContext } = messageContext\n\n // Check corresponding invitation ID is the request's ~thread.pthid or pthid is a public did\n // TODO Maybe we can do it in handler, but that actually does not make sense because we try to find oob by parent thread ID there.\n const parentThreadId = message.thread?.parentThreadId\n if (\n !parentThreadId ||\n (!tryParseDid(parentThreadId) && parentThreadId !== outOfBandRecord.getTags().invitationId)\n ) {\n throw new DidExchangeProblemReportError('Missing reference to invitation.', {\n problemCode: DidExchangeProblemReportReason.RequestNotAccepted,\n })\n }\n\n // If the responder wishes to continue the exchange, they will persist the received information in their wallet.\n\n // Get DID Document either from message (if it is a supported did:peer) or resolve it externally\n const didDocument = await this.resolveDidDocument(agentContext, message)\n\n // A DID Record must be stored in order to allow for searching for its recipient keys when receiving a message\n const didRecord = await this.didRepository.storeReceivedDid(messageContext.agentContext, {\n did: didDocument.id,\n // It is important to take the did document from the PeerDid class\n // as it will have the id property\n didDocument:\n !isValidPeerDid(didDocument.id) || getNumAlgoFromPeerDid(message.did) === PeerDidNumAlgo.GenesisDoc\n ? didDocument\n : undefined,\n tags: {\n // We need to save the recipientKeys, so we can find the associated did\n // of a key when we receive a message from another connection.\n recipientKeyFingerprints: didDocument.recipientKeys.map((key) => key.fingerprint),\n\n // For did:peer, store any alternative dids (like short form did:peer:4),\n // it may have in order to relate any message referencing it\n alternativeDids: isValidPeerDid(didDocument.id) ? getAlternativeDidsForPeerDid(didDocument.id) : undefined,\n },\n })\n\n this.logger.debug('Saved DID record', {\n id: didRecord.id,\n did: didRecord.did,\n role: didRecord.role,\n tags: didRecord.getTags(),\n didDocument: 'omitted...',\n })\n\n const connectionRecord = await this.connectionService.createConnection(messageContext.agentContext, {\n protocol: DidCommHandshakeProtocol.DidExchange,\n role: DidCommDidExchangeRole.Responder,\n state: DidCommDidExchangeState.RequestReceived,\n alias: outOfBandRecord.alias,\n theirDid: message.did,\n theirLabel: message.label,\n threadId: message.threadId,\n mediatorId: outOfBandRecord.mediatorId,\n autoAcceptConnection: outOfBandRecord.autoAcceptConnection,\n outOfBandId: outOfBandRecord.id,\n })\n\n await this.updateState(messageContext.agentContext, DidCommDidExchangeRequestMessage.type, connectionRecord)\n this.logger.debug(`Process message ${DidCommDidExchangeRequestMessage.type.messageTypeUri} end`, connectionRecord)\n return connectionRecord\n }\n\n public async createResponse(\n agentContext: AgentContext,\n connectionRecord: DidCommConnectionRecord,\n outOfBandRecord: DidCommOutOfBandRecord,\n routing?: DidCommRouting\n ): Promise<DidCommDidExchangeResponseMessage> {\n this.logger.debug(`Create message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} start`, connectionRecord)\n DidExchangeStateMachine.assertCreateMessageState(DidCommDidExchangeResponseMessage.type, connectionRecord)\n\n const { threadId, theirDid } = connectionRecord\n\n const config = agentContext.dependencyManager.resolve(DidCommConnectionsModuleConfig)\n\n if (!threadId) {\n throw new CredoError('Missing threadId on connection record.')\n }\n\n if (!theirDid) {\n throw new CredoError('Missing theirDid on connection record.')\n }\n\n // Extract keys from the out of band record metadata\n const inlineResolvedServices = outOfBandRecord.outOfBandInvitation\n .getInlineServices()\n .map((service) => getResolvedDidcommServiceWithSigningKeyId(service, outOfBandRecord.invitationInlineServiceKeys))\n\n let services: ResolvedDidCommService[] = []\n\n if (routing) {\n services = routingToServices(routing)\n } else if (inlineResolvedServices.length > 0) {\n services = inlineResolvedServices\n } else {\n // We don't support using a did from the OOB invitation services currently, in this case we always pass routing to this method\n throw new CredoError(\n 'No routing provided, and no inline services found in out of band invitation. When using did services in out of band invitation, make sure to provide routing information for rotation.'\n )\n }\n\n // Use the same num algo for response as received in request\n const numAlgo = isValidPeerDid(theirDid)\n ? getNumAlgoFromPeerDid(theirDid)\n : config.peerNumAlgoForDidExchangeRequests\n\n const { didDocument } = await createPeerDidFromServices(agentContext, services, numAlgo)\n const message = new DidCommDidExchangeResponseMessage({ did: didDocument.id, threadId })\n\n // DID Rotate attachment should be signed with invitation keys\n const invitationRecipientKeys = inlineResolvedServices.flatMap((s) => s.recipientKeys)\n\n // Consider also pure-DID services, used when DID Exchange is started with an implicit invitation or a public DID\n for (const did of outOfBandRecord.outOfBandInvitation.getDidServices()) {\n const dids = agentContext.resolve(DidsApi)\n const resolved = await dids.resolveCreatedDidDocumentWithKeys(parseDid(did).did)\n invitationRecipientKeys.push(\n ...resolved.didDocument\n .getRecipientKeysWithVerificationMethod({ mapX25519ToEd25519: true })\n .map(({ publicJwk, verificationMethod }) => {\n const kmsKeyId = resolved.keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n publicJwk.keyId = kmsKeyId ?? publicJwk.legacyKeyId\n return publicJwk\n })\n )\n }\n\n if (numAlgo === PeerDidNumAlgo.GenesisDoc) {\n message.didDoc = await this.createSignedAttachment(agentContext, didDocument.toJSON(), invitationRecipientKeys)\n } else {\n // We assume any other case is a resolvable did (e.g. did:peer:2 or did:peer:4)\n message.didRotate = await this.createSignedAttachment(agentContext, didDocument.id, invitationRecipientKeys)\n }\n\n connectionRecord.did = didDocument.id\n\n await this.updateState(agentContext, DidCommDidExchangeResponseMessage.type, connectionRecord)\n this.logger.debug(`Create message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} end`, {\n connectionRecord,\n message,\n })\n return message\n }\n\n public async processResponse(\n messageContext: DidCommInboundMessageContext<DidCommDidExchangeResponseMessage>,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommConnectionRecord> {\n this.logger.debug(`Process message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} start`, {\n message: messageContext.message,\n })\n\n const { connection: connectionRecord, message, agentContext } = messageContext\n\n if (!connectionRecord) {\n throw new CredoError('No connection record in message context.')\n }\n\n DidExchangeStateMachine.assertProcessMessageState(DidCommDidExchangeResponseMessage.type, connectionRecord)\n\n if (!message.thread?.threadId || message.thread?.threadId !== connectionRecord.threadId) {\n throw new DidExchangeProblemReportError('Invalid or missing thread ID.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n // Get DID Document either from message (if it is a did:peer) or resolve it externally\n const didDocument = await this.resolveDidDocument(\n agentContext,\n message,\n outOfBandRecord.getTags().recipientKeyFingerprints.map((fingerprint) => {\n const publicJwk = Kms.PublicJwk.fromFingerprint(fingerprint)\n if (!publicJwk.is(Kms.Ed25519PublicJwk)) {\n throw new CredoError('Expected fingerprint to be of type Ed25519')\n }\n return publicJwk\n })\n )\n\n if (isValidPeerDid(didDocument.id)) {\n const didRecord = await this.didRepository.storeReceivedDid(messageContext.agentContext, {\n did: didDocument.id,\n didDocument: getNumAlgoFromPeerDid(message.did) === PeerDidNumAlgo.GenesisDoc ? didDocument : undefined,\n tags: {\n // We need to save the recipientKeys, so we can find the associated did\n // of a key when we receive a message from another connection.\n recipientKeyFingerprints: didDocument.recipientKeys.map((key) => key.fingerprint),\n\n // For did:peer, store any alternative dids (like short form did:peer:4),\n // it may have in order to relate any message referencing it\n alternativeDids: getAlternativeDidsForPeerDid(didDocument.id),\n },\n })\n\n this.logger.debug('Saved DID record', {\n id: didRecord.id,\n did: didRecord.did,\n role: didRecord.role,\n tags: didRecord.getTags(),\n didDocument: 'omitted...',\n })\n }\n\n connectionRecord.theirDid = message.did\n\n await this.updateState(messageContext.agentContext, DidCommDidExchangeResponseMessage.type, connectionRecord)\n this.logger.debug(`Process message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} end`, connectionRecord)\n return connectionRecord\n }\n\n public async createComplete(\n agentContext: AgentContext,\n connectionRecord: DidCommConnectionRecord,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommDidExchangeCompleteMessage> {\n this.logger.debug(`Create message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} start`, connectionRecord)\n DidExchangeStateMachine.assertCreateMessageState(DidCommDidExchangeCompleteMessage.type, connectionRecord)\n\n const threadId = connectionRecord.threadId\n const parentThreadId = outOfBandRecord.outOfBandInvitation.id\n\n if (!threadId) {\n throw new CredoError(`Connection record ${connectionRecord.id} does not have 'threadId' attribute.`)\n }\n\n if (!parentThreadId) {\n throw new CredoError(`Connection record ${connectionRecord.id} does not have 'parentThreadId' attribute.`)\n }\n\n const message = new DidCommDidExchangeCompleteMessage({ threadId, parentThreadId })\n\n await this.updateState(agentContext, DidCommDidExchangeCompleteMessage.type, connectionRecord)\n this.logger.debug(`Create message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} end`, {\n connectionRecord,\n message,\n })\n return message\n }\n\n public async processComplete(\n messageContext: DidCommInboundMessageContext<DidCommDidExchangeCompleteMessage>,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommConnectionRecord> {\n this.logger.debug(`Process message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} start`, {\n message: messageContext.message,\n })\n\n const { connection: connectionRecord, message } = messageContext\n\n if (!connectionRecord) {\n throw new CredoError('No connection record in message context.')\n }\n\n DidExchangeStateMachine.assertProcessMessageState(DidCommDidExchangeCompleteMessage.type, connectionRecord)\n\n if (message.threadId !== connectionRecord.threadId) {\n throw new DidExchangeProblemReportError('Invalid or missing thread ID.', {\n problemCode: DidExchangeProblemReportReason.CompleteRejected,\n })\n }\n const pthid = message.thread?.parentThreadId\n if (!pthid || pthid !== outOfBandRecord.outOfBandInvitation.id) {\n throw new DidExchangeProblemReportError('Invalid or missing parent thread ID referencing to the invitation.', {\n problemCode: DidExchangeProblemReportReason.CompleteRejected,\n })\n }\n\n await this.updateState(messageContext.agentContext, DidCommDidExchangeCompleteMessage.type, connectionRecord)\n this.logger.debug(`Process message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} end`, {\n connectionRecord,\n })\n return connectionRecord\n }\n\n private async updateState(\n agentContext: AgentContext,\n messageType: ParsedMessageType,\n connectionRecord: DidCommConnectionRecord\n ) {\n this.logger.debug('Updating state', { connectionRecord })\n const nextState = DidExchangeStateMachine.nextState(messageType, connectionRecord)\n return this.connectionService.updateState(agentContext, connectionRecord, nextState)\n }\n\n private async createSignedAttachment(\n agentContext: AgentContext,\n data: string | Record<string, unknown>,\n signingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n ) {\n this.logger.debug('Creating signed attachment')\n const signedAttach = new DidCommAttachment({\n mimeType: typeof data === 'string' ? undefined : 'application/json',\n data: new DidCommAttachmentData({\n base64:\n typeof data === 'string' ? TypedArrayEncoder.toBase64URL(Buffer.from(data)) : JsonEncoder.toBase64(data),\n }),\n })\n\n await Promise.all(\n signingKeys.map(async (signingKey) => {\n const kid = new DidKey(signingKey).did\n const payload = typeof data === 'string' ? TypedArrayEncoder.fromString(data) : JsonEncoder.toBuffer(data)\n\n const jws = await this.jwsService.createJws(agentContext, {\n payload,\n keyId: signingKey.keyId,\n header: {\n kid,\n },\n protectedHeaderOptions: {\n alg: Kms.KnownJwaSignatureAlgorithms.EdDSA,\n jwk: signingKey,\n },\n })\n signedAttach.addJws(jws)\n })\n )\n\n return signedAttach\n }\n\n /**\n * Resolves a did document from a given `request` or `response` message, verifying its signature or did rotate\n * signature in case it is taken from message attachment.\n *\n * @param message DID request or DID response message\n * @param invitationKeys array containing keys from connection invitation that could be used for signing of DID document\n * @returns verified DID document content from message attachment\n */\n\n private async resolveDidDocument(\n agentContext: AgentContext,\n message: DidCommDidExchangeRequestMessage | DidCommDidExchangeResponseMessage,\n invitationKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[] = []\n ) {\n // The only supported case where we expect to receive a did-document attachment is did:peer algo 1\n return isDid(message.did, 'peer') && getNumAlgoFromPeerDid(message.did) === PeerDidNumAlgo.GenesisDoc\n ? this.extractAttachedDidDocument(agentContext, message, invitationKeys)\n : this.extractResolvableDidDocument(agentContext, message, invitationKeys)\n }\n\n /**\n * Extracts DID document from message (resolving it externally if required) and verifies did-rotate attachment signature\n * if applicable\n */\n private async extractResolvableDidDocument(\n agentContext: AgentContext,\n message: DidCommDidExchangeRequestMessage | DidCommDidExchangeResponseMessage,\n invitationKeys?: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n ) {\n // Validate did-rotate attachment in case of DID Exchange response\n if (message instanceof DidCommDidExchangeResponseMessage) {\n const didRotateAttachment = message.didRotate\n\n if (!didRotateAttachment) {\n throw new DidExchangeProblemReportError('DID Rotate attachment is missing.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n const jws = didRotateAttachment.data.jws\n\n if (!jws) {\n throw new DidExchangeProblemReportError('DID Rotate signature is missing.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n if (!didRotateAttachment.data.base64) {\n throw new CredoError('DID Rotate attachment is missing base64 property for signed did.')\n }\n\n // JWS payload must be base64url encoded\n const base64UrlPayload = base64ToBase64URL(didRotateAttachment.data.base64)\n const signedDid = TypedArrayEncoder.fromBase64(base64UrlPayload).toString()\n\n if (signedDid !== message.did) {\n throw new CredoError(\n `DID Rotate attachment's did ${message.did} does not correspond to message did ${message.did}`\n )\n }\n\n const { isValid, jwsSigners } = await this.jwsService.verifyJws(agentContext, {\n jws: {\n ...jws,\n payload: base64UrlPayload,\n },\n allowedJwsSignerMethods: ['did'],\n resolveJwsSigner: ({ jws: { header } }) => {\n if (typeof header.kid !== 'string' || !isDid(header.kid, 'key')) {\n throw new CredoError('JWS header kid must be a did:key DID.')\n }\n\n const didKey = DidKey.fromDid(header.kid)\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.publicJwk.fingerprint}`,\n jwk: didKey.publicJwk,\n }\n },\n })\n\n const jwsSignerKeys = jwsSigners.map((signer) => signer.jwk)\n if (!jwsSignerKeys.every((key) => key.is(Kms.Ed25519PublicJwk))) {\n throw new DidExchangeProblemReportError('Expected DID Rotate signature to be signed with Ed25519 key.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n if (\n !isValid ||\n !jwsSignerKeys.every((key) => invitationKeys?.some((invitationKey) => invitationKey.equals(key)))\n ) {\n throw new DidExchangeProblemReportError(\n `DID Rotate signature is invalid. isValid: ${isValid} signerKeys: ${JSON.stringify(\n jwsSignerKeys.map((key) => key.fingerprint)\n )} invitationKeys:${JSON.stringify(invitationKeys?.map((key) => key.fingerprint))}`,\n {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n }\n )\n }\n }\n\n // Now resolve the document related to the did (which can be either a public did or an inline did)\n try {\n return await agentContext.dependencyManager.resolve(DidsApi).resolveDidDocument(message.did)\n } catch (error) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n\n throw new DidExchangeProblemReportError(error, {\n problemCode,\n })\n }\n }\n\n /**\n * Extracts DID document as is from request or response message attachment and verifies its signature.\n *\n * @param message DID request or DID response message\n * @param invitationKeys array containing keys from connection invitation that could be used for signing of DID document\n * @returns verified DID document content from message attachment\n */\n private async extractAttachedDidDocument(\n agentContext: AgentContext,\n message: DidCommDidExchangeRequestMessage | DidCommDidExchangeResponseMessage,\n invitationKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[] = []\n ): Promise<DidDocument> {\n if (!message.didDoc) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n throw new DidExchangeProblemReportError('DID Document attachment is missing.', { problemCode })\n }\n const didDocumentAttachment = message.didDoc\n const jws = didDocumentAttachment.data.jws\n\n if (!jws) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n throw new DidExchangeProblemReportError('DID Document signature is missing.', { problemCode })\n }\n\n if (!didDocumentAttachment.data.base64) {\n throw new CredoError('DID Document attachment is missing base64 property for signed did document.')\n }\n\n // JWS payload must be base64url encoded\n const base64UrlPayload = base64ToBase64URL(didDocumentAttachment.data.base64)\n\n const { isValid, jwsSigners } = await this.jwsService.verifyJws(agentContext, {\n jws: {\n ...jws,\n payload: base64UrlPayload,\n },\n allowedJwsSignerMethods: ['did'],\n resolveJwsSigner: ({ jws: { header } }) => {\n if (typeof header.kid !== 'string' || !isDid(header.kid, 'key')) {\n throw new CredoError('JWS header kid must be a did:key DID.')\n }\n\n const didKey = DidKey.fromDid(header.kid)\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.publicJwk.fingerprint}`,\n jwk: didKey.publicJwk,\n }\n },\n })\n\n const json = JsonEncoder.fromBase64(didDocumentAttachment.data.base64)\n const didDocument = JsonTransformer.fromJSON(json, DidDocument)\n const didDocumentKeys = didDocument.authentication\n ?.map((authentication) => {\n const verificationMethod =\n typeof authentication === 'string'\n ? didDocument.dereferenceVerificationMethod(authentication)\n : authentication\n\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n return publicJwk\n })\n .concat(invitationKeys)\n\n this.logger.trace('JWS verification result', { isValid, jwsSigners })\n\n if (!isValid || !jwsSigners.every((jwsSigner) => didDocumentKeys?.some((key) => key.equals(jwsSigner.jwk)))) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n throw new DidExchangeProblemReportError('DID Document signature is invalid.', { problemCode })\n }\n\n return didDocument\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEO,gCAAMA,sBAAoB;CAO/B,AAAO,YACL,mBACA,eACA,YACA,wBACA,AAAiCC,QACjC;AACA,OAAK,oBAAoB;AACzB,OAAK,gBAAgB;AACrB,OAAK,aAAa;AAClB,OAAK,yBAAyB;AAC9B,OAAK,SAAS;;CAGhB,MAAa,cACX,cACA,iBACA,QACmG;AACnG,OAAK,OAAO,MAAM,kBAAkB,iCAAiC,KAAK,eAAe,SAAS;GAChG;GACA;GACD,CAAC;EACF,MAAM,SAAS,aAAa,kBAAkB,QAAQ,+BAA+B;EAErF,MAAM,EAAE,wBAAwB;EAChC,MAAM,EAAE,OAAO,MAAM,UAAU,SAAS,sBAAsB,QAAQ,QAAQ;EAG9E,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Document: DidDocument","keys: DidDocumentKey[] | undefined","mediatorId: string | undefined","services: ResolvedDidCommService[]"],"sources":["../../../src/modules/connections/DidExchangeProtocol.ts"],"sourcesContent":["import type { AgentContext, DidDocumentKey, ResolvedDidCommService } from '@credo-ts/core'\nimport {\n Buffer,\n base64ToBase64URL,\n CredoError,\n DidDocument,\n DidKey,\n DidRepository,\n DidsApi,\n getAlternativeDidsForPeerDid,\n getNumAlgoFromPeerDid,\n getPublicJwkFromVerificationMethod,\n InjectionSymbols,\n inject,\n injectable,\n isDid,\n isValidPeerDid,\n JsonEncoder,\n JsonTransformer,\n JwsService,\n Kms,\n type Logger,\n PeerDidNumAlgo,\n parseDid,\n TypedArrayEncoder,\n tryParseDid,\n} from '@credo-ts/core'\nimport { DidCommAttachment, DidCommAttachmentData } from '../../decorators/attachment/DidCommAttachment'\nimport type { DidCommRouting } from '../../models'\nimport { DidCommInboundMessageContext } from '../../models'\nimport type { ParsedMessageType } from '../../util/messageType'\nimport { DidCommOutOfBandRole } from '../oob/domain/DidCommOutOfBandRole'\nimport { DidCommOutOfBandState } from '../oob/domain/DidCommOutOfBandState'\nimport type { DidCommOutOfBandRecord } from '../oob/repository'\nimport { getMediationRecordForDidDocument } from '../routing/services/helpers'\nimport { DidCommConnectionsModuleConfig } from './DidCommConnectionsModuleConfig'\nimport { DidExchangeStateMachine } from './DidExchangeStateMachine'\nimport { DidExchangeProblemReportError, DidExchangeProblemReportReason } from './errors'\nimport {\n DidCommDidExchangeCompleteMessage,\n DidCommDidExchangeRequestMessage,\n DidCommDidExchangeResponseMessage,\n} from './messages'\nimport { DidCommDidExchangeRole, DidCommDidExchangeState, DidCommHandshakeProtocol } from './models'\nimport type { DidCommConnectionRecord } from './repository'\nimport { DidCommConnectionService } from './services'\nimport {\n createPeerDidFromServices,\n getResolvedDidcommServiceWithSigningKeyId,\n routingToServices,\n} from './services/helpers'\n\ninterface DidExchangeRequestParams {\n label: string\n alias?: string\n goal?: string\n goalCode?: string\n routing?: DidCommRouting\n autoAcceptConnection?: boolean\n ourDid?: string\n}\n\n@injectable()\nexport class DidExchangeProtocol {\n private connectionService: DidCommConnectionService\n private jwsService: JwsService\n private didRepository: DidRepository\n private logger: Logger\n\n public constructor(\n connectionService: DidCommConnectionService,\n didRepository: DidRepository,\n jwsService: JwsService,\n @inject(InjectionSymbols.Logger) logger: Logger\n ) {\n this.connectionService = connectionService\n this.didRepository = didRepository\n this.jwsService = jwsService\n this.logger = logger\n }\n\n public async createRequest(\n agentContext: AgentContext,\n outOfBandRecord: DidCommOutOfBandRecord,\n params: DidExchangeRequestParams\n ): Promise<{ message: DidCommDidExchangeRequestMessage; connectionRecord: DidCommConnectionRecord }> {\n this.logger.debug(`Create message ${DidCommDidExchangeRequestMessage.type.messageTypeUri} start`, {\n outOfBandRecord,\n params,\n })\n const config = agentContext.dependencyManager.resolve(DidCommConnectionsModuleConfig)\n\n const { outOfBandInvitation } = outOfBandRecord\n const { alias, goal, goalCode, routing, autoAcceptConnection, ourDid: did } = params\n // TODO: We should store only one did that we'll use to send the request message with success.\n // We take just the first one for now.\n const [invitationDid] = outOfBandInvitation.invitationDids\n\n // Create message\n const label = params.label\n\n let didDocument: DidDocument\n let keys: DidDocumentKey[] | undefined\n let mediatorId: string | undefined\n\n // If our did is specified, make sure we have all key material for it\n if (did) {\n const dids = agentContext.resolve(DidsApi)\n const resolved = await dids.resolveCreatedDidDocumentWithKeys(did)\n didDocument = resolved.didDocument\n keys = resolved.keys\n mediatorId = (await getMediationRecordForDidDocument(agentContext, didDocument))?.id\n }\n // Otherwise, create a did:peer based on the provided routing\n else {\n if (!routing) throw new CredoError(`'routing' must be defined if 'ourDid' is not specified`)\n\n const resolved = await createPeerDidFromServices(\n agentContext,\n routingToServices(routing),\n config.peerNumAlgoForDidExchangeRequests\n )\n didDocument = resolved.didDocument\n keys = resolved.keys\n mediatorId = routing.mediatorId\n }\n\n const parentThreadId = outOfBandRecord.outOfBandInvitation.id\n\n const message = new DidCommDidExchangeRequestMessage({ label, parentThreadId, did: didDocument.id, goal, goalCode })\n\n const signingKeys = didDocument\n .getRecipientKeysWithVerificationMethod({ mapX25519ToEd25519: true })\n .map(({ publicJwk, verificationMethod }) => {\n // Bind the kmsKeyIds\n const kmsKeyId = keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n publicJwk.keyId = kmsKeyId ?? publicJwk.legacyKeyId\n\n return publicJwk\n })\n\n // Create sign attachment containing didDoc\n if (isValidPeerDid(didDocument.id) && getNumAlgoFromPeerDid(didDocument.id) === PeerDidNumAlgo.GenesisDoc) {\n const didDocAttach = await this.createSignedAttachment(agentContext, didDocument.toJSON(), signingKeys)\n message.didDoc = didDocAttach\n }\n\n const connectionRecord = await this.connectionService.createConnection(agentContext, {\n protocol: DidCommHandshakeProtocol.DidExchange,\n role: DidCommDidExchangeRole.Requester,\n alias,\n state: DidCommDidExchangeState.InvitationReceived,\n theirLabel: outOfBandInvitation.label,\n mediatorId,\n autoAcceptConnection: outOfBandRecord.autoAcceptConnection,\n outOfBandId: outOfBandRecord.id,\n invitationDid,\n imageUrl: outOfBandInvitation.imageUrl,\n })\n\n DidExchangeStateMachine.assertCreateMessageState(DidCommDidExchangeRequestMessage.type, connectionRecord)\n\n connectionRecord.did = didDocument.id\n connectionRecord.threadId = message.id\n\n if (autoAcceptConnection !== undefined || autoAcceptConnection !== null) {\n connectionRecord.autoAcceptConnection = autoAcceptConnection\n }\n\n await this.updateState(agentContext, DidCommDidExchangeRequestMessage.type, connectionRecord)\n this.logger.debug(`Create message ${DidCommDidExchangeRequestMessage.type.messageTypeUri} end`, {\n connectionRecord,\n message,\n })\n return { message, connectionRecord }\n }\n\n public async processRequest(\n messageContext: DidCommInboundMessageContext<DidCommDidExchangeRequestMessage>,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommConnectionRecord> {\n this.logger.debug(`Process message ${messageContext.message.type} start`, {\n message: messageContext.message,\n })\n\n outOfBandRecord.assertRole(DidCommOutOfBandRole.Sender)\n outOfBandRecord.assertState(DidCommOutOfBandState.AwaitResponse)\n\n // TODO check there is no connection record for particular oob record\n\n const { message, agentContext } = messageContext\n\n // Check corresponding invitation ID is the request's ~thread.pthid or pthid is a public did\n // TODO Maybe we can do it in handler, but that actually does not make sense because we try to find oob by parent thread ID there.\n const parentThreadId = message.thread?.parentThreadId\n if (\n !parentThreadId ||\n (!tryParseDid(parentThreadId) && parentThreadId !== outOfBandRecord.getTags().invitationId)\n ) {\n throw new DidExchangeProblemReportError('Missing reference to invitation.', {\n problemCode: DidExchangeProblemReportReason.RequestNotAccepted,\n })\n }\n\n // If the responder wishes to continue the exchange, they will persist the received information in their wallet.\n\n // Get DID Document either from message (if it is a supported did:peer) or resolve it externally\n const didDocument = await this.resolveDidDocument(agentContext, message)\n\n // A DID Record must be stored in order to allow for searching for its recipient keys when receiving a message\n const didRecord = await this.didRepository.storeReceivedDid(messageContext.agentContext, {\n did: didDocument.id,\n // It is important to take the did document from the PeerDid class\n // as it will have the id property\n didDocument:\n !isValidPeerDid(didDocument.id) || getNumAlgoFromPeerDid(message.did) === PeerDidNumAlgo.GenesisDoc\n ? didDocument\n : undefined,\n tags: {\n // We need to save the recipientKeys, so we can find the associated did\n // of a key when we receive a message from another connection.\n recipientKeyFingerprints: didDocument.recipientKeys.map((key) => key.fingerprint),\n\n // For did:peer, store any alternative dids (like short form did:peer:4),\n // it may have in order to relate any message referencing it\n alternativeDids: isValidPeerDid(didDocument.id) ? getAlternativeDidsForPeerDid(didDocument.id) : undefined,\n },\n })\n\n this.logger.debug('Saved DID record', {\n id: didRecord.id,\n did: didRecord.did,\n role: didRecord.role,\n tags: didRecord.getTags(),\n didDocument: 'omitted...',\n })\n\n const connectionRecord = await this.connectionService.createConnection(messageContext.agentContext, {\n protocol: DidCommHandshakeProtocol.DidExchange,\n role: DidCommDidExchangeRole.Responder,\n state: DidCommDidExchangeState.RequestReceived,\n alias: outOfBandRecord.alias,\n theirDid: message.did,\n theirLabel: message.label,\n threadId: message.threadId,\n mediatorId: outOfBandRecord.mediatorId,\n autoAcceptConnection: outOfBandRecord.autoAcceptConnection,\n outOfBandId: outOfBandRecord.id,\n })\n\n await this.updateState(messageContext.agentContext, DidCommDidExchangeRequestMessage.type, connectionRecord)\n this.logger.debug(`Process message ${DidCommDidExchangeRequestMessage.type.messageTypeUri} end`, connectionRecord)\n return connectionRecord\n }\n\n public async createResponse(\n agentContext: AgentContext,\n connectionRecord: DidCommConnectionRecord,\n outOfBandRecord: DidCommOutOfBandRecord,\n routing?: DidCommRouting\n ): Promise<DidCommDidExchangeResponseMessage> {\n this.logger.debug(`Create message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} start`, connectionRecord)\n DidExchangeStateMachine.assertCreateMessageState(DidCommDidExchangeResponseMessage.type, connectionRecord)\n\n const { threadId, theirDid } = connectionRecord\n\n const config = agentContext.dependencyManager.resolve(DidCommConnectionsModuleConfig)\n\n if (!threadId) {\n throw new CredoError('Missing threadId on connection record.')\n }\n\n if (!theirDid) {\n throw new CredoError('Missing theirDid on connection record.')\n }\n\n // Extract keys from the out of band record metadata\n const inlineResolvedServices = outOfBandRecord.outOfBandInvitation\n .getInlineServices()\n .map((service) => getResolvedDidcommServiceWithSigningKeyId(service, outOfBandRecord.invitationInlineServiceKeys))\n\n let services: ResolvedDidCommService[] = []\n\n if (routing) {\n services = routingToServices(routing)\n } else if (inlineResolvedServices.length > 0) {\n services = inlineResolvedServices\n } else {\n // We don't support using a did from the OOB invitation services currently, in this case we always pass routing to this method\n throw new CredoError(\n 'No routing provided, and no inline services found in out of band invitation. When using did services in out of band invitation, make sure to provide routing information for rotation.'\n )\n }\n\n // Use the same num algo for response as received in request\n const numAlgo = isValidPeerDid(theirDid)\n ? getNumAlgoFromPeerDid(theirDid)\n : config.peerNumAlgoForDidExchangeRequests\n\n const { didDocument } = await createPeerDidFromServices(agentContext, services, numAlgo)\n const message = new DidCommDidExchangeResponseMessage({ did: didDocument.id, threadId })\n\n // DID Rotate attachment should be signed with invitation keys\n const invitationRecipientKeys = inlineResolvedServices.flatMap((s) => s.recipientKeys)\n\n // Consider also pure-DID services, used when DID Exchange is started with an implicit invitation or a public DID\n for (const did of outOfBandRecord.outOfBandInvitation.getDidServices()) {\n const dids = agentContext.resolve(DidsApi)\n const resolved = await dids.resolveCreatedDidDocumentWithKeys(parseDid(did).did)\n invitationRecipientKeys.push(\n ...resolved.didDocument\n .getRecipientKeysWithVerificationMethod({ mapX25519ToEd25519: true })\n .map(({ publicJwk, verificationMethod }) => {\n const kmsKeyId = resolved.keys?.find(({ didDocumentRelativeKeyId }) =>\n verificationMethod.id.endsWith(didDocumentRelativeKeyId)\n )?.kmsKeyId\n\n publicJwk.keyId = kmsKeyId ?? publicJwk.legacyKeyId\n return publicJwk\n })\n )\n }\n\n if (numAlgo === PeerDidNumAlgo.GenesisDoc) {\n message.didDoc = await this.createSignedAttachment(agentContext, didDocument.toJSON(), invitationRecipientKeys)\n } else {\n // We assume any other case is a resolvable did (e.g. did:peer:2 or did:peer:4)\n message.didRotate = await this.createSignedAttachment(agentContext, didDocument.id, invitationRecipientKeys)\n }\n\n connectionRecord.did = didDocument.id\n\n await this.updateState(agentContext, DidCommDidExchangeResponseMessage.type, connectionRecord)\n this.logger.debug(`Create message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} end`, {\n connectionRecord,\n message,\n })\n return message\n }\n\n public async processResponse(\n messageContext: DidCommInboundMessageContext<DidCommDidExchangeResponseMessage>,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommConnectionRecord> {\n this.logger.debug(`Process message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} start`, {\n message: messageContext.message,\n })\n\n const { connection: connectionRecord, message, agentContext } = messageContext\n\n if (!connectionRecord) {\n throw new CredoError('No connection record in message context.')\n }\n\n DidExchangeStateMachine.assertProcessMessageState(DidCommDidExchangeResponseMessage.type, connectionRecord)\n\n if (!message.thread?.threadId || message.thread?.threadId !== connectionRecord.threadId) {\n throw new DidExchangeProblemReportError('Invalid or missing thread ID.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n // Get DID Document either from message (if it is a did:peer) or resolve it externally\n const didDocument = await this.resolveDidDocument(\n agentContext,\n message,\n outOfBandRecord.getTags().recipientKeyFingerprints.map((fingerprint) => {\n const publicJwk = Kms.PublicJwk.fromFingerprint(fingerprint)\n if (!publicJwk.is(Kms.Ed25519PublicJwk)) {\n throw new CredoError('Expected fingerprint to be of type Ed25519')\n }\n return publicJwk\n })\n )\n\n if (isValidPeerDid(didDocument.id)) {\n const didRecord = await this.didRepository.storeReceivedDid(messageContext.agentContext, {\n did: didDocument.id,\n didDocument: getNumAlgoFromPeerDid(message.did) === PeerDidNumAlgo.GenesisDoc ? didDocument : undefined,\n tags: {\n // We need to save the recipientKeys, so we can find the associated did\n // of a key when we receive a message from another connection.\n recipientKeyFingerprints: didDocument.recipientKeys.map((key) => key.fingerprint),\n\n // For did:peer, store any alternative dids (like short form did:peer:4),\n // it may have in order to relate any message referencing it\n alternativeDids: getAlternativeDidsForPeerDid(didDocument.id),\n },\n })\n\n this.logger.debug('Saved DID record', {\n id: didRecord.id,\n did: didRecord.did,\n role: didRecord.role,\n tags: didRecord.getTags(),\n didDocument: 'omitted...',\n })\n }\n\n connectionRecord.theirDid = message.did\n\n await this.updateState(messageContext.agentContext, DidCommDidExchangeResponseMessage.type, connectionRecord)\n this.logger.debug(`Process message ${DidCommDidExchangeResponseMessage.type.messageTypeUri} end`, connectionRecord)\n return connectionRecord\n }\n\n public async createComplete(\n agentContext: AgentContext,\n connectionRecord: DidCommConnectionRecord,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommDidExchangeCompleteMessage> {\n this.logger.debug(`Create message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} start`, connectionRecord)\n DidExchangeStateMachine.assertCreateMessageState(DidCommDidExchangeCompleteMessage.type, connectionRecord)\n\n const threadId = connectionRecord.threadId\n const parentThreadId = outOfBandRecord.outOfBandInvitation.id\n\n if (!threadId) {\n throw new CredoError(`Connection record ${connectionRecord.id} does not have 'threadId' attribute.`)\n }\n\n if (!parentThreadId) {\n throw new CredoError(`Connection record ${connectionRecord.id} does not have 'parentThreadId' attribute.`)\n }\n\n const message = new DidCommDidExchangeCompleteMessage({ threadId, parentThreadId })\n\n await this.updateState(agentContext, DidCommDidExchangeCompleteMessage.type, connectionRecord)\n this.logger.debug(`Create message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} end`, {\n connectionRecord,\n message,\n })\n return message\n }\n\n public async processComplete(\n messageContext: DidCommInboundMessageContext<DidCommDidExchangeCompleteMessage>,\n outOfBandRecord: DidCommOutOfBandRecord\n ): Promise<DidCommConnectionRecord> {\n this.logger.debug(`Process message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} start`, {\n message: messageContext.message,\n })\n\n const { connection: connectionRecord, message } = messageContext\n\n if (!connectionRecord) {\n throw new CredoError('No connection record in message context.')\n }\n\n DidExchangeStateMachine.assertProcessMessageState(DidCommDidExchangeCompleteMessage.type, connectionRecord)\n\n if (message.threadId !== connectionRecord.threadId) {\n throw new DidExchangeProblemReportError('Invalid or missing thread ID.', {\n problemCode: DidExchangeProblemReportReason.CompleteRejected,\n })\n }\n const pthid = message.thread?.parentThreadId\n if (!pthid || pthid !== outOfBandRecord.outOfBandInvitation.id) {\n throw new DidExchangeProblemReportError('Invalid or missing parent thread ID referencing to the invitation.', {\n problemCode: DidExchangeProblemReportReason.CompleteRejected,\n })\n }\n\n await this.updateState(messageContext.agentContext, DidCommDidExchangeCompleteMessage.type, connectionRecord)\n this.logger.debug(`Process message ${DidCommDidExchangeCompleteMessage.type.messageTypeUri} end`, {\n connectionRecord,\n })\n return connectionRecord\n }\n\n private async updateState(\n agentContext: AgentContext,\n messageType: ParsedMessageType,\n connectionRecord: DidCommConnectionRecord\n ) {\n this.logger.debug('Updating state', { connectionRecord })\n const nextState = DidExchangeStateMachine.nextState(messageType, connectionRecord)\n return this.connectionService.updateState(agentContext, connectionRecord, nextState)\n }\n\n private async createSignedAttachment(\n agentContext: AgentContext,\n data: string | Record<string, unknown>,\n signingKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n ) {\n this.logger.debug('Creating signed attachment')\n const signedAttach = new DidCommAttachment({\n mimeType: typeof data === 'string' ? undefined : 'application/json',\n data: new DidCommAttachmentData({\n base64:\n typeof data === 'string' ? TypedArrayEncoder.toBase64URL(Buffer.from(data)) : JsonEncoder.toBase64(data),\n }),\n })\n\n await Promise.all(\n signingKeys.map(async (signingKey) => {\n const kid = new DidKey(signingKey).did\n const payload = typeof data === 'string' ? TypedArrayEncoder.fromString(data) : JsonEncoder.toBuffer(data)\n\n const jws = await this.jwsService.createJws(agentContext, {\n payload,\n keyId: signingKey.keyId,\n header: {\n kid,\n },\n protectedHeaderOptions: {\n alg: Kms.KnownJwaSignatureAlgorithms.EdDSA,\n jwk: signingKey,\n },\n })\n signedAttach.addJws(jws)\n })\n )\n\n return signedAttach\n }\n\n /**\n * Resolves a did document from a given `request` or `response` message, verifying its signature or did rotate\n * signature in case it is taken from message attachment.\n *\n * @param message DID request or DID response message\n * @param invitationKeys array containing keys from connection invitation that could be used for signing of DID document\n * @returns verified DID document content from message attachment\n */\n\n private async resolveDidDocument(\n agentContext: AgentContext,\n message: DidCommDidExchangeRequestMessage | DidCommDidExchangeResponseMessage,\n invitationKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[] = []\n ) {\n // The only supported case where we expect to receive a did-document attachment is did:peer algo 1\n return isDid(message.did, 'peer') && getNumAlgoFromPeerDid(message.did) === PeerDidNumAlgo.GenesisDoc\n ? this.extractAttachedDidDocument(agentContext, message, invitationKeys)\n : this.extractResolvableDidDocument(agentContext, message, invitationKeys)\n }\n\n /**\n * Extracts DID document from message (resolving it externally if required) and verifies did-rotate attachment signature\n * if applicable\n */\n private async extractResolvableDidDocument(\n agentContext: AgentContext,\n message: DidCommDidExchangeRequestMessage | DidCommDidExchangeResponseMessage,\n invitationKeys?: Kms.PublicJwk<Kms.Ed25519PublicJwk>[]\n ) {\n // Validate did-rotate attachment in case of DID Exchange response\n if (message instanceof DidCommDidExchangeResponseMessage) {\n const didRotateAttachment = message.didRotate\n\n if (!didRotateAttachment) {\n throw new DidExchangeProblemReportError('DID Rotate attachment is missing.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n const jws = didRotateAttachment.data.jws\n\n if (!jws) {\n throw new DidExchangeProblemReportError('DID Rotate signature is missing.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n if (!didRotateAttachment.data.base64) {\n throw new CredoError('DID Rotate attachment is missing base64 property for signed did.')\n }\n\n // JWS payload must be base64url encoded\n const base64UrlPayload = base64ToBase64URL(didRotateAttachment.data.base64)\n const signedDid = TypedArrayEncoder.fromBase64(base64UrlPayload).toString()\n\n if (signedDid !== message.did) {\n throw new CredoError(\n `DID Rotate attachment's did ${message.did} does not correspond to message did ${message.did}`\n )\n }\n\n const { isValid, jwsSigners } = await this.jwsService.verifyJws(agentContext, {\n jws: {\n ...jws,\n payload: base64UrlPayload,\n },\n allowedJwsSignerMethods: ['did'],\n resolveJwsSigner: ({ jws: { header } }) => {\n if (typeof header.kid !== 'string' || !isDid(header.kid, 'key')) {\n throw new CredoError('JWS header kid must be a did:key DID.')\n }\n\n const didKey = DidKey.fromDid(header.kid)\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.publicJwk.fingerprint}`,\n jwk: didKey.publicJwk,\n }\n },\n })\n\n const jwsSignerKeys = jwsSigners.map((signer) => signer.jwk)\n if (!jwsSignerKeys.every((key) => key.is(Kms.Ed25519PublicJwk))) {\n throw new DidExchangeProblemReportError('Expected DID Rotate signature to be signed with Ed25519 key.', {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n })\n }\n\n if (\n !isValid ||\n !jwsSignerKeys.every((key) => invitationKeys?.some((invitationKey) => invitationKey.equals(key)))\n ) {\n throw new DidExchangeProblemReportError(\n `DID Rotate signature is invalid. isValid: ${isValid} signerKeys: ${JSON.stringify(\n jwsSignerKeys.map((key) => key.fingerprint)\n )} invitationKeys:${JSON.stringify(invitationKeys?.map((key) => key.fingerprint))}`,\n {\n problemCode: DidExchangeProblemReportReason.ResponseNotAccepted,\n }\n )\n }\n }\n\n // Now resolve the document related to the did (which can be either a public did or an inline did)\n try {\n return await agentContext.dependencyManager.resolve(DidsApi).resolveDidDocument(message.did)\n } catch (error) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n\n throw new DidExchangeProblemReportError(error, {\n problemCode,\n })\n }\n }\n\n /**\n * Extracts DID document as is from request or response message attachment and verifies its signature.\n *\n * @param message DID request or DID response message\n * @param invitationKeys array containing keys from connection invitation that could be used for signing of DID document\n * @returns verified DID document content from message attachment\n */\n private async extractAttachedDidDocument(\n agentContext: AgentContext,\n message: DidCommDidExchangeRequestMessage | DidCommDidExchangeResponseMessage,\n invitationKeys: Kms.PublicJwk<Kms.Ed25519PublicJwk>[] = []\n ): Promise<DidDocument> {\n if (!message.didDoc) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n throw new DidExchangeProblemReportError('DID Document attachment is missing.', { problemCode })\n }\n const didDocumentAttachment = message.didDoc\n const jws = didDocumentAttachment.data.jws\n\n if (!jws) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n throw new DidExchangeProblemReportError('DID Document signature is missing.', { problemCode })\n }\n\n if (!didDocumentAttachment.data.base64) {\n throw new CredoError('DID Document attachment is missing base64 property for signed did document.')\n }\n\n // JWS payload must be base64url encoded\n const base64UrlPayload = base64ToBase64URL(didDocumentAttachment.data.base64)\n\n const { isValid, jwsSigners } = await this.jwsService.verifyJws(agentContext, {\n jws: {\n ...jws,\n payload: base64UrlPayload,\n },\n allowedJwsSignerMethods: ['did'],\n resolveJwsSigner: ({ jws: { header } }) => {\n if (typeof header.kid !== 'string' || !isDid(header.kid, 'key')) {\n throw new CredoError('JWS header kid must be a did:key DID.')\n }\n\n const didKey = DidKey.fromDid(header.kid)\n return {\n method: 'did',\n didUrl: `${didKey.did}#${didKey.publicJwk.fingerprint}`,\n jwk: didKey.publicJwk,\n }\n },\n })\n\n const json = JsonEncoder.fromBase64(didDocumentAttachment.data.base64)\n const didDocument = JsonTransformer.fromJSON(json, DidDocument)\n const didDocumentKeys = didDocument.authentication\n ?.map((authentication) => {\n const verificationMethod =\n typeof authentication === 'string'\n ? didDocument.dereferenceVerificationMethod(authentication)\n : authentication\n\n const publicJwk = getPublicJwkFromVerificationMethod(verificationMethod)\n return publicJwk\n })\n .concat(invitationKeys)\n\n this.logger.trace('JWS verification result', { isValid, jwsSigners })\n\n if (!isValid || !jwsSigners.every((jwsSigner) => didDocumentKeys?.some((key) => key.equals(jwsSigner.jwk)))) {\n const problemCode =\n message instanceof DidCommDidExchangeRequestMessage\n ? DidExchangeProblemReportReason.RequestNotAccepted\n : DidExchangeProblemReportReason.ResponseNotAccepted\n throw new DidExchangeProblemReportError('DID Document signature is invalid.', { problemCode })\n }\n\n return didDocument\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DO,gCAAMA,sBAAoB;CAM/B,AAAO,YACL,mBACA,eACA,YACA,AAAiCC,QACjC;AACA,OAAK,oBAAoB;AACzB,OAAK,gBAAgB;AACrB,OAAK,aAAa;AAClB,OAAK,SAAS;;CAGhB,MAAa,cACX,cACA,iBACA,QACmG;AACnG,OAAK,OAAO,MAAM,kBAAkB,iCAAiC,KAAK,eAAe,SAAS;GAChG;GACA;GACD,CAAC;EACF,MAAM,SAAS,aAAa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G,SAAO;;;;CAjpBV,YAAY;oBAWR,OAAO,iBAAiB,OAAO"}
|
|
@@ -3,9 +3,9 @@ const require_messageType = require('../../util/messageType.js');
|
|
|
3
3
|
const require_DidCommDidExchangeState = require('./models/DidCommDidExchangeState.js');
|
|
4
4
|
const require_DidCommDidExchangeRole = require('./models/DidCommDidExchangeRole.js');
|
|
5
5
|
require('./models/index.js');
|
|
6
|
+
const require_DidCommDidExchangeCompleteMessage = require('./messages/DidCommDidExchangeCompleteMessage.js');
|
|
6
7
|
const require_DidCommDidExchangeRequestMessage = require('./messages/DidCommDidExchangeRequestMessage.js');
|
|
7
8
|
const require_DidCommDidExchangeResponseMessage = require('./messages/DidCommDidExchangeResponseMessage.js');
|
|
8
|
-
const require_DidCommDidExchangeCompleteMessage = require('./messages/DidCommDidExchangeCompleteMessage.js');
|
|
9
9
|
require('./messages/index.js');
|
|
10
10
|
let __credo_ts_core = require("@credo-ts/core");
|
|
11
11
|
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
|
|
@@ -2,9 +2,9 @@ import { canHandleMessageType } from "../../util/messageType.mjs";
|
|
|
2
2
|
import { DidCommDidExchangeState } from "./models/DidCommDidExchangeState.mjs";
|
|
3
3
|
import { DidCommDidExchangeRole } from "./models/DidCommDidExchangeRole.mjs";
|
|
4
4
|
import "./models/index.mjs";
|
|
5
|
+
import { DidCommDidExchangeCompleteMessage } from "./messages/DidCommDidExchangeCompleteMessage.mjs";
|
|
5
6
|
import { DidCommDidExchangeRequestMessage } from "./messages/DidCommDidExchangeRequestMessage.mjs";
|
|
6
7
|
import { DidCommDidExchangeResponseMessage } from "./messages/DidCommDidExchangeResponseMessage.mjs";
|
|
7
|
-
import { DidCommDidExchangeCompleteMessage } from "./messages/DidCommDidExchangeCompleteMessage.mjs";
|
|
8
8
|
import "./messages/index.mjs";
|
|
9
9
|
import { CredoError } from "@credo-ts/core";
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidExchangeStateMachine.mjs","names":[],"sources":["../../../src/modules/connections/DidExchangeStateMachine.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"DidExchangeStateMachine.mjs","names":[],"sources":["../../../src/modules/connections/DidExchangeStateMachine.ts"],"sourcesContent":["import { CredoError } from '@credo-ts/core'\nimport type { ParsedMessageType } from '../../util/messageType'\nimport { canHandleMessageType } from '../../util/messageType'\nimport {\n DidCommDidExchangeCompleteMessage,\n DidCommDidExchangeRequestMessage,\n DidCommDidExchangeResponseMessage,\n} from './messages'\nimport { DidCommDidExchangeRole, DidCommDidExchangeState } from './models'\nimport type { DidCommConnectionRecord } from './repository'\n\n// biome-ignore lint/complexity/noStaticOnlyClass: no explanation\nexport class DidExchangeStateMachine {\n private static createMessageStateRules = [\n {\n message: DidCommDidExchangeRequestMessage,\n state: DidCommDidExchangeState.InvitationReceived,\n role: DidCommDidExchangeRole.Requester,\n nextState: DidCommDidExchangeState.RequestSent,\n },\n {\n message: DidCommDidExchangeResponseMessage,\n state: DidCommDidExchangeState.RequestReceived,\n role: DidCommDidExchangeRole.Responder,\n nextState: DidCommDidExchangeState.ResponseSent,\n },\n {\n message: DidCommDidExchangeCompleteMessage,\n state: DidCommDidExchangeState.ResponseReceived,\n role: DidCommDidExchangeRole.Requester,\n nextState: DidCommDidExchangeState.Completed,\n },\n ]\n\n private static processMessageStateRules = [\n {\n message: DidCommDidExchangeRequestMessage,\n state: DidCommDidExchangeState.InvitationSent,\n role: DidCommDidExchangeRole.Responder,\n nextState: DidCommDidExchangeState.RequestReceived,\n },\n {\n message: DidCommDidExchangeResponseMessage,\n state: DidCommDidExchangeState.RequestSent,\n role: DidCommDidExchangeRole.Requester,\n nextState: DidCommDidExchangeState.ResponseReceived,\n },\n {\n message: DidCommDidExchangeCompleteMessage,\n state: DidCommDidExchangeState.ResponseSent,\n role: DidCommDidExchangeRole.Responder,\n nextState: DidCommDidExchangeState.Completed,\n },\n ]\n\n public static assertCreateMessageState(messageType: ParsedMessageType, record: DidCommConnectionRecord) {\n const rule = DidExchangeStateMachine.createMessageStateRules.find((r) =>\n canHandleMessageType(r.message, messageType)\n )\n if (!rule) {\n throw new CredoError(`Could not find create message rule for ${messageType}`)\n }\n if (rule.state !== record.state || rule.role !== record.role) {\n throw new CredoError(\n `Record with role ${record.role} is in invalid state ${record.state} to create ${messageType}. Expected state for role ${rule.role} is ${rule.state}.`\n )\n }\n }\n\n public static assertProcessMessageState(messageType: ParsedMessageType, record: DidCommConnectionRecord) {\n const rule = DidExchangeStateMachine.processMessageStateRules.find((r) =>\n canHandleMessageType(r.message, messageType)\n )\n if (!rule) {\n throw new CredoError(`Could not find create message rule for ${messageType}`)\n }\n if (rule.state !== record.state || rule.role !== record.role) {\n throw new CredoError(\n `Record with role ${record.role} is in invalid state ${record.state} to process ${messageType.messageTypeUri}. Expected state for role ${rule.role} is ${rule.state}.`\n )\n }\n }\n\n public static nextState(messageType: ParsedMessageType, record: DidCommConnectionRecord) {\n const rule = DidExchangeStateMachine.createMessageStateRules\n .concat(DidExchangeStateMachine.processMessageStateRules)\n .find((r) => canHandleMessageType(r.message, messageType) && r.role === record.role)\n if (!rule) {\n throw new CredoError(\n `Could not find create message rule for messageType ${messageType.messageTypeUri}, state ${record.state} and role ${record.role}`\n )\n }\n return rule.nextState\n }\n}\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,0BAAb,MAAa,wBAAwB;CA2CnC,OAAc,yBAAyB,aAAgC,QAAiC;EACtG,MAAM,OAAO,wBAAwB,wBAAwB,MAAM,MACjE,qBAAqB,EAAE,SAAS,YAAY,CAC7C;AACD,MAAI,CAAC,KACH,OAAM,IAAI,WAAW,0CAA0C,cAAc;AAE/E,MAAI,KAAK,UAAU,OAAO,SAAS,KAAK,SAAS,OAAO,KACtD,OAAM,IAAI,WACR,oBAAoB,OAAO,KAAK,uBAAuB,OAAO,MAAM,aAAa,YAAY,4BAA4B,KAAK,KAAK,MAAM,KAAK,MAAM,GACrJ;;CAIL,OAAc,0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age } from "../messages/DidCommConnectionProblemReportMessage.mjs";
|
|
1
2
|
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../errors/problem-reports/DidCommProblemReportError.mjs";
|
|
2
3
|
import { ConnectionProblemReportReason } from "./ConnectionProblemReportReason.mjs";
|
|
3
|
-
import { DidCommConnectionProblemReportMessage } from "../messages/DidCommConnectionProblemReportMessage.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/connections/errors/ConnectionProblemReportError.d.ts
|
|
6
6
|
interface ConnectionProblemReportErrorOptions extends DidCommProblemReportErrorOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionProblemReportError.d.mts","names":[],"sources":["../../../../src/modules/connections/errors/ConnectionProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"ConnectionProblemReportError.d.mts","names":[],"sources":["../../../../src/modules/connections/errors/ConnectionProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;UAKU,mCAAA,SAA4C;EAA5C,WAAA,EACK,6BAD+B;;AAC/B,cAEF,4BAAA,SAAqC,yBAAA,CAFnC;SADuC,EAAA,MAAA;EAAgC,aAAA,EAI9D,qCAJ8D;EAGzE,WAAA,CAAA,OAAA,EAAA,MAAA,EAAA;IAA6B;EAAA,CAAA,EAKrB,mCALqB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DidCommConnectionProblemReportMessage } from "../messages/DidCommConnectionProblemReportMessage.js";
|
|
1
2
|
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../errors/problem-reports/DidCommProblemReportError.js";
|
|
2
3
|
import { ConnectionProblemReportReason } from "./ConnectionProblemReportReason.js";
|
|
3
|
-
import { DidCommConnectionProblemReportMessage } from "../messages/DidCommConnectionProblemReportMessage.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/connections/errors/ConnectionProblemReportError.d.ts
|
|
6
6
|
interface ConnectionProblemReportErrorOptions extends DidCommProblemReportErrorOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionProblemReportError.d.ts","names":[],"sources":["../../../../src/modules/connections/errors/ConnectionProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"ConnectionProblemReportError.d.ts","names":[],"sources":["../../../../src/modules/connections/errors/ConnectionProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;UAKU,mCAAA,SAA4C;EAA5C,WAAA,EACK,6BAD+B;;AAC/B,cAEF,4BAAA,SAAqC,yBAAA,CAFnC;SADuC,EAAA,MAAA;EAAgC,aAAA,EAI9D,qCAJ8D;EAGzE,WAAA,CAAA,OAAA,EAAA,MAAA,EAAA;IAA6B;EAAA,CAAA,EAKrB,mCALqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionProblemReportError.mjs","names":["message: string"],"sources":["../../../../src/modules/connections/errors/ConnectionProblemReportError.ts"],"sourcesContent":["import type { DidCommProblemReportErrorOptions } from '../../../errors'\nimport
|
|
1
|
+
{"version":3,"file":"ConnectionProblemReportError.mjs","names":["message: string"],"sources":["../../../../src/modules/connections/errors/ConnectionProblemReportError.ts"],"sourcesContent":["import type { DidCommProblemReportErrorOptions } from '../../../errors'\nimport { DidCommProblemReportError } from '../../../errors'\nimport { DidCommConnectionProblemReportMessage } from '../messages'\nimport type { ConnectionProblemReportReason } from './ConnectionProblemReportReason'\n\ninterface ConnectionProblemReportErrorOptions extends DidCommProblemReportErrorOptions {\n problemCode: ConnectionProblemReportReason\n}\nexport class ConnectionProblemReportError extends DidCommProblemReportError {\n public problemReport: DidCommConnectionProblemReportMessage\n\n public constructor(\n public message: string,\n { problemCode }: ConnectionProblemReportErrorOptions\n ) {\n super(message, { problemCode })\n this.problemReport = new DidCommConnectionProblemReportMessage({\n description: {\n en: message,\n code: problemCode,\n },\n })\n }\n}\n"],"mappings":";;;;;;AAQA,IAAa,+BAAb,cAAkD,0BAA0B;CAG1E,AAAO,YACL,AAAOA,SACP,EAAE,eACF;AACA,QAAM,SAAS,EAAE,aAAa,CAAC;EAHxB;AAIP,OAAK,gBAAgB,IAAI,sCAAsC,EAC7D,aAAa;GACX,IAAI;GACJ,MAAM;GACP,EACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../errors/problem-reports/DidCommProblemReportError.mjs";
|
|
2
1
|
import { DidCommDidExchangeProblemReportMessage } from "../messages/DidCommDidExchangeProblemReportMessage.mjs";
|
|
2
|
+
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../errors/problem-reports/DidCommProblemReportError.mjs";
|
|
3
3
|
import { DidExchangeProblemReportReason } from "./DidExchangeProblemReportReason.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/connections/errors/DidExchangeProblemReportError.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidExchangeProblemReportError.d.mts","names":[],"sources":["../../../../src/modules/connections/errors/DidExchangeProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidExchangeProblemReportError.d.mts","names":[],"sources":["../../../../src/modules/connections/errors/DidExchangeProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;UAKU,oCAAA,SAA6C;EAA7C,WAAA,EACK,8BADgC;;AAChC,cAEF,6BAAA,SAAsC,yBAAA,CAFpC;SADwC,EAAA,MAAA;EAAgC,aAAA,EAI/D,sCAJ+D;EAG1E,WAAA,CAAA,OAAA,EAAA,MAAA,EAAA;IAAA;EAA8B,CAAA,EAKtB,oCALsB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../errors/problem-reports/DidCommProblemReportError.js";
|
|
2
1
|
import { DidCommDidExchangeProblemReportMessage } from "../messages/DidCommDidExchangeProblemReportMessage.js";
|
|
2
|
+
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../errors/problem-reports/DidCommProblemReportError.js";
|
|
3
3
|
import { DidExchangeProblemReportReason } from "./DidExchangeProblemReportReason.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/connections/errors/DidExchangeProblemReportError.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidExchangeProblemReportError.d.ts","names":[],"sources":["../../../../src/modules/connections/errors/DidExchangeProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidExchangeProblemReportError.d.ts","names":[],"sources":["../../../../src/modules/connections/errors/DidExchangeProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;UAKU,oCAAA,SAA6C;EAA7C,WAAA,EACK,8BADgC;;AAChC,cAEF,6BAAA,SAAsC,yBAAA,CAFpC;SADwC,EAAA,MAAA;EAAgC,aAAA,EAI/D,sCAJ+D;EAG1E,WAAA,CAAA,OAAA,EAAA,MAAA,EAAA;IAAA;EAA8B,CAAA,EAKtB,oCALsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidExchangeProblemReportError.mjs","names":["message: string"],"sources":["../../../../src/modules/connections/errors/DidExchangeProblemReportError.ts"],"sourcesContent":["import type { DidCommProblemReportErrorOptions } from '../../../errors'\nimport
|
|
1
|
+
{"version":3,"file":"DidExchangeProblemReportError.mjs","names":["message: string"],"sources":["../../../../src/modules/connections/errors/DidExchangeProblemReportError.ts"],"sourcesContent":["import type { DidCommProblemReportErrorOptions } from '../../../errors'\nimport { DidCommProblemReportError } from '../../../errors'\nimport { DidCommDidExchangeProblemReportMessage } from '../messages'\nimport type { DidExchangeProblemReportReason } from './DidExchangeProblemReportReason'\n\ninterface DidExchangeProblemReportErrorOptions extends DidCommProblemReportErrorOptions {\n problemCode: DidExchangeProblemReportReason\n}\nexport class DidExchangeProblemReportError extends DidCommProblemReportError {\n public problemReport: DidCommDidExchangeProblemReportMessage\n\n public constructor(\n public message: string,\n { problemCode }: DidExchangeProblemReportErrorOptions\n ) {\n super(message, { problemCode })\n this.problemReport = new DidCommDidExchangeProblemReportMessage({\n description: {\n en: message,\n code: problemCode,\n },\n })\n }\n}\n"],"mappings":";;;;;;AAQA,IAAa,gCAAb,cAAmD,0BAA0B;CAG3E,AAAO,YACL,AAAOA,SACP,EAAE,eACF;AACA,QAAM,SAAS,EAAE,aAAa,CAAC;EAHxB;AAIP,OAAK,gBAAgB,IAAI,uCAAuC,EAC9D,aAAa;GACX,IAAI;GACJ,MAAM;GACP,EACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommAckMessageHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommAckMessageHandler.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidCommAckMessageHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommAckMessageHandler.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,wBAAA,YAAoC;;EAApC,iBAAA,EAAA,CAAA,OAEa,iBAFY,CAAA,EAAA;EAAA,WAAA,CAAA,iBAAA,EAIE,wBAJF;QAEZ,CAAA,cAAA,EAMY,mCANZ,CAMgD,wBANhD,CAAA,CAAA,EAMyE,OANzE,CAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommAckMessageHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommAckMessageHandler.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidCommAckMessageHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommAckMessageHandler.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,wBAAA,YAAoC;;EAApC,iBAAA,EAAA,CAAA,OAEa,iBAFY,CAAA,EAAA;EAAA,WAAA,CAAA,iBAAA,EAIE,wBAJF;QAEZ,CAAA,cAAA,EAMY,mCANZ,CAMgD,wBANhD,CAAA,CAAA,EAMyE,OANzE,CAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommAckMessageHandler.mjs","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommAckMessageHandler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../handlers'\nimport
|
|
1
|
+
{"version":3,"file":"DidCommAckMessageHandler.mjs","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommAckMessageHandler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../handlers'\nimport { DidCommAckMessage } from '../../../messages'\nimport type { DidCommConnectionService } from '../services'\n\nexport class DidCommAckMessageHandler implements DidCommMessageHandler {\n private connectionService: DidCommConnectionService\n public supportedMessages = [DidCommAckMessage]\n\n public constructor(connectionService: DidCommConnectionService) {\n this.connectionService = connectionService\n }\n\n public async handle(inboundMessage: DidCommMessageHandlerInboundMessage<DidCommAckMessageHandler>) {\n await this.connectionService.processAck(inboundMessage)\n\n return undefined\n }\n}\n"],"mappings":";;;;AAIA,IAAa,2BAAb,MAAuE;CAIrE,AAAO,YAAY,mBAA6C;OAFzD,oBAAoB,CAAC,kBAAkB;AAG5C,OAAK,oBAAoB;;CAG3B,MAAa,OAAO,gBAA+E;AACjG,QAAM,KAAK,kBAAkB,WAAW,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionProblemReportHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionProblemReportHandler.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidCommConnectionProblemReportHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionProblemReportHandler.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,qCAAA,YAAiD;;EAAjD,iBAAA,EAAA,CAAA,OAEa,qCAFyB,CAAA,EAAA;EAAA,WAAA,CAAA,iBAAA,EAIX,wBAJW;QAEzB,CAAA,cAAA,EAMY,mCANZ,CAMgD,qCANhD,CAAA,CAAA,EAMsF,OANtF,CAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionProblemReportHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionProblemReportHandler.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidCommConnectionProblemReportHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionProblemReportHandler.ts"],"sourcesContent":[],"mappings":";;;;;cAIa,qCAAA,YAAiD;;EAAjD,iBAAA,EAAA,CAAA,OAEa,qCAFyB,CAAA,EAAA;EAAA,WAAA,CAAA,iBAAA,EAIX,wBAJW;QAEzB,CAAA,cAAA,EAMY,mCANZ,CAMgD,qCANhD,CAAA,CAAA,EAMsF,OANtF,CAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionProblemReportHandler.mjs","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionProblemReportHandler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../handlers'\nimport
|
|
1
|
+
{"version":3,"file":"DidCommConnectionProblemReportHandler.mjs","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionProblemReportHandler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../handlers'\nimport { DidCommConnectionProblemReportMessage } from '../messages'\nimport type { DidCommConnectionService } from '../services'\n\nexport class DidCommConnectionProblemReportHandler implements DidCommMessageHandler {\n private connectionService: DidCommConnectionService\n public supportedMessages = [DidCommConnectionProblemReportMessage]\n\n public constructor(connectionService: DidCommConnectionService) {\n this.connectionService = connectionService\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommConnectionProblemReportHandler>) {\n await this.connectionService.processProblemReport(messageContext)\n\n return undefined\n }\n}\n"],"mappings":";;;;AAIA,IAAa,wCAAb,MAAoF;CAIlF,AAAO,YAAY,mBAA6C;OAFzD,oBAAoB,CAAC,sCAAsC;AAGhE,OAAK,oBAAoB;;CAG3B,MAAa,OAAO,gBAA4F;AAC9G,QAAM,KAAK,kBAAkB,qBAAqB,eAAe"}
|
|
@@ -2,9 +2,9 @@ import { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from "../.
|
|
|
2
2
|
import { DidCommConnectionRequestMessage } from "../messages/DidCommConnectionRequestMessage.mjs";
|
|
3
3
|
import { DidCommConnectionResponseMessage } from "../messages/DidCommConnectionResponseMessage.mjs";
|
|
4
4
|
import { DidCommConnectionService } from "../services/DidCommConnectionService.mjs";
|
|
5
|
+
import { DidCommRoutingService } from "../../routing/services/DidCommRoutingService.mjs";
|
|
5
6
|
import { DidCommOutOfBandService } from "../../oob/DidCommOutOfBandService.mjs";
|
|
6
7
|
import { DidCommConnectionsModuleConfig } from "../DidCommConnectionsModuleConfig.mjs";
|
|
7
|
-
import { DidCommRoutingService } from "../../routing/services/DidCommRoutingService.mjs";
|
|
8
8
|
import { DidCommOutboundMessageContext } from "../../../models/DidCommOutboundMessageContext.mjs";
|
|
9
9
|
import { DidRepository } from "@credo-ts/core";
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionRequestHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionRequestHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommConnectionRequestHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionRequestHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cAaa,+BAAA,YAA2C;;;EAA3C,QAAA,cAAA;EAAgC,QAAA,aAAA;UAMnB,uBAAA;mBAGH,EAAA,CAAA,OAHG,+BAGH,CAAA,EAAA;aACD,CAAA,iBAAA,EADC,wBACD,EAAA,gBAAA,EAAA,uBAAA,EAAA,cAAA,EACF,qBADE,EAAA,aAAA,EAEH,aAFG,EAAA,uBAAA,EAGO,8BAHP;QACF,CAAA,cAAA,EAWkB,mCAXlB,CAWsD,+BAXtD,CAAA,CAAA,EAWsF,OAXtF,CAWsF,6BAXtF,CAWqD,gCAAA,CAXrD,GAAA,SAAA,CAAA"}
|
|
@@ -2,9 +2,9 @@ import { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from "../.
|
|
|
2
2
|
import { DidCommConnectionRequestMessage } from "../messages/DidCommConnectionRequestMessage.js";
|
|
3
3
|
import { DidCommConnectionResponseMessage } from "../messages/DidCommConnectionResponseMessage.js";
|
|
4
4
|
import { DidCommConnectionService } from "../services/DidCommConnectionService.js";
|
|
5
|
+
import { DidCommRoutingService } from "../../routing/services/DidCommRoutingService.js";
|
|
5
6
|
import { DidCommOutOfBandService } from "../../oob/DidCommOutOfBandService.js";
|
|
6
7
|
import { DidCommConnectionsModuleConfig } from "../DidCommConnectionsModuleConfig.js";
|
|
7
|
-
import { DidCommRoutingService } from "../../routing/services/DidCommRoutingService.js";
|
|
8
8
|
import { DidCommOutboundMessageContext } from "../../../models/DidCommOutboundMessageContext.js";
|
|
9
9
|
import { DidRepository } from "@credo-ts/core";
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionRequestHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionRequestHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommConnectionRequestHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionRequestHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;cAaa,+BAAA,YAA2C;;;EAA3C,QAAA,cAAA;EAAgC,QAAA,aAAA;UAMnB,uBAAA;mBAGH,EAAA,CAAA,OAHG,+BAGH,CAAA,EAAA;aACD,CAAA,iBAAA,EADC,wBACD,EAAA,gBAAA,EAAA,uBAAA,EAAA,cAAA,EACF,qBADE,EAAA,aAAA,EAEH,aAFG,EAAA,uBAAA,EAGO,8BAHP;QACF,CAAA,cAAA,EAWkB,mCAXlB,CAWsD,+BAXtD,CAAA,CAAA,EAWsF,OAXtF,CAWsF,6BAXtF,CAWqD,gCAAA,CAXrD,GAAA,SAAA,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
|
|
2
|
-
const require_DidCommOutboundMessageContext = require('../../../models/DidCommOutboundMessageContext.js');
|
|
3
|
-
require('../../../models/index.js');
|
|
4
2
|
const require_DidCommHandshakeProtocol = require('../models/DidCommHandshakeProtocol.js');
|
|
5
3
|
require('../models/index.js');
|
|
6
|
-
const require_DidCommConnectionRequestMessage = require('../messages/DidCommConnectionRequestMessage.js');
|
|
7
|
-
require('../messages/index.js');
|
|
8
4
|
const require_DidCommTransportService = require('../../../DidCommTransportService.js');
|
|
5
|
+
const require_DidCommOutboundMessageContext = require('../../../models/DidCommOutboundMessageContext.js');
|
|
6
|
+
require('../../../models/index.js');
|
|
9
7
|
const require_DidCommOutOfBandState = require('../../oob/domain/DidCommOutOfBandState.js');
|
|
8
|
+
const require_DidCommConnectionRequestMessage = require('../messages/DidCommConnectionRequestMessage.js');
|
|
9
|
+
require('../messages/index.js');
|
|
10
10
|
let __credo_ts_core = require("@credo-ts/core");
|
|
11
11
|
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
|
|
12
12
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DidCommOutboundMessageContext } from "../../../models/DidCommOutboundMessageContext.mjs";
|
|
2
|
-
import "../../../models/index.mjs";
|
|
3
1
|
import { DidCommHandshakeProtocol } from "../models/DidCommHandshakeProtocol.mjs";
|
|
4
2
|
import "../models/index.mjs";
|
|
5
|
-
import { DidCommConnectionRequestMessage } from "../messages/DidCommConnectionRequestMessage.mjs";
|
|
6
|
-
import "../messages/index.mjs";
|
|
7
3
|
import { DidCommTransportService } from "../../../DidCommTransportService.mjs";
|
|
4
|
+
import { DidCommOutboundMessageContext } from "../../../models/DidCommOutboundMessageContext.mjs";
|
|
5
|
+
import "../../../models/index.mjs";
|
|
8
6
|
import { DidCommOutOfBandState } from "../../oob/domain/DidCommOutOfBandState.mjs";
|
|
7
|
+
import { DidCommConnectionRequestMessage } from "../messages/DidCommConnectionRequestMessage.mjs";
|
|
8
|
+
import "../messages/index.mjs";
|
|
9
9
|
import { CredoError, tryParseDid } from "@credo-ts/core";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/connections/handlers/DidCommConnectionRequestHandler.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionRequestHandler.mjs","names":["message"],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionRequestHandler.ts"],"sourcesContent":["import type { DidRepository } from '@credo-ts/core'\nimport
|
|
1
|
+
{"version":3,"file":"DidCommConnectionRequestHandler.mjs","names":["message"],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionRequestHandler.ts"],"sourcesContent":["import type { DidRepository } from '@credo-ts/core'\nimport { CredoError, tryParseDid } from '@credo-ts/core'\nimport { DidCommTransportService } from '../../../DidCommTransportService'\nimport type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../handlers'\nimport { DidCommOutboundMessageContext } from '../../../models'\nimport type { DidCommOutOfBandService } from '../../oob/DidCommOutOfBandService'\nimport { DidCommOutOfBandState } from '../../oob/domain/DidCommOutOfBandState'\nimport type { DidCommRoutingService } from '../../routing/services/DidCommRoutingService'\nimport type { DidCommConnectionsModuleConfig } from '../DidCommConnectionsModuleConfig'\nimport { DidCommConnectionRequestMessage } from '../messages'\nimport { DidCommHandshakeProtocol } from '../models'\nimport type { DidCommConnectionService } from '../services'\n\nexport class DidCommConnectionRequestHandler implements DidCommMessageHandler {\n private connectionService: DidCommConnectionService\n private outOfBandService: DidCommOutOfBandService\n private routingService: DidCommRoutingService\n private didRepository: DidRepository\n private connectionsModuleConfig: DidCommConnectionsModuleConfig\n public supportedMessages = [DidCommConnectionRequestMessage]\n\n public constructor(\n connectionService: DidCommConnectionService,\n outOfBandService: DidCommOutOfBandService,\n routingService: DidCommRoutingService,\n didRepository: DidRepository,\n connectionsModuleConfig: DidCommConnectionsModuleConfig\n ) {\n this.connectionService = connectionService\n this.outOfBandService = outOfBandService\n this.routingService = routingService\n this.didRepository = didRepository\n this.connectionsModuleConfig = connectionsModuleConfig\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommConnectionRequestHandler>) {\n const { agentContext, connection, recipientKey, senderKey, message, sessionId } = messageContext\n\n if (!recipientKey || !senderKey) {\n throw new CredoError('Unable to process connection request without senderVerkey or recipientKey')\n }\n\n const parentThreadId = message.thread?.parentThreadId\n\n const outOfBandRecord =\n parentThreadId && tryParseDid(parentThreadId)\n ? await this.outOfBandService.createFromImplicitInvitation(agentContext, {\n did: parentThreadId,\n threadId: message.threadId,\n recipientKey,\n handshakeProtocols: [DidCommHandshakeProtocol.Connections],\n })\n : await this.outOfBandService.findCreatedByRecipientKey(agentContext, recipientKey)\n\n if (!outOfBandRecord) {\n throw new CredoError(`Out-of-band record for recipient key ${recipientKey.fingerprint} was not found.`)\n }\n\n if (connection && !outOfBandRecord.reusable) {\n throw new CredoError(`Connection record for non-reusable out-of-band ${outOfBandRecord.id} already exists.`)\n }\n\n const receivedDidRecord = await this.didRepository.findReceivedDidByRecipientKey(agentContext, senderKey)\n if (receivedDidRecord) {\n throw new CredoError(`A received did record for sender key ${senderKey.fingerprint} already exists.`)\n }\n\n if (outOfBandRecord.state === DidCommOutOfBandState.Done) {\n throw new CredoError('Out-of-band record has been already processed and it does not accept any new requests')\n }\n\n const connectionRecord = await this.connectionService.processRequest(messageContext, outOfBandRecord)\n\n // Associate the new connection with the session created for the inbound message\n if (sessionId) {\n const transportService = agentContext.dependencyManager.resolve(DidCommTransportService)\n transportService.setConnectionIdForSession(sessionId, connectionRecord.id)\n }\n\n if (!outOfBandRecord.reusable) {\n await this.outOfBandService.updateState(agentContext, outOfBandRecord, DidCommOutOfBandState.Done)\n }\n\n if (connectionRecord?.autoAcceptConnection ?? this.connectionsModuleConfig.autoAcceptConnections) {\n // TODO: Allow rotation of keys used in the invitation for new ones not only when out-of-band is reusable or\n // when there are no inline services in the invitation\n\n // We generate routing in two scenarios:\n // 1. When the out-of-band invitation is reusable, as otherwise all connections use the same keys\n // 2. When the out-of-band invitation has no inline services, as we don't want to generate a legacy did doc from a service did\n const routing =\n outOfBandRecord.reusable || outOfBandRecord.outOfBandInvitation.getInlineServices().length === 0\n ? await this.routingService.getRouting(agentContext)\n : undefined\n\n const { message } = await this.connectionService.createResponse(\n agentContext,\n connectionRecord,\n outOfBandRecord,\n routing\n )\n return new DidCommOutboundMessageContext(message, {\n agentContext,\n connection: connectionRecord,\n outOfBand: outOfBandRecord,\n })\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,kCAAb,MAA8E;CAQ5E,AAAO,YACL,mBACA,kBACA,gBACA,eACA,yBACA;OARK,oBAAoB,CAAC,gCAAgC;AAS1D,OAAK,oBAAoB;AACzB,OAAK,mBAAmB;AACxB,OAAK,iBAAiB;AACtB,OAAK,gBAAgB;AACrB,OAAK,0BAA0B;;CAGjC,MAAa,OAAO,gBAAsF;EACxG,MAAM,EAAE,cAAc,YAAY,cAAc,WAAW,SAAS,cAAc;AAElF,MAAI,CAAC,gBAAgB,CAAC,UACpB,OAAM,IAAI,WAAW,4EAA4E;EAGnG,MAAM,iBAAiB,QAAQ,QAAQ;EAEvC,MAAM,kBACJ,kBAAkB,YAAY,eAAe,GACzC,MAAM,KAAK,iBAAiB,6BAA6B,cAAc;GACrE,KAAK;GACL,UAAU,QAAQ;GAClB;GACA,oBAAoB,CAAC,yBAAyB,YAAY;GAC3D,CAAC,GACF,MAAM,KAAK,iBAAiB,0BAA0B,cAAc,aAAa;AAEvF,MAAI,CAAC,gBACH,OAAM,IAAI,WAAW,wCAAwC,aAAa,YAAY,iBAAiB;AAGzG,MAAI,cAAc,CAAC,gBAAgB,SACjC,OAAM,IAAI,WAAW,kDAAkD,gBAAgB,GAAG,kBAAkB;AAI9G,MAD0B,MAAM,KAAK,cAAc,8BAA8B,cAAc,UAAU,CAEvG,OAAM,IAAI,WAAW,wCAAwC,UAAU,YAAY,kBAAkB;AAGvG,MAAI,gBAAgB,UAAU,sBAAsB,KAClD,OAAM,IAAI,WAAW,wFAAwF;EAG/G,MAAM,mBAAmB,MAAM,KAAK,kBAAkB,eAAe,gBAAgB,gBAAgB;AAGrG,MAAI,UAEF,CADyB,aAAa,kBAAkB,QAAQ,wBAAwB,CACvE,0BAA0B,WAAW,iBAAiB,GAAG;AAG5E,MAAI,CAAC,gBAAgB,SACnB,OAAM,KAAK,iBAAiB,YAAY,cAAc,iBAAiB,sBAAsB,KAAK;AAGpG,MAAI,kBAAkB,wBAAwB,KAAK,wBAAwB,uBAAuB;GAOhG,MAAM,UACJ,gBAAgB,YAAY,gBAAgB,oBAAoB,mBAAmB,CAAC,WAAW,IAC3F,MAAM,KAAK,eAAe,WAAW,aAAa,GAClD;GAEN,MAAM,EAAE,uBAAY,MAAM,KAAK,kBAAkB,eAC/C,cACA,kBACA,iBACA,QACD;AACD,UAAO,IAAI,8BAA8BA,WAAS;IAChD;IACA,YAAY;IACZ,WAAW;IACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionResponseHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionResponseHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommConnectionResponseHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionResponseHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAYa,gCAAA,YAA4C;;;EAA5C,QAAA,kBAAA;EAAiC,QAAA,uBAAA;mBAMpB,EAAA,CAAA,OAAA,gCAAA,CAAA,EAAA;aAGH,CAAA,iBAAA,EAAA,wBAAA,EAAA,gBAAA,EACD,uBADC,EAAA,kBAAA,EAEC,kBAFD,EAAA,uBAAA,EAGM,8BAHN;QACD,CAAA,cAAA,EAUgB,mCAVhB,CAUoD,gCAVpD,CAAA,CAAA,EAUqF,OAVrF,CAUqF,6BAVrF,CAUmD,uBAAA,CAVnD,GAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionResponseHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionResponseHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommConnectionResponseHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionResponseHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAYa,gCAAA,YAA4C;;;EAA5C,QAAA,kBAAA;EAAiC,QAAA,uBAAA;mBAMpB,EAAA,CAAA,OAAA,gCAAA,CAAA,EAAA;aAGH,CAAA,iBAAA,EAAA,wBAAA,EAAA,gBAAA,EACD,uBADC,EAAA,kBAAA,EAEC,kBAFD,EAAA,uBAAA,EAGM,8BAHN;QACD,CAAA,cAAA,EAUgB,mCAVhB,CAUoD,gCAVpD,CAAA,CAAA,EAUqF,OAVrF,CAUqF,6BAVrF,CAUmD,uBAAA,CAVnD,GAAA,SAAA,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.js');
|
|
2
|
+
const require_DidCommDidExchangeRole = require('../models/DidCommDidExchangeRole.js');
|
|
3
|
+
require('../models/index.js');
|
|
2
4
|
const require_TransportDecorator = require('../../../decorators/transport/TransportDecorator.js');
|
|
3
5
|
const require_DidCommOutboundMessageContext = require('../../../models/DidCommOutboundMessageContext.js');
|
|
4
6
|
require('../../../models/index.js');
|
|
5
|
-
const
|
|
6
|
-
require('../models/index.js');
|
|
7
|
+
const require_DidCommOutOfBandState = require('../../oob/domain/DidCommOutOfBandState.js');
|
|
7
8
|
const require_DidCommConnectionResponseMessage = require('../messages/DidCommConnectionResponseMessage.js');
|
|
8
9
|
require('../messages/index.js');
|
|
9
|
-
const require_DidCommOutOfBandState = require('../../oob/domain/DidCommOutOfBandState.js');
|
|
10
10
|
let __credo_ts_core = require("@credo-ts/core");
|
|
11
11
|
__credo_ts_core = require_rolldown_runtime.__toESM(__credo_ts_core);
|
|
12
12
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { DidCommDidExchangeRole } from "../models/DidCommDidExchangeRole.mjs";
|
|
2
|
+
import "../models/index.mjs";
|
|
1
3
|
import { ReturnRouteTypes } from "../../../decorators/transport/TransportDecorator.mjs";
|
|
2
4
|
import { DidCommOutboundMessageContext } from "../../../models/DidCommOutboundMessageContext.mjs";
|
|
3
5
|
import "../../../models/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import "../models/index.mjs";
|
|
6
|
+
import { DidCommOutOfBandState } from "../../oob/domain/DidCommOutOfBandState.mjs";
|
|
6
7
|
import { DidCommConnectionResponseMessage } from "../messages/DidCommConnectionResponseMessage.mjs";
|
|
7
8
|
import "../messages/index.mjs";
|
|
8
|
-
import { DidCommOutOfBandState } from "../../oob/domain/DidCommOutOfBandState.mjs";
|
|
9
9
|
import { CredoError } from "@credo-ts/core";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/connections/handlers/DidCommConnectionResponseHandler.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommConnectionResponseHandler.mjs","names":["message"],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionResponseHandler.ts"],"sourcesContent":["import type { DidResolverService } from '@credo-ts/core'\nimport
|
|
1
|
+
{"version":3,"file":"DidCommConnectionResponseHandler.mjs","names":["message"],"sources":["../../../../src/modules/connections/handlers/DidCommConnectionResponseHandler.ts"],"sourcesContent":["import type { DidResolverService } from '@credo-ts/core'\nimport { CredoError } from '@credo-ts/core'\nimport { ReturnRouteTypes } from '../../../decorators/transport/TransportDecorator'\nimport type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../handlers'\nimport { DidCommOutboundMessageContext } from '../../../models'\nimport type { DidCommOutOfBandService } from '../../oob/DidCommOutOfBandService'\nimport { DidCommOutOfBandState } from '../../oob/domain/DidCommOutOfBandState'\nimport type { DidCommConnectionsModuleConfig } from '../DidCommConnectionsModuleConfig'\nimport { DidCommConnectionResponseMessage } from '../messages'\nimport { DidCommDidExchangeRole } from '../models'\nimport type { DidCommConnectionService } from '../services'\n\nexport class DidCommConnectionResponseHandler implements DidCommMessageHandler {\n private connectionService: DidCommConnectionService\n private outOfBandService: DidCommOutOfBandService\n private didResolverService: DidResolverService\n private connectionsModuleConfig: DidCommConnectionsModuleConfig\n\n public supportedMessages = [DidCommConnectionResponseMessage]\n\n public constructor(\n connectionService: DidCommConnectionService,\n outOfBandService: DidCommOutOfBandService,\n didResolverService: DidResolverService,\n connectionsModuleConfig: DidCommConnectionsModuleConfig\n ) {\n this.connectionService = connectionService\n this.outOfBandService = outOfBandService\n this.didResolverService = didResolverService\n this.connectionsModuleConfig = connectionsModuleConfig\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommConnectionResponseHandler>) {\n const { recipientKey, senderKey, message } = messageContext\n\n if (!recipientKey || !senderKey) {\n throw new CredoError('Unable to process connection response without senderKey or recipientKey')\n }\n\n // Query by both role and thread id to allow connecting to self\n const connectionRecord = await this.connectionService.getByRoleAndThreadId(\n messageContext.agentContext,\n DidCommDidExchangeRole.Requester,\n message.threadId\n )\n if (!connectionRecord) {\n throw new CredoError(`Connection for thread ID ${message.threadId} not found!`)\n }\n\n if (!connectionRecord.did) {\n throw new CredoError(`Connection record ${connectionRecord.id} has no 'did'`)\n }\n\n const ourDidDocument = await this.didResolverService.resolveDidDocument(\n messageContext.agentContext,\n connectionRecord.did\n )\n if (!ourDidDocument) {\n throw new CredoError(`Did document for did ${connectionRecord.did} was not resolved!`)\n }\n\n // Validate if recipient key is included in recipient keys of the did document resolved by\n // connection record did\n if (!ourDidDocument.recipientKeys.find((key) => key.fingerprint === recipientKey.fingerprint)) {\n throw new CredoError(`Recipient key ${recipientKey.fingerprint} not found in did document recipient keys.`)\n }\n\n const outOfBandRecord =\n connectionRecord.outOfBandId &&\n (await this.outOfBandService.findById(messageContext.agentContext, connectionRecord.outOfBandId))\n\n if (!outOfBandRecord) {\n throw new CredoError(`Out-of-band record ${connectionRecord.outOfBandId} was not found.`)\n }\n\n messageContext.connection = connectionRecord\n const connection = await this.connectionService.processResponse(messageContext, outOfBandRecord)\n\n if (!outOfBandRecord.reusable) {\n await this.outOfBandService.updateState(messageContext.agentContext, outOfBandRecord, DidCommOutOfBandState.Done)\n }\n\n // TODO: should we only send ping message in case of autoAcceptConnection or always?\n // In AATH we have a separate step to send the ping. So for now we'll only do it\n // if auto accept is enable\n if (connection.autoAcceptConnection ?? this.connectionsModuleConfig.autoAcceptConnections) {\n const { message } = await this.connectionService.createTrustPing(messageContext.agentContext, connection, {\n responseRequested: false,\n })\n\n // Disable return routing as we don't want to receive a response for this message over the same channel\n // This has led to long timeouts as not all clients actually close an http socket if there is no response message\n message.setReturnRouting(ReturnRouteTypes.none)\n\n return new DidCommOutboundMessageContext(message, { agentContext: messageContext.agentContext, connection })\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAYA,IAAa,mCAAb,MAA+E;CAQ7E,AAAO,YACL,mBACA,kBACA,oBACA,yBACA;OAPK,oBAAoB,CAAC,iCAAiC;AAQ3D,OAAK,oBAAoB;AACzB,OAAK,mBAAmB;AACxB,OAAK,qBAAqB;AAC1B,OAAK,0BAA0B;;CAGjC,MAAa,OAAO,gBAAuF;EACzG,MAAM,EAAE,cAAc,WAAW,YAAY;AAE7C,MAAI,CAAC,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"sources":["../../../../src/modules/connections/handlers/DidCommDidExchangeCompleteHandler.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommDidExchangeCompleteHandler.d.mts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommDidExchangeCompleteHandler.ts"],"sourcesContent":[],"mappings":";;;;;;cAOa,iCAAA,YAA6C;;EAA7C,QAAA,gBAAA;EAAkC,iBAAA,EAAA,CAAA,OAGrB,iCAHqB,CAAA,EAAA;aAGrB,CAAA,mBAAA,EAEgB,mBAFhB,EAAA,gBAAA,EAEuD,uBAFvD;QAEgB,CAAA,cAAA,EAKJ,mCALI,CAKgC,iCALhC,CAAA,CAAA,EAKkE,OALlE,CAAA,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommDidExchangeCompleteHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommDidExchangeCompleteHandler.ts"],"sourcesContent":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommDidExchangeCompleteHandler.d.ts","names":[],"sources":["../../../../src/modules/connections/handlers/DidCommDidExchangeCompleteHandler.ts"],"sourcesContent":[],"mappings":";;;;;;cAOa,iCAAA,YAA6C;;EAA7C,QAAA,gBAAA;EAAkC,iBAAA,EAAA,CAAA,OAGrB,iCAHqB,CAAA,EAAA;aAGrB,CAAA,mBAAA,EAEgB,mBAFhB,EAAA,gBAAA,EAEuD,uBAFvD;QAEgB,CAAA,cAAA,EAKJ,mCALI,CAKgC,iCALhC,CAAA,CAAA,EAKkE,OALlE,CAAA,SAAA,CAAA"}
|