pub trait MessagesRuntimeApi<Block: BlockT>: Core<Block> {
    // Provided methods
    fn get_messages_by_schema_and_block(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        schema_id: SchemaId,
        schema_payload_location: PayloadLocation,
        block_number: BlockNumber
    ) -> Result<Vec<MessageResponse>, ApiError> { ... }
    fn get_schema_by_id(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        schema_id: SchemaId
    ) -> Result<Option<SchemaResponse>, ApiError> { ... }
}
Expand description

Runtime Version for Messages

  • 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 Messages

Provided Methods§

source

fn get_messages_by_schema_and_block( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, schema_id: SchemaId, schema_payload_location: PayloadLocation, block_number: BlockNumber ) -> Result<Vec<MessageResponse>, ApiError>

Retrieve the messages for a particular schema and block number

source

fn get_schema_by_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, schema_id: SchemaId ) -> Result<Option<SchemaResponse>, ApiError>

Retrieve a schema by id

Trait Implementations§

source§

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

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§