pub trait Api:
Send
+ Sync
+ 'static {
// Required methods
fn status<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorStatus>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_proven_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<ProvenTransaction>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn sign_block<'life0, 'async_trait>(
&'life0 self,
request: Request<ProposedBlock>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockSignature>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with ApiServer.
Required Methods§
Sourcefn status<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorStatus>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorStatus>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the status info of the validator.
Sourcefn submit_proven_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<ProvenTransaction>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_proven_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<ProvenTransaction>,
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits a transaction to the validator.
Sourcefn sign_block<'life0, 'async_trait>(
&'life0 self,
request: Request<ProposedBlock>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockSignature>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sign_block<'life0, 'async_trait>(
&'life0 self,
request: Request<ProposedBlock>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockSignature>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validates a proposed block and returns the block header and body.