Skip to main content

sui_rpc/light_client/events/
mod.rs

1//! Authenticated event stream verification.
2//!
3//! [`AuthenticatedEventsClient`] follows the ledger event stream
4//! ([`crate::Client::stream_events_with_config`] over the v2
5//! `LedgerService.ListEvents` RPC filtered by `EventStreamHeadFilter`),
6//! replays each received event into a local Merkle Mountain Range, and
7//! reconciles that MMR against the on-chain [`EventStreamHead`] fetched
8//! via an OCS inclusion proof. A checkpoint's events are folded into the
9//! MMR only after the event stream claims that checkpoint complete, and
10//! events are only yielded to the consumer after the reconciliation that
11//! covers them succeeds, so every emitted event is cryptographically
12//! authenticated end-to-end.
13//!
14//! [`AuthenticatedEvent`] is the in-memory envelope used both as the
15//! decoded form of a ledger event and as the unit of work flowing
16//! through the verifier.
17//!
18//! [`EventStreamHead`]: sui_sdk_types::framework::EventStreamHead
19
20mod client;
21mod config;
22mod envelope;
23mod state;
24
25pub use client::AuthenticatedEventsClient;
26pub use config::AuthenticatedEventsConfig;
27pub use envelope::AuthenticatedEvent;