import { StorageService } from "../../../storage/StorageService.js";
import { DidDocument } from "../domain/DidDocument.js";
import { DidDocumentKey } from "../DidsApiOptions.js";
import { CustomDidTags, DidRecord } from "./DidRecord.js";
import { EventEmitter } from "../../../agent/EventEmitter.js";
import { Repository } from "../../../storage/Repository.js";
import { AgentContext } from "../../../agent/context/AgentContext.js";
import { PublicJwk } from "../../kms/jwk/PublicJwk.js";

//#region src/modules/dids/repository/DidRepository.d.ts
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
export { DidRepository };
//# sourceMappingURL=DidRepository.d.ts.map