@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":"DidCommCredentialV2Protocol.mjs","names":["formatData: GetCredentialFormatDataReturn","messageFormatData: CredentialFormatDataMessagePayload"],"sources":["../../../../../src/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport type { DidCommFeatureRegistry } from '../../../../DidCommFeatureRegistry'\nimport type { DidCommMessage } from '../../../../DidCommMessage'\nimport type { DidCommMessageHandlerRegistry } from '../../../../DidCommMessageHandlerRegistry'\nimport type { DidCommMessageHandlerInboundMessage } from '../../../../handlers'\nimport type { DidCommProblemReportMessage } from '../../../../messages'\nimport type { DidCommInboundMessageContext } from '../../../../models'\nimport type {\n DidCommCredentialFormat,\n DidCommCredentialFormatPayload,\n DidCommCredentialFormatService,\n ExtractCredentialFormats,\n} from '../../formats'\nimport type { DidCommCredentialFormatSpec } from '../../models/DidCommCredentialFormatSpec'\nimport type { DidCommCredentialProtocol } from '../DidCommCredentialProtocol'\nimport type {\n AcceptCredentialOfferOptions,\n AcceptCredentialOptions,\n AcceptCredentialProposalOptions,\n AcceptCredentialRequestOptions,\n CreateCredentialOfferOptions,\n CreateCredentialProblemReportOptions,\n CreateCredentialProposalOptions,\n CreateCredentialRequestOptions,\n CredentialFormatDataMessagePayload,\n CredentialProtocolMsgReturnType,\n GetCredentialFormatDataReturn,\n NegotiateCredentialOfferOptions,\n NegotiateCredentialProposalOptions,\n} from '../DidCommCredentialProtocolOptions'\n\nimport { CredoError, utils } from '@credo-ts/core'\n\nimport { AckStatus } from '../../../../messages'\nimport { DidCommProtocol } from '../../../../models'\nimport { DidCommMessageRepository, DidCommMessageRole } from '../../../../repository'\nimport { DidCommConnectionService } from '../../../connections'\nimport { DidCommCredentialsModuleConfig } from '../../DidCommCredentialsModuleConfig'\nimport {\n DidCommAutoAcceptCredential,\n DidCommCredentialProblemReportReason,\n DidCommCredentialRole,\n DidCommCredentialState,\n} from '../../models'\nimport { DidCommCredentialExchangeRecord, DidCommCredentialExchangeRepository } from '../../repository'\nimport { composeAutoAccept } from '../../util/composeAutoAccept'\nimport { arePreviewAttributesEqual } from '../../util/previewAttributes'\nimport { DidCommBaseCredentialProtocol } from '../DidCommBaseCredentialProtocol'\n\nimport { DidCommCredentialFormatCoordinator } from './DidCommCredentialFormatCoordinator'\nimport {\n DidCommCredentialV2AckHandler,\n DidCommIssueCredentialV2Handler,\n DidCommOfferCredentialV2Handler,\n DidCommProposeCredentialV2Handler,\n DidCommRequestCredentialV2Handler,\n} from './handlers'\nimport { DidCommCredentialV2ProblemReportHandler } from './handlers/DidCommCredentialV2ProblemReportHandler'\nimport {\n DidCommCredentialV2AckMessage,\n DidCommCredentialV2ProblemReportMessage,\n DidCommIssueCredentialV2Message,\n DidCommOfferCredentialV2Message,\n DidCommProposeCredentialV2Message,\n DidCommRequestCredentialV2Message,\n} from './messages'\n\nexport interface DidCommCredentialV2ProtocolConfig<CredentialFormatServices extends DidCommCredentialFormatService[]> {\n credentialFormats: CredentialFormatServices\n}\n\nexport class DidCommCredentialV2Protocol<\n CFs extends DidCommCredentialFormatService[] = DidCommCredentialFormatService[],\n >\n extends DidCommBaseCredentialProtocol<CFs>\n implements DidCommCredentialProtocol<CFs>\n{\n private credentialFormatCoordinator = new DidCommCredentialFormatCoordinator<CFs>()\n private credentialFormats: CFs\n\n public constructor({ credentialFormats }: DidCommCredentialV2ProtocolConfig<CFs>) {\n super()\n\n this.credentialFormats = credentialFormats\n }\n\n /**\n * The version of the issue credential protocol this service supports\n */\n public readonly version = 'v2' as const\n\n /**\n * Registers the protocol implementation (handlers, feature registry) on the agent.\n */\n public register(messageHandlerRegistry: DidCommMessageHandlerRegistry, featureRegistry: DidCommFeatureRegistry) {\n // Register message handlers for the Issue Credential V2 Protocol\n messageHandlerRegistry.registerMessageHandlers([\n new DidCommProposeCredentialV2Handler(this),\n new DidCommOfferCredentialV2Handler(this),\n new DidCommRequestCredentialV2Handler(this),\n new DidCommIssueCredentialV2Handler(this),\n new DidCommCredentialV2AckHandler(this),\n new DidCommCredentialV2ProblemReportHandler(this),\n ])\n\n // Register Issue Credential V2 in feature registry, with supported roles\n featureRegistry.register(\n new DidCommProtocol({\n id: 'https://didcomm.org/issue-credential/2.0',\n roles: ['holder', 'issuer'],\n })\n )\n }\n\n /**\n * Create a {@link DidCommProposeCredentialV2Message} not bound to an existing credential exchange.\n *\n * @param proposal The ProposeCredentialOptions object containing the important fields for the credential message\n * @returns Object containing proposal message and associated credential record\n *\n */\n public async createProposal(\n agentContext: AgentContext,\n {\n connectionRecord,\n credentialFormats,\n comment,\n goal,\n goalCode,\n autoAcceptCredential,\n }: CreateCredentialProposalOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommMessage>> {\n agentContext.config.logger.debug('Get the Format Service and Create Proposal Message')\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create proposal. No supported formats')\n }\n\n const credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connectionRecord.id,\n threadId: utils.uuid(),\n state: DidCommCredentialState.ProposalSent,\n role: DidCommCredentialRole.Holder,\n autoAcceptCredential,\n protocolVersion: 'v2',\n })\n\n const proposalMessage = await this.credentialFormatCoordinator.createProposal(agentContext, {\n credentialFormats,\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n })\n\n agentContext.config.logger.debug('Save record and emit state change event')\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message: proposalMessage }\n }\n\n /**\n * Method called by {@link DidCommProposeCredentialV2Handler} on reception of a propose credential message\n * We do the necessary processing here to accept the proposal and do the state change, emit event etc.\n * @param messageContext the inbound propose credential message\n * @returns credential record appropriate for this incoming message (once accepted)\n */\n public async processProposal(\n messageContext: DidCommInboundMessageContext<DidCommProposeCredentialV2Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: proposalMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential proposal with id ${proposalMessage.id}`)\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: proposalMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n })\n\n const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process proposal. No supported formats')\n }\n\n // credential record already exists\n if (credentialExchangeRecord) {\n const proposalCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n const offerCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: proposalCredentialMessage ?? undefined,\n lastSentMessage: offerCredentialMessage ?? undefined,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n // This makes sure that the sender of the incoming message is authorized to do so.\n if (!credentialExchangeRecord?.connectionId) {\n await connectionService.matchIncomingMessageToRequestMessageInOutOfBandExchange(messageContext, {\n expectedConnectionId: credentialExchangeRecord?.connectionId,\n })\n\n credentialExchangeRecord.connectionId = connection?.id\n }\n\n await this.credentialFormatCoordinator.processProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: proposalMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.ProposalReceived\n )\n\n return credentialExchangeRecord\n }\n // Assert\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext)\n\n // No credential record exists with thread id\n credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connection?.id,\n threadId: proposalMessage.threadId,\n parentThreadId: proposalMessage.thread?.parentThreadId,\n state: DidCommCredentialState.ProposalReceived,\n role: DidCommCredentialRole.Issuer,\n protocolVersion: 'v2',\n })\n\n await this.credentialFormatCoordinator.processProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: proposalMessage,\n })\n\n // Save record and emit event\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n\n return credentialExchangeRecord\n }\n\n public async acceptProposal(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n }: AcceptCredentialProposalOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommOfferCredentialV2Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalReceived)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // Use empty credentialFormats if not provided to denote all formats should be accepted\n let formatServices = this.getFormatServices(credentialFormats ?? {})\n\n // if no format services could be extracted from the credentialFormats\n // take all available format services from the proposal message\n if (formatServices.length === 0) {\n const proposalMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n formatServices = this.getFormatServicesFromMessage(proposalMessage.formats)\n }\n\n // If the format services list is still empty, throw an error as we don't support any\n // of the formats\n if (formatServices.length === 0) {\n throw new CredoError('Unable to accept proposal. No supported formats provided as input or in proposal message')\n }\n\n const offerMessage = await this.credentialFormatCoordinator.acceptProposal(agentContext, {\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n credentialFormats,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.OfferSent)\n\n return { credentialExchangeRecord, message: offerMessage }\n }\n\n /**\n * Negotiate a credential proposal as issuer (by sending a credential offer message) to the connection\n * associated with the credential record.\n *\n * @param options configuration for the offer see {@link NegotiateCredentialProposalOptions}\n * @returns Credential exchange record associated with the credential offer\n *\n */\n public async negotiateProposal(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n }: NegotiateCredentialProposalOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommOfferCredentialV2Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalReceived)\n\n if (!credentialExchangeRecord.connectionId) {\n throw new CredoError(\n `No connectionId found for credential record '${credentialExchangeRecord.id}'. Connection-less issuance does not support negotiation.`\n )\n }\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create offer. No supported formats')\n }\n\n const offerMessage = await this.credentialFormatCoordinator.createOffer(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.OfferSent)\n\n return { credentialExchangeRecord, message: offerMessage }\n }\n\n /**\n * Create a {@link DidCommOfferCredentialV2Message} as beginning of protocol process. If no connectionId is provided, the\n * exchange will be created without a connection for usage in oob and connection-less issuance.\n *\n * @param formatService {@link DidCommCredentialFormatService} the format service object containing format-specific logic\n * @param options attributes of the original offer\n * @returns Object containing offer message and associated credential record\n *\n */\n public async createOffer(\n agentContext: AgentContext,\n {\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n connectionRecord,\n }: CreateCredentialOfferOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommOfferCredentialV2Message>> {\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create offer. No supported formats')\n }\n\n const credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connectionRecord?.id,\n threadId: utils.uuid(),\n state: DidCommCredentialState.OfferSent,\n role: DidCommCredentialRole.Issuer,\n autoAcceptCredential,\n protocolVersion: 'v2',\n })\n\n const offerMessage = await this.credentialFormatCoordinator.createOffer(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n agentContext.config.logger.debug(\n `Saving record and emitting state changed for credential exchange record ${credentialExchangeRecord.id}`\n )\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message: offerMessage }\n }\n\n /**\n * Method called by {@link DidCommOfferCredentialV2Handler} on reception of a offer credential message\n * We do the necessary processing here to accept the offer and do the state change, emit event etc.\n * @param messageContext the inbound offer credential message\n * @returns credential record appropriate for this incoming message (once accepted)\n */\n public async processOffer(\n messageContext: DidCommMessageHandlerInboundMessage<DidCommOfferCredentialV2Handler>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: offerMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential offer with id ${offerMessage.id}`)\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: offerMessage.threadId,\n role: DidCommCredentialRole.Holder,\n connectionId: connection?.id,\n })\n\n const formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process offer. No supported formats')\n }\n\n // credential record already exists\n if (credentialExchangeRecord) {\n const proposeCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n const offerCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: offerCredentialMessage ?? undefined,\n lastSentMessage: proposeCredentialMessage ?? undefined,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n await this.credentialFormatCoordinator.processOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: offerMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.OfferReceived\n )\n return credentialExchangeRecord\n }\n // Assert\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext)\n\n // No credential record exists with thread id\n agentContext.config.logger.debug('No credential record found for offer, creating a new one')\n credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connection?.id,\n threadId: offerMessage.threadId,\n parentThreadId: offerMessage.thread?.parentThreadId,\n state: DidCommCredentialState.OfferReceived,\n role: DidCommCredentialRole.Holder,\n protocolVersion: 'v2',\n })\n\n await this.credentialFormatCoordinator.processOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: offerMessage,\n })\n\n // Save in repository\n agentContext.config.logger.debug('Saving credential record and emit offer-received event')\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n return credentialExchangeRecord\n }\n\n public async acceptOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n credentialFormats,\n }: AcceptCredentialOfferOptions<CFs>\n ) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferReceived)\n\n // Use empty credentialFormats if not provided to denote all formats should be accepted\n let formatServices = this.getFormatServices(credentialFormats ?? {})\n\n // if no format services could be extracted from the credentialFormats\n // take all available format services from the offer message\n if (formatServices.length === 0) {\n const offerMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n }\n\n // If the format services list is still empty, throw an error as we don't support any\n // of the formats\n if (formatServices.length === 0) {\n throw new CredoError('Unable to accept offer. No supported formats provided as input or in offer message')\n }\n\n const message = await this.credentialFormatCoordinator.acceptOffer(agentContext, {\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n credentialFormats,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.RequestSent)\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Create a {@link ProposePresentationMessage} as response to a received credential offer.\n * To create a proposal not bound to an existing credential exchange, use {@link createProposal}.\n *\n * @param options configuration to use for the proposal\n * @returns Object containing proposal message and associated credential record\n *\n */\n public async negotiateOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n }: NegotiateCredentialOfferOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommProposeCredentialV2Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferReceived)\n\n if (!credentialExchangeRecord.connectionId) {\n throw new CredoError(\n `No connectionId found for credential record '${credentialExchangeRecord.id}'. Connection-less issuance does not support negotiation.`\n )\n }\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create proposal. No supported formats')\n }\n\n const proposalMessage = await this.credentialFormatCoordinator.createProposal(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.ProposalSent)\n\n return { credentialExchangeRecord, message: proposalMessage }\n }\n\n /**\n * Create a {@link DidCommRequestCredentialV2Message} as beginning of protocol process.\n * @returns Object containing offer message and associated credential record\n *\n */\n public async createRequest(\n agentContext: AgentContext,\n {\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n connectionRecord,\n }: CreateCredentialRequestOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommRequestCredentialV2Message>> {\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create request. No supported formats')\n }\n\n const credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connectionRecord.id,\n threadId: utils.uuid(),\n state: DidCommCredentialState.RequestSent,\n role: DidCommCredentialRole.Holder,\n autoAcceptCredential,\n protocolVersion: 'v2',\n })\n\n const requestMessage = await this.credentialFormatCoordinator.createRequest(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n agentContext.config.logger.debug(\n `Saving record and emitting state changed for credential exchange record ${credentialExchangeRecord.id}`\n )\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message: requestMessage }\n }\n\n /**\n * Process a received {@link RequestCredentialMessage}. This will not accept the credential request\n * or send a credential. It will only update the existing credential record with\n * the information from the credential request message. Use {@link createCredential}\n * after calling this method to create a credential.\n *z\n * @param messageContext The message context containing a v2 credential request message\n * @returns credential record associated with the credential request message\n *\n */\n public async processRequest(\n messageContext: DidCommInboundMessageContext<DidCommRequestCredentialV2Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: requestMessage, connection, agentContext } = messageContext\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential request with id ${requestMessage.id}`)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: requestMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n })\n\n const formatServices = this.getFormatServicesFromMessage(requestMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process request. No supported formats')\n }\n\n // credential record already exists\n if (credentialExchangeRecord) {\n const proposalMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n const offerMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: proposalMessage ?? undefined,\n lastSentMessage: offerMessage ?? undefined,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n // This makes sure that the sender of the incoming message is authorized to do so.\n if (!credentialExchangeRecord.connectionId) {\n await connectionService.matchIncomingMessageToRequestMessageInOutOfBandExchange(messageContext, {\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n credentialExchangeRecord.connectionId = connection?.id\n }\n\n await this.credentialFormatCoordinator.processRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: requestMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.RequestReceived\n )\n return credentialExchangeRecord\n }\n // Assert\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext)\n\n // No credential record exists with thread id\n agentContext.config.logger.debug('No credential record found for request, creating a new one')\n credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connection?.id,\n threadId: requestMessage.threadId,\n parentThreadId: requestMessage.thread?.parentThreadId,\n state: DidCommCredentialState.RequestReceived,\n role: DidCommCredentialRole.Issuer,\n protocolVersion: 'v2',\n })\n\n await this.credentialFormatCoordinator.processRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: requestMessage,\n })\n\n // Save in repository\n agentContext.config.logger.debug('Saving credential record and emit request-received event')\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n return credentialExchangeRecord\n }\n\n public async acceptRequest(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n credentialFormats,\n }: AcceptCredentialRequestOptions<CFs>\n ) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.RequestReceived)\n\n // Use empty credentialFormats if not provided to denote all formats should be accepted\n let formatServices = this.getFormatServices(credentialFormats ?? {})\n\n // if no format services could be extracted from the credentialFormats\n // take all available format services from the request message\n if (formatServices.length === 0) {\n const requestMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n formatServices = this.getFormatServicesFromMessage(requestMessage.formats)\n }\n\n // If the format services list is still empty, throw an error as we don't support any\n // of the formats\n if (formatServices.length === 0) {\n throw new CredoError('Unable to accept request. No supported formats provided as input or in request message')\n }\n const message = await this.credentialFormatCoordinator.acceptRequest(agentContext, {\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n credentialFormats,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.CredentialIssued)\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Process a received {@link DidCommIssueCredentialV2Message}. This will not accept the credential\n * or send a credential acknowledgement. It will only update the existing credential record with\n * the information from the issue credential message. Use {@link createAck}\n * after calling this method to create a credential acknowledgement.\n *\n * @param messageContext The message context containing an issue credential message\n *\n * @returns credential record associated with the issue credential message\n *\n */\n public async processCredential(\n messageContext: DidCommInboundMessageContext<DidCommIssueCredentialV2Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: credentialMessage, connection, agentContext } = messageContext\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential with id ${credentialMessage.id}`)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: credentialMessage.threadId,\n role: DidCommCredentialRole.Holder,\n connectionId: connection?.id,\n })\n\n const requestMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n const offerMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.RequestSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: offerMessage ?? undefined,\n lastSentMessage: requestMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n const formatServices = this.getFormatServicesFromMessage(credentialMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process credential. No supported formats')\n }\n\n await this.credentialFormatCoordinator.processCredential(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n requestMessage: requestMessage,\n message: credentialMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.CredentialReceived\n )\n\n return credentialExchangeRecord\n }\n\n /**\n * Create a {@link DidCommCredentialV2AckMessage} as response to a received credential.\n *\n * @param credentialExchangeRecord The credential record for which to create the credential acknowledgement\n * @returns Object containing credential acknowledgement message and associated credential record\n *\n */\n public async acceptCredential(\n agentContext: AgentContext,\n { credentialExchangeRecord }: AcceptCredentialOptions\n ): Promise<CredentialProtocolMsgReturnType<DidCommCredentialV2AckMessage>> {\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.CredentialReceived)\n\n // Create message\n const ackMessage = new DidCommCredentialV2AckMessage({\n status: AckStatus.OK,\n threadId: credentialExchangeRecord.threadId,\n })\n\n ackMessage.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.Done)\n\n return { message: ackMessage, credentialExchangeRecord }\n }\n\n /**\n * Process a received {@link CredentialAckMessage}.\n *\n * @param messageContext The message context containing a credential acknowledgement message\n * @returns credential record associated with the credential acknowledgement message\n *\n */\n public async processAck(\n messageContext: DidCommInboundMessageContext<DidCommCredentialV2AckMessage>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: ackMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential ack with id ${ackMessage.id}`)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: ackMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n connectionId: connection?.id,\n })\n credentialExchangeRecord.connectionId = connection?.id\n\n const requestMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n const credentialMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommIssueCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.CredentialIssued)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: requestMessage,\n lastSentMessage: credentialMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n // Update record\n await this.updateState(messageContext.agentContext, credentialExchangeRecord, DidCommCredentialState.Done)\n\n return credentialExchangeRecord\n }\n\n /**\n * Create a {@link DidCommCredentialV2ProblemReportMessage} to be sent.\n *\n * @param message message to send\n * @returns a {@link DidCommCredentialV2ProblemReportMessage}\n *\n */\n public async createProblemReport(\n _agentContext: AgentContext,\n { credentialExchangeRecord, description }: CreateCredentialProblemReportOptions\n ): Promise<CredentialProtocolMsgReturnType<DidCommProblemReportMessage>> {\n const message = new DidCommCredentialV2ProblemReportMessage({\n description: {\n en: description,\n code: DidCommCredentialProblemReportReason.IssuanceAbandoned,\n },\n })\n\n message.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n return { credentialExchangeRecord, message }\n }\n\n // AUTO ACCEPT METHODS\n public async shouldAutoRespondToProposal(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n proposalMessage: DidCommProposeCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, proposalMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n if (!offerMessage) return false\n\n // NOTE: we take the formats from the offerMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the proposal, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n\n const proposalAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToProposal(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n proposalAttachment,\n })\n // If any of the formats return false, we should not auto accept\n if (!shouldAutoRespondToFormat) return false\n }\n\n // not all formats use the proposal and preview, we only check if they're present on\n // either or both of the messages\n if (proposalMessage.credentialPreview || offerMessage.credentialPreview) {\n // if one of the message doesn't have a preview, we should not auto accept\n if (!proposalMessage.credentialPreview || !offerMessage.credentialPreview) return false\n\n // Check if preview values match\n return arePreviewAttributesEqual(\n proposalMessage.credentialPreview.attributes,\n offerMessage.credentialPreview.attributes\n )\n }\n\n return true\n }\n\n public async shouldAutoRespondToOffer(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n offerMessage: DidCommOfferCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, offerMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const proposalMessage = await this.findProposalMessage(agentContext, credentialExchangeRecord.id)\n if (!proposalMessage) return false\n\n // NOTE: we take the formats from the proposalMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the offer, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n\n const proposalAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToOffer(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n proposalAttachment,\n })\n\n // If any of the formats return false, we should not auto accept\n\n if (!shouldAutoRespondToFormat) return false\n }\n\n // if one of the message doesn't have a preview, we should not auto accept\n if (proposalMessage.credentialPreview || offerMessage.credentialPreview) {\n // Check if preview values match\n return arePreviewAttributesEqual(\n proposalMessage.credentialPreview?.attributes ?? [],\n offerMessage.credentialPreview?.attributes ?? []\n )\n }\n return true\n }\n\n public async shouldAutoRespondToRequest(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n requestMessage: DidCommRequestCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, requestMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const proposalMessage = await this.findProposalMessage(agentContext, credentialExchangeRecord.id)\n\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n if (!offerMessage) return false\n\n // NOTE: we take the formats from the offerMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the request, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n\n const proposalAttachment = proposalMessage\n ? this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n : undefined\n\n const requestAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n requestMessage.formats,\n requestMessage.requestAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToRequest(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n requestAttachment,\n proposalAttachment,\n })\n\n // If any of the formats return false, we should not auto accept\n if (!shouldAutoRespondToFormat) return false\n }\n\n return true\n }\n\n public async shouldAutoRespondToCredential(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n credentialMessage: DidCommIssueCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, credentialMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const proposalMessage = await this.findProposalMessage(agentContext, credentialExchangeRecord.id)\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n\n const requestMessage = await this.findRequestMessage(agentContext, credentialExchangeRecord.id)\n if (!requestMessage) return false\n\n // NOTE: we take the formats from the requestMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the credential, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(requestMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = offerMessage\n ? this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n : undefined\n\n const proposalAttachment = proposalMessage\n ? this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n : undefined\n\n const requestAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n requestMessage.formats,\n requestMessage.requestAttachments\n )\n\n const credentialAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n credentialMessage.formats,\n credentialMessage.credentialAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToCredential(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n credentialAttachment,\n requestAttachment,\n proposalAttachment,\n })\n\n // If any of the formats return false, we should not auto accept\n if (!shouldAutoRespondToFormat) return false\n }\n return true\n }\n\n public async findProposalMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommProposeCredentialV2Message,\n })\n }\n\n public async findOfferMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommOfferCredentialV2Message,\n })\n }\n\n public async findRequestMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommRequestCredentialV2Message,\n })\n }\n\n public async findCredentialMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommIssueCredentialV2Message,\n })\n }\n\n public async getFormatData(\n agentContext: AgentContext,\n credentialExchangeId: string\n ): Promise<GetCredentialFormatDataReturn<ExtractCredentialFormats<CFs>>> {\n // TODO: we could looking at fetching all record using a single query and then filtering based on the type of the message.\n const [proposalMessage, offerMessage, requestMessage, credentialMessage] = await Promise.all([\n this.findProposalMessage(agentContext, credentialExchangeId),\n this.findOfferMessage(agentContext, credentialExchangeId),\n this.findRequestMessage(agentContext, credentialExchangeId),\n this.findCredentialMessage(agentContext, credentialExchangeId),\n ])\n\n // Create object with the keys and the message formats/attachments. We can then loop over this in a generic\n // way so we don't have to add the same operation code four times\n const messages = {\n proposal: [proposalMessage?.formats, proposalMessage?.proposalAttachments],\n offer: [offerMessage?.formats, offerMessage?.offerAttachments],\n request: [requestMessage?.formats, requestMessage?.requestAttachments],\n credential: [credentialMessage?.formats, credentialMessage?.credentialAttachments],\n } as const\n\n const formatData: GetCredentialFormatDataReturn = {\n proposalAttributes: proposalMessage?.credentialPreview?.attributes,\n offerAttributes: offerMessage?.credentialPreview?.attributes,\n }\n\n // We loop through all of the message keys as defined above\n for (const [messageKey, [formats, attachments]] of Object.entries(messages)) {\n // Message can be undefined, so we continue if it is not defined\n if (!formats || !attachments) continue\n\n // Find all format services associated with the message\n const formatServices = this.getFormatServicesFromMessage(formats)\n const messageFormatData: CredentialFormatDataMessagePayload = {}\n\n // Loop through all of the format services, for each we will extract the attachment data and assign this to the object\n // using the unique format key (e.g. indy)\n for (const formatService of formatServices) {\n const attachment = this.credentialFormatCoordinator.getAttachmentForService(formatService, formats, attachments)\n\n messageFormatData[formatService.formatKey] = attachment.getDataAsJson()\n }\n\n formatData[messageKey as Exclude<keyof GetCredentialFormatDataReturn, 'proposalAttributes' | 'offerAttributes'>] =\n messageFormatData\n }\n\n return formatData\n }\n\n /**\n * Get all the format service objects for a given credential format from an incoming message\n * @param messageFormats the format objects containing the format name (eg indy)\n * @return the credential format service objects in an array - derived from format object keys\n */\n private getFormatServicesFromMessage(\n messageFormats: DidCommCredentialFormatSpec[]\n ): DidCommCredentialFormatService[] {\n const formatServices = new Set<DidCommCredentialFormatService>()\n\n for (const msg of messageFormats) {\n const service = this.getFormatServiceForFormat(msg.format)\n if (service) formatServices.add(service)\n }\n\n return Array.from(formatServices)\n }\n\n /**\n * Get all the format service objects for a given credential format\n * @param credentialFormats the format object containing various optional parameters\n * @return the credential format service objects in an array - derived from format object keys\n */\n private getFormatServices<M extends keyof DidCommCredentialFormat['credentialFormats']>(\n credentialFormats: DidCommCredentialFormatPayload<ExtractCredentialFormats<CFs>, M>\n ): DidCommCredentialFormatService[] {\n const formats = new Set<DidCommCredentialFormatService>()\n\n for (const formatKey of Object.keys(credentialFormats)) {\n const formatService = this.getFormatServiceForFormatKey(formatKey)\n\n if (formatService) formats.add(formatService)\n }\n\n return Array.from(formats)\n }\n\n private getFormatServiceForFormatKey(formatKey: string): DidCommCredentialFormatService | null {\n const formatService = this.credentialFormats.find((credentialFormat) => credentialFormat.formatKey === formatKey)\n\n return formatService ?? null\n }\n\n private getFormatServiceForFormat(format: string): DidCommCredentialFormatService | null {\n const formatService = this.credentialFormats.find((credentialFormat) => credentialFormat.supportsFormat(format))\n\n return formatService ?? null\n }\n\n protected getFormatServiceForRecordType(credentialRecordType: string) {\n const formatService = this.credentialFormats.find(\n (credentialFormat) => credentialFormat.credentialRecordType === credentialRecordType\n )\n\n if (!formatService) {\n throw new CredoError(\n `No format service found for credential record type ${credentialRecordType} in v2 credential protocol`\n )\n }\n\n return formatService\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,IAAa,8BAAb,cAGU,8BAEV;CAIE,AAAO,YAAY,EAAE,qBAA6D;AAChF,SAAO;OAJD,8BAA8B,IAAI,oCAAyC;OAYnE,UAAU;AANxB,OAAK,oBAAoB;;;;;CAW3B,AAAO,SAAS,wBAAuD,iBAAyC;AAE9G,yBAAuB,wBAAwB;GAC7C,IAAI,kCAAkC,KAAK;GAC3C,IAAI,gCAAgC,KAAK;GACzC,IAAI,kCAAkC,KAAK;GAC3C,IAAI,gCAAgC,KAAK;GACzC,IAAI,8BAA8B,KAAK;GACvC,IAAI,wCAAwC,KAAK;GAClD,CAAC;AAGF,kBAAgB,SACd,IAAI,gBAAgB;GAClB,IAAI;GACJ,OAAO,CAAC,UAAU,SAAS;GAC5B,CAAC,CACH;;;;;;;;;CAUH,MAAa,eACX,cACA,EACE,kBACA,mBACA,SACA,MACA,UACA,wBAEwD;AAC1D,eAAa,OAAO,OAAO,MAAM,qDAAqD;EAEtF,MAAM,uBAAuB,aAAa,kBAAkB,QAAQ,oCAAoC;EAExG,MAAM,iBAAiB,KAAK,kBAAkB,kBAAkB;AAChE,MAAI,eAAe,WAAW,EAC5B,OAAM,IAAI,WAAW,kDAAkD;EAGzE,MAAM,2BAA2B,IAAI,gCAAgC;GACnE,cAAc,iBAAiB;GAC/B,UAAU,MAAM,MAAM;GACtB,OAAO,uBAAuB;GAC9B,MAAM,sBAAsB;GAC5B;GACA,iBAAiB;GAClB,CAAC;EAEF,MAAM,kBAAkB,MAAM,KAAK,4BAA4B,eAAe,cAAc;GAC1F;GACA;GACA;GACA;GACA;GACA;GACD,CAAC;AAEF,eAAa,OAAO,OAAO,MAAM,0CAA0C;AAC3E,QAAM,qBAAqB,KAAK,cAAc,yBAAyB;AACvE,OAAK,sBAAsB,cAAc,0BAA0B,KAAK;AAExE,SAAO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EAClC,MAAM,0BAAU,IAAI,KAAqC;AAEzD,OAAK,MAAM,aAAa,OAAO,KAAK,kBAAkB,EAAE;GACtD,MAAM,gBAAgB,KAAK,6BAA6B,UAAU;AAElE,OAAI,cAAe,SAAQ,IAAI,cAAc;;AAG/C,SAAO,MAAM,KAAK,QAAQ;;CAG5B,AAAQ,6BAA6B,WAA0D;AAG7F,SAFsB,KAAK,kBAAkB,MAAM,qBAAqB,iBAAiB,cAAc,UAAU,IAEzF;;CAG1B,AAAQ,0BAA0B,QAAuD;AAGvF,SAFsB,KAAK,kBAAkB,MAAM,qBAAqB,iBAAiB,eAAe,OAAO,CAAC,IAExF;;CAG1B,AAAU,8BAA8B,sBAA8B;EACpE,MAAM,gBAAgB,KAAK,kBAAkB,MAC1C,qBAAqB,iBAAiB,yBAAyB,qBACjE;AAED,MAAI,CAAC,cACH,OAAM,IAAI,WACR,sDAAsD,qBAAqB,4BAC5E;AAGH,SAAO"}
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV2Protocol.mjs","names":["formatData: GetCredentialFormatDataReturn","messageFormatData: CredentialFormatDataMessagePayload"],"sources":["../../../../../src/modules/credentials/protocol/v2/DidCommCredentialV2Protocol.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport { CredoError, utils } from '@credo-ts/core'\nimport type { DidCommFeatureRegistry } from '../../../../DidCommFeatureRegistry'\nimport type { DidCommMessage } from '../../../../DidCommMessage'\nimport type { DidCommMessageHandlerRegistry } from '../../../../DidCommMessageHandlerRegistry'\nimport type { DidCommMessageHandlerInboundMessage } from '../../../../handlers'\nimport type { DidCommProblemReportMessage } from '../../../../messages'\nimport { AckStatus } from '../../../../messages'\nimport type { DidCommInboundMessageContext } from '../../../../models'\nimport { DidCommProtocol } from '../../../../models'\nimport { DidCommMessageRepository, DidCommMessageRole } from '../../../../repository'\nimport { DidCommConnectionService } from '../../../connections'\nimport { DidCommCredentialsModuleConfig } from '../../DidCommCredentialsModuleConfig'\nimport type {\n DidCommCredentialFormat,\n DidCommCredentialFormatPayload,\n DidCommCredentialFormatService,\n ExtractCredentialFormats,\n} from '../../formats'\nimport {\n DidCommAutoAcceptCredential,\n DidCommCredentialProblemReportReason,\n DidCommCredentialRole,\n DidCommCredentialState,\n} from '../../models'\nimport type { DidCommCredentialFormatSpec } from '../../models/DidCommCredentialFormatSpec'\nimport { DidCommCredentialExchangeRecord, DidCommCredentialExchangeRepository } from '../../repository'\nimport { composeAutoAccept } from '../../util/composeAutoAccept'\nimport { arePreviewAttributesEqual } from '../../util/previewAttributes'\nimport { DidCommBaseCredentialProtocol } from '../DidCommBaseCredentialProtocol'\nimport type { DidCommCredentialProtocol } from '../DidCommCredentialProtocol'\nimport type {\n AcceptCredentialOfferOptions,\n AcceptCredentialOptions,\n AcceptCredentialProposalOptions,\n AcceptCredentialRequestOptions,\n CreateCredentialOfferOptions,\n CreateCredentialProblemReportOptions,\n CreateCredentialProposalOptions,\n CreateCredentialRequestOptions,\n CredentialFormatDataMessagePayload,\n CredentialProtocolMsgReturnType,\n GetCredentialFormatDataReturn,\n NegotiateCredentialOfferOptions,\n NegotiateCredentialProposalOptions,\n} from '../DidCommCredentialProtocolOptions'\n\nimport { DidCommCredentialFormatCoordinator } from './DidCommCredentialFormatCoordinator'\nimport {\n DidCommCredentialV2AckHandler,\n DidCommIssueCredentialV2Handler,\n DidCommOfferCredentialV2Handler,\n DidCommProposeCredentialV2Handler,\n DidCommRequestCredentialV2Handler,\n} from './handlers'\nimport { DidCommCredentialV2ProblemReportHandler } from './handlers/DidCommCredentialV2ProblemReportHandler'\nimport {\n DidCommCredentialV2AckMessage,\n DidCommCredentialV2ProblemReportMessage,\n DidCommIssueCredentialV2Message,\n DidCommOfferCredentialV2Message,\n DidCommProposeCredentialV2Message,\n DidCommRequestCredentialV2Message,\n} from './messages'\n\nexport interface DidCommCredentialV2ProtocolConfig<CredentialFormatServices extends DidCommCredentialFormatService[]> {\n credentialFormats: CredentialFormatServices\n}\n\nexport class DidCommCredentialV2Protocol<\n CFs extends DidCommCredentialFormatService[] = DidCommCredentialFormatService[],\n >\n extends DidCommBaseCredentialProtocol<CFs>\n implements DidCommCredentialProtocol<CFs>\n{\n private credentialFormatCoordinator = new DidCommCredentialFormatCoordinator<CFs>()\n private credentialFormats: CFs\n\n public constructor({ credentialFormats }: DidCommCredentialV2ProtocolConfig<CFs>) {\n super()\n\n this.credentialFormats = credentialFormats\n }\n\n /**\n * The version of the issue credential protocol this service supports\n */\n public readonly version = 'v2' as const\n\n /**\n * Registers the protocol implementation (handlers, feature registry) on the agent.\n */\n public register(messageHandlerRegistry: DidCommMessageHandlerRegistry, featureRegistry: DidCommFeatureRegistry) {\n // Register message handlers for the Issue Credential V2 Protocol\n messageHandlerRegistry.registerMessageHandlers([\n new DidCommProposeCredentialV2Handler(this),\n new DidCommOfferCredentialV2Handler(this),\n new DidCommRequestCredentialV2Handler(this),\n new DidCommIssueCredentialV2Handler(this),\n new DidCommCredentialV2AckHandler(this),\n new DidCommCredentialV2ProblemReportHandler(this),\n ])\n\n // Register Issue Credential V2 in feature registry, with supported roles\n featureRegistry.register(\n new DidCommProtocol({\n id: 'https://didcomm.org/issue-credential/2.0',\n roles: ['holder', 'issuer'],\n })\n )\n }\n\n /**\n * Create a {@link DidCommProposeCredentialV2Message} not bound to an existing credential exchange.\n *\n * @param proposal The ProposeCredentialOptions object containing the important fields for the credential message\n * @returns Object containing proposal message and associated credential record\n *\n */\n public async createProposal(\n agentContext: AgentContext,\n {\n connectionRecord,\n credentialFormats,\n comment,\n goal,\n goalCode,\n autoAcceptCredential,\n }: CreateCredentialProposalOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommMessage>> {\n agentContext.config.logger.debug('Get the Format Service and Create Proposal Message')\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create proposal. No supported formats')\n }\n\n const credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connectionRecord.id,\n threadId: utils.uuid(),\n state: DidCommCredentialState.ProposalSent,\n role: DidCommCredentialRole.Holder,\n autoAcceptCredential,\n protocolVersion: 'v2',\n })\n\n const proposalMessage = await this.credentialFormatCoordinator.createProposal(agentContext, {\n credentialFormats,\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n })\n\n agentContext.config.logger.debug('Save record and emit state change event')\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message: proposalMessage }\n }\n\n /**\n * Method called by {@link DidCommProposeCredentialV2Handler} on reception of a propose credential message\n * We do the necessary processing here to accept the proposal and do the state change, emit event etc.\n * @param messageContext the inbound propose credential message\n * @returns credential record appropriate for this incoming message (once accepted)\n */\n public async processProposal(\n messageContext: DidCommInboundMessageContext<DidCommProposeCredentialV2Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: proposalMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential proposal with id ${proposalMessage.id}`)\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: proposalMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n })\n\n const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process proposal. No supported formats')\n }\n\n // credential record already exists\n if (credentialExchangeRecord) {\n const proposalCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n const offerCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: proposalCredentialMessage ?? undefined,\n lastSentMessage: offerCredentialMessage ?? undefined,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n // This makes sure that the sender of the incoming message is authorized to do so.\n if (!credentialExchangeRecord?.connectionId) {\n await connectionService.matchIncomingMessageToRequestMessageInOutOfBandExchange(messageContext, {\n expectedConnectionId: credentialExchangeRecord?.connectionId,\n })\n\n credentialExchangeRecord.connectionId = connection?.id\n }\n\n await this.credentialFormatCoordinator.processProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: proposalMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.ProposalReceived\n )\n\n return credentialExchangeRecord\n }\n // Assert\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext)\n\n // No credential record exists with thread id\n credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connection?.id,\n threadId: proposalMessage.threadId,\n parentThreadId: proposalMessage.thread?.parentThreadId,\n state: DidCommCredentialState.ProposalReceived,\n role: DidCommCredentialRole.Issuer,\n protocolVersion: 'v2',\n })\n\n await this.credentialFormatCoordinator.processProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: proposalMessage,\n })\n\n // Save record and emit event\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n\n return credentialExchangeRecord\n }\n\n public async acceptProposal(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n }: AcceptCredentialProposalOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommOfferCredentialV2Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalReceived)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // Use empty credentialFormats if not provided to denote all formats should be accepted\n let formatServices = this.getFormatServices(credentialFormats ?? {})\n\n // if no format services could be extracted from the credentialFormats\n // take all available format services from the proposal message\n if (formatServices.length === 0) {\n const proposalMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n formatServices = this.getFormatServicesFromMessage(proposalMessage.formats)\n }\n\n // If the format services list is still empty, throw an error as we don't support any\n // of the formats\n if (formatServices.length === 0) {\n throw new CredoError('Unable to accept proposal. No supported formats provided as input or in proposal message')\n }\n\n const offerMessage = await this.credentialFormatCoordinator.acceptProposal(agentContext, {\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n credentialFormats,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.OfferSent)\n\n return { credentialExchangeRecord, message: offerMessage }\n }\n\n /**\n * Negotiate a credential proposal as issuer (by sending a credential offer message) to the connection\n * associated with the credential record.\n *\n * @param options configuration for the offer see {@link NegotiateCredentialProposalOptions}\n * @returns Credential exchange record associated with the credential offer\n *\n */\n public async negotiateProposal(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n }: NegotiateCredentialProposalOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommOfferCredentialV2Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalReceived)\n\n if (!credentialExchangeRecord.connectionId) {\n throw new CredoError(\n `No connectionId found for credential record '${credentialExchangeRecord.id}'. Connection-less issuance does not support negotiation.`\n )\n }\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create offer. No supported formats')\n }\n\n const offerMessage = await this.credentialFormatCoordinator.createOffer(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.OfferSent)\n\n return { credentialExchangeRecord, message: offerMessage }\n }\n\n /**\n * Create a {@link DidCommOfferCredentialV2Message} as beginning of protocol process. If no connectionId is provided, the\n * exchange will be created without a connection for usage in oob and connection-less issuance.\n *\n * @param formatService {@link DidCommCredentialFormatService} the format service object containing format-specific logic\n * @param options attributes of the original offer\n * @returns Object containing offer message and associated credential record\n *\n */\n public async createOffer(\n agentContext: AgentContext,\n {\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n connectionRecord,\n }: CreateCredentialOfferOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommOfferCredentialV2Message>> {\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create offer. No supported formats')\n }\n\n const credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connectionRecord?.id,\n threadId: utils.uuid(),\n state: DidCommCredentialState.OfferSent,\n role: DidCommCredentialRole.Issuer,\n autoAcceptCredential,\n protocolVersion: 'v2',\n })\n\n const offerMessage = await this.credentialFormatCoordinator.createOffer(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n agentContext.config.logger.debug(\n `Saving record and emitting state changed for credential exchange record ${credentialExchangeRecord.id}`\n )\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message: offerMessage }\n }\n\n /**\n * Method called by {@link DidCommOfferCredentialV2Handler} on reception of a offer credential message\n * We do the necessary processing here to accept the offer and do the state change, emit event etc.\n * @param messageContext the inbound offer credential message\n * @returns credential record appropriate for this incoming message (once accepted)\n */\n public async processOffer(\n messageContext: DidCommMessageHandlerInboundMessage<DidCommOfferCredentialV2Handler>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: offerMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential offer with id ${offerMessage.id}`)\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: offerMessage.threadId,\n role: DidCommCredentialRole.Holder,\n connectionId: connection?.id,\n })\n\n const formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process offer. No supported formats')\n }\n\n // credential record already exists\n if (credentialExchangeRecord) {\n const proposeCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n const offerCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: offerCredentialMessage ?? undefined,\n lastSentMessage: proposeCredentialMessage ?? undefined,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n await this.credentialFormatCoordinator.processOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: offerMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.OfferReceived\n )\n return credentialExchangeRecord\n }\n // Assert\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext)\n\n // No credential record exists with thread id\n agentContext.config.logger.debug('No credential record found for offer, creating a new one')\n credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connection?.id,\n threadId: offerMessage.threadId,\n parentThreadId: offerMessage.thread?.parentThreadId,\n state: DidCommCredentialState.OfferReceived,\n role: DidCommCredentialRole.Holder,\n protocolVersion: 'v2',\n })\n\n await this.credentialFormatCoordinator.processOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: offerMessage,\n })\n\n // Save in repository\n agentContext.config.logger.debug('Saving credential record and emit offer-received event')\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n return credentialExchangeRecord\n }\n\n public async acceptOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n credentialFormats,\n }: AcceptCredentialOfferOptions<CFs>\n ) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferReceived)\n\n // Use empty credentialFormats if not provided to denote all formats should be accepted\n let formatServices = this.getFormatServices(credentialFormats ?? {})\n\n // if no format services could be extracted from the credentialFormats\n // take all available format services from the offer message\n if (formatServices.length === 0) {\n const offerMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n }\n\n // If the format services list is still empty, throw an error as we don't support any\n // of the formats\n if (formatServices.length === 0) {\n throw new CredoError('Unable to accept offer. No supported formats provided as input or in offer message')\n }\n\n const message = await this.credentialFormatCoordinator.acceptOffer(agentContext, {\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n credentialFormats,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.RequestSent)\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Create a {@link ProposePresentationMessage} as response to a received credential offer.\n * To create a proposal not bound to an existing credential exchange, use {@link createProposal}.\n *\n * @param options configuration to use for the proposal\n * @returns Object containing proposal message and associated credential record\n *\n */\n public async negotiateOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n }: NegotiateCredentialOfferOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommProposeCredentialV2Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferReceived)\n\n if (!credentialExchangeRecord.connectionId) {\n throw new CredoError(\n `No connectionId found for credential record '${credentialExchangeRecord.id}'. Connection-less issuance does not support negotiation.`\n )\n }\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create proposal. No supported formats')\n }\n\n const proposalMessage = await this.credentialFormatCoordinator.createProposal(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.ProposalSent)\n\n return { credentialExchangeRecord, message: proposalMessage }\n }\n\n /**\n * Create a {@link DidCommRequestCredentialV2Message} as beginning of protocol process.\n * @returns Object containing offer message and associated credential record\n *\n */\n public async createRequest(\n agentContext: AgentContext,\n {\n credentialFormats,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n connectionRecord,\n }: CreateCredentialRequestOptions<CFs>\n ): Promise<CredentialProtocolMsgReturnType<DidCommRequestCredentialV2Message>> {\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n\n const formatServices = this.getFormatServices(credentialFormats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to create request. No supported formats')\n }\n\n const credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connectionRecord.id,\n threadId: utils.uuid(),\n state: DidCommCredentialState.RequestSent,\n role: DidCommCredentialRole.Holder,\n autoAcceptCredential,\n protocolVersion: 'v2',\n })\n\n const requestMessage = await this.credentialFormatCoordinator.createRequest(agentContext, {\n formatServices,\n credentialFormats,\n credentialExchangeRecord,\n comment,\n goal,\n goalCode,\n })\n\n agentContext.config.logger.debug(\n `Saving record and emitting state changed for credential exchange record ${credentialExchangeRecord.id}`\n )\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message: requestMessage }\n }\n\n /**\n * Process a received {@link RequestCredentialMessage}. This will not accept the credential request\n * or send a credential. It will only update the existing credential record with\n * the information from the credential request message. Use {@link createCredential}\n * after calling this method to create a credential.\n *z\n * @param messageContext The message context containing a v2 credential request message\n * @returns credential record associated with the credential request message\n *\n */\n public async processRequest(\n messageContext: DidCommInboundMessageContext<DidCommRequestCredentialV2Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: requestMessage, connection, agentContext } = messageContext\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential request with id ${requestMessage.id}`)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: requestMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n })\n\n const formatServices = this.getFormatServicesFromMessage(requestMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process request. No supported formats')\n }\n\n // credential record already exists\n if (credentialExchangeRecord) {\n const proposalMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n const offerMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: proposalMessage ?? undefined,\n lastSentMessage: offerMessage ?? undefined,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n // This makes sure that the sender of the incoming message is authorized to do so.\n if (!credentialExchangeRecord.connectionId) {\n await connectionService.matchIncomingMessageToRequestMessageInOutOfBandExchange(messageContext, {\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n credentialExchangeRecord.connectionId = connection?.id\n }\n\n await this.credentialFormatCoordinator.processRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: requestMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.RequestReceived\n )\n return credentialExchangeRecord\n }\n // Assert\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext)\n\n // No credential record exists with thread id\n agentContext.config.logger.debug('No credential record found for request, creating a new one')\n credentialExchangeRecord = new DidCommCredentialExchangeRecord({\n connectionId: connection?.id,\n threadId: requestMessage.threadId,\n parentThreadId: requestMessage.thread?.parentThreadId,\n state: DidCommCredentialState.RequestReceived,\n role: DidCommCredentialRole.Issuer,\n protocolVersion: 'v2',\n })\n\n await this.credentialFormatCoordinator.processRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n message: requestMessage,\n })\n\n // Save in repository\n agentContext.config.logger.debug('Saving credential record and emit request-received event')\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n return credentialExchangeRecord\n }\n\n public async acceptRequest(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n autoAcceptCredential,\n comment,\n goal,\n goalCode,\n credentialFormats,\n }: AcceptCredentialRequestOptions<CFs>\n ) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.RequestReceived)\n\n // Use empty credentialFormats if not provided to denote all formats should be accepted\n let formatServices = this.getFormatServices(credentialFormats ?? {})\n\n // if no format services could be extracted from the credentialFormats\n // take all available format services from the request message\n if (formatServices.length === 0) {\n const requestMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n formatServices = this.getFormatServicesFromMessage(requestMessage.formats)\n }\n\n // If the format services list is still empty, throw an error as we don't support any\n // of the formats\n if (formatServices.length === 0) {\n throw new CredoError('Unable to accept request. No supported formats provided as input or in request message')\n }\n const message = await this.credentialFormatCoordinator.acceptRequest(agentContext, {\n credentialExchangeRecord,\n formatServices,\n comment,\n goal,\n goalCode,\n credentialFormats,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.CredentialIssued)\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Process a received {@link DidCommIssueCredentialV2Message}. This will not accept the credential\n * or send a credential acknowledgement. It will only update the existing credential record with\n * the information from the issue credential message. Use {@link createAck}\n * after calling this method to create a credential acknowledgement.\n *\n * @param messageContext The message context containing an issue credential message\n *\n * @returns credential record associated with the issue credential message\n *\n */\n public async processCredential(\n messageContext: DidCommInboundMessageContext<DidCommIssueCredentialV2Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: credentialMessage, connection, agentContext } = messageContext\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential with id ${credentialMessage.id}`)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: credentialMessage.threadId,\n role: DidCommCredentialRole.Holder,\n connectionId: connection?.id,\n })\n\n const requestMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n const offerMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommOfferCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.RequestSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: offerMessage ?? undefined,\n lastSentMessage: requestMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n const formatServices = this.getFormatServicesFromMessage(credentialMessage.formats)\n if (formatServices.length === 0) {\n throw new CredoError('Unable to process credential. No supported formats')\n }\n\n await this.credentialFormatCoordinator.processCredential(messageContext.agentContext, {\n credentialExchangeRecord,\n formatServices,\n requestMessage: requestMessage,\n message: credentialMessage,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.CredentialReceived\n )\n\n return credentialExchangeRecord\n }\n\n /**\n * Create a {@link DidCommCredentialV2AckMessage} as response to a received credential.\n *\n * @param credentialExchangeRecord The credential record for which to create the credential acknowledgement\n * @returns Object containing credential acknowledgement message and associated credential record\n *\n */\n public async acceptCredential(\n agentContext: AgentContext,\n { credentialExchangeRecord }: AcceptCredentialOptions\n ): Promise<CredentialProtocolMsgReturnType<DidCommCredentialV2AckMessage>> {\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.CredentialReceived)\n\n // Create message\n const ackMessage = new DidCommCredentialV2AckMessage({\n status: AckStatus.OK,\n threadId: credentialExchangeRecord.threadId,\n })\n\n ackMessage.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.Done)\n\n return { message: ackMessage, credentialExchangeRecord }\n }\n\n /**\n * Process a received {@link CredentialAckMessage}.\n *\n * @param messageContext The message context containing a credential acknowledgement message\n * @returns credential record associated with the credential acknowledgement message\n *\n */\n public async processAck(\n messageContext: DidCommInboundMessageContext<DidCommCredentialV2AckMessage>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: ackMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential ack with id ${ackMessage.id}`)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: ackMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n connectionId: connection?.id,\n })\n credentialExchangeRecord.connectionId = connection?.id\n\n const requestMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV2Message,\n role: DidCommMessageRole.Receiver,\n })\n\n const credentialMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommIssueCredentialV2Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v2')\n credentialExchangeRecord.assertState(DidCommCredentialState.CredentialIssued)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: requestMessage,\n lastSentMessage: credentialMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n // Update record\n await this.updateState(messageContext.agentContext, credentialExchangeRecord, DidCommCredentialState.Done)\n\n return credentialExchangeRecord\n }\n\n /**\n * Create a {@link DidCommCredentialV2ProblemReportMessage} to be sent.\n *\n * @param message message to send\n * @returns a {@link DidCommCredentialV2ProblemReportMessage}\n *\n */\n public async createProblemReport(\n _agentContext: AgentContext,\n { credentialExchangeRecord, description }: CreateCredentialProblemReportOptions\n ): Promise<CredentialProtocolMsgReturnType<DidCommProblemReportMessage>> {\n const message = new DidCommCredentialV2ProblemReportMessage({\n description: {\n en: description,\n code: DidCommCredentialProblemReportReason.IssuanceAbandoned,\n },\n })\n\n message.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n return { credentialExchangeRecord, message }\n }\n\n // AUTO ACCEPT METHODS\n public async shouldAutoRespondToProposal(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n proposalMessage: DidCommProposeCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, proposalMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n if (!offerMessage) return false\n\n // NOTE: we take the formats from the offerMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the proposal, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n\n const proposalAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToProposal(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n proposalAttachment,\n })\n // If any of the formats return false, we should not auto accept\n if (!shouldAutoRespondToFormat) return false\n }\n\n // not all formats use the proposal and preview, we only check if they're present on\n // either or both of the messages\n if (proposalMessage.credentialPreview || offerMessage.credentialPreview) {\n // if one of the message doesn't have a preview, we should not auto accept\n if (!proposalMessage.credentialPreview || !offerMessage.credentialPreview) return false\n\n // Check if preview values match\n return arePreviewAttributesEqual(\n proposalMessage.credentialPreview.attributes,\n offerMessage.credentialPreview.attributes\n )\n }\n\n return true\n }\n\n public async shouldAutoRespondToOffer(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n offerMessage: DidCommOfferCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, offerMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const proposalMessage = await this.findProposalMessage(agentContext, credentialExchangeRecord.id)\n if (!proposalMessage) return false\n\n // NOTE: we take the formats from the proposalMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the offer, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(proposalMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n\n const proposalAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToOffer(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n proposalAttachment,\n })\n\n // If any of the formats return false, we should not auto accept\n\n if (!shouldAutoRespondToFormat) return false\n }\n\n // if one of the message doesn't have a preview, we should not auto accept\n if (proposalMessage.credentialPreview || offerMessage.credentialPreview) {\n // Check if preview values match\n return arePreviewAttributesEqual(\n proposalMessage.credentialPreview?.attributes ?? [],\n offerMessage.credentialPreview?.attributes ?? []\n )\n }\n return true\n }\n\n public async shouldAutoRespondToRequest(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n requestMessage: DidCommRequestCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, requestMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const proposalMessage = await this.findProposalMessage(agentContext, credentialExchangeRecord.id)\n\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n if (!offerMessage) return false\n\n // NOTE: we take the formats from the offerMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the request, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(offerMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n\n const proposalAttachment = proposalMessage\n ? this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n : undefined\n\n const requestAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n requestMessage.formats,\n requestMessage.requestAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToRequest(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n requestAttachment,\n proposalAttachment,\n })\n\n // If any of the formats return false, we should not auto accept\n if (!shouldAutoRespondToFormat) return false\n }\n\n return true\n }\n\n public async shouldAutoRespondToCredential(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n credentialMessage: DidCommIssueCredentialV2Message\n }\n ): Promise<boolean> {\n const { credentialExchangeRecord, credentialMessage } = options\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeAutoAccept(\n credentialExchangeRecord.autoAcceptCredential,\n credentialsModuleConfig.autoAcceptCredentials\n )\n\n // Handle always / never cases\n if (autoAccept === DidCommAutoAcceptCredential.Always) return true\n if (autoAccept === DidCommAutoAcceptCredential.Never) return false\n\n const proposalMessage = await this.findProposalMessage(agentContext, credentialExchangeRecord.id)\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n\n const requestMessage = await this.findRequestMessage(agentContext, credentialExchangeRecord.id)\n if (!requestMessage) return false\n\n // NOTE: we take the formats from the requestMessage so we always check all services that we last sent\n // Otherwise we'll only check the formats from the credential, which could be different from the formats\n // we use.\n const formatServices = this.getFormatServicesFromMessage(requestMessage.formats)\n\n for (const formatService of formatServices) {\n const offerAttachment = offerMessage\n ? this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n offerMessage.formats,\n offerMessage.offerAttachments\n )\n : undefined\n\n const proposalAttachment = proposalMessage\n ? this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n proposalMessage.formats,\n proposalMessage.proposalAttachments\n )\n : undefined\n\n const requestAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n requestMessage.formats,\n requestMessage.requestAttachments\n )\n\n const credentialAttachment = this.credentialFormatCoordinator.getAttachmentForService(\n formatService,\n credentialMessage.formats,\n credentialMessage.credentialAttachments\n )\n\n const shouldAutoRespondToFormat = await formatService.shouldAutoRespondToCredential(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n credentialAttachment,\n requestAttachment,\n proposalAttachment,\n })\n\n // If any of the formats return false, we should not auto accept\n if (!shouldAutoRespondToFormat) return false\n }\n return true\n }\n\n public async findProposalMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommProposeCredentialV2Message,\n })\n }\n\n public async findOfferMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommOfferCredentialV2Message,\n })\n }\n\n public async findRequestMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommRequestCredentialV2Message,\n })\n }\n\n public async findCredentialMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommIssueCredentialV2Message,\n })\n }\n\n public async getFormatData(\n agentContext: AgentContext,\n credentialExchangeId: string\n ): Promise<GetCredentialFormatDataReturn<ExtractCredentialFormats<CFs>>> {\n // TODO: we could looking at fetching all record using a single query and then filtering based on the type of the message.\n const [proposalMessage, offerMessage, requestMessage, credentialMessage] = await Promise.all([\n this.findProposalMessage(agentContext, credentialExchangeId),\n this.findOfferMessage(agentContext, credentialExchangeId),\n this.findRequestMessage(agentContext, credentialExchangeId),\n this.findCredentialMessage(agentContext, credentialExchangeId),\n ])\n\n // Create object with the keys and the message formats/attachments. We can then loop over this in a generic\n // way so we don't have to add the same operation code four times\n const messages = {\n proposal: [proposalMessage?.formats, proposalMessage?.proposalAttachments],\n offer: [offerMessage?.formats, offerMessage?.offerAttachments],\n request: [requestMessage?.formats, requestMessage?.requestAttachments],\n credential: [credentialMessage?.formats, credentialMessage?.credentialAttachments],\n } as const\n\n const formatData: GetCredentialFormatDataReturn = {\n proposalAttributes: proposalMessage?.credentialPreview?.attributes,\n offerAttributes: offerMessage?.credentialPreview?.attributes,\n }\n\n // We loop through all of the message keys as defined above\n for (const [messageKey, [formats, attachments]] of Object.entries(messages)) {\n // Message can be undefined, so we continue if it is not defined\n if (!formats || !attachments) continue\n\n // Find all format services associated with the message\n const formatServices = this.getFormatServicesFromMessage(formats)\n const messageFormatData: CredentialFormatDataMessagePayload = {}\n\n // Loop through all of the format services, for each we will extract the attachment data and assign this to the object\n // using the unique format key (e.g. indy)\n for (const formatService of formatServices) {\n const attachment = this.credentialFormatCoordinator.getAttachmentForService(formatService, formats, attachments)\n\n messageFormatData[formatService.formatKey] = attachment.getDataAsJson()\n }\n\n formatData[messageKey as Exclude<keyof GetCredentialFormatDataReturn, 'proposalAttributes' | 'offerAttributes'>] =\n messageFormatData\n }\n\n return formatData\n }\n\n /**\n * Get all the format service objects for a given credential format from an incoming message\n * @param messageFormats the format objects containing the format name (eg indy)\n * @return the credential format service objects in an array - derived from format object keys\n */\n private getFormatServicesFromMessage(\n messageFormats: DidCommCredentialFormatSpec[]\n ): DidCommCredentialFormatService[] {\n const formatServices = new Set<DidCommCredentialFormatService>()\n\n for (const msg of messageFormats) {\n const service = this.getFormatServiceForFormat(msg.format)\n if (service) formatServices.add(service)\n }\n\n return Array.from(formatServices)\n }\n\n /**\n * Get all the format service objects for a given credential format\n * @param credentialFormats the format object containing various optional parameters\n * @return the credential format service objects in an array - derived from format object keys\n */\n private getFormatServices<M extends keyof DidCommCredentialFormat['credentialFormats']>(\n credentialFormats: DidCommCredentialFormatPayload<ExtractCredentialFormats<CFs>, M>\n ): DidCommCredentialFormatService[] {\n const formats = new Set<DidCommCredentialFormatService>()\n\n for (const formatKey of Object.keys(credentialFormats)) {\n const formatService = this.getFormatServiceForFormatKey(formatKey)\n\n if (formatService) formats.add(formatService)\n }\n\n return Array.from(formats)\n }\n\n private getFormatServiceForFormatKey(formatKey: string): DidCommCredentialFormatService | null {\n const formatService = this.credentialFormats.find((credentialFormat) => credentialFormat.formatKey === formatKey)\n\n return formatService ?? null\n }\n\n private getFormatServiceForFormat(format: string): DidCommCredentialFormatService | null {\n const formatService = this.credentialFormats.find((credentialFormat) => credentialFormat.supportsFormat(format))\n\n return formatService ?? null\n }\n\n protected getFormatServiceForRecordType(credentialRecordType: string) {\n const formatService = this.credentialFormats.find(\n (credentialFormat) => credentialFormat.credentialRecordType === credentialRecordType\n )\n\n if (!formatService) {\n throw new CredoError(\n `No format service found for credential record type ${credentialRecordType} in v2 credential protocol`\n )\n }\n\n return formatService\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA,IAAa,8BAAb,cAGU,8BAEV;CAIE,AAAO,YAAY,EAAE,qBAA6D;AAChF,SAAO;OAJD,8BAA8B,IAAI,oCAAyC;OAYnE,UAAU;AANxB,OAAK,oBAAoB;;;;;CAW3B,AAAO,SAAS,wBAAuD,iBAAyC;AAE9G,yBAAuB,wBAAwB;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AA0B,QAAuD;AAGvF,SAFsB,KAAK,kBAAkB,MAAM,qBAAqB,iBAAiB,eAAe,OAAO,CAAC,IAExF;;CAG1B,AAAU,8BAA8B,sBAA8B;EACpE,MAAM,gBAAgB,KAAK,kBAAkB,MAC1C,qBAAqB,iBAAiB,yBAAyB,qBACjE;AAED,MAAI,CAAC,cACH,OAAM,IAAI,WACR,sDAAsD,qBAAqB,4BAC5E;AAGH,SAAO"}
|
package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../../../errors/problem-reports/DidCommProblemReportError.mjs";
|
|
2
1
|
import { DidCommCredentialProblemReportReason } from "../../../models/DidCommCredentialProblemReportReason.mjs";
|
|
3
2
|
import { DidCommCredentialV2ProblemReportMessage } from "../messages/DidCommCredentialV2ProblemReportMessage.mjs";
|
|
3
|
+
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../../../errors/problem-reports/DidCommProblemReportError.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts
|
|
6
6
|
interface DidCommCredentialV2ProblemReportErrorOptions extends DidCommProblemReportErrorOptions {
|
package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommCredentialV2ProblemReportError.d.mts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV2ProblemReportError.d.mts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;UAKiB,4CAAA,SAAqD;EAArD,WAAA,EACF,oCAD+C;;AAC/C,cAGF,qCAAA,SAA8C,yBAAA,CAH5C;eADuD,EAK9C,uCAL8C;EAAgC,WAAA,CAAA,OAAA,EAAA,MAAA,EAAA;IAAA;EAAA,CAAA,EAO/C,4CAP+C;AAItG"}
|
package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../../../errors/problem-reports/DidCommProblemReportError.js";
|
|
2
1
|
import { DidCommCredentialProblemReportReason } from "../../../models/DidCommCredentialProblemReportReason.js";
|
|
3
2
|
import { DidCommCredentialV2ProblemReportMessage } from "../messages/DidCommCredentialV2ProblemReportMessage.js";
|
|
3
|
+
import { DidCommProblemReportError, DidCommProblemReportErrorOptions } from "../../../../../errors/problem-reports/DidCommProblemReportError.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts
|
|
6
6
|
interface DidCommCredentialV2ProblemReportErrorOptions extends DidCommProblemReportErrorOptions {
|
package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommCredentialV2ProblemReportError.d.ts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV2ProblemReportError.d.ts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.ts"],"sourcesContent":[],"mappings":";;;;;UAKiB,4CAAA,SAAqD;EAArD,WAAA,EACF,oCAD+C;;AAC/C,cAGF,qCAAA,SAA8C,yBAAA,CAH5C;eADuD,EAK9C,uCAL8C;EAAgC,WAAA,CAAA,OAAA,EAAA,MAAA,EAAA;IAAA;EAAA,CAAA,EAO/C,4CAP+C;AAItG"}
|
package/build/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommCredentialV2ProblemReportError.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.ts"],"sourcesContent":["import type { DidCommProblemReportErrorOptions } from '../../../../../errors'\nimport
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV2ProblemReportError.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/errors/DidCommCredentialV2ProblemReportError.ts"],"sourcesContent":["import type { DidCommProblemReportErrorOptions } from '../../../../../errors'\nimport { DidCommProblemReportError } from '../../../../../errors'\nimport type { DidCommCredentialProblemReportReason } from '../../../models/DidCommCredentialProblemReportReason'\nimport { DidCommCredentialV2ProblemReportMessage } from '../messages/DidCommCredentialV2ProblemReportMessage'\n\nexport interface DidCommCredentialV2ProblemReportErrorOptions extends DidCommProblemReportErrorOptions {\n problemCode: DidCommCredentialProblemReportReason\n}\n\nexport class DidCommCredentialV2ProblemReportError extends DidCommProblemReportError {\n public problemReport: DidCommCredentialV2ProblemReportMessage\n\n public constructor(message: string, { problemCode }: DidCommCredentialV2ProblemReportErrorOptions) {\n super(message, { problemCode })\n this.problemReport = new DidCommCredentialV2ProblemReportMessage({\n description: {\n en: message,\n code: problemCode,\n },\n })\n }\n}\n"],"mappings":";;;;;AASA,IAAa,wCAAb,cAA2D,0BAA0B;CAGnF,AAAO,YAAY,SAAiB,EAAE,eAA6D;AACjG,QAAM,SAAS,EAAE,aAAa,CAAC;AAC/B,OAAK,gBAAgB,IAAI,wCAAwC,EAC/D,aAAa;GACX,IAAI;GACJ,MAAM;GACP,EACF,CAAC"}
|
package/build/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommIssueCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"DidCommIssueCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommIssueCredentialV2Handler.ts"],"sourcesContent":["import { CredoError } from '@credo-ts/core'\nimport { getOutboundDidCommMessageContext } from '../../../../../getDidCommOutboundMessageContext'\nimport type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../../../handlers'\nimport type { DidCommInboundMessageContext } from '../../../../../models'\nimport type { DidCommCredentialExchangeRecord } from '../../../repository/DidCommCredentialExchangeRecord'\nimport type { DidCommCredentialV2Protocol } from '../DidCommCredentialV2Protocol'\nimport { DidCommIssueCredentialV2Message } from '../messages/DidCommIssueCredentialV2Message'\n\nexport class DidCommIssueCredentialV2Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV2Protocol\n public supportedMessages = [DidCommIssueCredentialV2Message]\n\n public constructor(credentialProtocol: DidCommCredentialV2Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommInboundMessageContext<DidCommIssueCredentialV2Message>) {\n const credentialExchangeRecord = await this.credentialProtocol.processCredential(messageContext)\n\n const shouldAutoRespond = await this.credentialProtocol.shouldAutoRespondToCredential(messageContext.agentContext, {\n credentialExchangeRecord,\n credentialMessage: messageContext.message,\n })\n\n if (shouldAutoRespond) {\n return await this.acceptCredential(credentialExchangeRecord, messageContext)\n }\n }\n\n private async acceptCredential(\n credentialExchangeRecord: DidCommCredentialExchangeRecord,\n messageContext: DidCommMessageHandlerInboundMessage<DidCommIssueCredentialV2Handler>\n ) {\n messageContext.agentContext.config.logger.info('Automatically sending acknowledgement with autoAccept')\n const { message } = await this.credentialProtocol.acceptCredential(messageContext.agentContext, {\n credentialExchangeRecord,\n })\n\n const requestMessage = await this.credentialProtocol.findRequestMessage(\n messageContext.agentContext,\n credentialExchangeRecord.id\n )\n if (!requestMessage) {\n throw new CredoError(`No request message found for credential record with id '${credentialExchangeRecord.id}'`)\n }\n\n return getOutboundDidCommMessageContext(messageContext.agentContext, {\n connectionRecord: messageContext.connection,\n message,\n associatedRecord: credentialExchangeRecord,\n lastReceivedMessage: messageContext.message,\n lastSentMessage: requestMessage,\n })\n }\n}\n"],"mappings":";;;;;AAQA,IAAa,kCAAb,MAA8E;CAI5E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,gCAAgC;AAG1D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAA+E;EACjG,MAAM,2BAA2B,MAAM,KAAK,mBAAmB,kBAAkB,eAAe;AAOhG,MAL0B,MAAM,KAAK,mBAAmB,8BAA8B,eAAe,cAAc;GACjH;GACA,mBAAmB,eAAe;GACnC,CAAC,CAGA,QAAO,MAAM,KAAK,iBAAiB,0BAA0B,eAAe;;CAIhF,MAAc,iBACZ,0BACA,gBACA;AACA,iBAAe,aAAa,OAAO,OAAO,KAAK,wDAAwD;EACvG,MAAM,EAAE,YAAY,MAAM,KAAK,mBAAmB,iBAAiB,eAAe,cAAc,EAC9F,0BACD,CAAC;EAEF,MAAM,iBAAiB,MAAM,KAAK,mBAAmB,mBACnD,eAAe,cACf,yBAAyB,GAC1B;AACD,MAAI,CAAC,eACH,OAAM,IAAI,WAAW,2DAA2D,yBAAyB,GAAG,GAAG;AAGjH,SAAO,iCAAiC,eAAe,cAAc;GACnE,kBAAkB,eAAe;GACjC;GACA,kBAAkB;GAClB,qBAAqB,eAAe;GACpC,iBAAiB;GAClB,CAAC"}
|
package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommOfferCredentialV2Handler.d.mts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.ts"],"sourcesContent":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommOfferCredentialV2Handler.d.mts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAOa,+BAAA,YAA2C;;6BAG9B;kCAEe;EAL5B,MAAA,CAAA,cAAA,EASyB,4BATO,CASsB,+BATtB,CAAA,CAAA,EASsD,OATtD,CASsD,6BATtD,CASqB,cAAA,CATrB,GAAA,SAAA,CAAA;EAAA,QAAA,WAAA"}
|
package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommOfferCredentialV2Handler.d.ts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.ts"],"sourcesContent":[],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommOfferCredentialV2Handler.d.ts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.ts"],"sourcesContent":[],"mappings":";;;;;;;;cAOa,+BAAA,YAA2C;;6BAG9B;kCAEe;EAL5B,MAAA,CAAA,cAAA,EASyB,4BATO,CASsB,+BATtB,CAAA,CAAA,EASsD,OATtD,CASsD,6BATtD,CASqB,cAAA,CATrB,GAAA,SAAA,CAAA;EAAA,QAAA,WAAA"}
|
package/build/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommOfferCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../../../handlers'\nimport type { DidCommInboundMessageContext } from '../../../../../models'\nimport type { DidCommCredentialExchangeRecord } from '../../../repository/DidCommCredentialExchangeRecord'\nimport type { DidCommCredentialV2Protocol } from '../DidCommCredentialV2Protocol'\
|
|
1
|
+
{"version":3,"file":"DidCommOfferCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommOfferCredentialV2Handler.ts"],"sourcesContent":["import { getOutboundDidCommMessageContext } from '../../../../../getDidCommOutboundMessageContext'\nimport type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../../../handlers'\nimport type { DidCommInboundMessageContext } from '../../../../../models'\nimport type { DidCommCredentialExchangeRecord } from '../../../repository/DidCommCredentialExchangeRecord'\nimport type { DidCommCredentialV2Protocol } from '../DidCommCredentialV2Protocol'\nimport { DidCommOfferCredentialV2Message } from '../messages/DidCommOfferCredentialV2Message'\n\nexport class DidCommOfferCredentialV2Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV2Protocol\n\n public supportedMessages = [DidCommOfferCredentialV2Message]\n\n public constructor(credentialProtocol: DidCommCredentialV2Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommInboundMessageContext<DidCommOfferCredentialV2Message>) {\n const credentialExchangeRecord = await this.credentialProtocol.processOffer(messageContext)\n\n const shouldAutoRespond = await this.credentialProtocol.shouldAutoRespondToOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n offerMessage: messageContext.message,\n })\n if (shouldAutoRespond) {\n return await this.acceptOffer(credentialExchangeRecord, messageContext)\n }\n }\n\n private async acceptOffer(\n credentialExchangeRecord: DidCommCredentialExchangeRecord,\n messageContext: DidCommMessageHandlerInboundMessage<DidCommOfferCredentialV2Handler>\n ) {\n messageContext.agentContext.config.logger.info('Automatically sending request with autoAccept')\n\n const { message } = await this.credentialProtocol.acceptOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n })\n\n return getOutboundDidCommMessageContext(messageContext.agentContext, {\n connectionRecord: messageContext.connection,\n message,\n associatedRecord: credentialExchangeRecord,\n lastReceivedMessage: messageContext.message,\n })\n }\n}\n"],"mappings":";;;;AAOA,IAAa,kCAAb,MAA8E;CAK5E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,gCAAgC;AAG1D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAA+E;EACjG,MAAM,2BAA2B,MAAM,KAAK,mBAAmB,aAAa,eAAe;AAM3F,MAJ0B,MAAM,KAAK,mBAAmB,yBAAyB,eAAe,cAAc;GAC5G;GACA,cAAc,eAAe;GAC9B,CAAC,CAEA,QAAO,MAAM,KAAK,YAAY,0BAA0B,eAAe;;CAI3E,MAAc,YACZ,0BACA,gBACA;AACA,iBAAe,aAAa,OAAO,OAAO,KAAK,gDAAgD;EAE/F,MAAM,EAAE,YAAY,MAAM,KAAK,mBAAmB,YAAY,eAAe,cAAc,EACzF,0BACD,CAAC;AAEF,SAAO,iCAAiC,eAAe,cAAc;GACnE,kBAAkB,eAAe;GACjC;GACA,kBAAkB;GAClB,qBAAqB,eAAe;GACrC,CAAC"}
|
package/build/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommProposeCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../../../handlers'\nimport type { DidCommInboundMessageContext } from '../../../../../models'\nimport
|
|
1
|
+
{"version":3,"file":"DidCommProposeCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommProposeCredentialV2Handler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '../../../../../handlers'\nimport type { DidCommInboundMessageContext } from '../../../../../models'\nimport { DidCommOutboundMessageContext } from '../../../../../models'\nimport type { DidCommCredentialExchangeRecord } from '../../../repository/DidCommCredentialExchangeRecord'\nimport type { DidCommCredentialV2Protocol } from '../DidCommCredentialV2Protocol'\nimport { DidCommProposeCredentialV2Message } from '../messages/DidCommProposeCredentialV2Message'\n\nexport class DidCommProposeCredentialV2Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV2Protocol\n\n public supportedMessages = [DidCommProposeCredentialV2Message]\n\n public constructor(credentialProtocol: DidCommCredentialV2Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommInboundMessageContext<DidCommProposeCredentialV2Message>) {\n const credentialExchangeRecord = await this.credentialProtocol.processProposal(messageContext)\n\n const shouldAutoRespond = await this.credentialProtocol.shouldAutoRespondToProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n proposalMessage: messageContext.message,\n })\n\n if (shouldAutoRespond) {\n return await this.acceptProposal(credentialExchangeRecord, messageContext)\n }\n }\n\n private async acceptProposal(\n credentialExchangeRecord: DidCommCredentialExchangeRecord,\n messageContext: DidCommMessageHandlerInboundMessage<DidCommProposeCredentialV2Handler>\n ) {\n messageContext.agentContext.config.logger.info('Automatically sending offer with autoAccept')\n\n if (!messageContext.connection) {\n messageContext.agentContext.config.logger.error('No connection on the messageContext, aborting auto accept')\n return\n }\n\n const { message } = await this.credentialProtocol.acceptProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n })\n\n return new DidCommOutboundMessageContext(message, {\n agentContext: messageContext.agentContext,\n connection: messageContext.connection,\n associatedRecord: credentialExchangeRecord,\n })\n }\n}\n"],"mappings":";;;;;AAOA,IAAa,oCAAb,MAAgF;CAK9E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,kCAAkC;AAG5D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAiF;EACnG,MAAM,2BAA2B,MAAM,KAAK,mBAAmB,gBAAgB,eAAe;AAO9F,MAL0B,MAAM,KAAK,mBAAmB,4BAA4B,eAAe,cAAc;GAC/G;GACA,iBAAiB,eAAe;GACjC,CAAC,CAGA,QAAO,MAAM,KAAK,eAAe,0BAA0B,eAAe;;CAI9E,MAAc,eACZ,0BACA,gBACA;AACA,iBAAe,aAAa,OAAO,OAAO,KAAK,8CAA8C;AAE7F,MAAI,CAAC,eAAe,YAAY;AAC9B,kBAAe,aAAa,OAAO,OAAO,MAAM,4DAA4D;AAC5G;;EAGF,MAAM,EAAE,YAAY,MAAM,KAAK,mBAAmB,eAAe,eAAe,cAAc,EAC5F,0BACD,CAAC;AAEF,SAAO,IAAI,8BAA8B,SAAS;GAChD,cAAc,eAAe;GAC7B,YAAY,eAAe;GAC3B,kBAAkB;GACnB,CAAC"}
|
package/build/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommRequestCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"DidCommRequestCredentialV2Handler.mjs","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/handlers/DidCommRequestCredentialV2Handler.ts"],"sourcesContent":["import { CredoError } from '@credo-ts/core'\nimport { getOutboundDidCommMessageContext } from '../../../../../getDidCommOutboundMessageContext'\nimport type { DidCommMessageHandler } from '../../../../../handlers'\nimport type { DidCommInboundMessageContext } from '../../../../../models'\nimport type { DidCommCredentialExchangeRecord } from '../../../repository'\nimport type { DidCommCredentialV2Protocol } from '../DidCommCredentialV2Protocol'\nimport { DidCommRequestCredentialV2Message } from '../messages/DidCommRequestCredentialV2Message'\n\nexport class DidCommRequestCredentialV2Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV2Protocol\n\n public supportedMessages = [DidCommRequestCredentialV2Message]\n\n public constructor(credentialProtocol: DidCommCredentialV2Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommInboundMessageContext<DidCommRequestCredentialV2Message>) {\n const credentialExchangeRecord = await this.credentialProtocol.processRequest(messageContext)\n\n const shouldAutoRespond = await this.credentialProtocol.shouldAutoRespondToRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n requestMessage: messageContext.message,\n })\n\n if (shouldAutoRespond) {\n return await this.acceptRequest(credentialExchangeRecord, messageContext)\n }\n }\n\n private async acceptRequest(\n credentialExchangeRecord: DidCommCredentialExchangeRecord,\n messageContext: DidCommInboundMessageContext<DidCommRequestCredentialV2Message>\n ) {\n messageContext.agentContext.config.logger.info('Automatically sending credential with autoAccept')\n\n const offerMessage = await this.credentialProtocol.findOfferMessage(\n messageContext.agentContext,\n credentialExchangeRecord.id\n )\n if (!offerMessage) {\n throw new CredoError(`Could not find offer message for credential record with id ${credentialExchangeRecord.id}`)\n }\n\n const { message } = await this.credentialProtocol.acceptRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n })\n\n return getOutboundDidCommMessageContext(messageContext.agentContext, {\n connectionRecord: messageContext.connection,\n message,\n associatedRecord: credentialExchangeRecord,\n lastReceivedMessage: messageContext.message,\n lastSentMessage: offerMessage,\n })\n }\n}\n"],"mappings":";;;;;AAQA,IAAa,oCAAb,MAAgF;CAK9E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,kCAAkC;AAG5D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAiF;EACnG,MAAM,2BAA2B,MAAM,KAAK,mBAAmB,eAAe,eAAe;AAO7F,MAL0B,MAAM,KAAK,mBAAmB,2BAA2B,eAAe,cAAc;GAC9G;GACA,gBAAgB,eAAe;GAChC,CAAC,CAGA,QAAO,MAAM,KAAK,cAAc,0BAA0B,eAAe;;CAI7E,MAAc,cACZ,0BACA,gBACA;AACA,iBAAe,aAAa,OAAO,OAAO,KAAK,mDAAmD;EAElG,MAAM,eAAe,MAAM,KAAK,mBAAmB,iBACjD,eAAe,cACf,yBAAyB,GAC1B;AACD,MAAI,CAAC,aACH,OAAM,IAAI,WAAW,8DAA8D,yBAAyB,KAAK;EAGnH,MAAM,EAAE,YAAY,MAAM,KAAK,mBAAmB,cAAc,eAAe,cAAc,EAC3F,0BACD,CAAC;AAEF,SAAO,iCAAiC,eAAe,cAAc;GACnE,kBAAkB,eAAe;GACjC;GACA,kBAAkB;GAClB,qBAAqB,eAAe;GACpC,iBAAiB;GAClB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_DidCommCredentialV2AckHandler = require('./DidCommCredentialV2AckHandler.js');
|
|
2
|
+
const require_DidCommCredentialV2ProblemReportHandler = require('./DidCommCredentialV2ProblemReportHandler.js');
|
|
2
3
|
const require_DidCommIssueCredentialV2Handler = require('./DidCommIssueCredentialV2Handler.js');
|
|
3
4
|
const require_DidCommOfferCredentialV2Handler = require('./DidCommOfferCredentialV2Handler.js');
|
|
4
5
|
const require_DidCommProposeCredentialV2Handler = require('./DidCommProposeCredentialV2Handler.js');
|
|
5
6
|
const require_DidCommRequestCredentialV2Handler = require('./DidCommRequestCredentialV2Handler.js');
|
|
6
|
-
const require_DidCommCredentialV2ProblemReportHandler = require('./DidCommCredentialV2ProblemReportHandler.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DidCommCredentialV2AckHandler } from "./DidCommCredentialV2AckHandler.mjs";
|
|
2
|
+
import { DidCommCredentialV2ProblemReportHandler } from "./DidCommCredentialV2ProblemReportHandler.mjs";
|
|
2
3
|
import { DidCommIssueCredentialV2Handler } from "./DidCommIssueCredentialV2Handler.mjs";
|
|
3
4
|
import { DidCommOfferCredentialV2Handler } from "./DidCommOfferCredentialV2Handler.mjs";
|
|
4
5
|
import { DidCommProposeCredentialV2Handler } from "./DidCommProposeCredentialV2Handler.mjs";
|
|
5
6
|
import { DidCommRequestCredentialV2Handler } from "./DidCommRequestCredentialV2Handler.mjs";
|
|
6
|
-
import { DidCommCredentialV2ProblemReportHandler } from "./DidCommCredentialV2ProblemReportHandler.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_DidCommCredentialV2AckMessage = require('./messages/DidCommCredentialV2AckMessage.js');
|
|
2
|
+
const require_DidCommCredentialV2Preview = require('./messages/DidCommCredentialV2Preview.js');
|
|
2
3
|
const require_DidCommCredentialV2ProblemReportMessage = require('./messages/DidCommCredentialV2ProblemReportMessage.js');
|
|
3
4
|
const require_DidCommIssueCredentialV2Message = require('./messages/DidCommIssueCredentialV2Message.js');
|
|
4
|
-
const require_DidCommCredentialV2Preview = require('./messages/DidCommCredentialV2Preview.js');
|
|
5
5
|
const require_DidCommOfferCredentialV2Message = require('./messages/DidCommOfferCredentialV2Message.js');
|
|
6
6
|
const require_DidCommProposeCredentialV2Message = require('./messages/DidCommProposeCredentialV2Message.js');
|
|
7
7
|
const require_DidCommRequestCredentialV2Message = require('./messages/DidCommRequestCredentialV2Message.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DidCommCredentialV2AckMessage } from "./messages/DidCommCredentialV2AckMessage.mjs";
|
|
2
|
+
import { DidCommCredentialV2Preview } from "./messages/DidCommCredentialV2Preview.mjs";
|
|
2
3
|
import { DidCommCredentialV2ProblemReportMessage } from "./messages/DidCommCredentialV2ProblemReportMessage.mjs";
|
|
3
4
|
import { DidCommIssueCredentialV2Message } from "./messages/DidCommIssueCredentialV2Message.mjs";
|
|
4
|
-
import { DidCommCredentialV2Preview } from "./messages/DidCommCredentialV2Preview.mjs";
|
|
5
5
|
import { DidCommOfferCredentialV2Message } from "./messages/DidCommOfferCredentialV2Message.mjs";
|
|
6
6
|
import { DidCommProposeCredentialV2Message } from "./messages/DidCommProposeCredentialV2Message.mjs";
|
|
7
7
|
import { DidCommRequestCredentialV2Message } from "./messages/DidCommRequestCredentialV2Message.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_decorateMetadata = require('../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
2
1
|
const require_decorate = require('../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.js');
|
|
3
2
|
const require_messageType = require('../../../../../util/messageType.js');
|
|
3
|
+
const require_decorateMetadata = require('../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.js');
|
|
4
4
|
const require_DidCommAckMessage = require('../../../../../messages/common/DidCommAckMessage.js');
|
|
5
5
|
require('../../../../../messages/index.js');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __decorateMetadata } from "../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
|
|
2
1
|
import { __decorate } from "../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
|
|
3
2
|
import { IsValidMessageType, parseMessageType } from "../../../../../util/messageType.mjs";
|
|
3
|
+
import { __decorateMetadata } from "../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
|
|
4
4
|
import { DidCommAckMessage } from "../../../../../messages/common/DidCommAckMessage.mjs";
|
|
5
5
|
import "../../../../../messages/index.mjs";
|
|
6
6
|
|
|
@@ -12,8 +12,8 @@ import { CredentialPreviewOptions, DidCommCredentialPreviewAttribute } from "../
|
|
|
12
12
|
*/
|
|
13
13
|
declare class DidCommCredentialV2Preview {
|
|
14
14
|
constructor(options: CredentialPreviewOptions);
|
|
15
|
-
readonly type: string;
|
|
16
15
|
static readonly type: ParsedMessageType;
|
|
16
|
+
readonly type: string;
|
|
17
17
|
attributes: DidCommCredentialPreviewAttribute[];
|
|
18
18
|
toJSON(): Record<string, unknown>;
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommCredentialV2Preview.d.mts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV2Preview.d.mts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;;;;;AAqBmB,cArBN,0BAAA,CAqBM;aAagB,CAAA,OAAA,EAjCL,wBAiCK;kBAAsB,IAAA,EAjCH,iBAiCG;EAAA,SAAA,IAAA,EAAA,MAAA;cAfnC;YAEH;;;;;;;;;;4BAagB,yBAAsB"}
|
|
@@ -12,8 +12,8 @@ import { CredentialPreviewOptions, DidCommCredentialPreviewAttribute } from "../
|
|
|
12
12
|
*/
|
|
13
13
|
declare class DidCommCredentialV2Preview {
|
|
14
14
|
constructor(options: CredentialPreviewOptions);
|
|
15
|
-
readonly type: string;
|
|
16
15
|
static readonly type: ParsedMessageType;
|
|
16
|
+
readonly type: string;
|
|
17
17
|
attributes: DidCommCredentialPreviewAttribute[];
|
|
18
18
|
toJSON(): Record<string, unknown>;
|
|
19
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DidCommCredentialV2Preview.d.ts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV2Preview.d.ts","names":[],"sources":["../../../../../../src/modules/credentials/protocol/v2/messages/DidCommCredentialV2Preview.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;;;;;AAqBmB,cArBN,0BAAA,CAqBM;aAagB,CAAA,OAAA,EAjCL,wBAiCK;kBAAsB,IAAA,EAjCH,iBAiCG;EAAA,SAAA,IAAA,EAAA,MAAA;cAfnC;YAEH;;;;;;;;;;4BAagB,yBAAsB"}
|