Struct ethers_signers::Ledger [−][src]
pub struct Ledger { /* fields omitted */ }
Expand description
A Ledger Ethereum App.
This is a simple wrapper around the Ledger transport
Implementations
Instantiate the application by acquiring a lock on the ledger device.
use ethers_signers::{Ledger, HDPath};
let ledger = Ledger::new(HDPath::LedgerLive(0), 1).await?;
Get the account which corresponds to our derivation path
pub async fn get_address_with_path(
&self,
derivation: &DerivationType
) -> Result<Address, LedgerError>
pub async fn get_address_with_path(
&self,
derivation: &DerivationType
) -> Result<Address, LedgerError>
Gets the account which corresponds to the provided derivation path
Returns the semver of the Ethereum ledger app
Signs an Ethereum transaction (requires confirmation on the ledger)
pub async fn sign_message<S: AsRef<[u8]>>(
&self,
message: S
) -> Result<Signature, LedgerError>
pub async fn sign_message<S: AsRef<[u8]>>(
&self,
message: S
) -> Result<Signature, LedgerError>
Signs an ethereum personal message
Trait Implementations
Signs the hash of the provided message after prefixing it
fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Signs the transaction
type Error = LedgerError
Sets the signer’s chain id