9 releases (stable)

new 1.0.6 Jul 3, 2025
1.0.5 Nov 20, 2024
1.0.3 Oct 4, 2024
1.0.1 Jan 1, 2024
0.1.1 Oct 29, 2021

#261 in Magic Beans

Download history 99/week @ 2025-03-16 35/week @ 2025-03-23 72/week @ 2025-03-30 71/week @ 2025-04-06 28/week @ 2025-04-13 35/week @ 2025-04-20 31/week @ 2025-04-27 35/week @ 2025-05-04 38/week @ 2025-05-11 48/week @ 2025-05-18 52/week @ 2025-05-25 27/week @ 2025-06-01 17/week @ 2025-06-08 31/week @ 2025-06-15 25/week @ 2025-06-22 164/week @ 2025-06-29

238 downloads per month
Used in anychain-cardano

Apache-2.0

120KB
3K SLoC

Crates.io link Docs.rs link License

blockfrost-rust


A Rust SDK for Blockfrost.io API.

Getting startedInstallationExamplesEndpoints

Getting started

To use this SDK you need to login at blockfrost.io and create a new project to receive an API key.

Installation

Add to your project's Cargo.toml:

blockfrost = "1.0.6"

Examples

All the examples are located at the examples/ folder.

You might want to check all_requests.rs and ipfs.rs.

Here is simple_request.rs with the basic setup necessary and no settings customization:

use blockfrost::{BlockfrostAPI, BlockfrostResult};

fn build_api() -> BlockfrostResult<BlockfrostAPI> {
    let api = BlockfrostAPI::new("mainnetxvMK4xOpp5mHJgihi055KDLU64JJv2be", Default::default());
    Ok(api)
}

#[tokio::main]
async fn main() -> blockfrost::BlockfrostResult<()> {
    let api = build_api()?;
    let genesis = api.genesis().await?;

    println!("{:#?}", genesis);
    Ok(())
}

Dependencies

~10–27MB
~416K SLoC