import { BaseRecord, TagsBase } from "../../../storage/BaseRecord.js";
import { KnownJwaSignatureAlgorithm } from "../../kms/jwk/jwa.js";
import { NonEmptyArray } from "../../../types.js";
import { CredentialMultiInstanceState } from "../../../utils/credentialUseTypes.js";
import { SdJwtVcTypeMetadata } from "../typeMetadata.js";
import { SdJwtVc } from "../SdJwtVcService.js";

//#region src/modules/sd-jwt-vc/repository/SdJwtVcRecord.d.ts
type DefaultSdJwtVcRecordTags = {
  vct: string;
  /**
   * The sdAlg is the alg used for creating digests for selective disclosures
   */
  sdAlg: string;
  /**
   * The alg is the alg used to sign the SD-JWT
   */
  alg: KnownJwaSignatureAlgorithm;
  /**
   * @since 0.6 - tag was not defined before 0.6
   */
  multiInstanceState?: CredentialMultiInstanceState;
};
type SdJwtVcRecordStorageProps = {
  id?: string;
  createdAt?: Date;
  tags?: TagsBase;
  /**
   * The SD-JWT VC 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: SdJwtVcRecordInstances;
  /**
   * Optional VCT type metadata associated with the SD JWT VC instances, this type metadata is used for
   * all SD JWT VC instances on this record.
   */
  typeMetadata?: SdJwtVcTypeMetadata;
};
type SdJwtVcRecordInstances = NonEmptyArray<{
  compactSdJwtVc: string;
  /**
   * The kms key id to which the credential is bound. If not defined it either:
   * - uses a legacy key id (which can be calculated based on the key)
   * - is bound to a did (which stores the kms key id on the did record)
   */
  kmsKeyId?: string;
}>;
declare class SdJwtVcRecord extends BaseRecord<DefaultSdJwtVcRecordTags> {
  static readonly type = "SdJwtVcRecord";
  readonly type = "SdJwtVcRecord";
  credentialInstances: SdJwtVcRecordInstances;
  /**
   * 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 compactSdJwtVc is set we transform
   * it to the new sdJwtVcs array format
   */
  private set compactSdJwtVc(value);
  typeMetadata?: SdJwtVcTypeMetadata;
  constructor(props: SdJwtVcRecordStorageProps);
  get firstCredential(): SdJwtVc;
  static fromSdJwtVc(sdJwtVc: SdJwtVc): SdJwtVcRecord;
  getTags(): {
    vct: string;
    sdAlg: 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 { DefaultSdJwtVcRecordTags, SdJwtVcRecord, SdJwtVcRecordInstances, SdJwtVcRecordStorageProps };
//# sourceMappingURL=SdJwtVcRecord.d.ts.map