fireblocks_sdk/
lib.rs

1#![doc = include_str!("../README.md")]
2use {
3    chrono::{DateTime, Utc},
4    std::fmt::Display,
5};
6mod assets;
7mod client;
8pub mod error;
9pub(crate) mod jwt;
10mod log;
11#[cfg(feature = "page")]
12mod paged_client;
13mod wallet;
14#[cfg(feature = "page")]
15pub use paged_client::{PagedClient, TransactionStream, VaultStream};
16pub use {
17    crate::error::*,
18    apis::{
19        configuration::{ApiKey, Configuration},
20        ApiClient,
21    },
22    assets::{
23        Asset,
24        ASSET_BTC,
25        ASSET_BTC_TEST,
26        ASSET_DOGE,
27        ASSET_DOGE_TEST,
28        ASSET_ETH,
29        ASSET_ETH_TEST,
30        ASSET_SOL,
31        ASSET_SOL_TEST,
32    },
33    client::{Client, ClientBuilder},
34    wallet::WalletContainer,
35};
36
37pub const FIREBLOCKS_API: &str = "https://api.fireblocks.io/v1";
38pub const FIREBLOCKS_SANDBOX_API: &str = "https://sandbox-api.fireblocks.io/v1";
39pub type Epoch = DateTime<Utc>;
40pub type Result<T> = std::result::Result<T, FireblocksError>;
41pub type QueryParams = Vec<(String, String)>;
42
43#[derive(Debug, Clone, Copy)]
44pub enum WalletType {
45    Internal,
46    External,
47    Contract,
48}
49
50impl Display for WalletType {
51    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
52        write!(f, "{}", match &self {
53            Self::Internal => "Internal",
54            Self::External => "External",
55            Self::Contract => "Contract",
56        })
57    }
58}
59
60#[allow(clippy::all, clippy::pedantic, clippy::nursery)]
61pub mod apis;
62#[allow(clippy::all, clippy::pedantic, clippy::nursery)]
63pub mod models;