ibc_proto/prost/
ibc.applications.nft_transfer.v1.rs

1// This file is @generated by prost-build.
2/// ClassTrace contains the base classID for ICS721 non-fungible tokens and the
3/// source tracing information path.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ClassTrace {
6    /// path defines the chain of port/channel identifiers used for tracing the
7    /// source of the non-fungible token.
8    #[prost(string, tag = "1")]
9    pub path: ::prost::alloc::string::String,
10    /// base classID of the relayed non-fungible token.
11    #[prost(string, tag = "2")]
12    pub base_class_id: ::prost::alloc::string::String,
13}
14impl ::prost::Name for ClassTrace {
15    const NAME: &'static str = "ClassTrace";
16    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
17    fn full_name() -> ::prost::alloc::string::String {
18        "ibc.applications.nft_transfer.v1.ClassTrace".into()
19    }
20    fn type_url() -> ::prost::alloc::string::String {
21        "/ibc.applications.nft_transfer.v1.ClassTrace".into()
22    }
23}
24/// Params defines the set of IBC nft-transfer parameters.
25/// NOTE: To prevent a nft from being transferred, set the
26/// TransfersEnabled parameter to false.
27#[derive(Clone, Copy, PartialEq, ::prost::Message)]
28pub struct Params {
29    /// send_enabled enables or disables all cross-chain nft transfers from this
30    /// chain.
31    #[prost(bool, tag = "1")]
32    pub send_enabled: bool,
33    /// receive_enabled enables or disables all cross-chain nft transfers to this
34    /// chain.
35    #[prost(bool, tag = "2")]
36    pub receive_enabled: bool,
37}
38impl ::prost::Name for Params {
39    const NAME: &'static str = "Params";
40    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
41    fn full_name() -> ::prost::alloc::string::String {
42        "ibc.applications.nft_transfer.v1.Params".into()
43    }
44    fn type_url() -> ::prost::alloc::string::String {
45        "/ibc.applications.nft_transfer.v1.Params".into()
46    }
47}
48/// MsgTransfer defines a msg to transfer non fungible tokens between
49/// ICS721 enabled chains. See ICS Spec here:
50/// <https://github.com/cosmos/ibc/tree/master/spec/app/ics-721-nft-transfer#data-structures>
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct MsgTransfer {
53    /// the port on which the packet will be sent
54    #[prost(string, tag = "1")]
55    pub source_port: ::prost::alloc::string::String,
56    /// the channel by which the packet will be sent
57    #[prost(string, tag = "2")]
58    pub source_channel: ::prost::alloc::string::String,
59    /// the class_id of tokens to be transferred
60    #[prost(string, tag = "3")]
61    pub class_id: ::prost::alloc::string::String,
62    /// the non fungible tokens to be transferred
63    #[prost(string, repeated, tag = "4")]
64    pub token_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
65    /// the sender address
66    #[prost(string, tag = "5")]
67    pub sender: ::prost::alloc::string::String,
68    /// the recipient address on the destination chain
69    #[prost(string, tag = "6")]
70    pub receiver: ::prost::alloc::string::String,
71    /// Timeout height relative to the current block height.
72    /// The timeout is disabled when set to 0.
73    #[prost(message, optional, tag = "7")]
74    pub timeout_height: ::core::option::Option<
75        super::super::super::core::client::v1::Height,
76    >,
77    /// Timeout timestamp in absolute nanoseconds since unix epoch.
78    /// The timeout is disabled when set to 0.
79    #[prost(uint64, tag = "8")]
80    pub timeout_timestamp: u64,
81    /// optional memo
82    #[prost(string, tag = "9")]
83    pub memo: ::prost::alloc::string::String,
84}
85impl ::prost::Name for MsgTransfer {
86    const NAME: &'static str = "MsgTransfer";
87    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
88    fn full_name() -> ::prost::alloc::string::String {
89        "ibc.applications.nft_transfer.v1.MsgTransfer".into()
90    }
91    fn type_url() -> ::prost::alloc::string::String {
92        "/ibc.applications.nft_transfer.v1.MsgTransfer".into()
93    }
94}
95/// MsgTransferResponse defines the Msg/Transfer response type.
96#[derive(Clone, Copy, PartialEq, ::prost::Message)]
97pub struct MsgTransferResponse {
98    /// sequence number of the transfer packet sent
99    #[prost(uint64, tag = "1")]
100    pub sequence: u64,
101}
102impl ::prost::Name for MsgTransferResponse {
103    const NAME: &'static str = "MsgTransferResponse";
104    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
105    fn full_name() -> ::prost::alloc::string::String {
106        "ibc.applications.nft_transfer.v1.MsgTransferResponse".into()
107    }
108    fn type_url() -> ::prost::alloc::string::String {
109        "/ibc.applications.nft_transfer.v1.MsgTransferResponse".into()
110    }
111}
112/// MsgUpdateParams is the Msg/UpdateParams request type.
113///
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct MsgUpdateParams {
116    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
117    #[prost(string, tag = "1")]
118    pub authority: ::prost::alloc::string::String,
119    /// params defines the nft-transfer parameters to update.
120    ///
121    /// NOTE: All parameters must be supplied.
122    #[prost(message, optional, tag = "2")]
123    pub params: ::core::option::Option<Params>,
124}
125impl ::prost::Name for MsgUpdateParams {
126    const NAME: &'static str = "MsgUpdateParams";
127    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
128    fn full_name() -> ::prost::alloc::string::String {
129        "ibc.applications.nft_transfer.v1.MsgUpdateParams".into()
130    }
131    fn type_url() -> ::prost::alloc::string::String {
132        "/ibc.applications.nft_transfer.v1.MsgUpdateParams".into()
133    }
134}
135/// MsgUpdateParamsResponse defines the response structure for executing a
136/// MsgUpdateParams message.
137///
138#[derive(Clone, Copy, PartialEq, ::prost::Message)]
139pub struct MsgUpdateParamsResponse {}
140impl ::prost::Name for MsgUpdateParamsResponse {
141    const NAME: &'static str = "MsgUpdateParamsResponse";
142    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
143    fn full_name() -> ::prost::alloc::string::String {
144        "ibc.applications.nft_transfer.v1.MsgUpdateParamsResponse".into()
145    }
146    fn type_url() -> ::prost::alloc::string::String {
147        "/ibc.applications.nft_transfer.v1.MsgUpdateParamsResponse".into()
148    }
149}
150/// Generated client implementations.
151#[cfg(feature = "client")]
152pub mod msg_client {
153    #![allow(
154        unused_variables,
155        dead_code,
156        missing_docs,
157        clippy::wildcard_imports,
158        clippy::let_unit_value,
159    )]
160    use tonic::codegen::*;
161    use tonic::codegen::http::Uri;
162    /// Msg defines the ibc/nft-transfer Msg service.
163    #[derive(Debug, Clone)]
164    pub struct MsgClient<T> {
165        inner: tonic::client::Grpc<T>,
166    }
167    #[cfg(feature = "transport")]
168    impl MsgClient<tonic::transport::Channel> {
169        /// Attempt to create a new client by connecting to a given endpoint.
170        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
171        where
172            D: TryInto<tonic::transport::Endpoint>,
173            D::Error: Into<StdError>,
174        {
175            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
176            Ok(Self::new(conn))
177        }
178    }
179    impl<T> MsgClient<T>
180    where
181        T: tonic::client::GrpcService<tonic::body::Body>,
182        T::Error: Into<StdError>,
183        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
184        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
185    {
186        pub fn new(inner: T) -> Self {
187            let inner = tonic::client::Grpc::new(inner);
188            Self { inner }
189        }
190        pub fn with_origin(inner: T, origin: Uri) -> Self {
191            let inner = tonic::client::Grpc::with_origin(inner, origin);
192            Self { inner }
193        }
194        pub fn with_interceptor<F>(
195            inner: T,
196            interceptor: F,
197        ) -> MsgClient<InterceptedService<T, F>>
198        where
199            F: tonic::service::Interceptor,
200            T::ResponseBody: Default,
201            T: tonic::codegen::Service<
202                http::Request<tonic::body::Body>,
203                Response = http::Response<
204                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
205                >,
206            >,
207            <T as tonic::codegen::Service<
208                http::Request<tonic::body::Body>,
209            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
210        {
211            MsgClient::new(InterceptedService::new(inner, interceptor))
212        }
213        /// Compress requests with the given encoding.
214        ///
215        /// This requires the server to support it otherwise it might respond with an
216        /// error.
217        #[must_use]
218        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
219            self.inner = self.inner.send_compressed(encoding);
220            self
221        }
222        /// Enable decompressing responses.
223        #[must_use]
224        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
225            self.inner = self.inner.accept_compressed(encoding);
226            self
227        }
228        /// Limits the maximum size of a decoded message.
229        ///
230        /// Default: `4MB`
231        #[must_use]
232        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
233            self.inner = self.inner.max_decoding_message_size(limit);
234            self
235        }
236        /// Limits the maximum size of an encoded message.
237        ///
238        /// Default: `usize::MAX`
239        #[must_use]
240        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
241            self.inner = self.inner.max_encoding_message_size(limit);
242            self
243        }
244        /// Transfer defines a rpc handler method for MsgTransfer.
245        pub async fn transfer(
246            &mut self,
247            request: impl tonic::IntoRequest<super::MsgTransfer>,
248        ) -> std::result::Result<
249            tonic::Response<super::MsgTransferResponse>,
250            tonic::Status,
251        > {
252            self.inner
253                .ready()
254                .await
255                .map_err(|e| {
256                    tonic::Status::unknown(
257                        format!("Service was not ready: {}", e.into()),
258                    )
259                })?;
260            let codec = tonic::codec::ProstCodec::default();
261            let path = http::uri::PathAndQuery::from_static(
262                "/ibc.applications.nft_transfer.v1.Msg/Transfer",
263            );
264            let mut req = request.into_request();
265            req.extensions_mut()
266                .insert(
267                    GrpcMethod::new("ibc.applications.nft_transfer.v1.Msg", "Transfer"),
268                );
269            self.inner.unary(req, path, codec).await
270        }
271        /// UpdateParams defines a governance operation for updating the nft-transfer module parameters.
272        /// The authority is defined in the keeper.
273        ///
274        pub async fn update_params(
275            &mut self,
276            request: impl tonic::IntoRequest<super::MsgUpdateParams>,
277        ) -> std::result::Result<
278            tonic::Response<super::MsgUpdateParamsResponse>,
279            tonic::Status,
280        > {
281            self.inner
282                .ready()
283                .await
284                .map_err(|e| {
285                    tonic::Status::unknown(
286                        format!("Service was not ready: {}", e.into()),
287                    )
288                })?;
289            let codec = tonic::codec::ProstCodec::default();
290            let path = http::uri::PathAndQuery::from_static(
291                "/ibc.applications.nft_transfer.v1.Msg/UpdateParams",
292            );
293            let mut req = request.into_request();
294            req.extensions_mut()
295                .insert(
296                    GrpcMethod::new(
297                        "ibc.applications.nft_transfer.v1.Msg",
298                        "UpdateParams",
299                    ),
300                );
301            self.inner.unary(req, path, codec).await
302        }
303    }
304}
305/// Generated server implementations.
306#[cfg(feature = "server")]
307pub mod msg_server {
308    #![allow(
309        unused_variables,
310        dead_code,
311        missing_docs,
312        clippy::wildcard_imports,
313        clippy::let_unit_value,
314    )]
315    use tonic::codegen::*;
316    /// Generated trait containing gRPC methods that should be implemented for use with MsgServer.
317    #[async_trait]
318    pub trait Msg: std::marker::Send + std::marker::Sync + 'static {
319        /// Transfer defines a rpc handler method for MsgTransfer.
320        async fn transfer(
321            &self,
322            request: tonic::Request<super::MsgTransfer>,
323        ) -> std::result::Result<
324            tonic::Response<super::MsgTransferResponse>,
325            tonic::Status,
326        >;
327        /// UpdateParams defines a governance operation for updating the nft-transfer module parameters.
328        /// The authority is defined in the keeper.
329        ///
330        async fn update_params(
331            &self,
332            request: tonic::Request<super::MsgUpdateParams>,
333        ) -> std::result::Result<
334            tonic::Response<super::MsgUpdateParamsResponse>,
335            tonic::Status,
336        >;
337    }
338    /// Msg defines the ibc/nft-transfer Msg service.
339    #[derive(Debug)]
340    pub struct MsgServer<T> {
341        inner: Arc<T>,
342        accept_compression_encodings: EnabledCompressionEncodings,
343        send_compression_encodings: EnabledCompressionEncodings,
344        max_decoding_message_size: Option<usize>,
345        max_encoding_message_size: Option<usize>,
346    }
347    impl<T> MsgServer<T> {
348        pub fn new(inner: T) -> Self {
349            Self::from_arc(Arc::new(inner))
350        }
351        pub fn from_arc(inner: Arc<T>) -> Self {
352            Self {
353                inner,
354                accept_compression_encodings: Default::default(),
355                send_compression_encodings: Default::default(),
356                max_decoding_message_size: None,
357                max_encoding_message_size: None,
358            }
359        }
360        pub fn with_interceptor<F>(
361            inner: T,
362            interceptor: F,
363        ) -> InterceptedService<Self, F>
364        where
365            F: tonic::service::Interceptor,
366        {
367            InterceptedService::new(Self::new(inner), interceptor)
368        }
369        /// Enable decompressing requests with the given encoding.
370        #[must_use]
371        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
372            self.accept_compression_encodings.enable(encoding);
373            self
374        }
375        /// Compress responses with the given encoding, if the client supports it.
376        #[must_use]
377        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
378            self.send_compression_encodings.enable(encoding);
379            self
380        }
381        /// Limits the maximum size of a decoded message.
382        ///
383        /// Default: `4MB`
384        #[must_use]
385        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
386            self.max_decoding_message_size = Some(limit);
387            self
388        }
389        /// Limits the maximum size of an encoded message.
390        ///
391        /// Default: `usize::MAX`
392        #[must_use]
393        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
394            self.max_encoding_message_size = Some(limit);
395            self
396        }
397    }
398    impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
399    where
400        T: Msg,
401        B: Body + std::marker::Send + 'static,
402        B::Error: Into<StdError> + std::marker::Send + 'static,
403    {
404        type Response = http::Response<tonic::body::Body>;
405        type Error = std::convert::Infallible;
406        type Future = BoxFuture<Self::Response, Self::Error>;
407        fn poll_ready(
408            &mut self,
409            _cx: &mut Context<'_>,
410        ) -> Poll<std::result::Result<(), Self::Error>> {
411            Poll::Ready(Ok(()))
412        }
413        fn call(&mut self, req: http::Request<B>) -> Self::Future {
414            match req.uri().path() {
415                "/ibc.applications.nft_transfer.v1.Msg/Transfer" => {
416                    #[allow(non_camel_case_types)]
417                    struct TransferSvc<T: Msg>(pub Arc<T>);
418                    impl<T: Msg> tonic::server::UnaryService<super::MsgTransfer>
419                    for TransferSvc<T> {
420                        type Response = super::MsgTransferResponse;
421                        type Future = BoxFuture<
422                            tonic::Response<Self::Response>,
423                            tonic::Status,
424                        >;
425                        fn call(
426                            &mut self,
427                            request: tonic::Request<super::MsgTransfer>,
428                        ) -> Self::Future {
429                            let inner = Arc::clone(&self.0);
430                            let fut = async move {
431                                <T as Msg>::transfer(&inner, request).await
432                            };
433                            Box::pin(fut)
434                        }
435                    }
436                    let accept_compression_encodings = self.accept_compression_encodings;
437                    let send_compression_encodings = self.send_compression_encodings;
438                    let max_decoding_message_size = self.max_decoding_message_size;
439                    let max_encoding_message_size = self.max_encoding_message_size;
440                    let inner = self.inner.clone();
441                    let fut = async move {
442                        let method = TransferSvc(inner);
443                        let codec = tonic::codec::ProstCodec::default();
444                        let mut grpc = tonic::server::Grpc::new(codec)
445                            .apply_compression_config(
446                                accept_compression_encodings,
447                                send_compression_encodings,
448                            )
449                            .apply_max_message_size_config(
450                                max_decoding_message_size,
451                                max_encoding_message_size,
452                            );
453                        let res = grpc.unary(method, req).await;
454                        Ok(res)
455                    };
456                    Box::pin(fut)
457                }
458                "/ibc.applications.nft_transfer.v1.Msg/UpdateParams" => {
459                    #[allow(non_camel_case_types)]
460                    struct UpdateParamsSvc<T: Msg>(pub Arc<T>);
461                    impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams>
462                    for UpdateParamsSvc<T> {
463                        type Response = super::MsgUpdateParamsResponse;
464                        type Future = BoxFuture<
465                            tonic::Response<Self::Response>,
466                            tonic::Status,
467                        >;
468                        fn call(
469                            &mut self,
470                            request: tonic::Request<super::MsgUpdateParams>,
471                        ) -> Self::Future {
472                            let inner = Arc::clone(&self.0);
473                            let fut = async move {
474                                <T as Msg>::update_params(&inner, request).await
475                            };
476                            Box::pin(fut)
477                        }
478                    }
479                    let accept_compression_encodings = self.accept_compression_encodings;
480                    let send_compression_encodings = self.send_compression_encodings;
481                    let max_decoding_message_size = self.max_decoding_message_size;
482                    let max_encoding_message_size = self.max_encoding_message_size;
483                    let inner = self.inner.clone();
484                    let fut = async move {
485                        let method = UpdateParamsSvc(inner);
486                        let codec = tonic::codec::ProstCodec::default();
487                        let mut grpc = tonic::server::Grpc::new(codec)
488                            .apply_compression_config(
489                                accept_compression_encodings,
490                                send_compression_encodings,
491                            )
492                            .apply_max_message_size_config(
493                                max_decoding_message_size,
494                                max_encoding_message_size,
495                            );
496                        let res = grpc.unary(method, req).await;
497                        Ok(res)
498                    };
499                    Box::pin(fut)
500                }
501                _ => {
502                    Box::pin(async move {
503                        let mut response = http::Response::new(
504                            tonic::body::Body::default(),
505                        );
506                        let headers = response.headers_mut();
507                        headers
508                            .insert(
509                                tonic::Status::GRPC_STATUS,
510                                (tonic::Code::Unimplemented as i32).into(),
511                            );
512                        headers
513                            .insert(
514                                http::header::CONTENT_TYPE,
515                                tonic::metadata::GRPC_CONTENT_TYPE,
516                            );
517                        Ok(response)
518                    })
519                }
520            }
521        }
522    }
523    impl<T> Clone for MsgServer<T> {
524        fn clone(&self) -> Self {
525            let inner = self.inner.clone();
526            Self {
527                inner,
528                accept_compression_encodings: self.accept_compression_encodings,
529                send_compression_encodings: self.send_compression_encodings,
530                max_decoding_message_size: self.max_decoding_message_size,
531                max_encoding_message_size: self.max_encoding_message_size,
532            }
533        }
534    }
535    /// Generated gRPC service name
536    pub const SERVICE_NAME: &str = "ibc.applications.nft_transfer.v1.Msg";
537    impl<T> tonic::server::NamedService for MsgServer<T> {
538        const NAME: &'static str = SERVICE_NAME;
539    }
540}
541/// NonFungibleTokenPacketData defines a struct for the packet payload
542/// See NonFungibleTokenPacketData spec:
543/// <https://github.com/cosmos/ibc/tree/master/spec/app/ics-721-nft-transfer#data-structures>
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct NonFungibleTokenPacketData {
546    /// the class_id of class to be transferred
547    #[prost(string, tag = "1")]
548    pub class_id: ::prost::alloc::string::String,
549    /// the class_uri of class to be transferred
550    #[prost(string, tag = "2")]
551    pub class_uri: ::prost::alloc::string::String,
552    /// the class_data of class to be transferred
553    #[prost(string, tag = "3")]
554    pub class_data: ::prost::alloc::string::String,
555    /// the non fungible tokens to be transferred
556    #[prost(string, repeated, tag = "4")]
557    pub token_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
558    /// the non fungible tokens's uri to be transferred
559    #[prost(string, repeated, tag = "5")]
560    pub token_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
561    /// the non fungible tokens's data to be transferred
562    #[prost(string, repeated, tag = "6")]
563    pub token_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
564    /// the sender address
565    #[prost(string, tag = "7")]
566    pub sender: ::prost::alloc::string::String,
567    /// the recipient address on the destination chain
568    #[prost(string, tag = "8")]
569    pub receiver: ::prost::alloc::string::String,
570    /// optional memo
571    #[prost(string, tag = "9")]
572    pub memo: ::prost::alloc::string::String,
573}
574impl ::prost::Name for NonFungibleTokenPacketData {
575    const NAME: &'static str = "NonFungibleTokenPacketData";
576    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
577    fn full_name() -> ::prost::alloc::string::String {
578        "ibc.applications.nft_transfer.v1.NonFungibleTokenPacketData".into()
579    }
580    fn type_url() -> ::prost::alloc::string::String {
581        "/ibc.applications.nft_transfer.v1.NonFungibleTokenPacketData".into()
582    }
583}
584/// QueryClassTraceRequest is the request type for the Query/ClassDenom RPC
585/// method
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct QueryClassTraceRequest {
588    /// hash (in hex format) or classID (full classID with ibc prefix) of the
589    /// denomination trace information.
590    #[prost(string, tag = "1")]
591    pub hash: ::prost::alloc::string::String,
592}
593impl ::prost::Name for QueryClassTraceRequest {
594    const NAME: &'static str = "QueryClassTraceRequest";
595    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
596    fn full_name() -> ::prost::alloc::string::String {
597        "ibc.applications.nft_transfer.v1.QueryClassTraceRequest".into()
598    }
599    fn type_url() -> ::prost::alloc::string::String {
600        "/ibc.applications.nft_transfer.v1.QueryClassTraceRequest".into()
601    }
602}
603/// QueryClassTraceResponse is the response type for the Query/ClassDenom RPC
604/// method.
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct QueryClassTraceResponse {
607    /// class_trace returns the requested class trace information.
608    #[prost(message, optional, tag = "1")]
609    pub class_trace: ::core::option::Option<ClassTrace>,
610}
611impl ::prost::Name for QueryClassTraceResponse {
612    const NAME: &'static str = "QueryClassTraceResponse";
613    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
614    fn full_name() -> ::prost::alloc::string::String {
615        "ibc.applications.nft_transfer.v1.QueryClassTraceResponse".into()
616    }
617    fn type_url() -> ::prost::alloc::string::String {
618        "/ibc.applications.nft_transfer.v1.QueryClassTraceResponse".into()
619    }
620}
621/// QueryConnectionsRequest is the request type for the Query/ClassTraces RPC
622/// method
623#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct QueryClassTracesRequest {
625    /// pagination defines an optional pagination for the request.
626    #[prost(message, optional, tag = "1")]
627    pub pagination: ::core::option::Option<
628        super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
629    >,
630}
631impl ::prost::Name for QueryClassTracesRequest {
632    const NAME: &'static str = "QueryClassTracesRequest";
633    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
634    fn full_name() -> ::prost::alloc::string::String {
635        "ibc.applications.nft_transfer.v1.QueryClassTracesRequest".into()
636    }
637    fn type_url() -> ::prost::alloc::string::String {
638        "/ibc.applications.nft_transfer.v1.QueryClassTracesRequest".into()
639    }
640}
641/// QueryClassTracesResponse is the response type for the Query/ClassTraces RPC
642/// method.
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct QueryClassTracesResponse {
645    /// class_traces returns all class trace information.
646    #[prost(message, repeated, tag = "1")]
647    pub class_traces: ::prost::alloc::vec::Vec<ClassTrace>,
648    /// pagination defines the pagination in the response.
649    #[prost(message, optional, tag = "2")]
650    pub pagination: ::core::option::Option<
651        super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
652    >,
653}
654impl ::prost::Name for QueryClassTracesResponse {
655    const NAME: &'static str = "QueryClassTracesResponse";
656    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
657    fn full_name() -> ::prost::alloc::string::String {
658        "ibc.applications.nft_transfer.v1.QueryClassTracesResponse".into()
659    }
660    fn type_url() -> ::prost::alloc::string::String {
661        "/ibc.applications.nft_transfer.v1.QueryClassTracesResponse".into()
662    }
663}
664/// QueryClassHashRequest is the request type for the Query/ClassHash RPC
665/// method
666#[derive(Clone, PartialEq, ::prost::Message)]
667pub struct QueryClassHashRequest {
668    /// The class trace `([port_id]/[channel_id])+/[class]`
669    #[prost(string, tag = "1")]
670    pub trace: ::prost::alloc::string::String,
671}
672impl ::prost::Name for QueryClassHashRequest {
673    const NAME: &'static str = "QueryClassHashRequest";
674    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
675    fn full_name() -> ::prost::alloc::string::String {
676        "ibc.applications.nft_transfer.v1.QueryClassHashRequest".into()
677    }
678    fn type_url() -> ::prost::alloc::string::String {
679        "/ibc.applications.nft_transfer.v1.QueryClassHashRequest".into()
680    }
681}
682/// QueryClassHashResponse is the response type for the Query/ClassHash RPC
683/// method.
684#[derive(Clone, PartialEq, ::prost::Message)]
685pub struct QueryClassHashResponse {
686    /// hash (in hex format) of the denomination trace information.
687    #[prost(string, tag = "1")]
688    pub hash: ::prost::alloc::string::String,
689}
690impl ::prost::Name for QueryClassHashResponse {
691    const NAME: &'static str = "QueryClassHashResponse";
692    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
693    fn full_name() -> ::prost::alloc::string::String {
694        "ibc.applications.nft_transfer.v1.QueryClassHashResponse".into()
695    }
696    fn type_url() -> ::prost::alloc::string::String {
697        "/ibc.applications.nft_transfer.v1.QueryClassHashResponse".into()
698    }
699}
700/// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC
701/// method.
702#[derive(Clone, PartialEq, ::prost::Message)]
703pub struct QueryEscrowAddressRequest {
704    /// unique port identifier
705    #[prost(string, tag = "1")]
706    pub port_id: ::prost::alloc::string::String,
707    /// unique channel identifier
708    #[prost(string, tag = "2")]
709    pub channel_id: ::prost::alloc::string::String,
710}
711impl ::prost::Name for QueryEscrowAddressRequest {
712    const NAME: &'static str = "QueryEscrowAddressRequest";
713    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
714    fn full_name() -> ::prost::alloc::string::String {
715        "ibc.applications.nft_transfer.v1.QueryEscrowAddressRequest".into()
716    }
717    fn type_url() -> ::prost::alloc::string::String {
718        "/ibc.applications.nft_transfer.v1.QueryEscrowAddressRequest".into()
719    }
720}
721/// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC
722/// method.
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct QueryEscrowAddressResponse {
725    /// the escrow account address
726    #[prost(string, tag = "1")]
727    pub escrow_address: ::prost::alloc::string::String,
728}
729impl ::prost::Name for QueryEscrowAddressResponse {
730    const NAME: &'static str = "QueryEscrowAddressResponse";
731    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
732    fn full_name() -> ::prost::alloc::string::String {
733        "ibc.applications.nft_transfer.v1.QueryEscrowAddressResponse".into()
734    }
735    fn type_url() -> ::prost::alloc::string::String {
736        "/ibc.applications.nft_transfer.v1.QueryEscrowAddressResponse".into()
737    }
738}
739/// QueryParamsRequest is request type for the Query/Params RPC method.
740#[derive(Clone, Copy, PartialEq, ::prost::Message)]
741pub struct QueryParamsRequest {}
742impl ::prost::Name for QueryParamsRequest {
743    const NAME: &'static str = "QueryParamsRequest";
744    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
745    fn full_name() -> ::prost::alloc::string::String {
746        "ibc.applications.nft_transfer.v1.QueryParamsRequest".into()
747    }
748    fn type_url() -> ::prost::alloc::string::String {
749        "/ibc.applications.nft_transfer.v1.QueryParamsRequest".into()
750    }
751}
752/// QueryParamsResponse is response type for the Query/Params RPC method.
753#[derive(Clone, Copy, PartialEq, ::prost::Message)]
754pub struct QueryParamsResponse {
755    /// params holds all the parameters of this module.
756    #[prost(message, optional, tag = "1")]
757    pub params: ::core::option::Option<Params>,
758}
759impl ::prost::Name for QueryParamsResponse {
760    const NAME: &'static str = "QueryParamsResponse";
761    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
762    fn full_name() -> ::prost::alloc::string::String {
763        "ibc.applications.nft_transfer.v1.QueryParamsResponse".into()
764    }
765    fn type_url() -> ::prost::alloc::string::String {
766        "/ibc.applications.nft_transfer.v1.QueryParamsResponse".into()
767    }
768}
769/// Generated client implementations.
770#[cfg(feature = "client")]
771pub mod query_client {
772    #![allow(
773        unused_variables,
774        dead_code,
775        missing_docs,
776        clippy::wildcard_imports,
777        clippy::let_unit_value,
778    )]
779    use tonic::codegen::*;
780    use tonic::codegen::http::Uri;
781    /// Query provides defines the gRPC querier service.
782    #[derive(Debug, Clone)]
783    pub struct QueryClient<T> {
784        inner: tonic::client::Grpc<T>,
785    }
786    #[cfg(feature = "transport")]
787    impl QueryClient<tonic::transport::Channel> {
788        /// Attempt to create a new client by connecting to a given endpoint.
789        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
790        where
791            D: TryInto<tonic::transport::Endpoint>,
792            D::Error: Into<StdError>,
793        {
794            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
795            Ok(Self::new(conn))
796        }
797    }
798    impl<T> QueryClient<T>
799    where
800        T: tonic::client::GrpcService<tonic::body::Body>,
801        T::Error: Into<StdError>,
802        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
803        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
804    {
805        pub fn new(inner: T) -> Self {
806            let inner = tonic::client::Grpc::new(inner);
807            Self { inner }
808        }
809        pub fn with_origin(inner: T, origin: Uri) -> Self {
810            let inner = tonic::client::Grpc::with_origin(inner, origin);
811            Self { inner }
812        }
813        pub fn with_interceptor<F>(
814            inner: T,
815            interceptor: F,
816        ) -> QueryClient<InterceptedService<T, F>>
817        where
818            F: tonic::service::Interceptor,
819            T::ResponseBody: Default,
820            T: tonic::codegen::Service<
821                http::Request<tonic::body::Body>,
822                Response = http::Response<
823                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
824                >,
825            >,
826            <T as tonic::codegen::Service<
827                http::Request<tonic::body::Body>,
828            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
829        {
830            QueryClient::new(InterceptedService::new(inner, interceptor))
831        }
832        /// Compress requests with the given encoding.
833        ///
834        /// This requires the server to support it otherwise it might respond with an
835        /// error.
836        #[must_use]
837        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
838            self.inner = self.inner.send_compressed(encoding);
839            self
840        }
841        /// Enable decompressing responses.
842        #[must_use]
843        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
844            self.inner = self.inner.accept_compressed(encoding);
845            self
846        }
847        /// Limits the maximum size of a decoded message.
848        ///
849        /// Default: `4MB`
850        #[must_use]
851        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
852            self.inner = self.inner.max_decoding_message_size(limit);
853            self
854        }
855        /// Limits the maximum size of an encoded message.
856        ///
857        /// Default: `usize::MAX`
858        #[must_use]
859        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
860            self.inner = self.inner.max_encoding_message_size(limit);
861            self
862        }
863        /// ClassTrace queries a class trace information.
864        pub async fn class_trace(
865            &mut self,
866            request: impl tonic::IntoRequest<super::QueryClassTraceRequest>,
867        ) -> std::result::Result<
868            tonic::Response<super::QueryClassTraceResponse>,
869            tonic::Status,
870        > {
871            self.inner
872                .ready()
873                .await
874                .map_err(|e| {
875                    tonic::Status::unknown(
876                        format!("Service was not ready: {}", e.into()),
877                    )
878                })?;
879            let codec = tonic::codec::ProstCodec::default();
880            let path = http::uri::PathAndQuery::from_static(
881                "/ibc.applications.nft_transfer.v1.Query/ClassTrace",
882            );
883            let mut req = request.into_request();
884            req.extensions_mut()
885                .insert(
886                    GrpcMethod::new(
887                        "ibc.applications.nft_transfer.v1.Query",
888                        "ClassTrace",
889                    ),
890                );
891            self.inner.unary(req, path, codec).await
892        }
893        /// ClassTraces queries all class traces.
894        pub async fn class_traces(
895            &mut self,
896            request: impl tonic::IntoRequest<super::QueryClassTracesRequest>,
897        ) -> std::result::Result<
898            tonic::Response<super::QueryClassTracesResponse>,
899            tonic::Status,
900        > {
901            self.inner
902                .ready()
903                .await
904                .map_err(|e| {
905                    tonic::Status::unknown(
906                        format!("Service was not ready: {}", e.into()),
907                    )
908                })?;
909            let codec = tonic::codec::ProstCodec::default();
910            let path = http::uri::PathAndQuery::from_static(
911                "/ibc.applications.nft_transfer.v1.Query/ClassTraces",
912            );
913            let mut req = request.into_request();
914            req.extensions_mut()
915                .insert(
916                    GrpcMethod::new(
917                        "ibc.applications.nft_transfer.v1.Query",
918                        "ClassTraces",
919                    ),
920                );
921            self.inner.unary(req, path, codec).await
922        }
923        /// ClassHash queries a class hash information.
924        pub async fn class_hash(
925            &mut self,
926            request: impl tonic::IntoRequest<super::QueryClassHashRequest>,
927        ) -> std::result::Result<
928            tonic::Response<super::QueryClassHashResponse>,
929            tonic::Status,
930        > {
931            self.inner
932                .ready()
933                .await
934                .map_err(|e| {
935                    tonic::Status::unknown(
936                        format!("Service was not ready: {}", e.into()),
937                    )
938                })?;
939            let codec = tonic::codec::ProstCodec::default();
940            let path = http::uri::PathAndQuery::from_static(
941                "/ibc.applications.nft_transfer.v1.Query/ClassHash",
942            );
943            let mut req = request.into_request();
944            req.extensions_mut()
945                .insert(
946                    GrpcMethod::new(
947                        "ibc.applications.nft_transfer.v1.Query",
948                        "ClassHash",
949                    ),
950                );
951            self.inner.unary(req, path, codec).await
952        }
953        /// EscrowAddress returns the escrow address for a particular port and channel
954        /// id.
955        pub async fn escrow_address(
956            &mut self,
957            request: impl tonic::IntoRequest<super::QueryEscrowAddressRequest>,
958        ) -> std::result::Result<
959            tonic::Response<super::QueryEscrowAddressResponse>,
960            tonic::Status,
961        > {
962            self.inner
963                .ready()
964                .await
965                .map_err(|e| {
966                    tonic::Status::unknown(
967                        format!("Service was not ready: {}", e.into()),
968                    )
969                })?;
970            let codec = tonic::codec::ProstCodec::default();
971            let path = http::uri::PathAndQuery::from_static(
972                "/ibc.applications.nft_transfer.v1.Query/EscrowAddress",
973            );
974            let mut req = request.into_request();
975            req.extensions_mut()
976                .insert(
977                    GrpcMethod::new(
978                        "ibc.applications.nft_transfer.v1.Query",
979                        "EscrowAddress",
980                    ),
981                );
982            self.inner.unary(req, path, codec).await
983        }
984        /// Params queries all parameters of the nft-transfer module.
985        pub async fn params(
986            &mut self,
987            request: impl tonic::IntoRequest<super::QueryParamsRequest>,
988        ) -> std::result::Result<
989            tonic::Response<super::QueryParamsResponse>,
990            tonic::Status,
991        > {
992            self.inner
993                .ready()
994                .await
995                .map_err(|e| {
996                    tonic::Status::unknown(
997                        format!("Service was not ready: {}", e.into()),
998                    )
999                })?;
1000            let codec = tonic::codec::ProstCodec::default();
1001            let path = http::uri::PathAndQuery::from_static(
1002                "/ibc.applications.nft_transfer.v1.Query/Params",
1003            );
1004            let mut req = request.into_request();
1005            req.extensions_mut()
1006                .insert(
1007                    GrpcMethod::new("ibc.applications.nft_transfer.v1.Query", "Params"),
1008                );
1009            self.inner.unary(req, path, codec).await
1010        }
1011    }
1012}
1013/// Generated server implementations.
1014#[cfg(feature = "server")]
1015pub mod query_server {
1016    #![allow(
1017        unused_variables,
1018        dead_code,
1019        missing_docs,
1020        clippy::wildcard_imports,
1021        clippy::let_unit_value,
1022    )]
1023    use tonic::codegen::*;
1024    /// Generated trait containing gRPC methods that should be implemented for use with QueryServer.
1025    #[async_trait]
1026    pub trait Query: std::marker::Send + std::marker::Sync + 'static {
1027        /// ClassTrace queries a class trace information.
1028        async fn class_trace(
1029            &self,
1030            request: tonic::Request<super::QueryClassTraceRequest>,
1031        ) -> std::result::Result<
1032            tonic::Response<super::QueryClassTraceResponse>,
1033            tonic::Status,
1034        >;
1035        /// ClassTraces queries all class traces.
1036        async fn class_traces(
1037            &self,
1038            request: tonic::Request<super::QueryClassTracesRequest>,
1039        ) -> std::result::Result<
1040            tonic::Response<super::QueryClassTracesResponse>,
1041            tonic::Status,
1042        >;
1043        /// ClassHash queries a class hash information.
1044        async fn class_hash(
1045            &self,
1046            request: tonic::Request<super::QueryClassHashRequest>,
1047        ) -> std::result::Result<
1048            tonic::Response<super::QueryClassHashResponse>,
1049            tonic::Status,
1050        >;
1051        /// EscrowAddress returns the escrow address for a particular port and channel
1052        /// id.
1053        async fn escrow_address(
1054            &self,
1055            request: tonic::Request<super::QueryEscrowAddressRequest>,
1056        ) -> std::result::Result<
1057            tonic::Response<super::QueryEscrowAddressResponse>,
1058            tonic::Status,
1059        >;
1060        /// Params queries all parameters of the nft-transfer module.
1061        async fn params(
1062            &self,
1063            request: tonic::Request<super::QueryParamsRequest>,
1064        ) -> std::result::Result<
1065            tonic::Response<super::QueryParamsResponse>,
1066            tonic::Status,
1067        >;
1068    }
1069    /// Query provides defines the gRPC querier service.
1070    #[derive(Debug)]
1071    pub struct QueryServer<T> {
1072        inner: Arc<T>,
1073        accept_compression_encodings: EnabledCompressionEncodings,
1074        send_compression_encodings: EnabledCompressionEncodings,
1075        max_decoding_message_size: Option<usize>,
1076        max_encoding_message_size: Option<usize>,
1077    }
1078    impl<T> QueryServer<T> {
1079        pub fn new(inner: T) -> Self {
1080            Self::from_arc(Arc::new(inner))
1081        }
1082        pub fn from_arc(inner: Arc<T>) -> Self {
1083            Self {
1084                inner,
1085                accept_compression_encodings: Default::default(),
1086                send_compression_encodings: Default::default(),
1087                max_decoding_message_size: None,
1088                max_encoding_message_size: None,
1089            }
1090        }
1091        pub fn with_interceptor<F>(
1092            inner: T,
1093            interceptor: F,
1094        ) -> InterceptedService<Self, F>
1095        where
1096            F: tonic::service::Interceptor,
1097        {
1098            InterceptedService::new(Self::new(inner), interceptor)
1099        }
1100        /// Enable decompressing requests with the given encoding.
1101        #[must_use]
1102        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1103            self.accept_compression_encodings.enable(encoding);
1104            self
1105        }
1106        /// Compress responses with the given encoding, if the client supports it.
1107        #[must_use]
1108        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1109            self.send_compression_encodings.enable(encoding);
1110            self
1111        }
1112        /// Limits the maximum size of a decoded message.
1113        ///
1114        /// Default: `4MB`
1115        #[must_use]
1116        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1117            self.max_decoding_message_size = Some(limit);
1118            self
1119        }
1120        /// Limits the maximum size of an encoded message.
1121        ///
1122        /// Default: `usize::MAX`
1123        #[must_use]
1124        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1125            self.max_encoding_message_size = Some(limit);
1126            self
1127        }
1128    }
1129    impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
1130    where
1131        T: Query,
1132        B: Body + std::marker::Send + 'static,
1133        B::Error: Into<StdError> + std::marker::Send + 'static,
1134    {
1135        type Response = http::Response<tonic::body::Body>;
1136        type Error = std::convert::Infallible;
1137        type Future = BoxFuture<Self::Response, Self::Error>;
1138        fn poll_ready(
1139            &mut self,
1140            _cx: &mut Context<'_>,
1141        ) -> Poll<std::result::Result<(), Self::Error>> {
1142            Poll::Ready(Ok(()))
1143        }
1144        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1145            match req.uri().path() {
1146                "/ibc.applications.nft_transfer.v1.Query/ClassTrace" => {
1147                    #[allow(non_camel_case_types)]
1148                    struct ClassTraceSvc<T: Query>(pub Arc<T>);
1149                    impl<
1150                        T: Query,
1151                    > tonic::server::UnaryService<super::QueryClassTraceRequest>
1152                    for ClassTraceSvc<T> {
1153                        type Response = super::QueryClassTraceResponse;
1154                        type Future = BoxFuture<
1155                            tonic::Response<Self::Response>,
1156                            tonic::Status,
1157                        >;
1158                        fn call(
1159                            &mut self,
1160                            request: tonic::Request<super::QueryClassTraceRequest>,
1161                        ) -> Self::Future {
1162                            let inner = Arc::clone(&self.0);
1163                            let fut = async move {
1164                                <T as Query>::class_trace(&inner, request).await
1165                            };
1166                            Box::pin(fut)
1167                        }
1168                    }
1169                    let accept_compression_encodings = self.accept_compression_encodings;
1170                    let send_compression_encodings = self.send_compression_encodings;
1171                    let max_decoding_message_size = self.max_decoding_message_size;
1172                    let max_encoding_message_size = self.max_encoding_message_size;
1173                    let inner = self.inner.clone();
1174                    let fut = async move {
1175                        let method = ClassTraceSvc(inner);
1176                        let codec = tonic::codec::ProstCodec::default();
1177                        let mut grpc = tonic::server::Grpc::new(codec)
1178                            .apply_compression_config(
1179                                accept_compression_encodings,
1180                                send_compression_encodings,
1181                            )
1182                            .apply_max_message_size_config(
1183                                max_decoding_message_size,
1184                                max_encoding_message_size,
1185                            );
1186                        let res = grpc.unary(method, req).await;
1187                        Ok(res)
1188                    };
1189                    Box::pin(fut)
1190                }
1191                "/ibc.applications.nft_transfer.v1.Query/ClassTraces" => {
1192                    #[allow(non_camel_case_types)]
1193                    struct ClassTracesSvc<T: Query>(pub Arc<T>);
1194                    impl<
1195                        T: Query,
1196                    > tonic::server::UnaryService<super::QueryClassTracesRequest>
1197                    for ClassTracesSvc<T> {
1198                        type Response = super::QueryClassTracesResponse;
1199                        type Future = BoxFuture<
1200                            tonic::Response<Self::Response>,
1201                            tonic::Status,
1202                        >;
1203                        fn call(
1204                            &mut self,
1205                            request: tonic::Request<super::QueryClassTracesRequest>,
1206                        ) -> Self::Future {
1207                            let inner = Arc::clone(&self.0);
1208                            let fut = async move {
1209                                <T as Query>::class_traces(&inner, request).await
1210                            };
1211                            Box::pin(fut)
1212                        }
1213                    }
1214                    let accept_compression_encodings = self.accept_compression_encodings;
1215                    let send_compression_encodings = self.send_compression_encodings;
1216                    let max_decoding_message_size = self.max_decoding_message_size;
1217                    let max_encoding_message_size = self.max_encoding_message_size;
1218                    let inner = self.inner.clone();
1219                    let fut = async move {
1220                        let method = ClassTracesSvc(inner);
1221                        let codec = tonic::codec::ProstCodec::default();
1222                        let mut grpc = tonic::server::Grpc::new(codec)
1223                            .apply_compression_config(
1224                                accept_compression_encodings,
1225                                send_compression_encodings,
1226                            )
1227                            .apply_max_message_size_config(
1228                                max_decoding_message_size,
1229                                max_encoding_message_size,
1230                            );
1231                        let res = grpc.unary(method, req).await;
1232                        Ok(res)
1233                    };
1234                    Box::pin(fut)
1235                }
1236                "/ibc.applications.nft_transfer.v1.Query/ClassHash" => {
1237                    #[allow(non_camel_case_types)]
1238                    struct ClassHashSvc<T: Query>(pub Arc<T>);
1239                    impl<
1240                        T: Query,
1241                    > tonic::server::UnaryService<super::QueryClassHashRequest>
1242                    for ClassHashSvc<T> {
1243                        type Response = super::QueryClassHashResponse;
1244                        type Future = BoxFuture<
1245                            tonic::Response<Self::Response>,
1246                            tonic::Status,
1247                        >;
1248                        fn call(
1249                            &mut self,
1250                            request: tonic::Request<super::QueryClassHashRequest>,
1251                        ) -> Self::Future {
1252                            let inner = Arc::clone(&self.0);
1253                            let fut = async move {
1254                                <T as Query>::class_hash(&inner, request).await
1255                            };
1256                            Box::pin(fut)
1257                        }
1258                    }
1259                    let accept_compression_encodings = self.accept_compression_encodings;
1260                    let send_compression_encodings = self.send_compression_encodings;
1261                    let max_decoding_message_size = self.max_decoding_message_size;
1262                    let max_encoding_message_size = self.max_encoding_message_size;
1263                    let inner = self.inner.clone();
1264                    let fut = async move {
1265                        let method = ClassHashSvc(inner);
1266                        let codec = tonic::codec::ProstCodec::default();
1267                        let mut grpc = tonic::server::Grpc::new(codec)
1268                            .apply_compression_config(
1269                                accept_compression_encodings,
1270                                send_compression_encodings,
1271                            )
1272                            .apply_max_message_size_config(
1273                                max_decoding_message_size,
1274                                max_encoding_message_size,
1275                            );
1276                        let res = grpc.unary(method, req).await;
1277                        Ok(res)
1278                    };
1279                    Box::pin(fut)
1280                }
1281                "/ibc.applications.nft_transfer.v1.Query/EscrowAddress" => {
1282                    #[allow(non_camel_case_types)]
1283                    struct EscrowAddressSvc<T: Query>(pub Arc<T>);
1284                    impl<
1285                        T: Query,
1286                    > tonic::server::UnaryService<super::QueryEscrowAddressRequest>
1287                    for EscrowAddressSvc<T> {
1288                        type Response = super::QueryEscrowAddressResponse;
1289                        type Future = BoxFuture<
1290                            tonic::Response<Self::Response>,
1291                            tonic::Status,
1292                        >;
1293                        fn call(
1294                            &mut self,
1295                            request: tonic::Request<super::QueryEscrowAddressRequest>,
1296                        ) -> Self::Future {
1297                            let inner = Arc::clone(&self.0);
1298                            let fut = async move {
1299                                <T as Query>::escrow_address(&inner, request).await
1300                            };
1301                            Box::pin(fut)
1302                        }
1303                    }
1304                    let accept_compression_encodings = self.accept_compression_encodings;
1305                    let send_compression_encodings = self.send_compression_encodings;
1306                    let max_decoding_message_size = self.max_decoding_message_size;
1307                    let max_encoding_message_size = self.max_encoding_message_size;
1308                    let inner = self.inner.clone();
1309                    let fut = async move {
1310                        let method = EscrowAddressSvc(inner);
1311                        let codec = tonic::codec::ProstCodec::default();
1312                        let mut grpc = tonic::server::Grpc::new(codec)
1313                            .apply_compression_config(
1314                                accept_compression_encodings,
1315                                send_compression_encodings,
1316                            )
1317                            .apply_max_message_size_config(
1318                                max_decoding_message_size,
1319                                max_encoding_message_size,
1320                            );
1321                        let res = grpc.unary(method, req).await;
1322                        Ok(res)
1323                    };
1324                    Box::pin(fut)
1325                }
1326                "/ibc.applications.nft_transfer.v1.Query/Params" => {
1327                    #[allow(non_camel_case_types)]
1328                    struct ParamsSvc<T: Query>(pub Arc<T>);
1329                    impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest>
1330                    for ParamsSvc<T> {
1331                        type Response = super::QueryParamsResponse;
1332                        type Future = BoxFuture<
1333                            tonic::Response<Self::Response>,
1334                            tonic::Status,
1335                        >;
1336                        fn call(
1337                            &mut self,
1338                            request: tonic::Request<super::QueryParamsRequest>,
1339                        ) -> Self::Future {
1340                            let inner = Arc::clone(&self.0);
1341                            let fut = async move {
1342                                <T as Query>::params(&inner, request).await
1343                            };
1344                            Box::pin(fut)
1345                        }
1346                    }
1347                    let accept_compression_encodings = self.accept_compression_encodings;
1348                    let send_compression_encodings = self.send_compression_encodings;
1349                    let max_decoding_message_size = self.max_decoding_message_size;
1350                    let max_encoding_message_size = self.max_encoding_message_size;
1351                    let inner = self.inner.clone();
1352                    let fut = async move {
1353                        let method = ParamsSvc(inner);
1354                        let codec = tonic::codec::ProstCodec::default();
1355                        let mut grpc = tonic::server::Grpc::new(codec)
1356                            .apply_compression_config(
1357                                accept_compression_encodings,
1358                                send_compression_encodings,
1359                            )
1360                            .apply_max_message_size_config(
1361                                max_decoding_message_size,
1362                                max_encoding_message_size,
1363                            );
1364                        let res = grpc.unary(method, req).await;
1365                        Ok(res)
1366                    };
1367                    Box::pin(fut)
1368                }
1369                _ => {
1370                    Box::pin(async move {
1371                        let mut response = http::Response::new(
1372                            tonic::body::Body::default(),
1373                        );
1374                        let headers = response.headers_mut();
1375                        headers
1376                            .insert(
1377                                tonic::Status::GRPC_STATUS,
1378                                (tonic::Code::Unimplemented as i32).into(),
1379                            );
1380                        headers
1381                            .insert(
1382                                http::header::CONTENT_TYPE,
1383                                tonic::metadata::GRPC_CONTENT_TYPE,
1384                            );
1385                        Ok(response)
1386                    })
1387                }
1388            }
1389        }
1390    }
1391    impl<T> Clone for QueryServer<T> {
1392        fn clone(&self) -> Self {
1393            let inner = self.inner.clone();
1394            Self {
1395                inner,
1396                accept_compression_encodings: self.accept_compression_encodings,
1397                send_compression_encodings: self.send_compression_encodings,
1398                max_decoding_message_size: self.max_decoding_message_size,
1399                max_encoding_message_size: self.max_encoding_message_size,
1400            }
1401        }
1402    }
1403    /// Generated gRPC service name
1404    pub const SERVICE_NAME: &str = "ibc.applications.nft_transfer.v1.Query";
1405    impl<T> tonic::server::NamedService for QueryServer<T> {
1406        const NAME: &'static str = SERVICE_NAME;
1407    }
1408}
1409/// GenesisState defines the ibc-nft-transfer genesis state
1410#[derive(Clone, PartialEq, ::prost::Message)]
1411pub struct GenesisState {
1412    #[prost(string, tag = "1")]
1413    pub port_id: ::prost::alloc::string::String,
1414    #[prost(message, repeated, tag = "2")]
1415    pub traces: ::prost::alloc::vec::Vec<ClassTrace>,
1416    #[prost(message, optional, tag = "3")]
1417    pub params: ::core::option::Option<Params>,
1418}
1419impl ::prost::Name for GenesisState {
1420    const NAME: &'static str = "GenesisState";
1421    const PACKAGE: &'static str = "ibc.applications.nft_transfer.v1";
1422    fn full_name() -> ::prost::alloc::string::String {
1423        "ibc.applications.nft_transfer.v1.GenesisState".into()
1424    }
1425    fn type_url() -> ::prost::alloc::string::String {
1426        "/ibc.applications.nft_transfer.v1.GenesisState".into()
1427    }
1428}