import { KnownJwaSignatureAlgorithm } from "../modules/kms/jwk/jwa.js";
import { Jwk } from "../modules/kms/jwk/jwk.js";
import { PublicJwk } from "../modules/kms/jwk/PublicJwk.js";

//#region src/crypto/JwsTypes.d.ts
type Kid = string;
interface JwsProtectedHeaderOptions {
  alg: KnownJwaSignatureAlgorithm;
  kid?: Kid;
  jwk?: PublicJwk | Jwk;
  x5c?: string[];
  [key: string]: unknown;
}
interface JwsGeneralFormat {
  /**
   * unprotected header
   */
  header: Record<string, unknown>;
  /**
   * Base64url encoded signature
   */
  signature: string;
  /**
   * Base64url encoded protected header
   */
  protected: string;
  /**
   * Base64url encoded payload
   */
  payload: string;
}
interface JwsFlattenedFormat {
  /**
   * Base64url encoded payload
   */
  payload: string;
  /**
   * List of JWS signatures over the payload
   *
   * The items in this array do not contain the payload.
   */
  signatures: JwsDetachedFormat[];
}
/**
 * JWS Compact Serialization
 *
 * @see https://tools.ietf.org/html/rfc7515#section-7.1
 */
type JwsCompactFormat = string;
type Jws = JwsGeneralFormat | JwsFlattenedFormat | JwsCompactFormat;
type JwsDetachedFormat = Omit<JwsGeneralFormat, 'payload'>;
interface JwsFlattenedDetachedFormat {
  signatures: JwsDetachedFormat[];
}
//#endregion
export { Jws, JwsDetachedFormat, JwsFlattenedDetachedFormat, JwsFlattenedFormat, JwsGeneralFormat, JwsProtectedHeaderOptions };
//# sourceMappingURL=JwsTypes.d.ts.map