Crate ethers_signers[−][src]
Provides a unified interface for locally signing transactions.
You can implement the Signer
trait to extend functionality to other signers
such as Hardware Security Modules, KMS etc.
The exposed interfaces return a recoverable signature. In order to convert the signature
and the TransactionRequest
to a Transaction
, look at the signing middleware.
Supported signers:
// instantiate the wallet let wallet = "dcf2cbdd171a21c480aa7f53d77f31bb102282b3ff099c78e3118b37348c72f7" .parse::<LocalWallet>()?; // create a transaction let tx = TransactionRequest::new() .to("vitalik.eth") // this will use ENS .value(10000); // sign it let signature = wallet.sign_transaction(&tx).await?; // can also sign a message let signature = wallet.sign_message("hello world").await?; signature.verify("hello world", wallet.address()).unwrap();
Re-exports
pub use yubihsm; |
Structs
Ledger | A Ledger Ethereum App. |
Wallet | An Ethereum private-public key pair which can be used for signing messages. |
Enums
HDPath | Ledger wallet type |
LedgerError | Error when using the Ledger transport |
Traits
Signer | Trait for signing transactions and messages |
Functions
to_eip155_v | Applies EIP155 |
Type Definitions
LocalWallet | A wallet instantiated with a locally stored private key |
YubiWallet | A wallet instantiated with a YubiHSM |