ChainAdapter

Trait ChainAdapter 

Source
pub trait ChainAdapter: Send + Sync {
    // Required methods
    fn get_transaction_status<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tx_hash: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn validate_address(&self, address: &Address) -> bool;
    fn chain_name(&self) -> &str;
}
Expand description

Trait for blockchain adapters

Required Methods§

Source

fn get_transaction_status<'life0, 'life1, 'async_trait>( &'life0 self, tx_hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the transaction status

Source

fn validate_address(&self, address: &Address) -> bool

Validate an address for this chain

Source

fn chain_name(&self) -> &str

Get the chain name

Implementors§