pub trait SystemApiServer<BlockHash, AccountId, Nonce>: Sized + Send + Sync + 'static {
// Required methods
fn nonce<'life0, 'async_trait>(
&'life0 self,
account: AccountId,
) -> Pin<Box<dyn Future<Output = RpcResult<Nonce>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
extrinsic: Bytes,
at: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self>
where BlockHash: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned,
Nonce: Send + Sync + 'static + Clone + Serialize { ... }
}
Expand description
Server trait implementation for the SystemApi
RPC API.
Required Methods§
sourcefn nonce<'life0, 'async_trait>(
&'life0 self,
account: AccountId,
) -> Pin<Box<dyn Future<Output = RpcResult<Nonce>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn nonce<'life0, 'async_trait>(
&'life0 self,
account: AccountId,
) -> Pin<Box<dyn Future<Output = RpcResult<Nonce>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the next valid index (aka nonce) for given account.
This method takes into consideration all pending transactions currently in the pool and if no transactions are found in the pool it fallbacks to query the index from the runtime (aka. state nonce).
sourcefn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
extrinsic: Bytes,
at: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
ext: &'life1 Extensions,
extrinsic: Bytes,
at: Option<BlockHash>,
) -> Pin<Box<dyn Future<Output = RpcResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dry run an extrinsic at a given block. Return SCALE encoded ApplyExtrinsicResult.
Provided Methods§
sourcefn into_rpc(self) -> RpcModule<Self>where
BlockHash: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned,
Nonce: Send + Sync + 'static + Clone + Serialize,
fn into_rpc(self) -> RpcModule<Self>where
BlockHash: Send + Sync + 'static + DeserializeOwned,
AccountId: Send + Sync + 'static + DeserializeOwned,
Nonce: Send + Sync + 'static + Clone + Serialize,
Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule
.
Object Safety§
This trait is not object safe.