import { LogVaultOptions, LogEvent, AuditEventResponse, AuditEventList, ListEventsOptions, VerifyEventResponse, SearchEventsResponse } from "./types"; export declare class Client { private apiKey; private baseUrl; private timeout; private maxRetries; private enableNonce; private localMode; private localModeOptions; private localModeBannerShown; constructor(options: string | LogVaultOptions); /** * Check if local mode is active */ isLocalMode(): boolean; /** * Helper for exponential backoff with jitter */ private sleep; log(event: LogEvent): Promise; /** * List audit events with optional filtering */ listEvents(options?: ListEventsOptions): Promise; /** * Get a single audit event by ID */ getEvent(eventId: string): Promise; /** * Verify the cryptographic signature of an audit event */ verifyEvent(eventId: string): Promise; /** * Search audit events using semantic search * * @param query - Natural language search query (e.g., "failed login attempts") * @param limit - Maximum number of results (default 20) */ searchEvents(query: string, limit?: number): Promise; /** * Verify the cryptographic integrity of the audit log chain * * This method walks through the hash chain and verifies: * - Each event's chain_hash is correctly computed * - Each event's prev_hash matches the previous event's chain_hash * - No events are missing from the chain * * @param options - Optional filters (startDate, endDate, limit) */ verifyChain(options?: { startDate?: string; endDate?: string; limit?: number; }): Promise; /** * Get statistics about the hash chain */ getChainStats(): Promise; /** * Get cryptographic proof for a specific event * * This proof can be used by auditors to independently verify * the event's integrity without access to the LogVault database. * * @param eventId - The UUID of the event */ getEventProof(eventId: string): Promise; /** * Verify an event's chain integrity locally (offline verification) * * This method allows auditors to verify events without making API calls. * Note: This only verifies the chain_hash computation, not the HMAC signature. * * @param event - Event object containing signature, prev_hash, chain_hash * @param prevChainHash - Optional override for previous chain hash */ verifyEventLocally(event: { signature: string; prev_hash?: string; chain_hash?: string; }, prevChainHash?: string): LocalVerificationResult; } export interface ChainVerificationResult { is_valid: boolean; events_checked: number; events_with_chain: number; legacy_events: number; first_invalid_event: string | null; error_type: "BROKEN_CHAIN" | "INVALID_CHAIN_HASH" | null; details: string; verified_at: string; } export interface ChainStats { total_events: number; chained_events: number; legacy_events: number; chain_coverage: number; first_chained_event: { id: string; created_at: string; chain_hash: string; } | null; last_chained_event: { id: string; created_at: string; chain_hash: string; } | null; genesis_hash: string; } export interface EventProof { event: AuditEventResponse; proof: { signature: string; chain_hash: string | null; prev_hash: string | null; is_genesis: boolean; is_chained: boolean; previous_event: { id: string; chain_hash: string; created_at: string; } | null; next_event: { id: string; created_at: string; } | null; }; verification: { algorithm: string; formula: string; genesis_hash: string; steps: string[]; }; } export interface LocalVerificationResult { isValid: boolean; checks: { hasChainHash: boolean; chainHashValid: boolean; prevHashMatches: boolean; }; details: string; }