Crates.io | fireblocks-sdk |
lib.rs | fireblocks-sdk |
version | 0.4.3 |
source | src |
created_at | 2024-04-25 19:52:54.011537 |
updated_at | 2024-07-21 15:35:57.843263 |
description | Rust implementation of the Fireblocks SDK |
homepage | https://github.com/dougEfresh/fireblocks-sdk-rs |
repository | https://github.com/dougEfresh/fireblocks-sdk-rs |
max_upload_size | |
id | 1220699 |
size | 213,492 |
fireblocks_sdk
is an async library for the Fireblocks API
!!!! Note this is community driven project and not affiliated with Fireblocks !!!!!
See developer portal and sign up for a sandbox account
use fireblocks_sdk::{ClientBuilder, PagingVaultRequestBuilder};
use std::time::Duration;
async fn vaults() -> color_eyre::Result<()> {
let api_key = std::env::var("FIREBLOCKS_API_KEY")?;
let secret = std::env::var("FIREBLOCKS_SECRET")?;
let client = ClientBuilder::new(&api_key, &secret.into_bytes())
.with_timeout(Duration::from_secs(10))
.with_connect_timeout(Duration::from_secs(5))
.build()?;
let params = PagingVaultRequestBuilder::new().limit(10).build()?;
let (vault_accounts, request_id) = client.vaults(params).await?;
println!("Got requestId: {request_id}");
println!("vault accounts: {:#?}", vault_accounts.accounts);
Ok(())
}
Create a .env file
cp .env-sameple .env
Edit .env and configure your API and secret key
Run tests:
cargo test