pub trait RewardsAPIServer<BlockHash, EthAddress, VecBalanceInfo>: Sized + Send + Sync + 'static {
    // Required method
    fn claimables(
        &self,
        eth_address: EthAddress,
        at: Option<BlockHash>
    ) -> Result<VecBalanceInfo>;

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

Server trait implementation for the RewardsAPI RPC API.

Required Methods§

source

fn claimables( &self, eth_address: EthAddress, at: Option<BlockHash> ) -> Result<VecBalanceInfo>

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static + DeserializeOwned, EthAddress: Send + Sync + 'static + DeserializeOwned, VecBalanceInfo: 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, EthAddress, Balance> RewardsAPIServer<<Block as Block>::Hash, EthAddress, Vec<BalanceInfo<Balance>, Global>> for RewardsClient<C, Block>where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: RewardsRuntimeAPI<Block, EthAddress, Balance>, EthAddress: Codec, Balance: Codec + MaybeFromStr + MaybeDisplay,