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
pub async fn sign_typed_struct<T>(
&self,
payload: &T
) -> Result<Signature, LedgerError> where
T: Eip712,
pub async fn sign_typed_struct<T>(
&self,
payload: &T
) -> Result<Signature, LedgerError> where
T: Eip712,
Signs an EIP712 encoded domain separator and message
pub async fn sign_payload(
&self,
command: INS,
payload: Vec<u8>
) -> Result<Signature, LedgerError>
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
Signs a EIP712 derived struct
type Error = LedgerError
Sets the signer’s chain id
Auto Trait Implementations
impl !RefUnwindSafe for LedgerEthereum
impl Send for LedgerEthereum
impl Sync for LedgerEthereum
impl Unpin for LedgerEthereum
impl UnwindSafe for LedgerEthereum
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more