Expand description
§chia-query
Query the Chia blockchain through decentralized peer connections with automatic fallback to the coinset.org HTTP API.
use chia_query::{ChiaQuery, ChiaQueryConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ChiaQuery::new(ChiaQueryConfig::default()).await?;
let record = client.get_coin_record_by_name("0xabc...").await?;
println!("{:?}", record);
Ok(())
}Re-exports§
pub use types::*;
Modules§
- coinset
- Thin HTTP wrapper around the coinset.org REST API.
- peer
- router
- QueryRouter – dispatches each request to the peer backend first (with one retry on a different peer) and falls back to the coinset.org HTTP API if both peer attempts fail.
- types