Skip to main content

chaincodec_stream/
lib.rs

1//! # chaincodec-stream
2//!
3//! Real-time streaming engine for ChainCodec.
4//!
5//! Connects to blockchain RPC/WebSocket endpoints, listens for new blocks,
6//! extracts raw log data, routes each log through the Schema Registry,
7//! decodes it, and emits strongly-typed `DecodedEvent` objects.
8//!
9//! ## Architecture
10//! ```text
11//! BlockListener (per chain, Tokio task)
12//!       │
13//!       ▼
14//! RawEvent queue
15//!       │
16//!       ▼
17//! SchemaRouter (fingerprint → schema lookup)
18//!       │
19//!       ▼
20//! ChainDecoder::decode_event
21//!       │
22//!       ▼
23//! broadcast::Sender<DecodedEvent>   ← multiple consumers subscribe
24//! ```
25
26pub mod config;
27pub mod engine;
28pub mod listener;
29pub mod ws_listener;
30
31pub use config::StreamConfig;
32pub use engine::StreamEngine;
33pub use ws_listener::EvmWsListener;