1 stable release
1.0.1 | Jun 20, 2021 |
---|
#223 in #json-rpc
22KB
635 lines
helium-jsonrpc-client
An async library for Helium's blockchain-node using JSON-RPC calls.
Overview
It is part of the ETL Lite project for tracking and storing data from the Helium blockchain.
Example
use helium_jsonrpc_rs::{ blocks };
#[tokio::main]
async fn main() {
let height = 873465;
let client = helium_jsonrpc_rs::Client::new_with_base_url("http://localhost:4467".to_string());
let block = match blocks::get_block(&client, &height).await {
Ok(b) => b,
Err(e) => panic!("Couldn't get block: {}", e),
};
println!("Found block {} with {} transactions.", height, block.transactions.len());
}
See the examples folder and unit tests for more examples.
Dependencies
~5–16MB
~214K SLoC