Skip to content

A Rust library for accessing Helium API servers

License

Notifications You must be signed in to change notification settings

andreiguzga/helium-api-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

helium-api

An async library to access the public Helium blockchain REST API.

Crates.io docs.rs Build Status Discord chat

Overview

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:

  • Modular access to each of the main areas of the Helium API
  • Support for lazily fetched paged responses

Contributions and helpful suggestions are always welcome

Example

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.

About

A Rust library for accessing Helium API servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%