sp_messenger_host_functions

Trait MessengerApi

pub trait MessengerApi<Block, CNumber, CHash>: Core<Block>
where Block: Block, CNumber: Encode + Decode, CHash: Encode + Decode,
{ // Provided methods fn is_xdm_mmr_proof_valid( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<bool>, ApiError> { ... } fn extract_xdm_mmr_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<ConsensusChainMmrLeafProof<CNumber, CHash, H256>>, ApiError> { ... } fn confirmed_domain_block_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Vec<u8>, ApiError> { ... } fn outbox_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError> { ... } fn inbox_response_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError> { ... } fn domain_chains_allowlist_update( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<DomainAllowlistUpdates>, ApiError> { ... } }
Expand description

Api to provide XDM extraction from Runtime Calls.

Provided Methods§

fn is_xdm_mmr_proof_valid( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<bool>, ApiError>

Returns Some(true) if valid XDM or Some(false) if not Returns None if this is not an XDM

fn extract_xdm_mmr_proof( &self, __runtime_api_at_param__: <Block as Block>::Hash, ext: &<Block as Block>::Extrinsic, ) -> Result<Option<ConsensusChainMmrLeafProof<CNumber, CHash, H256>>, ApiError>

fn confirmed_domain_block_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Vec<u8>, ApiError>

Returns the confirmed domain block storage for given domain.

fn outbox_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError>

Returns storage key for outbox for a given message_id.

fn inbox_response_storage_key( &self, __runtime_api_at_param__: <Block as Block>::Hash, message_key: (ChainId, U256, U256), ) -> Result<Vec<u8>, ApiError>

Returns storage key for inbox response for a given message_id.

fn domain_chains_allowlist_update( &self, __runtime_api_at_param__: <Block as Block>::Hash, domain_id: DomainId, ) -> Result<Option<DomainAllowlistUpdates>, ApiError>

Returns any domain’s chains allowlist updates on consensus chain.

Trait Implementations§

§

impl<Block, CNumber, CHash> RuntimeApiInfo for dyn MessengerApi<Block, CNumber, CHash>
where Block: Block,

§

const ID: [u8; 8] = _

The identifier of the runtime api.
§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementations on Foreign Types§

§

impl<CBlock, Block, Executor> MessengerApi<Block, <<CBlock as Block>::Header as Header>::Number, <CBlock as Block>::Hash> for StatelessRuntime<CBlock, Block, Executor>
where CBlock: Block, Block: Block, <<Block as Block>::Header as Header>::Number: Codec, Executor: CodeExecutor + RuntimeVersionOf,

Implementors§