pub trait NominationPoolsApi<Block: BlockT, AccountId, Balance>: Core<Block>where
    AccountId: Codec,
    Balance: Codec,{
    // Provided methods
    fn pending_rewards(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        who: AccountId
    ) -> Result<Balance, ApiError> { ... }
    fn points_to_balance(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        pool_id: PoolId,
        points: Balance
    ) -> Result<Balance, ApiError> { ... }
    fn balance_to_points(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        pool_id: PoolId,
        new_funds: Balance
    ) -> Result<Balance, ApiError> { ... }
}
Expand description

Runtime api for accessing information about nomination pools.

Provided Methods§

source

fn pending_rewards( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, who: AccountId ) -> Result<Balance, ApiError>

Returns the pending rewards for the member that the AccountId was given for.

source

fn points_to_balance( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, points: Balance ) -> Result<Balance, ApiError>

Returns the equivalent balance of points for a given pool.

source

fn balance_to_points( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, pool_id: PoolId, new_funds: Balance ) -> Result<Balance, ApiError>

Returns the equivalent points of new_funds for a given pool.

Trait Implementations§

source§

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

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§