//! Client SDK for quicprochat v2.
//!
//! Provides [`QpqClient`](client::QpqClient) — a single entry point for
//! connecting to a quicprochat server, authenticating via OPAQUE, managing
//! conversations, and subscribing to real-time events.
//!
//! # Connection lifecycle
//!
//! 1. Create a [`QpqClient`](client::QpqClient) with a [`ClientConfig`](config::ClientConfig).
//! 2. Call [`connect()`](client::QpqClient::connect) to establish a QUIC connection
//!    and open the local SQLCipher conversation store.
//! 3. [`register()`](client::QpqClient::register) or
//!    [`login()`](client::QpqClient::login) via OPAQUE to authenticate.
//! 4. Optionally call [`start_heartbeat()`](client::QpqClient::start_heartbeat)
//!    to enable proactive dead-connection detection.
//! 5. Use messaging, group, key, and device APIs through the client.
//! 6. Call [`disconnect()`](client::QpqClient::disconnect) to shut down gracefully.
//!
//! # Event subscription
//!
//! Call [`subscribe()`](client::QpqClient::subscribe) to get a
//! `tokio::sync::broadcast::Receiver<ClientEvent>` that emits connection state
//! changes, authentication events, and incoming message notifications.
//!
//! # Modules
//!
//! - [`client`] — [`QpqClient`](client::QpqClient) and connection management.
//! - [`auth`] — OPAQUE registration and login flows.
//! - [`config`] — [`ClientConfig`](config::ClientConfig) with server address, TLS, DB path.
//! - [`conversation`] — [`ConversationStore`](conversation::ConversationStore) for local
//!   message persistence and user blocking.
//! - [`events`] — [`ClientEvent`](events::ClientEvent) enum for the event bus.
//! - [`groups`] — group membership management.
//! - [`keys`] — MLS KeyPackage and hybrid (PQ) key upload/fetch.
//! - [`messaging`] — send and receive encrypted messages.
//! - [`devices`] — multi-device registration, listing, and revocation.
//! - [`recovery`] — account recovery bundle upload/fetch.
//! - [`outbox`] — offline message queue with retry.
//! - [`state`] — client state persistence (identity key, session token).
//! - [`transcript`] — conversation transcript export.
//! - [`users`] — username/identity resolution.

pub mod auth;
pub mod client;
pub mod config;
pub mod conversation;
pub mod devices;
pub mod error;
pub mod events;
pub mod groups;
pub mod keys;
pub mod messaging;
pub mod outbox;
pub mod recovery;
pub mod state;
pub mod transcript;
pub mod users;
