[][src]Trait ethers_signers::Signer

pub trait Signer: Debug + Send + Sync {
    type Error: Error + Send + Sync;
#[must_use]    pub fn sign_message<'life0, 'async_trait, S: Send + Sync + AsRef<[u8]>>(
        &'life0 self,
        message: S
    ) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>>
    where
        S: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn sign_transaction<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 TransactionRequest
    ) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
pub fn address(&self) -> Address; }

Trait for signing transactions and messages

Implement this trait to support different signing modes, e.g. Ledger, hosted etc.

Associated Types

Loading content...

Required methods

#[must_use]pub fn sign_message<'life0, 'async_trait, S: Send + Sync + AsRef<[u8]>>(
    &'life0 self,
    message: S
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
    S: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Signs the hash of the provided message after prefixing it

#[must_use]pub fn sign_transaction<'life0, 'life1, 'async_trait>(
    &'life0 self,
    message: &'life1 TransactionRequest
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Signs the transaction

pub fn address(&self) -> Address[src]

Returns the signer's Ethereum Address

Loading content...

Implementors

impl Signer for LedgerEthereum[src]

type Error = LedgerError

pub fn sign_message<'life0, 'async_trait, S: Send + Sync + AsRef<[u8]>>(
    &'life0 self,
    message: S
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
    S: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Signs the hash of the provided message after prefixing it

pub fn sign_transaction<'life0, 'life1, 'async_trait>(
    &'life0 self,
    message: &'life1 TransactionRequest
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Signs the transaction

pub fn address(&self) -> Address[src]

Returns the signer's Ethereum Address

impl<D: Sync + Send + DigestSigner<ProxyDigest<Sha256>, RecoverableSignature>> Signer for Wallet<D>[src]

type Error = Infallible

Loading content...