@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
45 lines • 2.45 kB
text/typescript
import { StorageService } from "../../../storage/StorageService.mjs";
import { EventEmitter } from "../../../agent/EventEmitter.mjs";
import { Repository } from "../../../storage/Repository.mjs";
import { PublicJwk } from "../../kms/jwk/PublicJwk.mjs";
import "../../kms/index.mjs";
import { DidDocument } from "../domain/DidDocument.mjs";
import { DidDocumentKey } from "../DidsApiOptions.mjs";
import "../domain/index.mjs";
import { CustomDidTags, DidRecord } from "./DidRecord.mjs";
import { AgentContext } from "../../../agent/context/AgentContext.mjs";
import "../../../agent/index.mjs";
//#region src/modules/dids/repository/DidRepository.d.ts
export declare class DidRepository extends Repository<DidRecord> {
constructor(storageService: StorageService<DidRecord>, eventEmitter: EventEmitter);
/**
* Finds a {@link DidRecord}, containing the specified recipientKey that was received by this agent.
* To find a {@link DidRecord} that was created by this agent, use {@link DidRepository.findCreatedDidByRecipientKey}.
*/
findReceivedDidByRecipientKey(agentContext: AgentContext, recipientKey: PublicJwk): Promise<DidRecord | null>;
/**
* Finds a {@link DidRecord}, containing the specified recipientKey that was created by this agent.
* To find a {@link DidRecord} that was received by this agent, use {@link DidRepository.findReceivedDidByRecipientKey}.
*/
findCreatedDidByRecipientKey(agentContext: AgentContext, recipientKey: PublicJwk): Promise<DidRecord | null>;
findAllByRecipientKey(agentContext: AgentContext, recipientKey: PublicJwk): Promise<DidRecord[]>;
findAllByDid(agentContext: AgentContext, did: string): Promise<DidRecord[]>;
findReceivedDid(agentContext: AgentContext, receivedDid: string): Promise<DidRecord | null>;
findCreatedDid(agentContext: AgentContext, createdDid: string): Promise<DidRecord | null>;
getCreatedDids(agentContext: AgentContext, { method, did }: {
method?: string;
did?: string;
}): Promise<DidRecord[]>;
storeCreatedDid(agentContext: AgentContext, { did, didDocument, tags, keys }: StoreDidOptions & {
keys?: DidDocumentKey[];
}): Promise<DidRecord>;
storeReceivedDid(agentContext: AgentContext, { did, didDocument, tags }: StoreDidOptions): Promise<DidRecord>;
}
interface StoreDidOptions {
did: string;
didDocument?: DidDocument;
tags?: CustomDidTags;
keys?: DidDocumentKey[];
}
//#endregion
//# sourceMappingURL=DidRepository.d.mts.map