import { Query, QueryOptions } from "../../storage/StorageService.js";
import { ClaimFormat } from "../vc/models/ClaimFormat.js";
import { SdJwtVcHeader, SdJwtVcPayload, SdJwtVcPresentOptions, SdJwtVcSignOptions, SdJwtVcVerifyOptions } from "./SdJwtVcOptions.js";
import { SdJwtVc, SdJwtVcService } from "./SdJwtVcService.js";
import { SdJwtVcRecord } from "./repository/SdJwtVcRecord.js";
import { AgentContext } from "../../agent/context/AgentContext.js";

//#region src/modules/sd-jwt-vc/SdJwtVcApi.d.ts
/**
 * @public
 */
declare class SdJwtVcApi {
  private agentContext;
  private sdJwtVcService;
  constructor(agentContext: AgentContext, sdJwtVcService: SdJwtVcService);
  sign<Payload extends SdJwtVcPayload>(options: SdJwtVcSignOptions<Payload>): Promise<{
    compact: string;
    prettyClaims: Payload;
    header: {
      readonly alg: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | "ES256K";
      readonly typ: "vc+sd-jwt" | "dc+sd-jwt";
      readonly kid: string | undefined;
      readonly x5c: string[] | undefined;
    };
    payload: Payload;
    claimFormat: ClaimFormat.SdJwtDc;
    encoded: string;
  }>;
  /**
   *
   * Create a compact presentation of the sd-jwt.
   * This presentation can be send in- or out-of-band to the verifier.
   *
   * Also, whether to include the holder key binding.
   */
  present<Payload extends SdJwtVcPayload = SdJwtVcPayload>(options: SdJwtVcPresentOptions<Payload>): Promise<string>;
  /**
   *
   * Verify an incoming sd-jwt. It will check whether everything is valid, but also returns parts of the validation.
   *
   * For example, you might still want to continue with a flow if not all the claims are included, but the signature is valid.
   *
   */
  verify<Header extends SdJwtVcHeader, Payload extends SdJwtVcPayload>(options: SdJwtVcVerifyOptions): Promise<{
    isValid: true;
    sdJwtVc: SdJwtVc<Header, Payload>;
  } | {
    isValid: false;
    sdJwtVc?: SdJwtVc<Header, Payload> | undefined;
    error: Error;
  }>;
  /**
   * Get and validate a sd-jwt-vc from a serialized JWT.
   */
  fromCompact<Header extends SdJwtVcHeader, Payload extends SdJwtVcPayload>(sdJwtVcCompact: string): SdJwtVc<Header, Payload>;
  store(compactSdJwtVc: string): Promise<SdJwtVcRecord>;
  getById(id: string): Promise<SdJwtVcRecord>;
  getAll(): Promise<Array<SdJwtVcRecord>>;
  findAllByQuery(query: Query<SdJwtVcRecord>, queryOptions?: QueryOptions): Promise<Array<SdJwtVcRecord>>;
  deleteById(id: string): Promise<void>;
  update(sdJwtVcRecord: SdJwtVcRecord): Promise<void>;
}
//#endregion
export { SdJwtVcApi };
//# sourceMappingURL=SdJwtVcApi.d.ts.map