1#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Tx {
5 #[prost(message, optional, tag = "1")]
7 pub body: ::core::option::Option<TxBody>,
8 #[prost(message, optional, tag = "2")]
11 pub auth_info: ::core::option::Option<AuthInfo>,
12 #[prost(bytes = "vec", repeated, tag = "3")]
16 pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
17}
18#[allow(clippy::derive_partial_eq_without_eq)]
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct TxRaw {
26 #[prost(bytes = "vec", tag = "1")]
29 pub body_bytes: ::prost::alloc::vec::Vec<u8>,
30 #[prost(bytes = "vec", tag = "2")]
33 pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
34 #[prost(bytes = "vec", repeated, tag = "3")]
38 pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
39}
40#[allow(clippy::derive_partial_eq_without_eq)]
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct SignDoc {
44 #[prost(bytes = "vec", tag = "1")]
47 pub body_bytes: ::prost::alloc::vec::Vec<u8>,
48 #[prost(bytes = "vec", tag = "2")]
51 pub auth_info_bytes: ::prost::alloc::vec::Vec<u8>,
52 #[prost(string, tag = "3")]
56 pub chain_id: ::prost::alloc::string::String,
57 #[prost(uint64, tag = "4")]
59 pub account_number: u64,
60}
61#[allow(clippy::derive_partial_eq_without_eq)]
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct TxBody {
65 #[prost(message, repeated, tag = "1")]
73 pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>,
74 #[prost(string, tag = "2")]
78 pub memo: ::prost::alloc::string::String,
79 #[prost(uint64, tag = "3")]
82 pub timeout_height: u64,
83 #[prost(message, repeated, tag = "1023")]
87 pub extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>,
88 #[prost(message, repeated, tag = "2047")]
92 pub non_critical_extension_options: ::prost::alloc::vec::Vec<::prost_types::Any>,
93}
94#[allow(clippy::derive_partial_eq_without_eq)]
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct AuthInfo {
99 #[prost(message, repeated, tag = "1")]
104 pub signer_infos: ::prost::alloc::vec::Vec<SignerInfo>,
105 #[prost(message, optional, tag = "2")]
110 pub fee: ::core::option::Option<Fee>,
111}
112#[allow(clippy::derive_partial_eq_without_eq)]
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct SignerInfo {
117 #[prost(message, optional, tag = "1")]
121 pub public_key: ::core::option::Option<::prost_types::Any>,
122 #[prost(message, optional, tag = "2")]
125 pub mode_info: ::core::option::Option<ModeInfo>,
126 #[prost(uint64, tag = "3")]
130 pub sequence: u64,
131}
132#[allow(clippy::derive_partial_eq_without_eq)]
134#[derive(Clone, PartialEq, ::prost::Message)]
135pub struct ModeInfo {
136 #[prost(oneof = "mode_info::Sum", tags = "1, 2")]
139 pub sum: ::core::option::Option<mode_info::Sum>,
140}
141pub mod mode_info {
143 #[allow(clippy::derive_partial_eq_without_eq)]
147 #[derive(Clone, PartialEq, ::prost::Message)]
148 pub struct Single {
149 #[prost(enumeration = "super::super::signing::v1beta1::SignMode", tag = "1")]
151 pub mode: i32,
152 }
153 #[allow(clippy::derive_partial_eq_without_eq)]
155 #[derive(Clone, PartialEq, ::prost::Message)]
156 pub struct Multi {
157 #[prost(message, optional, tag = "1")]
159 pub bitarray:
160 ::core::option::Option<super::super::super::crypto::multisig::v1beta1::CompactBitArray>,
161 #[prost(message, repeated, tag = "2")]
164 pub mode_infos: ::prost::alloc::vec::Vec<super::ModeInfo>,
165 }
166 #[allow(clippy::derive_partial_eq_without_eq)]
169 #[derive(Clone, PartialEq, ::prost::Oneof)]
170 pub enum Sum {
171 #[prost(message, tag = "1")]
173 Single(Single),
174 #[prost(message, tag = "2")]
176 Multi(Multi),
177 }
178}
179#[allow(clippy::derive_partial_eq_without_eq)]
183#[derive(Clone, PartialEq, ::prost::Message)]
184pub struct Fee {
185 #[prost(message, repeated, tag = "1")]
187 pub amount: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
188 #[prost(uint64, tag = "2")]
191 pub gas_limit: u64,
192 #[prost(string, tag = "3")]
196 pub payer: ::prost::alloc::string::String,
197 #[prost(string, tag = "4")]
201 pub granter: ::prost::alloc::string::String,
202}
203#[allow(clippy::derive_partial_eq_without_eq)]
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct GetTxsEventRequest {
208 #[prost(string, repeated, tag = "1")]
210 pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
211 #[prost(message, optional, tag = "2")]
213 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
214 #[prost(enumeration = "OrderBy", tag = "3")]
215 pub order_by: i32,
216}
217#[allow(clippy::derive_partial_eq_without_eq)]
220#[derive(Clone, PartialEq, ::prost::Message)]
221pub struct GetTxsEventResponse {
222 #[prost(message, repeated, tag = "1")]
224 pub txs: ::prost::alloc::vec::Vec<Tx>,
225 #[prost(message, repeated, tag = "2")]
227 pub tx_responses: ::prost::alloc::vec::Vec<super::super::base::abci::v1beta1::TxResponse>,
228 #[prost(message, optional, tag = "3")]
230 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
231}
232#[allow(clippy::derive_partial_eq_without_eq)]
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct BroadcastTxRequest {
237 #[prost(bytes = "vec", tag = "1")]
239 pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
240 #[prost(enumeration = "BroadcastMode", tag = "2")]
241 pub mode: i32,
242}
243#[allow(clippy::derive_partial_eq_without_eq)]
246#[derive(Clone, PartialEq, ::prost::Message)]
247pub struct BroadcastTxResponse {
248 #[prost(message, optional, tag = "1")]
250 pub tx_response: ::core::option::Option<super::super::base::abci::v1beta1::TxResponse>,
251}
252#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct SimulateRequest {
257 #[deprecated]
260 #[prost(message, optional, tag = "1")]
261 pub tx: ::core::option::Option<Tx>,
262 #[prost(bytes = "vec", tag = "2")]
266 pub tx_bytes: ::prost::alloc::vec::Vec<u8>,
267}
268#[allow(clippy::derive_partial_eq_without_eq)]
271#[derive(Clone, PartialEq, ::prost::Message)]
272pub struct SimulateResponse {
273 #[prost(message, optional, tag = "1")]
275 pub gas_info: ::core::option::Option<super::super::base::abci::v1beta1::GasInfo>,
276 #[prost(message, optional, tag = "2")]
278 pub result: ::core::option::Option<super::super::base::abci::v1beta1::Result>,
279}
280#[allow(clippy::derive_partial_eq_without_eq)]
283#[derive(Clone, PartialEq, ::prost::Message)]
284pub struct GetTxRequest {
285 #[prost(string, tag = "1")]
287 pub hash: ::prost::alloc::string::String,
288}
289#[allow(clippy::derive_partial_eq_without_eq)]
291#[derive(Clone, PartialEq, ::prost::Message)]
292pub struct GetTxResponse {
293 #[prost(message, optional, tag = "1")]
295 pub tx: ::core::option::Option<Tx>,
296 #[prost(message, optional, tag = "2")]
298 pub tx_response: ::core::option::Option<super::super::base::abci::v1beta1::TxResponse>,
299}
300#[allow(clippy::derive_partial_eq_without_eq)]
305#[derive(Clone, PartialEq, ::prost::Message)]
306pub struct GetBlockWithTxsRequest {
307 #[prost(int64, tag = "1")]
309 pub height: i64,
310 #[prost(message, optional, tag = "2")]
312 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
313}
314#[allow(clippy::derive_partial_eq_without_eq)]
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct GetBlockWithTxsResponse {
320 #[prost(message, repeated, tag = "1")]
322 pub txs: ::prost::alloc::vec::Vec<Tx>,
323 #[prost(message, optional, tag = "2")]
324 pub block_id: ::core::option::Option<::tendermint_proto::types::BlockId>,
325 #[prost(message, optional, tag = "3")]
326 pub block: ::core::option::Option<::tendermint_proto::types::Block>,
327 #[prost(message, optional, tag = "4")]
329 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
330}
331#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
333#[repr(i32)]
334pub enum OrderBy {
335 Unspecified = 0,
337 Asc = 1,
339 Desc = 2,
341}
342impl OrderBy {
343 pub fn as_str_name(&self) -> &'static str {
348 match self {
349 OrderBy::Unspecified => "ORDER_BY_UNSPECIFIED",
350 OrderBy::Asc => "ORDER_BY_ASC",
351 OrderBy::Desc => "ORDER_BY_DESC",
352 }
353 }
354 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
356 match value {
357 "ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
358 "ORDER_BY_ASC" => Some(Self::Asc),
359 "ORDER_BY_DESC" => Some(Self::Desc),
360 _ => None,
361 }
362 }
363}
364#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
366#[repr(i32)]
367pub enum BroadcastMode {
368 Unspecified = 0,
370 Block = 1,
373 Sync = 2,
376 Async = 3,
379}
380impl BroadcastMode {
381 pub fn as_str_name(&self) -> &'static str {
386 match self {
387 BroadcastMode::Unspecified => "BROADCAST_MODE_UNSPECIFIED",
388 BroadcastMode::Block => "BROADCAST_MODE_BLOCK",
389 BroadcastMode::Sync => "BROADCAST_MODE_SYNC",
390 BroadcastMode::Async => "BROADCAST_MODE_ASYNC",
391 }
392 }
393 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
395 match value {
396 "BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified),
397 "BROADCAST_MODE_BLOCK" => Some(Self::Block),
398 "BROADCAST_MODE_SYNC" => Some(Self::Sync),
399 "BROADCAST_MODE_ASYNC" => Some(Self::Async),
400 _ => None,
401 }
402 }
403}
404#[cfg(feature = "grpc")]
406#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
407pub mod service_client {
408 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
409 use tonic::codegen::http::Uri;
410 use tonic::codegen::*;
411 #[derive(Debug, Clone)]
413 pub struct ServiceClient<T> {
414 inner: tonic::client::Grpc<T>,
415 }
416 #[cfg(feature = "grpc-transport")]
417 #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))]
418 impl ServiceClient<tonic::transport::Channel> {
419 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
421 where
422 D: std::convert::TryInto<tonic::transport::Endpoint>,
423 D::Error: Into<StdError>,
424 {
425 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
426 Ok(Self::new(conn))
427 }
428 }
429 impl<T> ServiceClient<T>
430 where
431 T: tonic::client::GrpcService<tonic::body::BoxBody>,
432 T::Error: Into<StdError>,
433 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
434 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
435 {
436 pub fn new(inner: T) -> Self {
437 let inner = tonic::client::Grpc::new(inner);
438 Self { inner }
439 }
440 pub fn with_origin(inner: T, origin: Uri) -> Self {
441 let inner = tonic::client::Grpc::with_origin(inner, origin);
442 Self { inner }
443 }
444 pub fn with_interceptor<F>(
445 inner: T,
446 interceptor: F,
447 ) -> ServiceClient<InterceptedService<T, F>>
448 where
449 F: tonic::service::Interceptor,
450 T::ResponseBody: Default,
451 T: tonic::codegen::Service<
452 http::Request<tonic::body::BoxBody>,
453 Response = http::Response<
454 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
455 >,
456 >,
457 <T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
458 Into<StdError> + Send + Sync,
459 {
460 ServiceClient::new(InterceptedService::new(inner, interceptor))
461 }
462 #[must_use]
467 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
468 self.inner = self.inner.send_compressed(encoding);
469 self
470 }
471 #[must_use]
473 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
474 self.inner = self.inner.accept_compressed(encoding);
475 self
476 }
477 pub async fn simulate(
479 &mut self,
480 request: impl tonic::IntoRequest<super::SimulateRequest>,
481 ) -> Result<tonic::Response<super::SimulateResponse>, tonic::Status> {
482 self.inner.ready().await.map_err(|e| {
483 tonic::Status::new(
484 tonic::Code::Unknown,
485 format!("Service was not ready: {}", e.into()),
486 )
487 })?;
488 let codec = tonic::codec::ProstCodec::default();
489 let path = http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/Simulate");
490 self.inner.unary(request.into_request(), path, codec).await
491 }
492 pub async fn get_tx(
494 &mut self,
495 request: impl tonic::IntoRequest<super::GetTxRequest>,
496 ) -> Result<tonic::Response<super::GetTxResponse>, tonic::Status> {
497 self.inner.ready().await.map_err(|e| {
498 tonic::Status::new(
499 tonic::Code::Unknown,
500 format!("Service was not ready: {}", e.into()),
501 )
502 })?;
503 let codec = tonic::codec::ProstCodec::default();
504 let path = http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/GetTx");
505 self.inner.unary(request.into_request(), path, codec).await
506 }
507 pub async fn broadcast_tx(
509 &mut self,
510 request: impl tonic::IntoRequest<super::BroadcastTxRequest>,
511 ) -> Result<tonic::Response<super::BroadcastTxResponse>, tonic::Status> {
512 self.inner.ready().await.map_err(|e| {
513 tonic::Status::new(
514 tonic::Code::Unknown,
515 format!("Service was not ready: {}", e.into()),
516 )
517 })?;
518 let codec = tonic::codec::ProstCodec::default();
519 let path =
520 http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/BroadcastTx");
521 self.inner.unary(request.into_request(), path, codec).await
522 }
523 pub async fn get_txs_event(
525 &mut self,
526 request: impl tonic::IntoRequest<super::GetTxsEventRequest>,
527 ) -> Result<tonic::Response<super::GetTxsEventResponse>, tonic::Status> {
528 self.inner.ready().await.map_err(|e| {
529 tonic::Status::new(
530 tonic::Code::Unknown,
531 format!("Service was not ready: {}", e.into()),
532 )
533 })?;
534 let codec = tonic::codec::ProstCodec::default();
535 let path =
536 http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/GetTxsEvent");
537 self.inner.unary(request.into_request(), path, codec).await
538 }
539 pub async fn get_block_with_txs(
543 &mut self,
544 request: impl tonic::IntoRequest<super::GetBlockWithTxsRequest>,
545 ) -> Result<tonic::Response<super::GetBlockWithTxsResponse>, tonic::Status> {
546 self.inner.ready().await.map_err(|e| {
547 tonic::Status::new(
548 tonic::Code::Unknown,
549 format!("Service was not ready: {}", e.into()),
550 )
551 })?;
552 let codec = tonic::codec::ProstCodec::default();
553 let path =
554 http::uri::PathAndQuery::from_static("/cosmos.tx.v1beta1.Service/GetBlockWithTxs");
555 self.inner.unary(request.into_request(), path, codec).await
556 }
557 }
558}
559#[cfg(feature = "grpc")]
561#[cfg_attr(docsrs, doc(cfg(feature = "grpc")))]
562pub mod service_server {
563 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
564 use tonic::codegen::*;
565 #[async_trait]
567 pub trait Service: Send + Sync + 'static {
568 async fn simulate(
570 &self,
571 request: tonic::Request<super::SimulateRequest>,
572 ) -> Result<tonic::Response<super::SimulateResponse>, tonic::Status>;
573 async fn get_tx(
575 &self,
576 request: tonic::Request<super::GetTxRequest>,
577 ) -> Result<tonic::Response<super::GetTxResponse>, tonic::Status>;
578 async fn broadcast_tx(
580 &self,
581 request: tonic::Request<super::BroadcastTxRequest>,
582 ) -> Result<tonic::Response<super::BroadcastTxResponse>, tonic::Status>;
583 async fn get_txs_event(
585 &self,
586 request: tonic::Request<super::GetTxsEventRequest>,
587 ) -> Result<tonic::Response<super::GetTxsEventResponse>, tonic::Status>;
588 async fn get_block_with_txs(
592 &self,
593 request: tonic::Request<super::GetBlockWithTxsRequest>,
594 ) -> Result<tonic::Response<super::GetBlockWithTxsResponse>, tonic::Status>;
595 }
596 #[derive(Debug)]
598 pub struct ServiceServer<T: Service> {
599 inner: _Inner<T>,
600 accept_compression_encodings: EnabledCompressionEncodings,
601 send_compression_encodings: EnabledCompressionEncodings,
602 }
603 struct _Inner<T>(Arc<T>);
604 impl<T: Service> ServiceServer<T> {
605 pub fn new(inner: T) -> Self {
606 Self::from_arc(Arc::new(inner))
607 }
608 pub fn from_arc(inner: Arc<T>) -> Self {
609 let inner = _Inner(inner);
610 Self {
611 inner,
612 accept_compression_encodings: Default::default(),
613 send_compression_encodings: Default::default(),
614 }
615 }
616 pub fn with_interceptor<F>(inner: T, interceptor: F) -> InterceptedService<Self, F>
617 where
618 F: tonic::service::Interceptor,
619 {
620 InterceptedService::new(Self::new(inner), interceptor)
621 }
622 #[must_use]
624 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
625 self.accept_compression_encodings.enable(encoding);
626 self
627 }
628 #[must_use]
630 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
631 self.send_compression_encodings.enable(encoding);
632 self
633 }
634 }
635 impl<T, B> tonic::codegen::Service<http::Request<B>> for ServiceServer<T>
636 where
637 T: Service,
638 B: Body + Send + 'static,
639 B::Error: Into<StdError> + Send + 'static,
640 {
641 type Response = http::Response<tonic::body::BoxBody>;
642 type Error = std::convert::Infallible;
643 type Future = BoxFuture<Self::Response, Self::Error>;
644 fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
645 Poll::Ready(Ok(()))
646 }
647 fn call(&mut self, req: http::Request<B>) -> Self::Future {
648 let inner = self.inner.clone();
649 match req.uri().path() {
650 "/cosmos.tx.v1beta1.Service/Simulate" => {
651 #[allow(non_camel_case_types)]
652 struct SimulateSvc<T: Service>(pub Arc<T>);
653 impl<T: Service> tonic::server::UnaryService<super::SimulateRequest> for SimulateSvc<T> {
654 type Response = super::SimulateResponse;
655 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
656 fn call(
657 &mut self,
658 request: tonic::Request<super::SimulateRequest>,
659 ) -> Self::Future {
660 let inner = self.0.clone();
661 let fut = async move { (*inner).simulate(request).await };
662 Box::pin(fut)
663 }
664 }
665 let accept_compression_encodings = self.accept_compression_encodings;
666 let send_compression_encodings = self.send_compression_encodings;
667 let inner = self.inner.clone();
668 let fut = async move {
669 let inner = inner.0;
670 let method = SimulateSvc(inner);
671 let codec = tonic::codec::ProstCodec::default();
672 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
673 accept_compression_encodings,
674 send_compression_encodings,
675 );
676 let res = grpc.unary(method, req).await;
677 Ok(res)
678 };
679 Box::pin(fut)
680 }
681 "/cosmos.tx.v1beta1.Service/GetTx" => {
682 #[allow(non_camel_case_types)]
683 struct GetTxSvc<T: Service>(pub Arc<T>);
684 impl<T: Service> tonic::server::UnaryService<super::GetTxRequest> for GetTxSvc<T> {
685 type Response = super::GetTxResponse;
686 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
687 fn call(
688 &mut self,
689 request: tonic::Request<super::GetTxRequest>,
690 ) -> Self::Future {
691 let inner = self.0.clone();
692 let fut = async move { (*inner).get_tx(request).await };
693 Box::pin(fut)
694 }
695 }
696 let accept_compression_encodings = self.accept_compression_encodings;
697 let send_compression_encodings = self.send_compression_encodings;
698 let inner = self.inner.clone();
699 let fut = async move {
700 let inner = inner.0;
701 let method = GetTxSvc(inner);
702 let codec = tonic::codec::ProstCodec::default();
703 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
704 accept_compression_encodings,
705 send_compression_encodings,
706 );
707 let res = grpc.unary(method, req).await;
708 Ok(res)
709 };
710 Box::pin(fut)
711 }
712 "/cosmos.tx.v1beta1.Service/BroadcastTx" => {
713 #[allow(non_camel_case_types)]
714 struct BroadcastTxSvc<T: Service>(pub Arc<T>);
715 impl<T: Service> tonic::server::UnaryService<super::BroadcastTxRequest> for BroadcastTxSvc<T> {
716 type Response = super::BroadcastTxResponse;
717 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
718 fn call(
719 &mut self,
720 request: tonic::Request<super::BroadcastTxRequest>,
721 ) -> Self::Future {
722 let inner = self.0.clone();
723 let fut = async move { (*inner).broadcast_tx(request).await };
724 Box::pin(fut)
725 }
726 }
727 let accept_compression_encodings = self.accept_compression_encodings;
728 let send_compression_encodings = self.send_compression_encodings;
729 let inner = self.inner.clone();
730 let fut = async move {
731 let inner = inner.0;
732 let method = BroadcastTxSvc(inner);
733 let codec = tonic::codec::ProstCodec::default();
734 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
735 accept_compression_encodings,
736 send_compression_encodings,
737 );
738 let res = grpc.unary(method, req).await;
739 Ok(res)
740 };
741 Box::pin(fut)
742 }
743 "/cosmos.tx.v1beta1.Service/GetTxsEvent" => {
744 #[allow(non_camel_case_types)]
745 struct GetTxsEventSvc<T: Service>(pub Arc<T>);
746 impl<T: Service> tonic::server::UnaryService<super::GetTxsEventRequest> for GetTxsEventSvc<T> {
747 type Response = super::GetTxsEventResponse;
748 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
749 fn call(
750 &mut self,
751 request: tonic::Request<super::GetTxsEventRequest>,
752 ) -> Self::Future {
753 let inner = self.0.clone();
754 let fut = async move { (*inner).get_txs_event(request).await };
755 Box::pin(fut)
756 }
757 }
758 let accept_compression_encodings = self.accept_compression_encodings;
759 let send_compression_encodings = self.send_compression_encodings;
760 let inner = self.inner.clone();
761 let fut = async move {
762 let inner = inner.0;
763 let method = GetTxsEventSvc(inner);
764 let codec = tonic::codec::ProstCodec::default();
765 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
766 accept_compression_encodings,
767 send_compression_encodings,
768 );
769 let res = grpc.unary(method, req).await;
770 Ok(res)
771 };
772 Box::pin(fut)
773 }
774 "/cosmos.tx.v1beta1.Service/GetBlockWithTxs" => {
775 #[allow(non_camel_case_types)]
776 struct GetBlockWithTxsSvc<T: Service>(pub Arc<T>);
777 impl<T: Service> tonic::server::UnaryService<super::GetBlockWithTxsRequest>
778 for GetBlockWithTxsSvc<T>
779 {
780 type Response = super::GetBlockWithTxsResponse;
781 type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
782 fn call(
783 &mut self,
784 request: tonic::Request<super::GetBlockWithTxsRequest>,
785 ) -> Self::Future {
786 let inner = self.0.clone();
787 let fut = async move { (*inner).get_block_with_txs(request).await };
788 Box::pin(fut)
789 }
790 }
791 let accept_compression_encodings = self.accept_compression_encodings;
792 let send_compression_encodings = self.send_compression_encodings;
793 let inner = self.inner.clone();
794 let fut = async move {
795 let inner = inner.0;
796 let method = GetBlockWithTxsSvc(inner);
797 let codec = tonic::codec::ProstCodec::default();
798 let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config(
799 accept_compression_encodings,
800 send_compression_encodings,
801 );
802 let res = grpc.unary(method, req).await;
803 Ok(res)
804 };
805 Box::pin(fut)
806 }
807 _ => Box::pin(async move {
808 Ok(http::Response::builder()
809 .status(200)
810 .header("grpc-status", "12")
811 .header("content-type", "application/grpc")
812 .body(empty_body())
813 .unwrap())
814 }),
815 }
816 }
817 }
818 impl<T: Service> Clone for ServiceServer<T> {
819 fn clone(&self) -> Self {
820 let inner = self.inner.clone();
821 Self {
822 inner,
823 accept_compression_encodings: self.accept_compression_encodings,
824 send_compression_encodings: self.send_compression_encodings,
825 }
826 }
827 }
828 impl<T: Service> Clone for _Inner<T> {
829 fn clone(&self) -> Self {
830 Self(self.0.clone())
831 }
832 }
833 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
834 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
835 write!(f, "{:?}", self.0)
836 }
837 }
838 impl<T: Service> tonic::server::NamedService for ServiceServer<T> {
839 const NAME: &'static str = "cosmos.tx.v1beta1.Service";
840 }
841}