pub trait AnchorApiServer<IdHash, BlockHash>: Sized + Send + Sync + 'static {
    // Required method
    fn get_anchor_by_id(
        &self,
        id: IdHash,
        at: Option<BlockHash>
    ) -> RpcResult<AnchorData<IdHash, BlockNumber>>;

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

Server trait implementation for the AnchorApi RPC API.

Required Methods§

source

fn get_anchor_by_id( &self, id: IdHash, at: Option<BlockHash> ) -> RpcResult<AnchorData<IdHash, BlockNumber>>

Returns an anchor given an anchor id from the runtime storage

Provided Methods§

source

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

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

Implementors§

source§

impl<C, Block> AnchorApiServer<<BlakeTwo256 as Hash>::Output, <Block as Block>::Hash> for Anchors<C, Block>where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: AnchorRuntimeApi<Block, Hash, BlockNumber>,