#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Tx {
#[prost(message, optional, tag = "1")]
pub body: ::core::option::Option<TxBody>,
#[prost(message, optional, tag = "2")]
pub auth_info: ::core::option::Option<AuthInfo>,
#[prost(bytes = "vec", repeated, tag = "3")]
pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxRaw {
#[prost(bytes = "vec", tag = "1")]
pub body_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", repeated, tag = "3")]
pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignDoc {
#[prost(bytes = "vec", tag = "1")]
pub body_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub account_number: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxBody {
#[prost(message, repeated, tag = "1")]
pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>,
#[prost(string, tag = "2")]
pub memo: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub timeout_height: u64,
#[prost(message, repeated, tag = "1023")]
pub extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>,
#[prost(message, repeated, tag = "2047")]
pub non_critical_extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthInfo {
#[prost(message, repeated, tag = "1")]
pub signer_infos: ::prost::alloc::vec::Vec<SignerInfo>,
#[prost(message, optional, tag = "2")]
pub fee: ::core::option::Option<Fee>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignerInfo {
#[prost(message, optional, tag = "1")]
pub public_key: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag = "2")]
pub mode_info: ::core::option::Option<ModeInfo>,
#[prost(uint64, tag = "3")]
pub sequence: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModeInfo {
#[prost(oneof = "mode_info::Sum", tags = "1, 2")]
pub sum: ::core::option::Option<mode_info::Sum>,
}
pub mod mode_info {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Single {
#[prost(enumeration = "super::super::signing::v1beta1::SignMode", tag = "1")]
pub mode: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Multi {
#[prost(message, optional, tag = "1")]
pub bitarray:
::core::option::Option<super::super::super::crypto::multisig::v1beta1::CompactBitArray>,
#[prost(message, repeated, tag = "2")]
pub mode_infos: ::prost::alloc::vec::Vec<super::ModeInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Sum {
#[prost(message, tag = "1")]
Single(Single),
#[prost(message, tag = "2")]
Multi(Multi),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fee {
#[prost(message, repeated, tag = "1")]
pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
#[prost(uint64, tag = "2")]
pub gas_limit: u64,
#[prost(string, tag = "3")]
pub payer: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub granter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsEventRequest {
#[prost(string, repeated, tag = "1")]
pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
#[prost(enumeration = "OrderBy", tag = "3")]
pub order_by: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsEventResponse {
#[prost(message, repeated, tag = "1")]
pub txs: ::prost::alloc::vec::Vec<Tx>,
#[prost(message, repeated, tag = "2")]
pub tx_responses: ::prost::alloc::vec::Vec<super::super::base::abci::v1beta1::TxResponse>,
#[prost(message, optional, tag = "3")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastTxRequest {
#[prost(bytes = "vec", tag = "1")]
pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "BroadcastMode", tag = "2")]
pub mode: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BroadcastTxResponse {
#[prost(message, optional, tag = "1")]
pub tx_response: ::core::option::Option<super::super::base::abci::v1beta1::TxResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulateRequest {
#[deprecated]
#[prost(message, optional, tag = "1")]
pub tx: ::core::option::Option<Tx>,
#[prost(bytes = "vec", tag = "2")]
pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimulateResponse {
#[prost(message, optional, tag = "1")]
pub gas_info: ::core::option::Option<super::super::base::abci::v1beta1::GasInfo>,
#[prost(message, optional, tag = "2")]
pub result: ::core::option::Option<super::super::base::abci::v1beta1::Result>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxRequest {
#[prost(string, tag = "1")]
pub hash: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxResponse {
#[prost(message, optional, tag = "1")]
pub tx: ::core::option::Option<Tx>,
#[prost(message, optional, tag = "2")]
pub tx_response: ::core::option::Option<super::super::base::abci::v1beta1::TxResponse>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockWithTxsRequest {
#[prost(int64, tag = "1")]
pub height: i64,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockWithTxsResponse {
#[prost(message, repeated, tag = "1")]
pub txs: ::prost::alloc::vec::Vec<Tx>,
#[prost(message, optional, tag = "2")]
pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>,
#[prost(message, optional, tag = "3")]
pub block: ::core::option::Option<::tendermint_proto::types::Block>,
#[prost(message, optional, tag = "4")]
pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderBy {
Unspecified = 0,
Asc = 1,
Desc = 2,
}
impl OrderBy {
pub fn as_str_name(&self) -> &'static str {
match self {
OrderBy::Unspecified => "ORDER_BY_UNSPECIFIED",
OrderBy::Asc => "ORDER_BY_ASC",
OrderBy::Desc => "ORDER_BY_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
"ORDER_BY_ASC" => Some(Self::Asc),
"ORDER_BY_DESC" => Some(Self::Desc),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BroadcastMode {
Unspecified = 0,
Block = 1,
Sync = 2,
Async = 3,
}
impl BroadcastMode {
pub fn as_str_name(&self) -> &'static str {
match self {
BroadcastMode::Unspecified => "BROADCAST_MODE_UNSPECIFIED",
BroadcastMode::Block => "BROADCAST_MODE_BLOCK",
BroadcastMode::Sync => "BROADCAST_MODE_SYNC",
BroadcastMode::Async => "BROADCAST_MODE_ASYNC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"BROADCAST_MODE_BLOCK" => Some(Self::Block),
"BROADCAST_MODE_SYNC" => Some(Self::Sync),
"BROADCAST_MODE_ASYNC" => Some(Self::Async),
_ => None,
}
}
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct ServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "grpc-transport")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
impl ServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn simulate(
&mut self,
request: impl tonic::IntoRequest<super::SimulateRequest>,
) -> Result<tonic::Response<super::SimulateResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/Simulate");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_tx(
&mut self,
request: impl tonic::IntoRequest<super::GetTxRequest>,
) -> Result<tonic::Response<super::GetTxResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/GetTx");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn broadcast_tx(
&mut self,
request: impl tonic::IntoRequest<super::BroadcastTxRequest>,
) -> Result<tonic::Response<super::BroadcastTxResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/BroadcastTx");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_txs_event(
&mut self,
request: impl tonic::IntoRequest<super::GetTxsEventRequest>,
) -> Result<tonic::Response<super::GetTxsEventResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/GetTxsEvent");
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_block_with_txs(
&mut self,
request: impl tonic::IntoRequest<super::GetBlockWithTxsRequest>,
) -> Result<tonic::Response<super::GetBlockWithTxsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/GetBlockWithTxs");
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[cfg(feature = "grpc")]
#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
pub mod service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait Service: Send + Sync + 'static {
async fn simulate(
&self,
request: tonic::Request<super::SimulateRequest>,
) -> Result<tonic::Response<super::SimulateResponse>, tonic::Status>;
async fn get_tx(
&self,
request: tonic::Request<super::GetTxRequest>,
) -> Result<tonic::Response<super::GetTxResponse>, tonic::Status>;
async fn broadcast_tx(
&self,
request: tonic::Request<super::BroadcastTxRequest>,
) -> Result<tonic::Response<super::BroadcastTxResponse>, tonic::Status>;
async fn get_txs_event(
&self,
request: tonic::Request<super::GetTxsEventRequest>,
) -> Result<tonic::Response<super::GetTxsEventResponse>, tonic::Status>;
async fn get_block_with_txs(
&self,
request: tonic::Request<super::GetBlockWithTxsRequest>,
) -> Result<tonic::Response<super::GetBlockWithTxsResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct ServiceServer<T: Service> {
inner: _Inner<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
}
struct _Inner<T>(Arc<T>);
impl<T: Service> ServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for ServiceServer<T>
where
T: Service,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/cosmos.tx.v1beta1.Service/Simulate" => {
#[allow(non_camel_case_types)]
struct SimulateSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::SimulateRequest> for SimulateSvc<T> {
type Response = super::SimulateResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::SimulateRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).simulate(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SimulateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.tx.v1beta1.Service/GetTx" => {
#[allow(non_camel_case_types)]
struct GetTxSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::GetTxRequest> for GetTxSvc<T> {
type Response = super::GetTxResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::GetTxRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).get_tx(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetTxSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.tx.v1beta1.Service/BroadcastTx" => {
#[allow(non_camel_case_types)]
struct BroadcastTxSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::BroadcastTxRequest> for BroadcastTxSvc<T> {
type Response = super::BroadcastTxResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::BroadcastTxRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).broadcast_tx(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = BroadcastTxSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.tx.v1beta1.Service/GetTxsEvent" => {
#[allow(non_camel_case_types)]
struct GetTxsEventSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::GetTxsEventRequest> for GetTxsEventSvc<T> {
type Response = super::GetTxsEventResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::GetTxsEventRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).get_txs_event(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetTxsEventSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/cosmos.tx.v1beta1.Service/GetBlockWithTxs" => {
#[allow(non_camel_case_types)]
struct GetBlockWithTxsSvc<T: Service>(pub Arc<T>);
impl<T: Service> tonic::server::UnaryService<super::GetBlockWithTxsRequest>
for GetBlockWithTxsSvc<T>
{
type Response = super::GetBlockWithTxsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::GetBlockWithTxsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).get_block_with_txs(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetBlockWithTxsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
Ok(http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap())
}),
}
}
}
impl<T: Service> Clone for ServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: Service> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: Service> tonic::server::NamedService for ServiceServer<T> {
const NAME: &'static str = "cosmos.tx.v1beta1.Service";
}
}