Struct fireblocks_sdk::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
pub async fn contracts(&self) -> Result<Vec<WalletContainer>>
pub async fn contract(&self, id: &str) -> Result<WalletContainer>
pub async fn contract_asset<T>( &self, id: &str, asset: T, address: &str ) -> Result<WalletCreateAssetResponse>
pub async fn contract_create(&self, name: &str) -> Result<WalletContainer>
pub async fn contract_delete(&self, id: &str) -> Result<()>
source§impl Client
impl Client
pub async fn external_wallets(&self) -> Result<Vec<WalletContainer>>
pub async fn external_wallet(&self, id: &str) -> Result<WalletContainer>
pub async fn external_wallet_asset<T>( &self, id: &str, asset: T, address: &str ) -> Result<WalletCreateAssetResponse>
pub async fn external_wallet_create( &self, name: &str ) -> Result<WalletContainer>
pub async fn external_wallet_delete(&self, id: &str) -> Result<()>
source§impl Client
impl Client
sourcepub async fn hooks_resend(&self) -> Result<HookResponse>
pub async fn hooks_resend(&self) -> Result<HookResponse>
source§impl Client
impl Client
pub async fn internal_wallets(&self) -> Result<Vec<WalletContainer>>
source§impl Client
impl Client
pub async fn supported_assets(&self) -> Result<Vec<SupportedAsset>>
sourcepub async fn staking_providers(&self) -> Result<Vec<StakingProvider>>
pub async fn staking_providers(&self) -> Result<Vec<StakingProvider>>
sourcepub async fn staking_accept_terms(&self, provider_id: &str) -> Result<()>
pub async fn staking_accept_terms(&self, provider_id: &str) -> Result<()>
sourcepub async fn staking_chain_info<T>(&self, chain: T) -> Result<StakingChainInfo>
pub async fn staking_chain_info<T>(&self, chain: T) -> Result<StakingChainInfo>
pub async fn staking_positions(&self) -> Result<Vec<StakingPosition>>
pub async fn staking_positions_summary(&self) -> Result<StakingPositionsSummary>
source§impl Client
impl Client
sourcepub async fn transactions<I, K, V>(
&self,
options: I
) -> Result<Vec<Transaction>>
pub async fn transactions<I, K, V>( &self, options: I ) -> Result<Vec<Transaction>>
sourcepub async fn create_transaction(
&self,
args: &TransactionArguments
) -> Result<CreateTransactionResponse>
pub async fn create_transaction( &self, args: &TransactionArguments ) -> Result<CreateTransactionResponse>
Create a transaction
sourcepub async fn create_transaction_vault<T>(
&self,
source_vault: i32,
destination_vault: i32,
asset_id: T,
amount: BigDecimal,
note: Option<&str>
) -> Result<CreateTransactionResponse>
pub async fn create_transaction_vault<T>( &self, source_vault: i32, destination_vault: i32, asset_id: T, amount: BigDecimal, note: Option<&str> ) -> Result<CreateTransactionResponse>
Create a vault-to-vault transaction
sourcepub async fn create_transaction_external<A, D>(
&self,
source_vault: i32,
destination: D,
asset_id: A,
amount: BigDecimal,
note: Option<&str>
) -> Result<CreateTransactionResponse>
pub async fn create_transaction_external<A, D>( &self, source_vault: i32, destination: D, asset_id: A, amount: BigDecimal, note: Option<&str> ) -> Result<CreateTransactionResponse>
Create a transaction to external wallet
sourcepub async fn get_transaction(&self, id: &str) -> Result<Transaction>
pub async fn get_transaction(&self, id: &str) -> Result<Transaction>
Get a transaction by id
sourcepub async fn poll_transaction(
&self,
id: &str,
timeout: Duration,
interval: Duration,
callback: impl Fn(&Transaction) + Send + Sync
) -> Result<Transaction>
pub async fn poll_transaction( &self, id: &str, timeout: Duration, interval: Duration, callback: impl Fn(&Transaction) + Send + Sync ) -> Result<Transaction>
pub async fn estimate_fee(&self, asset: &str) -> Result<EstimateFee>
pub async fn estimate_fee_transaction( &self, t: &TransactionArguments ) -> Result<EstimateFee>
source§impl Client
impl Client
sourcepub async fn create_address<T>(
&self,
vault_id: i32,
asset_id: T
) -> Result<CreateAddressResponse>
pub async fn create_address<T>( &self, vault_id: i32, asset_id: T ) -> Result<CreateAddressResponse>
Create an asset (address) for a vault account
use fireblocks_sdk::{ASSET_SOL_TEST, Client};
async fn vault_accounts(c: Client) -> color_eyre::Result<()> {
let (result, id) = c.create_address(0, ASSET_SOL_TEST).await?;
println!("request id {id}");
println!("Address {result:#?}");
Ok(())
}
pub async fn addresses<T>( &self, vault_id: i32, asset_id: T ) -> Result<Vec<Address>>
pub async fn addresses_paginated<T, I, K, V>( &self, vault_id: i32, asset_id: T, paging: I ) -> Result<AddressContainer>
pub async fn vault(&self, vault_id: i32) -> Result<Account>
sourcepub async fn vaults<I, K, V>(&self, page: I) -> Result<VaultAccounts>
pub async fn vaults<I, K, V>(&self, page: I) -> Result<VaultAccounts>
Get vault accounts (wallets) with filters
use fireblocks_sdk::{Client, PagingVaultRequestBuilder};
async fn vault_accounts(c: Client) -> color_eyre::Result<()> {
let params = PagingVaultRequestBuilder::new().name_prefix("test-").limit(10).build()?;
let (results, id) = c.vaults(params).await?;
println!("request id {id}");
println!("hidden vault accounts {results:#?}");
Ok(())
}
See:
pub async fn create_vault(&self, account: &CreateAccount) -> Result<Account>
pub async fn rename_vault( &self, vault_id: i32, name: &str ) -> Result<VaultRenameResponse>
pub async fn vault_hide(&self, vault_id: i32, hide: bool) -> Result<()>
pub async fn assets<I, K, V>(&self, page: I) -> Result<PaginatedAssetWallet>
source§impl Client
impl Client
pub async fn wallet_connections(&self) -> Result<PagedWalletConnectResponse>
pub async fn wallet_connect( &self, request: &WalletConnectRequest ) -> Result<WalletConnectResponse>
pub async fn wallet_connection_delete(&self, id: &str) -> Result<()>
pub async fn wallet_connection_approve( &self, id: &str, approve: bool ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more