@credo-ts/anoncreds 0.6.1-pr-2091-20241119140918 → 0.6.1
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/AnonCredsApi.d.mts +113 -0
- package/build/AnonCredsApi.d.mts.map +1 -0
- package/build/AnonCredsApi.mjs +439 -0
- package/build/AnonCredsApi.mjs.map +1 -0
- package/build/AnonCredsApiOptions.d.mts +28 -0
- package/build/AnonCredsApiOptions.d.mts.map +1 -0
- package/build/AnonCredsModule.d.mts +29 -0
- package/build/AnonCredsModule.d.mts.map +1 -0
- package/build/AnonCredsModule.mjs +62 -0
- package/build/AnonCredsModule.mjs.map +1 -0
- package/build/AnonCredsModuleConfig.d.mts +79 -0
- package/build/AnonCredsModuleConfig.d.mts.map +1 -0
- package/build/AnonCredsModuleConfig.mjs +31 -0
- package/build/AnonCredsModuleConfig.mjs.map +1 -0
- package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs +10 -0
- package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs +7 -0
- package/build/_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateParam.mjs +9 -0
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.mjs +203 -0
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.mjs.map +1 -0
- package/build/anoncreds-rs/AnonCredsRsHolderService.mjs +488 -0
- package/build/anoncreds-rs/AnonCredsRsHolderService.mjs.map +1 -0
- package/build/anoncreds-rs/AnonCredsRsIssuerService.mjs +213 -0
- package/build/anoncreds-rs/AnonCredsRsIssuerService.mjs.map +1 -0
- package/build/anoncreds-rs/AnonCredsRsVerifierService.mjs +122 -0
- package/build/anoncreds-rs/AnonCredsRsVerifierService.mjs.map +1 -0
- package/build/anoncreds-rs/index.mjs +3 -0
- package/build/anoncreds-rs/utils.mjs +60 -0
- package/build/anoncreds-rs/utils.mjs.map +1 -0
- package/build/error/AnonCredsError.d.mts +13 -0
- package/build/error/AnonCredsError.d.mts.map +1 -0
- package/build/error/AnonCredsError.mjs +12 -0
- package/build/error/AnonCredsError.mjs.map +1 -0
- package/build/error/AnonCredsRsError.d.mts +13 -0
- package/build/error/AnonCredsRsError.d.mts.map +1 -0
- package/build/error/AnonCredsRsError.mjs +12 -0
- package/build/error/AnonCredsRsError.mjs.map +1 -0
- package/build/error/AnonCredsStoreRecordError.d.mts +13 -0
- package/build/error/AnonCredsStoreRecordError.d.mts.map +1 -0
- package/build/error/AnonCredsStoreRecordError.mjs +12 -0
- package/build/error/AnonCredsStoreRecordError.mjs.map +1 -0
- package/build/error/index.d.mts +3 -0
- package/build/error/index.mjs +3 -0
- package/build/formats/AnonCredsDidCommCredentialFormat.d.mts +82 -0
- package/build/formats/AnonCredsDidCommCredentialFormat.d.mts.map +1 -0
- package/build/formats/AnonCredsDidCommCredentialFormatService.d.mts +120 -0
- package/build/formats/AnonCredsDidCommCredentialFormatService.d.mts.map +1 -0
- package/build/formats/AnonCredsDidCommCredentialFormatService.mjs +331 -0
- package/build/formats/AnonCredsDidCommCredentialFormatService.mjs.map +1 -0
- package/build/formats/AnonCredsDidCommProofFormat.d.mts +77 -0
- package/build/formats/AnonCredsDidCommProofFormat.d.mts.map +1 -0
- package/build/formats/AnonCredsDidCommProofFormatService.d.mts +93 -0
- package/build/formats/AnonCredsDidCommProofFormatService.d.mts.map +1 -0
- package/build/formats/AnonCredsDidCommProofFormatService.mjs +250 -0
- package/build/formats/AnonCredsDidCommProofFormatService.mjs.map +1 -0
- package/build/formats/DataIntegrityDidCommCredentialFormatService.d.mts +118 -0
- package/build/formats/DataIntegrityDidCommCredentialFormatService.d.mts.map +1 -0
- package/build/formats/DataIntegrityDidCommCredentialFormatService.mjs +587 -0
- package/build/formats/DataIntegrityDidCommCredentialFormatService.mjs.map +1 -0
- package/build/formats/LegacyIndyDidCommCredentialFormat.d.mts +38 -0
- package/build/formats/LegacyIndyDidCommCredentialFormat.d.mts.map +1 -0
- package/build/formats/LegacyIndyDidCommCredentialFormatService.d.mts +122 -0
- package/build/formats/LegacyIndyDidCommCredentialFormatService.d.mts.map +1 -0
- package/build/formats/LegacyIndyDidCommCredentialFormatService.mjs +309 -0
- package/build/formats/LegacyIndyDidCommCredentialFormatService.mjs.map +1 -0
- package/build/formats/LegacyIndyDidCommProofFormat.d.mts +36 -0
- package/build/formats/LegacyIndyDidCommProofFormat.d.mts.map +1 -0
- package/build/formats/LegacyIndyDidCommProofFormatService.d.mts +98 -0
- package/build/formats/LegacyIndyDidCommProofFormatService.d.mts.map +1 -0
- package/build/formats/LegacyIndyDidCommProofFormatService.mjs +322 -0
- package/build/formats/LegacyIndyDidCommProofFormatService.mjs.map +1 -0
- package/build/formats/index.d.mts +9 -0
- package/build/formats/index.mjs +5 -0
- package/build/index.d.mts +86 -0
- package/build/index.mjs +69 -0
- package/build/models/AnonCredsCredentialProposal.mjs +75 -0
- package/build/models/AnonCredsCredentialProposal.mjs.map +1 -0
- package/build/models/AnonCredsProofRequest.mjs +62 -0
- package/build/models/AnonCredsProofRequest.mjs.map +1 -0
- package/build/models/AnonCredsRequestedAttribute.mjs +50 -0
- package/build/models/AnonCredsRequestedAttribute.mjs.map +1 -0
- package/build/models/AnonCredsRequestedPredicate.mjs +53 -0
- package/build/models/AnonCredsRequestedPredicate.mjs.map +1 -0
- package/build/models/AnonCredsRestriction.d.mts +29 -0
- package/build/models/AnonCredsRestriction.d.mts.map +1 -0
- package/build/models/AnonCredsRestriction.mjs +137 -0
- package/build/models/AnonCredsRestriction.mjs.map +1 -0
- package/build/models/AnonCredsRestrictionWrapper.d.mts +9 -0
- package/build/models/AnonCredsRestrictionWrapper.d.mts.map +1 -0
- package/build/models/AnonCredsRestrictionWrapper.mjs +18 -0
- package/build/models/AnonCredsRestrictionWrapper.mjs.map +1 -0
- package/build/models/AnonCredsRevocationInterval.mjs +27 -0
- package/build/models/AnonCredsRevocationInterval.mjs.map +1 -0
- package/build/models/exchange.d.mts +104 -0
- package/build/models/exchange.d.mts.map +1 -0
- package/build/models/exchange.mjs +11 -0
- package/build/models/exchange.mjs.map +1 -0
- package/build/models/index.d.mts +4 -0
- package/build/models/index.mjs +2 -0
- package/build/models/internal.d.mts +40 -0
- package/build/models/internal.d.mts.map +1 -0
- package/build/models/registry.d.mts +44 -0
- package/build/models/registry.d.mts.map +1 -0
- package/build/models/utils.d.mts +27 -0
- package/build/models/utils.d.mts.map +1 -0
- package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.d.mts +215 -0
- package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.d.mts.map +1 -0
- package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.mjs +827 -0
- package/build/protocols/credentials/v1/DidCommCredentialV1Protocol.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/DidCommCredentialV1AckHandler.mjs +17 -0
- package/build/protocols/credentials/v1/handlers/DidCommCredentialV1AckHandler.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.mjs +17 -0
- package/build/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/DidCommIssueCredentialV1Handler.mjs +36 -0
- package/build/protocols/credentials/v1/handlers/DidCommIssueCredentialV1Handler.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/DidCommOfferCredentialV1Handler.mjs +32 -0
- package/build/protocols/credentials/v1/handlers/DidCommOfferCredentialV1Handler.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/DidCommProposeCredentialV1Handler.mjs +35 -0
- package/build/protocols/credentials/v1/handlers/DidCommProposeCredentialV1Handler.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/DidCommRequestCredentialV1Handler.mjs +36 -0
- package/build/protocols/credentials/v1/handlers/DidCommRequestCredentialV1Handler.mjs.map +1 -0
- package/build/protocols/credentials/v1/handlers/index.mjs +6 -0
- package/build/protocols/credentials/v1/index.d.mts +9 -0
- package/build/protocols/credentials/v1/index.mjs +9 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.d.mts +16 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.mjs +21 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.d.mts +32 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.mjs +57 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1Preview.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.d.mts +16 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.mjs +21 -0
- package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.d.mts +26 -0
- package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.mjs +46 -0
- package/build/protocols/credentials/v1/messages/DidCommIssueCredentialV1Message.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.d.mts +34 -0
- package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.mjs +61 -0
- package/build/protocols/credentials/v1/messages/DidCommOfferCredentialV1Message.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.d.mts +64 -0
- package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.mjs +95 -0
- package/build/protocols/credentials/v1/messages/DidCommProposeCredentialV1Message.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.d.mts +26 -0
- package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.d.mts.map +1 -0
- package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.mjs +46 -0
- package/build/protocols/credentials/v1/messages/DidCommRequestCredentialV1Message.mjs.map +1 -0
- package/build/protocols/credentials/v1/messages/index.d.mts +7 -0
- package/build/protocols/credentials/v1/messages/index.mjs +7 -0
- package/build/protocols/index.d.mts +18 -0
- package/build/protocols/index.mjs +18 -0
- package/build/protocols/proofs/v1/DidCommProofV1Protocol.d.mts +105 -0
- package/build/protocols/proofs/v1/DidCommProofV1Protocol.d.mts.map +1 -0
- package/build/protocols/proofs/v1/DidCommProofV1Protocol.mjs +723 -0
- package/build/protocols/proofs/v1/DidCommProofV1Protocol.mjs.map +1 -0
- package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.d.mts +18 -0
- package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.d.mts.map +1 -0
- package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.mjs +19 -0
- package/build/protocols/proofs/v1/errors/DidCommPresentationV1ProblemReportError.mjs.map +1 -0
- package/build/protocols/proofs/v1/errors/index.d.mts +1 -0
- package/build/protocols/proofs/v1/errors/index.mjs +1 -0
- package/build/protocols/proofs/v1/handlers/DidCommPresentationV1AckHandler.mjs +17 -0
- package/build/protocols/proofs/v1/handlers/DidCommPresentationV1AckHandler.mjs.map +1 -0
- package/build/protocols/proofs/v1/handlers/DidCommPresentationV1Handler.mjs +36 -0
- package/build/protocols/proofs/v1/handlers/DidCommPresentationV1Handler.mjs.map +1 -0
- package/build/protocols/proofs/v1/handlers/DidCommPresentationV1ProblemReportHandler.mjs +16 -0
- package/build/protocols/proofs/v1/handlers/DidCommPresentationV1ProblemReportHandler.mjs.map +1 -0
- package/build/protocols/proofs/v1/handlers/DidCommProposePresentationV1Handler.mjs +35 -0
- package/build/protocols/proofs/v1/handlers/DidCommProposePresentationV1Handler.mjs.map +1 -0
- package/build/protocols/proofs/v1/handlers/DidCommRequestPresentationV1Handler.mjs +32 -0
- package/build/protocols/proofs/v1/handlers/DidCommRequestPresentationV1Handler.mjs.map +1 -0
- package/build/protocols/proofs/v1/handlers/index.mjs +5 -0
- package/build/protocols/proofs/v1/index.d.mts +11 -0
- package/build/protocols/proofs/v1/index.mjs +11 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.d.mts +12 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.d.mts.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.mjs +18 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1AckMessage.mjs.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.d.mts +38 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.d.mts.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.mjs +52 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1Message.mjs.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.d.mts +16 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.d.mts.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.mjs +21 -0
- package/build/protocols/proofs/v1/messages/DidCommPresentationV1ProblemReportMessage.mjs.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.d.mts +32 -0
- package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.d.mts.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.mjs +44 -0
- package/build/protocols/proofs/v1/messages/DidCommProposePresentationV1Message.mjs.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.d.mts +36 -0
- package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.d.mts.map +1 -0
- package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.mjs +50 -0
- package/build/protocols/proofs/v1/messages/DidCommRequestPresentationV1Message.mjs.map +1 -0
- package/build/protocols/proofs/v1/messages/index.d.mts +5 -0
- package/build/protocols/proofs/v1/messages/index.mjs +5 -0
- package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.d.mts +57 -0
- package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.d.mts.map +1 -0
- package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.mjs +113 -0
- package/build/protocols/proofs/v1/models/DidCommPresentationV1Preview.mjs.map +1 -0
- package/build/protocols/proofs/v1/models/index.d.mts +1 -0
- package/build/protocols/proofs/v1/models/index.mjs +1 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.mts +25 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.mjs +26 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.mjs.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.mts +12 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.mjs +28 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.mjs.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.d.mts +44 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.mjs +38 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.mjs.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.d.mts +12 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.mjs +28 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.mjs.map +1 -0
- package/build/repository/AnonCredsCredentialRecord.d.mts +53 -0
- package/build/repository/AnonCredsCredentialRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsCredentialRecord.mjs +46 -0
- package/build/repository/AnonCredsCredentialRecord.mjs.map +1 -0
- package/build/repository/AnonCredsCredentialRepository.d.mts +14 -0
- package/build/repository/AnonCredsCredentialRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsCredentialRepository.mjs +34 -0
- package/build/repository/AnonCredsCredentialRepository.mjs.map +1 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.mts +25 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.mjs +26 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.mjs.map +1 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.mts +12 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.mjs +28 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.mjs.map +1 -0
- package/build/repository/AnonCredsLinkSecretRecord.d.mts +28 -0
- package/build/repository/AnonCredsLinkSecretRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsLinkSecretRecord.mjs +25 -0
- package/build/repository/AnonCredsLinkSecretRecord.mjs.map +1 -0
- package/build/repository/AnonCredsLinkSecretRepository.d.mts +14 -0
- package/build/repository/AnonCredsLinkSecretRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsLinkSecretRepository.mjs +34 -0
- package/build/repository/AnonCredsLinkSecretRepository.mjs.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.mts +37 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.mjs +35 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.mjs.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.mts +13 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.mjs +34 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.mjs.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.mts +30 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.mjs +27 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.mjs.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.mts +13 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.mjs +31 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.mjs.map +1 -0
- package/build/repository/AnonCredsSchemaRecord.d.mts +44 -0
- package/build/repository/AnonCredsSchemaRecord.d.mts.map +1 -0
- package/build/repository/AnonCredsSchemaRecord.mjs +38 -0
- package/build/repository/AnonCredsSchemaRecord.mjs.map +1 -0
- package/build/repository/AnonCredsSchemaRepository.d.mts +12 -0
- package/build/repository/AnonCredsSchemaRepository.d.mts.map +1 -0
- package/build/repository/AnonCredsSchemaRepository.mjs +28 -0
- package/build/repository/AnonCredsSchemaRepository.mjs.map +1 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.mts +14 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.mts.map +1 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.mjs +10 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.mjs.map +1 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.mts +14 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.mts.map +1 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.mjs +10 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.mjs.map +1 -0
- package/build/repository/anonCredsSchemaRecordMetadataTypes.d.mts +14 -0
- package/build/repository/anonCredsSchemaRecordMetadataTypes.d.mts.map +1 -0
- package/build/repository/index.d.mts +16 -0
- package/build/repository/index.mjs +16 -0
- package/build/services/AnonCredsHolderService.d.mts +28 -0
- package/build/services/AnonCredsHolderService.d.mts.map +1 -0
- package/build/services/AnonCredsHolderService.mjs +6 -0
- package/build/services/AnonCredsHolderService.mjs.map +1 -0
- package/build/services/AnonCredsHolderServiceOptions.d.mts +107 -0
- package/build/services/AnonCredsHolderServiceOptions.d.mts.map +1 -0
- package/build/services/AnonCredsIssuerService.d.mts +19 -0
- package/build/services/AnonCredsIssuerService.d.mts.map +1 -0
- package/build/services/AnonCredsIssuerService.mjs +6 -0
- package/build/services/AnonCredsIssuerService.mjs.map +1 -0
- package/build/services/AnonCredsIssuerServiceOptions.d.mts +66 -0
- package/build/services/AnonCredsIssuerServiceOptions.d.mts.map +1 -0
- package/build/services/AnonCredsVerifierService.d.mts +12 -0
- package/build/services/AnonCredsVerifierService.d.mts.map +1 -0
- package/build/services/AnonCredsVerifierService.mjs +6 -0
- package/build/services/AnonCredsVerifierService.mjs.map +1 -0
- package/build/services/AnonCredsVerifierServiceOptions.d.mts +30 -0
- package/build/services/AnonCredsVerifierServiceOptions.d.mts.map +1 -0
- package/build/services/index.d.mts +17 -0
- package/build/services/index.mjs +7 -0
- package/build/services/registry/AnonCredsRegistry.d.mts +43 -0
- package/build/services/registry/AnonCredsRegistry.d.mts.map +1 -0
- package/build/services/registry/AnonCredsRegistryService.d.mts +27 -0
- package/build/services/registry/AnonCredsRegistryService.d.mts.map +1 -0
- package/build/services/registry/AnonCredsRegistryService.mjs +226 -0
- package/build/services/registry/AnonCredsRegistryService.mjs.map +1 -0
- package/build/services/registry/CredentialDefinitionOptions.d.mts +39 -0
- package/build/services/registry/CredentialDefinitionOptions.d.mts.map +1 -0
- package/build/services/registry/RevocationRegistryDefinitionOptions.d.mts +39 -0
- package/build/services/registry/RevocationRegistryDefinitionOptions.d.mts.map +1 -0
- package/build/services/registry/RevocationStatusListOptions.d.mts +37 -0
- package/build/services/registry/RevocationStatusListOptions.d.mts.map +1 -0
- package/build/services/registry/SchemaOptions.d.mts +39 -0
- package/build/services/registry/SchemaOptions.d.mts.map +1 -0
- package/build/services/registry/base.d.mts +65 -0
- package/build/services/registry/base.d.mts.map +1 -0
- package/build/services/registry/index.d.mts +7 -0
- package/build/services/registry/index.mjs +1 -0
- package/build/services/tails/BasicTailsFileService.d.mts +29 -0
- package/build/services/tails/BasicTailsFileService.d.mts.map +1 -0
- package/build/services/tails/BasicTailsFileService.mjs +52 -0
- package/build/services/tails/BasicTailsFileService.mjs.map +1 -0
- package/build/services/tails/TailsFileService.d.mts +48 -0
- package/build/services/tails/TailsFileService.d.mts.map +1 -0
- package/build/services/tails/index.d.mts +2 -0
- package/build/services/tails/index.mjs +1 -0
- package/build/updates/0.3.1-0.4/credentialDefinition.mjs +49 -0
- package/build/updates/0.3.1-0.4/credentialDefinition.mjs.map +1 -0
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.mjs +118 -0
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.mjs.map +1 -0
- package/build/updates/0.3.1-0.4/index.d.mts +7 -0
- package/build/updates/0.3.1-0.4/index.d.mts.map +1 -0
- package/build/updates/0.3.1-0.4/index.mjs +16 -0
- package/build/updates/0.3.1-0.4/index.mjs.map +1 -0
- package/build/updates/0.3.1-0.4/linkSecret.mjs +21 -0
- package/build/updates/0.3.1-0.4/linkSecret.mjs.map +1 -0
- package/build/updates/0.3.1-0.4/schema.mjs +39 -0
- package/build/updates/0.3.1-0.4/schema.mjs.map +1 -0
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.mjs +126 -0
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.mjs.map +1 -0
- package/build/updates/0.4-0.5/index.d.mts +7 -0
- package/build/updates/0.4-0.5/index.d.mts.map +1 -0
- package/build/updates/0.4-0.5/index.mjs +10 -0
- package/build/updates/0.4-0.5/index.mjs.map +1 -0
- package/build/utils/anonCredsObjects.d.mts +27 -0
- package/build/utils/anonCredsObjects.d.mts.map +1 -0
- package/build/utils/anonCredsObjects.mjs +57 -0
- package/build/utils/anonCredsObjects.mjs.map +1 -0
- package/build/utils/areRequestsEqual.d.mts +1 -0
- package/build/utils/areRequestsEqual.mjs +86 -0
- package/build/utils/areRequestsEqual.mjs.map +1 -0
- package/build/utils/bytesToBigint.mjs +11 -0
- package/build/utils/bytesToBigint.mjs.map +1 -0
- package/build/utils/composeAutoAccept.d.mts +1 -0
- package/build/utils/composeAutoAccept.mjs +25 -0
- package/build/utils/composeAutoAccept.mjs.map +1 -0
- package/build/utils/createRequestFromPreview.d.mts +2 -0
- package/build/utils/createRequestFromPreview.mjs +50 -0
- package/build/utils/createRequestFromPreview.mjs.map +1 -0
- package/build/utils/credential.d.mts +12 -0
- package/build/utils/credential.d.mts.map +1 -0
- package/build/utils/credential.mjs +119 -0
- package/build/utils/credential.mjs.map +1 -0
- package/build/utils/credentialPreviewAttributes.d.mts +1 -0
- package/build/utils/credentialPreviewAttributes.mjs +21 -0
- package/build/utils/credentialPreviewAttributes.mjs.map +1 -0
- package/build/utils/getCredentialsForAnonCredsRequest.d.mts +11 -0
- package/build/utils/getCredentialsForAnonCredsRequest.d.mts.map +1 -0
- package/build/utils/getCredentialsForAnonCredsRequest.mjs +70 -0
- package/build/utils/getCredentialsForAnonCredsRequest.mjs.map +1 -0
- package/build/utils/getRevocationRegistries.d.mts +4 -0
- package/build/utils/getRevocationRegistries.mjs +121 -0
- package/build/utils/getRevocationRegistries.mjs.map +1 -0
- package/build/utils/hasDuplicateGroupNames.d.mts +1 -0
- package/build/utils/hasDuplicateGroupNames.mjs +22 -0
- package/build/utils/hasDuplicateGroupNames.mjs.map +1 -0
- package/build/utils/index.d.mts +17 -0
- package/build/utils/index.mjs +17 -0
- package/build/utils/indyIdentifiers.d.mts +71 -0
- package/build/utils/indyIdentifiers.d.mts.map +1 -0
- package/build/utils/indyIdentifiers.mjs +249 -0
- package/build/utils/indyIdentifiers.mjs.map +1 -0
- package/build/utils/isMap.d.mts +1 -0
- package/build/utils/isMap.mjs +19 -0
- package/build/utils/isMap.mjs.map +1 -0
- package/build/utils/linkSecret.d.mts +13 -0
- package/build/utils/linkSecret.d.mts.map +1 -0
- package/build/utils/linkSecret.mjs +35 -0
- package/build/utils/linkSecret.mjs.map +1 -0
- package/build/utils/metadata.d.mts +30 -0
- package/build/utils/metadata.d.mts.map +1 -0
- package/build/utils/metadata.mjs +23 -0
- package/build/utils/metadata.mjs.map +1 -0
- package/build/utils/proofRequest.mjs +10 -0
- package/build/utils/proofRequest.mjs.map +1 -0
- package/build/utils/proverDid.d.mts +12 -0
- package/build/utils/proverDid.d.mts.map +1 -0
- package/build/utils/proverDid.mjs +17 -0
- package/build/utils/proverDid.mjs.map +1 -0
- package/build/utils/revocationInterval.d.mts +12 -0
- package/build/utils/revocationInterval.d.mts.map +1 -0
- package/build/utils/revocationInterval.mjs +11 -0
- package/build/utils/revocationInterval.mjs.map +1 -0
- package/build/utils/sortRequestedCredentialsMatches.d.mts +1 -0
- package/build/utils/sortRequestedCredentialsMatches.mjs +22 -0
- package/build/utils/sortRequestedCredentialsMatches.mjs.map +1 -0
- package/build/utils/timestamp.d.mts +5 -0
- package/build/utils/timestamp.d.mts.map +1 -0
- package/build/utils/timestamp.mjs +6 -0
- package/build/utils/timestamp.mjs.map +1 -0
- package/build/utils/w3cAnonCredsUtils.d.mts +28 -0
- package/build/utils/w3cAnonCredsUtils.d.mts.map +1 -0
- package/build/utils/w3cAnonCredsUtils.mjs +101 -0
- package/build/utils/w3cAnonCredsUtils.mjs.map +1 -0
- package/package.json +20 -21
- package/build/AnonCredsApi.d.ts +0 -97
- package/build/AnonCredsApi.js +0 -582
- package/build/AnonCredsApi.js.map +0 -1
- package/build/AnonCredsApiOptions.d.ts +0 -24
- package/build/AnonCredsApiOptions.js +0 -3
- package/build/AnonCredsApiOptions.js.map +0 -1
- package/build/AnonCredsModule.d.ts +0 -24
- package/build/AnonCredsModule.js +0 -56
- package/build/AnonCredsModule.js.map +0 -1
- package/build/AnonCredsModuleConfig.d.ts +0 -72
- package/build/AnonCredsModuleConfig.js +0 -31
- package/build/AnonCredsModuleConfig.js.map +0 -1
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.d.ts +0 -27
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.js +0 -241
- package/build/anoncreds-rs/AnonCredsDataIntegrityService.js.map +0 -1
- package/build/anoncreds-rs/AnonCredsRsHolderService.d.ts +0 -38
- package/build/anoncreds-rs/AnonCredsRsHolderService.js +0 -622
- package/build/anoncreds-rs/AnonCredsRsHolderService.js.map +0 -1
- package/build/anoncreds-rs/AnonCredsRsIssuerService.d.ts +0 -12
- package/build/anoncreds-rs/AnonCredsRsIssuerService.js +0 -253
- package/build/anoncreds-rs/AnonCredsRsIssuerService.js.map +0 -1
- package/build/anoncreds-rs/AnonCredsRsVerifierService.d.ts +0 -8
- package/build/anoncreds-rs/AnonCredsRsVerifierService.js +0 -157
- package/build/anoncreds-rs/AnonCredsRsVerifierService.js.map +0 -1
- package/build/anoncreds-rs/index.d.ts +0 -3
- package/build/anoncreds-rs/index.js +0 -10
- package/build/anoncreds-rs/index.js.map +0 -1
- package/build/anoncreds-rs/utils.d.ts +0 -23
- package/build/anoncreds-rs/utils.js +0 -71
- package/build/anoncreds-rs/utils.js.map +0 -1
- package/build/error/AnonCredsError.d.ts +0 -6
- package/build/error/AnonCredsError.js +0 -11
- package/build/error/AnonCredsError.js.map +0 -1
- package/build/error/AnonCredsRsError.d.ts +0 -6
- package/build/error/AnonCredsRsError.js +0 -11
- package/build/error/AnonCredsRsError.js.map +0 -1
- package/build/error/AnonCredsStoreRecordError.d.ts +0 -6
- package/build/error/AnonCredsStoreRecordError.js +0 -11
- package/build/error/AnonCredsStoreRecordError.js.map +0 -1
- package/build/error/index.d.ts +0 -3
- package/build/error/index.js +0 -20
- package/build/error/index.js.map +0 -1
- package/build/formats/AnonCredsCredentialFormat.d.ts +0 -79
- package/build/formats/AnonCredsCredentialFormat.js +0 -3
- package/build/formats/AnonCredsCredentialFormat.js.map +0 -1
- package/build/formats/AnonCredsCredentialFormatService.d.ts +0 -80
- package/build/formats/AnonCredsCredentialFormatService.js +0 -433
- package/build/formats/AnonCredsCredentialFormatService.js.map +0 -1
- package/build/formats/AnonCredsProofFormat.d.ts +0 -70
- package/build/formats/AnonCredsProofFormat.js +0 -3
- package/build/formats/AnonCredsProofFormat.js.map +0 -1
- package/build/formats/AnonCredsProofFormatService.d.ts +0 -55
- package/build/formats/AnonCredsProofFormatService.js +0 -289
- package/build/formats/AnonCredsProofFormatService.js.map +0 -1
- package/build/formats/DataIntegrityCredentialFormatService.d.ts +0 -89
- package/build/formats/DataIntegrityCredentialFormatService.js +0 -773
- package/build/formats/DataIntegrityCredentialFormatService.js.map +0 -1
- package/build/formats/LegacyIndyCredentialFormat.d.ts +0 -32
- package/build/formats/LegacyIndyCredentialFormat.js +0 -3
- package/build/formats/LegacyIndyCredentialFormat.js.map +0 -1
- package/build/formats/LegacyIndyCredentialFormatService.d.ts +0 -80
- package/build/formats/LegacyIndyCredentialFormatService.js +0 -379
- package/build/formats/LegacyIndyCredentialFormatService.js.map +0 -1
- package/build/formats/LegacyIndyProofFormat.d.ts +0 -29
- package/build/formats/LegacyIndyProofFormat.js +0 -3
- package/build/formats/LegacyIndyProofFormat.js.map +0 -1
- package/build/formats/LegacyIndyProofFormatService.d.ts +0 -58
- package/build/formats/LegacyIndyProofFormatService.js +0 -374
- package/build/formats/LegacyIndyProofFormatService.js.map +0 -1
- package/build/formats/index.d.ts +0 -9
- package/build/formats/index.js +0 -32
- package/build/formats/index.js.map +0 -1
- package/build/index.d.ts +0 -21
- package/build/index.js +0 -54
- package/build/index.js.map +0 -1
- package/build/models/AnonCredsCredentialProposal.d.ts +0 -62
- package/build/models/AnonCredsCredentialProposal.js +0 -81
- package/build/models/AnonCredsCredentialProposal.js.map +0 -1
- package/build/models/AnonCredsProofRequest.d.ts +0 -27
- package/build/models/AnonCredsProofRequest.js +0 -82
- package/build/models/AnonCredsProofRequest.js.map +0 -1
- package/build/models/AnonCredsRequestedAttribute.d.ts +0 -16
- package/build/models/AnonCredsRequestedAttribute.js +0 -56
- package/build/models/AnonCredsRequestedAttribute.js.map +0 -1
- package/build/models/AnonCredsRequestedPredicate.d.ts +0 -19
- package/build/models/AnonCredsRequestedPredicate.js +0 -61
- package/build/models/AnonCredsRequestedPredicate.js.map +0 -1
- package/build/models/AnonCredsRestriction.d.ts +0 -55
- package/build/models/AnonCredsRestriction.js +0 -160
- package/build/models/AnonCredsRestriction.js.map +0 -1
- package/build/models/AnonCredsRestrictionWrapper.d.ts +0 -4
- package/build/models/AnonCredsRestrictionWrapper.js +0 -25
- package/build/models/AnonCredsRestrictionWrapper.js.map +0 -1
- package/build/models/AnonCredsRevocationInterval.d.ts +0 -5
- package/build/models/AnonCredsRevocationInterval.js +0 -33
- package/build/models/AnonCredsRevocationInterval.js.map +0 -1
- package/build/models/exchange.d.ts +0 -99
- package/build/models/exchange.js +0 -5
- package/build/models/exchange.js.map +0 -1
- package/build/models/index.d.ts +0 -4
- package/build/models/index.js +0 -21
- package/build/models/index.js.map +0 -1
- package/build/models/internal.d.ts +0 -35
- package/build/models/internal.js +0 -3
- package/build/models/internal.js.map +0 -1
- package/build/models/registry.d.ts +0 -39
- package/build/models/registry.js +0 -3
- package/build/models/registry.js.map +0 -1
- package/build/models/utils.d.ts +0 -22
- package/build/models/utils.js +0 -3
- package/build/models/utils.js.map +0 -1
- package/build/protocols/credentials/v1/V1CredentialProtocol.d.ts +0 -162
- package/build/protocols/credentials/v1/V1CredentialProtocol.js +0 -948
- package/build/protocols/credentials/v1/V1CredentialProtocol.js.map +0 -1
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.d.ts +0 -10
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js +0 -18
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js.map +0 -1
- package/build/protocols/credentials/v1/errors/index.d.ts +0 -1
- package/build/protocols/credentials/v1/errors/index.js +0 -6
- package/build/protocols/credentials/v1/errors/index.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.d.ts +0 -9
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js +0 -15
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.d.ts +0 -9
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js +0 -15
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.d.ts +0 -10
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js +0 -40
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.d.ts +0 -10
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js +0 -33
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.d.ts +0 -10
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js +0 -38
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.d.ts +0 -10
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js +0 -40
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js.map +0 -1
- package/build/protocols/credentials/v1/handlers/index.d.ts +0 -6
- package/build/protocols/credentials/v1/handlers/index.js +0 -23
- package/build/protocols/credentials/v1/handlers/index.js.map +0 -1
- package/build/protocols/credentials/v1/index.d.ts +0 -2
- package/build/protocols/credentials/v1/index.js +0 -19
- package/build/protocols/credentials/v1/index.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.d.ts +0 -16
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js +0 -34
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.d.ts +0 -26
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.js +0 -69
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.d.ts +0 -16
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js +0 -34
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.d.ts +0 -19
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js +0 -62
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.d.ts +0 -27
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js +0 -75
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.d.ts +0 -59
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js +0 -109
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js.map +0 -1
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.d.ts +0 -19
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js +0 -61
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js.map +0 -1
- package/build/protocols/credentials/v1/messages/index.d.ts +0 -7
- package/build/protocols/credentials/v1/messages/index.js +0 -24
- package/build/protocols/credentials/v1/messages/index.js.map +0 -1
- package/build/protocols/index.d.ts +0 -2
- package/build/protocols/index.js +0 -19
- package/build/protocols/index.js.map +0 -1
- package/build/protocols/proofs/v1/V1ProofProtocol.d.ts +0 -50
- package/build/protocols/proofs/v1/V1ProofProtocol.js +0 -864
- package/build/protocols/proofs/v1/V1ProofProtocol.js.map +0 -1
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.d.ts +0 -12
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js +0 -19
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js.map +0 -1
- package/build/protocols/proofs/v1/errors/index.d.ts +0 -1
- package/build/protocols/proofs/v1/errors/index.js +0 -18
- package/build/protocols/proofs/v1/errors/index.js.map +0 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.d.ts +0 -9
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js +0 -15
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js.map +0 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.d.ts +0 -10
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js +0 -40
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js.map +0 -1
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.d.ts +0 -9
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js +0 -15
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js.map +0 -1
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.d.ts +0 -11
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js +0 -38
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js.map +0 -1
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.d.ts +0 -10
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js +0 -35
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js.map +0 -1
- package/build/protocols/proofs/v1/handlers/index.d.ts +0 -5
- package/build/protocols/proofs/v1/handlers/index.js +0 -22
- package/build/protocols/proofs/v1/handlers/index.js.map +0 -1
- package/build/protocols/proofs/v1/index.d.ts +0 -4
- package/build/protocols/proofs/v1/index.js +0 -21
- package/build/protocols/proofs/v1/index.js.map +0 -1
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.d.ts +0 -8
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js +0 -27
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js.map +0 -1
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.d.ts +0 -31
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.js +0 -67
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.js.map +0 -1
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.d.ts +0 -16
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js +0 -34
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js.map +0 -1
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.d.ts +0 -26
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js +0 -53
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js.map +0 -1
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.d.ts +0 -29
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js +0 -65
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js.map +0 -1
- package/build/protocols/proofs/v1/messages/index.d.ts +0 -5
- package/build/protocols/proofs/v1/messages/index.js +0 -22
- package/build/protocols/proofs/v1/messages/index.js.map +0 -1
- package/build/protocols/proofs/v1/models/V1PresentationPreview.d.ts +0 -50
- package/build/protocols/proofs/v1/models/V1PresentationPreview.js +0 -130
- package/build/protocols/proofs/v1/models/V1PresentationPreview.js.map +0 -1
- package/build/protocols/proofs/v1/models/index.d.ts +0 -1
- package/build/protocols/proofs/v1/models/index.js +0 -18
- package/build/protocols/proofs/v1/models/index.js.map +0 -1
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.ts +0 -21
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js +0 -23
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js.map +0 -1
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.ts +0 -8
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js +0 -35
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js.map +0 -1
- package/build/repository/AnonCredsCredentialDefinitionRecord.d.ts +0 -39
- package/build/repository/AnonCredsCredentialDefinitionRecord.js +0 -30
- package/build/repository/AnonCredsCredentialDefinitionRecord.js.map +0 -1
- package/build/repository/AnonCredsCredentialDefinitionRepository.d.ts +0 -8
- package/build/repository/AnonCredsCredentialDefinitionRepository.js +0 -53
- package/build/repository/AnonCredsCredentialDefinitionRepository.js.map +0 -1
- package/build/repository/AnonCredsCredentialRecord.d.ts +0 -48
- package/build/repository/AnonCredsCredentialRecord.js +0 -37
- package/build/repository/AnonCredsCredentialRecord.js.map +0 -1
- package/build/repository/AnonCredsCredentialRepository.d.ts +0 -10
- package/build/repository/AnonCredsCredentialRepository.js +0 -41
- package/build/repository/AnonCredsCredentialRepository.js.map +0 -1
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.ts +0 -21
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.js +0 -23
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.js.map +0 -1
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.ts +0 -8
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.js +0 -35
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.js.map +0 -1
- package/build/repository/AnonCredsLinkSecretRecord.d.ts +0 -23
- package/build/repository/AnonCredsLinkSecretRecord.js +0 -22
- package/build/repository/AnonCredsLinkSecretRecord.js.map +0 -1
- package/build/repository/AnonCredsLinkSecretRepository.d.ts +0 -10
- package/build/repository/AnonCredsLinkSecretRepository.js +0 -41
- package/build/repository/AnonCredsLinkSecretRepository.js.map +0 -1
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.ts +0 -34
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js +0 -30
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js.map +0 -1
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.ts +0 -10
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js +0 -38
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js.map +0 -1
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.ts +0 -25
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js +0 -23
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js.map +0 -1
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.ts +0 -9
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js +0 -38
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js.map +0 -1
- package/build/repository/AnonCredsSchemaRecord.d.ts +0 -39
- package/build/repository/AnonCredsSchemaRecord.js +0 -30
- package/build/repository/AnonCredsSchemaRecord.js.map +0 -1
- package/build/repository/AnonCredsSchemaRepository.d.ts +0 -8
- package/build/repository/AnonCredsSchemaRepository.js +0 -53
- package/build/repository/AnonCredsSchemaRepository.js.map +0 -1
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts +0 -9
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js +0 -9
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js.map +0 -1
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts +0 -9
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js +0 -9
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js.map +0 -1
- package/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts +0 -9
- package/build/repository/anonCredsSchemaRecordMetadataTypes.js +0 -9
- package/build/repository/anonCredsSchemaRecordMetadataTypes.js.map +0 -1
- package/build/repository/index.d.ts +0 -16
- package/build/repository/index.js +0 -33
- package/build/repository/index.js.map +0 -1
- package/build/services/AnonCredsHolderService.d.ts +0 -18
- package/build/services/AnonCredsHolderService.js +0 -5
- package/build/services/AnonCredsHolderService.js.map +0 -1
- package/build/services/AnonCredsHolderServiceOptions.d.ts +0 -101
- package/build/services/AnonCredsHolderServiceOptions.js +0 -3
- package/build/services/AnonCredsHolderServiceOptions.js.map +0 -1
- package/build/services/AnonCredsIssuerService.d.ts +0 -14
- package/build/services/AnonCredsIssuerService.js +0 -5
- package/build/services/AnonCredsIssuerService.js.map +0 -1
- package/build/services/AnonCredsIssuerServiceOptions.d.ts +0 -61
- package/build/services/AnonCredsIssuerServiceOptions.js +0 -3
- package/build/services/AnonCredsIssuerServiceOptions.js.map +0 -1
- package/build/services/AnonCredsVerifierService.d.ts +0 -7
- package/build/services/AnonCredsVerifierService.js +0 -5
- package/build/services/AnonCredsVerifierService.js.map +0 -1
- package/build/services/AnonCredsVerifierServiceOptions.d.ts +0 -25
- package/build/services/AnonCredsVerifierServiceOptions.js +0 -3
- package/build/services/AnonCredsVerifierServiceOptions.js.map +0 -1
- package/build/services/index.d.ts +0 -8
- package/build/services/index.js +0 -27
- package/build/services/index.js.map +0 -1
- package/build/services/registry/AnonCredsRegistry.d.ts +0 -25
- package/build/services/registry/AnonCredsRegistry.js +0 -3
- package/build/services/registry/AnonCredsRegistry.js.map +0 -1
- package/build/services/registry/AnonCredsRegistryService.d.ts +0 -10
- package/build/services/registry/AnonCredsRegistryService.js +0 -33
- package/build/services/registry/AnonCredsRegistryService.js.map +0 -1
- package/build/services/registry/CredentialDefinitionOptions.d.ts +0 -34
- package/build/services/registry/CredentialDefinitionOptions.js +0 -3
- package/build/services/registry/CredentialDefinitionOptions.js.map +0 -1
- package/build/services/registry/RevocationRegistryDefinitionOptions.d.ts +0 -34
- package/build/services/registry/RevocationRegistryDefinitionOptions.js +0 -3
- package/build/services/registry/RevocationRegistryDefinitionOptions.js.map +0 -1
- package/build/services/registry/RevocationStatusListOptions.d.ts +0 -32
- package/build/services/registry/RevocationStatusListOptions.js +0 -3
- package/build/services/registry/RevocationStatusListOptions.js.map +0 -1
- package/build/services/registry/SchemaOptions.d.ts +0 -34
- package/build/services/registry/SchemaOptions.js +0 -3
- package/build/services/registry/SchemaOptions.js.map +0 -1
- package/build/services/registry/base.d.ts +0 -19
- package/build/services/registry/base.js +0 -3
- package/build/services/registry/base.js.map +0 -1
- package/build/services/registry/index.d.ts +0 -7
- package/build/services/registry/index.js +0 -23
- package/build/services/registry/index.js.map +0 -1
- package/build/services/tails/BasicTailsFileService.d.ts +0 -23
- package/build/services/tails/BasicTailsFileService.js +0 -65
- package/build/services/tails/BasicTailsFileService.js.map +0 -1
- package/build/services/tails/TailsFileService.d.ts +0 -42
- package/build/services/tails/TailsFileService.js +0 -3
- package/build/services/tails/TailsFileService.js.map +0 -1
- package/build/services/tails/index.d.ts +0 -2
- package/build/services/tails/index.js +0 -19
- package/build/services/tails/index.js.map +0 -1
- package/build/updates/0.3.1-0.4/credentialDefinition.d.ts +0 -18
- package/build/updates/0.3.1-0.4/credentialDefinition.js +0 -56
- package/build/updates/0.3.1-0.4/credentialDefinition.js.map +0 -1
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.d.ts +0 -69
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.js +0 -121
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.js.map +0 -1
- package/build/updates/0.3.1-0.4/index.d.ts +0 -2
- package/build/updates/0.3.1-0.4/index.js +0 -14
- package/build/updates/0.3.1-0.4/index.js.map +0 -1
- package/build/updates/0.3.1-0.4/linkSecret.d.ts +0 -6
- package/build/updates/0.3.1-0.4/linkSecret.js +0 -35
- package/build/updates/0.3.1-0.4/linkSecret.js.map +0 -1
- package/build/updates/0.3.1-0.4/schema.d.ts +0 -15
- package/build/updates/0.3.1-0.4/schema.js +0 -41
- package/build/updates/0.3.1-0.4/schema.js.map +0 -1
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.d.ts +0 -5
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.js +0 -149
- package/build/updates/0.4-0.5/anonCredsCredentialRecord.js.map +0 -1
- package/build/updates/0.4-0.5/index.d.ts +0 -2
- package/build/updates/0.4-0.5/index.js +0 -8
- package/build/updates/0.4-0.5/index.js.map +0 -1
- package/build/utils/anonCredsObjects.d.ts +0 -26
- package/build/utils/anonCredsObjects.js +0 -81
- package/build/utils/anonCredsObjects.js.map +0 -1
- package/build/utils/areRequestsEqual.d.ts +0 -6
- package/build/utils/areRequestsEqual.js +0 -135
- package/build/utils/areRequestsEqual.js.map +0 -1
- package/build/utils/composeAutoAccept.d.ts +0 -15
- package/build/utils/composeAutoAccept.js +0 -26
- package/build/utils/composeAutoAccept.js.map +0 -1
- package/build/utils/createRequestFromPreview.d.ts +0 -10
- package/build/utils/createRequestFromPreview.js +0 -71
- package/build/utils/createRequestFromPreview.js.map +0 -1
- package/build/utils/credential.d.ts +0 -68
- package/build/utils/credential.js +0 -188
- package/build/utils/credential.js.map +0 -1
- package/build/utils/credentialPreviewAttributes.d.ts +0 -2
- package/build/utils/credentialPreviewAttributes.js +0 -24
- package/build/utils/credentialPreviewAttributes.js.map +0 -1
- package/build/utils/getCredentialsForAnonCredsRequest.d.ts +0 -4
- package/build/utils/getCredentialsForAnonCredsRequest.js +0 -81
- package/build/utils/getCredentialsForAnonCredsRequest.js.map +0 -1
- package/build/utils/getRevocationRegistries.d.ts +0 -14
- package/build/utils/getRevocationRegistries.js +0 -151
- package/build/utils/getRevocationRegistries.js.map +0 -1
- package/build/utils/hasDuplicateGroupNames.d.ts +0 -2
- package/build/utils/hasDuplicateGroupNames.js +0 -22
- package/build/utils/hasDuplicateGroupNames.js.map +0 -1
- package/build/utils/index.d.ts +0 -17
- package/build/utils/index.js +0 -48
- package/build/utils/index.js.map +0 -1
- package/build/utils/indyIdentifiers.d.ts +0 -66
- package/build/utils/indyIdentifiers.js +0 -298
- package/build/utils/indyIdentifiers.js.map +0 -1
- package/build/utils/isMap.d.ts +0 -5
- package/build/utils/isMap.js +0 -17
- package/build/utils/isMap.js.map +0 -1
- package/build/utils/linkSecret.d.ts +0 -9
- package/build/utils/linkSecret.js +0 -43
- package/build/utils/linkSecret.js.map +0 -1
- package/build/utils/metadata.d.ts +0 -35
- package/build/utils/metadata.js +0 -24
- package/build/utils/metadata.js.map +0 -1
- package/build/utils/proofRequest.d.ts +0 -2
- package/build/utils/proofRequest.js +0 -21
- package/build/utils/proofRequest.js.map +0 -1
- package/build/utils/proverDid.d.ts +0 -8
- package/build/utils/proverDid.js +0 -15
- package/build/utils/proverDid.js.map +0 -1
- package/build/utils/revocationInterval.d.ts +0 -7
- package/build/utils/revocationInterval.js +0 -14
- package/build/utils/revocationInterval.js.map +0 -1
- package/build/utils/sortRequestedCredentialsMatches.d.ts +0 -8
- package/build/utils/sortRequestedCredentialsMatches.js +0 -31
- package/build/utils/sortRequestedCredentialsMatches.js.map +0 -1
- package/build/utils/timestamp.d.ts +0 -1
- package/build/utils/timestamp.js +0 -7
- package/build/utils/timestamp.js.map +0 -1
- package/build/utils/w3cAnonCredsUtils.d.ts +0 -37
- package/build/utils/w3cAnonCredsUtils.js +0 -132
- package/build/utils/w3cAnonCredsUtils.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1Protocol.mjs","names":[],"sources":["../../../../src/protocols/credentials/v1/DidCommCredentialV1Protocol.ts"],"sourcesContent":["import type { AgentContext } from '@credo-ts/core'\nimport { CredoError, JsonTransformer, utils } from '@credo-ts/core'\nimport type {\n CredentialProtocolOptions,\n DidCommCredentialProtocol,\n DidCommFeatureRegistry,\n DidCommInboundMessageContext,\n DidCommMessage,\n DidCommMessageHandlerRegistry,\n DidCommProblemReportMessage,\n ExtractCredentialFormats,\n} from '@credo-ts/didcomm'\nimport {\n AckStatus,\n BaseDidCommCredentialProtocol,\n DidCommAttachment,\n DidCommAttachmentData,\n DidCommAutoAcceptCredential,\n DidCommConnectionService,\n DidCommCredentialExchangeRecord,\n DidCommCredentialExchangeRepository,\n DidCommCredentialProblemReportReason,\n DidCommCredentialRole,\n DidCommCredentialState,\n DidCommCredentialsModuleConfig,\n DidCommMessageRepository,\n DidCommMessageRole,\n DidCommProtocol,\n} from '@credo-ts/didcomm'\nimport type { LegacyIndyDidCommCredentialFormatService } from '../../../formats'\n\nimport { AnonCredsCredentialProposal } from '../../../models/AnonCredsCredentialProposal'\nimport { areCredentialPreviewAttributesEqual, composeCredentialAutoAccept } from '../../../utils'\n\nimport {\n DidCommCredentialV1AckHandler,\n DidCommCredentialV1ProblemReportHandler,\n DidCommIssueCredentialV1Handler,\n DidCommOfferCredentialV1Handler,\n DidCommProposeCredentialV1Handler,\n DidCommRequestCredentialV1Handler,\n} from './handlers'\nimport {\n DidCommCredentialV1AckMessage,\n DidCommCredentialV1Preview,\n DidCommCredentialV1ProblemReportMessage,\n DidCommIssueCredentialV1Message,\n DidCommProposeCredentialV1Message,\n DidCommRequestCredentialV1Message,\n INDY_CREDENTIAL_ATTACHMENT_ID,\n INDY_CREDENTIAL_OFFER_ATTACHMENT_ID,\n INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID,\n V1OfferCredentialMessage,\n} from './messages'\n\nexport interface DidCommCredentialV1ProtocolConfig {\n indyCredentialFormat: LegacyIndyDidCommCredentialFormatService\n}\n\nexport class DidCommCredentialV1Protocol\n extends BaseDidCommCredentialProtocol<[LegacyIndyDidCommCredentialFormatService]>\n implements DidCommCredentialProtocol<[LegacyIndyDidCommCredentialFormatService]>\n{\n private indyCredentialFormat: LegacyIndyDidCommCredentialFormatService\n\n public constructor({ indyCredentialFormat }: DidCommCredentialV1ProtocolConfig) {\n super()\n\n // TODO: just create a new instance of LegacyIndyDidCommCredentialFormatService here so it makes the setup easier\n this.indyCredentialFormat = indyCredentialFormat\n }\n\n /**\n * The version of the issue credential protocol this protocol supports\n */\n public readonly version = 'v1'\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 V1 Protocol\n messageHandlerRegistry.registerMessageHandlers([\n new DidCommProposeCredentialV1Handler(this),\n new DidCommOfferCredentialV1Handler(this),\n new DidCommRequestCredentialV1Handler(this),\n new DidCommIssueCredentialV1Handler(this),\n new DidCommCredentialV1AckHandler(this),\n new DidCommCredentialV1ProblemReportHandler(this),\n ])\n\n // Register Issue Credential V1 in feature registry, with supported roles\n featureRegistry.register(\n new DidCommProtocol({\n id: 'https://didcomm.org/issue-credential/1.0',\n roles: ['holder', 'issuer'],\n })\n )\n }\n\n /**\n * Create a {@link ProposeCredentialMessage} not bound to an existing credential exchange.\n * To create a proposal as response to an existing credential exchange, use {@link createProposalAsResponse}.\n *\n * @param options The object containing config options\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 autoAcceptCredential,\n }: CredentialProtocolOptions.CreateCredentialProposalOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommMessage>> {\n this.assertOnlyIndyFormat(credentialFormats)\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n if (!credentialFormats.indy) {\n throw new CredoError('Missing indy credential format in v1 create proposal call.')\n }\n\n // Create record\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: 'v1',\n })\n\n // call create proposal for validation of the proposal\n const { previewAttributes, attachment } = await this.indyCredentialFormat.createProposal(agentContext, {\n credentialFormats,\n credentialExchangeRecord,\n })\n\n // Transform the attachment into the attachment payload and use that to construct the v1 message\n const indyCredentialProposal = JsonTransformer.fromJSON(attachment.getDataAsJson(), AnonCredsCredentialProposal)\n\n const credentialProposal = previewAttributes\n ? new DidCommCredentialV1Preview({\n attributes: previewAttributes,\n })\n : undefined\n\n // Create message\n const message = new DidCommProposeCredentialV1Message({\n ...indyCredentialProposal,\n id: credentialExchangeRecord.threadId,\n credentialPreview: credentialProposal,\n comment,\n })\n\n await didCommMessageRepository.saveAgentMessage(agentContext, {\n agentMessage: message,\n role: DidCommMessageRole.Sender,\n associatedRecordId: credentialExchangeRecord.id,\n })\n\n credentialExchangeRecord.credentialAttributes = credentialProposal?.attributes\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Process a received {@link ProposeCredentialMessage}. This will not accept the credential proposal\n * or send a credential offer. It will only create a new, or update the existing credential record with\n * the information from the credential proposal message. Use {@link createOfferAsResponse}\n * after calling this method to create a credential offer.\n *\n * @param messageContext The message context containing a credential proposal message\n * @returns credential record associated with the credential proposal message\n *\n */\n public async processProposal(\n messageContext: DidCommInboundMessageContext<DidCommProposeCredentialV1Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: proposalMessage, connection, agentContext } = messageContext\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // TODO: with this method, we should update the credential protocol to use the ConnectionApi, so it\n // only depends on the public api, rather than the internal API (this helps with breaking changes)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential proposal with message id ${proposalMessage.id}`)\n\n let credentialExchangeRecord = await this.findByProperties(messageContext.agentContext, {\n threadId: proposalMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n connectionId: connection?.id,\n })\n\n // Credential record already exists, this is a response to an earlier message sent by us\n if (credentialExchangeRecord) {\n agentContext.config.logger.debug('Credential record already exists for incoming proposal')\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferSent)\n\n const lastReceivedMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV1Message,\n role: DidCommMessageRole.Receiver,\n })\n const lastSentMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: V1OfferCredentialMessage,\n role: DidCommMessageRole.Sender,\n })\n\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage,\n lastSentMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n await this.indyCredentialFormat.processProposal(messageContext.agentContext, {\n credentialExchangeRecord,\n attachment: new DidCommAttachment({\n data: new DidCommAttachmentData({\n json: JsonTransformer.toJSON(this.rfc0592ProposalFromV1ProposeMessage(proposalMessage)),\n }),\n }),\n })\n\n // Update record\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.ProposalReceived\n )\n await didCommMessageRepository.saveOrUpdateAgentMessage(messageContext.agentContext, {\n agentMessage: proposalMessage,\n role: DidCommMessageRole.Receiver,\n associatedRecordId: credentialExchangeRecord.id,\n })\n } else {\n agentContext.config.logger.debug('Credential record does not exists yet for incoming proposal')\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 state: DidCommCredentialState.ProposalReceived,\n role: DidCommCredentialRole.Issuer,\n protocolVersion: 'v1',\n })\n\n // Save record\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n\n await didCommMessageRepository.saveAgentMessage(messageContext.agentContext, {\n agentMessage: proposalMessage,\n role: DidCommMessageRole.Receiver,\n associatedRecordId: credentialExchangeRecord.id,\n })\n }\n return credentialExchangeRecord\n }\n\n /**\n * Processing an incoming credential message and create a credential offer as a response\n * @param options The object containing config options\n * @returns Object containing proposal message and associated credential record\n */\n public async acceptProposal(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n comment,\n autoAcceptCredential,\n }: CredentialProtocolOptions.AcceptCredentialProposalOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<V1OfferCredentialMessage>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalReceived)\n if (credentialFormats) this.assertOnlyIndyFormat(credentialFormats)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n const proposalMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV1Message,\n role: DidCommMessageRole.Receiver,\n })\n\n // NOTE: We set the credential attributes from the proposal on the record as we've 'accepted' them\n // and can now use them to create the offer in the format services. It may be overwritten later on\n // if the user provided other attributes in the credentialFormats array.\n credentialExchangeRecord.credentialAttributes = proposalMessage.credentialPreview?.attributes\n\n const { attachment, previewAttributes } = await this.indyCredentialFormat.acceptProposal(agentContext, {\n attachmentId: INDY_CREDENTIAL_OFFER_ATTACHMENT_ID,\n credentialFormats,\n credentialExchangeRecord,\n proposalAttachment: new DidCommAttachment({\n data: new DidCommAttachmentData({\n json: JsonTransformer.toJSON(this.rfc0592ProposalFromV1ProposeMessage(proposalMessage)),\n }),\n }),\n })\n\n if (!previewAttributes) {\n throw new CredoError('Missing required credential preview attributes from indy format service')\n }\n\n const message = new V1OfferCredentialMessage({\n comment,\n offerAttachments: [attachment],\n credentialPreview: new DidCommCredentialV1Preview({\n attributes: previewAttributes,\n }),\n })\n\n message.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n credentialExchangeRecord.credentialAttributes = message.credentialPreview.attributes\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.OfferSent)\n\n await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {\n agentMessage: message,\n role: DidCommMessageRole.Sender,\n associatedRecordId: credentialExchangeRecord.id,\n })\n\n return { credentialExchangeRecord, message }\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 record associated with the credential offer and the corresponding new offer message\n *\n */\n public async negotiateProposal(\n agentContext: AgentContext,\n {\n credentialFormats,\n credentialExchangeRecord,\n comment,\n autoAcceptCredential,\n }: CredentialProtocolOptions.NegotiateCredentialProposalOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<V1OfferCredentialMessage>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalReceived)\n this.assertOnlyIndyFormat(credentialFormats)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n const { attachment, previewAttributes } = await this.indyCredentialFormat.createOffer(agentContext, {\n attachmentId: INDY_CREDENTIAL_OFFER_ATTACHMENT_ID,\n credentialFormats,\n credentialExchangeRecord,\n })\n\n if (!previewAttributes) {\n throw new CredoError('Missing required credential preview attributes from indy format service')\n }\n\n const message = new V1OfferCredentialMessage({\n comment,\n offerAttachments: [attachment],\n credentialPreview: new DidCommCredentialV1Preview({\n attributes: previewAttributes,\n }),\n })\n message.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n credentialExchangeRecord.credentialAttributes = message.credentialPreview.attributes\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.OfferSent)\n\n await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {\n agentMessage: message,\n role: DidCommMessageRole.Sender,\n associatedRecordId: credentialExchangeRecord.id,\n })\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Create a {@link OfferCredentialMessage} not bound to an existing credential exchange.\n * To create an offer as response to an existing credential exchange, use {@link DidCommCredentialV1Protocol#createOfferAsResponse}.\n *\n * @param options The options containing config params for creating the credential 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 connectionRecord,\n }: CredentialProtocolOptions.CreateCredentialOfferOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<V1OfferCredentialMessage>> {\n // Assert\n this.assertOnlyIndyFormat(credentialFormats)\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n if (!credentialFormats.indy) {\n throw new CredoError('Missing indy credential format data for v1 create offer')\n }\n\n // Create record\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: 'v1',\n })\n\n const { attachment, previewAttributes } = await this.indyCredentialFormat.createOffer(agentContext, {\n attachmentId: INDY_CREDENTIAL_OFFER_ATTACHMENT_ID,\n credentialFormats,\n credentialExchangeRecord,\n })\n\n if (!previewAttributes) {\n throw new CredoError('Missing required credential preview from indy format service')\n }\n\n // Construct offer message\n const message = new V1OfferCredentialMessage({\n id: credentialExchangeRecord.threadId,\n credentialPreview: new DidCommCredentialV1Preview({\n attributes: previewAttributes,\n }),\n comment,\n offerAttachments: [attachment],\n })\n\n await didCommMessageRepository.saveAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n agentMessage: message,\n role: DidCommMessageRole.Sender,\n })\n\n credentialExchangeRecord.credentialAttributes = message.credentialPreview.attributes\n await credentialRepository.save(agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(agentContext, credentialExchangeRecord, null)\n\n return { message, credentialExchangeRecord }\n }\n\n /**\n * Process a received {@link OfferCredentialMessage}. This will not accept the credential offer\n * or send a credential request. It will only create a new credential record with\n * the information from the credential offer message. Use {@link createRequest}\n * after calling this method to create a credential request.\n *\n * @param messageContext The message context containing a credential request message\n * @returns credential record associated with the credential offer message\n *\n */\n public async processOffer(\n messageContext: DidCommInboundMessageContext<V1OfferCredentialMessage>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: offerMessage, connection, agentContext } = messageContext\n\n const credentialRepository = agentContext.dependencyManager.resolve(DidCommCredentialExchangeRepository)\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // TODO: with this method, we should update the credential protocol to use the ConnectionApi, so it\n // only depends on the public api, rather than the internal API (this helps with breaking changes)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential offer with id ${offerMessage.id}`)\n\n let credentialExchangeRecord = await this.findByProperties(agentContext, {\n threadId: offerMessage.threadId,\n role: DidCommCredentialRole.Holder,\n connectionId: connection?.id,\n })\n\n const offerAttachment = offerMessage.getOfferAttachmentById(INDY_CREDENTIAL_OFFER_ATTACHMENT_ID)\n if (!offerAttachment) {\n throw new CredoError(`Indy attachment with id ${INDY_CREDENTIAL_OFFER_ATTACHMENT_ID} not found in offer message`)\n }\n\n if (credentialExchangeRecord) {\n const lastSentMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV1Message,\n role: DidCommMessageRole.Sender,\n })\n const lastReceivedMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: V1OfferCredentialMessage,\n role: DidCommMessageRole.Receiver,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.ProposalSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage,\n lastSentMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n await this.indyCredentialFormat.processOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n attachment: offerAttachment,\n })\n\n await didCommMessageRepository.saveOrUpdateAgentMessage(messageContext.agentContext, {\n agentMessage: offerMessage,\n role: DidCommMessageRole.Receiver,\n associatedRecordId: credentialExchangeRecord.id,\n })\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.OfferReceived\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: offerMessage.threadId,\n parentThreadId: offerMessage.thread?.parentThreadId,\n state: DidCommCredentialState.OfferReceived,\n role: DidCommCredentialRole.Holder,\n protocolVersion: 'v1',\n })\n\n await this.indyCredentialFormat.processOffer(messageContext.agentContext, {\n credentialExchangeRecord,\n attachment: offerAttachment,\n })\n\n // Save in repository\n await didCommMessageRepository.saveAgentMessage(messageContext.agentContext, {\n agentMessage: offerMessage,\n role: DidCommMessageRole.Receiver,\n associatedRecordId: credentialExchangeRecord.id,\n })\n await credentialRepository.save(messageContext.agentContext, credentialExchangeRecord)\n this.emitStateChangedEvent(messageContext.agentContext, credentialExchangeRecord, null)\n\n return credentialExchangeRecord\n }\n\n /**\n * Create a {@link RequestCredentialMessage} as response to a received credential offer.\n *\n * @param options configuration to use for the credential request\n * @returns Object containing request message and associated credential record\n *\n */\n public async acceptOffer(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n comment,\n autoAcceptCredential,\n }: CredentialProtocolOptions.AcceptCredentialOfferOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommRequestCredentialV1Message>> {\n // Assert credential\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferReceived)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n const offerMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: V1OfferCredentialMessage,\n role: DidCommMessageRole.Receiver,\n })\n\n const offerAttachment = offerMessage.getOfferAttachmentById(INDY_CREDENTIAL_OFFER_ATTACHMENT_ID)\n if (!offerAttachment) {\n throw new CredoError(`Indy attachment with id ${INDY_CREDENTIAL_OFFER_ATTACHMENT_ID} not found in offer message`)\n }\n\n const { attachment } = await this.indyCredentialFormat.acceptOffer(agentContext, {\n credentialExchangeRecord,\n credentialFormats,\n attachmentId: INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID,\n offerAttachment,\n })\n\n const requestMessage = new DidCommRequestCredentialV1Message({\n comment,\n requestAttachments: [attachment],\n })\n requestMessage.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n credentialExchangeRecord.credentialAttributes = offerMessage.credentialPreview.attributes\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n\n await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {\n agentMessage: requestMessage,\n associatedRecordId: credentialExchangeRecord.id,\n role: DidCommMessageRole.Sender,\n })\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.RequestSent)\n\n return { message: requestMessage, credentialExchangeRecord }\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 *\n * @param messageContext The message context containing a credential request message\n * @returns credential record associated with the credential request message\n *\n */\n public async negotiateOffer(\n agentContext: AgentContext,\n {\n credentialFormats,\n credentialExchangeRecord,\n autoAcceptCredential,\n comment,\n }: CredentialProtocolOptions.NegotiateCredentialOfferOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommMessage>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.OfferReceived)\n this.assertOnlyIndyFormat(credentialFormats)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\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 if (!credentialFormats.indy) {\n throw new CredoError('Missing indy credential format in v1 negotiate proposal call.')\n }\n\n // call create proposal for validation of the proposal\n // As the format is different for v1 of the issue credential protocol we won't be using the attachment\n const { previewAttributes, attachment } = await this.indyCredentialFormat.createProposal(agentContext, {\n credentialFormats,\n credentialExchangeRecord,\n })\n\n // Transform the attachment into the attachment payload and use that to construct the v1 message\n const indyCredentialProposal = JsonTransformer.fromJSON(attachment.getDataAsJson(), AnonCredsCredentialProposal)\n\n const credentialProposal = previewAttributes\n ? new DidCommCredentialV1Preview({\n attributes: previewAttributes,\n })\n : undefined\n\n // Create message\n const message = new DidCommProposeCredentialV1Message({\n ...indyCredentialProposal,\n credentialPreview: credentialProposal,\n comment,\n })\n\n message.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n\n await didCommMessageRepository.saveOrUpdateAgentMessage(agentContext, {\n agentMessage: message,\n role: DidCommMessageRole.Sender,\n associatedRecordId: credentialExchangeRecord.id,\n })\n\n // Update record\n credentialExchangeRecord.credentialAttributes = message.credentialPreview?.attributes\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.ProposalSent)\n\n return { credentialExchangeRecord, message }\n }\n\n /**\n * Starting from a request is not supported in v1 of the issue credential protocol\n * because indy doesn't allow to start from a request\n */\n public async createRequest(): Promise<\n CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommRequestCredentialV1Message>\n > {\n throw new CredoError('Starting from a request is not supported for v1 issue credential protocol')\n }\n\n public async processRequest(\n messageContext: DidCommInboundMessageContext<DidCommRequestCredentialV1Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: requestMessage, connection, agentContext } = messageContext\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // TODO: with this method, we should update the credential protocol to use the ConnectionApi, so it\n // only depends on the public api, rather than the internal API (this helps with breaking changes)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n agentContext.config.logger.debug(`Processing credential request with id ${requestMessage.id}`)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: requestMessage.threadId,\n role: DidCommCredentialRole.Issuer,\n })\n\n agentContext.config.logger.trace(\n 'Credential record found when processing credential request',\n credentialExchangeRecord\n )\n\n const proposalMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommProposeCredentialV1Message,\n role: DidCommMessageRole.Receiver,\n })\n const offerMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: V1OfferCredentialMessage,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\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 credentialExchangeRecord.connectionId = connection?.id\n }\n\n const requestAttachment = requestMessage.getRequestAttachmentById(INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID)\n\n if (!requestAttachment) {\n throw new CredoError(\n `Indy attachment with id ${INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID} not found in request message`\n )\n }\n\n await this.indyCredentialFormat.processRequest(messageContext.agentContext, {\n credentialExchangeRecord,\n attachment: requestAttachment,\n })\n\n await didCommMessageRepository.saveAgentMessage(messageContext.agentContext, {\n agentMessage: requestMessage,\n role: DidCommMessageRole.Receiver,\n associatedRecordId: credentialExchangeRecord.id,\n })\n\n await this.updateState(\n messageContext.agentContext,\n credentialExchangeRecord,\n DidCommCredentialState.RequestReceived\n )\n\n return credentialExchangeRecord\n }\n\n /**\n * Create a {@link DidCommIssueCredentialV1Message} as response to a received credential request.\n *\n * @returns Object containing issue credential message and associated credential record\n *\n */\n public async acceptRequest(\n agentContext: AgentContext,\n {\n credentialExchangeRecord,\n credentialFormats,\n comment,\n autoAcceptCredential,\n }: CredentialProtocolOptions.AcceptCredentialRequestOptions<[LegacyIndyDidCommCredentialFormatService]>\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommIssueCredentialV1Message>> {\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.RequestReceived)\n if (credentialFormats) this.assertOnlyIndyFormat(credentialFormats)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n const offerMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: V1OfferCredentialMessage,\n role: DidCommMessageRole.Sender,\n })\n const requestMessage = await didCommMessageRepository.getAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV1Message,\n role: DidCommMessageRole.Receiver,\n })\n\n const offerAttachment = offerMessage.getOfferAttachmentById(INDY_CREDENTIAL_OFFER_ATTACHMENT_ID)\n const requestAttachment = requestMessage.getRequestAttachmentById(INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID)\n\n if (!offerAttachment || !requestAttachment) {\n throw new CredoError(\n `Missing data payload in offer or request attachment in credential Record ${credentialExchangeRecord.id}`\n )\n }\n\n const { attachment } = await this.indyCredentialFormat.acceptRequest(agentContext, {\n credentialExchangeRecord,\n requestAttachment,\n offerAttachment,\n attachmentId: INDY_CREDENTIAL_ATTACHMENT_ID,\n credentialFormats,\n })\n\n const issueMessage = new DidCommIssueCredentialV1Message({\n comment,\n credentialAttachments: [attachment],\n })\n\n issueMessage.setThread({\n threadId: credentialExchangeRecord.threadId,\n parentThreadId: credentialExchangeRecord.parentThreadId,\n })\n issueMessage.setPleaseAck()\n\n await didCommMessageRepository.saveAgentMessage(agentContext, {\n agentMessage: issueMessage,\n associatedRecordId: credentialExchangeRecord.id,\n role: DidCommMessageRole.Sender,\n })\n\n credentialExchangeRecord.autoAcceptCredential =\n autoAcceptCredential ?? credentialExchangeRecord.autoAcceptCredential\n await this.updateState(agentContext, credentialExchangeRecord, DidCommCredentialState.CredentialIssued)\n\n return { message: issueMessage, credentialExchangeRecord }\n }\n\n /**\n * Process an incoming {@link DidCommIssueCredentialV1Message}\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 processCredential(\n messageContext: DidCommInboundMessageContext<DidCommIssueCredentialV1Message>\n ): Promise<DidCommCredentialExchangeRecord> {\n const { message: issueMessage, connection, agentContext } = messageContext\n\n agentContext.config.logger.debug(`Processing credential with id ${issueMessage.id}`)\n\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n // TODO: with this method, we should update the credential protocol to use the ConnectionApi, so it\n // only depends on the public api, rather than the internal API (this helps with breaking changes)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: issueMessage.threadId,\n role: DidCommCredentialRole.Holder,\n connectionId: connection?.id,\n })\n\n const requestCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV1Message,\n role: DidCommMessageRole.Sender,\n })\n const offerCredentialMessage = await didCommMessageRepository.findAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: V1OfferCredentialMessage,\n role: DidCommMessageRole.Receiver,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.RequestSent)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: offerCredentialMessage,\n lastSentMessage: requestCredentialMessage,\n expectedConnectionId: credentialExchangeRecord.connectionId,\n })\n\n const issueAttachment = issueMessage.getCredentialAttachmentById(INDY_CREDENTIAL_ATTACHMENT_ID)\n if (!issueAttachment) {\n throw new CredoError('Missing indy credential attachment in processCredential')\n }\n\n const requestAttachment = requestCredentialMessage?.getRequestAttachmentById(INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID)\n if (!requestAttachment) {\n throw new CredoError('Missing indy credential request attachment in processCredential')\n }\n\n const offerAttachment = offerCredentialMessage?.getOfferAttachmentById(INDY_CREDENTIAL_OFFER_ATTACHMENT_ID)\n if (!offerAttachment) {\n throw new CredoError('Missing indy credential request attachment in processCredential')\n }\n\n await this.indyCredentialFormat.processCredential(messageContext.agentContext, {\n offerAttachment,\n attachment: issueAttachment,\n credentialExchangeRecord,\n requestAttachment,\n })\n\n await didCommMessageRepository.saveAgentMessage(messageContext.agentContext, {\n agentMessage: issueMessage,\n role: DidCommMessageRole.Receiver,\n associatedRecordId: credentialExchangeRecord.id,\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 CredentialAckMessage} 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 }: CredentialProtocolOptions.AcceptCredentialOptions\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommCredentialV1AckMessage>> {\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.CredentialReceived)\n\n // Create message\n const ackMessage = new DidCommCredentialV1AckMessage({\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<DidCommCredentialV1AckMessage>\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\n // TODO: with this method, we should update the credential protocol to use the ConnectionApi, so it\n // only depends on the public api, rather than the internal API (this helps with breaking changes)\n const connectionService = agentContext.dependencyManager.resolve(DidCommConnectionService)\n\n const credentialExchangeRecord = await this.getByProperties(messageContext.agentContext, {\n threadId: ackMessage.threadId,\n\n role: DidCommCredentialRole.Issuer,\n connectionId: connection?.id,\n })\n\n const requestCredentialMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommRequestCredentialV1Message,\n role: DidCommMessageRole.Receiver,\n })\n const issueCredentialMessage = await didCommMessageRepository.getAgentMessage(messageContext.agentContext, {\n associatedRecordId: credentialExchangeRecord.id,\n messageClass: DidCommIssueCredentialV1Message,\n role: DidCommMessageRole.Sender,\n })\n\n // Assert\n credentialExchangeRecord.assertProtocolVersion('v1')\n credentialExchangeRecord.assertState(DidCommCredentialState.CredentialIssued)\n await connectionService.assertConnectionOrOutOfBandExchange(messageContext, {\n lastReceivedMessage: requestCredentialMessage,\n lastSentMessage: issueCredentialMessage,\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 DidCommCredentialV1ProblemReportMessage} to be sent.\n *\n * @param message message to send\n * @returns a {@link DidCommCredentialV1ProblemReportMessage}\n *\n */\n public async createProblemReport(\n _agentContext: AgentContext,\n { credentialExchangeRecord, description }: CredentialProtocolOptions.CreateCredentialProblemReportOptions\n ): Promise<CredentialProtocolOptions.CredentialProtocolMsgReturnType<DidCommProblemReportMessage>> {\n const message = new DidCommCredentialV1ProblemReportMessage({\n description: {\n en: description,\n code: DidCommCredentialProblemReportReason.IssuanceAbandoned,\n },\n })\n\n return { message, credentialExchangeRecord }\n }\n\n // AUTO RESPOND METHODS\n public async shouldAutoRespondToProposal(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n proposalMessage: DidCommProposeCredentialV1Message\n }\n ) {\n const { credentialExchangeRecord, proposalMessage } = options\n\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeCredentialAutoAccept(\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\n // Do not auto accept if missing properties\n if (!offerMessage || !offerMessage.credentialPreview) return false\n if (!proposalMessage.credentialPreview || !proposalMessage.credentialDefinitionId) return false\n\n const credentialOfferJson = offerMessage.indyCredentialOffer\n\n // Check if credential definition id matches\n if (!credentialOfferJson) return false\n if (credentialOfferJson.cred_def_id !== proposalMessage.credentialDefinitionId) return false\n\n // Check if preview values match\n return areCredentialPreviewAttributesEqual(\n proposalMessage.credentialPreview.attributes,\n offerMessage.credentialPreview.attributes\n )\n }\n\n public async shouldAutoRespondToOffer(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n offerMessage: V1OfferCredentialMessage\n }\n ) {\n const { credentialExchangeRecord, offerMessage } = options\n\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeCredentialAutoAccept(\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 // Do not auto accept if missing properties\n if (!offerMessage.credentialPreview) return false\n if (!proposalMessage || !proposalMessage.credentialPreview || !proposalMessage.credentialDefinitionId) return false\n\n const credentialOfferJson = offerMessage.indyCredentialOffer\n\n // Check if credential definition id matches\n if (!credentialOfferJson) return false\n if (credentialOfferJson.cred_def_id !== proposalMessage.credentialDefinitionId) return false\n\n // Check if preview values match\n return areCredentialPreviewAttributesEqual(\n proposalMessage.credentialPreview.attributes,\n offerMessage.credentialPreview.attributes\n )\n }\n\n public async shouldAutoRespondToRequest(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n requestMessage: DidCommRequestCredentialV1Message\n }\n ) {\n const { credentialExchangeRecord, requestMessage } = options\n\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeCredentialAutoAccept(\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 const offerAttachment = offerMessage.getOfferAttachmentById(INDY_CREDENTIAL_OFFER_ATTACHMENT_ID)\n const requestAttachment = requestMessage.getRequestAttachmentById(INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID)\n\n if (!offerAttachment || !requestAttachment) return false\n\n return this.indyCredentialFormat.shouldAutoRespondToRequest(agentContext, {\n credentialExchangeRecord,\n offerAttachment,\n requestAttachment,\n })\n }\n\n public async shouldAutoRespondToCredential(\n agentContext: AgentContext,\n options: {\n credentialExchangeRecord: DidCommCredentialExchangeRecord\n credentialMessage: DidCommIssueCredentialV1Message\n }\n ) {\n const { credentialExchangeRecord, credentialMessage } = options\n\n const credentialsModuleConfig = agentContext.dependencyManager.resolve(DidCommCredentialsModuleConfig)\n\n const autoAccept = composeCredentialAutoAccept(\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 requestMessage = await this.findRequestMessage(agentContext, credentialExchangeRecord.id)\n const offerMessage = await this.findOfferMessage(agentContext, credentialExchangeRecord.id)\n\n const credentialAttachment = credentialMessage.getCredentialAttachmentById(INDY_CREDENTIAL_ATTACHMENT_ID)\n if (!credentialAttachment) return false\n\n const requestAttachment = requestMessage?.getRequestAttachmentById(INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID)\n if (!requestAttachment) return false\n\n const offerAttachment = offerMessage?.getOfferAttachmentById(INDY_CREDENTIAL_OFFER_ATTACHMENT_ID)\n\n return this.indyCredentialFormat.shouldAutoRespondToCredential(agentContext, {\n credentialExchangeRecord,\n credentialAttachment,\n requestAttachment,\n offerAttachment,\n })\n }\n\n public async findProposalMessage(agentContext: AgentContext, credentialExchangeId: string) {\n const didCommMessageRepository = agentContext.dependencyManager.resolve(DidCommMessageRepository)\n\n return await didCommMessageRepository.findAgentMessage(agentContext, {\n associatedRecordId: credentialExchangeId,\n messageClass: DidCommProposeCredentialV1Message,\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: V1OfferCredentialMessage,\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: DidCommRequestCredentialV1Message,\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: DidCommIssueCredentialV1Message,\n })\n }\n\n public async getFormatData(\n agentContext: AgentContext,\n credentialExchangeId: string\n ): Promise<\n CredentialProtocolOptions.GetCredentialFormatDataReturn<\n ExtractCredentialFormats<[LegacyIndyDidCommCredentialFormatService]>\n >\n > {\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 const indyProposal = proposalMessage\n ? JsonTransformer.toJSON(this.rfc0592ProposalFromV1ProposeMessage(proposalMessage))\n : undefined\n\n const indyOffer = offerMessage?.indyCredentialOffer ?? undefined\n const indyRequest = requestMessage?.indyCredentialRequest ?? undefined\n const indyCredential = credentialMessage?.indyCredential ?? undefined\n\n return {\n proposalAttributes: proposalMessage?.credentialPreview?.attributes,\n proposal: proposalMessage\n ? {\n indy: indyProposal,\n }\n : undefined,\n offerAttributes: offerMessage?.credentialPreview?.attributes,\n offer: offerMessage\n ? {\n indy: indyOffer,\n }\n : undefined,\n request: requestMessage\n ? {\n indy: indyRequest,\n }\n : undefined,\n credential: credentialMessage\n ? {\n indy: indyCredential,\n }\n : undefined,\n }\n }\n\n private rfc0592ProposalFromV1ProposeMessage(proposalMessage: DidCommProposeCredentialV1Message) {\n const indyCredentialProposal = new AnonCredsCredentialProposal({\n credentialDefinitionId: proposalMessage.credentialDefinitionId,\n schemaId: proposalMessage.schemaId,\n issuerDid: proposalMessage.issuerDid,\n schemaIssuerDid: proposalMessage.schemaIssuerDid,\n schemaName: proposalMessage.schemaName,\n schemaVersion: proposalMessage.schemaVersion,\n })\n\n return indyCredentialProposal\n }\n\n private assertOnlyIndyFormat(credentialFormats: Record<string, unknown>) {\n const formatKeys = Object.keys(credentialFormats)\n\n // It's fine to not have any formats in some cases, if indy is required the method that calls this should check for this\n if (formatKeys.length === 0) return\n\n if (formatKeys.length !== 1 || !formatKeys.includes('indy')) {\n throw new CredoError('Only indy credential format is supported for issue credential v1 protocol')\n }\n }\n\n public getFormatServiceForRecordType(credentialRecordType: string) {\n if (credentialRecordType !== this.indyCredentialFormat.credentialRecordType) {\n throw new CredoError(\n `Unsupported credential record type ${credentialRecordType} for v1 issue credential protocol (need ${this.indyCredentialFormat.credentialRecordType})`\n )\n }\n\n return this.indyCredentialFormat\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2DA,IAAa,8BAAb,cACU,8BAEV;CAGE,AAAO,YAAY,EAAE,wBAA2D;AAC9E,SAAO;OASO,UAAU;AANxB,OAAK,uBAAuB;;;;;CAW9B,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;;;;;;;;;;CAWH,MAAa,eACX,cACA,EACE,kBACA,mBACA,SACA,wBAEkF;AACpF,OAAK,qBAAqB,kBAAkB;EAE5C,MAAM,uBAAuB,aAAa,kBAAkB,QAAQ,oCAAoC;EACxG,MAAM,2BAA2B,aAAa,kBAAkB,QAAQ,yBAAyB;AAEjG,MAAI,CAAC,kBAAkB,KACrB,OAAM,IAAI,WAAW,6DAA6D;EAIpF,MAAM,2BAA2B,IAA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
|
|
4
|
+
//#region src/protocols/credentials/v1/handlers/DidCommCredentialV1AckHandler.ts
|
|
5
|
+
var DidCommCredentialV1AckHandler = class {
|
|
6
|
+
constructor(credentialProtocol) {
|
|
7
|
+
this.supportedMessages = [DidCommCredentialV1AckMessage];
|
|
8
|
+
this.credentialProtocol = credentialProtocol;
|
|
9
|
+
}
|
|
10
|
+
async handle(messageContext) {
|
|
11
|
+
await this.credentialProtocol.processAck(messageContext);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { DidCommCredentialV1AckHandler };
|
|
17
|
+
//# sourceMappingURL=DidCommCredentialV1AckHandler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1AckHandler.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/handlers/DidCommCredentialV1AckHandler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm'\nimport type { DidCommCredentialV1Protocol } from '../DidCommCredentialV1Protocol'\n\nimport { DidCommCredentialV1AckMessage } from '../messages'\n\nexport class DidCommCredentialV1AckHandler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV1Protocol\n public supportedMessages = [DidCommCredentialV1AckMessage]\n\n public constructor(credentialProtocol: DidCommCredentialV1Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommCredentialV1AckHandler>) {\n await this.credentialProtocol.processAck(messageContext)\n\n return undefined\n }\n}\n"],"mappings":";;;;AAKA,IAAa,gCAAb,MAA4E;CAI1E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,8BAA8B;AAGxD,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAoF;AACtG,QAAM,KAAK,mBAAmB,WAAW,eAAe"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DidCommCredentialV1ProblemReportMessage } from "../messages/DidCommCredentialV1ProblemReportMessage.mjs";
|
|
2
|
+
import "../messages/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.ts
|
|
5
|
+
var DidCommCredentialV1ProblemReportHandler = class {
|
|
6
|
+
constructor(credentialProtocol) {
|
|
7
|
+
this.supportedMessages = [DidCommCredentialV1ProblemReportMessage];
|
|
8
|
+
this.credentialProtocol = credentialProtocol;
|
|
9
|
+
}
|
|
10
|
+
async handle(messageContext) {
|
|
11
|
+
await this.credentialProtocol.processProblemReport(messageContext);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { DidCommCredentialV1ProblemReportHandler };
|
|
17
|
+
//# sourceMappingURL=DidCommCredentialV1ProblemReportHandler.mjs.map
|
package/build/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1ProblemReportHandler.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/handlers/DidCommCredentialV1ProblemReportHandler.ts"],"sourcesContent":["import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm'\nimport type { DidCommCredentialV1Protocol } from '../DidCommCredentialV1Protocol'\n\nimport { DidCommCredentialV1ProblemReportMessage } from '../messages'\n\nexport class DidCommCredentialV1ProblemReportHandler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV1Protocol\n public supportedMessages = [DidCommCredentialV1ProblemReportMessage]\n\n public constructor(credentialProtocol: DidCommCredentialV1Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommCredentialV1ProblemReportHandler>) {\n await this.credentialProtocol.processProblemReport(messageContext)\n\n return undefined\n }\n}\n"],"mappings":";;;;AAKA,IAAa,0CAAb,MAAsF;CAIpF,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,wCAAwC;AAGlE,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAA8F;AAChH,QAAM,KAAK,mBAAmB,qBAAqB,eAAe"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DidCommIssueCredentialV1Message } from "../messages/DidCommIssueCredentialV1Message.mjs";
|
|
2
|
+
import "../messages/index.mjs";
|
|
3
|
+
import { CredoError } from "@credo-ts/core";
|
|
4
|
+
import { getOutboundDidCommMessageContext } from "@credo-ts/didcomm";
|
|
5
|
+
|
|
6
|
+
//#region src/protocols/credentials/v1/handlers/DidCommIssueCredentialV1Handler.ts
|
|
7
|
+
var DidCommIssueCredentialV1Handler = class {
|
|
8
|
+
constructor(credentialProtocol) {
|
|
9
|
+
this.supportedMessages = [DidCommIssueCredentialV1Message];
|
|
10
|
+
this.credentialProtocol = credentialProtocol;
|
|
11
|
+
}
|
|
12
|
+
async handle(messageContext) {
|
|
13
|
+
const credentialExchangeRecord = await this.credentialProtocol.processCredential(messageContext);
|
|
14
|
+
if (await this.credentialProtocol.shouldAutoRespondToCredential(messageContext.agentContext, {
|
|
15
|
+
credentialExchangeRecord,
|
|
16
|
+
credentialMessage: messageContext.message
|
|
17
|
+
})) return await this.acceptCredential(credentialExchangeRecord, messageContext);
|
|
18
|
+
}
|
|
19
|
+
async acceptCredential(credentialExchangeRecord, messageContext) {
|
|
20
|
+
messageContext.agentContext.config.logger.info("Automatically sending acknowledgement with autoAccept");
|
|
21
|
+
const { message } = await this.credentialProtocol.acceptCredential(messageContext.agentContext, { credentialExchangeRecord });
|
|
22
|
+
const requestMessage = await this.credentialProtocol.findRequestMessage(messageContext.agentContext, credentialExchangeRecord.id);
|
|
23
|
+
if (!requestMessage) throw new CredoError(`No request message found for credential record with id '${credentialExchangeRecord.id}'`);
|
|
24
|
+
return getOutboundDidCommMessageContext(messageContext.agentContext, {
|
|
25
|
+
connectionRecord: messageContext.connection,
|
|
26
|
+
message,
|
|
27
|
+
associatedRecord: credentialExchangeRecord,
|
|
28
|
+
lastReceivedMessage: messageContext.message,
|
|
29
|
+
lastSentMessage: requestMessage
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { DidCommIssueCredentialV1Handler };
|
|
36
|
+
//# sourceMappingURL=DidCommIssueCredentialV1Handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommIssueCredentialV1Handler.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/handlers/DidCommIssueCredentialV1Handler.ts"],"sourcesContent":["import { CredoError } from '@credo-ts/core'\nimport type {\n DidCommCredentialExchangeRecord,\n DidCommMessageHandler,\n DidCommMessageHandlerInboundMessage,\n} from '@credo-ts/didcomm'\nimport { getOutboundDidCommMessageContext } from '@credo-ts/didcomm'\nimport type { DidCommCredentialV1Protocol } from '../DidCommCredentialV1Protocol'\n\nimport { DidCommIssueCredentialV1Message } from '../messages'\n\nexport class DidCommIssueCredentialV1Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV1Protocol\n\n public supportedMessages = [DidCommIssueCredentialV1Message]\n\n public constructor(credentialProtocol: DidCommCredentialV1Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommIssueCredentialV1Handler>) {\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<DidCommIssueCredentialV1Handler>\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":";;;;;;AAWA,IAAa,kCAAb,MAA8E;CAK5E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,gCAAgC;AAG1D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAsF;EACxG,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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { V1OfferCredentialMessage } from "../messages/DidCommOfferCredentialV1Message.mjs";
|
|
2
|
+
import "../messages/index.mjs";
|
|
3
|
+
import { getOutboundDidCommMessageContext } from "@credo-ts/didcomm";
|
|
4
|
+
|
|
5
|
+
//#region src/protocols/credentials/v1/handlers/DidCommOfferCredentialV1Handler.ts
|
|
6
|
+
var DidCommOfferCredentialV1Handler = class {
|
|
7
|
+
constructor(credentialProtocol) {
|
|
8
|
+
this.supportedMessages = [V1OfferCredentialMessage];
|
|
9
|
+
this.credentialProtocol = credentialProtocol;
|
|
10
|
+
}
|
|
11
|
+
async handle(messageContext) {
|
|
12
|
+
const credentialExchangeRecord = await this.credentialProtocol.processOffer(messageContext);
|
|
13
|
+
if (await this.credentialProtocol.shouldAutoRespondToOffer(messageContext.agentContext, {
|
|
14
|
+
credentialExchangeRecord,
|
|
15
|
+
offerMessage: messageContext.message
|
|
16
|
+
})) return await this.acceptOffer(credentialExchangeRecord, messageContext);
|
|
17
|
+
}
|
|
18
|
+
async acceptOffer(credentialExchangeRecord, messageContext) {
|
|
19
|
+
messageContext.agentContext.config.logger.info("Automatically sending request with autoAccept");
|
|
20
|
+
const { message } = await this.credentialProtocol.acceptOffer(messageContext.agentContext, { credentialExchangeRecord });
|
|
21
|
+
return getOutboundDidCommMessageContext(messageContext.agentContext, {
|
|
22
|
+
connectionRecord: messageContext.connection,
|
|
23
|
+
message,
|
|
24
|
+
associatedRecord: credentialExchangeRecord,
|
|
25
|
+
lastReceivedMessage: messageContext.message
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { DidCommOfferCredentialV1Handler };
|
|
32
|
+
//# sourceMappingURL=DidCommOfferCredentialV1Handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommOfferCredentialV1Handler.mjs","names":["DidCommOfferCredentialV1Message"],"sources":["../../../../../src/protocols/credentials/v1/handlers/DidCommOfferCredentialV1Handler.ts"],"sourcesContent":["import type {\n DidCommCredentialExchangeRecord,\n DidCommMessageHandler,\n DidCommMessageHandlerInboundMessage,\n} from '@credo-ts/didcomm'\nimport { getOutboundDidCommMessageContext } from '@credo-ts/didcomm'\nimport type { DidCommCredentialV1Protocol } from '../DidCommCredentialV1Protocol'\n\nimport { V1OfferCredentialMessage as DidCommOfferCredentialV1Message } from '../messages'\n\nexport class DidCommOfferCredentialV1Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV1Protocol\n public supportedMessages = [DidCommOfferCredentialV1Message]\n\n public constructor(credentialProtocol: DidCommCredentialV1Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommOfferCredentialV1Handler>) {\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\n if (shouldAutoRespond) {\n return await this.acceptOffer(credentialExchangeRecord, messageContext)\n }\n }\n\n private async acceptOffer(\n credentialExchangeRecord: DidCommCredentialExchangeRecord,\n messageContext: DidCommMessageHandlerInboundMessage<DidCommOfferCredentialV1Handler>\n ) {\n messageContext.agentContext.config.logger.info('Automatically sending request with autoAccept')\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":";;;;;AAUA,IAAa,kCAAb,MAA8E;CAI5E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAACA,yBAAgC;AAG1D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAsF;EACxG,MAAM,2BAA2B,MAAM,KAAK,mBAAmB,aAAa,eAAe;AAO3F,MAL0B,MAAM,KAAK,mBAAmB,yBAAyB,eAAe,cAAc;GAC5G;GACA,cAAc,eAAe;GAC9B,CAAC,CAGA,QAAO,MAAM,KAAK,YAAY,0BAA0B,eAAe;;CAI3E,MAAc,YACZ,0BACA,gBACA;AACA,iBAAe,aAAa,OAAO,OAAO,KAAK,gDAAgD;EAC/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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DidCommProposeCredentialV1Message } from "../messages/DidCommProposeCredentialV1Message.mjs";
|
|
2
|
+
import "../messages/index.mjs";
|
|
3
|
+
import { getOutboundDidCommMessageContext } from "@credo-ts/didcomm";
|
|
4
|
+
|
|
5
|
+
//#region src/protocols/credentials/v1/handlers/DidCommProposeCredentialV1Handler.ts
|
|
6
|
+
var DidCommProposeCredentialV1Handler = class {
|
|
7
|
+
constructor(credentialProtocol) {
|
|
8
|
+
this.supportedMessages = [DidCommProposeCredentialV1Message];
|
|
9
|
+
this.credentialProtocol = credentialProtocol;
|
|
10
|
+
}
|
|
11
|
+
async handle(messageContext) {
|
|
12
|
+
const credentialExchangeRecord = await this.credentialProtocol.processProposal(messageContext);
|
|
13
|
+
if (await this.credentialProtocol.shouldAutoRespondToProposal(messageContext.agentContext, {
|
|
14
|
+
credentialExchangeRecord,
|
|
15
|
+
proposalMessage: messageContext.message
|
|
16
|
+
})) return await this.acceptProposal(credentialExchangeRecord, messageContext);
|
|
17
|
+
}
|
|
18
|
+
async acceptProposal(credentialExchangeRecord, messageContext) {
|
|
19
|
+
messageContext.agentContext.config.logger.info("Automatically sending offer with autoAccept");
|
|
20
|
+
if (!messageContext.connection) {
|
|
21
|
+
messageContext.agentContext.config.logger.error("No connection on the messageContext, aborting auto accept");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const { message } = await this.credentialProtocol.acceptProposal(messageContext.agentContext, { credentialExchangeRecord });
|
|
25
|
+
return getOutboundDidCommMessageContext(messageContext.agentContext, {
|
|
26
|
+
message,
|
|
27
|
+
connectionRecord: messageContext.connection,
|
|
28
|
+
associatedRecord: credentialExchangeRecord
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { DidCommProposeCredentialV1Handler };
|
|
35
|
+
//# sourceMappingURL=DidCommProposeCredentialV1Handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommProposeCredentialV1Handler.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/handlers/DidCommProposeCredentialV1Handler.ts"],"sourcesContent":["import type {\n DidCommCredentialExchangeRecord,\n DidCommMessageHandler,\n DidCommMessageHandlerInboundMessage,\n} from '@credo-ts/didcomm'\nimport { getOutboundDidCommMessageContext } from '@credo-ts/didcomm'\nimport type { DidCommCredentialV1Protocol } from '../DidCommCredentialV1Protocol'\n\nimport { DidCommProposeCredentialV1Message } from '../messages'\n\nexport class DidCommProposeCredentialV1Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV1Protocol\n public supportedMessages = [DidCommProposeCredentialV1Message]\n\n public constructor(credentialProtocol: DidCommCredentialV1Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommProposeCredentialV1Handler>) {\n const credentialExchangeRecord = await this.credentialProtocol.processProposal(messageContext)\n\n const shouldAutoAcceptProposal = await this.credentialProtocol.shouldAutoRespondToProposal(\n messageContext.agentContext,\n {\n credentialExchangeRecord,\n proposalMessage: messageContext.message,\n }\n )\n\n if (shouldAutoAcceptProposal) {\n return await this.acceptProposal(credentialExchangeRecord, messageContext)\n }\n }\n\n private async acceptProposal(\n credentialExchangeRecord: DidCommCredentialExchangeRecord,\n messageContext: DidCommMessageHandlerInboundMessage<DidCommProposeCredentialV1Handler>\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 getOutboundDidCommMessageContext(messageContext.agentContext, {\n message,\n connectionRecord: messageContext.connection,\n associatedRecord: credentialExchangeRecord,\n })\n }\n}\n"],"mappings":";;;;;AAUA,IAAa,oCAAb,MAAgF;CAI9E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,kCAAkC;AAG5D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAwF;EAC1G,MAAM,2BAA2B,MAAM,KAAK,mBAAmB,gBAAgB,eAAe;AAU9F,MARiC,MAAM,KAAK,mBAAmB,4BAC7D,eAAe,cACf;GACE;GACA,iBAAiB,eAAe;GACjC,CACF,CAGC,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,iCAAiC,eAAe,cAAc;GACnE;GACA,kBAAkB,eAAe;GACjC,kBAAkB;GACnB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DidCommRequestCredentialV1Message } from "../messages/DidCommRequestCredentialV1Message.mjs";
|
|
2
|
+
import "../messages/index.mjs";
|
|
3
|
+
import { CredoError } from "@credo-ts/core";
|
|
4
|
+
import { getOutboundDidCommMessageContext } from "@credo-ts/didcomm";
|
|
5
|
+
|
|
6
|
+
//#region src/protocols/credentials/v1/handlers/DidCommRequestCredentialV1Handler.ts
|
|
7
|
+
var DidCommRequestCredentialV1Handler = class {
|
|
8
|
+
constructor(credentialProtocol) {
|
|
9
|
+
this.supportedMessages = [DidCommRequestCredentialV1Message];
|
|
10
|
+
this.credentialProtocol = credentialProtocol;
|
|
11
|
+
}
|
|
12
|
+
async handle(messageContext) {
|
|
13
|
+
const credentialExchangeRecord = await this.credentialProtocol.processRequest(messageContext);
|
|
14
|
+
if (await this.credentialProtocol.shouldAutoRespondToRequest(messageContext.agentContext, {
|
|
15
|
+
credentialExchangeRecord,
|
|
16
|
+
requestMessage: messageContext.message
|
|
17
|
+
})) return await this.acceptRequest(credentialExchangeRecord, messageContext);
|
|
18
|
+
}
|
|
19
|
+
async acceptRequest(credentialExchangeRecord, messageContext) {
|
|
20
|
+
messageContext.agentContext.config.logger.info("Automatically sending credential with autoAccept");
|
|
21
|
+
const offerMessage = await this.credentialProtocol.findOfferMessage(messageContext.agentContext, credentialExchangeRecord.id);
|
|
22
|
+
if (!offerMessage) throw new CredoError(`Could not find offer message for credential record with id ${credentialExchangeRecord.id}`);
|
|
23
|
+
const { message } = await this.credentialProtocol.acceptRequest(messageContext.agentContext, { credentialExchangeRecord });
|
|
24
|
+
return getOutboundDidCommMessageContext(messageContext.agentContext, {
|
|
25
|
+
connectionRecord: messageContext.connection,
|
|
26
|
+
message,
|
|
27
|
+
associatedRecord: credentialExchangeRecord,
|
|
28
|
+
lastReceivedMessage: messageContext.message,
|
|
29
|
+
lastSentMessage: offerMessage
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { DidCommRequestCredentialV1Handler };
|
|
36
|
+
//# sourceMappingURL=DidCommRequestCredentialV1Handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommRequestCredentialV1Handler.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/handlers/DidCommRequestCredentialV1Handler.ts"],"sourcesContent":["import { CredoError } from '@credo-ts/core'\nimport type {\n DidCommCredentialExchangeRecord,\n DidCommMessageHandler,\n DidCommMessageHandlerInboundMessage,\n} from '@credo-ts/didcomm'\nimport { getOutboundDidCommMessageContext } from '@credo-ts/didcomm'\nimport type { DidCommCredentialV1Protocol } from '../DidCommCredentialV1Protocol'\n\nimport { DidCommRequestCredentialV1Message } from '../messages'\n\nexport class DidCommRequestCredentialV1Handler implements DidCommMessageHandler {\n private credentialProtocol: DidCommCredentialV1Protocol\n public supportedMessages = [DidCommRequestCredentialV1Message]\n\n public constructor(credentialProtocol: DidCommCredentialV1Protocol) {\n this.credentialProtocol = credentialProtocol\n }\n\n public async handle(messageContext: DidCommMessageHandlerInboundMessage<DidCommRequestCredentialV1Handler>) {\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: DidCommMessageHandlerInboundMessage<DidCommRequestCredentialV1Handler>\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":";;;;;;AAWA,IAAa,oCAAb,MAAgF;CAI9E,AAAO,YAAY,oBAAiD;OAF7D,oBAAoB,CAAC,kCAAkC;AAG5D,OAAK,qBAAqB;;CAG5B,MAAa,OAAO,gBAAwF;EAC1G,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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DidCommCredentialV1AckHandler } from "./DidCommCredentialV1AckHandler.mjs";
|
|
2
|
+
import { DidCommCredentialV1ProblemReportHandler } from "./DidCommCredentialV1ProblemReportHandler.mjs";
|
|
3
|
+
import { DidCommIssueCredentialV1Handler } from "./DidCommIssueCredentialV1Handler.mjs";
|
|
4
|
+
import { DidCommOfferCredentialV1Handler } from "./DidCommOfferCredentialV1Handler.mjs";
|
|
5
|
+
import { DidCommProposeCredentialV1Handler } from "./DidCommProposeCredentialV1Handler.mjs";
|
|
6
|
+
import { DidCommRequestCredentialV1Handler } from "./DidCommRequestCredentialV1Handler.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DidCommCredentialV1AckMessage, V1CredentialAckMessageOptions } from "./messages/DidCommCredentialV1AckMessage.mjs";
|
|
2
|
+
import { DidCommCredentialV1Preview } from "./messages/DidCommCredentialV1Preview.mjs";
|
|
3
|
+
import { DidCommCredentialV1ProblemReportMessage, V1CredentialProblemReportMessageOptions } from "./messages/DidCommCredentialV1ProblemReportMessage.mjs";
|
|
4
|
+
import { DidCommIssueCredentialV1Message, INDY_CREDENTIAL_ATTACHMENT_ID, V1IssueCredentialMessageOptions } from "./messages/DidCommIssueCredentialV1Message.mjs";
|
|
5
|
+
import { DidCommOfferCredentialV1Message, INDY_CREDENTIAL_OFFER_ATTACHMENT_ID, V1OfferCredentialMessage } from "./messages/DidCommOfferCredentialV1Message.mjs";
|
|
6
|
+
import { DidCommProposeCredentialV1Message, DidCommProposeCredentialV1MessageOptions } from "./messages/DidCommProposeCredentialV1Message.mjs";
|
|
7
|
+
import { DidCommRequestCredentialV1Message, DidCommRequestCredentialV1MessageOptions, INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID } from "./messages/DidCommRequestCredentialV1Message.mjs";
|
|
8
|
+
import "./messages/index.mjs";
|
|
9
|
+
import { DidCommCredentialV1Protocol, DidCommCredentialV1ProtocolConfig } from "./DidCommCredentialV1Protocol.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DidCommCredentialV1AckMessage } from "./messages/DidCommCredentialV1AckMessage.mjs";
|
|
2
|
+
import { DidCommCredentialV1Preview } from "./messages/DidCommCredentialV1Preview.mjs";
|
|
3
|
+
import { DidCommCredentialV1ProblemReportMessage } from "./messages/DidCommCredentialV1ProblemReportMessage.mjs";
|
|
4
|
+
import { DidCommIssueCredentialV1Message, INDY_CREDENTIAL_ATTACHMENT_ID } from "./messages/DidCommIssueCredentialV1Message.mjs";
|
|
5
|
+
import { INDY_CREDENTIAL_OFFER_ATTACHMENT_ID, V1OfferCredentialMessage } from "./messages/DidCommOfferCredentialV1Message.mjs";
|
|
6
|
+
import { DidCommProposeCredentialV1Message } from "./messages/DidCommProposeCredentialV1Message.mjs";
|
|
7
|
+
import { DidCommRequestCredentialV1Message, INDY_CREDENTIAL_REQUEST_ATTACHMENT_ID } from "./messages/DidCommRequestCredentialV1Message.mjs";
|
|
8
|
+
import "./messages/index.mjs";
|
|
9
|
+
import { DidCommCredentialV1Protocol } from "./DidCommCredentialV1Protocol.mjs";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _credo_ts_didcomm6 from "@credo-ts/didcomm";
|
|
2
|
+
import { DidCommAckMessage, DidCommAckMessageOptions } from "@credo-ts/didcomm";
|
|
3
|
+
|
|
4
|
+
//#region src/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.d.ts
|
|
5
|
+
type V1CredentialAckMessageOptions = DidCommAckMessageOptions;
|
|
6
|
+
/**
|
|
7
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0015-acks/README.md#explicit-acks
|
|
8
|
+
*/
|
|
9
|
+
declare class DidCommCredentialV1AckMessage extends DidCommAckMessage {
|
|
10
|
+
readonly allowDidSovPrefix = true;
|
|
11
|
+
readonly type: string;
|
|
12
|
+
static readonly type: _credo_ts_didcomm6.ParsedMessageType;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { DidCommCredentialV1AckMessage, V1CredentialAckMessageOptions };
|
|
16
|
+
//# sourceMappingURL=DidCommCredentialV1AckMessage.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1AckMessage.d.mts","names":[],"sources":["../../../../../src/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.ts"],"sourcesContent":[],"mappings":";;;;KAIY,6BAAA,GAAgC;;AAA5C;AAKA;cAAa,6BAAA,SAAsC,iBAAA;;;wBAAR,kBAAA,CAKd"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { __decorateMetadata } from "../../../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs";
|
|
2
|
+
import { __decorate } from "../../../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs";
|
|
3
|
+
import { DidCommAckMessage, IsValidMessageType, parseMessageType } from "@credo-ts/didcomm";
|
|
4
|
+
|
|
5
|
+
//#region src/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.ts
|
|
6
|
+
/**
|
|
7
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0015-acks/README.md#explicit-acks
|
|
8
|
+
*/
|
|
9
|
+
var DidCommCredentialV1AckMessage = class DidCommCredentialV1AckMessage extends DidCommAckMessage {
|
|
10
|
+
constructor(..._args) {
|
|
11
|
+
super(..._args);
|
|
12
|
+
this.allowDidSovPrefix = true;
|
|
13
|
+
this.type = DidCommCredentialV1AckMessage.type.messageTypeUri;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
DidCommCredentialV1AckMessage.type = parseMessageType("https://didcomm.org/issue-credential/1.0/ack");
|
|
17
|
+
__decorate([IsValidMessageType(DidCommCredentialV1AckMessage.type), __decorateMetadata("design:type", Object)], DidCommCredentialV1AckMessage.prototype, "type", void 0);
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { DidCommCredentialV1AckMessage };
|
|
21
|
+
//# sourceMappingURL=DidCommCredentialV1AckMessage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1AckMessage.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/messages/DidCommCredentialV1AckMessage.ts"],"sourcesContent":["import type { DidCommAckMessageOptions } from '@credo-ts/didcomm'\n\nimport { DidCommAckMessage, IsValidMessageType, parseMessageType } from '@credo-ts/didcomm'\n\nexport type V1CredentialAckMessageOptions = DidCommAckMessageOptions\n\n/**\n * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0015-acks/README.md#explicit-acks\n */\nexport class DidCommCredentialV1AckMessage extends DidCommAckMessage {\n public readonly allowDidSovPrefix = true\n\n @IsValidMessageType(DidCommCredentialV1AckMessage.type)\n public readonly type = DidCommCredentialV1AckMessage.type.messageTypeUri\n public static readonly type = parseMessageType('https://didcomm.org/issue-credential/1.0/ack')\n}\n"],"mappings":";;;;;;;;AASA,IAAa,gCAAb,MAAa,sCAAsC,kBAAkB;;;OACnD,oBAAoB;OAGpB,OAAO,8BAA8B,KAAK;;;8BACnC,OAAO,iBAAiB,+CAA+C;YAF7F,mBAAmB,8BAA8B,KAAK"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as _credo_ts_didcomm7 from "@credo-ts/didcomm";
|
|
2
|
+
import { CredentialPreviewOptions, DidCommCredentialPreviewAttribute } from "@credo-ts/didcomm";
|
|
3
|
+
|
|
4
|
+
//#region src/protocols/credentials/v1/messages/DidCommCredentialV1Preview.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Credential preview inner message class.
|
|
8
|
+
*
|
|
9
|
+
* This is not a message but an inner object for other messages in this protocol. It is used construct a preview of the data for the credential.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#preview-credential
|
|
12
|
+
*/
|
|
13
|
+
declare class DidCommCredentialV1Preview {
|
|
14
|
+
constructor(options: CredentialPreviewOptions);
|
|
15
|
+
static readonly type: _credo_ts_didcomm7.ParsedMessageType;
|
|
16
|
+
readonly type: string;
|
|
17
|
+
attributes: DidCommCredentialPreviewAttribute[];
|
|
18
|
+
toJSON(): Record<string, unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Create a credential preview from a record with name and value entries.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const preview = CredentialPreview.fromRecord({
|
|
24
|
+
* name: "Bob",
|
|
25
|
+
* age: "20"
|
|
26
|
+
* })
|
|
27
|
+
*/
|
|
28
|
+
static fromRecord(record: Record<string, string>): DidCommCredentialV1Preview;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { DidCommCredentialV1Preview };
|
|
32
|
+
//# sourceMappingURL=DidCommCredentialV1Preview.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1Preview.d.mts","names":[],"sources":["../../../../../src/protocols/credentials/v1/messages/DidCommCredentialV1Preview.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkBA;;;;;AAkCmC,cAlCtB,0BAAA,CAkCsB;EAAsB,WAAA,CAAA,OAAA,EAjC3B,wBAiC2B;EAAA,gBAAA,IAAA,EAjCH,kBAAA,CAMzB,iBA2B4B;;cAfnC;YAEH;;;;;;;;;;4BAagB,yBAAsB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { __decorateMetadata } from "../../../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorateMetadata.mjs";
|
|
2
|
+
import { __decorate } from "../../../../_virtual/_@oxc-project_runtime@0.99.0/helpers/decorate.mjs";
|
|
3
|
+
import { JsonTransformer } from "@credo-ts/core";
|
|
4
|
+
import { DidCommCredentialPreviewAttribute, IsValidMessageType, parseMessageType, replaceLegacyDidSovPrefix } from "@credo-ts/didcomm";
|
|
5
|
+
import { IsInstance, ValidateNested } from "class-validator";
|
|
6
|
+
import { Expose, Transform, Type } from "class-transformer";
|
|
7
|
+
|
|
8
|
+
//#region src/protocols/credentials/v1/messages/DidCommCredentialV1Preview.ts
|
|
9
|
+
/**
|
|
10
|
+
* Credential preview inner message class.
|
|
11
|
+
*
|
|
12
|
+
* This is not a message but an inner object for other messages in this protocol. It is used construct a preview of the data for the credential.
|
|
13
|
+
*
|
|
14
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#preview-credential
|
|
15
|
+
*/
|
|
16
|
+
var DidCommCredentialV1Preview = class DidCommCredentialV1Preview {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.type = DidCommCredentialV1Preview.type.messageTypeUri;
|
|
19
|
+
if (options) this.attributes = options.attributes.map((a) => new DidCommCredentialPreviewAttribute(a));
|
|
20
|
+
}
|
|
21
|
+
toJSON() {
|
|
22
|
+
return JsonTransformer.toJSON(this);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Create a credential preview from a record with name and value entries.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const preview = CredentialPreview.fromRecord({
|
|
29
|
+
* name: "Bob",
|
|
30
|
+
* age: "20"
|
|
31
|
+
* })
|
|
32
|
+
*/
|
|
33
|
+
static fromRecord(record) {
|
|
34
|
+
return new DidCommCredentialV1Preview({ attributes: Object.entries(record).map(([name, value]) => new DidCommCredentialPreviewAttribute({
|
|
35
|
+
name,
|
|
36
|
+
mimeType: "text/plain",
|
|
37
|
+
value
|
|
38
|
+
})) });
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
DidCommCredentialV1Preview.type = parseMessageType("https://didcomm.org/issue-credential/1.0/credential-preview");
|
|
42
|
+
__decorate([
|
|
43
|
+
Expose({ name: "@type" }),
|
|
44
|
+
IsValidMessageType(DidCommCredentialV1Preview.type),
|
|
45
|
+
Transform(({ value }) => replaceLegacyDidSovPrefix(value), { toClassOnly: true }),
|
|
46
|
+
__decorateMetadata("design:type", Object)
|
|
47
|
+
], DidCommCredentialV1Preview.prototype, "type", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
Type(() => DidCommCredentialPreviewAttribute),
|
|
50
|
+
ValidateNested({ each: true }),
|
|
51
|
+
IsInstance(DidCommCredentialPreviewAttribute, { each: true }),
|
|
52
|
+
__decorateMetadata("design:type", Array)
|
|
53
|
+
], DidCommCredentialV1Preview.prototype, "attributes", void 0);
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
export { DidCommCredentialV1Preview };
|
|
57
|
+
//# sourceMappingURL=DidCommCredentialV1Preview.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1Preview.mjs","names":[],"sources":["../../../../../src/protocols/credentials/v1/messages/DidCommCredentialV1Preview.ts"],"sourcesContent":["import { JsonTransformer } from '@credo-ts/core'\nimport type { CredentialPreviewOptions } from '@credo-ts/didcomm'\nimport {\n DidCommCredentialPreviewAttribute,\n IsValidMessageType,\n parseMessageType,\n replaceLegacyDidSovPrefix,\n} from '@credo-ts/didcomm'\nimport { Expose, Transform, Type } from 'class-transformer'\nimport { IsInstance, ValidateNested } from 'class-validator'\n\n/**\n * Credential preview inner message class.\n *\n * This is not a message but an inner object for other messages in this protocol. It is used construct a preview of the data for the credential.\n *\n * @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0036-issue-credential/README.md#preview-credential\n */\nexport class DidCommCredentialV1Preview {\n public constructor(options: CredentialPreviewOptions) {\n if (options) {\n this.attributes = options.attributes.map((a) => new DidCommCredentialPreviewAttribute(a))\n }\n }\n\n public static readonly type = parseMessageType('https://didcomm.org/issue-credential/1.0/credential-preview')\n\n @Expose({ name: '@type' })\n @IsValidMessageType(DidCommCredentialV1Preview.type)\n @Transform(({ value }) => replaceLegacyDidSovPrefix(value), {\n toClassOnly: true,\n })\n public readonly type = DidCommCredentialV1Preview.type.messageTypeUri\n\n @Type(() => DidCommCredentialPreviewAttribute)\n @ValidateNested({ each: true })\n @IsInstance(DidCommCredentialPreviewAttribute, { each: true })\n public attributes!: DidCommCredentialPreviewAttribute[]\n\n public toJSON(): Record<string, unknown> {\n return JsonTransformer.toJSON(this)\n }\n\n /**\n * Create a credential preview from a record with name and value entries.\n *\n * @example\n * const preview = CredentialPreview.fromRecord({\n * name: \"Bob\",\n * age: \"20\"\n * })\n */\n public static fromRecord(record: Record<string, string>) {\n const attributes = Object.entries(record).map(\n ([name, value]) =>\n new DidCommCredentialPreviewAttribute({\n name,\n mimeType: 'text/plain',\n value,\n })\n )\n\n return new DidCommCredentialV1Preview({\n attributes,\n })\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,IAAa,6BAAb,MAAa,2BAA2B;CACtC,AAAO,YAAY,SAAmC;OAatC,OAAO,2BAA2B,KAAK;AAZrD,MAAI,QACF,MAAK,aAAa,QAAQ,WAAW,KAAK,MAAM,IAAI,kCAAkC,EAAE,CAAC;;CAkB7F,AAAO,SAAkC;AACvC,SAAO,gBAAgB,OAAO,KAAK;;;;;;;;;;;CAYrC,OAAc,WAAW,QAAgC;AAUvD,SAAO,IAAI,2BAA2B,EACpC,YAViB,OAAO,QAAQ,OAAO,CAAC,KACvC,CAAC,MAAM,WACN,IAAI,kCAAkC;GACpC;GACA,UAAU;GACV;GACD,CAAC,CACL,EAIA,CAAC;;;2BAvCmB,OAAO,iBAAiB,8DAA8D;;CAE5G,OAAO,EAAE,MAAM,SAAS,CAAC;CACzB,mBAAmB,2BAA2B,KAAK;CACnD,WAAW,EAAE,YAAY,0BAA0B,MAAM,EAAE,EAC1D,aAAa,MACd,CAAC;;;;CAGD,WAAW,kCAAkC;CAC7C,eAAe,EAAE,MAAM,MAAM,CAAC;CAC9B,WAAW,mCAAmC,EAAE,MAAM,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _credo_ts_didcomm8 from "@credo-ts/didcomm";
|
|
2
|
+
import { DidCommProblemReportMessage, DidCommProblemReportMessageOptions } from "@credo-ts/didcomm";
|
|
3
|
+
|
|
4
|
+
//#region src/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.d.ts
|
|
5
|
+
type V1CredentialProblemReportMessageOptions = DidCommProblemReportMessageOptions;
|
|
6
|
+
/**
|
|
7
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0035-report-problem/README.md
|
|
8
|
+
*/
|
|
9
|
+
declare class DidCommCredentialV1ProblemReportMessage extends DidCommProblemReportMessage {
|
|
10
|
+
readonly allowDidSovPrefix = true;
|
|
11
|
+
readonly type: string;
|
|
12
|
+
static readonly type: _credo_ts_didcomm8.ParsedMessageType;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { DidCommCredentialV1ProblemReportMessage, V1CredentialProblemReportMessageOptions };
|
|
16
|
+
//# sourceMappingURL=DidCommCredentialV1ProblemReportMessage.d.mts.map
|
package/build/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommCredentialV1ProblemReportMessage.d.mts","names":[],"sources":["../../../../../src/protocols/credentials/v1/messages/DidCommCredentialV1ProblemReportMessage.ts"],"sourcesContent":[],"mappings":";;;;KAIY,uCAAA,GAA0C;;AAAtD;AAKA;cAAa,uCAAA,SAAgD,2BAAA;;;wBAAR,kBAAA,CAKxB"}
|