pub trait BridgeProxyAPIServer<BlockHash, AssetId>: Sized + Send + Sync + 'staticwhere
    BlockHash: Codec,
    AssetId: Codec + Serialize,{
    // Required methods
    fn list_apps(&self, at: Option<BlockHash>) -> Result<Vec<BridgeAppInfo>>;
    fn list_supported_assets(
        &self,
        network_id: GenericNetworkId,
        at: Option<BlockHash>
    ) -> Result<Vec<BridgeAssetInfo>>;

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

Server trait implementation for the BridgeProxyAPI RPC API.

Required Methods§

source

fn list_apps(&self, at: Option<BlockHash>) -> Result<Vec<BridgeAppInfo>>

source

fn list_supported_assets( &self, network_id: GenericNetworkId, at: Option<BlockHash> ) -> Result<Vec<BridgeAssetInfo>>

Provided Methods§

source

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

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

Implementors§

source§

impl<C, Block, AssetId> BridgeProxyAPIServer<<Block as Block>::Hash, AssetId> for BridgeProxyClient<C, Block>where Block: BlockT, AssetId: Codec + Serialize + Clone, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: BridgeProxyRuntimeAPI<Block, AssetId>,