[go: up one dir, main page]

Signer

Trait Signer 

Source
pub trait Signer {
    // Required methods
    fn sign<'life0, 'async_trait>(
        &'life0 self,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn address(&self) -> Address;
}
Expand description

Trait for signing transactions and messages

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

Required Methods§

Source

fn sign<'life0, 'async_trait>( &'life0 self, message: Message, ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn address(&self) -> Address

Trait Implementations§

Source§

impl Debug for dyn Signer + Send + Sync

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementations on Foreign Types§

Source§

impl<'a, T: 'a + Signer + ?Sized> Signer for &'a T

Source§

fn sign<'life0, 'async_trait>( &'life0 self, message: Message, ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn address(&self) -> Address

Source§

impl<T: Signer + ?Sized> Signer for Box<T>

Source§

fn sign<'life0, 'async_trait>( &'life0 self, message: Message, ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn address(&self) -> Address

Source§

impl<T: Signer + ?Sized> Signer for Rc<T>

Source§

fn sign<'life0, 'async_trait>( &'life0 self, message: Message, ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn address(&self) -> Address

Source§

impl<T: Signer + ?Sized> Signer for Arc<T>

Source§

fn sign<'life0, 'async_trait>( &'life0 self, message: Message, ) -> Pin<Box<dyn Future<Output = Result<Signature>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn address(&self) -> Address

Implementors§