helium-jsonrpc

Crates.iohelium-jsonrpc
lib.rshelium-jsonrpc
version1.0.1
sourcesrc
created_at2021-06-20 14:18:44.295489
updated_at2021-06-20 14:18:44.295489
descriptionAn async library for the Helium blockchain-node JSON_RPC interface
homepage
repository
max_upload_size
id412425
size64,520
Chris Bruce (chrisabruce)

documentation

README

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.

Commit count: 0

cargo fmt