pub trait Signer {
    // Required methods
    fn account(&self) -> AccountId;
    fn sign<'life0, 'life1, 'async_trait>(
        &'life0 self,
        msg: &'life1 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<MultiSignature>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn nonce(&self) -> Option<u32> { ... }
    fn set_nonce(&mut self, _nonce: u32) { ... }
}

Required Methods§

source

fn account(&self) -> AccountId

source

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

Provided Methods§

source

fn nonce(&self) -> Option<u32>

Optional - The signer can manage their nonce for improve transaction performance. The default implmentation will query the next nonce from chain storage.

source

fn set_nonce(&mut self, _nonce: u32)

Optional - The signer can manage their nonce for improve transaction performance. If the transaction is accepted by the RPC node, then the nonce we be increased, to allow the next transaction to be signed & submitted without waiting for the next block.

Implementors§