pub trait SystemApi {
type ChainType;
type Properties;
type Health;
// Required methods
fn get_system_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_chain_type<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::ChainType>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Properties>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Health>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_local_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_local_listen_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Helper functions for some common SystemApi function.
Required Associated Types§
Required Methods§
Sourcefn get_system_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the node’s implementation name.
Sourcefn get_system_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the node implementation’s version. Should be a semver string.
Sourcefn get_system_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_chain<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the chain’s name. Given as a string identifier.
Sourcefn get_system_chain_type<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::ChainType>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_chain_type<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::ChainType>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the chain’s type.
Sourcefn get_system_properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Properties>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_properties<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Properties>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a custom set of properties as a JSON object, defined in the chain spec.
Sourcefn get_system_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Health>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Health>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return health status of the node.
Node is considered healthy if it is:
- connected to some peers (unless running in dev mode)
- not performing a major sync
Sourcefn get_system_local_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_local_peer_id<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the base58-encoded PeerId of the node.
Sourcefn get_system_local_listen_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_local_listen_addresses<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the multi-addresses that the local node is listening on.
The addresses include a trailing /p2p/
with the local PeerId, and are thus suitable to
be passed to addReservedPeer
or as a bootnode address for example.