/**
 * WebAuthn `tpm` attestation statement verifier (W3C WebAuthn §8.3).
 *
 * The statement carries an Attestation Identity Key (AIK) chain, a
 * signature over the TPM `certInfo` quote, and a `pubArea` describing
 * the bound key:
 *
 * ```ts
 * {
 *   ver: "2.0";
 *   alg: number;          // COSE algorithm of the AIK signature
 *   x5c: string[];        // base64url DER chain, leaf-first
 *   sig: string;          // base64url signature over `certInfo`
 *   certInfo: string;     // base64url big-endian TPMS_ATTEST quote
 *   pubArea: string;      // base64url big-endian TPMT_PUBLIC of the bound key
 * }
 * ```
 *
 * Verification ordering, mirroring the Apple SE / WebAuthn-packed
 * verifiers and `docs/subsystems/aauth_attestation.md`:
 *
 *   1. Parse the statement into a typed shape; reject `ver !== "2.0"`
 *      as `unsupported_format`.
 *   2. Decode the AIK chain (leaf-first) and confirm the leaf
 *      certificate carries a usable public key.
 *   3. Decode `pubArea` as `TPMT_PUBLIC`, derive a node:crypto
 *      `KeyObject` for the bound key, and bind it to `cnf.jwk` via
 *      RFC 7638 thumbprint (constant-time).
 *   4. Walk the AIK chain leaf→root and confirm the terminal cert is
 *      rooted in the merged attestation trust set (which includes the
 *      bundled TPM CA roots from `config/aauth/tpm_attestation_roots/`).
 *   5. Verify `sig` over the raw `certInfo` bytes using the AIK leaf
 *      public key and the COSE-derived signing algorithm.
 *   6. Decode `certInfo` as `TPMS_ATTEST`; validate `magic`/`type`,
 *      compare `extraData` against `SHA-256(challenge || jkt)`, and
 *      (for `TPM_ST_ATTEST_CERTIFY` payloads) confirm the certified
 *      `name` matches `nameAlg || digest(pubArea)`.
 *
 * Failure modes never throw; every input shape produces a structured
 * outcome so the AAuth middleware can record the diagnostic reason
 * without rejecting the request. Failed attestation cascades to the
 * operator-allowlist tier or `software` per the cascade rules.
 *
 * Out of scope (per FU-2026-Q3-aauth-tpm2-verifier):
 *   - TPM 1.2 quote payloads. `ver !== "2.0"` short-circuits.
 *   - Live TPM hardware in tests; fixtures are synthetic byte buffers.
 *   - External TPM library dependencies. Parser is hand-written.
 */
import type { AttestationContext, AttestationOutcome } from "./aauth_attestation_verifier.js";
/**
 * Verify a WebAuthn `tpm` envelope. The dispatcher in
 * {@link verifyAttestation} guarantees that `envelope.format` is
 * `"tpm2"`, the challenge precheck has already succeeded, and the
 * statement is a non-null object.
 */
export declare function verifyTpm2Attestation(envelope: {
    statement: unknown;
    challenge: string;
    format: string;
}, ctx: AttestationContext): Promise<AttestationOutcome>;
//# sourceMappingURL=aauth_attestation_tpm2.d.ts.map