pub trait StakingRewardsApiClient<BlockHash, Balance>: ClientTwhere
BlockHash: Send + Sync + 'static + Serialize,
Balance: Send + Sync + 'static + Serialize + DeserializeOwned,{
// Provided methods
fn yearly_emission<'life0, 'async_trait>(
&'life0 self,
total_staked: Balance,
total_issuance: Balance,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn max_yearly_emission<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the StakingRewardsApi
RPC API.
Provided Methods§
sourcefn yearly_emission<'life0, 'async_trait>(
&'life0 self,
total_staked: Balance,
total_issuance: Balance,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn yearly_emission<'life0, 'async_trait>( &'life0 self, total_staked: Balance, total_issuance: Balance, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Emission reward 1 year from now given the currently staked funds and issuance. Depends on the reward curve, decay percentage and remaining emission supply.
sourcefn max_yearly_emission<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn max_yearly_emission<'life0, 'async_trait>( &'life0 self, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Maximum emission reward for 1 year from now. Depends on decay percentage and remaining emission supply.