SessionValidatorManagementApi

Trait SessionValidatorManagementApi 

Source
pub trait SessionValidatorManagementApi<Block: BlockT, AuthorityId, AuthorityKeys, ScEpochNumber: Encode + Decode>: Core<Block>
where AuthorityId: Encode + Decode, AuthorityKeys: Encode + Decode,
{ // Provided methods fn get_main_chain_scripts( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<MainChainScripts, ApiError> { ... } fn get_next_unset_epoch_number( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<ScEpochNumber, ApiError> { ... } fn get_current_committee_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>), ApiError> { ... } fn get_current_committee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>), ApiError> { ... } fn get_next_committee_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Option<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>)>, ApiError> { ... } fn get_next_committee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Option<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>)>, ApiError> { ... } fn calculate_committee_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, authority_selection_inputs: AuthoritySelectionInputs, sidechain_epoch: ScEpochNumber, ) -> Result<Option<Vec<(AuthorityId, AuthorityKeys)>>, ApiError> { ... } fn calculate_committee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, authority_selection_inputs: AuthoritySelectionInputs, sidechain_epoch: ScEpochNumber, ) -> Result<Option<Vec<CommitteeMember<AuthorityId, AuthorityKeys>>>, ApiError> { ... } }
Expand description

Runtime API declaration for Session Validator Management

Provided Methods§

Source

fn get_main_chain_scripts( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<MainChainScripts, ApiError>

Returns main chain scripts

Source

fn get_next_unset_epoch_number( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<ScEpochNumber, ApiError>

Returns next unset [sidechain_domain::ScEpochNumber]

Source

fn get_current_committee_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>), ApiError>

👎Deprecated

Returns current committee

Source

fn get_current_committee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>), ApiError>

Returns current committee

Source

fn get_next_committee_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Option<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>)>, ApiError>

👎Deprecated

Returns next committee

Source

fn get_next_committee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ) -> Result<Option<(ScEpochNumber, Vec<CommitteeMember<AuthorityId, AuthorityKeys>>)>, ApiError>

Returns next committee

Source

fn calculate_committee_before_version_2( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, authority_selection_inputs: AuthoritySelectionInputs, sidechain_epoch: ScEpochNumber, ) -> Result<Option<Vec<(AuthorityId, AuthorityKeys)>>, ApiError>

👎Deprecated

Calculates committee

Source

fn calculate_committee( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, authority_selection_inputs: AuthoritySelectionInputs, sidechain_epoch: ScEpochNumber, ) -> Result<Option<Vec<CommitteeMember<AuthorityId, AuthorityKeys>>>, ApiError>

Calculates committee

Trait Implementations§

Source§

impl<Block: BlockT, AuthorityId, AuthorityKeys, ScEpochNumber: Encode + Decode> RuntimeApiInfo for dyn SessionValidatorManagementApi<Block, AuthorityId, AuthorityKeys, ScEpochNumber>

Source§

const ID: [u8; 8]

The identifier of the runtime api.
Source§

const VERSION: u32 = 3u32

The version of the runtime api.

Implementors§