Trait reward_rpc_runtime_api::RewardApi
source · pub trait RewardApi<Block: BlockT, AccountId, VaultId, CurrencyId, Balance, BlockNumber, UnsignedFixedPoint>: Core<Block>where
AccountId: Codec,
VaultId: Codec,
CurrencyId: Codec,
Balance: Codec,
BlockNumber: Codec,
UnsignedFixedPoint: Codec,{
// Provided methods
fn compute_escrow_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError> { ... }
fn compute_farming_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
pool_currency_id: CurrencyId,
reward_currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError> { ... }
fn compute_vault_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
vault_id: VaultId,
currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError> { ... }
fn estimate_escrow_reward_rate(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
amount: Option<Balance>,
lock_time: Option<BlockNumber>
) -> Result<Result<UnsignedFixedPoint, DispatchError>, ApiError> { ... }
fn estimate_farming_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
pool_currency_id: CurrencyId,
reward_currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError> { ... }
fn estimate_vault_reward_rate(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
vault_id: VaultId
) -> Result<Result<UnsignedFixedPoint, DispatchError>, ApiError> { ... }
}
Provided Methods§
sourcefn compute_escrow_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
fn compute_escrow_reward( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account_id: AccountId, currency_id: CurrencyId ) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
Calculate the number of escrow rewards accrued
sourcefn compute_farming_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
pool_currency_id: CurrencyId,
reward_currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
fn compute_farming_reward( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account_id: AccountId, pool_currency_id: CurrencyId, reward_currency_id: CurrencyId ) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
Calculate the number of farming rewards accrued
sourcefn compute_vault_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
vault_id: VaultId,
currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
fn compute_vault_reward( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, vault_id: VaultId, currency_id: CurrencyId ) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
Calculate the number of vault rewards accrued
sourcefn estimate_escrow_reward_rate(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
amount: Option<Balance>,
lock_time: Option<BlockNumber>
) -> Result<Result<UnsignedFixedPoint, DispatchError>, ApiError>
fn estimate_escrow_reward_rate( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account_id: AccountId, amount: Option<Balance>, lock_time: Option<BlockNumber> ) -> Result<Result<UnsignedFixedPoint, DispatchError>, ApiError>
Estimate staking reward rate for a one year period
sourcefn estimate_farming_reward(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account_id: AccountId,
pool_currency_id: CurrencyId,
reward_currency_id: CurrencyId
) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
fn estimate_farming_reward( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account_id: AccountId, pool_currency_id: CurrencyId, reward_currency_id: CurrencyId ) -> Result<Result<BalanceWrapper<Balance>, DispatchError>, ApiError>
Estimate farming rewards for remaining incentives
sourcefn estimate_vault_reward_rate(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
vault_id: VaultId
) -> Result<Result<UnsignedFixedPoint, DispatchError>, ApiError>
fn estimate_vault_reward_rate( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, vault_id: VaultId ) -> Result<Result<UnsignedFixedPoint, DispatchError>, ApiError>
Estimate vault reward rate for a one year period