Skip to main content

AccountSigner

Trait AccountSigner 

Source
pub trait AccountSigner: Send + Sync {
    // Required methods
    fn public_key(&self) -> &str;
    fn sign_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn public_key(&self) -> &str

Canonical base58 wallet address whose account state is being read.

Source

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

Sign only the exact SDK-generated, short-lived account-read message.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§