Trait APIAdapter

Source
pub trait APIAdapter: Send + Sync {
    // Required methods
    fn insert_signed_txs<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context,
        signed_tx: SignedTransaction,
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_epoch_by_id<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context,
        epoch_id: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<Epoch>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_receipt_by_tx_hash<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context,
        tx_hash: Hash,
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<Receipt>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_transaction_by_hash<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context,
        tx_hash: Hash,
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<SignedTransaction>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_service<'life0, 'async_trait>(
        &'life0 self,
        ctx: Context,
        epoch_id: u64,
        cycles_limit: u64,
        cycles_price: u64,
        caller: Address,
        service_name: String,
        method: String,
        payload: String,
    ) -> Pin<Box<dyn Future<Output = ProtocolResult<ExecResp>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn insert_signed_txs<'life0, 'async_trait>( &'life0 self, ctx: Context, signed_tx: SignedTransaction, ) -> Pin<Box<dyn Future<Output = ProtocolResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_epoch_by_id<'life0, 'async_trait>( &'life0 self, ctx: Context, epoch_id: Option<u64>, ) -> Pin<Box<dyn Future<Output = ProtocolResult<Epoch>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_receipt_by_tx_hash<'life0, 'async_trait>( &'life0 self, ctx: Context, tx_hash: Hash, ) -> Pin<Box<dyn Future<Output = ProtocolResult<Receipt>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_transaction_by_hash<'life0, 'async_trait>( &'life0 self, ctx: Context, tx_hash: Hash, ) -> Pin<Box<dyn Future<Output = ProtocolResult<SignedTransaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn query_service<'life0, 'async_trait>( &'life0 self, ctx: Context, epoch_id: u64, cycles_limit: u64, cycles_price: u64, caller: Address, service_name: String, method: String, payload: String, ) -> Pin<Box<dyn Future<Output = ProtocolResult<ExecResp>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§