@credo-ts/anoncreds 0.5.0-alpha.101
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/LICENSE +202 -0
- package/README.md +35 -0
- package/build/AnonCredsApi.d.ts +91 -0
- package/build/AnonCredsApi.js +577 -0
- package/build/AnonCredsApi.js.map +1 -0
- package/build/AnonCredsApiOptions.d.ts +24 -0
- package/build/AnonCredsApiOptions.js +3 -0
- package/build/AnonCredsApiOptions.js.map +1 -0
- package/build/AnonCredsModule.d.ts +19 -0
- package/build/AnonCredsModule.js +41 -0
- package/build/AnonCredsModule.js.map +1 -0
- package/build/AnonCredsModuleConfig.d.ts +28 -0
- package/build/AnonCredsModuleConfig.js +23 -0
- package/build/AnonCredsModuleConfig.js.map +1 -0
- package/build/error/AnonCredsError.d.ts +6 -0
- package/build/error/AnonCredsError.js +11 -0
- package/build/error/AnonCredsError.js.map +1 -0
- package/build/error/AnonCredsStoreRecordError.d.ts +6 -0
- package/build/error/AnonCredsStoreRecordError.js +11 -0
- package/build/error/AnonCredsStoreRecordError.js.map +1 -0
- package/build/error/index.d.ts +2 -0
- package/build/error/index.js +19 -0
- package/build/error/index.js.map +1 -0
- package/build/formats/AnonCredsCredentialFormat.d.ts +79 -0
- package/build/formats/AnonCredsCredentialFormat.js +3 -0
- package/build/formats/AnonCredsCredentialFormat.js.map +1 -0
- package/build/formats/AnonCredsCredentialFormatService.d.ts +80 -0
- package/build/formats/AnonCredsCredentialFormatService.js +455 -0
- package/build/formats/AnonCredsCredentialFormatService.js.map +1 -0
- package/build/formats/AnonCredsProofFormat.d.ts +70 -0
- package/build/formats/AnonCredsProofFormat.js +3 -0
- package/build/formats/AnonCredsProofFormat.js.map +1 -0
- package/build/formats/AnonCredsProofFormatService.d.ts +58 -0
- package/build/formats/AnonCredsProofFormatService.js +375 -0
- package/build/formats/AnonCredsProofFormatService.js.map +1 -0
- package/build/formats/LegacyIndyCredentialFormat.d.ts +32 -0
- package/build/formats/LegacyIndyCredentialFormat.js +3 -0
- package/build/formats/LegacyIndyCredentialFormat.js.map +1 -0
- package/build/formats/LegacyIndyCredentialFormatService.d.ts +80 -0
- package/build/formats/LegacyIndyCredentialFormatService.js +414 -0
- package/build/formats/LegacyIndyCredentialFormatService.js.map +1 -0
- package/build/formats/LegacyIndyProofFormat.d.ts +29 -0
- package/build/formats/LegacyIndyProofFormat.js +3 -0
- package/build/formats/LegacyIndyProofFormat.js.map +1 -0
- package/build/formats/LegacyIndyProofFormatService.d.ts +58 -0
- package/build/formats/LegacyIndyProofFormatService.js +384 -0
- package/build/formats/LegacyIndyProofFormatService.js.map +1 -0
- package/build/formats/index.d.ts +8 -0
- package/build/formats/index.js +30 -0
- package/build/formats/index.js.map +1 -0
- package/build/index.d.ts +16 -0
- package/build/index.js +41 -0
- package/build/index.js.map +1 -0
- package/build/models/AnonCredsCredentialProposal.d.ts +62 -0
- package/build/models/AnonCredsCredentialProposal.js +81 -0
- package/build/models/AnonCredsCredentialProposal.js.map +1 -0
- package/build/models/AnonCredsProofRequest.d.ts +27 -0
- package/build/models/AnonCredsProofRequest.js +82 -0
- package/build/models/AnonCredsProofRequest.js.map +1 -0
- package/build/models/AnonCredsRequestedAttribute.d.ts +16 -0
- package/build/models/AnonCredsRequestedAttribute.js +56 -0
- package/build/models/AnonCredsRequestedAttribute.js.map +1 -0
- package/build/models/AnonCredsRequestedPredicate.d.ts +19 -0
- package/build/models/AnonCredsRequestedPredicate.js +61 -0
- package/build/models/AnonCredsRequestedPredicate.js.map +1 -0
- package/build/models/AnonCredsRestriction.d.ts +55 -0
- package/build/models/AnonCredsRestriction.js +160 -0
- package/build/models/AnonCredsRestriction.js.map +1 -0
- package/build/models/AnonCredsRestrictionWrapper.d.ts +4 -0
- package/build/models/AnonCredsRestrictionWrapper.js +25 -0
- package/build/models/AnonCredsRestrictionWrapper.js.map +1 -0
- package/build/models/AnonCredsRevocationInterval.d.ts +5 -0
- package/build/models/AnonCredsRevocationInterval.js +33 -0
- package/build/models/AnonCredsRevocationInterval.js.map +1 -0
- package/build/models/exchange.d.ts +100 -0
- package/build/models/exchange.js +5 -0
- package/build/models/exchange.js.map +1 -0
- package/build/models/index.d.ts +4 -0
- package/build/models/index.js +21 -0
- package/build/models/index.js.map +1 -0
- package/build/models/internal.d.ts +38 -0
- package/build/models/internal.js +3 -0
- package/build/models/internal.js.map +1 -0
- package/build/models/registry.d.ts +39 -0
- package/build/models/registry.js +3 -0
- package/build/models/registry.js.map +1 -0
- package/build/protocols/credentials/v1/V1CredentialProtocol.d.ts +162 -0
- package/build/protocols/credentials/v1/V1CredentialProtocol.js +901 -0
- package/build/protocols/credentials/v1/V1CredentialProtocol.js.map +1 -0
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.d.ts +10 -0
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js +18 -0
- package/build/protocols/credentials/v1/errors/V1CredentialProblemReportError.js.map +1 -0
- package/build/protocols/credentials/v1/errors/index.d.ts +1 -0
- package/build/protocols/credentials/v1/errors/index.js +6 -0
- package/build/protocols/credentials/v1/errors/index.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.d.ts +9 -0
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js +15 -0
- package/build/protocols/credentials/v1/handlers/V1CredentialAckHandler.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.d.ts +9 -0
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js +15 -0
- package/build/protocols/credentials/v1/handlers/V1CredentialProblemReportHandler.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.d.ts +10 -0
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js +40 -0
- package/build/protocols/credentials/v1/handlers/V1IssueCredentialHandler.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.d.ts +10 -0
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js +33 -0
- package/build/protocols/credentials/v1/handlers/V1OfferCredentialHandler.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.d.ts +10 -0
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js +38 -0
- package/build/protocols/credentials/v1/handlers/V1ProposeCredentialHandler.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.d.ts +10 -0
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js +40 -0
- package/build/protocols/credentials/v1/handlers/V1RequestCredentialHandler.js.map +1 -0
- package/build/protocols/credentials/v1/handlers/index.d.ts +6 -0
- package/build/protocols/credentials/v1/handlers/index.js +23 -0
- package/build/protocols/credentials/v1/handlers/index.js.map +1 -0
- package/build/protocols/credentials/v1/index.d.ts +2 -0
- package/build/protocols/credentials/v1/index.js +19 -0
- package/build/protocols/credentials/v1/index.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.d.ts +16 -0
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js +34 -0
- package/build/protocols/credentials/v1/messages/V1CredentialAckMessage.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.d.ts +26 -0
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.js +69 -0
- package/build/protocols/credentials/v1/messages/V1CredentialPreview.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.d.ts +16 -0
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js +34 -0
- package/build/protocols/credentials/v1/messages/V1CredentialProblemReportMessage.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.d.ts +19 -0
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js +62 -0
- package/build/protocols/credentials/v1/messages/V1IssueCredentialMessage.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.d.ts +27 -0
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js +75 -0
- package/build/protocols/credentials/v1/messages/V1OfferCredentialMessage.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.d.ts +59 -0
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js +109 -0
- package/build/protocols/credentials/v1/messages/V1ProposeCredentialMessage.js.map +1 -0
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.d.ts +19 -0
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js +61 -0
- package/build/protocols/credentials/v1/messages/V1RequestCredentialMessage.js.map +1 -0
- package/build/protocols/credentials/v1/messages/index.d.ts +7 -0
- package/build/protocols/credentials/v1/messages/index.js +24 -0
- package/build/protocols/credentials/v1/messages/index.js.map +1 -0
- package/build/protocols/index.d.ts +2 -0
- package/build/protocols/index.js +19 -0
- package/build/protocols/index.js.map +1 -0
- package/build/protocols/proofs/v1/V1ProofProtocol.d.ts +50 -0
- package/build/protocols/proofs/v1/V1ProofProtocol.js +826 -0
- package/build/protocols/proofs/v1/V1ProofProtocol.js.map +1 -0
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.d.ts +12 -0
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js +19 -0
- package/build/protocols/proofs/v1/errors/V1PresentationProblemReportError.js.map +1 -0
- package/build/protocols/proofs/v1/errors/index.d.ts +1 -0
- package/build/protocols/proofs/v1/errors/index.js +18 -0
- package/build/protocols/proofs/v1/errors/index.js.map +1 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.d.ts +9 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js +15 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationAckHandler.js.map +1 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.d.ts +10 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js +40 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationHandler.js.map +1 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.d.ts +9 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js +15 -0
- package/build/protocols/proofs/v1/handlers/V1PresentationProblemReportHandler.js.map +1 -0
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.d.ts +11 -0
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js +38 -0
- package/build/protocols/proofs/v1/handlers/V1ProposePresentationHandler.js.map +1 -0
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.d.ts +10 -0
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js +35 -0
- package/build/protocols/proofs/v1/handlers/V1RequestPresentationHandler.js.map +1 -0
- package/build/protocols/proofs/v1/handlers/index.d.ts +5 -0
- package/build/protocols/proofs/v1/handlers/index.js +22 -0
- package/build/protocols/proofs/v1/handlers/index.js.map +1 -0
- package/build/protocols/proofs/v1/index.d.ts +4 -0
- package/build/protocols/proofs/v1/index.js +21 -0
- package/build/protocols/proofs/v1/index.js.map +1 -0
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.d.ts +8 -0
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js +27 -0
- package/build/protocols/proofs/v1/messages/V1PresentationAckMessage.js.map +1 -0
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.d.ts +31 -0
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.js +67 -0
- package/build/protocols/proofs/v1/messages/V1PresentationMessage.js.map +1 -0
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.d.ts +16 -0
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js +34 -0
- package/build/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.js.map +1 -0
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.d.ts +26 -0
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js +53 -0
- package/build/protocols/proofs/v1/messages/V1ProposePresentationMessage.js.map +1 -0
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.d.ts +29 -0
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js +65 -0
- package/build/protocols/proofs/v1/messages/V1RequestPresentationMessage.js.map +1 -0
- package/build/protocols/proofs/v1/messages/index.d.ts +5 -0
- package/build/protocols/proofs/v1/messages/index.js +22 -0
- package/build/protocols/proofs/v1/messages/index.js.map +1 -0
- package/build/protocols/proofs/v1/models/V1PresentationPreview.d.ts +50 -0
- package/build/protocols/proofs/v1/models/V1PresentationPreview.js +130 -0
- package/build/protocols/proofs/v1/models/V1PresentationPreview.js.map +1 -0
- package/build/protocols/proofs/v1/models/index.d.ts +1 -0
- package/build/protocols/proofs/v1/models/index.js +18 -0
- package/build/protocols/proofs/v1/models/index.js.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.d.ts +20 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js +22 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRecord.js.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.d.ts +8 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js +35 -0
- package/build/repository/AnonCredsCredentialDefinitionPrivateRepository.js.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.d.ts +38 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.js +29 -0
- package/build/repository/AnonCredsCredentialDefinitionRecord.js.map +1 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.d.ts +8 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.js +53 -0
- package/build/repository/AnonCredsCredentialDefinitionRepository.js.map +1 -0
- package/build/repository/AnonCredsCredentialRecord.d.ts +48 -0
- package/build/repository/AnonCredsCredentialRecord.js +37 -0
- package/build/repository/AnonCredsCredentialRecord.js.map +1 -0
- package/build/repository/AnonCredsCredentialRepository.d.ts +10 -0
- package/build/repository/AnonCredsCredentialRepository.js +41 -0
- package/build/repository/AnonCredsCredentialRepository.js.map +1 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.d.ts +20 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.js +22 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRecord.js.map +1 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.d.ts +8 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.js +35 -0
- package/build/repository/AnonCredsKeyCorrectnessProofRepository.js.map +1 -0
- package/build/repository/AnonCredsLinkSecretRecord.d.ts +23 -0
- package/build/repository/AnonCredsLinkSecretRecord.js +22 -0
- package/build/repository/AnonCredsLinkSecretRecord.js.map +1 -0
- package/build/repository/AnonCredsLinkSecretRepository.d.ts +10 -0
- package/build/repository/AnonCredsLinkSecretRepository.js +41 -0
- package/build/repository/AnonCredsLinkSecretRepository.js.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.d.ts +34 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js +30 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRecord.js.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.d.ts +10 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js +38 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionPrivateRepository.js.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.d.ts +24 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js +22 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRecord.js.map +1 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.d.ts +9 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js +38 -0
- package/build/repository/AnonCredsRevocationRegistryDefinitionRepository.js.map +1 -0
- package/build/repository/AnonCredsSchemaRecord.d.ts +38 -0
- package/build/repository/AnonCredsSchemaRecord.js +29 -0
- package/build/repository/AnonCredsSchemaRecord.js.map +1 -0
- package/build/repository/AnonCredsSchemaRepository.d.ts +8 -0
- package/build/repository/AnonCredsSchemaRepository.js +53 -0
- package/build/repository/AnonCredsSchemaRepository.js.map +1 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.d.ts +9 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js +9 -0
- package/build/repository/anonCredsCredentialDefinitionRecordMetadataTypes.js.map +1 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.d.ts +9 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js +9 -0
- package/build/repository/anonCredsRevocationRegistryDefinitionRecordMetadataTypes.js.map +1 -0
- package/build/repository/anonCredsSchemaRecordMetadataTypes.d.ts +9 -0
- package/build/repository/anonCredsSchemaRecordMetadataTypes.js +9 -0
- package/build/repository/anonCredsSchemaRecordMetadataTypes.js.map +1 -0
- package/build/repository/index.d.ts +16 -0
- package/build/repository/index.js +33 -0
- package/build/repository/index.js.map +1 -0
- package/build/services/AnonCredsHolderService.d.ts +15 -0
- package/build/services/AnonCredsHolderService.js +5 -0
- package/build/services/AnonCredsHolderService.js.map +1 -0
- package/build/services/AnonCredsHolderServiceOptions.d.ts +82 -0
- package/build/services/AnonCredsHolderServiceOptions.js +3 -0
- package/build/services/AnonCredsHolderServiceOptions.js.map +1 -0
- package/build/services/AnonCredsIssuerService.d.ts +14 -0
- package/build/services/AnonCredsIssuerService.js +5 -0
- package/build/services/AnonCredsIssuerService.js.map +1 -0
- package/build/services/AnonCredsIssuerServiceOptions.d.ts +61 -0
- package/build/services/AnonCredsIssuerServiceOptions.js +3 -0
- package/build/services/AnonCredsIssuerServiceOptions.js.map +1 -0
- package/build/services/AnonCredsVerifierService.d.ts +6 -0
- package/build/services/AnonCredsVerifierService.js +5 -0
- package/build/services/AnonCredsVerifierService.js.map +1 -0
- package/build/services/AnonCredsVerifierServiceOptions.d.ts +20 -0
- package/build/services/AnonCredsVerifierServiceOptions.js +3 -0
- package/build/services/AnonCredsVerifierServiceOptions.js.map +1 -0
- package/build/services/index.d.ts +8 -0
- package/build/services/index.js +27 -0
- package/build/services/index.js.map +1 -0
- package/build/services/registry/AnonCredsRegistry.d.ts +25 -0
- package/build/services/registry/AnonCredsRegistry.js +3 -0
- package/build/services/registry/AnonCredsRegistry.js.map +1 -0
- package/build/services/registry/AnonCredsRegistryService.d.ts +10 -0
- package/build/services/registry/AnonCredsRegistryService.js +33 -0
- package/build/services/registry/AnonCredsRegistryService.js.map +1 -0
- package/build/services/registry/CredentialDefinitionOptions.d.ts +34 -0
- package/build/services/registry/CredentialDefinitionOptions.js +3 -0
- package/build/services/registry/CredentialDefinitionOptions.js.map +1 -0
- package/build/services/registry/RevocationRegistryDefinitionOptions.d.ts +34 -0
- package/build/services/registry/RevocationRegistryDefinitionOptions.js +3 -0
- package/build/services/registry/RevocationRegistryDefinitionOptions.js.map +1 -0
- package/build/services/registry/RevocationStatusListOptions.d.ts +32 -0
- package/build/services/registry/RevocationStatusListOptions.js +3 -0
- package/build/services/registry/RevocationStatusListOptions.js.map +1 -0
- package/build/services/registry/SchemaOptions.d.ts +34 -0
- package/build/services/registry/SchemaOptions.js +3 -0
- package/build/services/registry/SchemaOptions.js.map +1 -0
- package/build/services/registry/base.d.ts +19 -0
- package/build/services/registry/base.js +3 -0
- package/build/services/registry/base.js.map +1 -0
- package/build/services/registry/index.d.ts +7 -0
- package/build/services/registry/index.js +23 -0
- package/build/services/registry/index.js.map +1 -0
- package/build/services/tails/BasicTailsFileService.d.ts +23 -0
- package/build/services/tails/BasicTailsFileService.js +65 -0
- package/build/services/tails/BasicTailsFileService.js.map +1 -0
- package/build/services/tails/TailsFileService.d.ts +42 -0
- package/build/services/tails/TailsFileService.js +3 -0
- package/build/services/tails/TailsFileService.js.map +1 -0
- package/build/services/tails/index.d.ts +2 -0
- package/build/services/tails/index.js +19 -0
- package/build/services/tails/index.js.map +1 -0
- package/build/updates/0.3.1-0.4/credentialDefinition.d.ts +18 -0
- package/build/updates/0.3.1-0.4/credentialDefinition.js +57 -0
- package/build/updates/0.3.1-0.4/credentialDefinition.js.map +1 -0
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.d.ts +69 -0
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.js +122 -0
- package/build/updates/0.3.1-0.4/credentialExchangeRecord.js.map +1 -0
- package/build/updates/0.3.1-0.4/index.d.ts +2 -0
- package/build/updates/0.3.1-0.4/index.js +15 -0
- package/build/updates/0.3.1-0.4/index.js.map +1 -0
- package/build/updates/0.3.1-0.4/linkSecret.d.ts +6 -0
- package/build/updates/0.3.1-0.4/linkSecret.js +36 -0
- package/build/updates/0.3.1-0.4/linkSecret.js.map +1 -0
- package/build/updates/0.3.1-0.4/schema.d.ts +15 -0
- package/build/updates/0.3.1-0.4/schema.js +42 -0
- package/build/updates/0.3.1-0.4/schema.js.map +1 -0
- package/build/utils/areRequestsEqual.d.ts +6 -0
- package/build/utils/areRequestsEqual.js +136 -0
- package/build/utils/areRequestsEqual.js.map +1 -0
- package/build/utils/composeAutoAccept.d.ts +15 -0
- package/build/utils/composeAutoAccept.js +27 -0
- package/build/utils/composeAutoAccept.js.map +1 -0
- package/build/utils/createRequestFromPreview.d.ts +10 -0
- package/build/utils/createRequestFromPreview.js +72 -0
- package/build/utils/createRequestFromPreview.js.map +1 -0
- package/build/utils/credential.d.ts +62 -0
- package/build/utils/credential.js +169 -0
- package/build/utils/credential.js.map +1 -0
- package/build/utils/credentialPreviewAttributes.d.ts +2 -0
- package/build/utils/credentialPreviewAttributes.js +25 -0
- package/build/utils/credentialPreviewAttributes.js.map +1 -0
- package/build/utils/getRevocationRegistries.d.ts +22 -0
- package/build/utils/getRevocationRegistries.js +152 -0
- package/build/utils/getRevocationRegistries.js.map +1 -0
- package/build/utils/hasDuplicateGroupNames.d.ts +2 -0
- package/build/utils/hasDuplicateGroupNames.js +23 -0
- package/build/utils/hasDuplicateGroupNames.js.map +1 -0
- package/build/utils/index.d.ts +13 -0
- package/build/utils/index.js +36 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/indyIdentifiers.d.ts +48 -0
- package/build/utils/indyIdentifiers.js +146 -0
- package/build/utils/indyIdentifiers.js.map +1 -0
- package/build/utils/isMap.d.ts +5 -0
- package/build/utils/isMap.js +18 -0
- package/build/utils/isMap.js.map +1 -0
- package/build/utils/linkSecret.d.ts +7 -0
- package/build/utils/linkSecret.js +24 -0
- package/build/utils/linkSecret.js.map +1 -0
- package/build/utils/metadata.d.ts +24 -0
- package/build/utils/metadata.js +18 -0
- package/build/utils/metadata.js.map +1 -0
- package/build/utils/proverDid.d.ts +8 -0
- package/build/utils/proverDid.js +16 -0
- package/build/utils/proverDid.js.map +1 -0
- package/build/utils/revocationInterval.d.ts +7 -0
- package/build/utils/revocationInterval.js +15 -0
- package/build/utils/revocationInterval.js.map +1 -0
- package/build/utils/sortRequestedCredentialsMatches.d.ts +8 -0
- package/build/utils/sortRequestedCredentialsMatches.js +33 -0
- package/build/utils/sortRequestedCredentialsMatches.js.map +1 -0
- package/build/utils/timestamp.d.ts +1 -0
- package/build/utils/timestamp.js +7 -0
- package/build/utils/timestamp.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.V1PresentationProblemReportMessage = void 0;
|
|
13
|
+
const core_1 = require("@credo-ts/core");
|
|
14
|
+
/**
|
|
15
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0035-report-problem/README.md
|
|
16
|
+
*/
|
|
17
|
+
class V1PresentationProblemReportMessage extends core_1.ProblemReportMessage {
|
|
18
|
+
/**
|
|
19
|
+
* Create new PresentationProblemReportMessage instance.
|
|
20
|
+
* @param options description of error and multiple optional fields for reporting problem
|
|
21
|
+
*/
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super(options);
|
|
24
|
+
this.allowDidSovPrefix = true;
|
|
25
|
+
this.type = V1PresentationProblemReportMessage.type.messageTypeUri;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
V1PresentationProblemReportMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/present-proof/1.0/problem-report');
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, core_1.IsValidMessageType)(V1PresentationProblemReportMessage.type),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], V1PresentationProblemReportMessage.prototype, "type", void 0);
|
|
33
|
+
exports.V1PresentationProblemReportMessage = V1PresentationProblemReportMessage;
|
|
34
|
+
//# sourceMappingURL=V1PresentationProblemReportMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1PresentationProblemReportMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/proofs/v1/messages/V1PresentationProblemReportMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA2F;AAI3F;;GAEG;AACH,MAAa,kCAAmC,SAAQ,2BAAoB;IAG1E;;;OAGG;IACH,YAAmB,OAAkD;QACnE,KAAK,CAAC,OAAO,CAAC,CAAA;QAPA,sBAAiB,GAAG,IAAI,CAAA;QAWxB,SAAI,GAAG,kCAAkC,CAAC,IAAI,CAAC,cAAc,CAAA;IAH7E,CAAC;;AAIsB,uCAAI,GAAG,IAAA,uBAAgB,EAAC,sDAAsD,CAAC,CAAA;AAFtG;IAAC,IAAA,yBAAkB,EAAC,kCAAkC,CAAC,IAAI,CAAC;;gEACiB;AAZ/E,gFAcC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AgentMessage } from '@credo-ts/core';
|
|
2
|
+
import { V1PresentationPreview } from '../models/V1PresentationPreview';
|
|
3
|
+
export interface V1ProposePresentationMessageOptions {
|
|
4
|
+
id?: string;
|
|
5
|
+
comment?: string;
|
|
6
|
+
presentationProposal: V1PresentationPreview;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Propose Presentation Message part of Present Proof Protocol used to initiate presentation exchange by holder.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0037-present-proof/README.md#propose-presentation
|
|
12
|
+
*/
|
|
13
|
+
export declare class V1ProposePresentationMessage extends AgentMessage {
|
|
14
|
+
readonly allowDidSovPrefix = true;
|
|
15
|
+
constructor(options: V1ProposePresentationMessageOptions);
|
|
16
|
+
readonly type: string;
|
|
17
|
+
static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
|
|
18
|
+
/**
|
|
19
|
+
* Provides some human readable information about the proposed presentation.
|
|
20
|
+
*/
|
|
21
|
+
comment?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Represents the presentation example that prover wants to provide.
|
|
24
|
+
*/
|
|
25
|
+
presentationProposal: V1PresentationPreview;
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.V1ProposePresentationMessage = void 0;
|
|
13
|
+
const core_1 = require("@credo-ts/core");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const V1PresentationPreview_1 = require("../models/V1PresentationPreview");
|
|
17
|
+
/**
|
|
18
|
+
* Propose Presentation Message part of Present Proof Protocol used to initiate presentation exchange by holder.
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0037-present-proof/README.md#propose-presentation
|
|
21
|
+
*/
|
|
22
|
+
class V1ProposePresentationMessage extends core_1.AgentMessage {
|
|
23
|
+
constructor(options) {
|
|
24
|
+
var _a;
|
|
25
|
+
super();
|
|
26
|
+
this.allowDidSovPrefix = true;
|
|
27
|
+
this.type = V1ProposePresentationMessage.type.messageTypeUri;
|
|
28
|
+
if (options) {
|
|
29
|
+
this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
|
|
30
|
+
this.comment = options.comment;
|
|
31
|
+
this.presentationProposal = options.presentationProposal;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
V1ProposePresentationMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/present-proof/1.0/propose-presentation');
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, core_1.IsValidMessageType)(V1ProposePresentationMessage.type),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], V1ProposePresentationMessage.prototype, "type", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], V1ProposePresentationMessage.prototype, "comment", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_transformer_1.Expose)({ name: 'presentation_proposal' }),
|
|
47
|
+
(0, class_transformer_1.Type)(() => V1PresentationPreview_1.V1PresentationPreview),
|
|
48
|
+
(0, class_validator_1.ValidateNested)(),
|
|
49
|
+
(0, class_validator_1.IsInstance)(V1PresentationPreview_1.V1PresentationPreview),
|
|
50
|
+
__metadata("design:type", V1PresentationPreview_1.V1PresentationPreview)
|
|
51
|
+
], V1ProposePresentationMessage.prototype, "presentationProposal", void 0);
|
|
52
|
+
exports.V1ProposePresentationMessage = V1ProposePresentationMessage;
|
|
53
|
+
//# sourceMappingURL=V1ProposePresentationMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1ProposePresentationMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/proofs/v1/messages/V1ProposePresentationMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAmF;AACnF,yDAAgD;AAChD,qDAAkF;AAElF,2EAAuE;AAQvE;;;;GAIG;AACH,MAAa,4BAA6B,SAAQ,mBAAY;IAE5D,YAAmB,OAA4C;;QAC7D,KAAK,EAAE,CAAA;QAFO,sBAAiB,GAAG,IAAI,CAAA;QAYxB,SAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC,cAAc,CAAA;QARrE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAA;SACzD;IACH,CAAC;;AAIsB,iCAAI,GAAG,IAAA,uBAAgB,EAAC,4DAA4D,CAAC,CAAA;AAF5G;IAAC,IAAA,yBAAkB,EAAC,4BAA4B,CAAC,IAAI,CAAC;;0DACiB;AAMvE;IAAC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;6DACU;AAKvB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC;IACzC,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,6CAAqB,CAAC;IACjC,IAAA,gCAAc,GAAE;IAChB,IAAA,4BAAU,EAAC,6CAAqB,CAAC;8BACJ,6CAAqB;0EAAA;AA9BrD,oEA+BC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { LegacyIndyProofRequest } from '../../../../formats';
|
|
2
|
+
import { Attachment, AgentMessage } from '@credo-ts/core';
|
|
3
|
+
export interface V1RequestPresentationMessageOptions {
|
|
4
|
+
id?: string;
|
|
5
|
+
comment?: string;
|
|
6
|
+
requestAttachments: Attachment[];
|
|
7
|
+
}
|
|
8
|
+
export declare const INDY_PROOF_REQUEST_ATTACHMENT_ID = "libindy-request-presentation-0";
|
|
9
|
+
/**
|
|
10
|
+
* Request Presentation Message part of Present Proof Protocol used to initiate request from verifier to prover.
|
|
11
|
+
*
|
|
12
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0037-present-proof/README.md#request-presentation
|
|
13
|
+
*/
|
|
14
|
+
export declare class V1RequestPresentationMessage extends AgentMessage {
|
|
15
|
+
readonly allowDidSovPrefix = true;
|
|
16
|
+
constructor(options: V1RequestPresentationMessageOptions);
|
|
17
|
+
readonly type: string;
|
|
18
|
+
static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
|
|
19
|
+
/**
|
|
20
|
+
* Provides some human readable information about this request for a presentation.
|
|
21
|
+
*/
|
|
22
|
+
comment?: string;
|
|
23
|
+
/**
|
|
24
|
+
* An array of attachments defining the acceptable formats for the presentation.
|
|
25
|
+
*/
|
|
26
|
+
requestAttachments: Attachment[];
|
|
27
|
+
get indyProofRequest(): LegacyIndyProofRequest | null;
|
|
28
|
+
getRequestAttachmentById(id: string): Attachment | undefined;
|
|
29
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.V1RequestPresentationMessage = exports.INDY_PROOF_REQUEST_ATTACHMENT_ID = void 0;
|
|
13
|
+
const core_1 = require("@credo-ts/core");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
exports.INDY_PROOF_REQUEST_ATTACHMENT_ID = 'libindy-request-presentation-0';
|
|
17
|
+
/**
|
|
18
|
+
* Request Presentation Message part of Present Proof Protocol used to initiate request from verifier to prover.
|
|
19
|
+
*
|
|
20
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0037-present-proof/README.md#request-presentation
|
|
21
|
+
*/
|
|
22
|
+
class V1RequestPresentationMessage extends core_1.AgentMessage {
|
|
23
|
+
constructor(options) {
|
|
24
|
+
var _a;
|
|
25
|
+
super();
|
|
26
|
+
this.allowDidSovPrefix = true;
|
|
27
|
+
this.type = V1RequestPresentationMessage.type.messageTypeUri;
|
|
28
|
+
if (options) {
|
|
29
|
+
this.id = (_a = options.id) !== null && _a !== void 0 ? _a : this.generateId();
|
|
30
|
+
this.comment = options.comment;
|
|
31
|
+
this.requestAttachments = options.requestAttachments;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
get indyProofRequest() {
|
|
35
|
+
var _a;
|
|
36
|
+
const attachment = this.requestAttachments.find((attachment) => attachment.id === exports.INDY_PROOF_REQUEST_ATTACHMENT_ID);
|
|
37
|
+
// Extract proof request from attachment
|
|
38
|
+
return (_a = attachment === null || attachment === void 0 ? void 0 : attachment.getDataAsJson()) !== null && _a !== void 0 ? _a : null;
|
|
39
|
+
}
|
|
40
|
+
getRequestAttachmentById(id) {
|
|
41
|
+
return this.requestAttachments.find((attachment) => attachment.id === id);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
V1RequestPresentationMessage.type = (0, core_1.parseMessageType)('https://didcomm.org/present-proof/1.0/request-presentation');
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, core_1.IsValidMessageType)(V1RequestPresentationMessage.type),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], V1RequestPresentationMessage.prototype, "type", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsOptional)(),
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], V1RequestPresentationMessage.prototype, "comment", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)({ name: 'request_presentations~attach' }),
|
|
56
|
+
(0, class_transformer_1.Type)(() => core_1.Attachment),
|
|
57
|
+
(0, class_validator_1.IsArray)(),
|
|
58
|
+
(0, class_validator_1.ValidateNested)({
|
|
59
|
+
each: true,
|
|
60
|
+
}),
|
|
61
|
+
(0, class_validator_1.IsInstance)(core_1.Attachment, { each: true }),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], V1RequestPresentationMessage.prototype, "requestAttachments", void 0);
|
|
64
|
+
exports.V1RequestPresentationMessage = V1RequestPresentationMessage;
|
|
65
|
+
//# sourceMappingURL=V1RequestPresentationMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1RequestPresentationMessage.js","sourceRoot":"","sources":["../../../../../src/protocols/proofs/v1/messages/V1RequestPresentationMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,yCAA+F;AAC/F,yDAAgD;AAChD,qDAA2F;AAQ9E,QAAA,gCAAgC,GAAG,gCAAgC,CAAA;AAEhF;;;;GAIG;AACH,MAAa,4BAA6B,SAAQ,mBAAY;IAG5D,YAAmB,OAA4C;;QAC7D,KAAK,EAAE,CAAA;QAHO,sBAAiB,GAAG,IAAI,CAAA;QAaxB,SAAI,GAAG,4BAA4B,CAAC,IAAI,CAAC,cAAc,CAAA;QARrE,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,EAAE,GAAG,MAAA,OAAO,CAAC,EAAE,mCAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAA;SACrD;IACH,CAAC;IAyBD,IAAW,gBAAgB;;QACzB,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,wCAAgC,CAAC,CAAA;QACnH,wCAAwC;QACxC,OAAO,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,aAAa,EAA0B,mCAAI,IAAI,CAAA;IACpE,CAAC;IAEM,wBAAwB,CAAC,EAAU;QACxC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;IAC3E,CAAC;;AA7BsB,iCAAI,GAAG,IAAA,uBAAgB,EAAC,4DAA4D,CAAC,CAAA;AAF5G;IAAC,IAAA,yBAAkB,EAAC,4BAA4B,CAAC,IAAI,CAAC;;0DACiB;AAMvE;IAAC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;6DACY;AAKvB;IAAC,IAAA,0BAAM,EAAC,EAAE,IAAI,EAAE,8BAA8B,EAAE,CAAC;IAChD,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,iBAAU,CAAC;IACtB,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,4BAAU,EAAC,iBAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;wEACC;AAlC1C,oEA6CC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./V1ProposePresentationMessage"), exports);
|
|
18
|
+
__exportStar(require("./V1RequestPresentationMessage"), exports);
|
|
19
|
+
__exportStar(require("./V1PresentationProblemReportMessage"), exports);
|
|
20
|
+
__exportStar(require("./V1PresentationMessage"), exports);
|
|
21
|
+
__exportStar(require("./V1PresentationAckMessage"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/protocols/proofs/v1/messages/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA8C;AAC9C,iEAA8C;AAC9C,uEAAoD;AACpD,0DAAuC;AACvC,6DAA0C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AnonCredsPredicateType } from '../../../../models';
|
|
2
|
+
export interface V1PresentationPreviewAttributeOptions {
|
|
3
|
+
name: string;
|
|
4
|
+
credentialDefinitionId?: string;
|
|
5
|
+
mimeType?: string;
|
|
6
|
+
value?: string;
|
|
7
|
+
referent?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class V1PresentationPreviewAttribute {
|
|
10
|
+
constructor(options: V1PresentationPreviewAttributeOptions);
|
|
11
|
+
name: string;
|
|
12
|
+
credentialDefinitionId?: string;
|
|
13
|
+
mimeType?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
referent?: string;
|
|
16
|
+
toJSON(): Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export interface V1PresentationPreviewPredicateOptions {
|
|
19
|
+
name: string;
|
|
20
|
+
credentialDefinitionId: string;
|
|
21
|
+
predicate: AnonCredsPredicateType;
|
|
22
|
+
threshold: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class V1PresentationPreviewPredicate {
|
|
25
|
+
constructor(options: V1PresentationPreviewPredicateOptions);
|
|
26
|
+
name: string;
|
|
27
|
+
credentialDefinitionId: string;
|
|
28
|
+
predicate: AnonCredsPredicateType;
|
|
29
|
+
threshold: number;
|
|
30
|
+
toJSON(): Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface V1PresentationPreviewOptions {
|
|
33
|
+
attributes?: V1PresentationPreviewAttributeOptions[];
|
|
34
|
+
predicates?: V1PresentationPreviewPredicateOptions[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Presentation preview inner message class.
|
|
38
|
+
*
|
|
39
|
+
* This is not a message but an inner object for other messages in this protocol. It is used to construct a preview of the data for the presentation.
|
|
40
|
+
*
|
|
41
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0037-present-proof/README.md#presentation-preview
|
|
42
|
+
*/
|
|
43
|
+
export declare class V1PresentationPreview {
|
|
44
|
+
constructor(options: V1PresentationPreviewOptions);
|
|
45
|
+
readonly type: string;
|
|
46
|
+
static readonly type: import("@credo-ts/core/build/utils/messageType").ParsedMessageType;
|
|
47
|
+
attributes: V1PresentationPreviewAttribute[];
|
|
48
|
+
predicates: V1PresentationPreviewPredicate[];
|
|
49
|
+
toJSON(): Record<string, unknown>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.V1PresentationPreview = exports.V1PresentationPreviewPredicate = exports.V1PresentationPreviewAttribute = void 0;
|
|
13
|
+
const core_1 = require("@credo-ts/core");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const models_1 = require("../../../../models");
|
|
17
|
+
const utils_1 = require("../../../../utils");
|
|
18
|
+
class V1PresentationPreviewAttribute {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
if (options) {
|
|
21
|
+
this.name = options.name;
|
|
22
|
+
this.credentialDefinitionId = options.credentialDefinitionId;
|
|
23
|
+
this.mimeType = options.mimeType;
|
|
24
|
+
this.value = options.value;
|
|
25
|
+
this.referent = options.referent;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
toJSON() {
|
|
29
|
+
return core_1.JsonTransformer.toJSON(this);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)({ name: 'cred_def_id' }),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.ValidateIf)((o) => o.referent !== undefined),
|
|
36
|
+
(0, class_validator_1.Matches)(utils_1.unqualifiedCredentialDefinitionIdRegex),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], V1PresentationPreviewAttribute.prototype, "credentialDefinitionId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)({ name: 'mime-type' }),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsMimeType)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], V1PresentationPreviewAttribute.prototype, "mimeType", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], V1PresentationPreviewAttribute.prototype, "value", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], V1PresentationPreviewAttribute.prototype, "referent", void 0);
|
|
55
|
+
exports.V1PresentationPreviewAttribute = V1PresentationPreviewAttribute;
|
|
56
|
+
class V1PresentationPreviewPredicate {
|
|
57
|
+
constructor(options) {
|
|
58
|
+
if (options) {
|
|
59
|
+
this.name = options.name;
|
|
60
|
+
this.credentialDefinitionId = options.credentialDefinitionId;
|
|
61
|
+
this.predicate = options.predicate;
|
|
62
|
+
this.threshold = options.threshold;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
toJSON() {
|
|
66
|
+
return core_1.JsonTransformer.toJSON(this);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_validator_1.IsString)(),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], V1PresentationPreviewPredicate.prototype, "name", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_transformer_1.Expose)({ name: 'cred_def_id' }),
|
|
75
|
+
(0, class_validator_1.IsString)(),
|
|
76
|
+
(0, class_validator_1.Matches)(utils_1.unqualifiedCredentialDefinitionIdRegex),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], V1PresentationPreviewPredicate.prototype, "credentialDefinitionId", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_validator_1.IsIn)(models_1.anonCredsPredicateType),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], V1PresentationPreviewPredicate.prototype, "predicate", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsInt)(),
|
|
85
|
+
__metadata("design:type", Number)
|
|
86
|
+
], V1PresentationPreviewPredicate.prototype, "threshold", void 0);
|
|
87
|
+
exports.V1PresentationPreviewPredicate = V1PresentationPreviewPredicate;
|
|
88
|
+
/**
|
|
89
|
+
* Presentation preview inner message class.
|
|
90
|
+
*
|
|
91
|
+
* This is not a message but an inner object for other messages in this protocol. It is used to construct a preview of the data for the presentation.
|
|
92
|
+
*
|
|
93
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/master/features/0037-present-proof/README.md#presentation-preview
|
|
94
|
+
*/
|
|
95
|
+
class V1PresentationPreview {
|
|
96
|
+
constructor(options) {
|
|
97
|
+
var _a, _b, _c, _d;
|
|
98
|
+
this.type = V1PresentationPreview.type.messageTypeUri;
|
|
99
|
+
if (options) {
|
|
100
|
+
this.attributes = (_b = (_a = options.attributes) === null || _a === void 0 ? void 0 : _a.map((a) => new V1PresentationPreviewAttribute(a))) !== null && _b !== void 0 ? _b : [];
|
|
101
|
+
this.predicates = (_d = (_c = options.predicates) === null || _c === void 0 ? void 0 : _c.map((p) => new V1PresentationPreviewPredicate(p))) !== null && _d !== void 0 ? _d : [];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
toJSON() {
|
|
105
|
+
return core_1.JsonTransformer.toJSON(this);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
V1PresentationPreview.type = (0, core_1.parseMessageType)('https://didcomm.org/present-proof/1.0/presentation-preview');
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_transformer_1.Expose)({ name: '@type' }),
|
|
111
|
+
(0, core_1.IsValidMessageType)(V1PresentationPreview.type),
|
|
112
|
+
(0, class_transformer_1.Transform)(({ value }) => (0, core_1.replaceLegacyDidSovPrefix)(value), {
|
|
113
|
+
toClassOnly: true,
|
|
114
|
+
}),
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
|
+
], V1PresentationPreview.prototype, "type", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, class_transformer_1.Type)(() => V1PresentationPreviewAttribute),
|
|
119
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
120
|
+
(0, class_validator_1.IsInstance)(V1PresentationPreviewAttribute, { each: true }),
|
|
121
|
+
__metadata("design:type", Array)
|
|
122
|
+
], V1PresentationPreview.prototype, "attributes", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, class_transformer_1.Type)(() => V1PresentationPreviewPredicate),
|
|
125
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
126
|
+
(0, class_validator_1.IsInstance)(V1PresentationPreviewPredicate, { each: true }),
|
|
127
|
+
__metadata("design:type", Array)
|
|
128
|
+
], V1PresentationPreview.prototype, "predicates", void 0);
|
|
129
|
+
exports.V1PresentationPreview = V1PresentationPreview;
|
|
130
|
+
//# sourceMappingURL=V1PresentationPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"V1PresentationPreview.js","sourceRoot":"","sources":["../../../../../src/protocols/proofs/v1/models/V1PresentationPreview.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './V1PresentationPreview';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./V1PresentationPreview"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/protocols/proofs/v1/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TagsBase } from '@credo-ts/core';
|
|
2
|
+
import { BaseRecord } from '@credo-ts/core';
|
|
3
|
+
export interface AnonCredsCredentialDefinitionPrivateRecordProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
credentialDefinitionId: string;
|
|
6
|
+
value: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export type DefaultAnonCredsCredentialDefinitionPrivateTags = {
|
|
9
|
+
credentialDefinitionId: string;
|
|
10
|
+
};
|
|
11
|
+
export declare class AnonCredsCredentialDefinitionPrivateRecord extends BaseRecord<DefaultAnonCredsCredentialDefinitionPrivateTags, TagsBase> {
|
|
12
|
+
static readonly type = "AnonCredsCredentialDefinitionPrivateRecord";
|
|
13
|
+
readonly type = "AnonCredsCredentialDefinitionPrivateRecord";
|
|
14
|
+
readonly credentialDefinitionId: string;
|
|
15
|
+
readonly value: Record<string, unknown>;
|
|
16
|
+
constructor(props: AnonCredsCredentialDefinitionPrivateRecordProps);
|
|
17
|
+
getTags(): {
|
|
18
|
+
credentialDefinitionId: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnonCredsCredentialDefinitionPrivateRecord = void 0;
|
|
4
|
+
const core_1 = require("@credo-ts/core");
|
|
5
|
+
class AnonCredsCredentialDefinitionPrivateRecord extends core_1.BaseRecord {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
var _a;
|
|
8
|
+
super();
|
|
9
|
+
this.type = AnonCredsCredentialDefinitionPrivateRecord.type;
|
|
10
|
+
if (props) {
|
|
11
|
+
this.id = (_a = props.id) !== null && _a !== void 0 ? _a : core_1.utils.uuid();
|
|
12
|
+
this.credentialDefinitionId = props.credentialDefinitionId;
|
|
13
|
+
this.value = props.value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
getTags() {
|
|
17
|
+
return Object.assign(Object.assign({}, this._tags), { credentialDefinitionId: this.credentialDefinitionId });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.AnonCredsCredentialDefinitionPrivateRecord = AnonCredsCredentialDefinitionPrivateRecord;
|
|
21
|
+
AnonCredsCredentialDefinitionPrivateRecord.type = 'AnonCredsCredentialDefinitionPrivateRecord';
|
|
22
|
+
//# sourceMappingURL=AnonCredsCredentialDefinitionPrivateRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnonCredsCredentialDefinitionPrivateRecord.js","sourceRoot":"","sources":["../../src/repository/AnonCredsCredentialDefinitionPrivateRecord.ts"],"names":[],"mappings":";;;AAEA,yCAAkD;AAYlD,MAAa,0CAA2C,SAAQ,iBAG/D;IAOC,YAAmB,KAAsD;;QACvE,KAAK,EAAE,CAAA;QANO,SAAI,GAAG,0CAA0C,CAAC,IAAI,CAAA;QAQpE,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,EAAE,GAAG,MAAA,KAAK,CAAC,EAAE,mCAAI,YAAK,CAAC,IAAI,EAAE,CAAA;YAClC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,sBAAsB,CAAA;YAC1D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;SACzB;IACH,CAAC;IAEM,OAAO;QACZ,uCACK,IAAI,CAAC,KAAK,KACb,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,IACpD;IACH,CAAC;;AAzBH,gGA0BC;AAtBwB,+CAAI,GAAG,4CAA4C,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AgentContext } from '@credo-ts/core';
|
|
2
|
+
import { Repository, StorageService, EventEmitter } from '@credo-ts/core';
|
|
3
|
+
import { AnonCredsCredentialDefinitionPrivateRecord } from './AnonCredsCredentialDefinitionPrivateRecord';
|
|
4
|
+
export declare class AnonCredsCredentialDefinitionPrivateRepository extends Repository<AnonCredsCredentialDefinitionPrivateRecord> {
|
|
5
|
+
constructor(storageService: StorageService<AnonCredsCredentialDefinitionPrivateRecord>, eventEmitter: EventEmitter);
|
|
6
|
+
getByCredentialDefinitionId(agentContext: AgentContext, credentialDefinitionId: string): Promise<AnonCredsCredentialDefinitionPrivateRecord>;
|
|
7
|
+
findByCredentialDefinitionId(agentContext: AgentContext, credentialDefinitionId: string): Promise<AnonCredsCredentialDefinitionPrivateRecord | null>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AnonCredsCredentialDefinitionPrivateRepository = void 0;
|
|
16
|
+
const core_1 = require("@credo-ts/core");
|
|
17
|
+
const AnonCredsCredentialDefinitionPrivateRecord_1 = require("./AnonCredsCredentialDefinitionPrivateRecord");
|
|
18
|
+
let AnonCredsCredentialDefinitionPrivateRepository = class AnonCredsCredentialDefinitionPrivateRepository extends core_1.Repository {
|
|
19
|
+
constructor(storageService, eventEmitter) {
|
|
20
|
+
super(AnonCredsCredentialDefinitionPrivateRecord_1.AnonCredsCredentialDefinitionPrivateRecord, storageService, eventEmitter);
|
|
21
|
+
}
|
|
22
|
+
async getByCredentialDefinitionId(agentContext, credentialDefinitionId) {
|
|
23
|
+
return this.getSingleByQuery(agentContext, { credentialDefinitionId });
|
|
24
|
+
}
|
|
25
|
+
async findByCredentialDefinitionId(agentContext, credentialDefinitionId) {
|
|
26
|
+
return this.findSingleByQuery(agentContext, { credentialDefinitionId });
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
AnonCredsCredentialDefinitionPrivateRepository = __decorate([
|
|
30
|
+
(0, core_1.injectable)(),
|
|
31
|
+
__param(0, (0, core_1.inject)(core_1.InjectionSymbols.StorageService)),
|
|
32
|
+
__metadata("design:paramtypes", [Object, core_1.EventEmitter])
|
|
33
|
+
], AnonCredsCredentialDefinitionPrivateRepository);
|
|
34
|
+
exports.AnonCredsCredentialDefinitionPrivateRepository = AnonCredsCredentialDefinitionPrivateRepository;
|
|
35
|
+
//# sourceMappingURL=AnonCredsCredentialDefinitionPrivateRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnonCredsCredentialDefinitionPrivateRepository.js","sourceRoot":"","sources":["../../src/repository/AnonCredsCredentialDefinitionPrivateRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,yCAA+G;AAE/G,6GAAyG;AAGlG,IAAM,8CAA8C,GAApD,MAAM,8CAA+C,SAAQ,iBAAsD;IACxH,YAC2C,cAA0E,EACnH,YAA0B;QAE1B,KAAK,CAAC,uFAA0C,EAAE,cAAc,EAAE,YAAY,CAAC,CAAA;IACjF,CAAC;IAEM,KAAK,CAAC,2BAA2B,CAAC,YAA0B,EAAE,sBAA8B;QACjG,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,EAAE,sBAAsB,EAAE,CAAC,CAAA;IACxE,CAAC;IAEM,KAAK,CAAC,4BAA4B,CAAC,YAA0B,EAAE,sBAA8B;QAClG,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,sBAAsB,EAAE,CAAC,CAAA;IACzE,CAAC;CACF,CAAA;AAfY,8CAA8C;IAD1D,IAAA,iBAAU,GAAE;IAGR,WAAA,IAAA,aAAM,EAAC,uBAAgB,CAAC,cAAc,CAAC,CAAA;6CAC1B,mBAAY;GAHjB,8CAA8C,CAe1D;AAfY,wGAA8C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AnonCredsCredentialDefinitionRecordMetadata } from './anonCredsCredentialDefinitionRecordMetadataTypes';
|
|
2
|
+
import type { AnonCredsCredentialDefinition } from '../models';
|
|
3
|
+
import type { TagsBase } from '@credo-ts/core';
|
|
4
|
+
import { BaseRecord } from '@credo-ts/core';
|
|
5
|
+
export interface AnonCredsCredentialDefinitionRecordProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
credentialDefinitionId: string;
|
|
8
|
+
credentialDefinition: AnonCredsCredentialDefinition;
|
|
9
|
+
methodName: string;
|
|
10
|
+
}
|
|
11
|
+
export type DefaultAnonCredsCredentialDefinitionTags = {
|
|
12
|
+
schemaId: string;
|
|
13
|
+
credentialDefinitionId: string;
|
|
14
|
+
issuerId: string;
|
|
15
|
+
tag: string;
|
|
16
|
+
methodName: string;
|
|
17
|
+
unqualifiedCredentialDefinitionId?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare class AnonCredsCredentialDefinitionRecord extends BaseRecord<DefaultAnonCredsCredentialDefinitionTags, TagsBase, AnonCredsCredentialDefinitionRecordMetadata> {
|
|
20
|
+
static readonly type = "AnonCredsCredentialDefinitionRecord";
|
|
21
|
+
readonly type = "AnonCredsCredentialDefinitionRecord";
|
|
22
|
+
credentialDefinitionId: string;
|
|
23
|
+
credentialDefinition: AnonCredsCredentialDefinition;
|
|
24
|
+
/**
|
|
25
|
+
* AnonCreds method name. We don't use names explicitly from the registry (there's no identifier for a registry)
|
|
26
|
+
* @see https://hyperledger.github.io/anoncreds-methods-registry/
|
|
27
|
+
*/
|
|
28
|
+
methodName: string;
|
|
29
|
+
constructor(props: AnonCredsCredentialDefinitionRecordProps);
|
|
30
|
+
getTags(): {
|
|
31
|
+
credentialDefinitionId: string;
|
|
32
|
+
schemaId: string;
|
|
33
|
+
issuerId: string;
|
|
34
|
+
tag: string;
|
|
35
|
+
methodName: string;
|
|
36
|
+
unqualifiedCredentialDefinitionId: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
}
|