import { VerificationMethod } from "./domain/verificationMethod/VerificationMethod.js";
import { DidDocument, DidPurpose } from "./domain/DidDocument.js";
import { DidDocumentKey, ImportDidOptions } from "./DidsApiOptions.js";
import { DidCreateOptions, DidCreateResult, DidDeactivateOptions, DidDeactivateResult, DidResolutionOptions, DidResolutionResult, DidUpdateOptions, DidUpdateResult } from "./types.js";
import { DidsModuleConfig } from "./DidsModuleConfig.js";
import { DidRecord } from "./repository/DidRecord.js";
import { DidRepository } from "./repository/DidRepository.js";
import { DidResolverService } from "./services/DidResolverService.js";
import { DidRegistrarService } from "./services/DidRegistrarService.js";
import { AgentContext } from "../../agent/context/AgentContext.js";
import { PublicJwk, SupportedPublicJwk } from "../kms/jwk/PublicJwk.js";
import { KeyManagementApi } from "../kms/KeyManagementApi.js";

//#region src/modules/dids/DidsApi.d.ts
declare class DidsApi {
  config: DidsModuleConfig;
  private didResolverService;
  private didRegistrarService;
  private didRepository;
  private agentContext;
  constructor(didResolverService: DidResolverService, didRegistrarService: DidRegistrarService, didRepository: DidRepository, agentContext: AgentContext, config: DidsModuleConfig, _keyManagement: KeyManagementApi);
  /**
   * Resolve a did to a did document.
   *
   * Follows the interface as defined in https://w3c-ccg.github.io/did-resolution/
   */
  resolve(didUrl: string, options?: DidResolutionOptions): Promise<DidResolutionResult>;
  /**
   * Create, register and store a did and did document.
   *
   * Follows the interface as defined in https://identity.foundation/did-registration
   */
  create<CreateOptions extends DidCreateOptions = DidCreateOptions>(options: CreateOptions): Promise<DidCreateResult>;
  /**
   * Update an existing did document.
   *
   * Follows the interface as defined in https://identity.foundation/did-registration
   */
  update<UpdateOptions extends DidUpdateOptions = DidUpdateOptions>(options: UpdateOptions): Promise<DidUpdateResult>;
  /**
   * Deactivate an existing did.
   *
   * Follows the interface as defined in https://identity.foundation/did-registration
   */
  deactivate<DeactivateOptions extends DidDeactivateOptions = DidDeactivateOptions>(options: DeactivateOptions): Promise<DidDeactivateResult>;
  /**
   * Resolve a did to a did document. This won't return the associated metadata as defined
   * in the did resolution specification, and will throw an error if the did document could not
   * be resolved.
   */
  resolveDidDocument(didUrl: string): Promise<DidDocument>;
  /**
   * Get a list of all dids created by the agent. This will return a list of {@link DidRecord} objects.
   * Each document will have an id property with the value of the did. Optionally, it will contain a did document,
   * but this is only for documents that can't be resolved from the did itself or remotely.
   *
   * You can call `${@link DidsModule.resolve} to resolve the did document based on the did itself.
   */
  getCreatedDids({
    method,
    did
  }?: {
    method?: string;
    did?: string;
  }): Promise<DidRecord[]>;
  /**
   * Import an existing did that was created outside of the DidsApi. This will create a `DidRecord` for the did
   * and will allow the did to be used in other parts of the agent. If you need to create a new did document,
   * you can use the {@link DidsApi.create} method to create and register the did.
   *
   * If no `didDocument` is provided, the did document will be resolved using the did resolver. You can optionally provide a list
   * of private key buffer with the respective private key bytes. These keys will be stored in the wallet, and allows you to use the
   * did for other operations. Providing keys that already exist in the wallet is allowed, and those keys will be skipped from being
   * added to the wallet.
   *
   * By default, this method will throw an error if the did already exists in the wallet. You can override this behavior by setting
   * the `overwrite` option to `true`. This will update the did document in the record, and allows you to update the did over time.
   */
  import({
    did,
    didDocument,
    keys,
    overwrite
  }: ImportDidOptions): Promise<void>;
  resolveCreatedDidDocumentWithKeys(did: string): Promise<{
    keys: DidDocumentKey[] | undefined;
    didDocument: DidDocument;
  }>;
  resolveVerificationMethodFromCreatedDidRecord(didUrl: string, allowedPurposes?: Array<DidPurpose | 'verificationMethod'>): Promise<{
    verificationMethod: VerificationMethod;
    publicJwk: PublicJwk<SupportedPublicJwk>;
  }>;
  get supportedResolverMethods(): string[];
  get supportedRegistrarMethods(): string[];
}
//#endregion
export { DidsApi };
//# sourceMappingURL=DidsApi.d.ts.map