@credo-ts/anoncreds 0.6.1-pr-2091-20241119140918 → 0.6.2-alpha-20251210145840
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
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.migrateAnonCredsCredentialDefinitionRecordToV0_4 = migrateAnonCredsCredentialDefinitionRecordToV0_4;
|
|
4
|
-
const core_1 = require("@credo-ts/core");
|
|
5
|
-
const repository_1 = require("../../repository");
|
|
6
|
-
const AnonCredsRegistryService_1 = require("../../services/registry/AnonCredsRegistryService");
|
|
7
|
-
/**
|
|
8
|
-
* Migrates the {@link AnonCredsCredentialDefinitionRecord} to 0.4 compatible format. It fetches all credential definition records from
|
|
9
|
-
* storage and updates the format based on the new ledger agnostic anoncreds models. After a record has been transformed,
|
|
10
|
-
* it is updated in storage and the next record will be transformed.
|
|
11
|
-
*/
|
|
12
|
-
async function migrateAnonCredsCredentialDefinitionRecordToV0_4(agent) {
|
|
13
|
-
agent.config.logger.info('Migrating AnonCredsCredentialDefinitionRecord records to storage version 0.4');
|
|
14
|
-
const credentialDefinitionRepository = agent.dependencyManager.resolve(repository_1.AnonCredsCredentialDefinitionRepository);
|
|
15
|
-
agent.config.logger.debug(`Fetching all credential definition records from storage`);
|
|
16
|
-
const credentialDefinitionRecords = await credentialDefinitionRepository.getAll(agent.context);
|
|
17
|
-
agent.config.logger.debug(`Found a total of ${credentialDefinitionRecords.length} credential definition records to update.`);
|
|
18
|
-
for (const credentialDefinitionRecord of credentialDefinitionRecords) {
|
|
19
|
-
const oldCredentialDefinition = credentialDefinitionRecord.credentialDefinition;
|
|
20
|
-
// If askar migration script is ran, it could be that the credential definition record is already in 0.4 format
|
|
21
|
-
if (oldCredentialDefinition.id === undefined) {
|
|
22
|
-
agent.config.logger.info(`Credential definition record with id ${credentialDefinitionRecord.id} and credential definition id ${credentialDefinitionRecord.credentialDefinitionId} is already in storage version 0.4 format. Probably due to Indy SDK to Askar migration. Skipping...`);
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
agent.config.logger.debug(`Migrating anoncreds credential definition record with id ${credentialDefinitionRecord.id} and credential definition id ${oldCredentialDefinition.id} to storage version 0.4`);
|
|
26
|
-
// the schemaId is actually the ledger seqNo. We'll have to fetch the schema from the ledger to get the schemaId
|
|
27
|
-
// However, we can't just fetch the schema by it's seqNo, so we'll actually fetch the credential definition,
|
|
28
|
-
// which will contain the valid schemaId
|
|
29
|
-
const registryService = agent.dependencyManager.resolve(AnonCredsRegistryService_1.AnonCredsRegistryService);
|
|
30
|
-
const registry = registryService.getRegistryForIdentifier(agent.context, oldCredentialDefinition.id);
|
|
31
|
-
agent.config.logger.debug(`Using registry with supportedIdentifier ${registry.supportedIdentifier} to resolve credential definition`);
|
|
32
|
-
const { credentialDefinition } = await registry.getCredentialDefinition(agent.context, oldCredentialDefinition.id);
|
|
33
|
-
if (!credentialDefinition) {
|
|
34
|
-
agent.config.logger.error(`Could not resolve credential definition with id ${oldCredentialDefinition.id} from ledger`);
|
|
35
|
-
throw new core_1.CredoError(`Unable to resolve credential definition ${oldCredentialDefinition.id}`);
|
|
36
|
-
}
|
|
37
|
-
agent.config.logger.debug(`Resolved credential definition with id ${oldCredentialDefinition.id} from ledger`, {
|
|
38
|
-
credentialDefinition,
|
|
39
|
-
});
|
|
40
|
-
const newCredentialDefinition = {
|
|
41
|
-
// Use the schemaId from the resolved credential definition so we get the qualified identifier
|
|
42
|
-
schemaId: credentialDefinition.schemaId,
|
|
43
|
-
tag: oldCredentialDefinition.tag,
|
|
44
|
-
type: oldCredentialDefinition.type,
|
|
45
|
-
value: oldCredentialDefinition.value,
|
|
46
|
-
issuerId: oldCredentialDefinition.id.split('/')[0],
|
|
47
|
-
};
|
|
48
|
-
credentialDefinitionRecord.credentialDefinition = newCredentialDefinition;
|
|
49
|
-
credentialDefinitionRecord.credentialDefinitionId = oldCredentialDefinition.id;
|
|
50
|
-
credentialDefinitionRecord.methodName = 'indy';
|
|
51
|
-
// Save updated credentialDefinition record
|
|
52
|
-
await credentialDefinitionRepository.update(agent.context, credentialDefinitionRecord);
|
|
53
|
-
agent.config.logger.debug(`Successfully migrated credential definition record with id ${credentialDefinitionRecord.id} to storage version 0.4`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=credentialDefin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AM,8BAA8B,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,0BAA0B,CAAC,CAAA;QAEtF,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACvB,8DAA8D,0BAA0B,CAAC,EAAE,yBAAyB,CACrH,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { BaseAgent, CredentialExchangeRecord } from '@credo-ts/core';
|
|
2
|
-
/**
|
|
3
|
-
* Migrates the {@link CredentialExchangeRecord} to 0.4 compatible format. It fetches all credential exchange records from
|
|
4
|
-
* storage and applies the needed updates to the records. After a record has been transformed, it is updated
|
|
5
|
-
* in storage and the next record will be transformed.
|
|
6
|
-
*
|
|
7
|
-
* The following transformations are applied:
|
|
8
|
-
* - {@link migrateIndyCredentialMetadataToAnonCredsMetadata}
|
|
9
|
-
* - {@link migrateIndyCredentialTypeToAnonCredsCredential}
|
|
10
|
-
*/
|
|
11
|
-
export declare function migrateCredentialExchangeRecordToV0_4<Agent extends BaseAgent>(agent: Agent): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Migrates the indy credential record binding to anoncreds credential record binding.
|
|
14
|
-
*
|
|
15
|
-
* The following 0.3.1 credential record structure (unrelated keys omitted):
|
|
16
|
-
*
|
|
17
|
-
* ```json
|
|
18
|
-
* {
|
|
19
|
-
* "credentials": [
|
|
20
|
-
* {
|
|
21
|
-
* "credentialRecordId": "credential-id",
|
|
22
|
-
* "credentialRecordType": "indy"
|
|
23
|
-
* },
|
|
24
|
-
* {
|
|
25
|
-
* "credentialRecordId": "credential-id2",
|
|
26
|
-
* "credentialRecordType": "jsonld"
|
|
27
|
-
* }
|
|
28
|
-
* ]
|
|
29
|
-
* }
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* Wil be tranformed into the following 0.4 credential record structure (unrelated keys omitted):
|
|
33
|
-
* ```json
|
|
34
|
-
* {
|
|
35
|
-
* "credentials": [
|
|
36
|
-
* {
|
|
37
|
-
* "credentialRecordId": "credential-id",
|
|
38
|
-
* "credentialRecordType": "anoncreds"
|
|
39
|
-
* },
|
|
40
|
-
* {
|
|
41
|
-
* "credentialRecordId": "credential-id2",
|
|
42
|
-
* "credentialRecordType": "jsonld"
|
|
43
|
-
* }
|
|
44
|
-
* ]
|
|
45
|
-
* }
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
export declare function migrateIndyCredentialTypeToAnonCredsCredential<Agent extends BaseAgent>(agent: Agent, credentialRecord: CredentialExchangeRecord): void;
|
|
49
|
-
/**
|
|
50
|
-
* Migrates the indy credential metadata type to anoncreds credential metadata type.
|
|
51
|
-
*
|
|
52
|
-
* The following 0.3.1 credential metadata structure (unrelated keys omitted):
|
|
53
|
-
*
|
|
54
|
-
* ```json
|
|
55
|
-
* {
|
|
56
|
-
* "_internal/indyRequest": {}
|
|
57
|
-
* "_internal/indyCredential": {}
|
|
58
|
-
* }
|
|
59
|
-
* ```
|
|
60
|
-
*
|
|
61
|
-
* Wil be tranformed into the following 0.4 credential metadata structure (unrelated keys omitted):
|
|
62
|
-
* ```json
|
|
63
|
-
* {
|
|
64
|
-
* "_anoncreds/credentialRequest": {}
|
|
65
|
-
* "_anoncreds/credential": {}
|
|
66
|
-
* }
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export declare function migrateIndyCredentialMetadataToAnonCredsMetadata<Agent extends BaseAgent>(agent: Agent, credentialRecord: CredentialExchangeRecord): void;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.migrateCredentialExchangeRecordToV0_4 = migrateCredentialExchangeRecordToV0_4;
|
|
4
|
-
exports.migrateIndyCredentialTypeToAnonCredsCredential = migrateIndyCredentialTypeToAnonCredsCredential;
|
|
5
|
-
exports.migrateIndyCredentialMetadataToAnonCredsMetadata = migrateIndyCredentialMetadataToAnonCredsMetadata;
|
|
6
|
-
const core_1 = require("@credo-ts/core");
|
|
7
|
-
/**
|
|
8
|
-
* Migrates the {@link CredentialExchangeRecord} to 0.4 compatible format. It fetches all credential exchange records from
|
|
9
|
-
* storage and applies the needed updates to the records. After a record has been transformed, it is updated
|
|
10
|
-
* in storage and the next record will be transformed.
|
|
11
|
-
*
|
|
12
|
-
* The following transformations are applied:
|
|
13
|
-
* - {@link migrateIndyCredentialMetadataToAnonCredsMetadata}
|
|
14
|
-
* - {@link migrateIndyCredentialTypeToAnonCredsCredential}
|
|
15
|
-
*/
|
|
16
|
-
async function migrateCredentialExchangeRecordToV0_4(agent) {
|
|
17
|
-
agent.config.logger.info('Migrating credential exchange records to storage version 0.4');
|
|
18
|
-
const credentialRepository = agent.dependencyManager.resolve(core_1.CredentialRepository);
|
|
19
|
-
agent.config.logger.debug(`Fetching all credential records from storage`);
|
|
20
|
-
const credentialRecords = await credentialRepository.getAll(agent.context);
|
|
21
|
-
agent.config.logger.debug(`Found a total of ${credentialRecords.length} credential exchange records to update.`);
|
|
22
|
-
for (const credentialRecord of credentialRecords) {
|
|
23
|
-
agent.config.logger.debug(`Migrating credential exchange record with id ${credentialRecord.id} to storage version 0.4`);
|
|
24
|
-
migrateIndyCredentialTypeToAnonCredsCredential(agent, credentialRecord);
|
|
25
|
-
migrateIndyCredentialMetadataToAnonCredsMetadata(agent, credentialRecord);
|
|
26
|
-
// Save updated record
|
|
27
|
-
await credentialRepository.update(agent.context, credentialRecord);
|
|
28
|
-
agent.config.logger.debug(`Successfully migrated credential exchange record with id ${credentialRecord.id} to storage version 0.4`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Migrates the indy credential record binding to anoncreds credential record binding.
|
|
33
|
-
*
|
|
34
|
-
* The following 0.3.1 credential record structure (unrelated keys omitted):
|
|
35
|
-
*
|
|
36
|
-
* ```json
|
|
37
|
-
* {
|
|
38
|
-
* "credentials": [
|
|
39
|
-
* {
|
|
40
|
-
* "credentialRecordId": "credential-id",
|
|
41
|
-
* "credentialRecordType": "indy"
|
|
42
|
-
* },
|
|
43
|
-
* {
|
|
44
|
-
* "credentialRecordId": "credential-id2",
|
|
45
|
-
* "credentialRecordType": "jsonld"
|
|
46
|
-
* }
|
|
47
|
-
* ]
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* Wil be tranformed into the following 0.4 credential record structure (unrelated keys omitted):
|
|
52
|
-
* ```json
|
|
53
|
-
* {
|
|
54
|
-
* "credentials": [
|
|
55
|
-
* {
|
|
56
|
-
* "credentialRecordId": "credential-id",
|
|
57
|
-
* "credentialRecordType": "anoncreds"
|
|
58
|
-
* },
|
|
59
|
-
* {
|
|
60
|
-
* "credentialRecordId": "credential-id2",
|
|
61
|
-
* "credentialRecordType": "jsonld"
|
|
62
|
-
* }
|
|
63
|
-
* ]
|
|
64
|
-
* }
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
function migrateIndyCredentialTypeToAnonCredsCredential(agent, credentialRecord) {
|
|
68
|
-
agent.config.logger.debug(`Migrating credential record with id ${credentialRecord.id} to anoncreds credential binding for version 0.4`);
|
|
69
|
-
const INDY_CREDENTIAL_RECORD_TYPE = 'indy';
|
|
70
|
-
const ANONCREDS_CREDENTIAL_RECORD_TYPE = 'anoncreds';
|
|
71
|
-
for (const credential of credentialRecord.credentials) {
|
|
72
|
-
if (credential.credentialRecordType === INDY_CREDENTIAL_RECORD_TYPE) {
|
|
73
|
-
agent.config.logger.debug(`Updating credential binding ${credential.credentialRecordId} to anoncreds type`);
|
|
74
|
-
credential.credentialRecordType = ANONCREDS_CREDENTIAL_RECORD_TYPE;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
agent.config.logger.debug(`Successfully migrated credential record with id ${credentialRecord.id} to anoncreds credential binding for version 0.4`);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Migrates the indy credential metadata type to anoncreds credential metadata type.
|
|
81
|
-
*
|
|
82
|
-
* The following 0.3.1 credential metadata structure (unrelated keys omitted):
|
|
83
|
-
*
|
|
84
|
-
* ```json
|
|
85
|
-
* {
|
|
86
|
-
* "_internal/indyRequest": {}
|
|
87
|
-
* "_internal/indyCredential": {}
|
|
88
|
-
* }
|
|
89
|
-
* ```
|
|
90
|
-
*
|
|
91
|
-
* Wil be tranformed into the following 0.4 credential metadata structure (unrelated keys omitted):
|
|
92
|
-
* ```json
|
|
93
|
-
* {
|
|
94
|
-
* "_anoncreds/credentialRequest": {}
|
|
95
|
-
* "_anoncreds/credential": {}
|
|
96
|
-
* }
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
function migrateIndyCredentialMetadataToAnonCredsMetadata(agent, credentialRecord) {
|
|
100
|
-
agent.config.logger.debug(`Migrating credential record with id ${credentialRecord.id} to anoncreds metadata for version 0.4`);
|
|
101
|
-
const indyCredentialRequestMetadataKey = '_internal/indyRequest';
|
|
102
|
-
const indyCredentialMetadataKey = '_internal/indyCredential';
|
|
103
|
-
const ANONCREDS_CREDENTIAL_REQUEST_METADATA = '_anoncreds/credentialRequest';
|
|
104
|
-
const ANONCREDS_CREDENTIAL_METADATA = '_anoncreds/credential';
|
|
105
|
-
const indyCredentialRequestMetadata = credentialRecord.metadata.get(indyCredentialRequestMetadataKey);
|
|
106
|
-
if (indyCredentialRequestMetadata) {
|
|
107
|
-
credentialRecord.metadata.set(ANONCREDS_CREDENTIAL_REQUEST_METADATA, {
|
|
108
|
-
link_secret_blinding_data: indyCredentialRequestMetadata.master_secret_blinding_data,
|
|
109
|
-
link_secret_name: indyCredentialRequestMetadata.master_secret_name,
|
|
110
|
-
nonce: indyCredentialRequestMetadata.nonce,
|
|
111
|
-
});
|
|
112
|
-
credentialRecord.metadata.delete(indyCredentialRequestMetadataKey);
|
|
113
|
-
}
|
|
114
|
-
const indyCredentialMetadata = credentialRecord.metadata.get(indyCredentialMetadataKey);
|
|
115
|
-
if (indyCredentialMetadata) {
|
|
116
|
-
credentialRecord.metadata.set(ANONCREDS_CREDENTIAL_METADATA, indyCredentialMetadata);
|
|
117
|
-
credentialRecord.metadata.delete(indyCredentialMetadataKey);
|
|
118
|
-
}
|
|
119
|
-
agent.config.logger.debug(`Successfully migrated credential record with id ${credentialRecord.id} to anoncreds credential metadata for version 0.4`);
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=credentialExchangeRecord.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credentialExchangeRecord.js","sourceRoot":"","sources":["../../../src/updates/0.3.1-0.4/credentialExchangeRecord.ts"],"names":[],"mappings":";;AAaA,sFAuBC;AAsCD,wGAqBC;AAsBD,4GAiCC;AApJD,yCAAqD;AAErD;;;;;;;;GAQG;AACI,KAAK,UAAU,qCAAqC,CAA0B,KAAY;IAC/F,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAA;IACxF,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC,2BAAoB,CAAC,CAAA;IAElF,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACzE,MAAM,iBAAiB,GAAG,MAAM,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAE1E,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,iBAAiB,CAAC,MAAM,yCAAyC,CAAC,CAAA;IAChH,KAAK,MAAM,gBAAgB,IAAI,iBAAiB,EAAE,CAAC;QACjD,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACvB,gDAAgD,gBAAgB,CAAC,EAAE,yBAAyB,CAC7F,CAAA;QAED,8CAA8C,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAA;QACvE,gDAAgD,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAA;QAEzE,sBAAsB;QACtB,MAAM,oBA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CAAA;IAE7D,MAAM,6BAA6B,GAAG,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;IACrG,IAAI,6BAA6B,EAAE,CAAC;QAClC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,qCAAqC,EAAE;YACnE,yBAAyB,EAAE,6BAA6B,CAAC,2BAA2B;YACpF,gBAAgB,EAAE,6BAA6B,CAAC,kBAAkB;YAClE,KAAK,EAAE,6BAA6B,CAAC,KAAK;SAC3C,CAAC,CAAA;QACF,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,gCAAgC,CAAC,CAAA;IACpE,CAAC;IAED,MAAM,sBAAsB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAA;IACvF,IAAI,sBAAsB,EAAE,CAAC;QAC3B,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,6BAA6B,EAAE,sBAAsB,CAAC,CAAA;QACpF,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAA;IAC7D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACvB,mDAAmD,gBAAgB,CAAC,EAAE,mDAAmD,CAC1H,CAAA;AACH,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAnonCredsModuleV0_3_1ToV0_4 = updateAnonCredsModuleV0_3_1ToV0_4;
|
|
4
|
-
const credentialDefinition_1 = require("./credentialDefinition");
|
|
5
|
-
const credentialExchangeRecord_1 = require("./credentialExchangeRecord");
|
|
6
|
-
const linkSecret_1 = require("./linkSecret");
|
|
7
|
-
const schema_1 = require("./schema");
|
|
8
|
-
async function updateAnonCredsModuleV0_3_1ToV0_4(agent) {
|
|
9
|
-
await (0, credentialExchangeRecord_1.migrateCredentialExchangeRecordToV0_4)(agent);
|
|
10
|
-
await (0, linkSecret_1.migrateLinkSecretToV0_4)(agent);
|
|
11
|
-
await (0, credentialDefinition_1.migrateAnonCredsCredentialDefinitionRecordToV0_4)(agent);
|
|
12
|
-
await (0, schema_1.migrateAnonCredsSchemaRecordToV0_4)(agent);
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/updates/0.3.1-0.4/index.ts"],"names":[],"mappings":";;AAOA,8EAKC;AAVD,iEAAyF;AACzF,yEAAkF;AAClF,6CAAsD;AACtD,qCAA6D;AAEtD,KAAK,UAAU,iCAAiC,CAA0B,KAAY;IAC3F,MAAM,IAAA,gEAAqC,EAAC,KAAK,CAAC,CAAA;IAClD,MAAM,IAAA,oCAAuB,EAAC,KAAK,CAAC,CAAA;IACpC,MAAM,IAAA,uEAAgD,EAAC,KAAK,CAAC,CAAA;IAC7D,MAAM,IAAA,2CAAkC,EAAC,KAAK,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BaseAgent } from '@credo-ts/core';
|
|
2
|
-
/**
|
|
3
|
-
* Creates an {@link AnonCredsLinkSecretRecord} based on the wallet id. If an {@link AnonCredsLinkSecretRecord}
|
|
4
|
-
* already exists (which is the case when upgraded to Askar), no link secret record will be created.
|
|
5
|
-
*/
|
|
6
|
-
export declare function migrateLinkSecretToV0_4<Agent extends BaseAgent>(agent: Agent): Promise<void>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.migrateLinkSecretToV0_4 = migrateLinkSecretToV0_4;
|
|
4
|
-
const repository_1 = require("../../repository");
|
|
5
|
-
/**
|
|
6
|
-
* Creates an {@link AnonCredsLinkSecretRecord} based on the wallet id. If an {@link AnonCredsLinkSecretRecord}
|
|
7
|
-
* already exists (which is the case when upgraded to Askar), no link secret record will be created.
|
|
8
|
-
*/
|
|
9
|
-
async function migrateLinkSecretToV0_4(agent) {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
agent.config.logger.info('Migrating link secret to storage version 0.4');
|
|
12
|
-
const linkSecretRepository = agent.dependencyManager.resolve(repository_1.AnonCredsLinkSecretRepository);
|
|
13
|
-
agent.config.logger.debug(`Fetching default link secret record from storage`);
|
|
14
|
-
const defaultLinkSecret = await linkSecretRepository.findDefault(agent.context);
|
|
15
|
-
if (!defaultLinkSecret) {
|
|
16
|
-
// If no default link secret record exists, we create one based on the wallet id and set is as default
|
|
17
|
-
agent.config.logger.debug(`No default link secret record found. Creating one based on wallet id.`);
|
|
18
|
-
if (!((_a = agent.wallet.walletConfig) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
19
|
-
agent.config.logger.error(`Wallet id not found. Cannot create default link secret record. Skipping...`);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
// We can't store the link secret value. This is not exposed by indy-sdk.
|
|
23
|
-
const linkSecret = new repository_1.AnonCredsLinkSecretRecord({
|
|
24
|
-
linkSecretId: (_b = agent.wallet.walletConfig) === null || _b === void 0 ? void 0 : _b.id,
|
|
25
|
-
});
|
|
26
|
-
linkSecret.setTag('isDefault', true);
|
|
27
|
-
agent.config.logger.debug(`Saving default link secret record with record id ${linkSecret.id} and link secret id ${linkSecret.linkSecretId} to storage`);
|
|
28
|
-
await linkSecretRepository.save(agent.context, linkSecret);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
agent.config.logger.debug(`Default link secret record with record id ${defaultLinkSecret.id} and link secret id ${defaultLinkSecret.linkSecretId} found. Skipping...`);
|
|
32
|
-
}
|
|
33
|
-
agent.config.logger.debug(`Successfully migrated link secret to version 0.4`);
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=linkSecret.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkSecret.js","sourceRoot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,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CACvB,6CAA6C,iBAAiB,CAAC,EAAE,uBAAuB,iBAAiB,CAAC,YAAY,qBAAqB,CAC5I,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAA;AAC/E,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { BaseAgent } from '@credo-ts/core';
|
|
2
|
-
/**
|
|
3
|
-
* Migrates the {@link AnonCredsSchemaRecord} to 0.4 compatible format. It fetches all schema records from
|
|
4
|
-
* storage and updates the format based on the new ledger agnostic anoncreds models. After a record has been transformed,
|
|
5
|
-
* it is updated in storage and the next record will be transformed.
|
|
6
|
-
*/
|
|
7
|
-
export declare function migrateAnonCredsSchemaRecordToV0_4<Agent extends BaseAgent>(agent: Agent): Promise<void>;
|
|
8
|
-
export interface OldSchema {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
version: string;
|
|
12
|
-
attrNames: string[];
|
|
13
|
-
seqNo: number;
|
|
14
|
-
ver: string;
|
|
15
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.migrateAnonCredsSchemaRecordToV0_4 = migrateAnonCredsSchemaRecordToV0_4;
|
|
4
|
-
const repository_1 = require("../../repository");
|
|
5
|
-
/**
|
|
6
|
-
* Migrates the {@link AnonCredsSchemaRecord} to 0.4 compatible format. It fetches all schema records from
|
|
7
|
-
* storage and updates the format based on the new ledger agnostic anoncreds models. After a record has been transformed,
|
|
8
|
-
* it is updated in storage and the next record will be transformed.
|
|
9
|
-
*/
|
|
10
|
-
async function migrateAnonCredsSchemaRecordToV0_4(agent) {
|
|
11
|
-
agent.config.logger.info('Migrating AnonCredsSchemaRecord records to storage version 0.4');
|
|
12
|
-
const schemaRepository = agent.dependencyManager.resolve(repository_1.AnonCredsSchemaRepository);
|
|
13
|
-
agent.config.logger.debug(`Fetching all schema records from storage`);
|
|
14
|
-
const schemaRecords = await schemaRepository.getAll(agent.context);
|
|
15
|
-
agent.config.logger.debug(`Found a total of ${schemaRecords.length} schema records to update.`);
|
|
16
|
-
for (const schemaRecord of schemaRecords) {
|
|
17
|
-
const oldSchema = schemaRecord.schema;
|
|
18
|
-
// If askar migration script is ran, it could be that the credential definition record is already in 0.4 format
|
|
19
|
-
if (oldSchema.id === undefined) {
|
|
20
|
-
agent.config.logger.info(`Schema record with id ${schemaRecord.id} and schema id ${schemaRecord.schemaId} is already in storage version 0.4 format. Probably due to Indy SDK to Askar migration. Skipping...`);
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
agent.config.logger.debug(`Migrating anoncreds schema record with id ${schemaRecord.id} and schema id ${oldSchema.id} to storage version 0.4`);
|
|
24
|
-
const newSchema = {
|
|
25
|
-
attrNames: oldSchema.attrNames,
|
|
26
|
-
name: oldSchema.name,
|
|
27
|
-
version: oldSchema.version,
|
|
28
|
-
issuerId: oldSchema.id.split('/')[0],
|
|
29
|
-
};
|
|
30
|
-
schemaRecord.schema = newSchema;
|
|
31
|
-
schemaRecord.schemaId = oldSchema.id;
|
|
32
|
-
schemaRecord.methodName = 'indy';
|
|
33
|
-
// schemaIssuerDid was set as tag, but is now replaced by issuerId. It was also always set
|
|
34
|
-
// to the value `did` as it incorrectly parsed the schemaId.
|
|
35
|
-
schemaRecord.setTag('schemaIssuerDid', undefined);
|
|
36
|
-
// Save updated schema record
|
|
37
|
-
await schemaRepository.update(agent.context, schemaRecord);
|
|
38
|
-
agent.config.logger.debug(`Successfully migrated schema record with id ${schemaRecord.id} to storage version 0.4`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/updates/0.3.1-0.4/schema.ts"],"names":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SAAS,CAAA;QAC/B,YAAY,CAAC,QAAQ,GAAG,SAAS,CAAC,EAAE,CAAA;QACpC,YAAY,CAAC,UAAU,GAAG,MAAM,CAAA;QAEhC,0FAA0F;QAC1F,4DAA4D;QAC5D,YAAY,CAAC,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAA;QAEjD,6BAA6B;QAC7B,MAAM,gBAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;QAE1D,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,+CAA+C,YAAY,CAAC,EAAE,yBAAyB,CAAC,CAAA;IACpH,CAAC;AACH,CAAC"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storeAnonCredsInW3cFormatV0_5 = storeAnonCredsInW3cFormatV0_5;
|
|
4
|
-
const core_1 = require("@credo-ts/core");
|
|
5
|
-
const repository_1 = require("../../repository");
|
|
6
|
-
const services_1 = require("../../services");
|
|
7
|
-
const anonCredsObjects_1 = require("../../utils/anonCredsObjects");
|
|
8
|
-
const indyIdentifiers_1 = require("../../utils/indyIdentifiers");
|
|
9
|
-
const metadata_1 = require("../../utils/metadata");
|
|
10
|
-
const w3cAnonCredsUtils_1 = require("../../utils/w3cAnonCredsUtils");
|
|
11
|
-
async function getIndyNamespace(agentContext, legacyCredentialDefinitionId, legacyIssuerId) {
|
|
12
|
-
var _a;
|
|
13
|
-
const cacheModuleConfig = agentContext.dependencyManager.resolve(core_1.CacheModuleConfig);
|
|
14
|
-
const cache = cacheModuleConfig.cache;
|
|
15
|
-
const indyCacheKey = `IndyVdrPoolService:${legacyIssuerId}`;
|
|
16
|
-
const sovCacheKey = `IndySdkPoolService:${legacyIssuerId}`;
|
|
17
|
-
const cachedNymResponse = (_a = (await cache.get(agentContext, indyCacheKey))) !== null && _a !== void 0 ? _a : (await cache.get(agentContext, sovCacheKey));
|
|
18
|
-
if (!(cachedNymResponse === null || cachedNymResponse === void 0 ? void 0 : cachedNymResponse.indyNamespace) || typeof (cachedNymResponse === null || cachedNymResponse === void 0 ? void 0 : cachedNymResponse.indyNamespace) !== 'string') {
|
|
19
|
-
const credentialDefinitionReturn = await (0, anonCredsObjects_1.fetchCredentialDefinition)(agentContext, legacyCredentialDefinitionId);
|
|
20
|
-
const namespace = credentialDefinitionReturn.indyNamespace;
|
|
21
|
-
if (!namespace) {
|
|
22
|
-
throw new core_1.CredoError('Could not determine the indyNamespace required for storing anoncreds in the new w3c format.');
|
|
23
|
-
}
|
|
24
|
-
return namespace;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
return cachedNymResponse.indyNamespace;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
async function migrateLegacyToW3cCredential(agentContext, legacyRecord) {
|
|
31
|
-
const legacyTags = legacyRecord.getTags();
|
|
32
|
-
let indyNamespace;
|
|
33
|
-
let qualifiedSchemaId;
|
|
34
|
-
let qualifiedSchemaIssuerId;
|
|
35
|
-
let qualifiedCredentialDefinitionId;
|
|
36
|
-
let qualifiedIssuerId;
|
|
37
|
-
let qualifiedRevocationRegistryId;
|
|
38
|
-
if (!(0, indyIdentifiers_1.isUnqualifiedCredentialDefinitionId)(legacyTags.credentialDefinitionId) &&
|
|
39
|
-
!(0, indyIdentifiers_1.isUnqualifiedIndyDid)(legacyTags.issuerId)) {
|
|
40
|
-
if ((0, indyIdentifiers_1.isIndyDid)(legacyTags.issuerId)) {
|
|
41
|
-
indyNamespace = (0, indyIdentifiers_1.getIndyNamespaceFromIndyDid)(legacyTags.issuerId);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
indyNamespace = await getIndyNamespace(agentContext, legacyTags.credentialDefinitionId, legacyTags.issuerId);
|
|
46
|
-
}
|
|
47
|
-
if (indyNamespace) {
|
|
48
|
-
qualifiedCredentialDefinitionId = (0, indyIdentifiers_1.getQualifiedDidIndyDid)(legacyTags.credentialDefinitionId, indyNamespace);
|
|
49
|
-
qualifiedIssuerId = (0, indyIdentifiers_1.getQualifiedDidIndyDid)(legacyTags.issuerId, indyNamespace);
|
|
50
|
-
qualifiedRevocationRegistryId = legacyTags.revocationRegistryId
|
|
51
|
-
? (0, indyIdentifiers_1.getQualifiedDidIndyDid)(legacyTags.revocationRegistryId, indyNamespace)
|
|
52
|
-
: undefined;
|
|
53
|
-
qualifiedSchemaId = (0, indyIdentifiers_1.getQualifiedDidIndyDid)(legacyTags.schemaId, indyNamespace);
|
|
54
|
-
qualifiedSchemaIssuerId = (0, indyIdentifiers_1.getQualifiedDidIndyDid)(legacyTags.schemaIssuerId, indyNamespace);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
qualifiedCredentialDefinitionId = legacyTags.credentialDefinitionId;
|
|
58
|
-
qualifiedIssuerId = legacyTags.issuerId;
|
|
59
|
-
qualifiedRevocationRegistryId = legacyTags.revocationRegistryId;
|
|
60
|
-
qualifiedSchemaId = legacyTags.schemaId;
|
|
61
|
-
qualifiedSchemaIssuerId = legacyTags.schemaIssuerId;
|
|
62
|
-
}
|
|
63
|
-
const anonCredsHolderService = agentContext.dependencyManager.resolve(services_1.AnonCredsHolderServiceSymbol);
|
|
64
|
-
const w3cJsonLdCredential = await anonCredsHolderService.legacyToW3cCredential(agentContext, {
|
|
65
|
-
credential: legacyRecord.credential,
|
|
66
|
-
issuerId: qualifiedIssuerId,
|
|
67
|
-
});
|
|
68
|
-
if (Array.isArray(w3cJsonLdCredential.credentialSubject)) {
|
|
69
|
-
throw new core_1.CredoError('Credential subject must be an object, not an array.');
|
|
70
|
-
}
|
|
71
|
-
const anonCredsTags = (0, w3cAnonCredsUtils_1.getW3cRecordAnonCredsTags)({
|
|
72
|
-
credentialSubject: w3cJsonLdCredential.credentialSubject,
|
|
73
|
-
issuerId: w3cJsonLdCredential.issuerId,
|
|
74
|
-
schemaId: qualifiedSchemaId,
|
|
75
|
-
schema: {
|
|
76
|
-
issuerId: qualifiedSchemaIssuerId,
|
|
77
|
-
name: legacyTags.schemaName,
|
|
78
|
-
version: legacyTags.schemaVersion,
|
|
79
|
-
},
|
|
80
|
-
credentialRevocationId: legacyTags.credentialRevocationId,
|
|
81
|
-
revocationRegistryId: qualifiedRevocationRegistryId,
|
|
82
|
-
credentialDefinitionId: qualifiedCredentialDefinitionId,
|
|
83
|
-
linkSecretId: legacyTags.linkSecretId,
|
|
84
|
-
methodName: legacyTags.methodName,
|
|
85
|
-
});
|
|
86
|
-
const w3cCredentialService = agentContext.dependencyManager.resolve(core_1.W3cCredentialService);
|
|
87
|
-
const w3cCredentialRecord = await w3cCredentialService.storeCredential(agentContext, {
|
|
88
|
-
credential: w3cJsonLdCredential,
|
|
89
|
-
});
|
|
90
|
-
for (const [key, meta] of Object.entries(legacyRecord.metadata.data)) {
|
|
91
|
-
w3cCredentialRecord.metadata.set(key, meta);
|
|
92
|
-
}
|
|
93
|
-
const anonCredsCredentialMetadata = {
|
|
94
|
-
credentialRevocationId: anonCredsTags.anonCredsCredentialRevocationId,
|
|
95
|
-
linkSecretId: anonCredsTags.anonCredsLinkSecretId,
|
|
96
|
-
methodName: anonCredsTags.anonCredsMethodName,
|
|
97
|
-
};
|
|
98
|
-
w3cCredentialRecord.setTags(anonCredsTags);
|
|
99
|
-
w3cCredentialRecord.metadata.set(metadata_1.W3cAnonCredsCredentialMetadataKey, anonCredsCredentialMetadata);
|
|
100
|
-
const w3cCredentialRepository = agentContext.dependencyManager.resolve(core_1.W3cCredentialRepository);
|
|
101
|
-
await w3cCredentialRepository.update(agentContext, w3cCredentialRecord);
|
|
102
|
-
// Find the credential exchange record bound to this anoncreds credential and update it to point to the newly created w3c record
|
|
103
|
-
const credentialExchangeRepository = agentContext.dependencyManager.resolve(core_1.CredentialRepository);
|
|
104
|
-
const [relatedCredentialExchangeRecord] = await credentialExchangeRepository.findByQuery(agentContext, {
|
|
105
|
-
credentialIds: [legacyRecord.credentialId],
|
|
106
|
-
});
|
|
107
|
-
if (relatedCredentialExchangeRecord) {
|
|
108
|
-
// Replace the related binding by the new one
|
|
109
|
-
const credentialBindingIndex = relatedCredentialExchangeRecord.credentials.findIndex((binding) => binding.credentialRecordId === legacyRecord.credentialId);
|
|
110
|
-
if (credentialBindingIndex !== -1) {
|
|
111
|
-
relatedCredentialExchangeRecord.credentials[credentialBindingIndex] = {
|
|
112
|
-
credentialRecordType: 'w3c',
|
|
113
|
-
credentialRecordId: w3cCredentialRecord.id,
|
|
114
|
-
};
|
|
115
|
-
// If using Indy dids, store both qualified/unqualified revRegId forms
|
|
116
|
-
// to allow retrieving it from revocation notification service
|
|
117
|
-
if (legacyTags.revocationRegistryId && indyNamespace) {
|
|
118
|
-
const { credentialDefinitionTag, namespaceIdentifier, revocationRegistryTag, schemaSeqNo } = (0, indyIdentifiers_1.parseIndyRevocationRegistryId)(legacyTags.revocationRegistryId);
|
|
119
|
-
relatedCredentialExchangeRecord.setTags({
|
|
120
|
-
anonCredsRevocationRegistryId: (0, indyIdentifiers_1.getQualifiedDidIndyDid)(legacyTags.revocationRegistryId, indyNamespace),
|
|
121
|
-
anonCredsUnqualifiedRevocationRegistryId: (0, indyIdentifiers_1.getUnqualifiedRevocationRegistryDefinitionId)(namespaceIdentifier, schemaSeqNo, credentialDefinitionTag, revocationRegistryTag),
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
await credentialExchangeRepository.update(agentContext, relatedCredentialExchangeRecord);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Stores all anoncreds credentials in the new w3c format
|
|
130
|
-
*/
|
|
131
|
-
async function storeAnonCredsInW3cFormatV0_5(agent) {
|
|
132
|
-
agent.config.logger.info('Migration of legacy AnonCreds records to the new W3C format version 0.5');
|
|
133
|
-
const anoncredsRepository = agent.dependencyManager.resolve(repository_1.AnonCredsCredentialRepository);
|
|
134
|
-
agent.config.logger.debug(`Fetching all anoncreds credential records from storage`);
|
|
135
|
-
const records = await anoncredsRepository.getAll(agent.context);
|
|
136
|
-
agent.config.logger.debug(`Found a total of ${records.length} legacy anonCreds credential records to update.`);
|
|
137
|
-
for (const record of records) {
|
|
138
|
-
agent.config.logger.debug(`Re-saving anonCreds credential record with id ${record.id} in the new w3c format, and deleting the legacy record`);
|
|
139
|
-
try {
|
|
140
|
-
await migrateLegacyToW3cCredential(agent.context, record);
|
|
141
|
-
await anoncredsRepository.delete(agent.context, record);
|
|
142
|
-
agent.config.logger.debug(`Successfully migrated w3c credential record with id ${record.id} to storage version 0.5`);
|
|
143
|
-
}
|
|
144
|
-
catch (error) {
|
|
145
|
-
agent.config.logger.error(`Failed to migrate w3c credential record with id ${record.id} to storage version 0.5`, error);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
//# sourceMappingURL=anonCredsCredentialRecord.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anonCredsCredentialRecord.js","sourceRoot":"","sources":["../../../src/updates/0.4-0.5/anonCredsCredentialRecord.ts"],"names":[],"mappings":";;AAwLA,sEA2BC;AA/MD,yCAMuB;AAEvB,iDAAgG;AAChG,6CAA6D;AAC7D,mEAAwE;AACxE,iEAQoC;AACpC,mDAAwE;AACxE,qEAAyE;AAEzE,KAAK,UAAU,gBAAgB,CAC7B,YAA0B,EAC1B,4BAAoC,EACpC,cAAsB;;IAEtB,MAAM,iBAAiB,GAAG,YAAY,CAAC,iBAAiB,CAAC,OAAO,CAAC,wBAAiB,CAAC,CAAA;IACnF,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAA;IAErC,MAAM,YAAY,GAAG,sBAAsB,cAAc,EAAE,CAAA;IAC3D,MAAM,WAAW,GAAG,sBAAsB,cAAc,EAAE,CAAA;IAE1D,MAAM,iBAAiB,GACrB,MAAA,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAA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|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAnonCredsModuleV0_4ToV0_5 = updateAnonCredsModuleV0_4ToV0_5;
|
|
4
|
-
const anonCredsCredentialRecord_1 = require("./anonCredsCredentialRecord");
|
|
5
|
-
async function updateAnonCredsModuleV0_4ToV0_5(agent) {
|
|
6
|
-
await (0, anonCredsCredentialRecord_1.storeAnonCredsInW3cFormatV0_5)(agent);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/updates/0.4-0.5/index.ts"],"names":[],"mappings":";;AAIA,0EAEC;AAJD,2EAA2E;AAEpE,KAAK,UAAU,+BAA+B,CAA0B,KAAY;IACzF,MAAM,IAAA,yDAA6B,EAAC,KAAK,CAAC,CAAA;AAC5C,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { AnonCredsCredentialDefinition, AnonCredsRevocationStatusList, AnonCredsSchema } from '../models';
|
|
2
|
-
import type { AgentContext } from '@credo-ts/core';
|
|
3
|
-
export declare function fetchSchema(agentContext: AgentContext, schemaId: string): Promise<{
|
|
4
|
-
schema: AnonCredsSchema;
|
|
5
|
-
schemaId: string;
|
|
6
|
-
indyNamespace: string | undefined;
|
|
7
|
-
}>;
|
|
8
|
-
export declare function fetchCredentialDefinition(agentContext: AgentContext, credentialDefinitionId: string): Promise<{
|
|
9
|
-
credentialDefinition: AnonCredsCredentialDefinition;
|
|
10
|
-
credentialDefinitionId: string;
|
|
11
|
-
indyNamespace: string | undefined;
|
|
12
|
-
}>;
|
|
13
|
-
export declare function fetchRevocationRegistryDefinition(agentContext: AgentContext, revocationRegistryDefinitionId: string): Promise<{
|
|
14
|
-
revocationRegistryDefinition: import("../models").AnonCredsRevocationRegistryDefinition;
|
|
15
|
-
revocationRegistryDefinitionId: string;
|
|
16
|
-
indyNamespace: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
export declare function fetchRevocationStatusList(agentContext: AgentContext, revocationRegistryId: string, timestamp: number): Promise<{
|
|
19
|
-
revocationStatusList: AnonCredsRevocationStatusList;
|
|
20
|
-
}>;
|
|
21
|
-
export declare function fetchSchemas(agentContext: AgentContext, schemaIds: Set<string>): Promise<{
|
|
22
|
-
[k: string]: AnonCredsSchema;
|
|
23
|
-
}>;
|
|
24
|
-
export declare function fetchCredentialDefinitions(agentContext: AgentContext, credentialDefinitionIds: Set<string>): Promise<{
|
|
25
|
-
[k: string]: AnonCredsCredentialDefinition;
|
|
26
|
-
}>;
|