pub trait Service:
Send
+ Sync
+ 'static {
// Required methods
fn simulate<'life0, 'async_trait>(
&'life0 self,
request: Request<SimulateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SimulateResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn broadcast_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<BroadcastTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BroadcastTxResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_txs_event<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTxsEventRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTxsEventResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_with_txs<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockWithTxsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetBlockWithTxsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn tx_decode<'life0, 'async_trait>(
&'life0 self,
request: Request<TxDecodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxDecodeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn tx_encode<'life0, 'async_trait>(
&'life0 self,
request: Request<TxEncodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxEncodeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn tx_encode_amino<'life0, 'async_trait>(
&'life0 self,
request: Request<TxEncodeAminoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxEncodeAminoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn tx_decode_amino<'life0, 'async_trait>(
&'life0 self,
request: Request<TxDecodeAminoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxDecodeAminoResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Available on crate feature
rpc
only.Expand description
Generated trait containing gRPC methods that should be implemented for use with ServiceServer.
Required Methods§
Sourcefn simulate<'life0, 'async_trait>(
&'life0 self,
request: Request<SimulateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SimulateResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn simulate<'life0, 'async_trait>(
&'life0 self,
request: Request<SimulateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SimulateResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Simulate simulates executing a transaction for estimating gas usage.
Sourcefn get_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetTx fetches a tx by hash.
Sourcefn broadcast_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<BroadcastTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BroadcastTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn broadcast_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<BroadcastTxRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BroadcastTxResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
BroadcastTx broadcast transaction.
Sourcefn get_txs_event<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTxsEventRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTxsEventResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_txs_event<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTxsEventRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetTxsEventResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetTxsEvent fetches txs by event.
Sourcefn get_block_with_txs<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockWithTxsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetBlockWithTxsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_with_txs<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockWithTxsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetBlockWithTxsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GetBlockWithTxs fetches a block with decoded txs.
Since: cosmos-sdk 0.45.2
Sourcefn tx_decode<'life0, 'async_trait>(
&'life0 self,
request: Request<TxDecodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxDecodeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tx_decode<'life0, 'async_trait>(
&'life0 self,
request: Request<TxDecodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxDecodeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
TxDecode decodes the transaction.
Since: cosmos-sdk 0.47
Sourcefn tx_encode<'life0, 'async_trait>(
&'life0 self,
request: Request<TxEncodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxEncodeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tx_encode<'life0, 'async_trait>(
&'life0 self,
request: Request<TxEncodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxEncodeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
TxEncode encodes the transaction.
Since: cosmos-sdk 0.47
Sourcefn tx_encode_amino<'life0, 'async_trait>(
&'life0 self,
request: Request<TxEncodeAminoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxEncodeAminoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tx_encode_amino<'life0, 'async_trait>(
&'life0 self,
request: Request<TxEncodeAminoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxEncodeAminoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes.
Since: cosmos-sdk 0.47
Sourcefn tx_decode_amino<'life0, 'async_trait>(
&'life0 self,
request: Request<TxDecodeAminoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxDecodeAminoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tx_decode_amino<'life0, 'async_trait>(
&'life0 self,
request: Request<TxDecodeAminoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TxDecodeAminoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON.
Since: cosmos-sdk 0.47