1#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct DenomTrace {
6 #[prost(string, tag = "1")]
9 pub path: ::prost::alloc::string::String,
10 #[prost(string, tag = "2")]
12 pub base_denom: ::prost::alloc::string::String,
13}
14impl ::prost::Name for DenomTrace {
15 const NAME: &'static str = "DenomTrace";
16 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
17 fn full_name() -> ::prost::alloc::string::String {
18 "ibc.applications.transfer.v1.DenomTrace".into()
19 }
20 fn type_url() -> ::prost::alloc::string::String {
21 "/ibc.applications.transfer.v1.DenomTrace".into()
22 }
23}
24#[derive(Clone, Copy, PartialEq, ::prost::Message)]
29pub struct Params {
30 #[prost(bool, tag = "1")]
33 pub send_enabled: bool,
34 #[prost(bool, tag = "2")]
37 pub receive_enabled: bool,
38}
39impl ::prost::Name for Params {
40 const NAME: &'static str = "Params";
41 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
42 fn full_name() -> ::prost::alloc::string::String {
43 "ibc.applications.transfer.v1.Params".into()
44 }
45 fn type_url() -> ::prost::alloc::string::String {
46 "/ibc.applications.transfer.v1.Params".into()
47 }
48}
49#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct MsgTransfer {
54 #[prost(string, tag = "1")]
56 pub source_port: ::prost::alloc::string::String,
57 #[prost(string, tag = "2")]
59 pub source_channel: ::prost::alloc::string::String,
60 #[prost(message, optional, tag = "3")]
62 pub token: ::core::option::Option<
63 super::super::super::super::cosmos::base::v1beta1::Coin,
64 >,
65 #[prost(string, tag = "4")]
67 pub sender: ::prost::alloc::string::String,
68 #[prost(string, tag = "5")]
70 pub receiver: ::prost::alloc::string::String,
71 #[prost(message, optional, tag = "6")]
74 pub timeout_height: ::core::option::Option<
75 super::super::super::core::client::v1::Height,
76 >,
77 #[prost(uint64, tag = "7")]
80 pub timeout_timestamp: u64,
81 #[prost(string, tag = "8")]
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.transfer.v1";
88 fn full_name() -> ::prost::alloc::string::String {
89 "ibc.applications.transfer.v1.MsgTransfer".into()
90 }
91 fn type_url() -> ::prost::alloc::string::String {
92 "/ibc.applications.transfer.v1.MsgTransfer".into()
93 }
94}
95#[derive(Clone, Copy, PartialEq, ::prost::Message)]
97pub struct MsgTransferResponse {
98 #[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.transfer.v1";
105 fn full_name() -> ::prost::alloc::string::String {
106 "ibc.applications.transfer.v1.MsgTransferResponse".into()
107 }
108 fn type_url() -> ::prost::alloc::string::String {
109 "/ibc.applications.transfer.v1.MsgTransferResponse".into()
110 }
111}
112#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct MsgUpdateParams {
115 #[prost(string, tag = "1")]
117 pub signer: ::prost::alloc::string::String,
118 #[prost(message, optional, tag = "2")]
122 pub params: ::core::option::Option<Params>,
123}
124impl ::prost::Name for MsgUpdateParams {
125 const NAME: &'static str = "MsgUpdateParams";
126 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
127 fn full_name() -> ::prost::alloc::string::String {
128 "ibc.applications.transfer.v1.MsgUpdateParams".into()
129 }
130 fn type_url() -> ::prost::alloc::string::String {
131 "/ibc.applications.transfer.v1.MsgUpdateParams".into()
132 }
133}
134#[derive(Clone, Copy, PartialEq, ::prost::Message)]
137pub struct MsgUpdateParamsResponse {}
138impl ::prost::Name for MsgUpdateParamsResponse {
139 const NAME: &'static str = "MsgUpdateParamsResponse";
140 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
141 fn full_name() -> ::prost::alloc::string::String {
142 "ibc.applications.transfer.v1.MsgUpdateParamsResponse".into()
143 }
144 fn type_url() -> ::prost::alloc::string::String {
145 "/ibc.applications.transfer.v1.MsgUpdateParamsResponse".into()
146 }
147}
148#[cfg(feature = "client")]
150pub mod msg_client {
151 #![allow(
152 unused_variables,
153 dead_code,
154 missing_docs,
155 clippy::wildcard_imports,
156 clippy::let_unit_value,
157 )]
158 use tonic::codegen::*;
159 use tonic::codegen::http::Uri;
160 #[derive(Debug, Clone)]
162 pub struct MsgClient<T> {
163 inner: tonic::client::Grpc<T>,
164 }
165 #[cfg(feature = "transport")]
166 impl MsgClient<tonic::transport::Channel> {
167 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
169 where
170 D: TryInto<tonic::transport::Endpoint>,
171 D::Error: Into<StdError>,
172 {
173 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
174 Ok(Self::new(conn))
175 }
176 }
177 impl<T> MsgClient<T>
178 where
179 T: tonic::client::GrpcService<tonic::body::Body>,
180 T::Error: Into<StdError>,
181 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
182 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
183 {
184 pub fn new(inner: T) -> Self {
185 let inner = tonic::client::Grpc::new(inner);
186 Self { inner }
187 }
188 pub fn with_origin(inner: T, origin: Uri) -> Self {
189 let inner = tonic::client::Grpc::with_origin(inner, origin);
190 Self { inner }
191 }
192 pub fn with_interceptor<F>(
193 inner: T,
194 interceptor: F,
195 ) -> MsgClient<InterceptedService<T, F>>
196 where
197 F: tonic::service::Interceptor,
198 T::ResponseBody: Default,
199 T: tonic::codegen::Service<
200 http::Request<tonic::body::Body>,
201 Response = http::Response<
202 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
203 >,
204 >,
205 <T as tonic::codegen::Service<
206 http::Request<tonic::body::Body>,
207 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
208 {
209 MsgClient::new(InterceptedService::new(inner, interceptor))
210 }
211 #[must_use]
216 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
217 self.inner = self.inner.send_compressed(encoding);
218 self
219 }
220 #[must_use]
222 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
223 self.inner = self.inner.accept_compressed(encoding);
224 self
225 }
226 #[must_use]
230 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
231 self.inner = self.inner.max_decoding_message_size(limit);
232 self
233 }
234 #[must_use]
238 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
239 self.inner = self.inner.max_encoding_message_size(limit);
240 self
241 }
242 pub async fn transfer(
244 &mut self,
245 request: impl tonic::IntoRequest<super::MsgTransfer>,
246 ) -> std::result::Result<
247 tonic::Response<super::MsgTransferResponse>,
248 tonic::Status,
249 > {
250 self.inner
251 .ready()
252 .await
253 .map_err(|e| {
254 tonic::Status::unknown(
255 format!("Service was not ready: {}", e.into()),
256 )
257 })?;
258 let codec = tonic::codec::ProstCodec::default();
259 let path = http::uri::PathAndQuery::from_static(
260 "/ibc.applications.transfer.v1.Msg/Transfer",
261 );
262 let mut req = request.into_request();
263 req.extensions_mut()
264 .insert(GrpcMethod::new("ibc.applications.transfer.v1.Msg", "Transfer"));
265 self.inner.unary(req, path, codec).await
266 }
267 pub async fn update_params(
269 &mut self,
270 request: impl tonic::IntoRequest<super::MsgUpdateParams>,
271 ) -> std::result::Result<
272 tonic::Response<super::MsgUpdateParamsResponse>,
273 tonic::Status,
274 > {
275 self.inner
276 .ready()
277 .await
278 .map_err(|e| {
279 tonic::Status::unknown(
280 format!("Service was not ready: {}", e.into()),
281 )
282 })?;
283 let codec = tonic::codec::ProstCodec::default();
284 let path = http::uri::PathAndQuery::from_static(
285 "/ibc.applications.transfer.v1.Msg/UpdateParams",
286 );
287 let mut req = request.into_request();
288 req.extensions_mut()
289 .insert(
290 GrpcMethod::new("ibc.applications.transfer.v1.Msg", "UpdateParams"),
291 );
292 self.inner.unary(req, path, codec).await
293 }
294 }
295}
296#[cfg(feature = "server")]
298pub mod msg_server {
299 #![allow(
300 unused_variables,
301 dead_code,
302 missing_docs,
303 clippy::wildcard_imports,
304 clippy::let_unit_value,
305 )]
306 use tonic::codegen::*;
307 #[async_trait]
309 pub trait Msg: std::marker::Send + std::marker::Sync + 'static {
310 async fn transfer(
312 &self,
313 request: tonic::Request<super::MsgTransfer>,
314 ) -> std::result::Result<
315 tonic::Response<super::MsgTransferResponse>,
316 tonic::Status,
317 >;
318 async fn update_params(
320 &self,
321 request: tonic::Request<super::MsgUpdateParams>,
322 ) -> std::result::Result<
323 tonic::Response<super::MsgUpdateParamsResponse>,
324 tonic::Status,
325 >;
326 }
327 #[derive(Debug)]
329 pub struct MsgServer<T> {
330 inner: Arc<T>,
331 accept_compression_encodings: EnabledCompressionEncodings,
332 send_compression_encodings: EnabledCompressionEncodings,
333 max_decoding_message_size: Option<usize>,
334 max_encoding_message_size: Option<usize>,
335 }
336 impl<T> MsgServer<T> {
337 pub fn new(inner: T) -> Self {
338 Self::from_arc(Arc::new(inner))
339 }
340 pub fn from_arc(inner: Arc<T>) -> Self {
341 Self {
342 inner,
343 accept_compression_encodings: Default::default(),
344 send_compression_encodings: Default::default(),
345 max_decoding_message_size: None,
346 max_encoding_message_size: None,
347 }
348 }
349 pub fn with_interceptor<F>(
350 inner: T,
351 interceptor: F,
352 ) -> InterceptedService<Self, F>
353 where
354 F: tonic::service::Interceptor,
355 {
356 InterceptedService::new(Self::new(inner), interceptor)
357 }
358 #[must_use]
360 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
361 self.accept_compression_encodings.enable(encoding);
362 self
363 }
364 #[must_use]
366 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
367 self.send_compression_encodings.enable(encoding);
368 self
369 }
370 #[must_use]
374 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
375 self.max_decoding_message_size = Some(limit);
376 self
377 }
378 #[must_use]
382 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
383 self.max_encoding_message_size = Some(limit);
384 self
385 }
386 }
387 impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
388 where
389 T: Msg,
390 B: Body + std::marker::Send + 'static,
391 B::Error: Into<StdError> + std::marker::Send + 'static,
392 {
393 type Response = http::Response<tonic::body::Body>;
394 type Error = std::convert::Infallible;
395 type Future = BoxFuture<Self::Response, Self::Error>;
396 fn poll_ready(
397 &mut self,
398 _cx: &mut Context<'_>,
399 ) -> Poll<std::result::Result<(), Self::Error>> {
400 Poll::Ready(Ok(()))
401 }
402 fn call(&mut self, req: http::Request<B>) -> Self::Future {
403 match req.uri().path() {
404 "/ibc.applications.transfer.v1.Msg/Transfer" => {
405 #[allow(non_camel_case_types)]
406 struct TransferSvc<T: Msg>(pub Arc<T>);
407 impl<T: Msg> tonic::server::UnaryService<super::MsgTransfer>
408 for TransferSvc<T> {
409 type Response = super::MsgTransferResponse;
410 type Future = BoxFuture<
411 tonic::Response<Self::Response>,
412 tonic::Status,
413 >;
414 fn call(
415 &mut self,
416 request: tonic::Request<super::MsgTransfer>,
417 ) -> Self::Future {
418 let inner = Arc::clone(&self.0);
419 let fut = async move {
420 <T as Msg>::transfer(&inner, request).await
421 };
422 Box::pin(fut)
423 }
424 }
425 let accept_compression_encodings = self.accept_compression_encodings;
426 let send_compression_encodings = self.send_compression_encodings;
427 let max_decoding_message_size = self.max_decoding_message_size;
428 let max_encoding_message_size = self.max_encoding_message_size;
429 let inner = self.inner.clone();
430 let fut = async move {
431 let method = TransferSvc(inner);
432 let codec = tonic::codec::ProstCodec::default();
433 let mut grpc = tonic::server::Grpc::new(codec)
434 .apply_compression_config(
435 accept_compression_encodings,
436 send_compression_encodings,
437 )
438 .apply_max_message_size_config(
439 max_decoding_message_size,
440 max_encoding_message_size,
441 );
442 let res = grpc.unary(method, req).await;
443 Ok(res)
444 };
445 Box::pin(fut)
446 }
447 "/ibc.applications.transfer.v1.Msg/UpdateParams" => {
448 #[allow(non_camel_case_types)]
449 struct UpdateParamsSvc<T: Msg>(pub Arc<T>);
450 impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams>
451 for UpdateParamsSvc<T> {
452 type Response = super::MsgUpdateParamsResponse;
453 type Future = BoxFuture<
454 tonic::Response<Self::Response>,
455 tonic::Status,
456 >;
457 fn call(
458 &mut self,
459 request: tonic::Request<super::MsgUpdateParams>,
460 ) -> Self::Future {
461 let inner = Arc::clone(&self.0);
462 let fut = async move {
463 <T as Msg>::update_params(&inner, request).await
464 };
465 Box::pin(fut)
466 }
467 }
468 let accept_compression_encodings = self.accept_compression_encodings;
469 let send_compression_encodings = self.send_compression_encodings;
470 let max_decoding_message_size = self.max_decoding_message_size;
471 let max_encoding_message_size = self.max_encoding_message_size;
472 let inner = self.inner.clone();
473 let fut = async move {
474 let method = UpdateParamsSvc(inner);
475 let codec = tonic::codec::ProstCodec::default();
476 let mut grpc = tonic::server::Grpc::new(codec)
477 .apply_compression_config(
478 accept_compression_encodings,
479 send_compression_encodings,
480 )
481 .apply_max_message_size_config(
482 max_decoding_message_size,
483 max_encoding_message_size,
484 );
485 let res = grpc.unary(method, req).await;
486 Ok(res)
487 };
488 Box::pin(fut)
489 }
490 _ => {
491 Box::pin(async move {
492 let mut response = http::Response::new(
493 tonic::body::Body::default(),
494 );
495 let headers = response.headers_mut();
496 headers
497 .insert(
498 tonic::Status::GRPC_STATUS,
499 (tonic::Code::Unimplemented as i32).into(),
500 );
501 headers
502 .insert(
503 http::header::CONTENT_TYPE,
504 tonic::metadata::GRPC_CONTENT_TYPE,
505 );
506 Ok(response)
507 })
508 }
509 }
510 }
511 }
512 impl<T> Clone for MsgServer<T> {
513 fn clone(&self) -> Self {
514 let inner = self.inner.clone();
515 Self {
516 inner,
517 accept_compression_encodings: self.accept_compression_encodings,
518 send_compression_encodings: self.send_compression_encodings,
519 max_decoding_message_size: self.max_decoding_message_size,
520 max_encoding_message_size: self.max_encoding_message_size,
521 }
522 }
523 }
524 pub const SERVICE_NAME: &str = "ibc.applications.transfer.v1.Msg";
526 impl<T> tonic::server::NamedService for MsgServer<T> {
527 const NAME: &'static str = SERVICE_NAME;
528 }
529}
530#[derive(Clone, PartialEq, ::prost::Message)]
533pub struct QueryDenomTraceRequest {
534 #[prost(string, tag = "1")]
536 pub hash: ::prost::alloc::string::String,
537}
538impl ::prost::Name for QueryDenomTraceRequest {
539 const NAME: &'static str = "QueryDenomTraceRequest";
540 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
541 fn full_name() -> ::prost::alloc::string::String {
542 "ibc.applications.transfer.v1.QueryDenomTraceRequest".into()
543 }
544 fn type_url() -> ::prost::alloc::string::String {
545 "/ibc.applications.transfer.v1.QueryDenomTraceRequest".into()
546 }
547}
548#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct QueryDenomTraceResponse {
552 #[prost(message, optional, tag = "1")]
554 pub denom_trace: ::core::option::Option<DenomTrace>,
555}
556impl ::prost::Name for QueryDenomTraceResponse {
557 const NAME: &'static str = "QueryDenomTraceResponse";
558 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
559 fn full_name() -> ::prost::alloc::string::String {
560 "ibc.applications.transfer.v1.QueryDenomTraceResponse".into()
561 }
562 fn type_url() -> ::prost::alloc::string::String {
563 "/ibc.applications.transfer.v1.QueryDenomTraceResponse".into()
564 }
565}
566#[derive(Clone, PartialEq, ::prost::Message)]
569pub struct QueryDenomTracesRequest {
570 #[prost(message, optional, tag = "1")]
572 pub pagination: ::core::option::Option<
573 super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
574 >,
575}
576impl ::prost::Name for QueryDenomTracesRequest {
577 const NAME: &'static str = "QueryDenomTracesRequest";
578 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
579 fn full_name() -> ::prost::alloc::string::String {
580 "ibc.applications.transfer.v1.QueryDenomTracesRequest".into()
581 }
582 fn type_url() -> ::prost::alloc::string::String {
583 "/ibc.applications.transfer.v1.QueryDenomTracesRequest".into()
584 }
585}
586#[derive(Clone, PartialEq, ::prost::Message)]
589pub struct QueryDenomTracesResponse {
590 #[prost(message, repeated, tag = "1")]
592 pub denom_traces: ::prost::alloc::vec::Vec<DenomTrace>,
593 #[prost(message, optional, tag = "2")]
595 pub pagination: ::core::option::Option<
596 super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
597 >,
598}
599impl ::prost::Name for QueryDenomTracesResponse {
600 const NAME: &'static str = "QueryDenomTracesResponse";
601 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
602 fn full_name() -> ::prost::alloc::string::String {
603 "ibc.applications.transfer.v1.QueryDenomTracesResponse".into()
604 }
605 fn type_url() -> ::prost::alloc::string::String {
606 "/ibc.applications.transfer.v1.QueryDenomTracesResponse".into()
607 }
608}
609#[derive(Clone, Copy, PartialEq, ::prost::Message)]
611pub struct QueryParamsRequest {}
612impl ::prost::Name for QueryParamsRequest {
613 const NAME: &'static str = "QueryParamsRequest";
614 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
615 fn full_name() -> ::prost::alloc::string::String {
616 "ibc.applications.transfer.v1.QueryParamsRequest".into()
617 }
618 fn type_url() -> ::prost::alloc::string::String {
619 "/ibc.applications.transfer.v1.QueryParamsRequest".into()
620 }
621}
622#[derive(Clone, Copy, PartialEq, ::prost::Message)]
624pub struct QueryParamsResponse {
625 #[prost(message, optional, tag = "1")]
627 pub params: ::core::option::Option<Params>,
628}
629impl ::prost::Name for QueryParamsResponse {
630 const NAME: &'static str = "QueryParamsResponse";
631 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
632 fn full_name() -> ::prost::alloc::string::String {
633 "ibc.applications.transfer.v1.QueryParamsResponse".into()
634 }
635 fn type_url() -> ::prost::alloc::string::String {
636 "/ibc.applications.transfer.v1.QueryParamsResponse".into()
637 }
638}
639#[derive(Clone, PartialEq, ::prost::Message)]
642pub struct QueryDenomHashRequest {
643 #[prost(string, tag = "1")]
645 pub trace: ::prost::alloc::string::String,
646}
647impl ::prost::Name for QueryDenomHashRequest {
648 const NAME: &'static str = "QueryDenomHashRequest";
649 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
650 fn full_name() -> ::prost::alloc::string::String {
651 "ibc.applications.transfer.v1.QueryDenomHashRequest".into()
652 }
653 fn type_url() -> ::prost::alloc::string::String {
654 "/ibc.applications.transfer.v1.QueryDenomHashRequest".into()
655 }
656}
657#[derive(Clone, PartialEq, ::prost::Message)]
660pub struct QueryDenomHashResponse {
661 #[prost(string, tag = "1")]
663 pub hash: ::prost::alloc::string::String,
664}
665impl ::prost::Name for QueryDenomHashResponse {
666 const NAME: &'static str = "QueryDenomHashResponse";
667 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
668 fn full_name() -> ::prost::alloc::string::String {
669 "ibc.applications.transfer.v1.QueryDenomHashResponse".into()
670 }
671 fn type_url() -> ::prost::alloc::string::String {
672 "/ibc.applications.transfer.v1.QueryDenomHashResponse".into()
673 }
674}
675#[derive(Clone, PartialEq, ::prost::Message)]
677pub struct QueryEscrowAddressRequest {
678 #[prost(string, tag = "1")]
680 pub port_id: ::prost::alloc::string::String,
681 #[prost(string, tag = "2")]
683 pub channel_id: ::prost::alloc::string::String,
684}
685impl ::prost::Name for QueryEscrowAddressRequest {
686 const NAME: &'static str = "QueryEscrowAddressRequest";
687 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
688 fn full_name() -> ::prost::alloc::string::String {
689 "ibc.applications.transfer.v1.QueryEscrowAddressRequest".into()
690 }
691 fn type_url() -> ::prost::alloc::string::String {
692 "/ibc.applications.transfer.v1.QueryEscrowAddressRequest".into()
693 }
694}
695#[derive(Clone, PartialEq, ::prost::Message)]
697pub struct QueryEscrowAddressResponse {
698 #[prost(string, tag = "1")]
700 pub escrow_address: ::prost::alloc::string::String,
701}
702impl ::prost::Name for QueryEscrowAddressResponse {
703 const NAME: &'static str = "QueryEscrowAddressResponse";
704 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
705 fn full_name() -> ::prost::alloc::string::String {
706 "ibc.applications.transfer.v1.QueryEscrowAddressResponse".into()
707 }
708 fn type_url() -> ::prost::alloc::string::String {
709 "/ibc.applications.transfer.v1.QueryEscrowAddressResponse".into()
710 }
711}
712#[derive(Clone, PartialEq, ::prost::Message)]
714pub struct QueryTotalEscrowForDenomRequest {
715 #[prost(string, tag = "1")]
716 pub denom: ::prost::alloc::string::String,
717}
718impl ::prost::Name for QueryTotalEscrowForDenomRequest {
719 const NAME: &'static str = "QueryTotalEscrowForDenomRequest";
720 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
721 fn full_name() -> ::prost::alloc::string::String {
722 "ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest".into()
723 }
724 fn type_url() -> ::prost::alloc::string::String {
725 "/ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest".into()
726 }
727}
728#[derive(Clone, PartialEq, ::prost::Message)]
730pub struct QueryTotalEscrowForDenomResponse {
731 #[prost(message, optional, tag = "1")]
732 pub amount: ::core::option::Option<
733 super::super::super::super::cosmos::base::v1beta1::Coin,
734 >,
735}
736impl ::prost::Name for QueryTotalEscrowForDenomResponse {
737 const NAME: &'static str = "QueryTotalEscrowForDenomResponse";
738 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
739 fn full_name() -> ::prost::alloc::string::String {
740 "ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse".into()
741 }
742 fn type_url() -> ::prost::alloc::string::String {
743 "/ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse".into()
744 }
745}
746#[cfg(feature = "client")]
748pub mod query_client {
749 #![allow(
750 unused_variables,
751 dead_code,
752 missing_docs,
753 clippy::wildcard_imports,
754 clippy::let_unit_value,
755 )]
756 use tonic::codegen::*;
757 use tonic::codegen::http::Uri;
758 #[derive(Debug, Clone)]
760 pub struct QueryClient<T> {
761 inner: tonic::client::Grpc<T>,
762 }
763 #[cfg(feature = "transport")]
764 impl QueryClient<tonic::transport::Channel> {
765 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
767 where
768 D: TryInto<tonic::transport::Endpoint>,
769 D::Error: Into<StdError>,
770 {
771 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
772 Ok(Self::new(conn))
773 }
774 }
775 impl<T> QueryClient<T>
776 where
777 T: tonic::client::GrpcService<tonic::body::Body>,
778 T::Error: Into<StdError>,
779 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
780 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
781 {
782 pub fn new(inner: T) -> Self {
783 let inner = tonic::client::Grpc::new(inner);
784 Self { inner }
785 }
786 pub fn with_origin(inner: T, origin: Uri) -> Self {
787 let inner = tonic::client::Grpc::with_origin(inner, origin);
788 Self { inner }
789 }
790 pub fn with_interceptor<F>(
791 inner: T,
792 interceptor: F,
793 ) -> QueryClient<InterceptedService<T, F>>
794 where
795 F: tonic::service::Interceptor,
796 T::ResponseBody: Default,
797 T: tonic::codegen::Service<
798 http::Request<tonic::body::Body>,
799 Response = http::Response<
800 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
801 >,
802 >,
803 <T as tonic::codegen::Service<
804 http::Request<tonic::body::Body>,
805 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
806 {
807 QueryClient::new(InterceptedService::new(inner, interceptor))
808 }
809 #[must_use]
814 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
815 self.inner = self.inner.send_compressed(encoding);
816 self
817 }
818 #[must_use]
820 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
821 self.inner = self.inner.accept_compressed(encoding);
822 self
823 }
824 #[must_use]
828 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
829 self.inner = self.inner.max_decoding_message_size(limit);
830 self
831 }
832 #[must_use]
836 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
837 self.inner = self.inner.max_encoding_message_size(limit);
838 self
839 }
840 pub async fn denom_traces(
842 &mut self,
843 request: impl tonic::IntoRequest<super::QueryDenomTracesRequest>,
844 ) -> std::result::Result<
845 tonic::Response<super::QueryDenomTracesResponse>,
846 tonic::Status,
847 > {
848 self.inner
849 .ready()
850 .await
851 .map_err(|e| {
852 tonic::Status::unknown(
853 format!("Service was not ready: {}", e.into()),
854 )
855 })?;
856 let codec = tonic::codec::ProstCodec::default();
857 let path = http::uri::PathAndQuery::from_static(
858 "/ibc.applications.transfer.v1.Query/DenomTraces",
859 );
860 let mut req = request.into_request();
861 req.extensions_mut()
862 .insert(
863 GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTraces"),
864 );
865 self.inner.unary(req, path, codec).await
866 }
867 pub async fn denom_trace(
869 &mut self,
870 request: impl tonic::IntoRequest<super::QueryDenomTraceRequest>,
871 ) -> std::result::Result<
872 tonic::Response<super::QueryDenomTraceResponse>,
873 tonic::Status,
874 > {
875 self.inner
876 .ready()
877 .await
878 .map_err(|e| {
879 tonic::Status::unknown(
880 format!("Service was not ready: {}", e.into()),
881 )
882 })?;
883 let codec = tonic::codec::ProstCodec::default();
884 let path = http::uri::PathAndQuery::from_static(
885 "/ibc.applications.transfer.v1.Query/DenomTrace",
886 );
887 let mut req = request.into_request();
888 req.extensions_mut()
889 .insert(
890 GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTrace"),
891 );
892 self.inner.unary(req, path, codec).await
893 }
894 pub async fn params(
896 &mut self,
897 request: impl tonic::IntoRequest<super::QueryParamsRequest>,
898 ) -> std::result::Result<
899 tonic::Response<super::QueryParamsResponse>,
900 tonic::Status,
901 > {
902 self.inner
903 .ready()
904 .await
905 .map_err(|e| {
906 tonic::Status::unknown(
907 format!("Service was not ready: {}", e.into()),
908 )
909 })?;
910 let codec = tonic::codec::ProstCodec::default();
911 let path = http::uri::PathAndQuery::from_static(
912 "/ibc.applications.transfer.v1.Query/Params",
913 );
914 let mut req = request.into_request();
915 req.extensions_mut()
916 .insert(GrpcMethod::new("ibc.applications.transfer.v1.Query", "Params"));
917 self.inner.unary(req, path, codec).await
918 }
919 pub async fn denom_hash(
921 &mut self,
922 request: impl tonic::IntoRequest<super::QueryDenomHashRequest>,
923 ) -> std::result::Result<
924 tonic::Response<super::QueryDenomHashResponse>,
925 tonic::Status,
926 > {
927 self.inner
928 .ready()
929 .await
930 .map_err(|e| {
931 tonic::Status::unknown(
932 format!("Service was not ready: {}", e.into()),
933 )
934 })?;
935 let codec = tonic::codec::ProstCodec::default();
936 let path = http::uri::PathAndQuery::from_static(
937 "/ibc.applications.transfer.v1.Query/DenomHash",
938 );
939 let mut req = request.into_request();
940 req.extensions_mut()
941 .insert(
942 GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomHash"),
943 );
944 self.inner.unary(req, path, codec).await
945 }
946 pub async fn escrow_address(
948 &mut self,
949 request: impl tonic::IntoRequest<super::QueryEscrowAddressRequest>,
950 ) -> std::result::Result<
951 tonic::Response<super::QueryEscrowAddressResponse>,
952 tonic::Status,
953 > {
954 self.inner
955 .ready()
956 .await
957 .map_err(|e| {
958 tonic::Status::unknown(
959 format!("Service was not ready: {}", e.into()),
960 )
961 })?;
962 let codec = tonic::codec::ProstCodec::default();
963 let path = http::uri::PathAndQuery::from_static(
964 "/ibc.applications.transfer.v1.Query/EscrowAddress",
965 );
966 let mut req = request.into_request();
967 req.extensions_mut()
968 .insert(
969 GrpcMethod::new(
970 "ibc.applications.transfer.v1.Query",
971 "EscrowAddress",
972 ),
973 );
974 self.inner.unary(req, path, codec).await
975 }
976 pub async fn total_escrow_for_denom(
978 &mut self,
979 request: impl tonic::IntoRequest<super::QueryTotalEscrowForDenomRequest>,
980 ) -> std::result::Result<
981 tonic::Response<super::QueryTotalEscrowForDenomResponse>,
982 tonic::Status,
983 > {
984 self.inner
985 .ready()
986 .await
987 .map_err(|e| {
988 tonic::Status::unknown(
989 format!("Service was not ready: {}", e.into()),
990 )
991 })?;
992 let codec = tonic::codec::ProstCodec::default();
993 let path = http::uri::PathAndQuery::from_static(
994 "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom",
995 );
996 let mut req = request.into_request();
997 req.extensions_mut()
998 .insert(
999 GrpcMethod::new(
1000 "ibc.applications.transfer.v1.Query",
1001 "TotalEscrowForDenom",
1002 ),
1003 );
1004 self.inner.unary(req, path, codec).await
1005 }
1006 }
1007}
1008#[cfg(feature = "server")]
1010pub mod query_server {
1011 #![allow(
1012 unused_variables,
1013 dead_code,
1014 missing_docs,
1015 clippy::wildcard_imports,
1016 clippy::let_unit_value,
1017 )]
1018 use tonic::codegen::*;
1019 #[async_trait]
1021 pub trait Query: std::marker::Send + std::marker::Sync + 'static {
1022 async fn denom_traces(
1024 &self,
1025 request: tonic::Request<super::QueryDenomTracesRequest>,
1026 ) -> std::result::Result<
1027 tonic::Response<super::QueryDenomTracesResponse>,
1028 tonic::Status,
1029 >;
1030 async fn denom_trace(
1032 &self,
1033 request: tonic::Request<super::QueryDenomTraceRequest>,
1034 ) -> std::result::Result<
1035 tonic::Response<super::QueryDenomTraceResponse>,
1036 tonic::Status,
1037 >;
1038 async fn params(
1040 &self,
1041 request: tonic::Request<super::QueryParamsRequest>,
1042 ) -> std::result::Result<
1043 tonic::Response<super::QueryParamsResponse>,
1044 tonic::Status,
1045 >;
1046 async fn denom_hash(
1048 &self,
1049 request: tonic::Request<super::QueryDenomHashRequest>,
1050 ) -> std::result::Result<
1051 tonic::Response<super::QueryDenomHashResponse>,
1052 tonic::Status,
1053 >;
1054 async fn escrow_address(
1056 &self,
1057 request: tonic::Request<super::QueryEscrowAddressRequest>,
1058 ) -> std::result::Result<
1059 tonic::Response<super::QueryEscrowAddressResponse>,
1060 tonic::Status,
1061 >;
1062 async fn total_escrow_for_denom(
1064 &self,
1065 request: tonic::Request<super::QueryTotalEscrowForDenomRequest>,
1066 ) -> std::result::Result<
1067 tonic::Response<super::QueryTotalEscrowForDenomResponse>,
1068 tonic::Status,
1069 >;
1070 }
1071 #[derive(Debug)]
1073 pub struct QueryServer<T> {
1074 inner: Arc<T>,
1075 accept_compression_encodings: EnabledCompressionEncodings,
1076 send_compression_encodings: EnabledCompressionEncodings,
1077 max_decoding_message_size: Option<usize>,
1078 max_encoding_message_size: Option<usize>,
1079 }
1080 impl<T> QueryServer<T> {
1081 pub fn new(inner: T) -> Self {
1082 Self::from_arc(Arc::new(inner))
1083 }
1084 pub fn from_arc(inner: Arc<T>) -> Self {
1085 Self {
1086 inner,
1087 accept_compression_encodings: Default::default(),
1088 send_compression_encodings: Default::default(),
1089 max_decoding_message_size: None,
1090 max_encoding_message_size: None,
1091 }
1092 }
1093 pub fn with_interceptor<F>(
1094 inner: T,
1095 interceptor: F,
1096 ) -> InterceptedService<Self, F>
1097 where
1098 F: tonic::service::Interceptor,
1099 {
1100 InterceptedService::new(Self::new(inner), interceptor)
1101 }
1102 #[must_use]
1104 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1105 self.accept_compression_encodings.enable(encoding);
1106 self
1107 }
1108 #[must_use]
1110 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1111 self.send_compression_encodings.enable(encoding);
1112 self
1113 }
1114 #[must_use]
1118 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1119 self.max_decoding_message_size = Some(limit);
1120 self
1121 }
1122 #[must_use]
1126 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1127 self.max_encoding_message_size = Some(limit);
1128 self
1129 }
1130 }
1131 impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
1132 where
1133 T: Query,
1134 B: Body + std::marker::Send + 'static,
1135 B::Error: Into<StdError> + std::marker::Send + 'static,
1136 {
1137 type Response = http::Response<tonic::body::Body>;
1138 type Error = std::convert::Infallible;
1139 type Future = BoxFuture<Self::Response, Self::Error>;
1140 fn poll_ready(
1141 &mut self,
1142 _cx: &mut Context<'_>,
1143 ) -> Poll<std::result::Result<(), Self::Error>> {
1144 Poll::Ready(Ok(()))
1145 }
1146 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1147 match req.uri().path() {
1148 "/ibc.applications.transfer.v1.Query/DenomTraces" => {
1149 #[allow(non_camel_case_types)]
1150 struct DenomTracesSvc<T: Query>(pub Arc<T>);
1151 impl<
1152 T: Query,
1153 > tonic::server::UnaryService<super::QueryDenomTracesRequest>
1154 for DenomTracesSvc<T> {
1155 type Response = super::QueryDenomTracesResponse;
1156 type Future = BoxFuture<
1157 tonic::Response<Self::Response>,
1158 tonic::Status,
1159 >;
1160 fn call(
1161 &mut self,
1162 request: tonic::Request<super::QueryDenomTracesRequest>,
1163 ) -> Self::Future {
1164 let inner = Arc::clone(&self.0);
1165 let fut = async move {
1166 <T as Query>::denom_traces(&inner, request).await
1167 };
1168 Box::pin(fut)
1169 }
1170 }
1171 let accept_compression_encodings = self.accept_compression_encodings;
1172 let send_compression_encodings = self.send_compression_encodings;
1173 let max_decoding_message_size = self.max_decoding_message_size;
1174 let max_encoding_message_size = self.max_encoding_message_size;
1175 let inner = self.inner.clone();
1176 let fut = async move {
1177 let method = DenomTracesSvc(inner);
1178 let codec = tonic::codec::ProstCodec::default();
1179 let mut grpc = tonic::server::Grpc::new(codec)
1180 .apply_compression_config(
1181 accept_compression_encodings,
1182 send_compression_encodings,
1183 )
1184 .apply_max_message_size_config(
1185 max_decoding_message_size,
1186 max_encoding_message_size,
1187 );
1188 let res = grpc.unary(method, req).await;
1189 Ok(res)
1190 };
1191 Box::pin(fut)
1192 }
1193 "/ibc.applications.transfer.v1.Query/DenomTrace" => {
1194 #[allow(non_camel_case_types)]
1195 struct DenomTraceSvc<T: Query>(pub Arc<T>);
1196 impl<
1197 T: Query,
1198 > tonic::server::UnaryService<super::QueryDenomTraceRequest>
1199 for DenomTraceSvc<T> {
1200 type Response = super::QueryDenomTraceResponse;
1201 type Future = BoxFuture<
1202 tonic::Response<Self::Response>,
1203 tonic::Status,
1204 >;
1205 fn call(
1206 &mut self,
1207 request: tonic::Request<super::QueryDenomTraceRequest>,
1208 ) -> Self::Future {
1209 let inner = Arc::clone(&self.0);
1210 let fut = async move {
1211 <T as Query>::denom_trace(&inner, request).await
1212 };
1213 Box::pin(fut)
1214 }
1215 }
1216 let accept_compression_encodings = self.accept_compression_encodings;
1217 let send_compression_encodings = self.send_compression_encodings;
1218 let max_decoding_message_size = self.max_decoding_message_size;
1219 let max_encoding_message_size = self.max_encoding_message_size;
1220 let inner = self.inner.clone();
1221 let fut = async move {
1222 let method = DenomTraceSvc(inner);
1223 let codec = tonic::codec::ProstCodec::default();
1224 let mut grpc = tonic::server::Grpc::new(codec)
1225 .apply_compression_config(
1226 accept_compression_encodings,
1227 send_compression_encodings,
1228 )
1229 .apply_max_message_size_config(
1230 max_decoding_message_size,
1231 max_encoding_message_size,
1232 );
1233 let res = grpc.unary(method, req).await;
1234 Ok(res)
1235 };
1236 Box::pin(fut)
1237 }
1238 "/ibc.applications.transfer.v1.Query/Params" => {
1239 #[allow(non_camel_case_types)]
1240 struct ParamsSvc<T: Query>(pub Arc<T>);
1241 impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest>
1242 for ParamsSvc<T> {
1243 type Response = super::QueryParamsResponse;
1244 type Future = BoxFuture<
1245 tonic::Response<Self::Response>,
1246 tonic::Status,
1247 >;
1248 fn call(
1249 &mut self,
1250 request: tonic::Request<super::QueryParamsRequest>,
1251 ) -> Self::Future {
1252 let inner = Arc::clone(&self.0);
1253 let fut = async move {
1254 <T as Query>::params(&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 = ParamsSvc(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.transfer.v1.Query/DenomHash" => {
1282 #[allow(non_camel_case_types)]
1283 struct DenomHashSvc<T: Query>(pub Arc<T>);
1284 impl<
1285 T: Query,
1286 > tonic::server::UnaryService<super::QueryDenomHashRequest>
1287 for DenomHashSvc<T> {
1288 type Response = super::QueryDenomHashResponse;
1289 type Future = BoxFuture<
1290 tonic::Response<Self::Response>,
1291 tonic::Status,
1292 >;
1293 fn call(
1294 &mut self,
1295 request: tonic::Request<super::QueryDenomHashRequest>,
1296 ) -> Self::Future {
1297 let inner = Arc::clone(&self.0);
1298 let fut = async move {
1299 <T as Query>::denom_hash(&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 = DenomHashSvc(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.transfer.v1.Query/EscrowAddress" => {
1327 #[allow(non_camel_case_types)]
1328 struct EscrowAddressSvc<T: Query>(pub Arc<T>);
1329 impl<
1330 T: Query,
1331 > tonic::server::UnaryService<super::QueryEscrowAddressRequest>
1332 for EscrowAddressSvc<T> {
1333 type Response = super::QueryEscrowAddressResponse;
1334 type Future = BoxFuture<
1335 tonic::Response<Self::Response>,
1336 tonic::Status,
1337 >;
1338 fn call(
1339 &mut self,
1340 request: tonic::Request<super::QueryEscrowAddressRequest>,
1341 ) -> Self::Future {
1342 let inner = Arc::clone(&self.0);
1343 let fut = async move {
1344 <T as Query>::escrow_address(&inner, request).await
1345 };
1346 Box::pin(fut)
1347 }
1348 }
1349 let accept_compression_encodings = self.accept_compression_encodings;
1350 let send_compression_encodings = self.send_compression_encodings;
1351 let max_decoding_message_size = self.max_decoding_message_size;
1352 let max_encoding_message_size = self.max_encoding_message_size;
1353 let inner = self.inner.clone();
1354 let fut = async move {
1355 let method = EscrowAddressSvc(inner);
1356 let codec = tonic::codec::ProstCodec::default();
1357 let mut grpc = tonic::server::Grpc::new(codec)
1358 .apply_compression_config(
1359 accept_compression_encodings,
1360 send_compression_encodings,
1361 )
1362 .apply_max_message_size_config(
1363 max_decoding_message_size,
1364 max_encoding_message_size,
1365 );
1366 let res = grpc.unary(method, req).await;
1367 Ok(res)
1368 };
1369 Box::pin(fut)
1370 }
1371 "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom" => {
1372 #[allow(non_camel_case_types)]
1373 struct TotalEscrowForDenomSvc<T: Query>(pub Arc<T>);
1374 impl<
1375 T: Query,
1376 > tonic::server::UnaryService<super::QueryTotalEscrowForDenomRequest>
1377 for TotalEscrowForDenomSvc<T> {
1378 type Response = super::QueryTotalEscrowForDenomResponse;
1379 type Future = BoxFuture<
1380 tonic::Response<Self::Response>,
1381 tonic::Status,
1382 >;
1383 fn call(
1384 &mut self,
1385 request: tonic::Request<
1386 super::QueryTotalEscrowForDenomRequest,
1387 >,
1388 ) -> Self::Future {
1389 let inner = Arc::clone(&self.0);
1390 let fut = async move {
1391 <T as Query>::total_escrow_for_denom(&inner, request).await
1392 };
1393 Box::pin(fut)
1394 }
1395 }
1396 let accept_compression_encodings = self.accept_compression_encodings;
1397 let send_compression_encodings = self.send_compression_encodings;
1398 let max_decoding_message_size = self.max_decoding_message_size;
1399 let max_encoding_message_size = self.max_encoding_message_size;
1400 let inner = self.inner.clone();
1401 let fut = async move {
1402 let method = TotalEscrowForDenomSvc(inner);
1403 let codec = tonic::codec::ProstCodec::default();
1404 let mut grpc = tonic::server::Grpc::new(codec)
1405 .apply_compression_config(
1406 accept_compression_encodings,
1407 send_compression_encodings,
1408 )
1409 .apply_max_message_size_config(
1410 max_decoding_message_size,
1411 max_encoding_message_size,
1412 );
1413 let res = grpc.unary(method, req).await;
1414 Ok(res)
1415 };
1416 Box::pin(fut)
1417 }
1418 _ => {
1419 Box::pin(async move {
1420 let mut response = http::Response::new(
1421 tonic::body::Body::default(),
1422 );
1423 let headers = response.headers_mut();
1424 headers
1425 .insert(
1426 tonic::Status::GRPC_STATUS,
1427 (tonic::Code::Unimplemented as i32).into(),
1428 );
1429 headers
1430 .insert(
1431 http::header::CONTENT_TYPE,
1432 tonic::metadata::GRPC_CONTENT_TYPE,
1433 );
1434 Ok(response)
1435 })
1436 }
1437 }
1438 }
1439 }
1440 impl<T> Clone for QueryServer<T> {
1441 fn clone(&self) -> Self {
1442 let inner = self.inner.clone();
1443 Self {
1444 inner,
1445 accept_compression_encodings: self.accept_compression_encodings,
1446 send_compression_encodings: self.send_compression_encodings,
1447 max_decoding_message_size: self.max_decoding_message_size,
1448 max_encoding_message_size: self.max_encoding_message_size,
1449 }
1450 }
1451 }
1452 pub const SERVICE_NAME: &str = "ibc.applications.transfer.v1.Query";
1454 impl<T> tonic::server::NamedService for QueryServer<T> {
1455 const NAME: &'static str = SERVICE_NAME;
1456 }
1457}
1458#[derive(Clone, PartialEq, ::prost::Message)]
1460pub struct Allocation {
1461 #[prost(string, tag = "1")]
1463 pub source_port: ::prost::alloc::string::String,
1464 #[prost(string, tag = "2")]
1466 pub source_channel: ::prost::alloc::string::String,
1467 #[prost(message, repeated, tag = "3")]
1469 pub spend_limit: ::prost::alloc::vec::Vec<
1470 super::super::super::super::cosmos::base::v1beta1::Coin,
1471 >,
1472 #[prost(string, repeated, tag = "4")]
1474 pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1475 #[prost(string, repeated, tag = "5")]
1478 pub allowed_packet_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1479}
1480impl ::prost::Name for Allocation {
1481 const NAME: &'static str = "Allocation";
1482 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
1483 fn full_name() -> ::prost::alloc::string::String {
1484 "ibc.applications.transfer.v1.Allocation".into()
1485 }
1486 fn type_url() -> ::prost::alloc::string::String {
1487 "/ibc.applications.transfer.v1.Allocation".into()
1488 }
1489}
1490#[derive(Clone, PartialEq, ::prost::Message)]
1493pub struct TransferAuthorization {
1494 #[prost(message, repeated, tag = "1")]
1496 pub allocations: ::prost::alloc::vec::Vec<Allocation>,
1497}
1498impl ::prost::Name for TransferAuthorization {
1499 const NAME: &'static str = "TransferAuthorization";
1500 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
1501 fn full_name() -> ::prost::alloc::string::String {
1502 "ibc.applications.transfer.v1.TransferAuthorization".into()
1503 }
1504 fn type_url() -> ::prost::alloc::string::String {
1505 "/ibc.applications.transfer.v1.TransferAuthorization".into()
1506 }
1507}
1508#[derive(Clone, PartialEq, ::prost::Message)]
1510pub struct GenesisState {
1511 #[prost(string, tag = "1")]
1512 pub port_id: ::prost::alloc::string::String,
1513 #[prost(message, repeated, tag = "2")]
1514 pub denom_traces: ::prost::alloc::vec::Vec<DenomTrace>,
1515 #[prost(message, optional, tag = "3")]
1516 pub params: ::core::option::Option<Params>,
1517 #[prost(message, repeated, tag = "4")]
1520 pub total_escrowed: ::prost::alloc::vec::Vec<
1521 super::super::super::super::cosmos::base::v1beta1::Coin,
1522 >,
1523}
1524impl ::prost::Name for GenesisState {
1525 const NAME: &'static str = "GenesisState";
1526 const PACKAGE: &'static str = "ibc.applications.transfer.v1";
1527 fn full_name() -> ::prost::alloc::string::String {
1528 "ibc.applications.transfer.v1.GenesisState".into()
1529 }
1530 fn type_url() -> ::prost::alloc::string::String {
1531 "/ibc.applications.transfer.v1.GenesisState".into()
1532 }
1533}