Expand description
§bitcoinsv-rpc
Async Rust library for Bitcoin SV node communication.
This library provides a high-level interface for interacting with Bitcoin SV nodes via their JSON-RPC API and REST interface.
§Features
- Async/await support with Tokio
- JSON-RPC interface for node commands
- REST API interface for efficient block retrieval
- Type-safe integration with the bitcoinsv crate
§Example
use bitcoinsv_rpc::{NodeClient, SvNodeClient};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = SvNodeClient::new(
"http://localhost:8332",
Some("user".to_string()),
Some("password".to_string()),
)?;
let best_block_hash = client.get_best_block_hash().await?;
println!("Best block hash: {}", best_block_hash);
Ok(())
}Structs§
- SvNode
Client - Client for communicating with a Bitcoin SV node.
Enums§
- Error
- The error type for Fandango operations.
Traits§
- Node
Client - Trait for communicating with a Bitcoin node.
Type Aliases§
- Result
- A specialized Result type for Fandango operations.