@credo-ts/core 0.7.3-alpha-20261022191151 → 0.7.3
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/index.d.mts +2 -1
- package/build/index.d.mts.map +1 -1
- package/build/index.mjs +2 -1
- package/build/index.mjs.map +1 -1
- package/build/modules/vc/index.d.mts +2 -1
- package/build/modules/vc/index.mjs +2 -1
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.d.mts +8 -1
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.d.mts.map +1 -1
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.mjs +31 -6
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.mjs.map +1 -1
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.d.mts +10 -0
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.d.mts.map +1 -0
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs +13 -0
- package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs.map +1 -0
- package/build/modules/vc/linked-data-proofs/index.d.mts +2 -1
- package/build/modules/vc/linked-data-proofs/index.mjs +2 -1
- package/package.json +1 -1
package/build/index.d.mts
CHANGED
|
@@ -148,6 +148,7 @@ import { Ed25519Signature2020 } from "./modules/vc/linked-data-proofs/signature-
|
|
|
148
148
|
import { JsonLdModule } from "./modules/vc/jsonld/JsonLdModule.mjs";
|
|
149
149
|
import { vcLibraries } from "./modules/vc/jsonld/index.mjs";
|
|
150
150
|
import { W3cJsonLdCredentialService } from "./modules/vc/linked-data-proofs/W3cJsonLdCredentialService.mjs";
|
|
151
|
+
import { W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdCredentialSigningNotSupportedReason } from "./modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
151
152
|
import { CustomW3cCredentialTags, DefaultW3cCredentialTags, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions } from "./modules/vc/repository/W3cCredentialRecord.mjs";
|
|
152
153
|
import { W3cCredentialRepository } from "./modules/vc/repository/W3cCredentialRepository.mjs";
|
|
153
154
|
import { DefaultW3cV2CredentialTags, W3cV2CredentialRecord, W3cV2CredentialRecordInstances, W3cV2CredentialRecordOptions } from "./modules/vc/repository/W3cV2CredentialRecord.mjs";
|
|
@@ -311,5 +312,5 @@ declare const utils: {
|
|
|
311
312
|
addSecondsToDate: typeof addSecondsToDate;
|
|
312
313
|
};
|
|
313
314
|
//#endregion
|
|
314
|
-
export { ALL_REVOCATION_REASONS_MASK, ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, Agent, type AgentApi, AgentConfig, AgentContext, AgentContextProvider, type AgentDependencies, AnonCredsDataIntegrityServiceSymbol, type AnonCredsW3cCredentialCreatePresentation, AnonCredsW3cCredentialProof, type AnonCredsW3cCredentialProofOptions, AnonCredsW3cCredentialServiceSymbol, type AnonCredsW3cCredentialVerifyPresentation, AnoncredsDataIntegrityCreatePresentation, AnoncredsDataIntegrityVerifyPresentation, ApiModule, BaseAgent, BaseEvent, BaseLogger, type BaseName, BaseRecord, BaseRecordAny, type BaseRecordConstructor, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, type Cache, CacheModule, CacheModuleConfig, type CacheModuleOptions, type CacheOptions, CachedStorageService, type CanBePromise, CertificateSigningRequest, CertificateSigningRequestOptions, ClaimFormat, type ClaimPath, ClassValidationError, ConsoleLogger, type Constructable, type Constructor, ContentType, CreateTokenStatusListOptions, CredentialIssuancePurpose, CredentialMultiInstanceState, CredentialMultiInstanceUseMode, type CredentialMultiInstanceUseUpdateMode, CredoError, CredoWebCrypto, CredoWebCryptoKey, CustomDidTags, CustomW3cCredentialTags, DID_V1_CONTEXT_URL, DataIntegrityProof, DataIntegrityProofOptions, DateOnly, DateTransformer, DcqlClaimSetDisclosedPaths, DcqlCredential, DcqlCredentialsForRequest, DcqlEncodedPresentations, DcqlEncodedPresentationsEntry, DcqlError, DcqlFailedCredential, DcqlJwtVpPresentationToCreate, DcqlJwtW3cVpPresentationToCreate, DcqlLdpVpPresentationToCreate, DcqlMatchWithRecord, DcqlMdocCredential, DcqlMdocPresentationToCreate, DcqlModule, DcqlPresentation, DcqlPresentationResult, DcqlPresentationsToCreate, DcqlQuery, DcqlQueryResult, DcqlSdJwtVcCredential, DcqlSdJwtVcPresentationToCreate, DcqlSdJwtW3cVpPresentationToCreate, DcqlSelectCredentialsForRequestOptions, DcqlSelectiveDisclosure, DcqlService, DcqlValidCredential, DcqlW3cVcCredential, DefaultAgentContextProvider, type DefaultAgentModules, DefaultMdocRecordTags, DefaultMdocVerificationSessionRecordTags, DefaultSdJwtVcRecordTags, DefaultW3cCredentialTags, DefaultW3cV2CredentialTags, DependencyManager, DeviceAndIssuerClaims, DidCommV1Service, LegacyDidCommV2Service as DidCommV2Service, type LegacyDidCommV2ServiceOptions as DidCommV2ServiceOptions, DidCreateOptions, DidCreateResult, DidDeactivateOptions, DidDeactivateResult, DidDocument, DidDocumentBuilder, DidDocumentKey, DidDocumentMetadata, DidDocumentOperation, DidDocumentRole, DidDocumentService, DidJwk, DidKey, DidOperationStateActionBase, DidOperationStateFailed, DidOperationStateFinished, DidOperationStateWait, DidPurpose, DidRecord, DidRecordMetadataKeys, DidRecordProps, DidRegistrar, DidRegistrarService, DidRegistrationExtraOptions, DidRegistrationMetadata, DidRegistrationSecretOptions, DidRepository, DidResolutionMetadata, DidResolutionOptions, DidResolutionResult, DidResolver, DidResolverService, DidUpdateOptions, DidUpdateResult, DidsApi, DidsModule, DidsModuleConfig, DidsModuleConfigOptions, DifPexCredentialsForRequest, DifPexCredentialsForRequestRequirement, DifPexCredentialsForRequestSubmissionEntry, DifPexInputDescriptorToCredentials, type DifPexPresentationWithDescriptor, DifPresentationExchangeDefinition, DifPresentationExchangeDefinitionV1, DifPresentationExchangeDefinitionV2, DifPresentationExchangeError, DifPresentationExchangeModule, DifPresentationExchangeService, DifPresentationExchangeSubmission, PresentationSubmissionLocation as DifPresentationExchangeSubmissionLocation, type DocumentLoader, type DownloadToFileOptions, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, type EmptyModuleMap, EncodedX509Certificate, EventEmitter, EventMetadata, FetchTokenStatusListOptions, type FileSystem, GenericRecord, GenericRecordStorageProps, GenericRecordTags, GenericRecordsApi, GenericRecordsModule, GetTrustedIssuersForVerification, HashName, Hasher, IAnonCredsDataIntegrityService, type IAnonCredsW3cCredentialService, IDisclosureFrame, IPresentationFrame, ImportDidOptions, InMemoryLruCache, type InMemoryLruCacheOptions, IndyAgentService, type InitConfig, InjectionSymbols, type InjectionToken, IntegrityVerifier, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsStringOrInstance, IsStringOrInstanceOrArrayOfInstances, IsStringOrStringArray, IsStringOrVerificationMethod, IsUri, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, type JsonArray, JsonEncoder, JsonLdModule, JsonLdModuleConfig, JsonLdModuleConfigOptions, type JsonObject, JsonTransformer, type JsonValue, JwkDidCreateOptions, JwkDidDeactivateOptions, JwkDidRegistrar, JwkDidResolver, JwkDidUpdateOptions, type JwsDetachedFormat, type JwsFlattenedDetachedFormat, type JwsGeneralFormat, JwsLinkedDataSignature, JwsLinkedDataSignatureOptions, type JwsProtectedHeaderOptions, JwsService, type JwsSigner, type JwsSignerDid, type JwsSignerJwk, type JwsSignerWithJwk, type JwsSignerX5c, Jwt, JwtPayload, type JwtPayloadJson, type JwtPayloadOptions, KeyDidCreateOptions, KeyDidDeactivateOptions, KeyDidRegistrar, KeyDidResolver, KeyDidUpdateOptions, type KeyGenAlgorithm, type KeySignParams, index_d_exports as Kms, LdKeyPair, LdKeyPairOptions, LinkedDataProof, LinkedDataProofOptions, LogLevel, Logger, Mdoc, MdocApi, MdocClaimMatch, MdocDcApiCreateResponseOptions, MdocDcApiCreateVerificationSessionOptions, MdocDcApiCredentialMatch, MdocDcApiDocRequest, MdocDcApiFailedCredential, MdocDcApiRequest, MdocDcApiResolveRequestOptions, MdocDcApiResolvedDocRequest, MdocDcApiResolvedDocRequestFailure, MdocDcApiResolvedDocRequestSuccess, MdocDcApiResolvedRequest, MdocDcApiResponse, MdocDcApiService, MdocDcApiValidCredential, MdocDcApiVerifyResponseOptions, MdocDeleteVerificationSessionOptions, MdocDeviceRequestDefinition, MdocDeviceRequestMatch, MdocDeviceRequestNotSatisfiedError, MdocDeviceResponse, MdocDeviceResponseDcqlQueryOptions, MdocDeviceResponseOptions, MdocDeviceResponsePresentationDefinitionOptions, MdocDeviceResponseVerifyOptions, MdocDocRequestDefinition, MdocDocumentRequest, MdocElementSource, MdocError, MdocEventTypes, MdocIsoDcApiVerificationSessionTranscript, MdocModule, MdocNameSpaces, MdocOpenId4VpDcApiDraft24SessionTranscriptOptions, MdocOpenId4VpDcApiSessionTranscriptOptions, MdocOpenId4VpDraft18SessionTranscriptOptions, MdocOpenId4VpSessionTranscriptOptions, MdocRecord, MdocRecordInstances, MdocRecordStorageProps, MdocRepository, MdocRequestedElement, MdocService, MdocSessionTranscriptByteOptions, MdocSessionTranscriptOptions, MdocSignOptions, MdocStoreOptions, type MdocSupportedSignatureAlgorithm, MdocVerificationSessionExpiredError, MdocVerificationSessionRecord, MdocVerificationSessionRecordProps, MdocVerificationSessionRepository, MdocVerificationSessionState, MdocVerificationSessionStateChangedEvent, MdocVerificationSessionTranscript, MdocVerifyOptions, MessageValidator, Metadata, type MetadataBase, Module, type ModulesMap, MultiBaseEncoder, MultiHashEncoder, NON_DISCLOSEABLE_FIELDS, DidCommV2Service as NewDidCommV2Service, DidCommV2ServiceEndpoint as NewDidCommV2ServiceEndpoint, type DidCommV2ServiceEndpointOptions as NewDidCommV2ServiceEndpointOptions, type NonEmptyArray, type Optional, ParsedDid, PeerDidCreateOptions, PeerDidDeactivateOptions, PeerDidNumAlgo, PeerDidNumAlgo0CreateOptions, PeerDidNumAlgo1CreateOptions, PeerDidNumAlgo2CreateOptions, PeerDidNumAlgo4CreateOptions, PeerDidRegistrar, PeerDidResolver, PeerDidUpdateOptions, type Proof, ProofPurpose, Purposes, type Query, type QueryOptions, RecordDeletedEvent, RecordDuplicateError, RecordNotFoundError, RecordSavedEvent, RecordTags, RecordUpdatedEvent, Repository, RepositoryEventTypes, type ResolvedDidCommService, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SaveGenericRecordOption, SdJwtVc, SdJwtVcApi, SdJwtVcError, SdJwtVcHeader, SdJwtVcHolderBinding, SdJwtVcHolderDidBinding, SdJwtVcHolderJwkBinding, SdJwtVcIssuer, SdJwtVcIssuerDid, SdJwtVcIssuerX5c, SdJwtVcModule, type SdJwtVcPayload, SdJwtVcPresentOptions, SdJwtVcRecord, SdJwtVcRecordInstances, SdJwtVcRecordStorageProps, SdJwtVcRepository, SdJwtVcService, SdJwtVcSignOptions, SdJwtVcStoreOptions, SdJwtVcTypeMetadata, SdJwtVcTypeMetadataClaim, SdJwtVcTypeMetadataDisplay, SdJwtVcTypeMetadataRenderingMethodSimple, SdJwtVcTypeMetadataRenderingMethodSvgTemplate, SdJwtVcVerifyOptions, ServiceTransformer, Sha1, Sha256, Sha384, Sha512, SignatureSuiteRegistry, SignatureSuiteToken, type SimpleQuery, type SingleContextLruCacheItem, SingleContextLruCacheRecord, SingleContextStorageLruCache, type SingleContextStorageLruCacheOptions, type SingleOrArray, SingleValidationResult, StatusListCwt, type StatusListCwtOptions, StatusListInput, type StorageService, StorageUpdateService, StorageVersionRecord, StorageVersionRecordProps, StorageVersionRepository, SubmissionEntryCredential, SuiteInfo, Suites, TagValue, Tags, TagsBase, TokenStatusListApi, TokenStatusListFormat, TokenStatusListModule, TokenStatusListResult, TokenStatusListResultFor, TokenStatusListService, TrustedIssuer, TrustedIssuerContext, TrustedIssuerDid, TrustedIssuerX509, TrustedIssuersForVerificationContext, TrustedIssuersForVerificationResult, TypedArrayEncoder, type UnionToIntersection, type Update, UpdateAssistant, UpdateAssistantUpdateOptions, type UpdateConfig, UpdateTokenStatusListOptions, type UseInstanceFromCredentialRecordOptions, type UseInstanceFromCredentialRecordReturn, type V0_1ToV0_2UpdateConfig, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020, VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020, VERIFICATION_METHOD_TYPE_MULTIKEY, VERIFICATION_METHOD_TYPE_X25519_KEY_AGREEMENT_KEY_2019, VerifiableCredential, VerifiablePresentation, VerificationMethod, VerificationMethodTransformer, VerificationResult, VerificationSigner, VerificationSignerDid, VerificationSignerX509, VerificationTypeCredential, VerificationTypeMdocReaderAuth, type VersionString, W3cCreatePresentationOptions, W3cCredential, W3cCredentialOptions, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialSchemaOptions, W3cCredentialService, W3cCredentialStatus, W3cCredentialStatusOptions, W3cCredentialSubject, W3cCredentialSubjectOptions, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cCredentialsModuleConfigOptions, W3cDataIntegrityApi, type W3cDataIntegrityCreateFailure, type W3cDataIntegrityCreateProofOptions, type W3cDataIntegrityCreateResult, type W3cDataIntegrityCreateSuccess, type W3cDataIntegrityCryptosuite, type W3cDataIntegrityCryptosuiteInfo, type W3cDataIntegrityCryptosuiteProof, type W3cDataIntegrityCryptosuiteProofOptions, type W3cDataIntegrityIssueList, W3cDataIntegrityModule, W3cDataIntegrityProcessingErrorCode, type W3cDataIntegrityProcessingIssue, type W3cDataIntegrityProofSet, type W3cDataIntegrityProofSetSecuredDocument, type W3cDataIntegritySecuredDocument, type W3cDataIntegritySingleProofSecuredDocument, type W3cDataIntegrityUnsecuredDocument, type W3cDataIntegrityVerifyFailure, type W3cDataIntegrityVerifyProofDocumentOptions, type W3cDataIntegrityVerifyProofOptions, type W3cDataIntegrityVerifyResult, type W3cDataIntegrityVerifySuccess, W3cIssuer, W3cIssuerOptions, W3cIssuerTransformer, W3cJsonCredential, W3cJsonLdCredentialService, W3cJsonLdDeriveProofOptions, W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiableCredentialOptions, W3cJsonLdVerifiablePresentation, W3cJsonLdVerifiablePresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions, W3cJsonPresentation, W3cJwtCredentialService, W3cJwtSignCredentialOptions, W3cJwtSignPresentationOptions, W3cJwtVerifiableCredential, W3cJwtVerifiableCredentialOptions, W3cJwtVerifiablePresentation, W3cJwtVerifiablePresentationOptions, W3cJwtVerifyCredentialOptions, W3cJwtVerifyPresentationOptions, W3cPresentation, W3cPresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cV2Credential, W3cV2CredentialOptions, W3cV2CredentialRecord, W3cV2CredentialRecordInstances, W3cV2CredentialRecordOptions, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialSchemaOptions, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialStatusOptions, W3cV2CredentialSubject, W3cV2CredentialSubjectOptions, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2CredentialsModuleConfigOptions, W3cV2DataIntegrityContextValidationResult, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityIssue, W3cV2DataIntegrityPresentationCredentialEntry, W3cV2DataIntegrityResolvedPresentation, W3cV2DataIntegritySecuredCredential, W3cV2DataIntegritySecuredPresentation, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiableCredentialOptions, W3cV2DataIntegrityVerifiablePresentation, W3cV2DataIntegrityVerifiablePresentationOptions, W3cV2DiSignCredentialOptions, W3cV2DiSignPresentationOptions, W3cV2DiVerifyCredentialOptions, W3cV2DiVerifyPresentationOptions, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialOptions, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2EnvelopedVerifiablePresentationOptions, W3cV2Evidence, W3cV2EvidenceOptions, W3cV2Issuer, W3cV2IssuerOptions, W3cV2IssuerTransformer, W3cV2JsonCredential, W3cV2JsonDataIntegrityPresentationEntry, W3cV2JsonEnvelopedVerifiableCredentialEntry, W3cV2JsonEnvelopedVerifiablePresentationEntry, W3cV2JsonLocalizedValue, W3cV2JsonPresentation, W3cV2JsonPresentationCredentialEntry, W3cV2JwtCredentialService, W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiableCredentialOptions, W3cV2JwtVerifiablePresentation, W3cV2JwtVerifiablePresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions, W3cV2LocalizedValue, W3cV2LocalizedValueOptions, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntry, W3cV2PresentationCredentialEntryOptions, W3cV2PresentationCredentialEntryResult, W3cV2PresentationCredentialEntryTransformer, W3cV2PresentationOptions, W3cV2RefreshService, W3cV2RefreshServiceOptions, W3cV2SdJwt, W3cV2SdJwtCredentialService, W3cV2SdJwtHeader, W3cV2SdJwtPayload, W3cV2SdJwtSignCredentialOptions, W3cV2SdJwtSignPresentationOptions, W3cV2SdJwtVcPresentOptions, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiableCredentialOptions, W3cV2SdJwtVerifiablePresentation, W3cV2SdJwtVerifiablePresentationOptions, W3cV2SdJwtVerifyCredentialOptions, W3cV2SdJwtVerifyPresentationOptions, W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2TermsOfUse, W3cV2TermsOfUseOptions, W3cV2VerifiableCredential, W3cV2VerifiableCredentialOptions, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentation, W3cV2VerifiablePresentationOptions, W3cV2VerifiablePresentationTransformer, W3cV2VerifyCredentialOptions, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationOptions, W3cV2VerifyPresentationResult, W3cVerifiableCredential, W3cVerifiableCredentialTransformer, W3cVerifiablePresentation, W3cVerifyCredentialOptions, W3cVerifyCredentialResult, W3cVerifyPresentationOptions, W3cVerifyPresentationResult, WebDidResolver, X509Api, X509Certificate, X509CertificateExtensionsOptions, X509CertificateIssuerAndSubjectOptions, X509CertificateOptions, X509CertificateRevocationList, X509CertificateRevocationListEntry, X509CertificateRevocationListEntryOptions, X509CertificateRevocationListEntryReason, X509CertificateRevocationListExtensionsOptions, X509CertificateSigningRequestExtensionsOptions, X509CertificateSingleValidationResult, X509CertificateValidations, X509CheckCertificateRevocationOptions, X509CreateCertificateChainOptions, X509CreateCertificateOptions, X509CreateCertificateRevocationListOptions, X509CreateCertificateSigningRequestOptions, X509CrlDistributionPoint, X509CrlExtensionIdentifier, X509CrlUnavailableError, X509Error, X509ExtendedKeyUsage, X509ExtensionIdentifier, X509FetchCertificateRevocationListOptions, X509GetLeafCertificateOptions, X509IssuingDistributionPoint, X509KeyUsage, X509Module, X509ModuleConfig, X509ModuleConfigOptions, X509ParseCertificateOptions, X509ParseCertificateRevocationListOptions, X509ParseCertificateSigningRequestOptions, X509RevocationCheckMode, X509RevocationCheckOptions, X509RevocationCheckResult, X509RevocationReason, X509RevocationService, X509Service, X509ValidateCertificateChainOptions, X509ValidationError, X509ValidationResult, X509VerificationContext, X509VerificationTrustedCertificates, X509VerificationTypeCredential, X509VerificationTypeMdocReaderAuth, X509VerificationTypeOauth2ClientAttestation, X509VerificationTypeOauth2SecuredAuthorizationRequest, X509VerificationTypeOpenId4VciCredentialIssuerMetadata, X509VerificationTypeOpenId4VciKeyAttestation, type XOR, ZodValidationError, asArray, canUseInstanceFromCredentialRecord, constants, convertLegacyTrustedCertificates, convertName, convertPublicKeyToX25519, createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createCrlEntryCertificateIssuerExtension, createCrlNumberExtension, createDeltaCrlIndicatorExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createIssuingDistributionPointExtension, createKeyUsagesExtension, createPeerDidDocumentFromServices, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension, dcqlGetPresentationsToCreate, decodeCursor, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, deepEquality, defaultDocumentLoader, deriveProof, didDocumentJsonToNumAlgo1Did, didDocumentToNumAlgo2Did, didDocumentToNumAlgo4Did, didKeyToEd25519PublicJwk, didKeyToVerkey, encodeCursor, equalsIgnoreOrder, equalsWithOrder, extractPresentationsWithDescriptorsFromSubmission, extractX509CertificatesFromJwt, filterContextCorrelationId, findMatchingEd25519Key, getAlternativeDidsForPeerDid, getApiForModuleByName, getDirFromFilePath, getDomainFromUrl, getEcdsaSecp256k1VerificationKey2019, getEd25519VerificationKey2018, getEd25519VerificationKey2020, getJsonWebKey2020, getKmsKeyIdForVerifiacationMethod, getMultikey, getNumAlgoFromPeerDid, getPublicJwkFromEcdsaSecp256k1VerificationKey2019, getPublicJwkFromEd25519VerificationKey2018, getPublicJwkFromEd25519VerificationKey2020, getPublicJwkFromJsonWebKey2020, getPublicJwkFromMultikey, getPublicJwkFromVerificationMethod, getPublicJwkFrommX25519KeyAgreementKey2019, getRegisteredModuleByInstance, getRegisteredModuleByName, getX25519KeyAgreementKey2019, inject, injectAll, injectable, isDid, isDidKey, isEcdsaSecp256k1VerificationKey2019, isEd25519VerificationKey2018, isEd25519VerificationKey2020, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, isJsonObject, isJsonWebKey2020, isMdocSupportedSignatureAlgorithm, isMultikey, isNonEmptyArray, isStorageUpToDate, isValidPeerDid, isX25519KeyAgreementKey2019, joinUriParts, jwaAlgorithmToKeySignParams, keyDidEd25519, keyDidX25519, keyParamsToJwaAlgorithm, legacyTrustedCertificatesToTrustedIssuers, mapDataIntegrityIssuesToCredoError, mapNonEmptyArray, parseDid, presentationFromDataUri, presentationToDataUri, publicJwkToCryptoKeyAlgorithm, purposes, recordToCursor, replaceError, sdJwtVcHasher, serviceTypes, suites, tryParseDid, useInstanceFromCredentialRecord, utils, validateW3cV2SdJwtDisclosureFrame, vcLibraries, verkeyToDidKey, verkeyToPublicJwk, w3cDate, x509SignatureAlgorithmToJwa };
|
|
315
|
+
export { ALL_REVOCATION_REASONS_MASK, ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, Agent, type AgentApi, AgentConfig, AgentContext, AgentContextProvider, type AgentDependencies, AnonCredsDataIntegrityServiceSymbol, type AnonCredsW3cCredentialCreatePresentation, AnonCredsW3cCredentialProof, type AnonCredsW3cCredentialProofOptions, AnonCredsW3cCredentialServiceSymbol, type AnonCredsW3cCredentialVerifyPresentation, AnoncredsDataIntegrityCreatePresentation, AnoncredsDataIntegrityVerifyPresentation, ApiModule, BaseAgent, BaseEvent, BaseLogger, type BaseName, BaseRecord, BaseRecordAny, type BaseRecordConstructor, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, type Cache, CacheModule, CacheModuleConfig, type CacheModuleOptions, type CacheOptions, CachedStorageService, type CanBePromise, CertificateSigningRequest, CertificateSigningRequestOptions, ClaimFormat, type ClaimPath, ClassValidationError, ConsoleLogger, type Constructable, type Constructor, ContentType, CreateTokenStatusListOptions, CredentialIssuancePurpose, CredentialMultiInstanceState, CredentialMultiInstanceUseMode, type CredentialMultiInstanceUseUpdateMode, CredoError, CredoWebCrypto, CredoWebCryptoKey, CustomDidTags, CustomW3cCredentialTags, DID_V1_CONTEXT_URL, DataIntegrityProof, DataIntegrityProofOptions, DateOnly, DateTransformer, DcqlClaimSetDisclosedPaths, DcqlCredential, DcqlCredentialsForRequest, DcqlEncodedPresentations, DcqlEncodedPresentationsEntry, DcqlError, DcqlFailedCredential, DcqlJwtVpPresentationToCreate, DcqlJwtW3cVpPresentationToCreate, DcqlLdpVpPresentationToCreate, DcqlMatchWithRecord, DcqlMdocCredential, DcqlMdocPresentationToCreate, DcqlModule, DcqlPresentation, DcqlPresentationResult, DcqlPresentationsToCreate, DcqlQuery, DcqlQueryResult, DcqlSdJwtVcCredential, DcqlSdJwtVcPresentationToCreate, DcqlSdJwtW3cVpPresentationToCreate, DcqlSelectCredentialsForRequestOptions, DcqlSelectiveDisclosure, DcqlService, DcqlValidCredential, DcqlW3cVcCredential, DefaultAgentContextProvider, type DefaultAgentModules, DefaultMdocRecordTags, DefaultMdocVerificationSessionRecordTags, DefaultSdJwtVcRecordTags, DefaultW3cCredentialTags, DefaultW3cV2CredentialTags, DependencyManager, DeviceAndIssuerClaims, DidCommV1Service, LegacyDidCommV2Service as DidCommV2Service, type LegacyDidCommV2ServiceOptions as DidCommV2ServiceOptions, DidCreateOptions, DidCreateResult, DidDeactivateOptions, DidDeactivateResult, DidDocument, DidDocumentBuilder, DidDocumentKey, DidDocumentMetadata, DidDocumentOperation, DidDocumentRole, DidDocumentService, DidJwk, DidKey, DidOperationStateActionBase, DidOperationStateFailed, DidOperationStateFinished, DidOperationStateWait, DidPurpose, DidRecord, DidRecordMetadataKeys, DidRecordProps, DidRegistrar, DidRegistrarService, DidRegistrationExtraOptions, DidRegistrationMetadata, DidRegistrationSecretOptions, DidRepository, DidResolutionMetadata, DidResolutionOptions, DidResolutionResult, DidResolver, DidResolverService, DidUpdateOptions, DidUpdateResult, DidsApi, DidsModule, DidsModuleConfig, DidsModuleConfigOptions, DifPexCredentialsForRequest, DifPexCredentialsForRequestRequirement, DifPexCredentialsForRequestSubmissionEntry, DifPexInputDescriptorToCredentials, type DifPexPresentationWithDescriptor, DifPresentationExchangeDefinition, DifPresentationExchangeDefinitionV1, DifPresentationExchangeDefinitionV2, DifPresentationExchangeError, DifPresentationExchangeModule, DifPresentationExchangeService, DifPresentationExchangeSubmission, PresentationSubmissionLocation as DifPresentationExchangeSubmissionLocation, type DocumentLoader, type DownloadToFileOptions, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, type EmptyModuleMap, EncodedX509Certificate, EventEmitter, EventMetadata, FetchTokenStatusListOptions, type FileSystem, GenericRecord, GenericRecordStorageProps, GenericRecordTags, GenericRecordsApi, GenericRecordsModule, GetTrustedIssuersForVerification, HashName, Hasher, IAnonCredsDataIntegrityService, type IAnonCredsW3cCredentialService, IDisclosureFrame, IPresentationFrame, ImportDidOptions, InMemoryLruCache, type InMemoryLruCacheOptions, IndyAgentService, type InitConfig, InjectionSymbols, type InjectionToken, IntegrityVerifier, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsStringOrInstance, IsStringOrInstanceOrArrayOfInstances, IsStringOrStringArray, IsStringOrVerificationMethod, IsUri, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, type JsonArray, JsonEncoder, JsonLdModule, JsonLdModuleConfig, JsonLdModuleConfigOptions, type JsonObject, JsonTransformer, type JsonValue, JwkDidCreateOptions, JwkDidDeactivateOptions, JwkDidRegistrar, JwkDidResolver, JwkDidUpdateOptions, type JwsDetachedFormat, type JwsFlattenedDetachedFormat, type JwsGeneralFormat, JwsLinkedDataSignature, JwsLinkedDataSignatureOptions, type JwsProtectedHeaderOptions, JwsService, type JwsSigner, type JwsSignerDid, type JwsSignerJwk, type JwsSignerWithJwk, type JwsSignerX5c, Jwt, JwtPayload, type JwtPayloadJson, type JwtPayloadOptions, KeyDidCreateOptions, KeyDidDeactivateOptions, KeyDidRegistrar, KeyDidResolver, KeyDidUpdateOptions, type KeyGenAlgorithm, type KeySignParams, index_d_exports as Kms, LdKeyPair, LdKeyPairOptions, LinkedDataProof, LinkedDataProofOptions, LogLevel, Logger, Mdoc, MdocApi, MdocClaimMatch, MdocDcApiCreateResponseOptions, MdocDcApiCreateVerificationSessionOptions, MdocDcApiCredentialMatch, MdocDcApiDocRequest, MdocDcApiFailedCredential, MdocDcApiRequest, MdocDcApiResolveRequestOptions, MdocDcApiResolvedDocRequest, MdocDcApiResolvedDocRequestFailure, MdocDcApiResolvedDocRequestSuccess, MdocDcApiResolvedRequest, MdocDcApiResponse, MdocDcApiService, MdocDcApiValidCredential, MdocDcApiVerifyResponseOptions, MdocDeleteVerificationSessionOptions, MdocDeviceRequestDefinition, MdocDeviceRequestMatch, MdocDeviceRequestNotSatisfiedError, MdocDeviceResponse, MdocDeviceResponseDcqlQueryOptions, MdocDeviceResponseOptions, MdocDeviceResponsePresentationDefinitionOptions, MdocDeviceResponseVerifyOptions, MdocDocRequestDefinition, MdocDocumentRequest, MdocElementSource, MdocError, MdocEventTypes, MdocIsoDcApiVerificationSessionTranscript, MdocModule, MdocNameSpaces, MdocOpenId4VpDcApiDraft24SessionTranscriptOptions, MdocOpenId4VpDcApiSessionTranscriptOptions, MdocOpenId4VpDraft18SessionTranscriptOptions, MdocOpenId4VpSessionTranscriptOptions, MdocRecord, MdocRecordInstances, MdocRecordStorageProps, MdocRepository, MdocRequestedElement, MdocService, MdocSessionTranscriptByteOptions, MdocSessionTranscriptOptions, MdocSignOptions, MdocStoreOptions, type MdocSupportedSignatureAlgorithm, MdocVerificationSessionExpiredError, MdocVerificationSessionRecord, MdocVerificationSessionRecordProps, MdocVerificationSessionRepository, MdocVerificationSessionState, MdocVerificationSessionStateChangedEvent, MdocVerificationSessionTranscript, MdocVerifyOptions, MessageValidator, Metadata, type MetadataBase, Module, type ModulesMap, MultiBaseEncoder, MultiHashEncoder, NON_DISCLOSEABLE_FIELDS, DidCommV2Service as NewDidCommV2Service, DidCommV2ServiceEndpoint as NewDidCommV2ServiceEndpoint, type DidCommV2ServiceEndpointOptions as NewDidCommV2ServiceEndpointOptions, type NonEmptyArray, type Optional, ParsedDid, PeerDidCreateOptions, PeerDidDeactivateOptions, PeerDidNumAlgo, PeerDidNumAlgo0CreateOptions, PeerDidNumAlgo1CreateOptions, PeerDidNumAlgo2CreateOptions, PeerDidNumAlgo4CreateOptions, PeerDidRegistrar, PeerDidResolver, PeerDidUpdateOptions, type Proof, ProofPurpose, Purposes, type Query, type QueryOptions, RecordDeletedEvent, RecordDuplicateError, RecordNotFoundError, RecordSavedEvent, RecordTags, RecordUpdatedEvent, Repository, RepositoryEventTypes, type ResolvedDidCommService, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SaveGenericRecordOption, SdJwtVc, SdJwtVcApi, SdJwtVcError, SdJwtVcHeader, SdJwtVcHolderBinding, SdJwtVcHolderDidBinding, SdJwtVcHolderJwkBinding, SdJwtVcIssuer, SdJwtVcIssuerDid, SdJwtVcIssuerX5c, SdJwtVcModule, type SdJwtVcPayload, SdJwtVcPresentOptions, SdJwtVcRecord, SdJwtVcRecordInstances, SdJwtVcRecordStorageProps, SdJwtVcRepository, SdJwtVcService, SdJwtVcSignOptions, SdJwtVcStoreOptions, SdJwtVcTypeMetadata, SdJwtVcTypeMetadataClaim, SdJwtVcTypeMetadataDisplay, SdJwtVcTypeMetadataRenderingMethodSimple, SdJwtVcTypeMetadataRenderingMethodSvgTemplate, SdJwtVcVerifyOptions, ServiceTransformer, Sha1, Sha256, Sha384, Sha512, SignatureSuiteRegistry, SignatureSuiteToken, type SimpleQuery, type SingleContextLruCacheItem, SingleContextLruCacheRecord, SingleContextStorageLruCache, type SingleContextStorageLruCacheOptions, type SingleOrArray, SingleValidationResult, StatusListCwt, type StatusListCwtOptions, StatusListInput, type StorageService, StorageUpdateService, StorageVersionRecord, StorageVersionRecordProps, StorageVersionRepository, SubmissionEntryCredential, SuiteInfo, Suites, TagValue, Tags, TagsBase, TokenStatusListApi, TokenStatusListFormat, TokenStatusListModule, TokenStatusListResult, TokenStatusListResultFor, TokenStatusListService, TrustedIssuer, TrustedIssuerContext, TrustedIssuerDid, TrustedIssuerX509, TrustedIssuersForVerificationContext, TrustedIssuersForVerificationResult, TypedArrayEncoder, type UnionToIntersection, type Update, UpdateAssistant, UpdateAssistantUpdateOptions, type UpdateConfig, UpdateTokenStatusListOptions, type UseInstanceFromCredentialRecordOptions, type UseInstanceFromCredentialRecordReturn, type V0_1ToV0_2UpdateConfig, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020, VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020, VERIFICATION_METHOD_TYPE_MULTIKEY, VERIFICATION_METHOD_TYPE_X25519_KEY_AGREEMENT_KEY_2019, VerifiableCredential, VerifiablePresentation, VerificationMethod, VerificationMethodTransformer, VerificationResult, VerificationSigner, VerificationSignerDid, VerificationSignerX509, VerificationTypeCredential, VerificationTypeMdocReaderAuth, type VersionString, W3cCreatePresentationOptions, W3cCredential, W3cCredentialOptions, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialSchemaOptions, W3cCredentialService, W3cCredentialStatus, W3cCredentialStatusOptions, W3cCredentialSubject, W3cCredentialSubjectOptions, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cCredentialsModuleConfigOptions, W3cDataIntegrityApi, type W3cDataIntegrityCreateFailure, type W3cDataIntegrityCreateProofOptions, type W3cDataIntegrityCreateResult, type W3cDataIntegrityCreateSuccess, type W3cDataIntegrityCryptosuite, type W3cDataIntegrityCryptosuiteInfo, type W3cDataIntegrityCryptosuiteProof, type W3cDataIntegrityCryptosuiteProofOptions, type W3cDataIntegrityIssueList, W3cDataIntegrityModule, W3cDataIntegrityProcessingErrorCode, type W3cDataIntegrityProcessingIssue, type W3cDataIntegrityProofSet, type W3cDataIntegrityProofSetSecuredDocument, type W3cDataIntegritySecuredDocument, type W3cDataIntegritySingleProofSecuredDocument, type W3cDataIntegrityUnsecuredDocument, type W3cDataIntegrityVerifyFailure, type W3cDataIntegrityVerifyProofDocumentOptions, type W3cDataIntegrityVerifyProofOptions, type W3cDataIntegrityVerifyResult, type W3cDataIntegrityVerifySuccess, W3cIssuer, W3cIssuerOptions, W3cIssuerTransformer, W3cJsonCredential, W3cJsonLdCredentialService, W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdCredentialSigningNotSupportedReason, W3cJsonLdDeriveProofOptions, W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiableCredentialOptions, W3cJsonLdVerifiablePresentation, W3cJsonLdVerifiablePresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions, W3cJsonPresentation, W3cJwtCredentialService, W3cJwtSignCredentialOptions, W3cJwtSignPresentationOptions, W3cJwtVerifiableCredential, W3cJwtVerifiableCredentialOptions, W3cJwtVerifiablePresentation, W3cJwtVerifiablePresentationOptions, W3cJwtVerifyCredentialOptions, W3cJwtVerifyPresentationOptions, W3cPresentation, W3cPresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cV2Credential, W3cV2CredentialOptions, W3cV2CredentialRecord, W3cV2CredentialRecordInstances, W3cV2CredentialRecordOptions, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialSchemaOptions, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialStatusOptions, W3cV2CredentialSubject, W3cV2CredentialSubjectOptions, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2CredentialsModuleConfigOptions, W3cV2DataIntegrityContextValidationResult, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityIssue, W3cV2DataIntegrityPresentationCredentialEntry, W3cV2DataIntegrityResolvedPresentation, W3cV2DataIntegritySecuredCredential, W3cV2DataIntegritySecuredPresentation, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiableCredentialOptions, W3cV2DataIntegrityVerifiablePresentation, W3cV2DataIntegrityVerifiablePresentationOptions, W3cV2DiSignCredentialOptions, W3cV2DiSignPresentationOptions, W3cV2DiVerifyCredentialOptions, W3cV2DiVerifyPresentationOptions, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialOptions, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2EnvelopedVerifiablePresentationOptions, W3cV2Evidence, W3cV2EvidenceOptions, W3cV2Issuer, W3cV2IssuerOptions, W3cV2IssuerTransformer, W3cV2JsonCredential, W3cV2JsonDataIntegrityPresentationEntry, W3cV2JsonEnvelopedVerifiableCredentialEntry, W3cV2JsonEnvelopedVerifiablePresentationEntry, W3cV2JsonLocalizedValue, W3cV2JsonPresentation, W3cV2JsonPresentationCredentialEntry, W3cV2JwtCredentialService, W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiableCredentialOptions, W3cV2JwtVerifiablePresentation, W3cV2JwtVerifiablePresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions, W3cV2LocalizedValue, W3cV2LocalizedValueOptions, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntry, W3cV2PresentationCredentialEntryOptions, W3cV2PresentationCredentialEntryResult, W3cV2PresentationCredentialEntryTransformer, W3cV2PresentationOptions, W3cV2RefreshService, W3cV2RefreshServiceOptions, W3cV2SdJwt, W3cV2SdJwtCredentialService, W3cV2SdJwtHeader, W3cV2SdJwtPayload, W3cV2SdJwtSignCredentialOptions, W3cV2SdJwtSignPresentationOptions, W3cV2SdJwtVcPresentOptions, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiableCredentialOptions, W3cV2SdJwtVerifiablePresentation, W3cV2SdJwtVerifiablePresentationOptions, W3cV2SdJwtVerifyCredentialOptions, W3cV2SdJwtVerifyPresentationOptions, W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2TermsOfUse, W3cV2TermsOfUseOptions, W3cV2VerifiableCredential, W3cV2VerifiableCredentialOptions, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentation, W3cV2VerifiablePresentationOptions, W3cV2VerifiablePresentationTransformer, W3cV2VerifyCredentialOptions, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationOptions, W3cV2VerifyPresentationResult, W3cVerifiableCredential, W3cVerifiableCredentialTransformer, W3cVerifiablePresentation, W3cVerifyCredentialOptions, W3cVerifyCredentialResult, W3cVerifyPresentationOptions, W3cVerifyPresentationResult, WebDidResolver, X509Api, X509Certificate, X509CertificateExtensionsOptions, X509CertificateIssuerAndSubjectOptions, X509CertificateOptions, X509CertificateRevocationList, X509CertificateRevocationListEntry, X509CertificateRevocationListEntryOptions, X509CertificateRevocationListEntryReason, X509CertificateRevocationListExtensionsOptions, X509CertificateSigningRequestExtensionsOptions, X509CertificateSingleValidationResult, X509CertificateValidations, X509CheckCertificateRevocationOptions, X509CreateCertificateChainOptions, X509CreateCertificateOptions, X509CreateCertificateRevocationListOptions, X509CreateCertificateSigningRequestOptions, X509CrlDistributionPoint, X509CrlExtensionIdentifier, X509CrlUnavailableError, X509Error, X509ExtendedKeyUsage, X509ExtensionIdentifier, X509FetchCertificateRevocationListOptions, X509GetLeafCertificateOptions, X509IssuingDistributionPoint, X509KeyUsage, X509Module, X509ModuleConfig, X509ModuleConfigOptions, X509ParseCertificateOptions, X509ParseCertificateRevocationListOptions, X509ParseCertificateSigningRequestOptions, X509RevocationCheckMode, X509RevocationCheckOptions, X509RevocationCheckResult, X509RevocationReason, X509RevocationService, X509Service, X509ValidateCertificateChainOptions, X509ValidationError, X509ValidationResult, X509VerificationContext, X509VerificationTrustedCertificates, X509VerificationTypeCredential, X509VerificationTypeMdocReaderAuth, X509VerificationTypeOauth2ClientAttestation, X509VerificationTypeOauth2SecuredAuthorizationRequest, X509VerificationTypeOpenId4VciCredentialIssuerMetadata, X509VerificationTypeOpenId4VciKeyAttestation, type XOR, ZodValidationError, asArray, canUseInstanceFromCredentialRecord, constants, convertLegacyTrustedCertificates, convertName, convertPublicKeyToX25519, createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createCrlEntryCertificateIssuerExtension, createCrlNumberExtension, createDeltaCrlIndicatorExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createIssuingDistributionPointExtension, createKeyUsagesExtension, createPeerDidDocumentFromServices, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension, dcqlGetPresentationsToCreate, decodeCursor, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, deepEquality, defaultDocumentLoader, deriveProof, didDocumentJsonToNumAlgo1Did, didDocumentToNumAlgo2Did, didDocumentToNumAlgo4Did, didKeyToEd25519PublicJwk, didKeyToVerkey, encodeCursor, equalsIgnoreOrder, equalsWithOrder, extractPresentationsWithDescriptorsFromSubmission, extractX509CertificatesFromJwt, filterContextCorrelationId, findMatchingEd25519Key, getAlternativeDidsForPeerDid, getApiForModuleByName, getDirFromFilePath, getDomainFromUrl, getEcdsaSecp256k1VerificationKey2019, getEd25519VerificationKey2018, getEd25519VerificationKey2020, getJsonWebKey2020, getKmsKeyIdForVerifiacationMethod, getMultikey, getNumAlgoFromPeerDid, getPublicJwkFromEcdsaSecp256k1VerificationKey2019, getPublicJwkFromEd25519VerificationKey2018, getPublicJwkFromEd25519VerificationKey2020, getPublicJwkFromJsonWebKey2020, getPublicJwkFromMultikey, getPublicJwkFromVerificationMethod, getPublicJwkFrommX25519KeyAgreementKey2019, getRegisteredModuleByInstance, getRegisteredModuleByName, getX25519KeyAgreementKey2019, inject, injectAll, injectable, isDid, isDidKey, isEcdsaSecp256k1VerificationKey2019, isEd25519VerificationKey2018, isEd25519VerificationKey2020, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, isJsonObject, isJsonWebKey2020, isMdocSupportedSignatureAlgorithm, isMultikey, isNonEmptyArray, isStorageUpToDate, isValidPeerDid, isX25519KeyAgreementKey2019, joinUriParts, jwaAlgorithmToKeySignParams, keyDidEd25519, keyDidX25519, keyParamsToJwaAlgorithm, legacyTrustedCertificatesToTrustedIssuers, mapDataIntegrityIssuesToCredoError, mapNonEmptyArray, parseDid, presentationFromDataUri, presentationToDataUri, publicJwkToCryptoKeyAlgorithm, purposes, recordToCursor, replaceError, sdJwtVcHasher, serviceTypes, suites, tryParseDid, useInstanceFromCredentialRecord, utils, validateW3cV2SdJwtDisclosureFrame, vcLibraries, verkeyToDidKey, verkeyToPublicJwk, w3cDate, x509SignatureAlgorithmToJwa };
|
|
315
316
|
//# sourceMappingURL=index.d.mts.map
|
package/build/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgHM"}
|
package/build/index.mjs
CHANGED
|
@@ -189,6 +189,7 @@ import { SignatureSuiteRegistry, SignatureSuiteToken } from "./modules/vc/linked
|
|
|
189
189
|
import { JwsLinkedDataSignature } from "./modules/vc/linked-data-proofs/signature-suites/JwsLinkedDataSignature.mjs";
|
|
190
190
|
import { Ed25519Signature2018 } from "./modules/vc/linked-data-proofs/signature-suites/Ed25519Signature2018.mjs";
|
|
191
191
|
import { Ed25519Signature2020 } from "./modules/vc/linked-data-proofs/signature-suites/Ed25519Signature2020.mjs";
|
|
192
|
+
import { W3cJsonLdCredentialSigningNotSupportedError } from "./modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
192
193
|
import { W3cJsonLdCredentialService } from "./modules/vc/linked-data-proofs/W3cJsonLdCredentialService.mjs";
|
|
193
194
|
import { W3cCredentialService } from "./modules/vc/W3cCredentialService.mjs";
|
|
194
195
|
import { W3cCredentialsApi } from "./modules/vc/W3cCredentialsApi.mjs";
|
|
@@ -272,6 +273,6 @@ const utils = {
|
|
|
272
273
|
addSecondsToDate
|
|
273
274
|
};
|
|
274
275
|
//#endregion
|
|
275
|
-
export { ALL_REVOCATION_REASONS_MASK, ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, Agent, AgentConfig, AgentContext, AnonCredsDataIntegrityServiceSymbol, AnonCredsW3cCredentialProof, AnonCredsW3cCredentialServiceSymbol, BaseAgent, BaseLogger, BaseRecord, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, CacheModule, CacheModuleConfig, CachedStorageService, CertificateSigningRequest, ClaimFormat, ClassValidationError, ConsoleLogger, CredentialIssuancePurpose, CredentialMultiInstanceState, CredentialMultiInstanceUseMode, CredoError, CredoWebCrypto, CredoWebCryptoKey, DID_V1_CONTEXT_URL, DataIntegrityProof, DateOnly, DateTransformer, DcqlError, DcqlModule, DcqlService, DefaultAgentContextProvider, DependencyManager, DidCommV1Service, LegacyDidCommV2Service as DidCommV2Service, DidDocument, DidDocumentBuilder, DidDocumentRole, DidDocumentService, DidJwk, DidKey, DidRecord, DidRecordMetadataKeys, DidRegistrarService, DidRepository, DidResolverService, DidsApi, DidsModule, DidsModuleConfig, DifPresentationExchangeError, DifPresentationExchangeModule, DifPresentationExchangeService, PresentationSubmissionLocation as DifPresentationExchangeSubmissionLocation, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, EventEmitter, GenericRecord, GenericRecordsApi, GenericRecordsModule, Hasher, InMemoryLruCache, IndyAgentService, InjectionSymbols, IntegrityVerifier, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsStringOrInstance, IsStringOrInstanceOrArrayOfInstances, IsStringOrStringArray, IsStringOrVerificationMethod, IsUri, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, JsonEncoder, JsonLdModule, JsonLdModuleConfig, JsonTransformer, JwkDidRegistrar, JwkDidResolver, JwsLinkedDataSignature, JwsService, Jwt, JwtPayload, KeyDidRegistrar, KeyDidResolver, kms_exports as Kms, LdKeyPair, LinkedDataProof, LogLevel, Mdoc, MdocApi, MdocDcApiService, MdocDeviceRequestNotSatisfiedError, MdocDeviceResponse, MdocError, MdocEventTypes, MdocModule, MdocRecord, MdocRepository, MdocService, MdocVerificationSessionExpiredError, MdocVerificationSessionRecord, MdocVerificationSessionRepository, MdocVerificationSessionState, MessageValidator, Metadata, MultiBaseEncoder, MultiHashEncoder, NON_DISCLOSEABLE_FIELDS, DidCommV2Service as NewDidCommV2Service, DidCommV2ServiceEndpoint as NewDidCommV2ServiceEndpoint, PeerDidNumAlgo, PeerDidRegistrar, PeerDidResolver, RecordDuplicateError, RecordNotFoundError, Repository, RepositoryEventTypes, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SdJwtVcApi, SdJwtVcError, SdJwtVcModule, SdJwtVcRecord, SdJwtVcRepository, SdJwtVcService, ServiceTransformer, Sha1, Sha256, Sha384, Sha512, SignatureSuiteRegistry, SignatureSuiteToken, SingleContextLruCacheRecord, SingleContextStorageLruCache, StatusListCwt, StorageUpdateService, StorageVersionRecord, StorageVersionRepository, TokenStatusListApi, TokenStatusListModule, TokenStatusListService, TrustedIssuerContext, TypedArrayEncoder, UpdateAssistant, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020, VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020, VERIFICATION_METHOD_TYPE_MULTIKEY, VERIFICATION_METHOD_TYPE_X25519_KEY_AGREEMENT_KEY_2019, VerificationMethod, VerificationMethodTransformer, W3cCredential, W3cCredentialRecord, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialService, W3cCredentialStatus, W3cCredentialSubject, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cDataIntegrityApi, W3cDataIntegrityModule, W3cDataIntegrityProcessingErrorCode, W3cIssuer, W3cIssuerTransformer, W3cJsonLdCredentialService, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation, W3cJwtCredentialService, W3cJwtVerifiableCredential, W3cJwtVerifiablePresentation, W3cPresentation, W3cV2Credential, W3cV2CredentialRecord, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialSubject, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiablePresentation, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2Evidence, W3cV2Issuer, W3cV2IssuerTransformer, W3cV2JwtCredentialService, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation, W3cV2LocalizedValue, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntryTransformer, W3cV2RefreshService, W3cV2SdJwtCredentialService, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiablePresentation, W3cV2TermsOfUse, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentationTransformer, W3cVerifiableCredentialTransformer, WebDidResolver, X509Api, X509Certificate, X509CertificateRevocationList, X509CertificateRevocationListEntryReason, X509CrlExtensionIdentifier, X509CrlUnavailableError, X509Error, X509ExtendedKeyUsage, X509ExtensionIdentifier, X509KeyUsage, X509Module, X509ModuleConfig, X509RevocationCheckMode, X509RevocationReason, X509RevocationService, X509Service, X509ValidationError, ZodValidationError, asArray, canUseInstanceFromCredentialRecord, constants, convertLegacyTrustedCertificates, convertName, convertPublicKeyToX25519, createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createCrlEntryCertificateIssuerExtension, createCrlNumberExtension, createDeltaCrlIndicatorExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createIssuingDistributionPointExtension, createKeyUsagesExtension, createPeerDidDocumentFromServices, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension, dcqlGetPresentationsToCreate, decodeCursor, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, deepEquality, defaultDocumentLoader, deriveProof, didDocumentJsonToNumAlgo1Did, didDocumentToNumAlgo2Did, didDocumentToNumAlgo4Did, didKeyToEd25519PublicJwk, didKeyToVerkey, encodeCursor, equalsIgnoreOrder, equalsWithOrder, extractPresentationsWithDescriptorsFromSubmission, extractX509CertificatesFromJwt, filterContextCorrelationId, findMatchingEd25519Key, getAlternativeDidsForPeerDid, getApiForModuleByName, getDirFromFilePath, getDomainFromUrl, getEcdsaSecp256k1VerificationKey2019, getEd25519VerificationKey2018, getEd25519VerificationKey2020, getJsonWebKey2020, getKmsKeyIdForVerifiacationMethod, getMultikey, getNumAlgoFromPeerDid, getPublicJwkFromEcdsaSecp256k1VerificationKey2019, getPublicJwkFromEd25519VerificationKey2018, getPublicJwkFromEd25519VerificationKey2020, getPublicJwkFromJsonWebKey2020, getPublicJwkFromMultikey, getPublicJwkFromVerificationMethod, getPublicJwkFrommX25519KeyAgreementKey2019, getRegisteredModuleByInstance, getRegisteredModuleByName, getX25519KeyAgreementKey2019, inject, injectAll, injectable, isDid, isDidKey, isEcdsaSecp256k1VerificationKey2019, isEd25519VerificationKey2018, isEd25519VerificationKey2020, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, isJsonObject, isJsonWebKey2020, isMdocSupportedSignatureAlgorithm, isMultikey, isNonEmptyArray, isStorageUpToDate, isValidPeerDid, isX25519KeyAgreementKey2019, joinUriParts, jwaAlgorithmToKeySignParams, keyDidEd25519, keyDidX25519, keyParamsToJwaAlgorithm, legacyTrustedCertificatesToTrustedIssuers, mapDataIntegrityIssuesToCredoError, mapNonEmptyArray, parseDid, presentationFromDataUri, presentationToDataUri, publicJwkToCryptoKeyAlgorithm, purposes, recordToCursor, replaceError, sdJwtVcHasher, serviceTypes, suites, tryParseDid, useInstanceFromCredentialRecord, utils, validateW3cV2SdJwtDisclosureFrame, vcLibraries, verkeyToDidKey, verkeyToPublicJwk, w3cDate, x509SignatureAlgorithmToJwa };
|
|
276
|
+
export { ALL_REVOCATION_REASONS_MASK, ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, Agent, AgentConfig, AgentContext, AnonCredsDataIntegrityServiceSymbol, AnonCredsW3cCredentialProof, AnonCredsW3cCredentialServiceSymbol, BaseAgent, BaseLogger, BaseRecord, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, CacheModule, CacheModuleConfig, CachedStorageService, CertificateSigningRequest, ClaimFormat, ClassValidationError, ConsoleLogger, CredentialIssuancePurpose, CredentialMultiInstanceState, CredentialMultiInstanceUseMode, CredoError, CredoWebCrypto, CredoWebCryptoKey, DID_V1_CONTEXT_URL, DataIntegrityProof, DateOnly, DateTransformer, DcqlError, DcqlModule, DcqlService, DefaultAgentContextProvider, DependencyManager, DidCommV1Service, LegacyDidCommV2Service as DidCommV2Service, DidDocument, DidDocumentBuilder, DidDocumentRole, DidDocumentService, DidJwk, DidKey, DidRecord, DidRecordMetadataKeys, DidRegistrarService, DidRepository, DidResolverService, DidsApi, DidsModule, DidsModuleConfig, DifPresentationExchangeError, DifPresentationExchangeModule, DifPresentationExchangeService, PresentationSubmissionLocation as DifPresentationExchangeSubmissionLocation, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, EventEmitter, GenericRecord, GenericRecordsApi, GenericRecordsModule, Hasher, InMemoryLruCache, IndyAgentService, InjectionSymbols, IntegrityVerifier, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsStringOrInstance, IsStringOrInstanceOrArrayOfInstances, IsStringOrStringArray, IsStringOrVerificationMethod, IsUri, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, JsonEncoder, JsonLdModule, JsonLdModuleConfig, JsonTransformer, JwkDidRegistrar, JwkDidResolver, JwsLinkedDataSignature, JwsService, Jwt, JwtPayload, KeyDidRegistrar, KeyDidResolver, kms_exports as Kms, LdKeyPair, LinkedDataProof, LogLevel, Mdoc, MdocApi, MdocDcApiService, MdocDeviceRequestNotSatisfiedError, MdocDeviceResponse, MdocError, MdocEventTypes, MdocModule, MdocRecord, MdocRepository, MdocService, MdocVerificationSessionExpiredError, MdocVerificationSessionRecord, MdocVerificationSessionRepository, MdocVerificationSessionState, MessageValidator, Metadata, MultiBaseEncoder, MultiHashEncoder, NON_DISCLOSEABLE_FIELDS, DidCommV2Service as NewDidCommV2Service, DidCommV2ServiceEndpoint as NewDidCommV2ServiceEndpoint, PeerDidNumAlgo, PeerDidRegistrar, PeerDidResolver, RecordDuplicateError, RecordNotFoundError, Repository, RepositoryEventTypes, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SdJwtVcApi, SdJwtVcError, SdJwtVcModule, SdJwtVcRecord, SdJwtVcRepository, SdJwtVcService, ServiceTransformer, Sha1, Sha256, Sha384, Sha512, SignatureSuiteRegistry, SignatureSuiteToken, SingleContextLruCacheRecord, SingleContextStorageLruCache, StatusListCwt, StorageUpdateService, StorageVersionRecord, StorageVersionRepository, TokenStatusListApi, TokenStatusListModule, TokenStatusListService, TrustedIssuerContext, TypedArrayEncoder, UpdateAssistant, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, VERIFICATION_METHOD_TYPE_ECDSA_SECP256K1_VERIFICATION_KEY_2019, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2018, VERIFICATION_METHOD_TYPE_ED25519_VERIFICATION_KEY_2020, VERIFICATION_METHOD_TYPE_JSON_WEB_KEY_2020, VERIFICATION_METHOD_TYPE_MULTIKEY, VERIFICATION_METHOD_TYPE_X25519_KEY_AGREEMENT_KEY_2019, VerificationMethod, VerificationMethodTransformer, W3cCredential, W3cCredentialRecord, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialService, W3cCredentialStatus, W3cCredentialSubject, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cDataIntegrityApi, W3cDataIntegrityModule, W3cDataIntegrityProcessingErrorCode, W3cIssuer, W3cIssuerTransformer, W3cJsonLdCredentialService, W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation, W3cJwtCredentialService, W3cJwtVerifiableCredential, W3cJwtVerifiablePresentation, W3cPresentation, W3cV2Credential, W3cV2CredentialRecord, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialSubject, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiablePresentation, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2Evidence, W3cV2Issuer, W3cV2IssuerTransformer, W3cV2JwtCredentialService, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation, W3cV2LocalizedValue, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntryTransformer, W3cV2RefreshService, W3cV2SdJwtCredentialService, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiablePresentation, W3cV2TermsOfUse, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentationTransformer, W3cVerifiableCredentialTransformer, WebDidResolver, X509Api, X509Certificate, X509CertificateRevocationList, X509CertificateRevocationListEntryReason, X509CrlExtensionIdentifier, X509CrlUnavailableError, X509Error, X509ExtendedKeyUsage, X509ExtensionIdentifier, X509KeyUsage, X509Module, X509ModuleConfig, X509RevocationCheckMode, X509RevocationReason, X509RevocationService, X509Service, X509ValidationError, ZodValidationError, asArray, canUseInstanceFromCredentialRecord, constants, convertLegacyTrustedCertificates, convertName, convertPublicKeyToX25519, createAuthorityKeyIdentifierExtension, createBasicConstraintsExtension, createCrlDistributionPointsExtension, createCrlEntryCertificateIssuerExtension, createCrlNumberExtension, createDeltaCrlIndicatorExtension, createExtendedKeyUsagesExtension, createIssuerAlternativeNameExtension, createIssuingDistributionPointExtension, createKeyUsagesExtension, createPeerDidDocumentFromServices, createSubjectAlternativeNameExtension, createSubjectKeyIdentifierExtension, dcqlGetPresentationsToCreate, decodeCursor, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, deepEquality, defaultDocumentLoader, deriveProof, didDocumentJsonToNumAlgo1Did, didDocumentToNumAlgo2Did, didDocumentToNumAlgo4Did, didKeyToEd25519PublicJwk, didKeyToVerkey, encodeCursor, equalsIgnoreOrder, equalsWithOrder, extractPresentationsWithDescriptorsFromSubmission, extractX509CertificatesFromJwt, filterContextCorrelationId, findMatchingEd25519Key, getAlternativeDidsForPeerDid, getApiForModuleByName, getDirFromFilePath, getDomainFromUrl, getEcdsaSecp256k1VerificationKey2019, getEd25519VerificationKey2018, getEd25519VerificationKey2020, getJsonWebKey2020, getKmsKeyIdForVerifiacationMethod, getMultikey, getNumAlgoFromPeerDid, getPublicJwkFromEcdsaSecp256k1VerificationKey2019, getPublicJwkFromEd25519VerificationKey2018, getPublicJwkFromEd25519VerificationKey2020, getPublicJwkFromJsonWebKey2020, getPublicJwkFromMultikey, getPublicJwkFromVerificationMethod, getPublicJwkFrommX25519KeyAgreementKey2019, getRegisteredModuleByInstance, getRegisteredModuleByName, getX25519KeyAgreementKey2019, inject, injectAll, injectable, isDid, isDidKey, isEcdsaSecp256k1VerificationKey2019, isEd25519VerificationKey2018, isEd25519VerificationKey2020, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, isJsonObject, isJsonWebKey2020, isMdocSupportedSignatureAlgorithm, isMultikey, isNonEmptyArray, isStorageUpToDate, isValidPeerDid, isX25519KeyAgreementKey2019, joinUriParts, jwaAlgorithmToKeySignParams, keyDidEd25519, keyDidX25519, keyParamsToJwaAlgorithm, legacyTrustedCertificatesToTrustedIssuers, mapDataIntegrityIssuesToCredoError, mapNonEmptyArray, parseDid, presentationFromDataUri, presentationToDataUri, publicJwkToCryptoKeyAlgorithm, purposes, recordToCursor, replaceError, sdJwtVcHasher, serviceTypes, suites, tryParseDid, useInstanceFromCredentialRecord, utils, validateW3cV2SdJwtDisclosureFrame, vcLibraries, verkeyToDidKey, verkeyToPublicJwk, w3cDate, x509SignatureAlgorithmToJwa };
|
|
276
277
|
|
|
277
278
|
//# sourceMappingURL=index.mjs.map
|
package/build/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["// reflect-metadata used for class-transformer + class-validator\nimport 'reflect-metadata'\n\nexport * from './agent'\nexport { Agent } from './agent/Agent'\nexport { AgentConfig } from './agent/AgentConfig'\nexport type { AgentDependencies } from './agent/AgentDependencies'\nexport type { AgentApi, DefaultAgentModules, EmptyModuleMap, ModulesMap } from './agent/AgentModules'\nexport { BaseAgent } from './agent/BaseAgent'\nexport { EventEmitter } from './agent/EventEmitter'\nexport * from './agent/Events'\nexport { TrustedIssuerContext } from './agent/TrustedIssuerContext'\nexport * from './agent/TrustedIssuersForVerification'\nexport { InjectionSymbols } from './constants'\nexport * from './crypto'\nexport * from './error'\nexport * from './logger'\nexport * from './modules/cache'\nexport * from './modules/dcql'\nexport * from './modules/dids'\nexport { tryParseDid } from './modules/dids/domain/parse'\n// TODO: Clean up these exports used by DIDComm module\nexport {\n didKeyToEd25519PublicJwk,\n didKeyToVerkey,\n isDidKey,\n verkeyToDidKey,\n verkeyToPublicJwk,\n} from './modules/dids/helpers'\nexport { didDocumentJsonToNumAlgo1Did } from './modules/dids/methods/peer/peerDidNumAlgo1'\nexport { didDocumentToNumAlgo2Did } from './modules/dids/methods/peer/peerDidNumAlgo2'\nexport { didDocumentToNumAlgo4Did } from './modules/dids/methods/peer/peerDidNumAlgo4'\nexport { DidRecordMetadataKeys } from './modules/dids/repository/didRecordMetadataTypes'\nexport * from './modules/dif-presentation-exchange'\nexport * from './modules/generic-records'\n/**\n * @deprecated import from `@credo-ts/core/kms` instead\n */\nexport * as Kms from './modules/kms'\nexport * from './modules/mdoc'\nexport * from './modules/sd-jwt-vc'\nexport * from './modules/token-status-list'\nexport * from './modules/vc'\nexport * from './modules/w3c-di'\nexport * from './modules/x509'\nexport * from './plugins'\nexport * from './storage/BaseRecord'\nexport type { DownloadToFileOptions, FileSystem } from './storage/FileSystem'\nexport { Metadata, type MetadataBase } from './storage/Metadata'\nexport * from './storage/migration'\nexport type { UpdateConfig, V0_1ToV0_2UpdateConfig } from './storage/migration/updates'\nexport { Repository } from './storage/Repository'\nexport * from './storage/RepositoryEvents'\nexport type {\n BaseRecordConstructor,\n Query,\n QueryOptions,\n SimpleQuery,\n StorageService,\n} from './storage/StorageService'\nexport { decodeCursor, encodeCursor, recordToCursor } from './storage/StorageService'\nexport type {\n CanBePromise,\n InitConfig,\n JsonArray,\n JsonObject,\n JsonValue,\n NonEmptyArray,\n Optional,\n ResolvedDidCommService,\n SingleOrArray,\n XOR,\n} from './types'\nexport { isJsonObject, isNonEmptyArray, mapNonEmptyArray } from './types'\nexport {\n asArray,\n type BaseName,\n DateTransformer,\n deepEquality,\n equalsIgnoreOrder,\n equalsWithOrder,\n IntegrityVerifier,\n IsStringOrInstance,\n IsStringOrInstanceOrArrayOfInstances,\n IsStringOrStringArray,\n IsUri,\n isDid,\n JsonEncoder,\n JsonTransformer,\n MessageValidator,\n MultiBaseEncoder,\n MultiHashEncoder,\n TypedArrayEncoder,\n} from './utils'\nexport type {\n CredentialMultiInstanceUseUpdateMode,\n UseInstanceFromCredentialRecordOptions,\n UseInstanceFromCredentialRecordReturn,\n} from './utils/credentialUse'\nexport { canUseInstanceFromCredentialRecord, useInstanceFromCredentialRecord } from './utils/credentialUse'\nexport { CredentialMultiInstanceState, CredentialMultiInstanceUseMode } from './utils/credentialUseTypes'\nexport { getDomainFromUrl } from './utils/domain'\nexport type { Constructable, Constructor, UnionToIntersection } from './utils/mixins'\nexport { getDirFromFilePath, joinUriParts } from './utils/path'\nexport type { VersionString } from './utils/version'\n\nimport { indyDidFromPublicKeyBase58 } from './utils/did'\nimport { areObjectsEqual } from './utils/objectEquality'\nimport timestamp, { addSecondsToDate, dateToSeconds, nowInSeconds } from './utils/timestamp'\nimport { getProtocolScheme } from './utils/uri'\nimport { isValidUuid, uuid } from './utils/uuid'\n\nconst utils = {\n areObjectsEqual,\n uuid,\n isValidUuid,\n getProtocolScheme,\n timestamp,\n indyDidFromPublicKeyBase58,\n nowInSeconds,\n dateToSeconds,\n addSecondsToDate,\n}\n\nexport { utils }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["// reflect-metadata used for class-transformer + class-validator\nimport 'reflect-metadata'\n\nexport * from './agent'\nexport { Agent } from './agent/Agent'\nexport { AgentConfig } from './agent/AgentConfig'\nexport type { AgentDependencies } from './agent/AgentDependencies'\nexport type { AgentApi, DefaultAgentModules, EmptyModuleMap, ModulesMap } from './agent/AgentModules'\nexport { BaseAgent } from './agent/BaseAgent'\nexport { EventEmitter } from './agent/EventEmitter'\nexport * from './agent/Events'\nexport { TrustedIssuerContext } from './agent/TrustedIssuerContext'\nexport * from './agent/TrustedIssuersForVerification'\nexport { InjectionSymbols } from './constants'\nexport * from './crypto'\nexport * from './error'\nexport * from './logger'\nexport * from './modules/cache'\nexport * from './modules/dcql'\nexport * from './modules/dids'\nexport { tryParseDid } from './modules/dids/domain/parse'\n// TODO: Clean up these exports used by DIDComm module\nexport {\n didKeyToEd25519PublicJwk,\n didKeyToVerkey,\n isDidKey,\n verkeyToDidKey,\n verkeyToPublicJwk,\n} from './modules/dids/helpers'\nexport { didDocumentJsonToNumAlgo1Did } from './modules/dids/methods/peer/peerDidNumAlgo1'\nexport { didDocumentToNumAlgo2Did } from './modules/dids/methods/peer/peerDidNumAlgo2'\nexport { didDocumentToNumAlgo4Did } from './modules/dids/methods/peer/peerDidNumAlgo4'\nexport { DidRecordMetadataKeys } from './modules/dids/repository/didRecordMetadataTypes'\nexport * from './modules/dif-presentation-exchange'\nexport * from './modules/generic-records'\n/**\n * @deprecated import from `@credo-ts/core/kms` instead\n */\nexport * as Kms from './modules/kms'\nexport * from './modules/mdoc'\nexport * from './modules/sd-jwt-vc'\nexport * from './modules/token-status-list'\nexport * from './modules/vc'\nexport * from './modules/w3c-di'\nexport * from './modules/x509'\nexport * from './plugins'\nexport * from './storage/BaseRecord'\nexport type { DownloadToFileOptions, FileSystem } from './storage/FileSystem'\nexport { Metadata, type MetadataBase } from './storage/Metadata'\nexport * from './storage/migration'\nexport type { UpdateConfig, V0_1ToV0_2UpdateConfig } from './storage/migration/updates'\nexport { Repository } from './storage/Repository'\nexport * from './storage/RepositoryEvents'\nexport type {\n BaseRecordConstructor,\n Query,\n QueryOptions,\n SimpleQuery,\n StorageService,\n} from './storage/StorageService'\nexport { decodeCursor, encodeCursor, recordToCursor } from './storage/StorageService'\nexport type {\n CanBePromise,\n InitConfig,\n JsonArray,\n JsonObject,\n JsonValue,\n NonEmptyArray,\n Optional,\n ResolvedDidCommService,\n SingleOrArray,\n XOR,\n} from './types'\nexport { isJsonObject, isNonEmptyArray, mapNonEmptyArray } from './types'\nexport {\n asArray,\n type BaseName,\n DateTransformer,\n deepEquality,\n equalsIgnoreOrder,\n equalsWithOrder,\n IntegrityVerifier,\n IsStringOrInstance,\n IsStringOrInstanceOrArrayOfInstances,\n IsStringOrStringArray,\n IsUri,\n isDid,\n JsonEncoder,\n JsonTransformer,\n MessageValidator,\n MultiBaseEncoder,\n MultiHashEncoder,\n TypedArrayEncoder,\n} from './utils'\nexport type {\n CredentialMultiInstanceUseUpdateMode,\n UseInstanceFromCredentialRecordOptions,\n UseInstanceFromCredentialRecordReturn,\n} from './utils/credentialUse'\nexport { canUseInstanceFromCredentialRecord, useInstanceFromCredentialRecord } from './utils/credentialUse'\nexport { CredentialMultiInstanceState, CredentialMultiInstanceUseMode } from './utils/credentialUseTypes'\nexport { getDomainFromUrl } from './utils/domain'\nexport type { Constructable, Constructor, UnionToIntersection } from './utils/mixins'\nexport { getDirFromFilePath, joinUriParts } from './utils/path'\nexport type { VersionString } from './utils/version'\n\nimport { indyDidFromPublicKeyBase58 } from './utils/did'\nimport { areObjectsEqual } from './utils/objectEquality'\nimport timestamp, { addSecondsToDate, dateToSeconds, nowInSeconds } from './utils/timestamp'\nimport { getProtocolScheme } from './utils/uri'\nimport { isValidUuid, uuid } from './utils/uuid'\n\nconst utils = {\n areObjectsEqual,\n uuid,\n isValidUuid,\n getProtocolScheme,\n timestamp,\n indyDidFromPublicKeyBase58,\n nowInSeconds,\n dateToSeconds,\n addSecondsToDate,\n}\n\nexport { utils }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgHA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -57,6 +57,7 @@ import { Ed25519Signature2020 } from "./linked-data-proofs/signature-suites/Ed25
|
|
|
57
57
|
import { JsonLdModule } from "./jsonld/JsonLdModule.mjs";
|
|
58
58
|
import { vcLibraries } from "./jsonld/index.mjs";
|
|
59
59
|
import { W3cJsonLdCredentialService } from "./linked-data-proofs/W3cJsonLdCredentialService.mjs";
|
|
60
|
+
import { W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdCredentialSigningNotSupportedReason } from "./linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
60
61
|
import "./linked-data-proofs/index.mjs";
|
|
61
62
|
import { CustomW3cCredentialTags, DefaultW3cCredentialTags, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions } from "./repository/W3cCredentialRecord.mjs";
|
|
62
63
|
import { W3cCredentialRepository } from "./repository/W3cCredentialRepository.mjs";
|
|
@@ -87,4 +88,4 @@ import { W3cCredentialsModule } from "./W3cCredentialsModule.mjs";
|
|
|
87
88
|
import { W3cV2CredentialService } from "./W3cV2CredentialService.mjs";
|
|
88
89
|
import { W3cV2CredentialsApi } from "./W3cV2CredentialsApi.mjs";
|
|
89
90
|
import { W3cV2CredentialsModule } from "./W3cV2CredentialsModule.mjs";
|
|
90
|
-
export { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol, type AnonCredsW3cCredentialCreatePresentation, AnonCredsW3cCredentialProof, type AnonCredsW3cCredentialProofOptions, AnonCredsW3cCredentialServiceSymbol, type AnonCredsW3cCredentialVerifyPresentation, AnoncredsDataIntegrityCreatePresentation, AnoncredsDataIntegrityVerifyPresentation, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, ClaimFormat, CredentialIssuancePurpose, CustomW3cCredentialTags, DID_V1_CONTEXT_URL, DataIntegrityProof, DataIntegrityProofOptions, DefaultW3cCredentialTags, DefaultW3cV2CredentialTags, type DocumentLoader, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, IAnonCredsDataIntegrityService, type IAnonCredsW3cCredentialService, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, JsonLdModule, JsonLdModuleConfig, JsonLdModuleConfigOptions, JwsLinkedDataSignature, JwsLinkedDataSignatureOptions, LdKeyPair, LdKeyPairOptions, LinkedDataProof, LinkedDataProofOptions, NON_DISCLOSEABLE_FIELDS, type Proof, ProofPurpose, Purposes, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SignatureSuiteRegistry, SignatureSuiteToken, SingleValidationResult, SuiteInfo, Suites, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, W3cCreatePresentationOptions, W3cCredential, W3cCredentialOptions, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialSchemaOptions, W3cCredentialService, W3cCredentialStatus, W3cCredentialStatusOptions, W3cCredentialSubject, W3cCredentialSubjectOptions, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cCredentialsModuleConfigOptions, W3cIssuer, W3cIssuerOptions, W3cIssuerTransformer, W3cJsonCredential, W3cJsonLdCredentialService, W3cJsonLdDeriveProofOptions, W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiableCredentialOptions, W3cJsonLdVerifiablePresentation, W3cJsonLdVerifiablePresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions, W3cJsonPresentation, W3cJwtCredentialService, W3cJwtSignCredentialOptions, W3cJwtSignPresentationOptions, W3cJwtVerifiableCredential, W3cJwtVerifiableCredentialOptions, W3cJwtVerifiablePresentation, W3cJwtVerifiablePresentationOptions, W3cJwtVerifyCredentialOptions, W3cJwtVerifyPresentationOptions, W3cPresentation, W3cPresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cV2Credential, W3cV2CredentialOptions, W3cV2CredentialRecord, W3cV2CredentialRecordInstances, W3cV2CredentialRecordOptions, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialSchemaOptions, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialStatusOptions, W3cV2CredentialSubject, W3cV2CredentialSubjectOptions, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2CredentialsModuleConfigOptions, W3cV2DataIntegrityContextValidationResult, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityIssue, W3cV2DataIntegrityPresentationCredentialEntry, W3cV2DataIntegrityResolvedPresentation, W3cV2DataIntegritySecuredCredential, W3cV2DataIntegritySecuredPresentation, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiableCredentialOptions, W3cV2DataIntegrityVerifiablePresentation, W3cV2DataIntegrityVerifiablePresentationOptions, W3cV2DiSignCredentialOptions, W3cV2DiSignPresentationOptions, W3cV2DiVerifyCredentialOptions, W3cV2DiVerifyPresentationOptions, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialOptions, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2EnvelopedVerifiablePresentationOptions, W3cV2Evidence, W3cV2EvidenceOptions, W3cV2Issuer, W3cV2IssuerOptions, W3cV2IssuerTransformer, W3cV2JsonCredential, W3cV2JsonDataIntegrityPresentationEntry, W3cV2JsonEnvelopedVerifiableCredentialEntry, W3cV2JsonEnvelopedVerifiablePresentationEntry, W3cV2JsonLocalizedValue, W3cV2JsonPresentation, W3cV2JsonPresentationCredentialEntry, W3cV2JwtCredentialService, W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiableCredentialOptions, W3cV2JwtVerifiablePresentation, W3cV2JwtVerifiablePresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions, W3cV2LocalizedValue, W3cV2LocalizedValueOptions, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntry, W3cV2PresentationCredentialEntryOptions, W3cV2PresentationCredentialEntryResult, W3cV2PresentationCredentialEntryTransformer, W3cV2PresentationOptions, W3cV2RefreshService, W3cV2RefreshServiceOptions, W3cV2SdJwt, W3cV2SdJwtCredentialService, W3cV2SdJwtHeader, W3cV2SdJwtPayload, W3cV2SdJwtSignCredentialOptions, W3cV2SdJwtSignPresentationOptions, W3cV2SdJwtVcPresentOptions, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiableCredentialOptions, W3cV2SdJwtVerifiablePresentation, W3cV2SdJwtVerifiablePresentationOptions, W3cV2SdJwtVerifyCredentialOptions, W3cV2SdJwtVerifyPresentationOptions, W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2TermsOfUse, W3cV2TermsOfUseOptions, W3cV2VerifiableCredential, W3cV2VerifiableCredentialOptions, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentation, W3cV2VerifiablePresentationOptions, W3cV2VerifiablePresentationTransformer, W3cV2VerifyCredentialOptions, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationOptions, W3cV2VerifyPresentationResult, W3cVerifiableCredential, W3cVerifiableCredentialTransformer, W3cVerifiablePresentation, W3cVerifyCredentialOptions, W3cVerifyCredentialResult, W3cVerifyPresentationOptions, W3cVerifyPresentationResult, constants, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, defaultDocumentLoader, deriveProof, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, mapDataIntegrityIssuesToCredoError, presentationFromDataUri, presentationToDataUri, purposes, sdJwtVcHasher, suites, validateW3cV2SdJwtDisclosureFrame, vcLibraries, w3cDate };
|
|
91
|
+
export { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol, type AnonCredsW3cCredentialCreatePresentation, AnonCredsW3cCredentialProof, type AnonCredsW3cCredentialProofOptions, AnonCredsW3cCredentialServiceSymbol, type AnonCredsW3cCredentialVerifyPresentation, AnoncredsDataIntegrityCreatePresentation, AnoncredsDataIntegrityVerifyPresentation, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, ClaimFormat, CredentialIssuancePurpose, CustomW3cCredentialTags, DID_V1_CONTEXT_URL, DataIntegrityProof, DataIntegrityProofOptions, DefaultW3cCredentialTags, DefaultW3cV2CredentialTags, type DocumentLoader, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, IAnonCredsDataIntegrityService, type IAnonCredsW3cCredentialService, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, JsonLdModule, JsonLdModuleConfig, JsonLdModuleConfigOptions, JwsLinkedDataSignature, JwsLinkedDataSignatureOptions, LdKeyPair, LdKeyPairOptions, LinkedDataProof, LinkedDataProofOptions, NON_DISCLOSEABLE_FIELDS, type Proof, ProofPurpose, Purposes, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SignatureSuiteRegistry, SignatureSuiteToken, SingleValidationResult, SuiteInfo, Suites, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, W3cCreatePresentationOptions, W3cCredential, W3cCredentialOptions, W3cCredentialRecord, W3cCredentialRecordInstances, W3cCredentialRecordOptions, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialSchemaOptions, W3cCredentialService, W3cCredentialStatus, W3cCredentialStatusOptions, W3cCredentialSubject, W3cCredentialSubjectOptions, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cCredentialsModuleConfigOptions, W3cIssuer, W3cIssuerOptions, W3cIssuerTransformer, W3cJsonCredential, W3cJsonLdCredentialService, W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdCredentialSigningNotSupportedReason, W3cJsonLdDeriveProofOptions, W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiableCredentialOptions, W3cJsonLdVerifiablePresentation, W3cJsonLdVerifiablePresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions, W3cJsonPresentation, W3cJwtCredentialService, W3cJwtSignCredentialOptions, W3cJwtSignPresentationOptions, W3cJwtVerifiableCredential, W3cJwtVerifiableCredentialOptions, W3cJwtVerifiablePresentation, W3cJwtVerifiablePresentationOptions, W3cJwtVerifyCredentialOptions, W3cJwtVerifyPresentationOptions, W3cPresentation, W3cPresentationOptions, W3cSignCredentialOptions, W3cSignPresentationOptions, W3cStoreCredentialOptions, W3cV2Credential, W3cV2CredentialOptions, W3cV2CredentialRecord, W3cV2CredentialRecordInstances, W3cV2CredentialRecordOptions, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialSchemaOptions, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialStatusOptions, W3cV2CredentialSubject, W3cV2CredentialSubjectOptions, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2CredentialsModuleConfigOptions, W3cV2DataIntegrityContextValidationResult, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityIssue, W3cV2DataIntegrityPresentationCredentialEntry, W3cV2DataIntegrityResolvedPresentation, W3cV2DataIntegritySecuredCredential, W3cV2DataIntegritySecuredPresentation, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiableCredentialOptions, W3cV2DataIntegrityVerifiablePresentation, W3cV2DataIntegrityVerifiablePresentationOptions, W3cV2DiSignCredentialOptions, W3cV2DiSignPresentationOptions, W3cV2DiVerifyCredentialOptions, W3cV2DiVerifyPresentationOptions, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialOptions, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2EnvelopedVerifiablePresentationOptions, W3cV2Evidence, W3cV2EvidenceOptions, W3cV2Issuer, W3cV2IssuerOptions, W3cV2IssuerTransformer, W3cV2JsonCredential, W3cV2JsonDataIntegrityPresentationEntry, W3cV2JsonEnvelopedVerifiableCredentialEntry, W3cV2JsonEnvelopedVerifiablePresentationEntry, W3cV2JsonLocalizedValue, W3cV2JsonPresentation, W3cV2JsonPresentationCredentialEntry, W3cV2JwtCredentialService, W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiableCredentialOptions, W3cV2JwtVerifiablePresentation, W3cV2JwtVerifiablePresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions, W3cV2LocalizedValue, W3cV2LocalizedValueOptions, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntry, W3cV2PresentationCredentialEntryOptions, W3cV2PresentationCredentialEntryResult, W3cV2PresentationCredentialEntryTransformer, W3cV2PresentationOptions, W3cV2RefreshService, W3cV2RefreshServiceOptions, W3cV2SdJwt, W3cV2SdJwtCredentialService, W3cV2SdJwtHeader, W3cV2SdJwtPayload, W3cV2SdJwtSignCredentialOptions, W3cV2SdJwtSignPresentationOptions, W3cV2SdJwtVcPresentOptions, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiableCredentialOptions, W3cV2SdJwtVerifiablePresentation, W3cV2SdJwtVerifiablePresentationOptions, W3cV2SdJwtVerifyCredentialOptions, W3cV2SdJwtVerifyPresentationOptions, W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2TermsOfUse, W3cV2TermsOfUseOptions, W3cV2VerifiableCredential, W3cV2VerifiableCredentialOptions, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentation, W3cV2VerifiablePresentationOptions, W3cV2VerifiablePresentationTransformer, W3cV2VerifyCredentialOptions, W3cV2VerifyCredentialResult, W3cV2VerifyPresentationOptions, W3cV2VerifyPresentationResult, W3cVerifiableCredential, W3cVerifiableCredentialTransformer, W3cVerifiablePresentation, W3cVerifyCredentialOptions, W3cVerifyCredentialResult, W3cVerifyPresentationOptions, W3cVerifyPresentationResult, constants, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, defaultDocumentLoader, deriveProof, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, mapDataIntegrityIssuesToCredoError, presentationFromDataUri, presentationToDataUri, purposes, sdJwtVcHasher, suites, validateW3cV2SdJwtDisclosureFrame, vcLibraries, w3cDate };
|
|
@@ -67,6 +67,7 @@ import { SignatureSuiteRegistry, SignatureSuiteToken } from "./linked-data-proof
|
|
|
67
67
|
import { JwsLinkedDataSignature } from "./linked-data-proofs/signature-suites/JwsLinkedDataSignature.mjs";
|
|
68
68
|
import { Ed25519Signature2018 } from "./linked-data-proofs/signature-suites/Ed25519Signature2018.mjs";
|
|
69
69
|
import { Ed25519Signature2020 } from "./linked-data-proofs/signature-suites/Ed25519Signature2020.mjs";
|
|
70
|
+
import { W3cJsonLdCredentialSigningNotSupportedError } from "./linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
70
71
|
import { W3cJsonLdCredentialService } from "./linked-data-proofs/W3cJsonLdCredentialService.mjs";
|
|
71
72
|
import "./linked-data-proofs/index.mjs";
|
|
72
73
|
import { W3cCredentialService } from "./W3cCredentialService.mjs";
|
|
@@ -78,4 +79,4 @@ import { W3cV2CredentialService } from "./W3cV2CredentialService.mjs";
|
|
|
78
79
|
import "./W3cV2CredentialServiceOptions.mjs";
|
|
79
80
|
import { W3cV2CredentialsApi } from "./W3cV2CredentialsApi.mjs";
|
|
80
81
|
import { W3cV2CredentialsModule } from "./W3cV2CredentialsModule.mjs";
|
|
81
|
-
export { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol, AnonCredsW3cCredentialProof, AnonCredsW3cCredentialServiceSymbol, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, ClaimFormat, CredentialIssuancePurpose, DID_V1_CONTEXT_URL, DataIntegrityProof, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, JsonLdModule, JsonLdModuleConfig, JwsLinkedDataSignature, LdKeyPair, LinkedDataProof, NON_DISCLOSEABLE_FIELDS, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SignatureSuiteRegistry, SignatureSuiteToken, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, W3cCredential, W3cCredentialRecord, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialService, W3cCredentialStatus, W3cCredentialSubject, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cIssuer, W3cIssuerTransformer, W3cJsonLdCredentialService, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation, W3cJwtCredentialService, W3cJwtVerifiableCredential, W3cJwtVerifiablePresentation, W3cPresentation, W3cV2Credential, W3cV2CredentialRecord, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialSubject, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiablePresentation, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2Evidence, W3cV2Issuer, W3cV2IssuerTransformer, W3cV2JwtCredentialService, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation, W3cV2LocalizedValue, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntryTransformer, W3cV2RefreshService, W3cV2SdJwtCredentialService, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiablePresentation, W3cV2TermsOfUse, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentationTransformer, W3cVerifiableCredentialTransformer, constants, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, defaultDocumentLoader, deriveProof, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, mapDataIntegrityIssuesToCredoError, presentationFromDataUri, presentationToDataUri, purposes, sdJwtVcHasher, suites, validateW3cV2SdJwtDisclosureFrame, vcLibraries, w3cDate };
|
|
82
|
+
export { ANONCREDS_DATA_INTEGRITY_CRYPTOSUITE, ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE, AnonCredsDataIntegrityServiceSymbol, AnonCredsW3cCredentialProof, AnonCredsW3cCredentialServiceSymbol, CREDENTIALS_CONTEXT_V1_URL, CREDENTIALS_CONTEXT_V2_URL, CREDENTIALS_ISSUER_URL, ClaimFormat, CredentialIssuancePurpose, DID_V1_CONTEXT_URL, DataIntegrityProof, ENVELOPED_VERIFIABLE_CREDENTIAL_TYPE, ENVELOPED_VERIFIABLE_PRESENTATION_TYPE, EXPANDED_TYPE_CREDENTIALS_CONTEXT_V1_VC_TYPE, Ed25519Signature2018, Ed25519Signature2020, IsEnvelopedVerifiableCredentialType, IsEnvelopedVerifiablePresentationType, IsW3cCredentialSubject, IsW3cIssuer, IsW3cV2Issuer, JsonLdModule, JsonLdModuleConfig, JwsLinkedDataSignature, LdKeyPair, LinkedDataProof, NON_DISCLOSEABLE_FIELDS, SECURITY_CONTEXT_SECP256k1_URL, SECURITY_CONTEXT_URL, SECURITY_CONTEXT_V1_URL, SECURITY_CONTEXT_V2_URL, SECURITY_CONTEXT_V3_URL, SECURITY_ED25519_2018_CONTEXT_URL, SECURITY_ED25519_2020_CONTEXT_URL, SECURITY_JWS_CONTEXT_URL, SECURITY_PROOF_URL, SECURITY_SIGNATURE_URL, SECURITY_X25519_CONTEXT_URL, SignatureSuiteRegistry, SignatureSuiteToken, VERIFIABLE_CREDENTIAL_TYPE, VERIFIABLE_PRESENTATION_TYPE, W3cCredential, W3cCredentialRecord, W3cCredentialRepository, W3cCredentialSchema, W3cCredentialService, W3cCredentialStatus, W3cCredentialSubject, W3cCredentialSubjectTransformer, W3cCredentialsApi, W3cCredentialsModule, W3cCredentialsModuleConfig, W3cIssuer, W3cIssuerTransformer, W3cJsonLdCredentialService, W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation, W3cJwtCredentialService, W3cJwtVerifiableCredential, W3cJwtVerifiablePresentation, W3cPresentation, W3cV2Credential, W3cV2CredentialRecord, W3cV2CredentialRepository, W3cV2CredentialSchema, W3cV2CredentialService, W3cV2CredentialStatus, W3cV2CredentialSubject, W3cV2CredentialsApi, W3cV2CredentialsModule, W3cV2CredentialsModuleConfig, W3cV2DataIntegrityContextValidator, W3cV2DataIntegrityCredentialService, W3cV2DataIntegrityVerifiableCredential, W3cV2DataIntegrityVerifiablePresentation, W3cV2EnvelopedVerifiableCredential, W3cV2EnvelopedVerifiableCredentialTransformer, W3cV2EnvelopedVerifiablePresentation, W3cV2Evidence, W3cV2Issuer, W3cV2IssuerTransformer, W3cV2JwtCredentialService, W3cV2JwtVerifiableCredential, W3cV2JwtVerifiablePresentation, W3cV2LocalizedValue, W3cV2LocalizedValueTransformer, W3cV2Presentation, W3cV2PresentationCredentialEntryTransformer, W3cV2RefreshService, W3cV2SdJwtCredentialService, W3cV2SdJwtVerifiableCredential, W3cV2SdJwtVerifiablePresentation, W3cV2TermsOfUse, W3cV2VerifiableCredentialTransformer, W3cV2VerifiablePresentationTransformer, W3cVerifiableCredentialTransformer, constants, decodeSdJwt, decodeW3cV2VerifiableCredential, decodeW3cV2VerifiablePresentation, defaultDocumentLoader, deriveProof, isEmbeddedDataIntegrityPresentationEntry, isEnvelopedVerifiableCredentialEntry, isEnvelopedVerifiablePresentationEntry, mapDataIntegrityIssuesToCredoError, presentationFromDataUri, presentationToDataUri, purposes, sdJwtVcHasher, suites, validateW3cV2SdJwtDisclosureFrame, vcLibraries, w3cDate };
|
|
@@ -11,7 +11,7 @@ import "../../../agent/context/index.mjs";
|
|
|
11
11
|
//#region src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.d.ts
|
|
12
12
|
/**
|
|
13
13
|
* Supports signing and verification of credentials according to the [Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model)
|
|
14
|
-
* using [Data
|
|
14
|
+
* using [Linked Data Proofs](https://www.w3.org/TR/vc-data-model/#proofs).
|
|
15
15
|
*/
|
|
16
16
|
export declare class W3cJsonLdCredentialService {
|
|
17
17
|
private signatureSuiteRegistry;
|
|
@@ -21,6 +21,12 @@ export declare class W3cJsonLdCredentialService {
|
|
|
21
21
|
* Signs a credential
|
|
22
22
|
*/
|
|
23
23
|
signCredential(agentContext: AgentContext, options: W3cJsonLdSignCredentialOptions): Promise<W3cJsonLdVerifiableCredential>;
|
|
24
|
+
/**
|
|
25
|
+
* Validate that the agent can prepare to sign a credential with the given proof type and verification method.
|
|
26
|
+
*/
|
|
27
|
+
assertCanSignCredential(agentContext: AgentContext, options: Pick<W3cJsonLdSignCredentialOptions, 'proofType' | 'verificationMethod'> & {
|
|
28
|
+
controller?: string;
|
|
29
|
+
}): Promise<void>;
|
|
24
30
|
/**
|
|
25
31
|
* Verifies the signature(s) of a credential
|
|
26
32
|
*
|
|
@@ -45,6 +51,7 @@ export declare class W3cJsonLdCredentialService {
|
|
|
45
51
|
getVerificationMethodTypesByProofType(proofType: string): string[];
|
|
46
52
|
getExpandedTypesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential): Promise<string[]>;
|
|
47
53
|
private ensureCredentialIssuerTrusted;
|
|
54
|
+
private getSigningSuiteInfo;
|
|
48
55
|
private prepareSigningSuite;
|
|
49
56
|
private getSignatureSuitesForCredential;
|
|
50
57
|
private assertNoAnonCredsW3cCredentialProof;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cJsonLdCredentialService.d.mts","names":[],"sources":["../../../../src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.ts"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"W3cJsonLdCredentialService.d.mts","names":[],"sources":["../../../../src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.ts"],"mappings":";;;;;;;;;;;;;;;qBAiCa;UACH;UACA;EAEW,YAAA,wBAAwB,wBAAwB,oBAAoB;;;;EAQ1E,eACX,cAAc,cACd,SAAS,iCACR,QAAQ;;;;EA4BE,wBACX,cAAc,cACd,SAAS,KAAK;IAAwE;MACrF;;;;;;;EAeU,iBACX,cAAc,cACd,SAAS,mCACR,QAAQ;;;;;;;EAoEE,iBACX,cAAc,cACd,SAAS,mCACR,QAAQ;;;;;;;EAgCE,mBACX,cAAc,cACd,SAAS,qCACR,QAAQ;EAoIJ,sCAAsC;EAIhC,8BAA8B,cAAc,cAAc,YAAY,gCAA6B;UAWlG;UA+BN;UAWM;UA8FN;UAsBA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CredoError } from "../../../error/CredoError.mjs";
|
|
2
|
+
import { RecordNotFoundError } from "../../../error/RecordNotFoundError.mjs";
|
|
2
3
|
import "../../../error/index.mjs";
|
|
3
4
|
import { asArray } from "../../../utils/array.mjs";
|
|
4
5
|
import { JsonTransformer } from "../../../utils/JsonTransformer.mjs";
|
|
@@ -22,6 +23,7 @@ import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePre
|
|
|
22
23
|
import { assertOnlyW3cJsonLdVerifiableCredentials } from "./proof-ops/jsonldUtil.mjs";
|
|
23
24
|
import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.mjs";
|
|
24
25
|
import { createKmsKeyPairClass } from "../../../crypto/KmsKeyPair.mjs";
|
|
26
|
+
import { W3cJsonLdCredentialSigningNotSupportedError } from "./W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
25
27
|
//#region src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.ts
|
|
26
28
|
let W3cJsonLdCredentialService = class W3cJsonLdCredentialService {
|
|
27
29
|
constructor(signatureSuiteRegistry, jsonLdModuleConfig) {
|
|
@@ -52,6 +54,17 @@ let W3cJsonLdCredentialService = class W3cJsonLdCredentialService {
|
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
57
|
+
* Validate that the agent can prepare to sign a credential with the given proof type and verification method.
|
|
58
|
+
*/
|
|
59
|
+
async assertCanSignCredential(agentContext, options) {
|
|
60
|
+
await this.prepareSigningSuite(agentContext, {
|
|
61
|
+
proofType: options.proofType,
|
|
62
|
+
verificationMethodId: options.verificationMethod,
|
|
63
|
+
allowedPurposes: ["assertionMethod"],
|
|
64
|
+
controller: options.controller
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
55
68
|
* Verifies the signature(s) of a credential
|
|
56
69
|
*
|
|
57
70
|
* @param credential the credential to be verified
|
|
@@ -189,7 +202,7 @@ let W3cJsonLdCredentialService = class W3cJsonLdCredentialService {
|
|
|
189
202
|
}
|
|
190
203
|
}
|
|
191
204
|
getVerificationMethodTypesByProofType(proofType) {
|
|
192
|
-
return this.
|
|
205
|
+
return this.getSigningSuiteInfo(proofType).verificationMethodTypes;
|
|
193
206
|
}
|
|
194
207
|
async getExpandedTypesForCredential(agentContext, credential) {
|
|
195
208
|
const expandedTypes = (await jsonld_default.expand(JsonTransformer.toJSON(credential), { documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext) }))[0]["@type"];
|
|
@@ -214,11 +227,23 @@ let W3cJsonLdCredentialService = class W3cJsonLdCredentialService {
|
|
|
214
227
|
}, trustedIssuers);
|
|
215
228
|
}
|
|
216
229
|
}
|
|
230
|
+
getSigningSuiteInfo(proofType) {
|
|
231
|
+
if (!this.signatureSuiteRegistry.supportedProofTypes.includes(proofType)) throw new W3cJsonLdCredentialSigningNotSupportedError(`The requested proofType ${proofType} is not supported`, "unsupported-proof-type");
|
|
232
|
+
return this.signatureSuiteRegistry.getByProofType(proofType);
|
|
233
|
+
}
|
|
217
234
|
async prepareSigningSuite(agentContext, options) {
|
|
218
|
-
const suiteInfo = this.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
235
|
+
const suiteInfo = this.getSigningSuiteInfo(options.proofType);
|
|
236
|
+
const dids = agentContext.resolve(DidsApi);
|
|
237
|
+
let resolved;
|
|
238
|
+
try {
|
|
239
|
+
resolved = await dids.resolveVerificationMethodFromCreatedDidRecord(options.verificationMethodId, options.allowedPurposes);
|
|
240
|
+
} catch (error) {
|
|
241
|
+
if (error instanceof RecordNotFoundError) throw new W3cJsonLdCredentialSigningNotSupportedError(error.message, "verification-method-not-controlled", error);
|
|
242
|
+
if (error instanceof CredoError && error.message === `Unable to locate verification method with id '${options.verificationMethodId}' in purposes ${options.allowedPurposes}`) throw new W3cJsonLdCredentialSigningNotSupportedError(error.message, "verification-method-not-found", error);
|
|
243
|
+
throw error;
|
|
244
|
+
}
|
|
245
|
+
const { verificationMethod: nativeVerificationMethod, publicJwk } = resolved;
|
|
246
|
+
if (!suiteInfo.verificationMethodTypes.includes(nativeVerificationMethod.type)) throw new W3cJsonLdCredentialSigningNotSupportedError(`Unsupported verification method type '${nativeVerificationMethod.type}' for proof type '${options.proofType}'. Supported types are: ${suiteInfo.verificationMethodTypes.join(", ")}`, "unsupported-verification-method-type");
|
|
222
247
|
const loaderResult = await this.jsonLdModuleConfig.documentLoader(agentContext)(options.verificationMethodId);
|
|
223
248
|
const framedVerificationMethod = typeof loaderResult.document === "string" ? JSON.parse(loaderResult.document) : loaderResult.document;
|
|
224
249
|
const WalletKeyPair = createKmsKeyPairClass(agentContext);
|
|
@@ -229,7 +254,7 @@ let W3cJsonLdCredentialService = class W3cJsonLdCredentialService {
|
|
|
229
254
|
useNativeCanonize: false,
|
|
230
255
|
date: options.date ?? w3cDate()
|
|
231
256
|
}).assertVerificationMethod(framedVerificationMethod);
|
|
232
|
-
if (!this.signatureSuiteRegistry.getAllByPublicJwkType(publicJwk).some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) throw new
|
|
257
|
+
if (!this.signatureSuiteRegistry.getAllByPublicJwkType(publicJwk).some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) throw new W3cJsonLdCredentialSigningNotSupportedError("The key type of the verification method does not match the suite", "unsupported-key-type");
|
|
233
258
|
const keyPair = new WalletKeyPair({
|
|
234
259
|
controller: options.controller ?? framedVerificationMethod.controller ?? nativeVerificationMethod.controller,
|
|
235
260
|
id: options.verificationMethodId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3cJsonLdCredentialService.mjs","names":["vc","jsonld"],"sources":["../../../../src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport { TrustedIssuerContext } from '../../../agent/TrustedIssuerContext'\nimport type { TrustedIssuerDid } from '../../../agent/TrustedIssuersForVerification'\nimport { createKmsKeyPairClass } from '../../../crypto/KmsKeyPair'\nimport { CredoError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport type { SingleOrArray } from '../../../types'\nimport { asArray, JsonTransformer } from '../../../utils'\nimport { type DidPurpose, DidsApi, parseDid } from '../../dids'\nimport { ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE } from '../anoncreds-w3c-credential'\nimport { JsonLdModuleConfig } from '../jsonld'\nimport jsonld from '../jsonld/jsonld'\nimport type { SingleValidationResult, W3cVerifyCredentialResult, W3cVerifyPresentationResult } from '../models'\nimport type { W3cJsonCredential } from '../models/credential/W3cJsonCredential'\nimport { validateCredentialSubjectAuthentication, w3cDate } from '../util'\nimport type {\n W3cJsonLdSignCredentialOptions,\n W3cJsonLdSignPresentationOptions,\n W3cJsonLdVerifyCredentialOptions,\n W3cJsonLdVerifyPresentationOptions,\n} from '../W3cCredentialServiceOptions'\nimport vc from './adapters/vc-adapter'\nimport { W3cJsonLdVerifiableCredential } from './models/W3cJsonLdVerifiableCredential'\nimport { W3cJsonLdVerifiablePresentation } from './models/W3cJsonLdVerifiablePresentation'\nimport { assertOnlyW3cJsonLdVerifiableCredentials } from './proof-ops/jsonldUtil'\nimport { SignatureSuiteRegistry } from './SignatureSuiteRegistry'\n\n/**\n * Supports signing and verification of credentials according to the [Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model)\n * using [Data Integrity Proof](https://www.w3.org/TR/vc-data-model/#data-integrity-proofs).\n */\n@injectable()\nexport class W3cJsonLdCredentialService {\n private signatureSuiteRegistry: SignatureSuiteRegistry\n private jsonLdModuleConfig: JsonLdModuleConfig\n\n public constructor(signatureSuiteRegistry: SignatureSuiteRegistry, jsonLdModuleConfig: JsonLdModuleConfig) {\n this.signatureSuiteRegistry = signatureSuiteRegistry\n this.jsonLdModuleConfig = jsonLdModuleConfig\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cJsonLdSignCredentialOptions\n ): Promise<W3cJsonLdVerifiableCredential> {\n const { suite } = await this.prepareSigningSuite(agentContext, {\n proofType: options.proofType,\n verificationMethodId: options.verificationMethod,\n allowedPurposes: options.proofPurpose?.term ? [options.proofPurpose.term] : ['assertionMethod'],\n date: options.created ?? w3cDate(),\n controller: options.credential.issuerId,\n })\n\n try {\n const result = await vc.issue({\n credential: JsonTransformer.toJSON(options.credential),\n suite: suite,\n purpose: options.proofPurpose,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n })\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiableCredential)\n } catch (error) {\n throw new CredoError(`Error issuing W3C JSON-LD VC. ${error.message}`, {\n cause: error,\n })\n }\n }\n\n /**\n * Verifies the signature(s) of a credential\n *\n * @param credential the credential to be verified\n * @returns the verification result\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cJsonLdVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n try {\n this.assertNoAnonCredsW3cCredentialProof(options.credential.proof)\n\n const verifyCredentialStatus = options.verifyCredentialStatus ?? true\n\n await this.ensureCredentialIssuerTrusted(agentContext, options.credential, options.trustedIssuers)\n\n const suites = this.getSignatureSuitesForCredential(agentContext, options.credential)\n\n const verifyOptions: Record<string, unknown> = {\n credential: JsonTransformer.toJSON(options.credential),\n suite: suites,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n checkStatus: ({ credential }: { credential: W3cJsonCredential }) => {\n // Only throw error if credentialStatus is present\n if (verifyCredentialStatus && 'credentialStatus' in credential) {\n throw new CredoError('Verifying credential status for JSON-LD credentials is currently not supported')\n }\n return {\n verified: true,\n }\n },\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n verifyOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.verifyCredential(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n if (!isValid) {\n agentContext.config.logger.debug(`Credential verification failed: ${result.error?.message}`, {\n stack: result.error?.stack,\n })\n }\n\n // We map the result to our own result type to make it easier to work with\n // however, for now we just add a single vcJs validation result as we don't\n // have access to the internal validation results of vc-js\n return {\n isValid,\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n },\n error: result.error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\n }\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation(\n agentContext: AgentContext,\n options: W3cJsonLdSignPresentationOptions\n ): Promise<W3cJsonLdVerifiablePresentation> {\n const { suite } = await this.prepareSigningSuite(agentContext, {\n proofType: options.proofType,\n verificationMethodId: options.verificationMethod,\n allowedPurposes: options.proofPurpose?.term ? [options.proofPurpose.term] : ['authentication'],\n date: new Date().toISOString(),\n })\n\n const signOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: suite,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n signOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.signPresentation(signOptions)\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiablePresentation)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cJsonLdVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n try {\n this.assertNoAnonCredsW3cCredentialProof(options.presentation.proof)\n\n // create keyPair\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = options.presentation.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n if (options.purpose) {\n proofs = proofs.filter((proof) => proof.proofPurpose === options.purpose.term)\n }\n\n const presentationSuites = proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type).suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n\n const credentials = asArray(options.presentation.verifiableCredential)\n assertOnlyW3cJsonLdVerifiableCredentials(credentials)\n\n for (const credential of credentials) {\n this.assertNoAnonCredsW3cCredentialProof(credential.proof)\n await this.ensureCredentialIssuerTrusted(agentContext, credential, options.trustedIssuers)\n }\n\n const credentialSuites = credentials.map((credential) =>\n this.getSignatureSuitesForCredential(agentContext, credential)\n )\n const allSuites = presentationSuites.concat(...credentialSuites)\n\n const verifyOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: allSuites,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.purpose) {\n verifyOptions.presentationPurpose = options.purpose\n }\n\n const result = await vc.verify(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n // The vc-js / jsonld-signatures libraries verify the presentation proof and each embedded\n // credential's issuer proof, but do NOT bind the presentation signer (holder) to the\n // credentialSubject of the embedded credentials. Without this check an attacker could wrap\n // someone else's credential (a data object, not a secret) in a presentation signed with their\n // own key and have it accepted. Enforce the binding here, mirroring the jwt_vp and sd-jwt paths\n // (see validateCredentialSubjectAuthentication).\n //\n // The holder identity is derived from the verificationMethod of the presentation's\n // authentication proof(s), which vc-js has already cryptographically verified and authorized\n // for the authentication purpose. validateCredentialSubjectAuthentication normalizes the DID\n // URL to its bare DID before comparison; for the DID methods used with linked-data proofs the\n // verificationMethod's DID equals its controller.\n const holderProofPurpose = options.purpose?.term ?? 'authentication'\n const holderVerificationMethods = asArray(options.presentation.proof)\n .filter((proof) => proof.proofPurpose === holderProofPurpose)\n .map((proof) => proof.verificationMethod)\n\n // Surfaced per credential under `credentials[]` to mirror the jwt_vp result shape. The\n // library-level signature/status validations remain lumped in `vcJs`, so each entry here\n // only carries the credentialSubjectAuthentication check.\n const credentialValidations = credentials.map((credential) => {\n const credentialSubjectIds = credential.credentialSubjectIds\n\n // A credential without subject identifiers is treated as a bearer credential,\n // so there is no subject to authenticate.\n const isAuthenticated =\n credentialSubjectIds.length === 0 ||\n holderVerificationMethods.some(\n (verificationMethod) =>\n validateCredentialSubjectAuthentication(credentialSubjectIds, verificationMethod).isValid\n )\n\n const credentialSubjectAuthentication: SingleValidationResult = isAuthenticated\n ? { isValid: true }\n : {\n isValid: false,\n error: new CredoError(\n 'Presentation does not authenticate the credentialSubject of one or more included credentials'\n ),\n }\n\n return {\n isValid: credentialSubjectAuthentication.isValid,\n validations: { credentialSubjectAuthentication },\n }\n })\n\n // We map the result to our own result type to make it easier to work with. The library\n // validations are lumped into a single vcJs result as we don't have access to the internal\n // validation results of vc-js; the credentialSubject authentication check that Credo performs\n // on top is surfaced per credential under `credentials`.\n return {\n isValid: isValid && credentialValidations.every((credential) => credential.isValid),\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n credentials: credentialValidations,\n },\n error:\n result.error ??\n credentialValidations.find((credential) => !credential.isValid)?.validations.credentialSubjectAuthentication\n .error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\n }\n }\n\n public getVerificationMethodTypesByProofType(proofType: string): string[] {\n return this.signatureSuiteRegistry.getByProofType(proofType).verificationMethodTypes\n }\n\n public async getExpandedTypesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n // Get the expanded types\n const expandedTypes: SingleOrArray<string> = (\n await jsonld.expand(JsonTransformer.toJSON(credential), {\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n })\n )[0]['@type']\n\n return asArray(expandedTypes)\n }\n\n private async ensureCredentialIssuerTrusted(\n agentContext: AgentContext,\n credential: W3cJsonLdVerifiableCredential,\n trustedIssuers?: TrustedIssuerDid[]\n ): Promise<void> {\n const issuerId = credential.issuerId\n\n // Only enforced for did-based issuers\n if (!issuerId.startsWith('did:')) return\n\n const issuerDid = parseDid(issuerId).did\n\n for (const proof of asArray(credential.proof)) {\n const verificationMethod = proof.verificationMethod\n if (!verificationMethod.startsWith('did:') || parseDid(verificationMethod).did !== issuerDid) {\n throw new CredoError(\n `The proof verification method '${verificationMethod}' does not match the credential issuer did '${issuerDid}'.`\n )\n }\n\n await TrustedIssuerContext.ensureTrustedSigner(\n agentContext,\n {\n signer: { method: 'did', didUrl: verificationMethod },\n verification: { type: 'credential', credential },\n },\n trustedIssuers\n )\n }\n }\n\n private async prepareSigningSuite(\n agentContext: AgentContext,\n options: {\n proofType: string\n verificationMethodId: string\n allowedPurposes: Array<DidPurpose | 'verificationMethod'>\n date?: string\n controller?: string\n }\n ) {\n const suiteInfo = this.signatureSuiteRegistry.getByProofType(options.proofType)\n if (!suiteInfo) {\n throw new CredoError(`The requested proofType ${options.proofType} is not supported`)\n }\n\n const dids = agentContext.resolve(DidsApi)\n const { verificationMethod: nativeVerificationMethod, publicJwk } =\n await dids.resolveVerificationMethodFromCreatedDidRecord(options.verificationMethodId, options.allowedPurposes)\n\n if (!suiteInfo.verificationMethodTypes.includes(nativeVerificationMethod.type)) {\n throw new CredoError(\n `Unsupported verification method type '${nativeVerificationMethod.type}' for proof type '${options.proofType}'. Supported types are: ${suiteInfo.verificationMethodTypes.join(', ')}`\n )\n }\n\n const documentLoader = this.jsonLdModuleConfig.documentLoader(agentContext)\n const loaderResult = await documentLoader(options.verificationMethodId)\n const framedVerificationMethod =\n typeof loaderResult.document === 'string' ? JSON.parse(loaderResult.document) : loaderResult.document\n\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n // Instantiate suite to validate verification method and framing context\n const SuiteClass = suiteInfo.suiteClass\n const validationSuite = new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethodId,\n },\n useNativeCanonize: false,\n date: options.date ?? w3cDate(),\n })\n\n await validationSuite.assertVerificationMethod(framedVerificationMethod)\n\n const suitesForKey = this.signatureSuiteRegistry.getAllByPublicJwkType(publicJwk)\n if (!suitesForKey.some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) {\n throw new CredoError('The key type of the verification method does not match the suite')\n }\n\n const keyPair = new WalletKeyPair({\n controller:\n options.controller ?? (framedVerificationMethod.controller as string) ?? nativeVerificationMethod.controller,\n id: options.verificationMethodId,\n publicJwk,\n })\n\n const suite = new SuiteClass({\n key: keyPair,\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethodId,\n },\n useNativeCanonize: false,\n date: options.date ?? w3cDate(),\n })\n\n return { suite, suiteInfo, keyPair, WalletKeyPair }\n }\n\n private getSignatureSuitesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = credential.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n\n return proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type).suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n }\n\n private assertNoAnonCredsW3cCredentialProof(\n proofsInput: W3cJsonLdVerifiableCredential['proof'] | W3cJsonLdVerifiablePresentation['proof']\n ) {\n const proofs = asArray(proofsInput)\n const hasAnonCredsW3cCredentialProof = proofs.some(\n (proof) =>\n proof.type === 'DataIntegrityProof' &&\n 'cryptosuite' in proof &&\n proof.cryptosuite === ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE\n )\n\n if (hasAnonCredsW3cCredentialProof) {\n throw new CredoError(\n 'W3C credential proof with cryptosuite anoncreds-2023 must be verified through the anoncreds W3C credential path, not the generic linked-data verifier'\n )\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,IAAM,6BAAN,MAAM,2BAA2B;CAItC,YAAmB,wBAAgD,oBAAwC;EACzG,KAAK,yBAAyB;EAC9B,KAAK,qBAAqB;CAC5B;;;;CAKA,MAAa,eACX,cACA,SACwC;EACxC,MAAM,EAAE,UAAU,MAAM,KAAK,oBAAoB,cAAc;GAC7D,WAAW,QAAQ;GACnB,sBAAsB,QAAQ;GAC9B,iBAAiB,QAAQ,cAAc,OAAO,CAAC,QAAQ,aAAa,IAAI,IAAI,CAAC,iBAAiB;GAC9F,MAAM,QAAQ,WAAW,QAAQ;GACjC,YAAY,QAAQ,WAAW;EACjC,CAAC;EAED,IAAI;GACF,MAAM,SAAS,MAAMA,mBAAG,MAAM;IAC5B,YAAY,gBAAgB,OAAO,QAAQ,UAAU;IAC9C;IACP,SAAS,QAAQ;IACjB,gBAAgB,KAAK,mBAAmB,eAAe,YAAY;GACrE,CAAC;GAED,OAAO,gBAAgB,SAAS,QAAQ,6BAA6B;EACvE,SAAS,OAAO;GACd,MAAM,IAAI,WAAW,iCAAiC,MAAM,WAAW,EACrE,OAAO,MACT,CAAC;EACH;CACF;;;;;;;CAQA,MAAa,iBACX,cACA,SACoC;EACpC,IAAI;GACF,KAAK,oCAAoC,QAAQ,WAAW,KAAK;GAEjE,MAAM,yBAAyB,QAAQ,0BAA0B;GAEjE,MAAM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e,UAAU,UAAU,GAC5E,MAAM,IAAI,WAAW,kEAAkE;EAGzF,MAAM,UAAU,IAAI,cAAc;GAChC,YACE,QAAQ,cAAe,yBAAyB,cAAyB,yBAAyB;GACpG,IAAI,QAAQ;GACZ;EACF,CAAC;EAYD,OAAO;GAAE,OAAA,IAVS,WAAW;IAC3B,KAAK;IACL,YAAY;IACZ,OAAO,EACL,oBAAoB,QAAQ,qBAC9B;IACA,mBAAmB;IACnB,MAAM,QAAQ,QAAQ,QAAQ;GAChC,CAEa;GAAG;GAAW;GAAS;EAAc;CACpD;CAEA,gCAAwC,cAA4B,YAA2C;EAC7G,MAAM,gBAAgB,sBAAsB,YAAY;EAExD,IAAI,SAAS,WAAW;EAExB,IAAI,CAAC,MAAM,QAAQ,MAAM,GACvB,SAAS,CAAC,MAAM;EAGlB,OAAO,OAAO,KAAK,UAAU;GAC3B,MAAM,aAAa,KAAK,uBAAuB,eAAe,MAAM,IAAI,CAAC,CAAC;GAC1E,OAAO,IAAI,WAAW;IACpB,YAAY;IACZ,OAAO,EACL,oBAAoB,MAAM,mBAC5B;IACA,MAAM,MAAM;IACZ,mBAAmB;GACrB,CAAC;EACH,CAAC;CACH;CAEA,oCACE,aACA;EASA,IARe,QAAQ,WACqB,CAAC,CAAC,MAC3C,UACC,MAAM,SAAS,wBACf,iBAAiB,SACjB,MAAM,gBAAA,gBAGuB,GAC/B,MAAM,IAAI,WACR,uJACF;CAEJ;AACF;AA3bC,6BAAA,WAAA,CAAA,WAAW,GAAA,mBAAA,qBAAA,CAAA,OAAA,2BAAA,cAAA,SAAA,wBAAA,OAAA,uBAAA,cAAA,SAAA,kBAAA,CAAA,CAAA,GAAA,0BAAA"}
|
|
1
|
+
{"version":3,"file":"W3cJsonLdCredentialService.mjs","names":["vc","jsonld"],"sources":["../../../../src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.ts"],"sourcesContent":["import type { AgentContext } from '../../../agent/context'\nimport { TrustedIssuerContext } from '../../../agent/TrustedIssuerContext'\nimport type { TrustedIssuerDid } from '../../../agent/TrustedIssuersForVerification'\nimport { createKmsKeyPairClass } from '../../../crypto/KmsKeyPair'\nimport { CredoError, RecordNotFoundError } from '../../../error'\nimport { injectable } from '../../../plugins'\nimport type { SingleOrArray } from '../../../types'\nimport { asArray, JsonTransformer } from '../../../utils'\nimport { type DidPurpose, DidsApi, parseDid } from '../../dids'\nimport { ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE } from '../anoncreds-w3c-credential'\nimport { JsonLdModuleConfig } from '../jsonld'\nimport jsonld from '../jsonld/jsonld'\nimport type { SingleValidationResult, W3cVerifyCredentialResult, W3cVerifyPresentationResult } from '../models'\nimport type { W3cJsonCredential } from '../models/credential/W3cJsonCredential'\nimport { validateCredentialSubjectAuthentication, w3cDate } from '../util'\nimport type {\n W3cJsonLdSignCredentialOptions,\n W3cJsonLdSignPresentationOptions,\n W3cJsonLdVerifyCredentialOptions,\n W3cJsonLdVerifyPresentationOptions,\n} from '../W3cCredentialServiceOptions'\nimport vc from './adapters/vc-adapter'\nimport { W3cJsonLdVerifiableCredential } from './models/W3cJsonLdVerifiableCredential'\nimport { W3cJsonLdVerifiablePresentation } from './models/W3cJsonLdVerifiablePresentation'\nimport { assertOnlyW3cJsonLdVerifiableCredentials } from './proof-ops/jsonldUtil'\nimport { SignatureSuiteRegistry } from './SignatureSuiteRegistry'\nimport { W3cJsonLdCredentialSigningNotSupportedError } from './W3cJsonLdCredentialSigningNotSupportedError'\n\n/**\n * Supports signing and verification of credentials according to the [Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model)\n * using [Linked Data Proofs](https://www.w3.org/TR/vc-data-model/#proofs).\n */\n@injectable()\nexport class W3cJsonLdCredentialService {\n private signatureSuiteRegistry: SignatureSuiteRegistry\n private jsonLdModuleConfig: JsonLdModuleConfig\n\n public constructor(signatureSuiteRegistry: SignatureSuiteRegistry, jsonLdModuleConfig: JsonLdModuleConfig) {\n this.signatureSuiteRegistry = signatureSuiteRegistry\n this.jsonLdModuleConfig = jsonLdModuleConfig\n }\n\n /**\n * Signs a credential\n */\n public async signCredential(\n agentContext: AgentContext,\n options: W3cJsonLdSignCredentialOptions\n ): Promise<W3cJsonLdVerifiableCredential> {\n const { suite } = await this.prepareSigningSuite(agentContext, {\n proofType: options.proofType,\n verificationMethodId: options.verificationMethod,\n allowedPurposes: options.proofPurpose?.term ? [options.proofPurpose.term] : ['assertionMethod'],\n date: options.created ?? w3cDate(),\n controller: options.credential.issuerId,\n })\n\n try {\n const result = await vc.issue({\n credential: JsonTransformer.toJSON(options.credential),\n suite: suite,\n purpose: options.proofPurpose,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n })\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiableCredential)\n } catch (error) {\n throw new CredoError(`Error issuing W3C JSON-LD VC. ${error.message}`, {\n cause: error,\n })\n }\n }\n\n /**\n * Validate that the agent can prepare to sign a credential with the given proof type and verification method.\n */\n public async assertCanSignCredential(\n agentContext: AgentContext,\n options: Pick<W3cJsonLdSignCredentialOptions, 'proofType' | 'verificationMethod'> & { controller?: string }\n ): Promise<void> {\n await this.prepareSigningSuite(agentContext, {\n proofType: options.proofType,\n verificationMethodId: options.verificationMethod,\n allowedPurposes: ['assertionMethod'],\n controller: options.controller,\n })\n }\n\n /**\n * Verifies the signature(s) of a credential\n *\n * @param credential the credential to be verified\n * @returns the verification result\n */\n public async verifyCredential(\n agentContext: AgentContext,\n options: W3cJsonLdVerifyCredentialOptions\n ): Promise<W3cVerifyCredentialResult> {\n try {\n this.assertNoAnonCredsW3cCredentialProof(options.credential.proof)\n\n const verifyCredentialStatus = options.verifyCredentialStatus ?? true\n\n await this.ensureCredentialIssuerTrusted(agentContext, options.credential, options.trustedIssuers)\n\n const suites = this.getSignatureSuitesForCredential(agentContext, options.credential)\n\n const verifyOptions: Record<string, unknown> = {\n credential: JsonTransformer.toJSON(options.credential),\n suite: suites,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n checkStatus: ({ credential }: { credential: W3cJsonCredential }) => {\n // Only throw error if credentialStatus is present\n if (verifyCredentialStatus && 'credentialStatus' in credential) {\n throw new CredoError('Verifying credential status for JSON-LD credentials is currently not supported')\n }\n return {\n verified: true,\n }\n },\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n verifyOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.verifyCredential(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n if (!isValid) {\n agentContext.config.logger.debug(`Credential verification failed: ${result.error?.message}`, {\n stack: result.error?.stack,\n })\n }\n\n // We map the result to our own result type to make it easier to work with\n // however, for now we just add a single vcJs validation result as we don't\n // have access to the internal validation results of vc-js\n return {\n isValid,\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n },\n error: result.error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\n }\n }\n\n /**\n * Signs a presentation including the credentials it includes\n *\n * @param presentation the presentation to be signed\n * @returns the signed presentation\n */\n public async signPresentation(\n agentContext: AgentContext,\n options: W3cJsonLdSignPresentationOptions\n ): Promise<W3cJsonLdVerifiablePresentation> {\n const { suite } = await this.prepareSigningSuite(agentContext, {\n proofType: options.proofType,\n verificationMethodId: options.verificationMethod,\n allowedPurposes: options.proofPurpose?.term ? [options.proofPurpose.term] : ['authentication'],\n date: new Date().toISOString(),\n })\n\n const signOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: suite,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.proofPurpose) {\n signOptions.purpose = options.proofPurpose\n }\n\n const result = await vc.signPresentation(signOptions)\n\n return JsonTransformer.fromJSON(result, W3cJsonLdVerifiablePresentation)\n }\n\n /**\n * Verifies a presentation including the credentials it includes\n *\n * @param presentation the presentation to be verified\n * @returns the verification result\n */\n public async verifyPresentation(\n agentContext: AgentContext,\n options: W3cJsonLdVerifyPresentationOptions\n ): Promise<W3cVerifyPresentationResult> {\n try {\n this.assertNoAnonCredsW3cCredentialProof(options.presentation.proof)\n\n // create keyPair\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = options.presentation.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n if (options.purpose) {\n proofs = proofs.filter((proof) => proof.proofPurpose === options.purpose.term)\n }\n\n const presentationSuites = proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type).suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n\n const credentials = asArray(options.presentation.verifiableCredential)\n assertOnlyW3cJsonLdVerifiableCredentials(credentials)\n\n for (const credential of credentials) {\n this.assertNoAnonCredsW3cCredentialProof(credential.proof)\n await this.ensureCredentialIssuerTrusted(agentContext, credential, options.trustedIssuers)\n }\n\n const credentialSuites = credentials.map((credential) =>\n this.getSignatureSuitesForCredential(agentContext, credential)\n )\n const allSuites = presentationSuites.concat(...credentialSuites)\n\n const verifyOptions: Record<string, unknown> = {\n presentation: JsonTransformer.toJSON(options.presentation),\n suite: allSuites,\n challenge: options.challenge,\n domain: options.domain,\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n }\n\n // this is a hack because vcjs throws if purpose is passed as undefined or null\n if (options.purpose) {\n verifyOptions.presentationPurpose = options.purpose\n }\n\n const result = await vc.verify(verifyOptions)\n\n const { verified: isValid, ...remainingResult } = result\n\n // The vc-js / jsonld-signatures libraries verify the presentation proof and each embedded\n // credential's issuer proof, but do NOT bind the presentation signer (holder) to the\n // credentialSubject of the embedded credentials. Without this check an attacker could wrap\n // someone else's credential (a data object, not a secret) in a presentation signed with their\n // own key and have it accepted. Enforce the binding here, mirroring the jwt_vp and sd-jwt paths\n // (see validateCredentialSubjectAuthentication).\n //\n // The holder identity is derived from the verificationMethod of the presentation's\n // authentication proof(s), which vc-js has already cryptographically verified and authorized\n // for the authentication purpose. validateCredentialSubjectAuthentication normalizes the DID\n // URL to its bare DID before comparison; for the DID methods used with linked-data proofs the\n // verificationMethod's DID equals its controller.\n const holderProofPurpose = options.purpose?.term ?? 'authentication'\n const holderVerificationMethods = asArray(options.presentation.proof)\n .filter((proof) => proof.proofPurpose === holderProofPurpose)\n .map((proof) => proof.verificationMethod)\n\n // Surfaced per credential under `credentials[]` to mirror the jwt_vp result shape. The\n // library-level signature/status validations remain lumped in `vcJs`, so each entry here\n // only carries the credentialSubjectAuthentication check.\n const credentialValidations = credentials.map((credential) => {\n const credentialSubjectIds = credential.credentialSubjectIds\n\n // A credential without subject identifiers is treated as a bearer credential,\n // so there is no subject to authenticate.\n const isAuthenticated =\n credentialSubjectIds.length === 0 ||\n holderVerificationMethods.some(\n (verificationMethod) =>\n validateCredentialSubjectAuthentication(credentialSubjectIds, verificationMethod).isValid\n )\n\n const credentialSubjectAuthentication: SingleValidationResult = isAuthenticated\n ? { isValid: true }\n : {\n isValid: false,\n error: new CredoError(\n 'Presentation does not authenticate the credentialSubject of one or more included credentials'\n ),\n }\n\n return {\n isValid: credentialSubjectAuthentication.isValid,\n validations: { credentialSubjectAuthentication },\n }\n })\n\n // We map the result to our own result type to make it easier to work with. The library\n // validations are lumped into a single vcJs result as we don't have access to the internal\n // validation results of vc-js; the credentialSubject authentication check that Credo performs\n // on top is surfaced per credential under `credentials`.\n return {\n isValid: isValid && credentialValidations.every((credential) => credential.isValid),\n validations: {\n vcJs: {\n isValid,\n ...remainingResult,\n },\n credentials: credentialValidations,\n },\n error:\n result.error ??\n credentialValidations.find((credential) => !credential.isValid)?.validations.credentialSubjectAuthentication\n .error,\n }\n } catch (error) {\n return {\n isValid: false,\n validations: {},\n error,\n }\n }\n }\n\n public getVerificationMethodTypesByProofType(proofType: string): string[] {\n return this.getSigningSuiteInfo(proofType).verificationMethodTypes\n }\n\n public async getExpandedTypesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n // Get the expanded types\n const expandedTypes: SingleOrArray<string> = (\n await jsonld.expand(JsonTransformer.toJSON(credential), {\n documentLoader: this.jsonLdModuleConfig.documentLoader(agentContext),\n })\n )[0]['@type']\n\n return asArray(expandedTypes)\n }\n\n private async ensureCredentialIssuerTrusted(\n agentContext: AgentContext,\n credential: W3cJsonLdVerifiableCredential,\n trustedIssuers?: TrustedIssuerDid[]\n ): Promise<void> {\n const issuerId = credential.issuerId\n\n // Only enforced for did-based issuers\n if (!issuerId.startsWith('did:')) return\n\n const issuerDid = parseDid(issuerId).did\n\n for (const proof of asArray(credential.proof)) {\n const verificationMethod = proof.verificationMethod\n if (!verificationMethod.startsWith('did:') || parseDid(verificationMethod).did !== issuerDid) {\n throw new CredoError(\n `The proof verification method '${verificationMethod}' does not match the credential issuer did '${issuerDid}'.`\n )\n }\n\n await TrustedIssuerContext.ensureTrustedSigner(\n agentContext,\n {\n signer: { method: 'did', didUrl: verificationMethod },\n verification: { type: 'credential', credential },\n },\n trustedIssuers\n )\n }\n }\n\n private getSigningSuiteInfo(proofType: string) {\n if (!this.signatureSuiteRegistry.supportedProofTypes.includes(proofType)) {\n throw new W3cJsonLdCredentialSigningNotSupportedError(\n `The requested proofType ${proofType} is not supported`,\n 'unsupported-proof-type'\n )\n }\n\n return this.signatureSuiteRegistry.getByProofType(proofType)\n }\n\n private async prepareSigningSuite(\n agentContext: AgentContext,\n options: {\n proofType: string\n verificationMethodId: string\n allowedPurposes: Array<DidPurpose | 'verificationMethod'>\n date?: string\n controller?: string\n }\n ) {\n const suiteInfo = this.getSigningSuiteInfo(options.proofType)\n\n const dids = agentContext.resolve(DidsApi)\n let resolved: Awaited<ReturnType<typeof dids.resolveVerificationMethodFromCreatedDidRecord>>\n try {\n resolved = await dids.resolveVerificationMethodFromCreatedDidRecord(\n options.verificationMethodId,\n options.allowedPurposes\n )\n } catch (error) {\n if (error instanceof RecordNotFoundError) {\n throw new W3cJsonLdCredentialSigningNotSupportedError(\n error.message,\n 'verification-method-not-controlled',\n error\n )\n }\n if (\n error instanceof CredoError &&\n error.message ===\n `Unable to locate verification method with id '${options.verificationMethodId}' in purposes ${options.allowedPurposes}`\n ) {\n throw new W3cJsonLdCredentialSigningNotSupportedError(error.message, 'verification-method-not-found', error)\n }\n throw error\n }\n\n const { verificationMethod: nativeVerificationMethod, publicJwk } = resolved\n\n if (!suiteInfo.verificationMethodTypes.includes(nativeVerificationMethod.type)) {\n throw new W3cJsonLdCredentialSigningNotSupportedError(\n `Unsupported verification method type '${nativeVerificationMethod.type}' for proof type '${options.proofType}'. Supported types are: ${suiteInfo.verificationMethodTypes.join(', ')}`,\n 'unsupported-verification-method-type'\n )\n }\n\n const documentLoader = this.jsonLdModuleConfig.documentLoader(agentContext)\n const loaderResult = await documentLoader(options.verificationMethodId)\n const framedVerificationMethod =\n typeof loaderResult.document === 'string' ? JSON.parse(loaderResult.document) : loaderResult.document\n\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n // Instantiate suite to validate verification method and framing context\n const SuiteClass = suiteInfo.suiteClass\n const validationSuite = new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethodId,\n },\n useNativeCanonize: false,\n date: options.date ?? w3cDate(),\n })\n\n await validationSuite.assertVerificationMethod(framedVerificationMethod)\n\n const suitesForKey = this.signatureSuiteRegistry.getAllByPublicJwkType(publicJwk)\n if (!suitesForKey.some(({ suiteClass }) => suiteClass === suiteInfo.suiteClass)) {\n throw new W3cJsonLdCredentialSigningNotSupportedError(\n 'The key type of the verification method does not match the suite',\n 'unsupported-key-type'\n )\n }\n\n const keyPair = new WalletKeyPair({\n controller:\n options.controller ?? (framedVerificationMethod.controller as string) ?? nativeVerificationMethod.controller,\n id: options.verificationMethodId,\n publicJwk,\n })\n\n const suite = new SuiteClass({\n key: keyPair,\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: options.verificationMethodId,\n },\n useNativeCanonize: false,\n date: options.date ?? w3cDate(),\n })\n\n return { suite, suiteInfo, keyPair, WalletKeyPair }\n }\n\n private getSignatureSuitesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential) {\n const WalletKeyPair = createKmsKeyPairClass(agentContext)\n\n let proofs = credential.proof\n\n if (!Array.isArray(proofs)) {\n proofs = [proofs]\n }\n\n return proofs.map((proof) => {\n const SuiteClass = this.signatureSuiteRegistry.getByProofType(proof.type).suiteClass\n return new SuiteClass({\n LDKeyClass: WalletKeyPair,\n proof: {\n verificationMethod: proof.verificationMethod,\n },\n date: proof.created,\n useNativeCanonize: false,\n })\n })\n }\n\n private assertNoAnonCredsW3cCredentialProof(\n proofsInput: W3cJsonLdVerifiableCredential['proof'] | W3cJsonLdVerifiablePresentation['proof']\n ) {\n const proofs = asArray(proofsInput)\n const hasAnonCredsW3cCredentialProof = proofs.some(\n (proof) =>\n proof.type === 'DataIntegrityProof' &&\n 'cryptosuite' in proof &&\n proof.cryptosuite === ANONCREDS_W3C_CREDENTIAL_CRYPTOSUITE\n )\n\n if (hasAnonCredsW3cCredentialProof) {\n throw new CredoError(\n 'W3C credential proof with cryptosuite anoncreds-2023 must be verified through the anoncreds W3C credential path, not the generic linked-data verifier'\n )\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,IAAM,6BAAN,MAAM,2BAA2B;CAItC,YAAmB,wBAAgD,oBAAwC;EACzG,KAAK,yBAAyB;EAC9B,KAAK,qBAAqB;CAC5B;;;;CAKA,MAAa,eACX,cACA,SACwC;EACxC,MAAM,EAAE,UAAU,MAAM,KAAK,oBAAoB,cAAc;GAC7D,WAAW,QAAQ;GACnB,sBAAsB,QAAQ;GAC9B,iBAAiB,QAAQ,cAAc,OAAO,CAAC,QAAQ,aAAa,IAAI,IAAI,CAAC,iBAAiB;GAC9F,MAAM,QAAQ,WAAW,QAAQ;GACjC,YAAY,QAAQ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AAO,EACL,oBAAoB,QAAQ,qBAC9B;IACA,mBAAmB;IACnB,MAAM,QAAQ,QAAQ,QAAQ;GAChC,CAEa;GAAG;GAAW;GAAS;EAAc;CACpD;CAEA,gCAAwC,cAA4B,YAA2C;EAC7G,MAAM,gBAAgB,sBAAsB,YAAY;EAExD,IAAI,SAAS,WAAW;EAExB,IAAI,CAAC,MAAM,QAAQ,MAAM,GACvB,SAAS,CAAC,MAAM;EAGlB,OAAO,OAAO,KAAK,UAAU;GAC3B,MAAM,aAAa,KAAK,uBAAuB,eAAe,MAAM,IAAI,CAAC,CAAC;GAC1E,OAAO,IAAI,WAAW;IACpB,YAAY;IACZ,OAAO,EACL,oBAAoB,MAAM,mBAC5B;IACA,MAAM,MAAM;IACZ,mBAAmB;GACrB,CAAC;EACH,CAAC;CACH;CAEA,oCACE,aACA;EASA,IARe,QAAQ,WACqB,CAAC,CAAC,MAC3C,UACC,MAAM,SAAS,wBACf,iBAAiB,SACjB,MAAM,gBAAA,gBAGuB,GAC/B,MAAM,IAAI,WACR,uJACF;CAEJ;AACF;AA7eC,6BAAA,WAAA,CAAA,WAAW,GAAA,mBAAA,qBAAA,CAAA,OAAA,2BAAA,cAAA,SAAA,wBAAA,OAAA,uBAAA,cAAA,SAAA,kBAAA,CAAA,CAAA,GAAA,0BAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CredoError } from "../../../error/CredoError.mjs";
|
|
2
|
+
import "../../../error/index.mjs";
|
|
3
|
+
//#region src/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.d.ts
|
|
4
|
+
export type W3cJsonLdCredentialSigningNotSupportedReason = 'no-compatible-verification-method' | 'unsupported-key-type' | 'unsupported-proof-type' | 'unsupported-verification-method-type' | 'verification-method-not-controlled' | 'verification-method-not-found';
|
|
5
|
+
export declare class W3cJsonLdCredentialSigningNotSupportedError extends CredoError {
|
|
6
|
+
readonly reason: W3cJsonLdCredentialSigningNotSupportedReason;
|
|
7
|
+
constructor(message: string, reason: W3cJsonLdCredentialSigningNotSupportedReason, cause?: Error);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//# sourceMappingURL=W3cJsonLdCredentialSigningNotSupportedError.d.mts.map
|
package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"W3cJsonLdCredentialSigningNotSupportedError.d.mts","names":[],"sources":["../../../../src/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.ts"],"mappings":";;;YAEY;qBAQC,oDAAoD;WAG7C,QAAQ;EADxB,YAAA,iBACgB,QAAQ,8CACxB,QAAQ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CredoError } from "../../../error/CredoError.mjs";
|
|
2
|
+
import "../../../error/index.mjs";
|
|
3
|
+
//#region src/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.ts
|
|
4
|
+
var W3cJsonLdCredentialSigningNotSupportedError = class extends CredoError {
|
|
5
|
+
constructor(message, reason, cause) {
|
|
6
|
+
super(message, { cause });
|
|
7
|
+
this.reason = reason;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { W3cJsonLdCredentialSigningNotSupportedError };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=W3cJsonLdCredentialSigningNotSupportedError.mjs.map
|
package/build/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"W3cJsonLdCredentialSigningNotSupportedError.mjs","names":[],"sources":["../../../../src/modules/vc/linked-data-proofs/W3cJsonLdCredentialSigningNotSupportedError.ts"],"sourcesContent":["import { CredoError } from '../../../error'\n\nexport type W3cJsonLdCredentialSigningNotSupportedReason =\n | 'no-compatible-verification-method'\n | 'unsupported-key-type'\n | 'unsupported-proof-type'\n | 'unsupported-verification-method-type'\n | 'verification-method-not-controlled'\n | 'verification-method-not-found'\n\nexport class W3cJsonLdCredentialSigningNotSupportedError extends CredoError {\n public constructor(\n message: string,\n public readonly reason: W3cJsonLdCredentialSigningNotSupportedReason,\n cause?: Error\n ) {\n super(message, { cause })\n }\n}\n"],"mappings":";;;AAUA,IAAa,8CAAb,cAAiE,WAAW;CAC1E,YACE,SACA,QACA,OACA;EACA,MAAM,SAAS,EAAE,MAAM,CAAC;EAHR,KAAA,SAAA;CAIlB;AACF"}
|
|
@@ -14,4 +14,5 @@ import { Ed25519Signature2018 } from "./signature-suites/Ed25519Signature2018.mj
|
|
|
14
14
|
import { Ed25519Signature2020 } from "./signature-suites/Ed25519Signature2020.mjs";
|
|
15
15
|
import "./signature-suites/index.mjs";
|
|
16
16
|
import { W3cJsonLdCredentialService } from "./W3cJsonLdCredentialService.mjs";
|
|
17
|
-
|
|
17
|
+
import { W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdCredentialSigningNotSupportedReason } from "./W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
18
|
+
export { CredentialIssuancePurpose, type DocumentLoader, Ed25519Signature2018, Ed25519Signature2020, JwsLinkedDataSignature, JwsLinkedDataSignatureOptions, LdKeyPair, LdKeyPairOptions, LinkedDataProof, LinkedDataProofOptions, type Proof, ProofPurpose, Purposes, SignatureSuiteRegistry, SignatureSuiteToken, SuiteInfo, Suites, W3cJsonLdCredentialService, W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdCredentialSigningNotSupportedReason, W3cJsonLdDeriveProofOptions, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiableCredentialOptions, W3cJsonLdVerifiablePresentation, W3cJsonLdVerifiablePresentationOptions, constants, deriveProof, purposes, suites };
|
|
@@ -11,5 +11,6 @@ import { JwsLinkedDataSignature } from "./signature-suites/JwsLinkedDataSignatur
|
|
|
11
11
|
import { Ed25519Signature2018 } from "./signature-suites/Ed25519Signature2018.mjs";
|
|
12
12
|
import { Ed25519Signature2020 } from "./signature-suites/Ed25519Signature2020.mjs";
|
|
13
13
|
import "./signature-suites/index.mjs";
|
|
14
|
+
import { W3cJsonLdCredentialSigningNotSupportedError } from "./W3cJsonLdCredentialSigningNotSupportedError.mjs";
|
|
14
15
|
import { W3cJsonLdCredentialService } from "./W3cJsonLdCredentialService.mjs";
|
|
15
|
-
export { CredentialIssuancePurpose, Ed25519Signature2018, Ed25519Signature2020, JwsLinkedDataSignature, LdKeyPair, LinkedDataProof, SignatureSuiteRegistry, SignatureSuiteToken, W3cJsonLdCredentialService, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation, constants, deriveProof, purposes, suites };
|
|
16
|
+
export { CredentialIssuancePurpose, Ed25519Signature2018, Ed25519Signature2020, JwsLinkedDataSignature, LdKeyPair, LinkedDataProof, SignatureSuiteRegistry, SignatureSuiteToken, W3cJsonLdCredentialService, W3cJsonLdCredentialSigningNotSupportedError, W3cJsonLdVerifiableCredential, W3cJsonLdVerifiablePresentation, constants, deriveProof, purposes, suites };
|