| Crates.io | blockfrost |
| lib.rs | blockfrost |
| version | 1.1.0 |
| created_at | 2021-10-28 17:59:29.195141+00 |
| updated_at | 2025-08-05 20:01:49.679562+00 |
| description | A Rust SDK for Blockfrost.io API |
| homepage | https://blockfrost.io |
| repository | https://github.com/blockfrost/blockfrost-rust |
| max_upload_size | |
| id | 473641 |
| size | 257,595 |
A Rust SDK for Blockfrost.io API.
Getting started • Installation • Examples • Endpoints
To use this SDK you need to login at blockfrost.io and create a new project to receive an API key.
Add to your project's Cargo.toml:
blockfrost = "1.0.6"
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(())
}