pub trait DevApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn inject_downward_message<'life0, 'async_trait>(
&'life0 self,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn inject_hrmp_message<'life0, 'async_trait>(
&'life0 self,
sender: ParaId,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn skip_relay_blocks<'life0, 'async_trait>(
&'life0 self,
n: u32,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the DevApi RPC API.
Required Methods§
Sourcefn inject_downward_message<'life0, 'async_trait>(
&'life0 self,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inject_downward_message<'life0, 'async_trait>(
&'life0 self,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inject a downward xcm message - A message that comes from the relay chain. You may provide an arbitrary message, or if you provide an empty byte array, Then a default message (DOT transfer down to ALITH) will be injected
Sourcefn inject_hrmp_message<'life0, 'async_trait>(
&'life0 self,
sender: ParaId,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn inject_hrmp_message<'life0, 'async_trait>(
&'life0 self,
sender: ParaId,
message: Vec<u8>,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inject an HRMP message - A message that comes from a dedicated channel to a sibling parachain.
Cumulus Parachain System seems to have a constraint that at most one hrmp message will be sent on a channel per block. At least that’s what this comment implies: https://github.com/paritytech/cumulus/blob/c308c01b/pallets/parachain-system/src/lib.rs#L204 Neither this RPC, nor the mock inherent data provider make any attempt to enforce this constraint. In fact, violating it may be useful for testing. The method accepts a sending paraId and a bytearray representing an arbitrary message as parameters. If you provide an empty byte array, then a default message representing a transfer of the sending paraId’s native token will be injected.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.