pub struct SignerMiddleware<M, S> { /* private fields */ }Implementations§
Source§impl<M: Middleware, S: Signer> SignerMiddleware<M, S>
impl<M: Middleware, S: Signer> SignerMiddleware<M, S>
pub fn new(inner: M, signer: S) -> Self
pub fn change_signer(self, signer: S) -> Self
Trait Implementations§
Source§impl<M: Middleware, S: Signer + Debug + Sync + Send> Middleware for SignerMiddleware<M, S>
impl<M: Middleware, S: Signer + Debug + Sync + Send> Middleware for SignerMiddleware<M, S>
Source§type Provider = <M as Middleware>::Provider
type Provider = <M as Middleware>::Provider
The JSON-RPC client type at the bottom of the stack
Source§fn inner(&self) -> &Self::Inner
fn inner(&self) -> &Self::Inner
Get a reference to the next-lower middleware in the middleware stack
Source§fn is_signer(&self) -> bool
fn is_signer(&self) -> bool
The function
is_signer returns a boolean value indicating whether the inner object is a signer.Source§fn send_transaction_without_confirm<'life0, 'async_trait, T>(
&'life0 self,
tx: CreateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + Send + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
fn send_transaction_without_confirm<'life0, 'async_trait, T>(
&'life0 self,
tx: CreateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + Send + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
If there is any signer middleware, will sign it first and then send it.
fn sign_transaction( &self, tx: &CreateTransactionRequest, ) -> Result<Signature, Error>
fn sign(&self, data: &[u8]) -> Result<Signature, Error>
Source§fn send_transaction<'life0, 'async_trait>(
&'life0 self,
tx: CreateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, Self::Provider>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
tx: CreateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, Self::Provider>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a transaction and returns a more higher-level response to work with on application layer.
Source§fn create_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: CreateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + Send + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
fn create_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: CreateTransactionRequest,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + Send + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
Directly calls CreateTransaction JSON-RPC endpoint.
Source§fn get_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 TxHash,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 TxHash,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The function
get_transaction_status retrieves the status of a transaction identified by its hash. Read moreSource§fn get_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 TxHash,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 TxHash,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The function
get_transaction retrieves a transaction using its hash. Read morefn get_soft_confirmed_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 TxHash,
) -> Pin<Box<dyn Future<Output = Result<GetTransactionResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_balance<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_current_ds_comm<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<GetCurrentDsCommResponse, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ds_block<'life0, 'life1, 'async_trait>(
&'life0 self,
lock_num: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DsBlock, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_ds_block_verbose<'life0, 'life1, 'async_trait>(
&'life0 self,
lock_num: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DsBlockVerbose, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ds_block_listing<'life0, 'async_trait>(
&'life0 self,
max: u32,
) -> Pin<Box<dyn Future<Output = Result<BlockList, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tx_block<'life0, 'life1, 'async_trait>(
&'life0 self,
block_num: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TxBlock, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tx_block_verbose<'life0, 'life1, 'async_trait>(
&'life0 self,
block_num: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TxBlockVerbose, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn tx_block_listing<'life0, 'async_trait>(
&'life0 self,
max: u32,
) -> Pin<Box<dyn Future<Output = Result<BlockList, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_miner_info<'life0, 'life1, 'async_trait>(
&'life0 self,
ds_block_number: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<MinerInfo, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_blockchain_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<BlockchainInfo, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_node_type<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_sharding_structure<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ShardingStructure, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_ds_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<DsBlock, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_num_ds_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ds_block_rate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<f32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_tx_block<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxBlock, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_num_tx_blocks<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tx_block_rate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<f32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_num_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_rate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<f32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_mini_epoch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_current_ds_epoch<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_prev_difficulty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_num_peers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_prev_ds_difficulty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_coin_supply<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_coin_supply_as_int<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u128, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_recent_transactions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TxList, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transactions_for_tx_block<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_block: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<String>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_txn_bodies_for_tx_block_ex<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tx_block: &'life1 str,
page_num: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TxnBodiesForTxBlockEx, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_txn_bodies_for_tx_block<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_block: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<GetTransactionResponse>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_transactions_for_tx_block_ex<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tx_block: &'life1 str,
page_num: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<TransactionsForTxBlockEx, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_num_txns_tx_epoch<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_num_txns_ds_epoch<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_minimum_gas_price<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_smart_contracts<'life0, 'life1, 'async_trait>(
&'life0 self,
owner: &'life1 ZilAddress,
) -> Pin<Box<dyn Future<Output = Result<SmartContracts, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_contract_address_from_transaction_id<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 TxHash,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_smart_contract_code<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_address: &'life1 ZilAddress,
) -> Pin<Box<dyn Future<Output = Result<SmartContractCode, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_smart_contract_init<'life0, 'life1, 'async_trait>(
&'life0 self,
contract_address: &'life1 ZilAddress,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScillaVariable>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_smart_contract_state<'life0, 'life1, 'async_trait, T>(
&'life0 self,
contract_address: &'life1 ZilAddress,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + Send + DeserializeOwned,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_smart_contract_sub_state<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
contract_address: &'life1 ZilAddress,
variable_name: &'life2 str,
indices: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn get_state_proof<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
contract_address: &'life1 ZilAddress,
hash: &'life2 str,
tx_block: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Auto Trait Implementations§
impl<M, S> Freeze for SignerMiddleware<M, S>
impl<M, S> RefUnwindSafe for SignerMiddleware<M, S>where
S: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, S> Send for SignerMiddleware<M, S>
impl<M, S> Sync for SignerMiddleware<M, S>
impl<M, S> Unpin for SignerMiddleware<M, S>
impl<M, S> UnwindSafe for SignerMiddleware<M, S>where
S: UnwindSafe,
M: UnwindSafe,
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