@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
63 lines (62 loc) • 3.72 kB
text/typescript
import { Query, QueryOptions } from "../../storage/StorageService.mjs";
import { ClaimFormat } from "./models/ClaimFormat.mjs";
import { W3cV2CredentialRecord } from "./repository/W3cV2CredentialRecord.mjs";
import { W3cV2CredentialRepository } from "./repository/W3cV2CredentialRepository.mjs";
import "./repository/index.mjs";
import { W3cV2SignCredentialOptions, W3cV2SignPresentationOptions, W3cV2StoreCredentialOptions, W3cV2VerifyCredentialOptions, W3cV2VerifyPresentationOptions } from "./W3cV2CredentialServiceOptions.mjs";
import { W3cV2SdJwtCredentialService } from "./sd-jwt-vc/W3cV2SdJwtCredentialService.mjs";
import "./sd-jwt-vc/index.mjs";
import { W3cV2VerifiableCredential } from "./models/credential/W3cV2VerifiableCredential.mjs";
import { W3cV2VerifyCredentialResult, W3cV2VerifyPresentationResult } from "./models/W3cV2VerifyResult.mjs";
import "./models/index.mjs";
import { W3cV2JwtCredentialService } from "./jwt-vc/W3cV2JwtCredentialService.mjs";
import { W3cV2VerifiablePresentation } from "./models/presentation/W3cV2VerifiablePresentation.mjs";
import { AgentContext } from "../../agent/context/AgentContext.mjs";
import "../../agent/context/index.mjs";
//#region src/modules/vc/W3cV2CredentialService.d.ts
declare class W3cV2CredentialService {
private w3cV2CredentialRepository;
private w3cV2SdJwtCredentialService;
private w3cV2JwtCredentialService;
constructor(w3cV2CredentialRepository: W3cV2CredentialRepository, w3cV2SdJwtCredentialService: W3cV2SdJwtCredentialService, w3cV2JwtCredentialService: W3cV2JwtCredentialService);
/**
* Signs a credential
*
* @param credential the credential to be signed
* @returns the signed credential
*/
signCredential<Format extends ClaimFormat.JwtW3cVc | ClaimFormat.SdJwtW3cVc>(agentContext: AgentContext, options: W3cV2SignCredentialOptions<Format>): Promise<W3cV2VerifiableCredential<Format>>;
/**
* Verifies the signature(s) of a credential
*/
verifyCredential(agentContext: AgentContext, options: W3cV2VerifyCredentialOptions): Promise<W3cV2VerifyCredentialResult>;
/**
* Signs a presentation including the credentials it includes
*
* @param presentation the presentation to be signed
* @returns the signed presentation
*/
signPresentation<Format extends ClaimFormat.JwtW3cVp | ClaimFormat.SdJwtW3cVp>(agentContext: AgentContext, options: W3cV2SignPresentationOptions<Format>): Promise<W3cV2VerifiablePresentation<Format>>;
/**
* Verifies a presentation including the credentials it includes
*
* @param presentation the presentation to be verified
* @returns the verification result
*/
verifyPresentation(agentContext: AgentContext, options: W3cV2VerifyPresentationOptions): Promise<W3cV2VerifyPresentationResult>;
/**
* Writes a credential to storage
*
* @param record the credential to be stored
* @returns the credential record that was written to storage
*/
storeCredential(agentContext: AgentContext, options: W3cV2StoreCredentialOptions): Promise<W3cV2CredentialRecord>;
removeCredentialRecord(agentContext: AgentContext, id: string): Promise<void>;
getAllCredentialRecords(agentContext: AgentContext): Promise<W3cV2CredentialRecord[]>;
getCredentialRecordById(agentContext: AgentContext, id: string): Promise<W3cV2CredentialRecord>;
findCredentialsByQuery(agentContext: AgentContext, query: Query<W3cV2CredentialRecord>, queryOptions?: QueryOptions): Promise<W3cV2VerifiableCredential[]>;
findCredentialRecordByQuery(agentContext: AgentContext, query: Query<W3cV2CredentialRecord>): Promise<W3cV2VerifiableCredential | undefined>;
}
//#endregion
export { W3cV2CredentialService };
//# sourceMappingURL=W3cV2CredentialService.d.mts.map