diff --git a/ethers-signers/src/wallet/mod.rs b/ethers-signers/src/wallet/mod.rs index c9300601..d60231a5 100644 --- a/ethers-signers/src/wallet/mod.rs +++ b/ethers-signers/src/wallet/mod.rs @@ -67,6 +67,14 @@ pub struct Wallet> { pub(crate) chain_id: u64, } +impl> Wallet { + + /// Construct a new wallet with an external Signer + pub fn new_with_signer(signer: D, address: Address, chain_id: u64) -> Self { + Wallet { signer, address, chain_id } + } +} + #[cfg_attr(target_arch = "wasm32", async_trait(?Send))] #[cfg_attr(not(target_arch = "wasm32"), async_trait)] impl> Signer for Wallet {