pub trait ContractsRegistryApiServer<AccountId>: Sized + Send + Sync + 'static {
    // Required method
    fn fetch_contracts(
        &self,
        author: Option<AccountId>,
        metadata: Option<Vec<u8>>
    ) -> RpcResult<FetchContractsResult>;

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

Server trait implementation for the ContractsRegistryApi RPC API.

Required Methods§

source

fn fetch_contracts( &self, author: Option<AccountId>, metadata: Option<Vec<u8>> ) -> RpcResult<FetchContractsResult>

Returns the contracts searchable by name, author or metadata

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where AccountId: 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, AccountId> ContractsRegistryApiServer<AccountId> for ContractsRegistry<C, Block>where AccountId: Codec + MaybeDisplay, Block: BlockT, C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: ContractsRegistryRuntimeApi<Block, AccountId>,