Trait MoonbeamFinalityApiServer

Source
pub trait MoonbeamFinalityApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn is_block_finalized<'life0, 'async_trait>(
        &'life0 self,
        block_hash: H256,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_tx_finalized<'life0, 'async_trait>(
        &'life0 self,
        tx_hash: H256,
    ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_frontier_sync_block_range<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<(H256, H256)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the MoonbeamFinalityApi RPC API.

Required Methods§

Source

fn is_block_finalized<'life0, 'async_trait>( &'life0 self, block_hash: H256, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reports whether a Substrate or Ethereum block is finalized. Returns false if the block is not found.

Source

fn is_tx_finalized<'life0, 'async_trait>( &'life0 self, tx_hash: H256, ) -> Pin<Box<dyn Future<Output = RpcResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reports whether an Ethereum transaction is finalized. Returns false if the transaction is not found

Source

fn get_frontier_sync_block_range<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<(H256, H256)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets the range of blocks that are fully indexed in frontier’s backend.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<B, C> MoonbeamFinalityApiServer for MoonbeamFinality<B, C>
where B: Block<Hash = H256>, C: HeaderBackend<B> + Send + Sync + 'static,