/**
 * FallbackAdapter — cascading TimestampPort composition.
 *
 * Pure cascade logic with no ASN.1 / wire-format knowledge.
 * Adapters are tried in order; the first success wins.
 * All failures aggregate into AllAdaptersFailedError.
 *
 * For verify(): the first adapter whose tsa URL matches the receipt is used.
 * If none match, falls back to trying each in order.
 *
 * @module proof/fallback-adapter
 */
import type { SignedReceipt } from "../trace/schema.js";
import type { TimestampPort } from "../ports/timestamp.js";
/**
 * Thrown when all adapters fail during a `request()` call.
 * Aggregates individual errors for diagnostics.
 */
export declare class AllAdaptersFailedError extends AggregateError {
    constructor(errors: Error[], message?: string);
}
/**
 * FallbackAdapter — tries adapters in insertion order.
 *
 * Construction throws immediately if the adapters array is empty
 * (fail-closed; never silently degrade to a misconfigured state).
 */
export declare class FallbackAdapter implements TimestampPort {
    private readonly _adapters;
    constructor(adapters: readonly TimestampPort[]);
    /**
     * Try each adapter in order. Returns the first successful receipt.
     * Throws AllAdaptersFailedError if every adapter throws.
     */
    request(rootHash: string): Promise<SignedReceipt>;
    /**
     * Verify a receipt.
     *
     * Strategy: try the first adapter whose tsa URL matches receipt.tsa first
     * (fast path). If none match (or the match fails), try all adapters in order
     * and return the first successful result.
     *
     * Returns `{ valid: false }` only when all adapters declare invalid or throw.
     */
    verify(receipt: SignedReceipt, rootHash: string): Promise<{
        valid: boolean;
        reason?: string;
    }>;
}
//# sourceMappingURL=fallback-adapter.d.ts.map