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