@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
55 lines • 3.76 kB
text/typescript
import { Query, QueryOptions } from "../../storage/StorageService.mjs";
import { MdocRecord } from "./repository/MdocRecord.mjs";
import { MdocRepository } from "./repository/MdocRepository.mjs";
import { MdocVerificationSessionRecord } from "./repository/MdocVerificationSessionRecord.mjs";
import { MdocVerificationSessionRepository } from "./repository/MdocVerificationSessionRepository.mjs";
import "./repository/index.mjs";
import { MdocDeleteVerificationSessionOptions, MdocDeviceResponseDcqlQueryOptions, MdocDeviceResponseOptions, MdocDeviceResponsePresentationDefinitionOptions, MdocDeviceResponseVerifyOptions, MdocSignOptions, MdocStoreOptions, MdocVerifyOptions } from "./MdocOptions.mjs";
import { MdocDeviceResponse } from "./MdocDeviceResponse.mjs";
import { Mdoc } from "./Mdoc.mjs";
import { AgentContext } from "../../agent/context/AgentContext.mjs";
import "../../agent/index.mjs";
//#region src/modules/mdoc/MdocService.d.ts
/**
* @internal
*/
export declare class MdocService {
private mdocRepository;
private mdocVerificationSessionRepository;
constructor(mdocRepository: MdocRepository, mdocVerificationSessionRepository: MdocVerificationSessionRepository);
mdocFromBase64Url(hexEncodedMdoc: string): Mdoc;
signMdoc(agentContext: AgentContext, options: MdocSignOptions): Promise<Mdoc>;
verifyMdoc(agentContext: AgentContext, mdoc: Mdoc, options: MdocVerifyOptions): Promise<{
isValid: true;
} | {
isValid: false;
error: string;
}>;
createDeviceResponse(agentContext: AgentContext, options: MdocDeviceResponseOptions): Promise<MdocDeviceResponse>;
createPresentationDefinitionDeviceResponse(agentContext: AgentContext, options: MdocDeviceResponsePresentationDefinitionOptions): Promise<MdocDeviceResponse>;
/**
* @deprecated Credo does not use this method itself, and it only supports part of DCQL. Every claim
* of every `mso_mdoc` credential query is requested: `credential_sets`, `claim_sets` and `values`
* are ignored, credential queries with the same doctype are merged, nested claim paths are
* truncated, and a claim missing from the mdoc throws instead of being treated as optional. Use
* `DcqlService.createPresentation` to present mdocs for a DCQL query, or
* {@link MdocService.createDeviceResponse} with explicit `documentRequests`.
*/
createDcqlQueryDeviceResponse(agentContext: AgentContext, options: MdocDeviceResponseDcqlQueryOptions): Promise<MdocDeviceResponse>;
verifyDeviceResponse(agentContext: AgentContext, options: MdocDeviceResponseVerifyOptions): Promise<void>;
store(agentContext: AgentContext, options: MdocStoreOptions): Promise<MdocRecord>;
getById(agentContext: AgentContext, id: string): Promise<MdocRecord>;
getAll(agentContext: AgentContext): Promise<Array<MdocRecord>>;
findByQuery(agentContext: AgentContext, query: Query<MdocRecord>, queryOptions?: QueryOptions): Promise<Array<MdocRecord>>;
deleteById(agentContext: AgentContext, id: string): Promise<void>;
update(agentContext: AgentContext, mdocRecord: MdocRecord): Promise<void>;
getVerificationSessionById(agentContext: AgentContext, verificationSessionId: string): Promise<MdocVerificationSessionRecord>;
findVerificationSessionsByQuery(agentContext: AgentContext, query: Query<MdocVerificationSessionRecord>, queryOptions?: QueryOptions): Promise<Array<MdocVerificationSessionRecord>>;
/**
* Delete a verification session, and by default the ephemeral session key it holds. The key is
* not deleted at any other point in the session lifecycle.
*/
deleteVerificationSessionById(agentContext: AgentContext, verificationSessionId: string, options?: MdocDeleteVerificationSessionOptions): Promise<void>;
}
//#endregion
//# sourceMappingURL=MdocService.d.mts.map