pub trait XdnsApiServer<AccountId>: Sized + Send + Sync + 'static {
    // Required methods
    fn fetch_records(&self) -> RpcResult<Vec<GatewayRecord<AccountId>>>;
    fn fetch_abi(&self, chain_id: ChainId) -> RpcResult<GatewayABIConfig>;
    fn fetch_full_gateway_records(
        &self
    ) -> RpcResult<Vec<FullGatewayRecord<AccountId>>>;

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

Server trait implementation for the XdnsApi RPC API.

Required Methods§

source

fn fetch_records(&self) -> RpcResult<Vec<GatewayRecord<AccountId>>>

Returns all known XDNS records

source

fn fetch_abi(&self, chain_id: ChainId) -> RpcResult<GatewayABIConfig>

source

fn fetch_full_gateway_records( &self ) -> RpcResult<Vec<FullGatewayRecord<AccountId>>>

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where AccountId: 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> XdnsApiServer<AccountId> for Xdns<C, Block>where AccountId: Codec + MaybeDisplay, Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: XdnsRuntimeApi<Block, AccountId>,