Expand description
§chaincodec-stream
Real-time streaming engine for ChainCodec.
Connects to blockchain RPC/WebSocket endpoints, listens for new blocks,
extracts raw log data, routes each log through the Schema Registry,
decodes it, and emits strongly-typed DecodedEvent objects.
§Architecture
BlockListener (per chain, Tokio task)
│
▼
RawEvent queue
│
▼
SchemaRouter (fingerprint → schema lookup)
│
▼
ChainDecoder::decode_event
│
▼
broadcast::Sender<DecodedEvent> ← multiple consumers subscribeRe-exports§
pub use config::StreamConfig;pub use engine::StreamEngine;pub use ws_listener::EvmWsListener;
Modules§
- config
- Stream engine configuration.
- engine
StreamEngine— orchestrates multiple chain listeners and decoder workers.- listener
BlockListenertrait — abstraction over RPC/WS block polling.- ws_
listener EvmWsListener— concreteBlockListenerimplementation for EVM chains using an Ethereum JSON-RPC WebSocket subscription (eth_subscribe("logs", ...)).