pub trait WalletProvider<N: Network = Ethereum> {
type Wallet: NetworkWallet<N>;
// Required methods
fn wallet(&self) -> &Self::Wallet;
fn wallet_mut(&mut self) -> &mut Self::Wallet;
// Provided methods
fn default_signer_address(&self) -> Address { ... }
fn has_signer_for(&self, address: &Address) -> bool { ... }
fn signer_addresses(&self) -> impl Iterator<Item = Address> { ... }
}
Expand description
Trait for Providers, Fill stacks, etc, which contain NetworkWallet
.
Required Associated Types§
sourcetype Wallet: NetworkWallet<N>
type Wallet: NetworkWallet<N>
The underlying NetworkWallet
type contained in this stack.
Required Methods§
sourcefn wallet_mut(&mut self) -> &mut Self::Wallet
fn wallet_mut(&mut self) -> &mut Self::Wallet
Get a mutable reference to the underlying wallet.
Provided Methods§
sourcefn default_signer_address(&self) -> Address
fn default_signer_address(&self) -> Address
Get the default signer address.
sourcefn has_signer_for(&self, address: &Address) -> bool
fn has_signer_for(&self, address: &Address) -> bool
Check if the signer can sign for the given address.
sourcefn signer_addresses(&self) -> impl Iterator<Item = Address>
fn signer_addresses(&self) -> impl Iterator<Item = Address>
Get an iterator of all signer addresses. Note that because the signer always has at least one address, this iterator will always have at least one element.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.