pub trait MessengerApi<Block: BlockT, CNumber, CHash>: Core<Block>where
CNumber: Encode + Decode,
CHash: Encode + Decode,{
// Provided methods
fn is_xdm_mmr_proof_valid(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
ext: &Block::Extrinsic,
) -> Result<Option<bool>, ApiError> { ... }
fn extract_xdm_mmr_proof(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
ext: &Block::Extrinsic,
) -> Result<Option<ConsensusChainMmrLeafProof<CNumber, CHash, H256>>, ApiError> { ... }
fn confirmed_domain_block_storage_key(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Vec<u8>, ApiError> { ... }
fn outbox_storage_key(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
message_key: MessageKey,
) -> Result<Vec<u8>, ApiError> { ... }
fn inbox_response_storage_key(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
message_key: MessageKey,
) -> Result<Vec<u8>, ApiError> { ... }
fn domain_chains_allowlist_update(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<DomainAllowlistUpdates>, ApiError> { ... }
fn xdm_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
ext: &Block::Extrinsic,
) -> Result<Option<XdmId>, ApiError> { ... }
fn channel_nonce(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
chain_id: ChainId,
channel_id: ChannelId,
) -> Result<Option<ChannelNonce>, ApiError> { ... }
}
Expand description
Api to provide XDM extraction from Runtime Calls.
Provided Methods§
Sourcefn is_xdm_mmr_proof_valid(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
ext: &Block::Extrinsic,
) -> Result<Option<bool>, ApiError>
fn is_xdm_mmr_proof_valid( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ext: &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 BlockT>::Hash, ext: &Block::Extrinsic, ) -> Result<Option<ConsensusChainMmrLeafProof<CNumber, CHash, H256>>, ApiError>
Sourcefn confirmed_domain_block_storage_key(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Vec<u8>, ApiError>
fn confirmed_domain_block_storage_key( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Vec<u8>, ApiError>
Returns the confirmed domain block storage for given domain.
Sourcefn outbox_storage_key(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
message_key: MessageKey,
) -> Result<Vec<u8>, ApiError>
fn outbox_storage_key( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, message_key: MessageKey, ) -> Result<Vec<u8>, ApiError>
Returns storage key for outbox for a given message_id.
Sourcefn inbox_response_storage_key(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
message_key: MessageKey,
) -> Result<Vec<u8>, ApiError>
fn inbox_response_storage_key( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, message_key: MessageKey, ) -> Result<Vec<u8>, ApiError>
Returns storage key for inbox response for a given message_id.
Sourcefn domain_chains_allowlist_update(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
domain_id: DomainId,
) -> Result<Option<DomainAllowlistUpdates>, ApiError>
fn domain_chains_allowlist_update( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, domain_id: DomainId, ) -> Result<Option<DomainAllowlistUpdates>, ApiError>
Returns any domain’s chains allowlist updates on consensus chain.
Sourcefn xdm_id(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
ext: &Block::Extrinsic,
) -> Result<Option<XdmId>, ApiError>
fn xdm_id( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, ext: &Block::Extrinsic, ) -> Result<Option<XdmId>, ApiError>
Returns XDM message ID
Sourcefn channel_nonce(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
chain_id: ChainId,
channel_id: ChannelId,
) -> Result<Option<ChannelNonce>, ApiError>
fn channel_nonce( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, chain_id: ChainId, channel_id: ChannelId, ) -> Result<Option<ChannelNonce>, ApiError>
Get Channel nonce for given chain and channel id.