@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
52 lines (48 loc) • 2.26 kB
JavaScript
import { AgentContext } from "../../agent/context/AgentContext.mjs";
import { injectable } from "../../plugins/index.mjs";
import { __decorateMetadata } from "../../_virtual/_@oxc-project_runtime@0.112.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../_virtual/_@oxc-project_runtime@0.112.0/helpers/decorate.mjs";
import "../../agent/index.mjs";
import { W3cCredentialService } from "./W3cCredentialService.mjs";
//#region src/modules/vc/W3cCredentialsApi.ts
var _ref, _ref2;
let W3cCredentialsApi = class W3cCredentialsApi {
constructor(agentContext, w3cCredentialService) {
this.agentContext = agentContext;
this.w3cCredentialService = w3cCredentialService;
}
async store(options) {
return this.w3cCredentialService.storeCredential(this.agentContext, options);
}
async deleteById(id) {
return this.w3cCredentialService.removeCredentialRecord(this.agentContext, id);
}
async getAll() {
return this.w3cCredentialService.getAllCredentialRecords(this.agentContext);
}
async getById(id) {
return this.w3cCredentialService.getCredentialRecordById(this.agentContext, id);
}
async findAllByQuery(query, queryOptions) {
return this.w3cCredentialService.findCredentialsByQuery(this.agentContext, query, queryOptions);
}
async signCredential(options) {
return this.w3cCredentialService.signCredential(this.agentContext, options);
}
async verifyCredential(options) {
return this.w3cCredentialService.verifyCredential(this.agentContext, options);
}
async createPresentation(options) {
return this.w3cCredentialService.createPresentation(options);
}
async signPresentation(options) {
return this.w3cCredentialService.signPresentation(this.agentContext, options);
}
async verifyPresentation(options) {
return this.w3cCredentialService.verifyPresentation(this.agentContext, options);
}
};
W3cCredentialsApi = __decorate([injectable(), __decorateMetadata("design:paramtypes", [typeof (_ref = typeof AgentContext !== "undefined" && AgentContext) === "function" ? _ref : Object, typeof (_ref2 = typeof W3cCredentialService !== "undefined" && W3cCredentialService) === "function" ? _ref2 : Object])], W3cCredentialsApi);
//#endregion
export { W3cCredentialsApi };
//# sourceMappingURL=W3cCredentialsApi.mjs.map