Trait alloy_provider::WalletProvider

source ·
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§

source

type Wallet: NetworkWallet<N>

The underlying NetworkWallet type contained in this stack.

Required Methods§

source

fn wallet(&self) -> &Self::Wallet

Get a reference to the underlying wallet.

source

fn wallet_mut(&mut self) -> &mut Self::Wallet

Get a mutable reference to the underlying wallet.

Provided Methods§

source

fn default_signer_address(&self) -> Address

Get the default signer address.

source

fn has_signer_for(&self, address: &Address) -> bool

Check if the signer can sign for the given address.

source

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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<F, P, T, N> WalletProvider<N> for FillProvider<F, P, T, N>
where F: TxFiller<N> + WalletProvider<N>, P: Provider<T, N>, T: Transport + Clone, N: Network,

§

type Wallet = <F as WalletProvider<N>>::Wallet

source§

impl<L, R, N> WalletProvider<N> for JoinFill<L, R>
where R: WalletProvider<N>, N: Network,

§

type Wallet = <R as WalletProvider<N>>::Wallet

source§

impl<W, N> WalletProvider<N> for WalletFiller<W>
where W: NetworkWallet<N> + Clone, N: Network,

§

type Wallet = W