Skip to main content

WalletSigner

Trait WalletSigner 

Source
pub trait WalletSigner: Send + Sync {
    // Required methods
    fn chain(&self) -> &str;
    fn address(&self) -> &str;
    fn sign_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for wallet signers (EVM or Solana).

Required Methods§

Source

fn chain(&self) -> &str

Returns “evm” or “solana”.

Source

fn address(&self) -> &str

Returns the wallet address (hex for EVM, Base58 for Solana).

Source

fn sign_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sign a message and return the signature string.

Implementors§