ibc_proto/prost/
ibc.core.connection.v1.rs

1// This file is @generated by prost-build.
2/// ConnectionEnd defines a stateful object on a chain connected to another
3/// separate one.
4/// NOTE: there must only be 2 defined ConnectionEnds to establish
5/// a connection between two chains.
6#[cfg_attr(
7    all(feature = "json-schema", feature = "serde"),
8    derive(::schemars::JsonSchema)
9)]
10#[derive(Clone, PartialEq, ::prost::Message)]
11pub struct ConnectionEnd {
12    /// client associated with this connection.
13    #[prost(string, tag = "1")]
14    pub client_id: ::prost::alloc::string::String,
15    /// IBC version which can be utilised to determine encodings or protocols for
16    /// channels or packets utilising this connection.
17    #[prost(message, repeated, tag = "2")]
18    pub versions: ::prost::alloc::vec::Vec<Version>,
19    /// current state of the connection end.
20    #[prost(enumeration = "State", tag = "3")]
21    pub state: i32,
22    /// counterparty chain associated with this connection.
23    #[prost(message, optional, tag = "4")]
24    pub counterparty: ::core::option::Option<Counterparty>,
25    /// delay period that must pass before a consensus state can be used for
26    /// packet-verification NOTE: delay period logic is only implemented by some
27    /// clients.
28    #[prost(uint64, tag = "5")]
29    pub delay_period: u64,
30}
31impl ::prost::Name for ConnectionEnd {
32    const NAME: &'static str = "ConnectionEnd";
33    const PACKAGE: &'static str = "ibc.core.connection.v1";
34    fn full_name() -> ::prost::alloc::string::String {
35        "ibc.core.connection.v1.ConnectionEnd".into()
36    }
37    fn type_url() -> ::prost::alloc::string::String {
38        "/ibc.core.connection.v1.ConnectionEnd".into()
39    }
40}
41/// IdentifiedConnection defines a connection with additional connection
42/// identifier field.
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct IdentifiedConnection {
45    /// connection identifier.
46    #[prost(string, tag = "1")]
47    pub id: ::prost::alloc::string::String,
48    /// client associated with this connection.
49    #[prost(string, tag = "2")]
50    pub client_id: ::prost::alloc::string::String,
51    /// IBC version which can be utilised to determine encodings or protocols for
52    /// channels or packets utilising this connection
53    #[prost(message, repeated, tag = "3")]
54    pub versions: ::prost::alloc::vec::Vec<Version>,
55    /// current state of the connection end.
56    #[prost(enumeration = "State", tag = "4")]
57    pub state: i32,
58    /// counterparty chain associated with this connection.
59    #[prost(message, optional, tag = "5")]
60    pub counterparty: ::core::option::Option<Counterparty>,
61    /// delay period associated with this connection.
62    #[prost(uint64, tag = "6")]
63    pub delay_period: u64,
64}
65impl ::prost::Name for IdentifiedConnection {
66    const NAME: &'static str = "IdentifiedConnection";
67    const PACKAGE: &'static str = "ibc.core.connection.v1";
68    fn full_name() -> ::prost::alloc::string::String {
69        "ibc.core.connection.v1.IdentifiedConnection".into()
70    }
71    fn type_url() -> ::prost::alloc::string::String {
72        "/ibc.core.connection.v1.IdentifiedConnection".into()
73    }
74}
75/// Counterparty defines the counterparty chain associated with a connection end.
76#[cfg_attr(
77    all(feature = "json-schema", feature = "serde"),
78    derive(::schemars::JsonSchema)
79)]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct Counterparty {
82    /// identifies the client on the counterparty chain associated with a given
83    /// connection.
84    #[prost(string, tag = "1")]
85    pub client_id: ::prost::alloc::string::String,
86    /// identifies the connection end on the counterparty chain associated with a
87    /// given connection.
88    #[prost(string, tag = "2")]
89    pub connection_id: ::prost::alloc::string::String,
90    /// commitment merkle prefix of the counterparty chain.
91    #[prost(message, optional, tag = "3")]
92    pub prefix: ::core::option::Option<super::super::commitment::v1::MerklePrefix>,
93}
94impl ::prost::Name for Counterparty {
95    const NAME: &'static str = "Counterparty";
96    const PACKAGE: &'static str = "ibc.core.connection.v1";
97    fn full_name() -> ::prost::alloc::string::String {
98        "ibc.core.connection.v1.Counterparty".into()
99    }
100    fn type_url() -> ::prost::alloc::string::String {
101        "/ibc.core.connection.v1.Counterparty".into()
102    }
103}
104/// ClientPaths define all the connection paths for a client state.
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct ClientPaths {
107    /// list of connection paths
108    #[prost(string, repeated, tag = "1")]
109    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
110}
111impl ::prost::Name for ClientPaths {
112    const NAME: &'static str = "ClientPaths";
113    const PACKAGE: &'static str = "ibc.core.connection.v1";
114    fn full_name() -> ::prost::alloc::string::String {
115        "ibc.core.connection.v1.ClientPaths".into()
116    }
117    fn type_url() -> ::prost::alloc::string::String {
118        "/ibc.core.connection.v1.ClientPaths".into()
119    }
120}
121/// ConnectionPaths define all the connection paths for a given client state.
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct ConnectionPaths {
124    /// client state unique identifier
125    #[prost(string, tag = "1")]
126    pub client_id: ::prost::alloc::string::String,
127    /// list of connection paths
128    #[prost(string, repeated, tag = "2")]
129    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
130}
131impl ::prost::Name for ConnectionPaths {
132    const NAME: &'static str = "ConnectionPaths";
133    const PACKAGE: &'static str = "ibc.core.connection.v1";
134    fn full_name() -> ::prost::alloc::string::String {
135        "ibc.core.connection.v1.ConnectionPaths".into()
136    }
137    fn type_url() -> ::prost::alloc::string::String {
138        "/ibc.core.connection.v1.ConnectionPaths".into()
139    }
140}
141/// Version defines the versioning scheme used to negotiate the IBC verison in
142/// the connection handshake.
143#[cfg_attr(
144    all(feature = "json-schema", feature = "serde"),
145    derive(::schemars::JsonSchema)
146)]
147#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct Version {
149    /// unique version identifier
150    #[prost(string, tag = "1")]
151    pub identifier: ::prost::alloc::string::String,
152    /// list of features compatible with the specified identifier
153    #[prost(string, repeated, tag = "2")]
154    pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
155}
156impl ::prost::Name for Version {
157    const NAME: &'static str = "Version";
158    const PACKAGE: &'static str = "ibc.core.connection.v1";
159    fn full_name() -> ::prost::alloc::string::String {
160        "ibc.core.connection.v1.Version".into()
161    }
162    fn type_url() -> ::prost::alloc::string::String {
163        "/ibc.core.connection.v1.Version".into()
164    }
165}
166/// Params defines the set of Connection parameters.
167#[derive(Clone, Copy, PartialEq, ::prost::Message)]
168pub struct Params {
169    /// maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the
170    /// largest amount of time that the chain might reasonably take to produce the next block under normal operating
171    /// conditions. A safe choice is 3-5x the expected time per block.
172    #[prost(uint64, tag = "1")]
173    pub max_expected_time_per_block: u64,
174}
175impl ::prost::Name for Params {
176    const NAME: &'static str = "Params";
177    const PACKAGE: &'static str = "ibc.core.connection.v1";
178    fn full_name() -> ::prost::alloc::string::String {
179        "ibc.core.connection.v1.Params".into()
180    }
181    fn type_url() -> ::prost::alloc::string::String {
182        "/ibc.core.connection.v1.Params".into()
183    }
184}
185/// State defines if a connection is in one of the following states:
186/// INIT, TRYOPEN, OPEN or UNINITIALIZED.
187#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
188#[repr(i32)]
189pub enum State {
190    /// Default State
191    UninitializedUnspecified = 0,
192    /// A connection end has just started the opening handshake.
193    Init = 1,
194    /// A connection end has acknowledged the handshake step on the counterparty
195    /// chain.
196    Tryopen = 2,
197    /// A connection end has completed the handshake.
198    Open = 3,
199}
200impl State {
201    /// String value of the enum field names used in the ProtoBuf definition.
202    ///
203    /// The values are not transformed in any way and thus are considered stable
204    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
205    pub fn as_str_name(&self) -> &'static str {
206        match self {
207            Self::UninitializedUnspecified => "STATE_UNINITIALIZED_UNSPECIFIED",
208            Self::Init => "STATE_INIT",
209            Self::Tryopen => "STATE_TRYOPEN",
210            Self::Open => "STATE_OPEN",
211        }
212    }
213    /// Creates an enum from field names used in the ProtoBuf definition.
214    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
215        match value {
216            "STATE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified),
217            "STATE_INIT" => Some(Self::Init),
218            "STATE_TRYOPEN" => Some(Self::Tryopen),
219            "STATE_OPEN" => Some(Self::Open),
220            _ => None,
221        }
222    }
223}
224/// GenesisState defines the ibc connection submodule's genesis state.
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct GenesisState {
227    #[prost(message, repeated, tag = "1")]
228    pub connections: ::prost::alloc::vec::Vec<IdentifiedConnection>,
229    #[prost(message, repeated, tag = "2")]
230    pub client_connection_paths: ::prost::alloc::vec::Vec<ConnectionPaths>,
231    /// the sequence for the next generated connection identifier
232    #[prost(uint64, tag = "3")]
233    pub next_connection_sequence: u64,
234    #[prost(message, optional, tag = "4")]
235    pub params: ::core::option::Option<Params>,
236}
237impl ::prost::Name for GenesisState {
238    const NAME: &'static str = "GenesisState";
239    const PACKAGE: &'static str = "ibc.core.connection.v1";
240    fn full_name() -> ::prost::alloc::string::String {
241        "ibc.core.connection.v1.GenesisState".into()
242    }
243    fn type_url() -> ::prost::alloc::string::String {
244        "/ibc.core.connection.v1.GenesisState".into()
245    }
246}
247/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to
248/// initialize a connection with Chain B.
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct MsgConnectionOpenInit {
251    #[prost(string, tag = "1")]
252    pub client_id: ::prost::alloc::string::String,
253    #[prost(message, optional, tag = "2")]
254    pub counterparty: ::core::option::Option<Counterparty>,
255    #[prost(message, optional, tag = "3")]
256    pub version: ::core::option::Option<Version>,
257    #[prost(uint64, tag = "4")]
258    pub delay_period: u64,
259    #[prost(string, tag = "5")]
260    pub signer: ::prost::alloc::string::String,
261}
262impl ::prost::Name for MsgConnectionOpenInit {
263    const NAME: &'static str = "MsgConnectionOpenInit";
264    const PACKAGE: &'static str = "ibc.core.connection.v1";
265    fn full_name() -> ::prost::alloc::string::String {
266        "ibc.core.connection.v1.MsgConnectionOpenInit".into()
267    }
268    fn type_url() -> ::prost::alloc::string::String {
269        "/ibc.core.connection.v1.MsgConnectionOpenInit".into()
270    }
271}
272/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response
273/// type.
274#[derive(Clone, Copy, PartialEq, ::prost::Message)]
275pub struct MsgConnectionOpenInitResponse {}
276impl ::prost::Name for MsgConnectionOpenInitResponse {
277    const NAME: &'static str = "MsgConnectionOpenInitResponse";
278    const PACKAGE: &'static str = "ibc.core.connection.v1";
279    fn full_name() -> ::prost::alloc::string::String {
280        "ibc.core.connection.v1.MsgConnectionOpenInitResponse".into()
281    }
282    fn type_url() -> ::prost::alloc::string::String {
283        "/ibc.core.connection.v1.MsgConnectionOpenInitResponse".into()
284    }
285}
286/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a
287/// connection on Chain B.
288#[derive(Clone, PartialEq, ::prost::Message)]
289pub struct MsgConnectionOpenTry {
290    #[prost(string, tag = "1")]
291    pub client_id: ::prost::alloc::string::String,
292    /// Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC.
293    #[deprecated]
294    #[prost(string, tag = "2")]
295    pub previous_connection_id: ::prost::alloc::string::String,
296    #[prost(message, optional, tag = "3")]
297    pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>,
298    #[prost(message, optional, tag = "4")]
299    pub counterparty: ::core::option::Option<Counterparty>,
300    #[prost(uint64, tag = "5")]
301    pub delay_period: u64,
302    #[prost(message, repeated, tag = "6")]
303    pub counterparty_versions: ::prost::alloc::vec::Vec<Version>,
304    #[prost(message, optional, tag = "7")]
305    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
306    /// proof of the initialization the connection on Chain A: `UNITIALIZED ->
307    /// INIT`
308    #[prost(bytes = "vec", tag = "8")]
309    pub proof_init: ::prost::alloc::vec::Vec<u8>,
310    /// proof of client state included in message
311    #[prost(bytes = "vec", tag = "9")]
312    pub proof_client: ::prost::alloc::vec::Vec<u8>,
313    /// proof of client consensus state
314    #[prost(bytes = "vec", tag = "10")]
315    pub proof_consensus: ::prost::alloc::vec::Vec<u8>,
316    #[prost(message, optional, tag = "11")]
317    pub consensus_height: ::core::option::Option<super::super::client::v1::Height>,
318    #[prost(string, tag = "12")]
319    pub signer: ::prost::alloc::string::String,
320    /// optional proof data for host state machines that are unable to introspect their own consensus state
321    #[prost(bytes = "vec", tag = "13")]
322    pub host_consensus_state_proof: ::prost::alloc::vec::Vec<u8>,
323}
324impl ::prost::Name for MsgConnectionOpenTry {
325    const NAME: &'static str = "MsgConnectionOpenTry";
326    const PACKAGE: &'static str = "ibc.core.connection.v1";
327    fn full_name() -> ::prost::alloc::string::String {
328        "ibc.core.connection.v1.MsgConnectionOpenTry".into()
329    }
330    fn type_url() -> ::prost::alloc::string::String {
331        "/ibc.core.connection.v1.MsgConnectionOpenTry".into()
332    }
333}
334/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type.
335#[derive(Clone, Copy, PartialEq, ::prost::Message)]
336pub struct MsgConnectionOpenTryResponse {}
337impl ::prost::Name for MsgConnectionOpenTryResponse {
338    const NAME: &'static str = "MsgConnectionOpenTryResponse";
339    const PACKAGE: &'static str = "ibc.core.connection.v1";
340    fn full_name() -> ::prost::alloc::string::String {
341        "ibc.core.connection.v1.MsgConnectionOpenTryResponse".into()
342    }
343    fn type_url() -> ::prost::alloc::string::String {
344        "/ibc.core.connection.v1.MsgConnectionOpenTryResponse".into()
345    }
346}
347/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to
348/// acknowledge the change of connection state to TRYOPEN on Chain B.
349#[derive(Clone, PartialEq, ::prost::Message)]
350pub struct MsgConnectionOpenAck {
351    #[prost(string, tag = "1")]
352    pub connection_id: ::prost::alloc::string::String,
353    #[prost(string, tag = "2")]
354    pub counterparty_connection_id: ::prost::alloc::string::String,
355    #[prost(message, optional, tag = "3")]
356    pub version: ::core::option::Option<Version>,
357    #[prost(message, optional, tag = "4")]
358    pub client_state: ::core::option::Option<::tendermint_proto::google::protobuf::Any>,
359    #[prost(message, optional, tag = "5")]
360    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
361    /// proof of the initialization the connection on Chain B: `UNITIALIZED ->
362    /// TRYOPEN`
363    #[prost(bytes = "vec", tag = "6")]
364    pub proof_try: ::prost::alloc::vec::Vec<u8>,
365    /// proof of client state included in message
366    #[prost(bytes = "vec", tag = "7")]
367    pub proof_client: ::prost::alloc::vec::Vec<u8>,
368    /// proof of client consensus state
369    #[prost(bytes = "vec", tag = "8")]
370    pub proof_consensus: ::prost::alloc::vec::Vec<u8>,
371    #[prost(message, optional, tag = "9")]
372    pub consensus_height: ::core::option::Option<super::super::client::v1::Height>,
373    #[prost(string, tag = "10")]
374    pub signer: ::prost::alloc::string::String,
375    /// optional proof data for host state machines that are unable to introspect their own consensus state
376    #[prost(bytes = "vec", tag = "11")]
377    pub host_consensus_state_proof: ::prost::alloc::vec::Vec<u8>,
378}
379impl ::prost::Name for MsgConnectionOpenAck {
380    const NAME: &'static str = "MsgConnectionOpenAck";
381    const PACKAGE: &'static str = "ibc.core.connection.v1";
382    fn full_name() -> ::prost::alloc::string::String {
383        "ibc.core.connection.v1.MsgConnectionOpenAck".into()
384    }
385    fn type_url() -> ::prost::alloc::string::String {
386        "/ibc.core.connection.v1.MsgConnectionOpenAck".into()
387    }
388}
389/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type.
390#[derive(Clone, Copy, PartialEq, ::prost::Message)]
391pub struct MsgConnectionOpenAckResponse {}
392impl ::prost::Name for MsgConnectionOpenAckResponse {
393    const NAME: &'static str = "MsgConnectionOpenAckResponse";
394    const PACKAGE: &'static str = "ibc.core.connection.v1";
395    fn full_name() -> ::prost::alloc::string::String {
396        "ibc.core.connection.v1.MsgConnectionOpenAckResponse".into()
397    }
398    fn type_url() -> ::prost::alloc::string::String {
399        "/ibc.core.connection.v1.MsgConnectionOpenAckResponse".into()
400    }
401}
402/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to
403/// acknowledge the change of connection state to OPEN on Chain A.
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct MsgConnectionOpenConfirm {
406    #[prost(string, tag = "1")]
407    pub connection_id: ::prost::alloc::string::String,
408    /// proof for the change of the connection state on Chain A: `INIT -> OPEN`
409    #[prost(bytes = "vec", tag = "2")]
410    pub proof_ack: ::prost::alloc::vec::Vec<u8>,
411    #[prost(message, optional, tag = "3")]
412    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
413    #[prost(string, tag = "4")]
414    pub signer: ::prost::alloc::string::String,
415}
416impl ::prost::Name for MsgConnectionOpenConfirm {
417    const NAME: &'static str = "MsgConnectionOpenConfirm";
418    const PACKAGE: &'static str = "ibc.core.connection.v1";
419    fn full_name() -> ::prost::alloc::string::String {
420        "ibc.core.connection.v1.MsgConnectionOpenConfirm".into()
421    }
422    fn type_url() -> ::prost::alloc::string::String {
423        "/ibc.core.connection.v1.MsgConnectionOpenConfirm".into()
424    }
425}
426/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm
427/// response type.
428#[derive(Clone, Copy, PartialEq, ::prost::Message)]
429pub struct MsgConnectionOpenConfirmResponse {}
430impl ::prost::Name for MsgConnectionOpenConfirmResponse {
431    const NAME: &'static str = "MsgConnectionOpenConfirmResponse";
432    const PACKAGE: &'static str = "ibc.core.connection.v1";
433    fn full_name() -> ::prost::alloc::string::String {
434        "ibc.core.connection.v1.MsgConnectionOpenConfirmResponse".into()
435    }
436    fn type_url() -> ::prost::alloc::string::String {
437        "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse".into()
438    }
439}
440/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters.
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct MsgUpdateParams {
443    /// signer address
444    #[prost(string, tag = "1")]
445    pub signer: ::prost::alloc::string::String,
446    /// params defines the connection parameters to update.
447    ///
448    /// NOTE: All parameters must be supplied.
449    #[prost(message, optional, tag = "2")]
450    pub params: ::core::option::Option<Params>,
451}
452impl ::prost::Name for MsgUpdateParams {
453    const NAME: &'static str = "MsgUpdateParams";
454    const PACKAGE: &'static str = "ibc.core.connection.v1";
455    fn full_name() -> ::prost::alloc::string::String {
456        "ibc.core.connection.v1.MsgUpdateParams".into()
457    }
458    fn type_url() -> ::prost::alloc::string::String {
459        "/ibc.core.connection.v1.MsgUpdateParams".into()
460    }
461}
462/// MsgUpdateParamsResponse defines the MsgUpdateParams response type.
463#[derive(Clone, Copy, PartialEq, ::prost::Message)]
464pub struct MsgUpdateParamsResponse {}
465impl ::prost::Name for MsgUpdateParamsResponse {
466    const NAME: &'static str = "MsgUpdateParamsResponse";
467    const PACKAGE: &'static str = "ibc.core.connection.v1";
468    fn full_name() -> ::prost::alloc::string::String {
469        "ibc.core.connection.v1.MsgUpdateParamsResponse".into()
470    }
471    fn type_url() -> ::prost::alloc::string::String {
472        "/ibc.core.connection.v1.MsgUpdateParamsResponse".into()
473    }
474}
475/// Generated client implementations.
476#[cfg(feature = "client")]
477pub mod msg_client {
478    #![allow(
479        unused_variables,
480        dead_code,
481        missing_docs,
482        clippy::wildcard_imports,
483        clippy::let_unit_value,
484    )]
485    use tonic::codegen::*;
486    use tonic::codegen::http::Uri;
487    /// Msg defines the ibc/connection Msg service.
488    #[derive(Debug, Clone)]
489    pub struct MsgClient<T> {
490        inner: tonic::client::Grpc<T>,
491    }
492    #[cfg(feature = "transport")]
493    impl MsgClient<tonic::transport::Channel> {
494        /// Attempt to create a new client by connecting to a given endpoint.
495        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
496        where
497            D: TryInto<tonic::transport::Endpoint>,
498            D::Error: Into<StdError>,
499        {
500            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
501            Ok(Self::new(conn))
502        }
503    }
504    impl<T> MsgClient<T>
505    where
506        T: tonic::client::GrpcService<tonic::body::Body>,
507        T::Error: Into<StdError>,
508        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
509        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
510    {
511        pub fn new(inner: T) -> Self {
512            let inner = tonic::client::Grpc::new(inner);
513            Self { inner }
514        }
515        pub fn with_origin(inner: T, origin: Uri) -> Self {
516            let inner = tonic::client::Grpc::with_origin(inner, origin);
517            Self { inner }
518        }
519        pub fn with_interceptor<F>(
520            inner: T,
521            interceptor: F,
522        ) -> MsgClient<InterceptedService<T, F>>
523        where
524            F: tonic::service::Interceptor,
525            T::ResponseBody: Default,
526            T: tonic::codegen::Service<
527                http::Request<tonic::body::Body>,
528                Response = http::Response<
529                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
530                >,
531            >,
532            <T as tonic::codegen::Service<
533                http::Request<tonic::body::Body>,
534            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
535        {
536            MsgClient::new(InterceptedService::new(inner, interceptor))
537        }
538        /// Compress requests with the given encoding.
539        ///
540        /// This requires the server to support it otherwise it might respond with an
541        /// error.
542        #[must_use]
543        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
544            self.inner = self.inner.send_compressed(encoding);
545            self
546        }
547        /// Enable decompressing responses.
548        #[must_use]
549        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
550            self.inner = self.inner.accept_compressed(encoding);
551            self
552        }
553        /// Limits the maximum size of a decoded message.
554        ///
555        /// Default: `4MB`
556        #[must_use]
557        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
558            self.inner = self.inner.max_decoding_message_size(limit);
559            self
560        }
561        /// Limits the maximum size of an encoded message.
562        ///
563        /// Default: `usize::MAX`
564        #[must_use]
565        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
566            self.inner = self.inner.max_encoding_message_size(limit);
567            self
568        }
569        /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit.
570        pub async fn connection_open_init(
571            &mut self,
572            request: impl tonic::IntoRequest<super::MsgConnectionOpenInit>,
573        ) -> std::result::Result<
574            tonic::Response<super::MsgConnectionOpenInitResponse>,
575            tonic::Status,
576        > {
577            self.inner
578                .ready()
579                .await
580                .map_err(|e| {
581                    tonic::Status::unknown(
582                        format!("Service was not ready: {}", e.into()),
583                    )
584                })?;
585            let codec = tonic::codec::ProstCodec::default();
586            let path = http::uri::PathAndQuery::from_static(
587                "/ibc.core.connection.v1.Msg/ConnectionOpenInit",
588            );
589            let mut req = request.into_request();
590            req.extensions_mut()
591                .insert(
592                    GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenInit"),
593                );
594            self.inner.unary(req, path, codec).await
595        }
596        /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry.
597        pub async fn connection_open_try(
598            &mut self,
599            request: impl tonic::IntoRequest<super::MsgConnectionOpenTry>,
600        ) -> std::result::Result<
601            tonic::Response<super::MsgConnectionOpenTryResponse>,
602            tonic::Status,
603        > {
604            self.inner
605                .ready()
606                .await
607                .map_err(|e| {
608                    tonic::Status::unknown(
609                        format!("Service was not ready: {}", e.into()),
610                    )
611                })?;
612            let codec = tonic::codec::ProstCodec::default();
613            let path = http::uri::PathAndQuery::from_static(
614                "/ibc.core.connection.v1.Msg/ConnectionOpenTry",
615            );
616            let mut req = request.into_request();
617            req.extensions_mut()
618                .insert(
619                    GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenTry"),
620                );
621            self.inner.unary(req, path, codec).await
622        }
623        /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck.
624        pub async fn connection_open_ack(
625            &mut self,
626            request: impl tonic::IntoRequest<super::MsgConnectionOpenAck>,
627        ) -> std::result::Result<
628            tonic::Response<super::MsgConnectionOpenAckResponse>,
629            tonic::Status,
630        > {
631            self.inner
632                .ready()
633                .await
634                .map_err(|e| {
635                    tonic::Status::unknown(
636                        format!("Service was not ready: {}", e.into()),
637                    )
638                })?;
639            let codec = tonic::codec::ProstCodec::default();
640            let path = http::uri::PathAndQuery::from_static(
641                "/ibc.core.connection.v1.Msg/ConnectionOpenAck",
642            );
643            let mut req = request.into_request();
644            req.extensions_mut()
645                .insert(
646                    GrpcMethod::new("ibc.core.connection.v1.Msg", "ConnectionOpenAck"),
647                );
648            self.inner.unary(req, path, codec).await
649        }
650        /// ConnectionOpenConfirm defines a rpc handler method for
651        /// MsgConnectionOpenConfirm.
652        pub async fn connection_open_confirm(
653            &mut self,
654            request: impl tonic::IntoRequest<super::MsgConnectionOpenConfirm>,
655        ) -> std::result::Result<
656            tonic::Response<super::MsgConnectionOpenConfirmResponse>,
657            tonic::Status,
658        > {
659            self.inner
660                .ready()
661                .await
662                .map_err(|e| {
663                    tonic::Status::unknown(
664                        format!("Service was not ready: {}", e.into()),
665                    )
666                })?;
667            let codec = tonic::codec::ProstCodec::default();
668            let path = http::uri::PathAndQuery::from_static(
669                "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm",
670            );
671            let mut req = request.into_request();
672            req.extensions_mut()
673                .insert(
674                    GrpcMethod::new(
675                        "ibc.core.connection.v1.Msg",
676                        "ConnectionOpenConfirm",
677                    ),
678                );
679            self.inner.unary(req, path, codec).await
680        }
681        /// UpdateConnectionParams defines a rpc handler method for
682        /// MsgUpdateParams.
683        pub async fn update_connection_params(
684            &mut self,
685            request: impl tonic::IntoRequest<super::MsgUpdateParams>,
686        ) -> std::result::Result<
687            tonic::Response<super::MsgUpdateParamsResponse>,
688            tonic::Status,
689        > {
690            self.inner
691                .ready()
692                .await
693                .map_err(|e| {
694                    tonic::Status::unknown(
695                        format!("Service was not ready: {}", e.into()),
696                    )
697                })?;
698            let codec = tonic::codec::ProstCodec::default();
699            let path = http::uri::PathAndQuery::from_static(
700                "/ibc.core.connection.v1.Msg/UpdateConnectionParams",
701            );
702            let mut req = request.into_request();
703            req.extensions_mut()
704                .insert(
705                    GrpcMethod::new(
706                        "ibc.core.connection.v1.Msg",
707                        "UpdateConnectionParams",
708                    ),
709                );
710            self.inner.unary(req, path, codec).await
711        }
712    }
713}
714/// Generated server implementations.
715#[cfg(feature = "server")]
716pub mod msg_server {
717    #![allow(
718        unused_variables,
719        dead_code,
720        missing_docs,
721        clippy::wildcard_imports,
722        clippy::let_unit_value,
723    )]
724    use tonic::codegen::*;
725    /// Generated trait containing gRPC methods that should be implemented for use with MsgServer.
726    #[async_trait]
727    pub trait Msg: std::marker::Send + std::marker::Sync + 'static {
728        /// ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit.
729        async fn connection_open_init(
730            &self,
731            request: tonic::Request<super::MsgConnectionOpenInit>,
732        ) -> std::result::Result<
733            tonic::Response<super::MsgConnectionOpenInitResponse>,
734            tonic::Status,
735        >;
736        /// ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry.
737        async fn connection_open_try(
738            &self,
739            request: tonic::Request<super::MsgConnectionOpenTry>,
740        ) -> std::result::Result<
741            tonic::Response<super::MsgConnectionOpenTryResponse>,
742            tonic::Status,
743        >;
744        /// ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck.
745        async fn connection_open_ack(
746            &self,
747            request: tonic::Request<super::MsgConnectionOpenAck>,
748        ) -> std::result::Result<
749            tonic::Response<super::MsgConnectionOpenAckResponse>,
750            tonic::Status,
751        >;
752        /// ConnectionOpenConfirm defines a rpc handler method for
753        /// MsgConnectionOpenConfirm.
754        async fn connection_open_confirm(
755            &self,
756            request: tonic::Request<super::MsgConnectionOpenConfirm>,
757        ) -> std::result::Result<
758            tonic::Response<super::MsgConnectionOpenConfirmResponse>,
759            tonic::Status,
760        >;
761        /// UpdateConnectionParams defines a rpc handler method for
762        /// MsgUpdateParams.
763        async fn update_connection_params(
764            &self,
765            request: tonic::Request<super::MsgUpdateParams>,
766        ) -> std::result::Result<
767            tonic::Response<super::MsgUpdateParamsResponse>,
768            tonic::Status,
769        >;
770    }
771    /// Msg defines the ibc/connection Msg service.
772    #[derive(Debug)]
773    pub struct MsgServer<T> {
774        inner: Arc<T>,
775        accept_compression_encodings: EnabledCompressionEncodings,
776        send_compression_encodings: EnabledCompressionEncodings,
777        max_decoding_message_size: Option<usize>,
778        max_encoding_message_size: Option<usize>,
779    }
780    impl<T> MsgServer<T> {
781        pub fn new(inner: T) -> Self {
782            Self::from_arc(Arc::new(inner))
783        }
784        pub fn from_arc(inner: Arc<T>) -> Self {
785            Self {
786                inner,
787                accept_compression_encodings: Default::default(),
788                send_compression_encodings: Default::default(),
789                max_decoding_message_size: None,
790                max_encoding_message_size: None,
791            }
792        }
793        pub fn with_interceptor<F>(
794            inner: T,
795            interceptor: F,
796        ) -> InterceptedService<Self, F>
797        where
798            F: tonic::service::Interceptor,
799        {
800            InterceptedService::new(Self::new(inner), interceptor)
801        }
802        /// Enable decompressing requests with the given encoding.
803        #[must_use]
804        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
805            self.accept_compression_encodings.enable(encoding);
806            self
807        }
808        /// Compress responses with the given encoding, if the client supports it.
809        #[must_use]
810        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
811            self.send_compression_encodings.enable(encoding);
812            self
813        }
814        /// Limits the maximum size of a decoded message.
815        ///
816        /// Default: `4MB`
817        #[must_use]
818        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
819            self.max_decoding_message_size = Some(limit);
820            self
821        }
822        /// Limits the maximum size of an encoded message.
823        ///
824        /// Default: `usize::MAX`
825        #[must_use]
826        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
827            self.max_encoding_message_size = Some(limit);
828            self
829        }
830    }
831    impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
832    where
833        T: Msg,
834        B: Body + std::marker::Send + 'static,
835        B::Error: Into<StdError> + std::marker::Send + 'static,
836    {
837        type Response = http::Response<tonic::body::Body>;
838        type Error = std::convert::Infallible;
839        type Future = BoxFuture<Self::Response, Self::Error>;
840        fn poll_ready(
841            &mut self,
842            _cx: &mut Context<'_>,
843        ) -> Poll<std::result::Result<(), Self::Error>> {
844            Poll::Ready(Ok(()))
845        }
846        fn call(&mut self, req: http::Request<B>) -> Self::Future {
847            match req.uri().path() {
848                "/ibc.core.connection.v1.Msg/ConnectionOpenInit" => {
849                    #[allow(non_camel_case_types)]
850                    struct ConnectionOpenInitSvc<T: Msg>(pub Arc<T>);
851                    impl<
852                        T: Msg,
853                    > tonic::server::UnaryService<super::MsgConnectionOpenInit>
854                    for ConnectionOpenInitSvc<T> {
855                        type Response = super::MsgConnectionOpenInitResponse;
856                        type Future = BoxFuture<
857                            tonic::Response<Self::Response>,
858                            tonic::Status,
859                        >;
860                        fn call(
861                            &mut self,
862                            request: tonic::Request<super::MsgConnectionOpenInit>,
863                        ) -> Self::Future {
864                            let inner = Arc::clone(&self.0);
865                            let fut = async move {
866                                <T as Msg>::connection_open_init(&inner, request).await
867                            };
868                            Box::pin(fut)
869                        }
870                    }
871                    let accept_compression_encodings = self.accept_compression_encodings;
872                    let send_compression_encodings = self.send_compression_encodings;
873                    let max_decoding_message_size = self.max_decoding_message_size;
874                    let max_encoding_message_size = self.max_encoding_message_size;
875                    let inner = self.inner.clone();
876                    let fut = async move {
877                        let method = ConnectionOpenInitSvc(inner);
878                        let codec = tonic::codec::ProstCodec::default();
879                        let mut grpc = tonic::server::Grpc::new(codec)
880                            .apply_compression_config(
881                                accept_compression_encodings,
882                                send_compression_encodings,
883                            )
884                            .apply_max_message_size_config(
885                                max_decoding_message_size,
886                                max_encoding_message_size,
887                            );
888                        let res = grpc.unary(method, req).await;
889                        Ok(res)
890                    };
891                    Box::pin(fut)
892                }
893                "/ibc.core.connection.v1.Msg/ConnectionOpenTry" => {
894                    #[allow(non_camel_case_types)]
895                    struct ConnectionOpenTrySvc<T: Msg>(pub Arc<T>);
896                    impl<T: Msg> tonic::server::UnaryService<super::MsgConnectionOpenTry>
897                    for ConnectionOpenTrySvc<T> {
898                        type Response = super::MsgConnectionOpenTryResponse;
899                        type Future = BoxFuture<
900                            tonic::Response<Self::Response>,
901                            tonic::Status,
902                        >;
903                        fn call(
904                            &mut self,
905                            request: tonic::Request<super::MsgConnectionOpenTry>,
906                        ) -> Self::Future {
907                            let inner = Arc::clone(&self.0);
908                            let fut = async move {
909                                <T as Msg>::connection_open_try(&inner, request).await
910                            };
911                            Box::pin(fut)
912                        }
913                    }
914                    let accept_compression_encodings = self.accept_compression_encodings;
915                    let send_compression_encodings = self.send_compression_encodings;
916                    let max_decoding_message_size = self.max_decoding_message_size;
917                    let max_encoding_message_size = self.max_encoding_message_size;
918                    let inner = self.inner.clone();
919                    let fut = async move {
920                        let method = ConnectionOpenTrySvc(inner);
921                        let codec = tonic::codec::ProstCodec::default();
922                        let mut grpc = tonic::server::Grpc::new(codec)
923                            .apply_compression_config(
924                                accept_compression_encodings,
925                                send_compression_encodings,
926                            )
927                            .apply_max_message_size_config(
928                                max_decoding_message_size,
929                                max_encoding_message_size,
930                            );
931                        let res = grpc.unary(method, req).await;
932                        Ok(res)
933                    };
934                    Box::pin(fut)
935                }
936                "/ibc.core.connection.v1.Msg/ConnectionOpenAck" => {
937                    #[allow(non_camel_case_types)]
938                    struct ConnectionOpenAckSvc<T: Msg>(pub Arc<T>);
939                    impl<T: Msg> tonic::server::UnaryService<super::MsgConnectionOpenAck>
940                    for ConnectionOpenAckSvc<T> {
941                        type Response = super::MsgConnectionOpenAckResponse;
942                        type Future = BoxFuture<
943                            tonic::Response<Self::Response>,
944                            tonic::Status,
945                        >;
946                        fn call(
947                            &mut self,
948                            request: tonic::Request<super::MsgConnectionOpenAck>,
949                        ) -> Self::Future {
950                            let inner = Arc::clone(&self.0);
951                            let fut = async move {
952                                <T as Msg>::connection_open_ack(&inner, request).await
953                            };
954                            Box::pin(fut)
955                        }
956                    }
957                    let accept_compression_encodings = self.accept_compression_encodings;
958                    let send_compression_encodings = self.send_compression_encodings;
959                    let max_decoding_message_size = self.max_decoding_message_size;
960                    let max_encoding_message_size = self.max_encoding_message_size;
961                    let inner = self.inner.clone();
962                    let fut = async move {
963                        let method = ConnectionOpenAckSvc(inner);
964                        let codec = tonic::codec::ProstCodec::default();
965                        let mut grpc = tonic::server::Grpc::new(codec)
966                            .apply_compression_config(
967                                accept_compression_encodings,
968                                send_compression_encodings,
969                            )
970                            .apply_max_message_size_config(
971                                max_decoding_message_size,
972                                max_encoding_message_size,
973                            );
974                        let res = grpc.unary(method, req).await;
975                        Ok(res)
976                    };
977                    Box::pin(fut)
978                }
979                "/ibc.core.connection.v1.Msg/ConnectionOpenConfirm" => {
980                    #[allow(non_camel_case_types)]
981                    struct ConnectionOpenConfirmSvc<T: Msg>(pub Arc<T>);
982                    impl<
983                        T: Msg,
984                    > tonic::server::UnaryService<super::MsgConnectionOpenConfirm>
985                    for ConnectionOpenConfirmSvc<T> {
986                        type Response = super::MsgConnectionOpenConfirmResponse;
987                        type Future = BoxFuture<
988                            tonic::Response<Self::Response>,
989                            tonic::Status,
990                        >;
991                        fn call(
992                            &mut self,
993                            request: tonic::Request<super::MsgConnectionOpenConfirm>,
994                        ) -> Self::Future {
995                            let inner = Arc::clone(&self.0);
996                            let fut = async move {
997                                <T as Msg>::connection_open_confirm(&inner, request).await
998                            };
999                            Box::pin(fut)
1000                        }
1001                    }
1002                    let accept_compression_encodings = self.accept_compression_encodings;
1003                    let send_compression_encodings = self.send_compression_encodings;
1004                    let max_decoding_message_size = self.max_decoding_message_size;
1005                    let max_encoding_message_size = self.max_encoding_message_size;
1006                    let inner = self.inner.clone();
1007                    let fut = async move {
1008                        let method = ConnectionOpenConfirmSvc(inner);
1009                        let codec = tonic::codec::ProstCodec::default();
1010                        let mut grpc = tonic::server::Grpc::new(codec)
1011                            .apply_compression_config(
1012                                accept_compression_encodings,
1013                                send_compression_encodings,
1014                            )
1015                            .apply_max_message_size_config(
1016                                max_decoding_message_size,
1017                                max_encoding_message_size,
1018                            );
1019                        let res = grpc.unary(method, req).await;
1020                        Ok(res)
1021                    };
1022                    Box::pin(fut)
1023                }
1024                "/ibc.core.connection.v1.Msg/UpdateConnectionParams" => {
1025                    #[allow(non_camel_case_types)]
1026                    struct UpdateConnectionParamsSvc<T: Msg>(pub Arc<T>);
1027                    impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams>
1028                    for UpdateConnectionParamsSvc<T> {
1029                        type Response = super::MsgUpdateParamsResponse;
1030                        type Future = BoxFuture<
1031                            tonic::Response<Self::Response>,
1032                            tonic::Status,
1033                        >;
1034                        fn call(
1035                            &mut self,
1036                            request: tonic::Request<super::MsgUpdateParams>,
1037                        ) -> Self::Future {
1038                            let inner = Arc::clone(&self.0);
1039                            let fut = async move {
1040                                <T as Msg>::update_connection_params(&inner, request).await
1041                            };
1042                            Box::pin(fut)
1043                        }
1044                    }
1045                    let accept_compression_encodings = self.accept_compression_encodings;
1046                    let send_compression_encodings = self.send_compression_encodings;
1047                    let max_decoding_message_size = self.max_decoding_message_size;
1048                    let max_encoding_message_size = self.max_encoding_message_size;
1049                    let inner = self.inner.clone();
1050                    let fut = async move {
1051                        let method = UpdateConnectionParamsSvc(inner);
1052                        let codec = tonic::codec::ProstCodec::default();
1053                        let mut grpc = tonic::server::Grpc::new(codec)
1054                            .apply_compression_config(
1055                                accept_compression_encodings,
1056                                send_compression_encodings,
1057                            )
1058                            .apply_max_message_size_config(
1059                                max_decoding_message_size,
1060                                max_encoding_message_size,
1061                            );
1062                        let res = grpc.unary(method, req).await;
1063                        Ok(res)
1064                    };
1065                    Box::pin(fut)
1066                }
1067                _ => {
1068                    Box::pin(async move {
1069                        let mut response = http::Response::new(
1070                            tonic::body::Body::default(),
1071                        );
1072                        let headers = response.headers_mut();
1073                        headers
1074                            .insert(
1075                                tonic::Status::GRPC_STATUS,
1076                                (tonic::Code::Unimplemented as i32).into(),
1077                            );
1078                        headers
1079                            .insert(
1080                                http::header::CONTENT_TYPE,
1081                                tonic::metadata::GRPC_CONTENT_TYPE,
1082                            );
1083                        Ok(response)
1084                    })
1085                }
1086            }
1087        }
1088    }
1089    impl<T> Clone for MsgServer<T> {
1090        fn clone(&self) -> Self {
1091            let inner = self.inner.clone();
1092            Self {
1093                inner,
1094                accept_compression_encodings: self.accept_compression_encodings,
1095                send_compression_encodings: self.send_compression_encodings,
1096                max_decoding_message_size: self.max_decoding_message_size,
1097                max_encoding_message_size: self.max_encoding_message_size,
1098            }
1099        }
1100    }
1101    /// Generated gRPC service name
1102    pub const SERVICE_NAME: &str = "ibc.core.connection.v1.Msg";
1103    impl<T> tonic::server::NamedService for MsgServer<T> {
1104        const NAME: &'static str = SERVICE_NAME;
1105    }
1106}
1107/// QueryConnectionRequest is the request type for the Query/Connection RPC
1108/// method
1109#[derive(Clone, PartialEq, ::prost::Message)]
1110pub struct QueryConnectionRequest {
1111    /// connection unique identifier
1112    #[prost(string, tag = "1")]
1113    pub connection_id: ::prost::alloc::string::String,
1114}
1115impl ::prost::Name for QueryConnectionRequest {
1116    const NAME: &'static str = "QueryConnectionRequest";
1117    const PACKAGE: &'static str = "ibc.core.connection.v1";
1118    fn full_name() -> ::prost::alloc::string::String {
1119        "ibc.core.connection.v1.QueryConnectionRequest".into()
1120    }
1121    fn type_url() -> ::prost::alloc::string::String {
1122        "/ibc.core.connection.v1.QueryConnectionRequest".into()
1123    }
1124}
1125/// QueryConnectionResponse is the response type for the Query/Connection RPC
1126/// method. Besides the connection end, it includes a proof and the height from
1127/// which the proof was retrieved.
1128#[derive(Clone, PartialEq, ::prost::Message)]
1129pub struct QueryConnectionResponse {
1130    /// connection associated with the request identifier
1131    #[prost(message, optional, tag = "1")]
1132    pub connection: ::core::option::Option<ConnectionEnd>,
1133    /// merkle proof of existence
1134    #[prost(bytes = "vec", tag = "2")]
1135    pub proof: ::prost::alloc::vec::Vec<u8>,
1136    /// height at which the proof was retrieved
1137    #[prost(message, optional, tag = "3")]
1138    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
1139}
1140impl ::prost::Name for QueryConnectionResponse {
1141    const NAME: &'static str = "QueryConnectionResponse";
1142    const PACKAGE: &'static str = "ibc.core.connection.v1";
1143    fn full_name() -> ::prost::alloc::string::String {
1144        "ibc.core.connection.v1.QueryConnectionResponse".into()
1145    }
1146    fn type_url() -> ::prost::alloc::string::String {
1147        "/ibc.core.connection.v1.QueryConnectionResponse".into()
1148    }
1149}
1150/// QueryConnectionsRequest is the request type for the Query/Connections RPC
1151/// method
1152#[derive(Clone, PartialEq, ::prost::Message)]
1153pub struct QueryConnectionsRequest {
1154    #[prost(message, optional, tag = "1")]
1155    pub pagination: ::core::option::Option<
1156        super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
1157    >,
1158}
1159impl ::prost::Name for QueryConnectionsRequest {
1160    const NAME: &'static str = "QueryConnectionsRequest";
1161    const PACKAGE: &'static str = "ibc.core.connection.v1";
1162    fn full_name() -> ::prost::alloc::string::String {
1163        "ibc.core.connection.v1.QueryConnectionsRequest".into()
1164    }
1165    fn type_url() -> ::prost::alloc::string::String {
1166        "/ibc.core.connection.v1.QueryConnectionsRequest".into()
1167    }
1168}
1169/// QueryConnectionsResponse is the response type for the Query/Connections RPC
1170/// method.
1171#[derive(Clone, PartialEq, ::prost::Message)]
1172pub struct QueryConnectionsResponse {
1173    /// list of stored connections of the chain.
1174    #[prost(message, repeated, tag = "1")]
1175    pub connections: ::prost::alloc::vec::Vec<IdentifiedConnection>,
1176    /// pagination response
1177    #[prost(message, optional, tag = "2")]
1178    pub pagination: ::core::option::Option<
1179        super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
1180    >,
1181    /// query block height
1182    #[prost(message, optional, tag = "3")]
1183    pub height: ::core::option::Option<super::super::client::v1::Height>,
1184}
1185impl ::prost::Name for QueryConnectionsResponse {
1186    const NAME: &'static str = "QueryConnectionsResponse";
1187    const PACKAGE: &'static str = "ibc.core.connection.v1";
1188    fn full_name() -> ::prost::alloc::string::String {
1189        "ibc.core.connection.v1.QueryConnectionsResponse".into()
1190    }
1191    fn type_url() -> ::prost::alloc::string::String {
1192        "/ibc.core.connection.v1.QueryConnectionsResponse".into()
1193    }
1194}
1195/// QueryClientConnectionsRequest is the request type for the
1196/// Query/ClientConnections RPC method
1197#[derive(Clone, PartialEq, ::prost::Message)]
1198pub struct QueryClientConnectionsRequest {
1199    /// client identifier associated with a connection
1200    #[prost(string, tag = "1")]
1201    pub client_id: ::prost::alloc::string::String,
1202}
1203impl ::prost::Name for QueryClientConnectionsRequest {
1204    const NAME: &'static str = "QueryClientConnectionsRequest";
1205    const PACKAGE: &'static str = "ibc.core.connection.v1";
1206    fn full_name() -> ::prost::alloc::string::String {
1207        "ibc.core.connection.v1.QueryClientConnectionsRequest".into()
1208    }
1209    fn type_url() -> ::prost::alloc::string::String {
1210        "/ibc.core.connection.v1.QueryClientConnectionsRequest".into()
1211    }
1212}
1213/// QueryClientConnectionsResponse is the response type for the
1214/// Query/ClientConnections RPC method
1215#[derive(Clone, PartialEq, ::prost::Message)]
1216pub struct QueryClientConnectionsResponse {
1217    /// slice of all the connection paths associated with a client.
1218    #[prost(string, repeated, tag = "1")]
1219    pub connection_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1220    /// merkle proof of existence
1221    #[prost(bytes = "vec", tag = "2")]
1222    pub proof: ::prost::alloc::vec::Vec<u8>,
1223    /// height at which the proof was generated
1224    #[prost(message, optional, tag = "3")]
1225    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
1226}
1227impl ::prost::Name for QueryClientConnectionsResponse {
1228    const NAME: &'static str = "QueryClientConnectionsResponse";
1229    const PACKAGE: &'static str = "ibc.core.connection.v1";
1230    fn full_name() -> ::prost::alloc::string::String {
1231        "ibc.core.connection.v1.QueryClientConnectionsResponse".into()
1232    }
1233    fn type_url() -> ::prost::alloc::string::String {
1234        "/ibc.core.connection.v1.QueryClientConnectionsResponse".into()
1235    }
1236}
1237/// QueryConnectionClientStateRequest is the request type for the
1238/// Query/ConnectionClientState RPC method
1239#[derive(Clone, PartialEq, ::prost::Message)]
1240pub struct QueryConnectionClientStateRequest {
1241    /// connection identifier
1242    #[prost(string, tag = "1")]
1243    pub connection_id: ::prost::alloc::string::String,
1244}
1245impl ::prost::Name for QueryConnectionClientStateRequest {
1246    const NAME: &'static str = "QueryConnectionClientStateRequest";
1247    const PACKAGE: &'static str = "ibc.core.connection.v1";
1248    fn full_name() -> ::prost::alloc::string::String {
1249        "ibc.core.connection.v1.QueryConnectionClientStateRequest".into()
1250    }
1251    fn type_url() -> ::prost::alloc::string::String {
1252        "/ibc.core.connection.v1.QueryConnectionClientStateRequest".into()
1253    }
1254}
1255/// QueryConnectionClientStateResponse is the response type for the
1256/// Query/ConnectionClientState RPC method
1257#[derive(Clone, PartialEq, ::prost::Message)]
1258pub struct QueryConnectionClientStateResponse {
1259    /// client state associated with the channel
1260    #[prost(message, optional, tag = "1")]
1261    pub identified_client_state: ::core::option::Option<
1262        super::super::client::v1::IdentifiedClientState,
1263    >,
1264    /// merkle proof of existence
1265    #[prost(bytes = "vec", tag = "2")]
1266    pub proof: ::prost::alloc::vec::Vec<u8>,
1267    /// height at which the proof was retrieved
1268    #[prost(message, optional, tag = "3")]
1269    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
1270}
1271impl ::prost::Name for QueryConnectionClientStateResponse {
1272    const NAME: &'static str = "QueryConnectionClientStateResponse";
1273    const PACKAGE: &'static str = "ibc.core.connection.v1";
1274    fn full_name() -> ::prost::alloc::string::String {
1275        "ibc.core.connection.v1.QueryConnectionClientStateResponse".into()
1276    }
1277    fn type_url() -> ::prost::alloc::string::String {
1278        "/ibc.core.connection.v1.QueryConnectionClientStateResponse".into()
1279    }
1280}
1281/// QueryConnectionConsensusStateRequest is the request type for the
1282/// Query/ConnectionConsensusState RPC method
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct QueryConnectionConsensusStateRequest {
1285    /// connection identifier
1286    #[prost(string, tag = "1")]
1287    pub connection_id: ::prost::alloc::string::String,
1288    #[prost(uint64, tag = "2")]
1289    pub revision_number: u64,
1290    #[prost(uint64, tag = "3")]
1291    pub revision_height: u64,
1292}
1293impl ::prost::Name for QueryConnectionConsensusStateRequest {
1294    const NAME: &'static str = "QueryConnectionConsensusStateRequest";
1295    const PACKAGE: &'static str = "ibc.core.connection.v1";
1296    fn full_name() -> ::prost::alloc::string::String {
1297        "ibc.core.connection.v1.QueryConnectionConsensusStateRequest".into()
1298    }
1299    fn type_url() -> ::prost::alloc::string::String {
1300        "/ibc.core.connection.v1.QueryConnectionConsensusStateRequest".into()
1301    }
1302}
1303/// QueryConnectionConsensusStateResponse is the response type for the
1304/// Query/ConnectionConsensusState RPC method
1305#[derive(Clone, PartialEq, ::prost::Message)]
1306pub struct QueryConnectionConsensusStateResponse {
1307    /// consensus state associated with the channel
1308    #[prost(message, optional, tag = "1")]
1309    pub consensus_state: ::core::option::Option<
1310        ::tendermint_proto::google::protobuf::Any,
1311    >,
1312    /// client ID associated with the consensus state
1313    #[prost(string, tag = "2")]
1314    pub client_id: ::prost::alloc::string::String,
1315    /// merkle proof of existence
1316    #[prost(bytes = "vec", tag = "3")]
1317    pub proof: ::prost::alloc::vec::Vec<u8>,
1318    /// height at which the proof was retrieved
1319    #[prost(message, optional, tag = "4")]
1320    pub proof_height: ::core::option::Option<super::super::client::v1::Height>,
1321}
1322impl ::prost::Name for QueryConnectionConsensusStateResponse {
1323    const NAME: &'static str = "QueryConnectionConsensusStateResponse";
1324    const PACKAGE: &'static str = "ibc.core.connection.v1";
1325    fn full_name() -> ::prost::alloc::string::String {
1326        "ibc.core.connection.v1.QueryConnectionConsensusStateResponse".into()
1327    }
1328    fn type_url() -> ::prost::alloc::string::String {
1329        "/ibc.core.connection.v1.QueryConnectionConsensusStateResponse".into()
1330    }
1331}
1332/// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method.
1333#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1334pub struct QueryConnectionParamsRequest {}
1335impl ::prost::Name for QueryConnectionParamsRequest {
1336    const NAME: &'static str = "QueryConnectionParamsRequest";
1337    const PACKAGE: &'static str = "ibc.core.connection.v1";
1338    fn full_name() -> ::prost::alloc::string::String {
1339        "ibc.core.connection.v1.QueryConnectionParamsRequest".into()
1340    }
1341    fn type_url() -> ::prost::alloc::string::String {
1342        "/ibc.core.connection.v1.QueryConnectionParamsRequest".into()
1343    }
1344}
1345/// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method.
1346#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1347pub struct QueryConnectionParamsResponse {
1348    /// params defines the parameters of the module.
1349    #[prost(message, optional, tag = "1")]
1350    pub params: ::core::option::Option<Params>,
1351}
1352impl ::prost::Name for QueryConnectionParamsResponse {
1353    const NAME: &'static str = "QueryConnectionParamsResponse";
1354    const PACKAGE: &'static str = "ibc.core.connection.v1";
1355    fn full_name() -> ::prost::alloc::string::String {
1356        "ibc.core.connection.v1.QueryConnectionParamsResponse".into()
1357    }
1358    fn type_url() -> ::prost::alloc::string::String {
1359        "/ibc.core.connection.v1.QueryConnectionParamsResponse".into()
1360    }
1361}
1362/// Generated client implementations.
1363#[cfg(feature = "client")]
1364pub mod query_client {
1365    #![allow(
1366        unused_variables,
1367        dead_code,
1368        missing_docs,
1369        clippy::wildcard_imports,
1370        clippy::let_unit_value,
1371    )]
1372    use tonic::codegen::*;
1373    use tonic::codegen::http::Uri;
1374    /// Query provides defines the gRPC querier service
1375    #[derive(Debug, Clone)]
1376    pub struct QueryClient<T> {
1377        inner: tonic::client::Grpc<T>,
1378    }
1379    #[cfg(feature = "transport")]
1380    impl QueryClient<tonic::transport::Channel> {
1381        /// Attempt to create a new client by connecting to a given endpoint.
1382        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1383        where
1384            D: TryInto<tonic::transport::Endpoint>,
1385            D::Error: Into<StdError>,
1386        {
1387            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1388            Ok(Self::new(conn))
1389        }
1390    }
1391    impl<T> QueryClient<T>
1392    where
1393        T: tonic::client::GrpcService<tonic::body::Body>,
1394        T::Error: Into<StdError>,
1395        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1396        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1397    {
1398        pub fn new(inner: T) -> Self {
1399            let inner = tonic::client::Grpc::new(inner);
1400            Self { inner }
1401        }
1402        pub fn with_origin(inner: T, origin: Uri) -> Self {
1403            let inner = tonic::client::Grpc::with_origin(inner, origin);
1404            Self { inner }
1405        }
1406        pub fn with_interceptor<F>(
1407            inner: T,
1408            interceptor: F,
1409        ) -> QueryClient<InterceptedService<T, F>>
1410        where
1411            F: tonic::service::Interceptor,
1412            T::ResponseBody: Default,
1413            T: tonic::codegen::Service<
1414                http::Request<tonic::body::Body>,
1415                Response = http::Response<
1416                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1417                >,
1418            >,
1419            <T as tonic::codegen::Service<
1420                http::Request<tonic::body::Body>,
1421            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1422        {
1423            QueryClient::new(InterceptedService::new(inner, interceptor))
1424        }
1425        /// Compress requests with the given encoding.
1426        ///
1427        /// This requires the server to support it otherwise it might respond with an
1428        /// error.
1429        #[must_use]
1430        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1431            self.inner = self.inner.send_compressed(encoding);
1432            self
1433        }
1434        /// Enable decompressing responses.
1435        #[must_use]
1436        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1437            self.inner = self.inner.accept_compressed(encoding);
1438            self
1439        }
1440        /// Limits the maximum size of a decoded message.
1441        ///
1442        /// Default: `4MB`
1443        #[must_use]
1444        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1445            self.inner = self.inner.max_decoding_message_size(limit);
1446            self
1447        }
1448        /// Limits the maximum size of an encoded message.
1449        ///
1450        /// Default: `usize::MAX`
1451        #[must_use]
1452        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1453            self.inner = self.inner.max_encoding_message_size(limit);
1454            self
1455        }
1456        /// Connection queries an IBC connection end.
1457        pub async fn connection(
1458            &mut self,
1459            request: impl tonic::IntoRequest<super::QueryConnectionRequest>,
1460        ) -> std::result::Result<
1461            tonic::Response<super::QueryConnectionResponse>,
1462            tonic::Status,
1463        > {
1464            self.inner
1465                .ready()
1466                .await
1467                .map_err(|e| {
1468                    tonic::Status::unknown(
1469                        format!("Service was not ready: {}", e.into()),
1470                    )
1471                })?;
1472            let codec = tonic::codec::ProstCodec::default();
1473            let path = http::uri::PathAndQuery::from_static(
1474                "/ibc.core.connection.v1.Query/Connection",
1475            );
1476            let mut req = request.into_request();
1477            req.extensions_mut()
1478                .insert(GrpcMethod::new("ibc.core.connection.v1.Query", "Connection"));
1479            self.inner.unary(req, path, codec).await
1480        }
1481        /// Connections queries all the IBC connections of a chain.
1482        pub async fn connections(
1483            &mut self,
1484            request: impl tonic::IntoRequest<super::QueryConnectionsRequest>,
1485        ) -> std::result::Result<
1486            tonic::Response<super::QueryConnectionsResponse>,
1487            tonic::Status,
1488        > {
1489            self.inner
1490                .ready()
1491                .await
1492                .map_err(|e| {
1493                    tonic::Status::unknown(
1494                        format!("Service was not ready: {}", e.into()),
1495                    )
1496                })?;
1497            let codec = tonic::codec::ProstCodec::default();
1498            let path = http::uri::PathAndQuery::from_static(
1499                "/ibc.core.connection.v1.Query/Connections",
1500            );
1501            let mut req = request.into_request();
1502            req.extensions_mut()
1503                .insert(GrpcMethod::new("ibc.core.connection.v1.Query", "Connections"));
1504            self.inner.unary(req, path, codec).await
1505        }
1506        /// ClientConnections queries the connection paths associated with a client
1507        /// state.
1508        pub async fn client_connections(
1509            &mut self,
1510            request: impl tonic::IntoRequest<super::QueryClientConnectionsRequest>,
1511        ) -> std::result::Result<
1512            tonic::Response<super::QueryClientConnectionsResponse>,
1513            tonic::Status,
1514        > {
1515            self.inner
1516                .ready()
1517                .await
1518                .map_err(|e| {
1519                    tonic::Status::unknown(
1520                        format!("Service was not ready: {}", e.into()),
1521                    )
1522                })?;
1523            let codec = tonic::codec::ProstCodec::default();
1524            let path = http::uri::PathAndQuery::from_static(
1525                "/ibc.core.connection.v1.Query/ClientConnections",
1526            );
1527            let mut req = request.into_request();
1528            req.extensions_mut()
1529                .insert(
1530                    GrpcMethod::new("ibc.core.connection.v1.Query", "ClientConnections"),
1531                );
1532            self.inner.unary(req, path, codec).await
1533        }
1534        /// ConnectionClientState queries the client state associated with the
1535        /// connection.
1536        pub async fn connection_client_state(
1537            &mut self,
1538            request: impl tonic::IntoRequest<super::QueryConnectionClientStateRequest>,
1539        ) -> std::result::Result<
1540            tonic::Response<super::QueryConnectionClientStateResponse>,
1541            tonic::Status,
1542        > {
1543            self.inner
1544                .ready()
1545                .await
1546                .map_err(|e| {
1547                    tonic::Status::unknown(
1548                        format!("Service was not ready: {}", e.into()),
1549                    )
1550                })?;
1551            let codec = tonic::codec::ProstCodec::default();
1552            let path = http::uri::PathAndQuery::from_static(
1553                "/ibc.core.connection.v1.Query/ConnectionClientState",
1554            );
1555            let mut req = request.into_request();
1556            req.extensions_mut()
1557                .insert(
1558                    GrpcMethod::new(
1559                        "ibc.core.connection.v1.Query",
1560                        "ConnectionClientState",
1561                    ),
1562                );
1563            self.inner.unary(req, path, codec).await
1564        }
1565        /// ConnectionConsensusState queries the consensus state associated with the
1566        /// connection.
1567        pub async fn connection_consensus_state(
1568            &mut self,
1569            request: impl tonic::IntoRequest<super::QueryConnectionConsensusStateRequest>,
1570        ) -> std::result::Result<
1571            tonic::Response<super::QueryConnectionConsensusStateResponse>,
1572            tonic::Status,
1573        > {
1574            self.inner
1575                .ready()
1576                .await
1577                .map_err(|e| {
1578                    tonic::Status::unknown(
1579                        format!("Service was not ready: {}", e.into()),
1580                    )
1581                })?;
1582            let codec = tonic::codec::ProstCodec::default();
1583            let path = http::uri::PathAndQuery::from_static(
1584                "/ibc.core.connection.v1.Query/ConnectionConsensusState",
1585            );
1586            let mut req = request.into_request();
1587            req.extensions_mut()
1588                .insert(
1589                    GrpcMethod::new(
1590                        "ibc.core.connection.v1.Query",
1591                        "ConnectionConsensusState",
1592                    ),
1593                );
1594            self.inner.unary(req, path, codec).await
1595        }
1596        /// ConnectionParams queries all parameters of the ibc connection submodule.
1597        pub async fn connection_params(
1598            &mut self,
1599            request: impl tonic::IntoRequest<super::QueryConnectionParamsRequest>,
1600        ) -> std::result::Result<
1601            tonic::Response<super::QueryConnectionParamsResponse>,
1602            tonic::Status,
1603        > {
1604            self.inner
1605                .ready()
1606                .await
1607                .map_err(|e| {
1608                    tonic::Status::unknown(
1609                        format!("Service was not ready: {}", e.into()),
1610                    )
1611                })?;
1612            let codec = tonic::codec::ProstCodec::default();
1613            let path = http::uri::PathAndQuery::from_static(
1614                "/ibc.core.connection.v1.Query/ConnectionParams",
1615            );
1616            let mut req = request.into_request();
1617            req.extensions_mut()
1618                .insert(
1619                    GrpcMethod::new("ibc.core.connection.v1.Query", "ConnectionParams"),
1620                );
1621            self.inner.unary(req, path, codec).await
1622        }
1623    }
1624}
1625/// Generated server implementations.
1626#[cfg(feature = "server")]
1627pub mod query_server {
1628    #![allow(
1629        unused_variables,
1630        dead_code,
1631        missing_docs,
1632        clippy::wildcard_imports,
1633        clippy::let_unit_value,
1634    )]
1635    use tonic::codegen::*;
1636    /// Generated trait containing gRPC methods that should be implemented for use with QueryServer.
1637    #[async_trait]
1638    pub trait Query: std::marker::Send + std::marker::Sync + 'static {
1639        /// Connection queries an IBC connection end.
1640        async fn connection(
1641            &self,
1642            request: tonic::Request<super::QueryConnectionRequest>,
1643        ) -> std::result::Result<
1644            tonic::Response<super::QueryConnectionResponse>,
1645            tonic::Status,
1646        >;
1647        /// Connections queries all the IBC connections of a chain.
1648        async fn connections(
1649            &self,
1650            request: tonic::Request<super::QueryConnectionsRequest>,
1651        ) -> std::result::Result<
1652            tonic::Response<super::QueryConnectionsResponse>,
1653            tonic::Status,
1654        >;
1655        /// ClientConnections queries the connection paths associated with a client
1656        /// state.
1657        async fn client_connections(
1658            &self,
1659            request: tonic::Request<super::QueryClientConnectionsRequest>,
1660        ) -> std::result::Result<
1661            tonic::Response<super::QueryClientConnectionsResponse>,
1662            tonic::Status,
1663        >;
1664        /// ConnectionClientState queries the client state associated with the
1665        /// connection.
1666        async fn connection_client_state(
1667            &self,
1668            request: tonic::Request<super::QueryConnectionClientStateRequest>,
1669        ) -> std::result::Result<
1670            tonic::Response<super::QueryConnectionClientStateResponse>,
1671            tonic::Status,
1672        >;
1673        /// ConnectionConsensusState queries the consensus state associated with the
1674        /// connection.
1675        async fn connection_consensus_state(
1676            &self,
1677            request: tonic::Request<super::QueryConnectionConsensusStateRequest>,
1678        ) -> std::result::Result<
1679            tonic::Response<super::QueryConnectionConsensusStateResponse>,
1680            tonic::Status,
1681        >;
1682        /// ConnectionParams queries all parameters of the ibc connection submodule.
1683        async fn connection_params(
1684            &self,
1685            request: tonic::Request<super::QueryConnectionParamsRequest>,
1686        ) -> std::result::Result<
1687            tonic::Response<super::QueryConnectionParamsResponse>,
1688            tonic::Status,
1689        >;
1690    }
1691    /// Query provides defines the gRPC querier service
1692    #[derive(Debug)]
1693    pub struct QueryServer<T> {
1694        inner: Arc<T>,
1695        accept_compression_encodings: EnabledCompressionEncodings,
1696        send_compression_encodings: EnabledCompressionEncodings,
1697        max_decoding_message_size: Option<usize>,
1698        max_encoding_message_size: Option<usize>,
1699    }
1700    impl<T> QueryServer<T> {
1701        pub fn new(inner: T) -> Self {
1702            Self::from_arc(Arc::new(inner))
1703        }
1704        pub fn from_arc(inner: Arc<T>) -> Self {
1705            Self {
1706                inner,
1707                accept_compression_encodings: Default::default(),
1708                send_compression_encodings: Default::default(),
1709                max_decoding_message_size: None,
1710                max_encoding_message_size: None,
1711            }
1712        }
1713        pub fn with_interceptor<F>(
1714            inner: T,
1715            interceptor: F,
1716        ) -> InterceptedService<Self, F>
1717        where
1718            F: tonic::service::Interceptor,
1719        {
1720            InterceptedService::new(Self::new(inner), interceptor)
1721        }
1722        /// Enable decompressing requests with the given encoding.
1723        #[must_use]
1724        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1725            self.accept_compression_encodings.enable(encoding);
1726            self
1727        }
1728        /// Compress responses with the given encoding, if the client supports it.
1729        #[must_use]
1730        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1731            self.send_compression_encodings.enable(encoding);
1732            self
1733        }
1734        /// Limits the maximum size of a decoded message.
1735        ///
1736        /// Default: `4MB`
1737        #[must_use]
1738        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1739            self.max_decoding_message_size = Some(limit);
1740            self
1741        }
1742        /// Limits the maximum size of an encoded message.
1743        ///
1744        /// Default: `usize::MAX`
1745        #[must_use]
1746        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1747            self.max_encoding_message_size = Some(limit);
1748            self
1749        }
1750    }
1751    impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
1752    where
1753        T: Query,
1754        B: Body + std::marker::Send + 'static,
1755        B::Error: Into<StdError> + std::marker::Send + 'static,
1756    {
1757        type Response = http::Response<tonic::body::Body>;
1758        type Error = std::convert::Infallible;
1759        type Future = BoxFuture<Self::Response, Self::Error>;
1760        fn poll_ready(
1761            &mut self,
1762            _cx: &mut Context<'_>,
1763        ) -> Poll<std::result::Result<(), Self::Error>> {
1764            Poll::Ready(Ok(()))
1765        }
1766        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1767            match req.uri().path() {
1768                "/ibc.core.connection.v1.Query/Connection" => {
1769                    #[allow(non_camel_case_types)]
1770                    struct ConnectionSvc<T: Query>(pub Arc<T>);
1771                    impl<
1772                        T: Query,
1773                    > tonic::server::UnaryService<super::QueryConnectionRequest>
1774                    for ConnectionSvc<T> {
1775                        type Response = super::QueryConnectionResponse;
1776                        type Future = BoxFuture<
1777                            tonic::Response<Self::Response>,
1778                            tonic::Status,
1779                        >;
1780                        fn call(
1781                            &mut self,
1782                            request: tonic::Request<super::QueryConnectionRequest>,
1783                        ) -> Self::Future {
1784                            let inner = Arc::clone(&self.0);
1785                            let fut = async move {
1786                                <T as Query>::connection(&inner, request).await
1787                            };
1788                            Box::pin(fut)
1789                        }
1790                    }
1791                    let accept_compression_encodings = self.accept_compression_encodings;
1792                    let send_compression_encodings = self.send_compression_encodings;
1793                    let max_decoding_message_size = self.max_decoding_message_size;
1794                    let max_encoding_message_size = self.max_encoding_message_size;
1795                    let inner = self.inner.clone();
1796                    let fut = async move {
1797                        let method = ConnectionSvc(inner);
1798                        let codec = tonic::codec::ProstCodec::default();
1799                        let mut grpc = tonic::server::Grpc::new(codec)
1800                            .apply_compression_config(
1801                                accept_compression_encodings,
1802                                send_compression_encodings,
1803                            )
1804                            .apply_max_message_size_config(
1805                                max_decoding_message_size,
1806                                max_encoding_message_size,
1807                            );
1808                        let res = grpc.unary(method, req).await;
1809                        Ok(res)
1810                    };
1811                    Box::pin(fut)
1812                }
1813                "/ibc.core.connection.v1.Query/Connections" => {
1814                    #[allow(non_camel_case_types)]
1815                    struct ConnectionsSvc<T: Query>(pub Arc<T>);
1816                    impl<
1817                        T: Query,
1818                    > tonic::server::UnaryService<super::QueryConnectionsRequest>
1819                    for ConnectionsSvc<T> {
1820                        type Response = super::QueryConnectionsResponse;
1821                        type Future = BoxFuture<
1822                            tonic::Response<Self::Response>,
1823                            tonic::Status,
1824                        >;
1825                        fn call(
1826                            &mut self,
1827                            request: tonic::Request<super::QueryConnectionsRequest>,
1828                        ) -> Self::Future {
1829                            let inner = Arc::clone(&self.0);
1830                            let fut = async move {
1831                                <T as Query>::connections(&inner, request).await
1832                            };
1833                            Box::pin(fut)
1834                        }
1835                    }
1836                    let accept_compression_encodings = self.accept_compression_encodings;
1837                    let send_compression_encodings = self.send_compression_encodings;
1838                    let max_decoding_message_size = self.max_decoding_message_size;
1839                    let max_encoding_message_size = self.max_encoding_message_size;
1840                    let inner = self.inner.clone();
1841                    let fut = async move {
1842                        let method = ConnectionsSvc(inner);
1843                        let codec = tonic::codec::ProstCodec::default();
1844                        let mut grpc = tonic::server::Grpc::new(codec)
1845                            .apply_compression_config(
1846                                accept_compression_encodings,
1847                                send_compression_encodings,
1848                            )
1849                            .apply_max_message_size_config(
1850                                max_decoding_message_size,
1851                                max_encoding_message_size,
1852                            );
1853                        let res = grpc.unary(method, req).await;
1854                        Ok(res)
1855                    };
1856                    Box::pin(fut)
1857                }
1858                "/ibc.core.connection.v1.Query/ClientConnections" => {
1859                    #[allow(non_camel_case_types)]
1860                    struct ClientConnectionsSvc<T: Query>(pub Arc<T>);
1861                    impl<
1862                        T: Query,
1863                    > tonic::server::UnaryService<super::QueryClientConnectionsRequest>
1864                    for ClientConnectionsSvc<T> {
1865                        type Response = super::QueryClientConnectionsResponse;
1866                        type Future = BoxFuture<
1867                            tonic::Response<Self::Response>,
1868                            tonic::Status,
1869                        >;
1870                        fn call(
1871                            &mut self,
1872                            request: tonic::Request<super::QueryClientConnectionsRequest>,
1873                        ) -> Self::Future {
1874                            let inner = Arc::clone(&self.0);
1875                            let fut = async move {
1876                                <T as Query>::client_connections(&inner, request).await
1877                            };
1878                            Box::pin(fut)
1879                        }
1880                    }
1881                    let accept_compression_encodings = self.accept_compression_encodings;
1882                    let send_compression_encodings = self.send_compression_encodings;
1883                    let max_decoding_message_size = self.max_decoding_message_size;
1884                    let max_encoding_message_size = self.max_encoding_message_size;
1885                    let inner = self.inner.clone();
1886                    let fut = async move {
1887                        let method = ClientConnectionsSvc(inner);
1888                        let codec = tonic::codec::ProstCodec::default();
1889                        let mut grpc = tonic::server::Grpc::new(codec)
1890                            .apply_compression_config(
1891                                accept_compression_encodings,
1892                                send_compression_encodings,
1893                            )
1894                            .apply_max_message_size_config(
1895                                max_decoding_message_size,
1896                                max_encoding_message_size,
1897                            );
1898                        let res = grpc.unary(method, req).await;
1899                        Ok(res)
1900                    };
1901                    Box::pin(fut)
1902                }
1903                "/ibc.core.connection.v1.Query/ConnectionClientState" => {
1904                    #[allow(non_camel_case_types)]
1905                    struct ConnectionClientStateSvc<T: Query>(pub Arc<T>);
1906                    impl<
1907                        T: Query,
1908                    > tonic::server::UnaryService<
1909                        super::QueryConnectionClientStateRequest,
1910                    > for ConnectionClientStateSvc<T> {
1911                        type Response = super::QueryConnectionClientStateResponse;
1912                        type Future = BoxFuture<
1913                            tonic::Response<Self::Response>,
1914                            tonic::Status,
1915                        >;
1916                        fn call(
1917                            &mut self,
1918                            request: tonic::Request<
1919                                super::QueryConnectionClientStateRequest,
1920                            >,
1921                        ) -> Self::Future {
1922                            let inner = Arc::clone(&self.0);
1923                            let fut = async move {
1924                                <T as Query>::connection_client_state(&inner, request).await
1925                            };
1926                            Box::pin(fut)
1927                        }
1928                    }
1929                    let accept_compression_encodings = self.accept_compression_encodings;
1930                    let send_compression_encodings = self.send_compression_encodings;
1931                    let max_decoding_message_size = self.max_decoding_message_size;
1932                    let max_encoding_message_size = self.max_encoding_message_size;
1933                    let inner = self.inner.clone();
1934                    let fut = async move {
1935                        let method = ConnectionClientStateSvc(inner);
1936                        let codec = tonic::codec::ProstCodec::default();
1937                        let mut grpc = tonic::server::Grpc::new(codec)
1938                            .apply_compression_config(
1939                                accept_compression_encodings,
1940                                send_compression_encodings,
1941                            )
1942                            .apply_max_message_size_config(
1943                                max_decoding_message_size,
1944                                max_encoding_message_size,
1945                            );
1946                        let res = grpc.unary(method, req).await;
1947                        Ok(res)
1948                    };
1949                    Box::pin(fut)
1950                }
1951                "/ibc.core.connection.v1.Query/ConnectionConsensusState" => {
1952                    #[allow(non_camel_case_types)]
1953                    struct ConnectionConsensusStateSvc<T: Query>(pub Arc<T>);
1954                    impl<
1955                        T: Query,
1956                    > tonic::server::UnaryService<
1957                        super::QueryConnectionConsensusStateRequest,
1958                    > for ConnectionConsensusStateSvc<T> {
1959                        type Response = super::QueryConnectionConsensusStateResponse;
1960                        type Future = BoxFuture<
1961                            tonic::Response<Self::Response>,
1962                            tonic::Status,
1963                        >;
1964                        fn call(
1965                            &mut self,
1966                            request: tonic::Request<
1967                                super::QueryConnectionConsensusStateRequest,
1968                            >,
1969                        ) -> Self::Future {
1970                            let inner = Arc::clone(&self.0);
1971                            let fut = async move {
1972                                <T as Query>::connection_consensus_state(&inner, request)
1973                                    .await
1974                            };
1975                            Box::pin(fut)
1976                        }
1977                    }
1978                    let accept_compression_encodings = self.accept_compression_encodings;
1979                    let send_compression_encodings = self.send_compression_encodings;
1980                    let max_decoding_message_size = self.max_decoding_message_size;
1981                    let max_encoding_message_size = self.max_encoding_message_size;
1982                    let inner = self.inner.clone();
1983                    let fut = async move {
1984                        let method = ConnectionConsensusStateSvc(inner);
1985                        let codec = tonic::codec::ProstCodec::default();
1986                        let mut grpc = tonic::server::Grpc::new(codec)
1987                            .apply_compression_config(
1988                                accept_compression_encodings,
1989                                send_compression_encodings,
1990                            )
1991                            .apply_max_message_size_config(
1992                                max_decoding_message_size,
1993                                max_encoding_message_size,
1994                            );
1995                        let res = grpc.unary(method, req).await;
1996                        Ok(res)
1997                    };
1998                    Box::pin(fut)
1999                }
2000                "/ibc.core.connection.v1.Query/ConnectionParams" => {
2001                    #[allow(non_camel_case_types)]
2002                    struct ConnectionParamsSvc<T: Query>(pub Arc<T>);
2003                    impl<
2004                        T: Query,
2005                    > tonic::server::UnaryService<super::QueryConnectionParamsRequest>
2006                    for ConnectionParamsSvc<T> {
2007                        type Response = super::QueryConnectionParamsResponse;
2008                        type Future = BoxFuture<
2009                            tonic::Response<Self::Response>,
2010                            tonic::Status,
2011                        >;
2012                        fn call(
2013                            &mut self,
2014                            request: tonic::Request<super::QueryConnectionParamsRequest>,
2015                        ) -> Self::Future {
2016                            let inner = Arc::clone(&self.0);
2017                            let fut = async move {
2018                                <T as Query>::connection_params(&inner, request).await
2019                            };
2020                            Box::pin(fut)
2021                        }
2022                    }
2023                    let accept_compression_encodings = self.accept_compression_encodings;
2024                    let send_compression_encodings = self.send_compression_encodings;
2025                    let max_decoding_message_size = self.max_decoding_message_size;
2026                    let max_encoding_message_size = self.max_encoding_message_size;
2027                    let inner = self.inner.clone();
2028                    let fut = async move {
2029                        let method = ConnectionParamsSvc(inner);
2030                        let codec = tonic::codec::ProstCodec::default();
2031                        let mut grpc = tonic::server::Grpc::new(codec)
2032                            .apply_compression_config(
2033                                accept_compression_encodings,
2034                                send_compression_encodings,
2035                            )
2036                            .apply_max_message_size_config(
2037                                max_decoding_message_size,
2038                                max_encoding_message_size,
2039                            );
2040                        let res = grpc.unary(method, req).await;
2041                        Ok(res)
2042                    };
2043                    Box::pin(fut)
2044                }
2045                _ => {
2046                    Box::pin(async move {
2047                        let mut response = http::Response::new(
2048                            tonic::body::Body::default(),
2049                        );
2050                        let headers = response.headers_mut();
2051                        headers
2052                            .insert(
2053                                tonic::Status::GRPC_STATUS,
2054                                (tonic::Code::Unimplemented as i32).into(),
2055                            );
2056                        headers
2057                            .insert(
2058                                http::header::CONTENT_TYPE,
2059                                tonic::metadata::GRPC_CONTENT_TYPE,
2060                            );
2061                        Ok(response)
2062                    })
2063                }
2064            }
2065        }
2066    }
2067    impl<T> Clone for QueryServer<T> {
2068        fn clone(&self) -> Self {
2069            let inner = self.inner.clone();
2070            Self {
2071                inner,
2072                accept_compression_encodings: self.accept_compression_encodings,
2073                send_compression_encodings: self.send_compression_encodings,
2074                max_decoding_message_size: self.max_decoding_message_size,
2075                max_encoding_message_size: self.max_encoding_message_size,
2076            }
2077        }
2078    }
2079    /// Generated gRPC service name
2080    pub const SERVICE_NAME: &str = "ibc.core.connection.v1.Query";
2081    impl<T> tonic::server::NamedService for QueryServer<T> {
2082        const NAME: &'static str = SERVICE_NAME;
2083    }
2084}