Skip to main content

hydra_gateway/
lib.rs

1//! # hydra-gateway
2//!
3//! REST API and WebSocket gateway for the `hydra-amm` universal AMM engine.
4//!
5//! This crate provides an HTTP and WebSocket interface for creating, managing,
6//! and interacting with any supported AMM pool type. All AMM mathematics are
7//! delegated to `hydra-amm` — this service is a coordination layer.
8//!
9//! ## Architecture
10//!
11//! ```text
12//! Clients (HTTP, WebSocket)
13//!     │
14//!     ├── REST Handlers (api/)
15//!     ├── WS Handler (ws/)
16//!     │
17//!     ├── PoolService (service/)
18//!     ├── EventBus (domain/)
19//!     │
20//!     ├── PoolRegistry (domain/)
21//!     ├── hydra-amm (PoolBox)
22//!     │
23//!     └── PostgreSQL Persistence
24//! ```
25
26pub mod api;
27pub mod app_state;
28pub mod config;
29pub mod domain;
30pub mod error;
31pub mod persistence;
32pub mod service;
33pub mod ws;