pub trait PortalApiServer<AccountId, Balance, Hash>: Sized + Send + Sync + 'static {
    // Required methods
    fn fetch_head_height(&self, chain_id: ChainId) -> RpcResult<u128>;
    fn fetch_all_active_xtx(
        &self,
        for_executor: AccountId
    ) -> RpcResult<Vec<(Hash, Vec<SideEffect<AccountId, Balance>>, Vec<Hash>)>>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where AccountId: Send + Sync + 'static + DeserializeOwned + Serialize,
             Balance: Send + Sync + 'static + Serialize,
             Hash: Send + Sync + 'static + Serialize { ... }
}
Expand description

Server trait implementation for the PortalApi RPC API.

Required Methods§

source

fn fetch_head_height(&self, chain_id: ChainId) -> RpcResult<u128>

Returns latest finalized header of a gateway if available

source

fn fetch_all_active_xtx( &self, for_executor: AccountId ) -> RpcResult<Vec<(Hash, Vec<SideEffect<AccountId, Balance>>, Vec<Hash>)>>

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where AccountId: Send + Sync + 'static + DeserializeOwned + Serialize, Balance: Send + Sync + 'static + Serialize, Hash: Send + Sync + 'static + Serialize,

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

Implementors§

source§

impl<C, Block, AccountId, Balance, Hash> PortalApiServer<AccountId, Balance, Hash> for Portal<C, Block>where AccountId: Codec + MaybeDisplay, Balance: Codec + MaybeDisplay, Hash: Codec + MaybeDisplay, Block: BlockT, C: ProvideRuntimeApi<Block> + HeaderBackend<Block> + Send + Sync + 'static, C::Api: PortalRuntimeApi<Block, AccountId, Balance, Hash>,