Trait BlokliQueryClient
pub trait BlokliQueryClient {
Show 18 methods
// Required methods
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: 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 query_redeemed_stats<'life0, 'async_trait>(
&'life0 self,
selector: RedeemedStatsSelector,
) -> Pin<Box<dyn Future<Output = Result<RedeemedStats, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_safe<'life0, 'async_trait>(
&'life0 self,
selector: SafeSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Safe>, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_module_address_prediction<'life0, 'async_trait>(
&'life0 self,
input: ModulePredictionInput,
) -> Pin<Box<dyn Future<Output = Result<[u8; 20], BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_channel_stats<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelStats, 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<ChannelsList, BlokliClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_safes_balance<'life0, 'async_trait>(
&'life0 self,
owner_address: Option<[u8; 20]>,
) -> Pin<Box<dyn Future<Output = Result<SafesBalance, 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_compatibility<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Compatibility, 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: 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: 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 query_redeemed_stats<'life0, 'async_trait>(
&'life0 self,
selector: RedeemedStatsSelector,
) -> Pin<Box<dyn Future<Output = Result<RedeemedStats, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_redeemed_stats<'life0, 'async_trait>(
&'life0 self,
selector: RedeemedStatsSelector,
) -> Pin<Box<dyn Future<Output = Result<RedeemedStats, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries redeemed ticket stats filtered by safe, node, or both.
fn query_safe<'life0, 'async_trait>(
&'life0 self,
selector: SafeSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Safe>, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_safe<'life0, 'async_trait>(
&'life0 self,
selector: SafeSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Safe>, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries deployed Safes matching the given selector.
fn query_module_address_prediction<'life0, 'async_trait>(
&'life0 self,
input: ModulePredictionInput,
) -> Pin<Box<dyn Future<Output = Result<[u8; 20], BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_module_address_prediction<'life0, 'async_trait>(
&'life0 self,
input: ModulePredictionInput,
) -> Pin<Box<dyn Future<Output = Result<[u8; 20], BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the module address prediction of the given Safe deployment data.
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
👎Deprecated since 0.22.0: Use query_channel_stats instead, which returns both count and total wxHOPR balance.
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Counts the number of channels matching the given selector.
fn query_channel_stats<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelStats, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_channel_stats<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelStats, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries channel count and total wxHOPR balance matching the given selector.
If no filter is set on the selector, returns stats across all channels.
fn query_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelsList, 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<ChannelsList, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the channels matching the given selector, including aggregated balance.
fn query_safes_balance<'life0, 'async_trait>(
&'life0 self,
owner_address: Option<[u8; 20]>,
) -> Pin<Box<dyn Future<Output = Result<SafesBalance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_safes_balance<'life0, 'async_trait>(
&'life0 self,
owner_address: Option<[u8; 20]>,
) -> Pin<Box<dyn Future<Output = Result<SafesBalance, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the total wxHOPR balance held across indexed safe contracts.
When owner_address is provided, restricts to safes whose registered accounts have that chain key.
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.
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_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the version of the Blokli API.
fn query_compatibility<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Compatibility, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query_compatibility<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Compatibility, BlokliClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Queries the client compatibility contract exposed by the Blokli API.