Struct ethers_signers::Trezor [−][src]
pub struct Trezor { /* fields omitted */ }
Expand description
A Trezor Ethereum App.
This is a simple wrapper around the Trezor transport
Implementations
pub async fn new(
derivation: DerivationType,
chain_id: u64,
cache_dir: Option<PathBuf>
) -> Result<Self, TrezorError>
Get the account which corresponds to our derivation path
pub async fn get_address_with_path(
&self,
derivation: &DerivationType
) -> Result<Address, TrezorError>
pub async fn get_address_with_path(
&self,
derivation: &DerivationType
) -> Result<Address, TrezorError>
Gets the account which corresponds to the provided derivation path
Signs an Ethereum transaction (requires confirmation on the Trezor)
pub async fn sign_message<S: AsRef<[u8]>>(
&self,
message: S
) -> Result<Signature, TrezorError>
pub async fn sign_message<S: AsRef<[u8]>>(
&self,
message: S
) -> Result<Signature, TrezorError>
Signs an ethereum personal message
pub async fn sign_typed_struct<T>(
&self,
payload: &T
) -> Result<Signature, TrezorError> where
T: Eip712,
pub async fn sign_typed_struct<T>(
&self,
payload: &T
) -> Result<Signature, TrezorError> where
T: Eip712,
Signs an EIP712 encoded domain separator and 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
Signs a EIP712 derived struct
type Error = TrezorError
Sets the signer’s chain id