Trait rewards_rpc::RewardsAPIServer
source · 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§
fn claimables( &self, eth_address: EthAddress, at: Option<BlockHash> ) -> Result<VecBalanceInfo>
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
BlockHash: Send + Sync + 'static + DeserializeOwned,
EthAddress: Send + Sync + 'static + DeserializeOwned,
VecBalanceInfo: Send + Sync + 'static + Serialize,
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
.