pub trait HandlesRuntimeApi<Block: BlockT>: Core<Block> {
    // Provided methods
    fn get_handle_for_msa(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        msa_id: MessageSourceId
    ) -> Result<Option<HandleResponse>, ApiError> { ... }
    fn get_next_suffixes(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        base_handle: BaseHandle,
        count: u16
    ) -> Result<PresumptiveSuffixesResponse, ApiError> { ... }
    fn get_msa_for_handle(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        display_handle: DisplayHandle
    ) -> Result<Option<MessageSourceId>, ApiError> { ... }
    fn validate_handle(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        base_handle: BaseHandle
    ) -> Result<bool, ApiError> { ... }
}
Expand description

Runtime Version for Handles

  • MUST be incremented if anything changes
  • Also update in js/api-augment
  • See: https://paritytech.github.io/polkadot/doc/polkadot_primitives/runtime_api/index.html Runtime APIs for Handles

Provided Methods§

source

fn get_handle_for_msa( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, msa_id: MessageSourceId ) -> Result<Option<HandleResponse>, ApiError>

Retrieve handle for a particular msa

source

fn get_next_suffixes( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, base_handle: BaseHandle, count: u16 ) -> Result<PresumptiveSuffixesResponse, ApiError>

Retrieve the next n suffixes for a given handle

source

fn get_msa_for_handle( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, display_handle: DisplayHandle ) -> Result<Option<MessageSourceId>, ApiError>

Retrieve msa for a particular handle

source

fn validate_handle( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, base_handle: BaseHandle ) -> Result<bool, ApiError>

Check if a handle is valid

Trait Implementations§

source§

impl<Block: BlockT> RuntimeApiInfo for dyn HandlesRuntimeApi<Block>

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§