UNPKG

@credo-ts/core

Version:

<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1

60 lines • 3.15 kB
import { JsonLdModuleConfig } from "../jsonld/JsonLdModuleConfig.mjs"; import { W3cJsonLdVerifiableCredential } from "./models/W3cJsonLdVerifiableCredential.mjs"; import { W3cJsonLdVerifiablePresentation } from "./models/W3cJsonLdVerifiablePresentation.mjs"; import { W3cVerifyCredentialResult, W3cVerifyPresentationResult } from "../models/W3cVerifyResult.mjs"; import "../models/index.mjs"; import { SignatureSuiteRegistry } from "./SignatureSuiteRegistry.mjs"; import "../jsonld/index.mjs"; import { W3cJsonLdSignCredentialOptions, W3cJsonLdSignPresentationOptions, W3cJsonLdVerifyCredentialOptions, W3cJsonLdVerifyPresentationOptions } from "../W3cCredentialServiceOptions.mjs"; import { AgentContext } from "../../../agent/context/AgentContext.mjs"; import "../../../agent/context/index.mjs"; //#region src/modules/vc/linked-data-proofs/W3cJsonLdCredentialService.d.ts /** * Supports signing and verification of credentials according to the [Verifiable Credential Data Model](https://www.w3.org/TR/vc-data-model) * using [Linked Data Proofs](https://www.w3.org/TR/vc-data-model/#proofs). */ export declare class W3cJsonLdCredentialService { private signatureSuiteRegistry; private jsonLdModuleConfig; constructor(signatureSuiteRegistry: SignatureSuiteRegistry, jsonLdModuleConfig: JsonLdModuleConfig); /** * Signs a credential */ signCredential(agentContext: AgentContext, options: W3cJsonLdSignCredentialOptions): Promise<W3cJsonLdVerifiableCredential>; /** * Validate that the agent can prepare to sign a credential with the given proof type and verification method. */ assertCanSignCredential(agentContext: AgentContext, options: Pick<W3cJsonLdSignCredentialOptions, 'proofType' | 'verificationMethod'> & { controller?: string; }): Promise<void>; /** * Verifies the signature(s) of a credential * * @param credential the credential to be verified * @returns the verification result */ verifyCredential(agentContext: AgentContext, options: W3cJsonLdVerifyCredentialOptions): Promise<W3cVerifyCredentialResult>; /** * Signs a presentation including the credentials it includes * * @param presentation the presentation to be signed * @returns the signed presentation */ signPresentation(agentContext: AgentContext, options: W3cJsonLdSignPresentationOptions): Promise<W3cJsonLdVerifiablePresentation>; /** * Verifies a presentation including the credentials it includes * * @param presentation the presentation to be verified * @returns the verification result */ verifyPresentation(agentContext: AgentContext, options: W3cJsonLdVerifyPresentationOptions): Promise<W3cVerifyPresentationResult>; getVerificationMethodTypesByProofType(proofType: string): string[]; getExpandedTypesForCredential(agentContext: AgentContext, credential: W3cJsonLdVerifiableCredential): Promise<string[]>; private ensureCredentialIssuerTrusted; private getSigningSuiteInfo; private prepareSigningSuite; private getSignatureSuitesForCredential; private assertNoAnonCredsW3cCredentialProof; } //#endregion //# sourceMappingURL=W3cJsonLdCredentialService.d.mts.map