| Crates.io | helium-jsonrpc |
| lib.rs | helium-jsonrpc |
| version | 1.0.1 |
| created_at | 2021-06-20 14:18:44.295489+00 |
| updated_at | 2021-06-20 14:18:44.295489+00 |
| description | An async library for the Helium blockchain-node JSON_RPC interface |
| homepage | |
| repository | |
| max_upload_size | |
| id | 412425 |
| size | 64,520 |
An async library for Helium's blockchain-node using JSON-RPC calls.
It is part of the ETL Lite project for tracking and storing data from the Helium blockchain.
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.