pub trait PswapDistributionAPIServer<BlockHash, AccountId, BalanceInfo>: Sized + Send + Sync + 'static {
// Required method
fn claimable_amount(
&self,
account_id: AccountId,
at: Option<BlockHash>
) -> Result<BalanceInfo>;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned,
BalanceInfo: Send + Sync + 'static + Serialize { ... }
}
Expand description
Server trait implementation for the PswapDistributionAPI
RPC API.
Required Methods§
fn claimable_amount( &self, account_id: AccountId, at: Option<BlockHash> ) -> Result<BalanceInfo>
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
BlockHash: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned,
BalanceInfo: Send + Sync + 'static + Serialize,
fn into_rpc(self) -> RpcModule<Self>where BlockHash: Send + Sync + 'static + DeserializeOwned, AccountId: Send + Sync + 'static + DeserializeOwned, BalanceInfo: Send + Sync + 'static + Serialize,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.