18 stable releases

3.3.1 Sep 14, 2022
3.3.0 Aug 11, 2022
3.2.1 Nov 29, 2021
3.1.0 Jul 30, 2021
2.0.1 Mar 22, 2021

#60 in #public-api

Download history 8/week @ 2024-11-14 8/week @ 2024-11-28 36/week @ 2024-12-05 45/week @ 2024-12-12 1/week @ 2025-01-16 15/week @ 2025-01-23 61/week @ 2025-01-30 12/week @ 2025-02-06 167/week @ 2025-02-13 16/week @ 2025-02-20 35/week @ 2025-02-27

230 downloads per month

Apache-2.0

70KB
2K SLoC

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.

Dependencies

~6–17MB
~231K SLoC