pub trait RewardsApi<Block: BlockT, AccountId, Balance, CurrencyId>: Core<Block>
where AccountId: Codec, Balance: Codec, CurrencyId: Codec,
{ // Provided methods fn list_currencies( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain: RewardDomain, account_id: AccountId ) -> Result<Vec<CurrencyId>, ApiError> { ... } fn compute_reward( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain: RewardDomain, currency_id: CurrencyId, account_id: AccountId ) -> Result<Option<Balance>, ApiError> { ... } }
Expand description

Runtime API for the rewards pallet.

Provided Methods§

source

fn list_currencies( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain: RewardDomain, account_id: AccountId ) -> Result<Vec<CurrencyId>, ApiError>

source

fn compute_reward( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain: RewardDomain, currency_id: CurrencyId, account_id: AccountId ) -> Result<Option<Balance>, ApiError>

Trait Implementations§

source§

impl<Block: BlockT, AccountId, Balance, CurrencyId> RuntimeApiInfo for dyn RewardsApi<Block, AccountId, Balance, CurrencyId>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§