import { TimestampClass } from "../types/transport-timestamps.js";
import "../types/index.js";
/** A validated `TimestampEvent`, with both of its moments as epoch nanoseconds. */
export type ParsedTimestampEvent = {
  classifier: TimestampClass;
  /** The event's `at`, exactly as the caller wrote it. */
  at: string;
  atNanoseconds: bigint;
  recordedNanoseconds: bigint;
};
/**
 * Validate a list of `TimestampEvent`s and put them in recording order, or `null`.
 *
 * The shared reading behind `bestAvailable` and `estimateDrift`:
 *
 * - Every event must be an object whose `classifier` is exactly `PLN`, `EST`, `REQ` or `ACT` and
 *   whose `at` and `recordedAt` are instants (`Z` or an offset) with no annotation, read as
 *   `parseInstantNanoseconds` reads them: the offset fixes the instant, and a zoned string, a real
 *   zone bracket included, is invalid. One invalid event makes the whole list invalid.
 * - The result is sorted by `recordedAt`, earliest first. Events recorded at the same instant
 *   keep their input order, so of two ties the later index is the later record.
 * - `at` is kept exactly as written, so a caller can echo it.
 * - An empty list is `[]`; the caller decides what that means.
 * - A hostile value (a throwing getter, a revoked Proxy) is invalid input: `null`, never a throw.
 *
 * @param events candidate list of timestamp events
 * @returns the events in recording order with their instants, or null on invalid input
 *
 * @example parseTimestampEvents([]) // []
 * @example parseTimestampEvents([{ classifier: "ETA", at: "2024-06-15T12:00:00Z", recordedAt: "2024-06-15T10:00:00Z" }]) // null
 */
export declare function parseTimestampEvents(events: unknown): ParsedTimestampEvent[] | null;