Trait BlokliQueryClient
pub trait BlokliQueryClient {
// Required methods
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: Option<AccountSelector>,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_native_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<NativeBalance, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn query_token_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<HoprBalance, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn query_transaction_count<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<u64, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn query_safe_allowance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<SafeHoprAllowance, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: Option<ChannelSelector>,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_transaction_status<'life0, 'async_trait>(
&'life0 self,
tx_id: String,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Trait defining restricted queries to Blokli API.
Required Methods§
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: Option<AccountSelector>,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: Option<AccountSelector>,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Counts the number of accounts optionally matching the given selector.
fn query_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the accounts matching the given selector.
fn query_native_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<NativeBalance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_native_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<NativeBalance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Queries the native balance of the given account.
fn query_token_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<HoprBalance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_token_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<HoprBalance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Queries the token balance of the given account.
fn query_transaction_count<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<u64, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_transaction_count<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<u64, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Queries the number of transactions sent from the given account.
fn query_safe_allowance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<SafeHoprAllowance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_safe_allowance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 [u8; 20],
) -> Pin<Box<dyn Future<Output = Result<SafeHoprAllowance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Queries the safe allowance of the given account.
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: Option<ChannelSelector>,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: Option<ChannelSelector>,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Counts the number of channels optionally matching the given selector.
fn query_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Channel>, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the channels matching the given selector.
fn query_transaction_status<'life0, 'async_trait>(
&'life0 self,
tx_id: String,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_transaction_status<'life0, 'async_trait>(
&'life0 self,
tx_id: String,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the status of the transaction given the tx_id previously returned by
BlokliTransactionClient::submit_and_track_transaction.
fn query_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the chain info.