Crates.io | helium-api |
lib.rs | helium-api |
version | 3.3.1 |
source | src |
created_at | 2021-03-17 15:17:49.630114 |
updated_at | 2022-09-14 02:08:55.573347 |
description | An async library for the Helium blockchain REST API |
homepage | |
repository | https://github.com/helium/helium-api-rs |
max_upload_size | |
id | 370177 |
size | 115,396 |
An async library to access the public Helium blockchain REST API.
The Helium API is a REST API service as defined by the blockhain-http service. This library attempts to wrap this API in an async, easy to use library that supports the conventions as exposed by the API. This includes:
Contributions and helpful suggestions are always welcome
Create a client to the default api.helium.io
endpoint and ask for a given
account.
use helium_api::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::default();
let account = accounts::get(
&client,
"13buBykFQf5VaQtv7mWj2PBY9Lq4i1DeXhg7C4Vbu3ppzqqNkTH",
)
.await?;
println!("Account: {:?}", account);
Ok(())
}
See the examples folder and unit tests for more examples.