quicknode-cascade 0.2.3

Stream blockchain data at scale. Plugin-based framework powered by QuickNode Cascade — start with Solana, more chains coming.
Documentation
//! # quicknode-cascade
//!
//! Stream blockchain data at scale. Plugin-based framework powered by
//! [QuickNode Cascade](https://cascade.quiknode.io) — an edge-cached block archive
//! served from 300+ global PoPs with sub-50ms latency.
//!
//! Currently supports **Solana**. More chains coming soon.
//!
//! ## Two Approaches
//!
//! **Custom extraction** — implement [`solana::Plugin::on_raw`] and parse raw JSON yourself:
//!
//! ```rust,no_run
//! use quicknode_cascade::{CascadeRunner, solana};
//!
//! struct MyParser;
//! impl solana::Plugin for MyParser {
//!     fn name(&self) -> &'static str { "my-parser" }
//!     fn on_raw<'a>(&'a self, slot: u64, raw: &'a serde_json::Value) -> solana::PluginFuture<'a> {
//!         Box::pin(async move {
//!             let txs = raw.get("transactions").and_then(|v| v.as_array());
//!             println!("slot {} — {} txs", slot, txs.map_or(0, |t| t.len()));
//!             Ok(())
//!         })
//!     }
//! }
//! ```
//!
//! **Built-in extraction** — let the framework extract structured data for you:
//!
//! ```rust,no_run
//! use quicknode_cascade::{CascadeRunner, solana};
//!
//! struct MyIndexer;
//! impl solana::Plugin for MyIndexer {
//!     fn name(&self) -> &'static str { "my-indexer" }
//!     fn on_block<'a>(&'a self, block: &'a solana::BlockData) -> solana::PluginFuture<'a> {
//!         Box::pin(async move {
//!             println!("slot {} — {} txs", block.slot, block.transaction_count);
//!             Ok(())
//!         })
//!     }
//! }
//! ```
//!
//! Both can be combined. [`solana::extract_block()`] is also available as a utility.

pub mod solana;
pub mod plugins;

pub(crate) mod source;
pub(crate) mod cursor;
mod runner;

pub use runner::CascadeRunner;