pub trait RpcService:
Send
+ Sync
+ 'static {
Show 18 methods
// Required methods
fn get_block_number<'life0, 'async_trait>(
&'life0 self,
request: Request<Flag>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransaction>,
) -> Pin<Box<dyn Future<Output = Result<Response<Hash>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_raw_transactions<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransactions>,
) -> Pin<Box<dyn Future<Output = Result<Response<Hashes>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_height_by_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_state_root_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<StateRoot>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_proof_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<Proof>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_detail_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<Block>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawTransaction>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<SystemConfig>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_system_config_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<SystemConfig>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<Hash>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_block_number<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transaction_index<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionIndex>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn add_node<'life0, 'async_trait>(
&'life0 self,
request: Request<NodeNetInfo>,
) -> Pin<Box<dyn Future<Output = Result<Response<StatusCode>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_node_status<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeStatus>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_cross_chain_proof<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<CrossChainProof>, 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 RpcServiceServer.
Required Methods§
Sourcefn get_block_number<'life0, 'async_trait>(
&'life0 self,
request: Request<Flag>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_number<'life0, 'async_trait>(
&'life0 self,
request: Request<Flag>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
flag means latest or pending. true means pending, false means latest.
fn send_raw_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransaction>,
) -> Pin<Box<dyn Future<Output = Result<Response<Hash>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_raw_transactions<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransactions>,
) -> Pin<Box<dyn Future<Output = Result<Response<Hashes>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_height_by_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state_root_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<StateRoot>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_proof_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<Proof>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_detail_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<Block>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<RawTransaction>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_config<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<SystemConfig>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_system_config_by_number<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<SystemConfig>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockNumber>,
) -> Pin<Box<dyn Future<Output = Result<Response<Hash>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_block_number<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockNumber>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_index<'life0, 'async_trait>(
&'life0 self,
request: Request<Hash>,
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionIndex>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn add_node<'life0, 'async_trait>(
&'life0 self,
request: Request<NodeNetInfo>,
) -> Pin<Box<dyn Future<Output = Result<Response<StatusCode>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_node<'life0, 'async_trait>(
&'life0 self,
request: Request<NodeNetInfo>,
) -> Pin<Box<dyn Future<Output = Result<Response<StatusCode>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
add new node