import { BaseRecord, TagsBase } from "../../../storage/BaseRecord.mjs";
import { KnownJwaSignatureAlgorithm } from "../../kms/jwk/jwa.mjs";
import { NonEmptyArray } from "../../../types.mjs";
import { CredentialMultiInstanceState } from "../../../utils/credentialUseTypes.mjs";
import { Mdoc } from "../Mdoc.mjs";
import "../../kms/index.mjs";

//#region src/modules/mdoc/repository/MdocRecord.d.ts
type DefaultMdocRecordTags = {
  docType: string;
  /**
   *
   * The Jwa Signature Algorithm used to sign the Mdoc.
   */
  alg: KnownJwaSignatureAlgorithm;
  /**
   * @since 0.6 - tag was not defined before 0.6
   */
  multiInstanceState?: CredentialMultiInstanceState;
};
type MdocRecordStorageProps = {
  id?: string;
  createdAt?: Date;
  tags?: TagsBase;
  /**
   * The mDOC instances to store on the record.
   *
   * NOTE that all instances should contain roughly the same data (e.g. exp can differ slighty), as they should be usable
   * interchangeably for presentations (allowing single-use credentials and batch issuance).
   */
  credentialInstances: MdocRecordInstances;
};
type MdocRecordInstances = NonEmptyArray<{
  issuerSignedBase64Url: string;
  /**
   * The kms key id to which the credential is bound. If not defined the
   * credential is bound to a legacy key id (which can be calculated based on the key)
   */
  kmsKeyId?: string;
}>;
declare class MdocRecord extends BaseRecord<DefaultMdocRecordTags> {
  static readonly type = "MdocRecord";
  readonly type = "MdocRecord";
  credentialInstances: MdocRecordInstances;
  /**
   * Tracks the state of credential instances on this record.
   *
   * NOTE: This defaults to `CredentialMultiInstanceState.SingleInstanceUsed` for records that
   * don't have a value set from before 0.6. We assume the credential has already been used.
   */
  multiInstanceState: CredentialMultiInstanceState;
  /**
   * Only here for class transformation. If base64Url is set we transform
   * it to the new mdocs array format
   */
  private set base64Url(value);
  constructor(props: MdocRecordStorageProps);
  get firstCredential(): Mdoc;
  static fromMdoc(mdoc: Mdoc): MdocRecord;
  getTags(): {
    docType: string;
    alg: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | "Ed25519" | "ES256K";
    multiInstanceState: CredentialMultiInstanceState;
  };
  clone(): this;
  /**
   * encoded is convenience method added to all credential records
   */
  get encoded(): string;
}
//#endregion
export { DefaultMdocRecordTags, MdocRecord, MdocRecordInstances, MdocRecordStorageProps };
//# sourceMappingURL=MdocRecord.d.mts.map