Trait oasis_core_runtime::host::Host
source · pub trait Host: Send + Sync {
// Required methods
fn identity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PublicKey, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_tx<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
opts: SubmitTxOpts,
) -> Pin<Box<dyn Future<Output = Result<Option<TxResult>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_notify<'life0, 'async_trait>(
&'life0 self,
opts: RegisterNotifyOpts,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Interface to the (untrusted) host node.
Required Methods§
sourcefn identity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PublicKey, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn identity<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PublicKey, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the identity of the host node.
sourcefn submit_tx<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
opts: SubmitTxOpts,
) -> Pin<Box<dyn Future<Output = Result<Option<TxResult>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_tx<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
opts: SubmitTxOpts,
) -> Pin<Box<dyn Future<Output = Result<Option<TxResult>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submit a transaction.
sourcefn register_notify<'life0, 'async_trait>(
&'life0 self,
opts: RegisterNotifyOpts,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_notify<'life0, 'async_trait>(
&'life0 self,
opts: RegisterNotifyOpts,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register for receiving notifications.