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§
sourcefn 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_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
sourcefn get_schema_by_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
schema_id: SchemaId
) -> Result<Option<SchemaResponse>, ApiError>
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