pub trait RewardApiClient<BlockHash, AccountId, VaultId, CurrencyId, Balance, BlockNumber, UnsignedFixedPoint>: ClientTwhere
    BlockHash: Send + Sync + 'static + Serialize,
    AccountId: Send + Sync + 'static + Serialize + Codec,
    VaultId: Send + Sync + 'static + Serialize + Codec,
    CurrencyId: Send + Sync + 'static + Serialize + Codec,
    Balance: Send + Sync + 'static + Serialize + DeserializeOwned + Codec + MaybeDisplay + MaybeFromStr,
    BlockNumber: Send + Sync + 'static + Serialize + Codec,
    UnsignedFixedPoint: Send + Sync + 'static + DeserializeOwned + Codec,{
    // Provided methods
    fn compute_escrow_reward<'life0, 'async_trait>(
        &'life0 self,
        account_id: AccountId,
        currency_id: CurrencyId,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn compute_farming_reward<'life0, 'async_trait>(
        &'life0 self,
        account_id: AccountId,
        pool_currency_id: CurrencyId,
        reward_currency_id: CurrencyId,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn compute_vault_reward<'life0, 'async_trait>(
        &'life0 self,
        vault_id: VaultId,
        currency_id: CurrencyId,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn estimate_escrow_reward_rate<'life0, 'async_trait>(
        &'life0 self,
        account_id: AccountId,
        amount: Option<Balance>,
        lock_time: Option<BlockNumber>,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<UnsignedFixedPoint>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn estimate_farming_reward<'life0, 'async_trait>(
        &'life0 self,
        account_id: AccountId,
        pool_currency_id: CurrencyId,
        reward_currency_id: CurrencyId,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn estimate_vault_reward_rate<'life0, 'async_trait>(
        &'life0 self,
        vault_id: VaultId,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<UnsignedFixedPoint>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Client implementation for the RewardApi RPC API.

Provided Methods§

source

fn compute_escrow_reward<'life0, 'async_trait>( &'life0 self, account_id: AccountId, currency_id: CurrencyId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn compute_farming_reward<'life0, 'async_trait>( &'life0 self, account_id: AccountId, pool_currency_id: CurrencyId, reward_currency_id: CurrencyId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn compute_vault_reward<'life0, 'async_trait>( &'life0 self, vault_id: VaultId, currency_id: CurrencyId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn estimate_escrow_reward_rate<'life0, 'async_trait>( &'life0 self, account_id: AccountId, amount: Option<Balance>, lock_time: Option<BlockNumber>, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<UnsignedFixedPoint>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn estimate_farming_reward<'life0, 'async_trait>( &'life0 self, account_id: AccountId, pool_currency_id: CurrencyId, reward_currency_id: CurrencyId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<BalanceWrapper<Balance>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

source

fn estimate_vault_reward_rate<'life0, 'async_trait>( &'life0 self, vault_id: VaultId, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<UnsignedFixedPoint>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<TypeJsonRpseeInteral, BlockHash, AccountId, VaultId, CurrencyId, Balance, BlockNumber, UnsignedFixedPoint> RewardApiClient<BlockHash, AccountId, VaultId, CurrencyId, Balance, BlockNumber, UnsignedFixedPoint> for TypeJsonRpseeInteralwhere TypeJsonRpseeInteral: ClientT, BlockHash: Send + Sync + 'static + Serialize, AccountId: Send + Sync + 'static + Serialize + Codec, VaultId: Send + Sync + 'static + Serialize + Codec, CurrencyId: Send + Sync + 'static + Serialize + Codec, Balance: Send + Sync + 'static + Serialize + DeserializeOwned + Codec + MaybeDisplay + MaybeFromStr, BlockNumber: Send + Sync + 'static + Serialize + Codec, UnsignedFixedPoint: Send + Sync + 'static + DeserializeOwned + Codec,