pub trait AuraApi<Block: BlockT, AuthorityId: Codec>: Core<Block> {
    // Provided methods
    fn slot_duration(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<SlotDuration, ApiError> { ... }
    fn slot_duration_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<SlotDuration, ApiError> { ... }
    fn authorities(
        &self,
        __runtime_api_at_param__: &BlockId<Block>
    ) -> Result<Vec<AuthorityId>, ApiError> { ... }
    fn authorities_with_context(
        &self,
        __runtime_api_at_param__: &BlockId<Block>,
        context: ExecutionContext
    ) -> Result<Vec<AuthorityId>, ApiError> { ... }
}
Expand description

API necessary for block authorship with aura.

Provided Methods§

source

fn slot_duration( &self, __runtime_api_at_param__: &BlockId<Block> ) -> Result<SlotDuration, ApiError>

Returns the slot duration for Aura.

Currently, only the value provided by this type at genesis will be used.

source

fn slot_duration_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext ) -> Result<SlotDuration, ApiError>

Returns the slot duration for Aura.

Currently, only the value provided by this type at genesis will be used.

source

fn authorities( &self, __runtime_api_at_param__: &BlockId<Block> ) -> Result<Vec<AuthorityId>, ApiError>

Return the current set of authorities.

source

fn authorities_with_context( &self, __runtime_api_at_param__: &BlockId<Block>, context: ExecutionContext ) -> Result<Vec<AuthorityId>, ApiError>

Return the current set of authorities.

Trait Implementations§

source§

impl<Block: BlockT, AuthorityId: Codec> RuntimeApiInfo for dyn AuraApi<Block, AuthorityId>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§