pub struct BlokliTestClient<M> { /* private fields */ }Expand description
In-memory Blokli client for tests.
BlokliTestClient implements BlokliQueryClient, BlokliSubscriptionClient, and
BlokliTransactionClient against a shared BlokliTestState. Clones share the same state and broadcast
channels, which makes it possible to submit simulated transactions from one handle and observe subscription updates
from another.
Transactions submitted through the client call the configured BlokliTestStateMutator. Mutations that remove
accounts, channels, balances, allowances, or active transactions are rejected to avoid producing inconsistent test
state. For direct fixture edits that should not emit subscription events, use
hidden_state_update.
This type is exported only with the testing feature.
Implementations§
Source§impl<M: BlokliTestStateMutator> BlokliTestClient<M>
impl<M: BlokliTestStateMutator> BlokliTestClient<M>
Sourcepub fn new(initial_state: BlokliTestState, mutator: M) -> Self
pub fn new(initial_state: BlokliTestState, mutator: M) -> Self
Constructs a new client that owns the given initial_state.
After construction, the only way to mutate the state is when the client calls the given
mutator based on a submitted transaction.
Sourcepub fn with_mutator(self, mutator: M) -> Self
pub fn with_mutator(self, mutator: M) -> Self
Replaces the transaction mutator.
The returned client keeps the same shared state and subscription channels.
Sourcepub fn with_use_internal_txs(self, use_internal_txs: bool) -> Self
pub fn with_use_internal_txs(self, use_internal_txs: bool) -> Self
Enables or disables internal safe transaction simulation.
When enabled, a mutator error wrapped in InternalTxError produces a
confirmed outer transaction with failed safe execution details. The default is disabled.
Sourcepub fn with_tx_simulation_delay(self, tx_simulation_delay: Duration) -> Self
pub fn with_tx_simulation_delay(self, tx_simulation_delay: Duration) -> Self
Sets the delay before a simulated transaction is confirmed or emitted by tracking streams.
The default is 1 second.
Sourcepub fn snapshot(&self) -> BlokliTestStateSnapshot
pub fn snapshot(&self) -> BlokliTestStateSnapshot
Returns the current snapshot of the internal state.
The snapshot can be repeatedly refreshed to get the latest state.
Performs an arbitrary state update without broadcasting subscription events.
This is useful for arranging fixtures between assertions. Use transaction submission or
update_price_and_win_prob when tests need subscribers to
observe the change.
Sourcepub fn update_price_and_win_prob(
&self,
new_price: Option<TokenValueString>,
new_win_prob: Option<f64>,
)
pub fn update_price_and_win_prob( &self, new_price: Option<TokenValueString>, new_win_prob: Option<f64>, )
Updates the ticket price and/or minimum ticket-winning probability.
These changes update the shared state and broadcast a TicketParameters event to active subscribers when at
least one value changes.
Trait Implementations§
Source§impl<M: BlokliTestStateMutator + Send + Sync> BlokliQueryClient for BlokliTestClient<M>
impl<M: BlokliTestStateMutator + Send + Sync> BlokliQueryClient for BlokliTestClient<M>
Source§fn query_curvy_pending_notes<'life0, 'async_trait>(
&'life0 self,
_from_block: Option<u64>,
_after: Option<CurvyEventCursor>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyPendingNotes, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_pending_notes<'life0, 'async_trait>(
&'life0 self,
_from_block: Option<u64>,
_after: Option<CurvyEventCursor>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyPendingNotes, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_committed_notes<'life0, 'async_trait>(
&'life0 self,
_from_block: Option<u64>,
_after: Option<CurvyEventCursor>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyCommittedNotes, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_committed_notes<'life0, 'async_trait>(
&'life0 self,
_from_block: Option<u64>,
_after: Option<CurvyEventCursor>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyCommittedNotes, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_committed_nullifiers<'life0, 'async_trait>(
&'life0 self,
_from_block: Option<u64>,
_after: Option<CurvyEventCursor>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyCommittedNullifiers, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_committed_nullifiers<'life0, 'async_trait>(
&'life0 self,
_from_block: Option<u64>,
_after: Option<CurvyEventCursor>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyCommittedNullifiers, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_sync_checkpoint<'life0, 'async_trait>(
&'life0 self,
_block_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<CurvySyncCheckpoint, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_sync_checkpoint<'life0, 'async_trait>(
&'life0 self,
_block_hash: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<CurvySyncCheckpoint, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_sync_notes<'life0, 'async_trait>(
&'life0 self,
_checkpoint: String,
_from_index: Option<u64>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvySyncNotePage, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_sync_notes<'life0, 'async_trait>(
&'life0 self,
_checkpoint: String,
_from_index: Option<u64>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvySyncNotePage, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_sync_nullifiers<'life0, 'async_trait>(
&'life0 self,
_checkpoint: String,
_from_index: Option<u64>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvySyncNullifierPage, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_sync_nullifiers<'life0, 'async_trait>(
&'life0 self,
_checkpoint: String,
_from_index: Option<u64>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvySyncNullifierPage, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_shard_roots<'life0, 'async_trait>(
&'life0 self,
_checkpoint: String,
_from_index: Option<u64>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyShardRootPage, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_shard_roots<'life0, 'async_trait>(
&'life0 self,
_checkpoint: String,
_from_index: Option<u64>,
_first: u32,
) -> Pin<Box<dyn Future<Output = Result<CurvyShardRootPage, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_aggregator_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyAggregatorState, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_aggregator_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyAggregatorState, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_note_status<'life0, 'async_trait>(
&'life0 self,
_note_id: String,
) -> Pin<Box<dyn Future<Output = Result<CurvyNoteStatus, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_note_status<'life0, 'async_trait>(
&'life0 self,
_note_id: String,
) -> Pin<Box<dyn Future<Output = Result<CurvyNoteStatus, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_valid_notes_root<'life0, 'async_trait>(
&'life0 self,
_root: String,
) -> Pin<Box<dyn Future<Output = Result<bool, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_valid_notes_root<'life0, 'async_trait>(
&'life0 self,
_root: String,
) -> Pin<Box<dyn Future<Output = Result<bool, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_nullifier_spent<'life0, 'async_trait>(
&'life0 self,
_nullifier: String,
) -> Pin<Box<dyn Future<Output = Result<bool, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_nullifier_spent<'life0, 'async_trait>(
&'life0 self,
_nullifier: String,
) -> Pin<Box<dyn Future<Output = Result<bool, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_vault_fees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyVaultFees, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_vault_fees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyVaultFees, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_aggregator_fees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyAggregatorFees, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_aggregator_fees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyAggregatorFees, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_vault_token_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyVaultTokenCount, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_vault_token_count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CurvyVaultTokenCount, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_vault_token<'life0, 'async_trait>(
&'life0 self,
_token_id: String,
) -> Pin<Box<dyn Future<Output = Result<CurvyVaultToken, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_vault_token<'life0, 'async_trait>(
&'life0 self,
_token_id: String,
) -> Pin<Box<dyn Future<Output = Result<CurvyVaultToken, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_entry_portal_address<'life0, 'async_trait>(
&'life0 self,
_owner_hash: String,
_recovery: String,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_entry_portal_address<'life0, 'async_trait>(
&'life0 self,
_owner_hash: String,
_recovery: String,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_exit_portal_address<'life0, 'async_trait>(
&'life0 self,
_exit_address: String,
_exit_chain_id: String,
_recovery: String,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_exit_portal_address<'life0, 'async_trait>(
&'life0 self,
_exit_address: String,
_exit_chain_id: String,
_recovery: String,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_curvy_portal_registered<'life0, 'async_trait>(
&'life0 self,
_portal_address: String,
) -> Pin<Box<dyn Future<Output = Result<bool, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_curvy_portal_registered<'life0, 'async_trait>(
&'life0 self,
_portal_address: String,
) -> Pin<Box<dyn Future<Output = Result<bool, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
AccountSelector. Read moreSource§fn query_accounts<'life0, 'async_trait>(
&'life0 self,
selector: AccountSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Account>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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
Self: 'async_trait,
'life0: 'async_trait,
AccountSelector. Read moreSource§fn query_native_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
) -> Pin<Box<dyn Future<Output = Result<NativeBalance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_native_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
) -> Pin<Box<dyn Future<Output = Result<NativeBalance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn query_token_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
_token: Token,
) -> Pin<Box<dyn Future<Output = Result<HoprBalance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_token_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
_token: Token,
) -> Pin<Box<dyn Future<Output = Result<HoprBalance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn query_transaction_count<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
) -> Pin<Box<dyn Future<Output = Result<u64, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_transaction_count<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
) -> Pin<Box<dyn Future<Output = Result<u64, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn query_safe_allowance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
) -> Pin<Box<dyn Future<Output = Result<SafeHoprAllowance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_safe_allowance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 ChainAddress,
) -> Pin<Box<dyn Future<Output = Result<SafeHoprAllowance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn query_redeemed_stats<'life0, 'async_trait>(
&'life0 self,
selector: RedeemedStatsSelector,
) -> Pin<Box<dyn Future<Output = Result<RedeemedStats, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_safe<'life0, 'async_trait>(
&'life0 self,
selector: SafeSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<Safe>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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
Self: 'async_trait,
'life0: 'async_trait,
SafeSelector.Source§fn query_module_address_prediction<'life0, 'async_trait>(
&'life0 self,
input: ModulePredictionInput,
) -> Pin<Box<dyn Future<Output = Result<ChainAddress, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_module_address_prediction<'life0, 'async_trait>(
&'life0 self,
input: ModulePredictionInput,
) -> Pin<Box<dyn Future<Output = Result<ChainAddress, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Use query_channel_stats instead, which returns both count and total wxHOPR balance.
ChannelSelector. Read moreSource§fn query_channel_stats<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelStats, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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
Self: 'async_trait,
'life0: 'async_trait,
ChannelSelector. Read moreSource§fn query_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelsList, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_channels<'life0, 'async_trait>(
&'life0 self,
selector: ChannelSelector,
) -> Pin<Box<dyn Future<Output = Result<ChannelsList, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ChannelSelector. Read moreSource§fn query_safes_balance<'life0, 'async_trait>(
&'life0 self,
owner_address: Option<ChainAddress>,
) -> Pin<Box<dyn Future<Output = Result<SafesBalance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_safes_balance<'life0, 'async_trait>(
&'life0 self,
owner_address: Option<ChainAddress>,
) -> Pin<Box<dyn Future<Output = Result<SafesBalance, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn count_services<'life0, 'async_trait>(
&'life0 self,
selector: ServiceSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_services<'life0, 'async_trait>(
&'life0 self,
selector: ServiceSelector,
) -> Pin<Box<dyn Future<Output = Result<u32, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ServiceSelector. Read moreSource§fn query_services<'life0, 'async_trait>(
&'life0 self,
selector: ServiceSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceEntry>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_services<'life0, 'async_trait>(
&'life0 self,
selector: ServiceSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceEntry>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
ServiceSelector. Read moreSource§fn query_live_services<'life0, 'async_trait>(
&'life0 self,
selector: ServiceSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceEntry>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_live_services<'life0, 'async_trait>(
&'life0 self,
selector: ServiceSelector,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceEntry>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_service_types<'life0, 'async_trait>(
&'life0 self,
service_type: Option<ServiceTypeId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceTypeInfo>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_service_types<'life0, 'async_trait>(
&'life0 self,
service_type: Option<ServiceTypeId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceTypeInfo>, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_service_registry_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceRegistryConfig, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_service_registry_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceRegistryConfig, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_transaction_status<'life0, 'async_trait>(
&'life0 self,
tx_id: TxId,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_transaction_status<'life0, 'async_trait>(
&'life0 self,
tx_id: TxId,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_chain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ChainInfo, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn query_compatibility<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Compatibility, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query_compatibility<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Compatibility, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<M: BlokliTestStateMutator + Send + Sync> BlokliSubscriptionClient for BlokliTestClient<M>
impl<M: BlokliTestStateMutator + Send + Sync> BlokliSubscriptionClient for BlokliTestClient<M>
Source§fn subscribe_services(
&self,
selector: ServiceSelector,
) -> Result<impl Stream<Item = Result<ServiceUpdate, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_services( &self, selector: ServiceSelector, ) -> Result<impl Stream<Item = Result<ServiceUpdate, BlokliClientError>> + Send, BlokliClientError>
Streams current matching entries followed by changes produced by simulated transactions.
Source§fn subscribe_service_types(
&self,
service_type: Option<ServiceTypeId>,
) -> Result<impl Stream<Item = Result<ServiceTypeUpdate, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_service_types( &self, service_type: Option<ServiceTypeId>, ) -> Result<impl Stream<Item = Result<ServiceTypeUpdate, BlokliClientError>> + Send, BlokliClientError>
Streams service type configuration changes produced by simulated transactions.
The two registry-wide kinds, ServiceTypeUpdateKind::RegistrationFeeChanged and
ServiceTypeUpdateKind::RegistryPointerChanged, are never emitted: BlokliTestState models per-type
configuration only.
Source§fn subscribe_channels(
&self,
selector: ChannelSelector,
) -> Result<impl Stream<Item = Result<Channel, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_channels( &self, selector: ChannelSelector, ) -> Result<impl Stream<Item = Result<Channel, BlokliClientError>> + Send, BlokliClientError>
ChannelSelector. Read moreSource§fn subscribe_accounts(
&self,
selector: AccountSelector,
) -> Result<impl Stream<Item = Result<Account, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_accounts( &self, selector: AccountSelector, ) -> Result<impl Stream<Item = Result<Account, BlokliClientError>> + Send, BlokliClientError>
AccountSelector. Read moreSource§fn subscribe_graph(
&self,
) -> Result<impl Stream<Item = Result<OpenedChannelsGraphEntry, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_graph( &self, ) -> Result<impl Stream<Item = Result<OpenedChannelsGraphEntry, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_ticket_params(
&self,
) -> Result<impl Stream<Item = Result<TicketParameters, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_ticket_params( &self, ) -> Result<impl Stream<Item = Result<TicketParameters, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_health(
&self,
) -> Result<impl Stream<Item = Result<ReadinessState, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_health( &self, ) -> Result<impl Stream<Item = Result<ReadinessState, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_safe_deployments(
&self,
) -> Result<impl Stream<Item = Result<Safe, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_safe_deployments( &self, ) -> Result<impl Stream<Item = Result<Safe, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_service_registry_config(
&self,
) -> Result<impl Stream<Item = Result<ServiceRegistryConfig, BlokliClientError>> + Send + 'static, BlokliClientError>
fn subscribe_service_registry_config( &self, ) -> Result<impl Stream<Item = Result<ServiceRegistryConfig, BlokliClientError>> + Send + 'static, BlokliClientError>
Source§fn subscribe_track_transaction(
&self,
tx_id: TxId,
) -> Result<impl Stream<Item = Result<Transaction, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_track_transaction( &self, tx_id: TxId, ) -> Result<impl Stream<Item = Result<Transaction, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_ticket_redeemed(
&self,
_selector: TicketSelector,
) -> Result<impl Stream<Item = Result<RedeemTicketDetails, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_ticket_redeemed( &self, _selector: TicketSelector, ) -> Result<impl Stream<Item = Result<RedeemTicketDetails, BlokliClientError>> + Send, BlokliClientError>
TicketSelector. Read moreSource§fn subscribe_curvy_pending_notes(
&self,
_from_block: Option<u64>,
) -> Result<impl Stream<Item = Result<CurvyPendingNote, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_curvy_pending_notes( &self, _from_block: Option<u64>, ) -> Result<impl Stream<Item = Result<CurvyPendingNote, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_curvy_committed_notes(
&self,
_from_block: Option<u64>,
) -> Result<impl Stream<Item = Result<CurvyCommittedNote, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_curvy_committed_notes( &self, _from_block: Option<u64>, ) -> Result<impl Stream<Item = Result<CurvyCommittedNote, BlokliClientError>> + Send, BlokliClientError>
Source§fn subscribe_curvy_committed_nullifiers(
&self,
_from_block: Option<u64>,
) -> Result<impl Stream<Item = Result<CurvyCommittedNullifier, BlokliClientError>> + Send, BlokliClientError>
fn subscribe_curvy_committed_nullifiers( &self, _from_block: Option<u64>, ) -> Result<impl Stream<Item = Result<CurvyCommittedNullifier, BlokliClientError>> + Send, BlokliClientError>
Source§impl<M: BlokliTestStateMutator + Send + Sync> BlokliTransactionClient for BlokliTestClient<M>
impl<M: BlokliTestStateMutator + Send + Sync> BlokliTransactionClient for BlokliTestClient<M>
Source§fn submit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<TxReceipt, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<TxReceipt, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn submit_and_track_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<TxId, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_and_track_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_tx: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<TxId, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn submit_and_confirm_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_tx: &'life1 [u8],
num_confirmations: usize,
) -> Pin<Box<dyn Future<Output = Result<TxReceipt, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn submit_and_confirm_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
signed_tx: &'life1 [u8],
num_confirmations: usize,
) -> Pin<Box<dyn Future<Output = Result<TxReceipt, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn track_transaction<'life0, 'async_trait>(
&'life0 self,
tx_id: TxId,
client_timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn track_transaction<'life0, 'async_trait>(
&'life0 self,
tx_id: TxId,
client_timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Transaction, BlokliClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
tx_id previously returned
by submit_and_track_transaction until it is confirmed
or fails.Source§impl<M: Clone> Clone for BlokliTestClient<M>
impl<M: Clone> Clone for BlokliTestClient<M>
Source§fn clone(&self) -> BlokliTestClient<M>
fn clone(&self) -> BlokliTestClient<M>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<M> !RefUnwindSafe for BlokliTestClient<M>
impl<M> !UnwindSafe for BlokliTestClient<M>
impl<M> Freeze for BlokliTestClient<M>where
M: Freeze,
impl<M> Send for BlokliTestClient<M>where
M: Send,
impl<M> Sync for BlokliTestClient<M>where
M: Sync,
impl<M> Unpin for BlokliTestClient<M>where
M: Unpin,
impl<M> UnsafeUnpin for BlokliTestClient<M>where
M: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more