pub trait SessionKeys<Block>: Core<Block>where
    Block: Block,{
    // Provided methods
    fn generate_session_keys(
        &self,
        __runtime_api_at_param__: <Block as Block>::Hash,
        seed: Option<Vec<u8, Global>>
    ) -> Result<Vec<u8, Global>, ApiError> { ... }
    fn decode_session_keys(
        &self,
        __runtime_api_at_param__: <Block as Block>::Hash,
        encoded: Vec<u8, Global>
    ) -> Result<Option<Vec<(Vec<u8, Global>, KeyTypeId), Global>>, ApiError> { ... }
}
Expand description

Session keys runtime api.

Provided Methods§

fn generate_session_keys( &self, __runtime_api_at_param__: <Block as Block>::Hash, seed: Option<Vec<u8, Global>> ) -> Result<Vec<u8, Global>, ApiError>

Generate a set of session keys with optionally using the given seed. The keys should be stored within the keystore exposed via runtime externalities.

The seed needs to be a valid utf8 string.

Returns the concatenated SCALE encoded public keys.

fn decode_session_keys( &self, __runtime_api_at_param__: <Block as Block>::Hash, encoded: Vec<u8, Global> ) -> Result<Option<Vec<(Vec<u8, Global>, KeyTypeId), Global>>, ApiError>

Decode the given public session keys.

Returns the list of public raw public keys + key type.

Trait Implementations§

§

impl<Block> RuntimeApiInfo for dyn SessionKeys<Block>where Block: Block,

§

const ID: [u8; 8] = [171u8, 60u8, 5u8, 114u8, 41u8, 31u8, 235u8, 139u8]

The identifier of the runtime api.
§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§