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

50 lines • 2.32 kB
import { W3cV2JwtVerifiableCredential } from "./W3cV2JwtVerifiableCredential.mjs"; import { W3cV2JwtVerifiablePresentation } from "./W3cV2JwtVerifiablePresentation.mjs"; import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "../models/W3cV2VerifyResult.mjs"; import "../models/index.mjs"; import { W3cV2JwtSignCredentialOptions, W3cV2JwtSignPresentationOptions, W3cV2JwtVerifyCredentialOptions, W3cV2JwtVerifyPresentationOptions } from "../W3cV2CredentialServiceOptions.mjs"; import { JwsService } from "../../../crypto/JwsService.mjs"; import "../../../crypto/index.mjs"; import { AgentContext } from "../../../agent/context/AgentContext.mjs"; import "../../../agent/context/index.mjs"; //#region src/modules/vc/jwt-vc/W3cV2JwtCredentialService.d.ts /** * Supports signing and verifying W3C Verifiable Credentials and Presentations * secured with JSON Web Tokens (JWT). * * @see https://www.w3.org/TR/vc-data-model/ * @see https://www.w3.org/TR/vc-jose-cose/#with-jose */ export declare class W3cV2JwtCredentialService { private jwsService; constructor(jwsService: JwsService); /** * Signs a credential */ signCredential(agentContext: AgentContext, options: W3cV2JwtSignCredentialOptions): Promise<W3cV2JwtVerifiableCredential>; /** * Verifies the signature(s) of a credential * * @param credential the credential to be verified * @returns the verification result */ verifyCredential(agentContext: AgentContext, options: W3cV2JwtVerifyCredentialOptions): Promise<W3cV2VerifyCredentialResult>; /** * Signs a presentation including the credentials it includes * * @param presentation the presentation to be signed * @returns the signed presentation */ signPresentation(agentContext: AgentContext, options: W3cV2JwtSignPresentationOptions): Promise<W3cV2JwtVerifiablePresentation>; /** * Verifies a presentation including the credentials it includes * * @param presentation the presentation to be verified * @returns the verification result */ verifyPresentation(agentContext: AgentContext, options: W3cV2JwtVerifyPresentationOptions): Promise<W3cV2VerifyPresentationResult>; private logCredentialShouldWarnings; private logPresentationShouldWarnings; } //#endregion //# sourceMappingURL=W3cV2JwtCredentialService.d.mts.map