pub trait SchemasRuntimeApi<Block: BlockT>: Core<Block> {
    // Provided methods
    fn get_by_schema_id(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        schema_id: SchemaId
    ) -> Result<Option<SchemaResponse>, ApiError> { ... }
    fn get_schema_versions_by_name(
        &self,
        __runtime_api_at_param__: <Block as BlockT>::Hash,
        schema_name: Vec<u8>
    ) -> Result<Option<Vec<SchemaVersionResponse>>, ApiError> { ... }
}
Expand description

Runtime Version for Schemas

  • 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 API definition for Schemas

Provided Methods§

source

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

Fetch the schema by id

source

fn get_schema_versions_by_name( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, schema_name: Vec<u8> ) -> Result<Option<Vec<SchemaVersionResponse>>, ApiError>

Fetch the schema versions by name

Trait Implementations§

source§

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

source§

const ID: [u8; 8] = _

The identifier of the runtime api.
source§

const VERSION: u32 = 2u32

The version of the runtime api.

Implementors§