import { TKeyType, IKey, CredentialPayload, PresentationPayload, DIDDocument as DIDDocument$2, VerifiableCredential, VerifiablePresentation, IIdentifier } from '@veramo/core'; import { DIDDocument } from 'did-resolver/lib/resolver'; import { IVcdmIssuerAgentContext, IVcdmVerifierAgentContext, ContextDoc, IVcdmCredentialProvider, ICanIssueCredentialTypeArgs, ICanVerifyDocumentTypeArgs, ICreateVerifiableCredentialLDArgs, ICreateVerifiablePresentationLDArgs, IVerifyCredentialVcdmArgs, IVerifyPresentationLDArgs } from '@sphereon/ssi-sdk.credential-vcdm'; import { VerifiableCredentialSP, VerifiablePresentationSP } from '@sphereon/ssi-sdk.core'; import { DIDDocument as DIDDocument$1 } from 'did-resolver'; import { IIssueCredentialStatusOpts } from '@sphereon/ssi-sdk.vc-status-list'; import { IVerifyResult, W3CVerifiablePresentation } from '@sphereon/ssi-types'; import { RecordLike, OrPromise } from '@veramo/utils'; import { AbstractPrivateKeyStore } from '@veramo/key-manager'; declare abstract class SphereonLdSignature { abstract getSupportedVerificationType(): string | string[]; abstract getSupportedProofType(): string; abstract getSupportedKeyType(): TKeyType; abstract getSuiteForSigning(key: IKey, issuerDid: string, verificationMethodId: string, context: IVcdmIssuerAgentContext): any; abstract getContext(): string; abstract getSuiteForVerification(context: IVcdmVerifierAgentContext): any; abstract preDidResolutionModification(didUrl: string, didDoc: DIDDocument): void; abstract preSigningCredModification(credential: CredentialPayload): void; abstract preVerificationCredModification(credential: VerifiableCredentialSP): void; preSigningPresModification(presentation: PresentationPayload): void; } declare class SphereonEd25519Signature2018 extends SphereonLdSignature { constructor(); getSupportedVerificationType(): string; getSupportedProofType(): string; getSupportedKeyType(): TKeyType; getContext(): string; getSuiteForSigning(key: IKey, issuerDid: string, verificationMethodId: string, context: IVcdmIssuerAgentContext): any; preVerificationCredModification(credential: VerifiableCredentialSP): void; getSuiteForVerification(): any; preSigningCredModification(): void; preDidResolutionModification(didUrl: string, didDoc: DIDDocument$1): void; } declare class SphereonEd25519Signature2020 extends SphereonLdSignature { constructor(); getSupportedVerificationType(): string[]; getSupportedProofType(): string; getSupportedKeyType(): TKeyType; getContext(): string; getSuiteForSigning(key: IKey, issuerDid: string, verificationMethodId: string, context: IVcdmIssuerAgentContext): any; preVerificationCredModification(credential: VerifiableCredentialSP): void; getSuiteForVerification(): any; preSigningCredModification(): void; preDidResolutionModification(): void; } declare class SphereonEcdsaSecp256k1RecoverySignature2020 extends SphereonLdSignature { getSupportedVerificationType(): string; getSupportedProofType(): string; getSupportedKeyType(): TKeyType; getSuiteForSigning(key: IKey, did: string, verifiableMethodId: string, context: IVcdmIssuerAgentContext): any; getSuiteForVerification(): any; preVerificationCredModification(): void; preSigningCredModification(credential: CredentialPayload): void; preDidResolutionModification(didUrl: string, didDoc: DIDDocument$2): void; getContext(): string; } /** * The LdContextLoader is initialized with a List of Map> * that it unifies into a single Map to provide to the documentLoader within * the w3c credential module. */ declare class LdContextLoader { private readonly contexts; constructor(options: { contextsPaths: RecordLike>[]; }); has(url: string): boolean; get(url: string): Promise; } /** * Initializes a list of Veramo-wrapped LD Signature suites and exposes those to the Agent Module */ declare class LdSuiteLoader { constructor(options: { ldSignatureSuites: SphereonLdSignature[]; }); private signatureMap; getSignatureSuiteForKeyType(keyType: TKeyType, verificationType?: string): SphereonLdSignature[]; getAllSignatureSuites(): SphereonLdSignature[]; getAllSignatureSuiteTypes(): string[]; } declare const ProofPurpose$1: any; declare class LdCredentialModule { /** * TODO: General Implementation Notes * - (SOLVED) EcdsaSecp256k1Signature2019 (Signature) and EcdsaSecp256k1VerificationKey2019 (Key) * are not useable right now, since they are not able to work with blockChainId and ECRecover. * - DID Fragment Resolution. * - Key Manager and Verification Methods: Veramo currently implements no link between those. */ ldSuiteLoader: LdSuiteLoader; private ldDocumentLoader; constructor(options: { ldContextLoader: LdContextLoader; ldSuiteLoader: LdSuiteLoader; documentLoader?: { localResolution?: boolean; uniresolverResolution?: boolean; resolverResolution?: boolean; }; }); issueLDVerifiableCredential(args: { credential: CredentialPayload; issuerDid: string; key: IKey; verificationMethodId: string; purpose: typeof ProofPurpose$1; credentialStatusOpts?: IIssueCredentialStatusOpts; }, context: IVcdmIssuerAgentContext): Promise; signLDVerifiablePresentation(presentation: PresentationPayload, holderDid: string, key: IKey, verificationMethodId: string, challenge: string | undefined, domain: string | undefined, purpose: typeof ProofPurpose$1 | undefined, context: IVcdmIssuerAgentContext): Promise; verifyCredential(credential: VerifiableCredentialSP, context: IVcdmVerifierAgentContext, fetchRemoteContexts?: boolean, purpose?: typeof ProofPurpose$1, checkStatus?: Function): Promise; private getAllVerificationSuites; verifyPresentation(presentation: VerifiablePresentationSP | W3CVerifiablePresentation, challenge: string | undefined, domain: string | undefined, context: IVcdmVerifierAgentContext, fetchRemoteContexts?: boolean, presentationPurpose?: typeof ProofPurpose$1, checkStatus?: Function): Promise; } /** * Provides a hardcoded map of common context definitions */ declare const LdDefaultContexts: Map; /** * Initializes a list of Veramo-wrapped LD Signature suites and exposes those to the Agent Module */ declare class LdDocumentLoader { private readonly ldContextLoader; ldSuiteLoader: LdSuiteLoader; private readonly localResolution?; private readonly uniresolverResolution?; private readonly resolverResolution?; constructor(options: { ldContextLoader: LdContextLoader; ldSuiteLoader: LdSuiteLoader; documentLoader?: { localResolution?: boolean; uniresolverResolution?: boolean; resolverResolution?: boolean; }; }); getLoader(context: IVcdmVerifierAgentContext, { attemptToFetchContexts, verifiableData, }: { attemptToFetchContexts: boolean; verifiableData: VerifiableCredential | VerifiableCredentialSP | VerifiablePresentation | VerifiablePresentationSP | CredentialPayload | PresentationPayload; }): any; } /** * {@inheritDoc IVcLocalIssuerJsonLd} */ declare class CredentialProviderJsonld implements IVcdmCredentialProvider { private ldCredentialModule; private keyStore?; constructor(options: { contextMaps?: RecordLike>[]; suites?: SphereonLdSignature[]; keyStore?: AbstractPrivateKeyStore; documentLoader?: { localResolution?: boolean; uniresolverResolution?: boolean; resolverResolution?: boolean; }; }); /** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.matchKeyForType} */ matchKeyForType(key: IKey): boolean; /** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.getTypeProofFormat} */ getTypeProofFormat(): string; /** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.canIssueCredentialType} */ canIssueCredentialType(args: ICanIssueCredentialTypeArgs): boolean; /** {@inheritdoc @veramo/credential-w3c#AbstractCredentialProvider.canVerifyDocumentType */ canVerifyDocumentType(args: ICanVerifyDocumentTypeArgs): boolean; /** {@inheritDoc ICredentialIssuerLDLocal.createVerifiableCredential} */ createVerifiableCredential(args: ICreateVerifiableCredentialLDArgs, context: IVcdmIssuerAgentContext): Promise; getSigningKey(identifier: IIdentifier, keyRef?: string): Promise<{ managedKey: IKey | undefined; verificationMethod: string | undefined; }>; /** {@inheritdoc ICredentialIssuerLD.createVerifiablePresentationLD} */ createVerifiablePresentation(args: ICreateVerifiablePresentationLDArgs, context: IVcdmIssuerAgentContext): Promise; /** {@inheritdoc ICredentialHandlerLDLocal.verifyCredential} */ verifyCredential(args: IVerifyCredentialVcdmArgs, context: IVcdmVerifierAgentContext): Promise; /** {@inheritdoc ICredentialHandlerLDLocal.verifyPresentation} */ verifyPresentation(args: IVerifyPresentationLDArgs, context: IVcdmVerifierAgentContext): Promise; private findSigningKeyWithId; /** * Returns true if the key is supported by any of the installed LD Signature suites * @param k - the key to match * * @internal */ matchKeyForLDSuite(k: IKey): boolean; } declare const ProofPurpose: any; declare const ControllerProofPurpose: any; declare const AssertionProofPurpose: any; declare const AuthenticationProofPurpose: any; /** * Plugin method map interface * @public */ declare enum MethodNames { createVerifiableCredential = "createVerifiableCredential", createVerifiablePresentation = "createVerifiablePresentation", verifyCredential = "verifyCredential", verifyPresentation = "verifyPresentation" } type IBindingOverrides = Map; declare enum events { CREDENTIAL_ISSUED = "credentialIssued", CREDENTIAL_VERIFIED = "credentialVerified", PRESENTATION_VERIFIED = "presentationVerified", PRESENTATION_VERIFY_FAILED = "presentationVerificationFailed", CREDENTIAL_VERIFY_FAILED = "credentialVerificationFailed" } export { AssertionProofPurpose, AuthenticationProofPurpose, ControllerProofPurpose, CredentialProviderJsonld, type IBindingOverrides, LdContextLoader, LdCredentialModule, LdDefaultContexts, LdDocumentLoader, LdSuiteLoader, MethodNames, ProofPurpose, SphereonEcdsaSecp256k1RecoverySignature2020, SphereonEd25519Signature2018, SphereonEd25519Signature2020, SphereonLdSignature, events };