1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Params {
5 #[deprecated]
11 #[prost(message, repeated, tag = "1")]
12 pub send_enabled: ::prost::alloc::vec::Vec<SendEnabled>,
13 #[prost(bool, tag = "2")]
14 pub default_send_enabled: bool,
15}
16impl ::prost::Name for Params {
17 const NAME: &'static str = "Params";
18 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
19 fn full_name() -> ::prost::alloc::string::String {
20 "cosmos.bank.v1beta1.Params".into()
21 }
22 fn type_url() -> ::prost::alloc::string::String {
23 "/cosmos.bank.v1beta1.Params".into()
24 }
25}
26#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct SendEnabled {
30 #[prost(string, tag = "1")]
31 pub denom: ::prost::alloc::string::String,
32 #[prost(bool, tag = "2")]
33 pub enabled: bool,
34}
35impl ::prost::Name for SendEnabled {
36 const NAME: &'static str = "SendEnabled";
37 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
38 fn full_name() -> ::prost::alloc::string::String {
39 "cosmos.bank.v1beta1.SendEnabled".into()
40 }
41 fn type_url() -> ::prost::alloc::string::String {
42 "/cosmos.bank.v1beta1.SendEnabled".into()
43 }
44}
45#[derive(Clone, PartialEq, ::prost::Message)]
47pub struct Input {
48 #[prost(string, tag = "1")]
49 pub address: ::prost::alloc::string::String,
50 #[prost(message, repeated, tag = "2")]
51 pub coins: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
52}
53impl ::prost::Name for Input {
54 const NAME: &'static str = "Input";
55 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
56 fn full_name() -> ::prost::alloc::string::String {
57 "cosmos.bank.v1beta1.Input".into()
58 }
59 fn type_url() -> ::prost::alloc::string::String {
60 "/cosmos.bank.v1beta1.Input".into()
61 }
62}
63#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct Output {
66 #[prost(string, tag = "1")]
67 pub address: ::prost::alloc::string::String,
68 #[prost(message, repeated, tag = "2")]
69 pub coins: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
70}
71impl ::prost::Name for Output {
72 const NAME: &'static str = "Output";
73 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
74 fn full_name() -> ::prost::alloc::string::String {
75 "cosmos.bank.v1beta1.Output".into()
76 }
77 fn type_url() -> ::prost::alloc::string::String {
78 "/cosmos.bank.v1beta1.Output".into()
79 }
80}
81#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct Supply {
86 #[prost(message, repeated, tag = "1")]
87 pub total: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
88}
89impl ::prost::Name for Supply {
90 const NAME: &'static str = "Supply";
91 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
92 fn full_name() -> ::prost::alloc::string::String {
93 "cosmos.bank.v1beta1.Supply".into()
94 }
95 fn type_url() -> ::prost::alloc::string::String {
96 "/cosmos.bank.v1beta1.Supply".into()
97 }
98}
99#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct DenomUnit {
103 #[prost(string, tag = "1")]
105 pub denom: ::prost::alloc::string::String,
106 #[prost(uint32, tag = "2")]
112 pub exponent: u32,
113 #[prost(string, repeated, tag = "3")]
115 pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
116}
117impl ::prost::Name for DenomUnit {
118 const NAME: &'static str = "DenomUnit";
119 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
120 fn full_name() -> ::prost::alloc::string::String {
121 "cosmos.bank.v1beta1.DenomUnit".into()
122 }
123 fn type_url() -> ::prost::alloc::string::String {
124 "/cosmos.bank.v1beta1.DenomUnit".into()
125 }
126}
127#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct Metadata {
131 #[prost(string, tag = "1")]
132 pub description: ::prost::alloc::string::String,
133 #[prost(message, repeated, tag = "2")]
135 pub denom_units: ::prost::alloc::vec::Vec<DenomUnit>,
136 #[prost(string, tag = "3")]
138 pub base: ::prost::alloc::string::String,
139 #[prost(string, tag = "4")]
142 pub display: ::prost::alloc::string::String,
143 #[prost(string, tag = "5")]
147 pub name: ::prost::alloc::string::String,
148 #[prost(string, tag = "6")]
153 pub symbol: ::prost::alloc::string::String,
154 #[prost(string, tag = "7")]
158 pub uri: ::prost::alloc::string::String,
159 #[prost(string, tag = "8")]
164 pub uri_hash: ::prost::alloc::string::String,
165}
166impl ::prost::Name for Metadata {
167 const NAME: &'static str = "Metadata";
168 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
169 fn full_name() -> ::prost::alloc::string::String {
170 "cosmos.bank.v1beta1.Metadata".into()
171 }
172 fn type_url() -> ::prost::alloc::string::String {
173 "/cosmos.bank.v1beta1.Metadata".into()
174 }
175}
176#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct QueryBalanceRequest {
179 #[prost(string, tag = "1")]
181 pub address: ::prost::alloc::string::String,
182 #[prost(string, tag = "2")]
184 pub denom: ::prost::alloc::string::String,
185}
186impl ::prost::Name for QueryBalanceRequest {
187 const NAME: &'static str = "QueryBalanceRequest";
188 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
189 fn full_name() -> ::prost::alloc::string::String {
190 "cosmos.bank.v1beta1.QueryBalanceRequest".into()
191 }
192 fn type_url() -> ::prost::alloc::string::String {
193 "/cosmos.bank.v1beta1.QueryBalanceRequest".into()
194 }
195}
196#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct QueryBalanceResponse {
199 #[prost(message, optional, tag = "1")]
201 pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
202}
203impl ::prost::Name for QueryBalanceResponse {
204 const NAME: &'static str = "QueryBalanceResponse";
205 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
206 fn full_name() -> ::prost::alloc::string::String {
207 "cosmos.bank.v1beta1.QueryBalanceResponse".into()
208 }
209 fn type_url() -> ::prost::alloc::string::String {
210 "/cosmos.bank.v1beta1.QueryBalanceResponse".into()
211 }
212}
213#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct QueryAllBalancesRequest {
216 #[prost(string, tag = "1")]
218 pub address: ::prost::alloc::string::String,
219 #[prost(message, optional, tag = "2")]
221 pub pagination: ::core::option::Option<
222 super::super::base::query::v1beta1::PageRequest,
223 >,
224 #[prost(bool, tag = "3")]
228 pub resolve_denom: bool,
229}
230impl ::prost::Name for QueryAllBalancesRequest {
231 const NAME: &'static str = "QueryAllBalancesRequest";
232 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
233 fn full_name() -> ::prost::alloc::string::String {
234 "cosmos.bank.v1beta1.QueryAllBalancesRequest".into()
235 }
236 fn type_url() -> ::prost::alloc::string::String {
237 "/cosmos.bank.v1beta1.QueryAllBalancesRequest".into()
238 }
239}
240#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct QueryAllBalancesResponse {
244 #[prost(message, repeated, tag = "1")]
246 pub balances: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
247 #[prost(message, optional, tag = "2")]
249 pub pagination: ::core::option::Option<
250 super::super::base::query::v1beta1::PageResponse,
251 >,
252}
253impl ::prost::Name for QueryAllBalancesResponse {
254 const NAME: &'static str = "QueryAllBalancesResponse";
255 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
256 fn full_name() -> ::prost::alloc::string::String {
257 "cosmos.bank.v1beta1.QueryAllBalancesResponse".into()
258 }
259 fn type_url() -> ::prost::alloc::string::String {
260 "/cosmos.bank.v1beta1.QueryAllBalancesResponse".into()
261 }
262}
263#[derive(Clone, PartialEq, ::prost::Message)]
268pub struct QuerySpendableBalancesRequest {
269 #[prost(string, tag = "1")]
271 pub address: ::prost::alloc::string::String,
272 #[prost(message, optional, tag = "2")]
274 pub pagination: ::core::option::Option<
275 super::super::base::query::v1beta1::PageRequest,
276 >,
277}
278impl ::prost::Name for QuerySpendableBalancesRequest {
279 const NAME: &'static str = "QuerySpendableBalancesRequest";
280 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
281 fn full_name() -> ::prost::alloc::string::String {
282 "cosmos.bank.v1beta1.QuerySpendableBalancesRequest".into()
283 }
284 fn type_url() -> ::prost::alloc::string::String {
285 "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest".into()
286 }
287}
288#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct QuerySpendableBalancesResponse {
294 #[prost(message, repeated, tag = "1")]
296 pub balances: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
297 #[prost(message, optional, tag = "2")]
299 pub pagination: ::core::option::Option<
300 super::super::base::query::v1beta1::PageResponse,
301 >,
302}
303impl ::prost::Name for QuerySpendableBalancesResponse {
304 const NAME: &'static str = "QuerySpendableBalancesResponse";
305 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
306 fn full_name() -> ::prost::alloc::string::String {
307 "cosmos.bank.v1beta1.QuerySpendableBalancesResponse".into()
308 }
309 fn type_url() -> ::prost::alloc::string::String {
310 "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse".into()
311 }
312}
313#[derive(Clone, PartialEq, ::prost::Message)]
318pub struct QuerySpendableBalanceByDenomRequest {
319 #[prost(string, tag = "1")]
321 pub address: ::prost::alloc::string::String,
322 #[prost(string, tag = "2")]
324 pub denom: ::prost::alloc::string::String,
325}
326impl ::prost::Name for QuerySpendableBalanceByDenomRequest {
327 const NAME: &'static str = "QuerySpendableBalanceByDenomRequest";
328 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
329 fn full_name() -> ::prost::alloc::string::String {
330 "cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest".into()
331 }
332 fn type_url() -> ::prost::alloc::string::String {
333 "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest".into()
334 }
335}
336#[derive(Clone, PartialEq, ::prost::Message)]
341pub struct QuerySpendableBalanceByDenomResponse {
342 #[prost(message, optional, tag = "1")]
344 pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
345}
346impl ::prost::Name for QuerySpendableBalanceByDenomResponse {
347 const NAME: &'static str = "QuerySpendableBalanceByDenomResponse";
348 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
349 fn full_name() -> ::prost::alloc::string::String {
350 "cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse".into()
351 }
352 fn type_url() -> ::prost::alloc::string::String {
353 "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse".into()
354 }
355}
356#[derive(Clone, PartialEq, ::prost::Message)]
359pub struct QueryTotalSupplyRequest {
360 #[prost(message, optional, tag = "1")]
364 pub pagination: ::core::option::Option<
365 super::super::base::query::v1beta1::PageRequest,
366 >,
367}
368impl ::prost::Name for QueryTotalSupplyRequest {
369 const NAME: &'static str = "QueryTotalSupplyRequest";
370 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
371 fn full_name() -> ::prost::alloc::string::String {
372 "cosmos.bank.v1beta1.QueryTotalSupplyRequest".into()
373 }
374 fn type_url() -> ::prost::alloc::string::String {
375 "/cosmos.bank.v1beta1.QueryTotalSupplyRequest".into()
376 }
377}
378#[derive(Clone, PartialEq, ::prost::Message)]
381pub struct QueryTotalSupplyResponse {
382 #[prost(message, repeated, tag = "1")]
384 pub supply: ::prost::alloc::vec::Vec<super::super::base::v1beta1::Coin>,
385 #[prost(message, optional, tag = "2")]
389 pub pagination: ::core::option::Option<
390 super::super::base::query::v1beta1::PageResponse,
391 >,
392}
393impl ::prost::Name for QueryTotalSupplyResponse {
394 const NAME: &'static str = "QueryTotalSupplyResponse";
395 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
396 fn full_name() -> ::prost::alloc::string::String {
397 "cosmos.bank.v1beta1.QueryTotalSupplyResponse".into()
398 }
399 fn type_url() -> ::prost::alloc::string::String {
400 "/cosmos.bank.v1beta1.QueryTotalSupplyResponse".into()
401 }
402}
403#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct QuerySupplyOfRequest {
406 #[prost(string, tag = "1")]
408 pub denom: ::prost::alloc::string::String,
409}
410impl ::prost::Name for QuerySupplyOfRequest {
411 const NAME: &'static str = "QuerySupplyOfRequest";
412 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
413 fn full_name() -> ::prost::alloc::string::String {
414 "cosmos.bank.v1beta1.QuerySupplyOfRequest".into()
415 }
416 fn type_url() -> ::prost::alloc::string::String {
417 "/cosmos.bank.v1beta1.QuerySupplyOfRequest".into()
418 }
419}
420#[derive(Clone, PartialEq, ::prost::Message)]
422pub struct QuerySupplyOfResponse {
423 #[prost(message, optional, tag = "1")]
425 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
426}
427impl ::prost::Name for QuerySupplyOfResponse {
428 const NAME: &'static str = "QuerySupplyOfResponse";
429 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
430 fn full_name() -> ::prost::alloc::string::String {
431 "cosmos.bank.v1beta1.QuerySupplyOfResponse".into()
432 }
433 fn type_url() -> ::prost::alloc::string::String {
434 "/cosmos.bank.v1beta1.QuerySupplyOfResponse".into()
435 }
436}
437#[derive(Clone, Copy, PartialEq, ::prost::Message)]
439pub struct QueryParamsRequest {}
440impl ::prost::Name for QueryParamsRequest {
441 const NAME: &'static str = "QueryParamsRequest";
442 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
443 fn full_name() -> ::prost::alloc::string::String {
444 "cosmos.bank.v1beta1.QueryParamsRequest".into()
445 }
446 fn type_url() -> ::prost::alloc::string::String {
447 "/cosmos.bank.v1beta1.QueryParamsRequest".into()
448 }
449}
450#[derive(Clone, PartialEq, ::prost::Message)]
452pub struct QueryParamsResponse {
453 #[prost(message, optional, tag = "1")]
454 pub params: ::core::option::Option<Params>,
455}
456impl ::prost::Name for QueryParamsResponse {
457 const NAME: &'static str = "QueryParamsResponse";
458 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
459 fn full_name() -> ::prost::alloc::string::String {
460 "cosmos.bank.v1beta1.QueryParamsResponse".into()
461 }
462 fn type_url() -> ::prost::alloc::string::String {
463 "/cosmos.bank.v1beta1.QueryParamsResponse".into()
464 }
465}
466#[derive(Clone, PartialEq, ::prost::Message)]
468pub struct QueryDenomsMetadataRequest {
469 #[prost(message, optional, tag = "1")]
471 pub pagination: ::core::option::Option<
472 super::super::base::query::v1beta1::PageRequest,
473 >,
474}
475impl ::prost::Name for QueryDenomsMetadataRequest {
476 const NAME: &'static str = "QueryDenomsMetadataRequest";
477 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
478 fn full_name() -> ::prost::alloc::string::String {
479 "cosmos.bank.v1beta1.QueryDenomsMetadataRequest".into()
480 }
481 fn type_url() -> ::prost::alloc::string::String {
482 "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest".into()
483 }
484}
485#[derive(Clone, PartialEq, ::prost::Message)]
488pub struct QueryDenomsMetadataResponse {
489 #[prost(message, repeated, tag = "1")]
491 pub metadatas: ::prost::alloc::vec::Vec<Metadata>,
492 #[prost(message, optional, tag = "2")]
494 pub pagination: ::core::option::Option<
495 super::super::base::query::v1beta1::PageResponse,
496 >,
497}
498impl ::prost::Name for QueryDenomsMetadataResponse {
499 const NAME: &'static str = "QueryDenomsMetadataResponse";
500 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
501 fn full_name() -> ::prost::alloc::string::String {
502 "cosmos.bank.v1beta1.QueryDenomsMetadataResponse".into()
503 }
504 fn type_url() -> ::prost::alloc::string::String {
505 "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse".into()
506 }
507}
508#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct QueryDenomMetadataRequest {
511 #[prost(string, tag = "1")]
513 pub denom: ::prost::alloc::string::String,
514}
515impl ::prost::Name for QueryDenomMetadataRequest {
516 const NAME: &'static str = "QueryDenomMetadataRequest";
517 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
518 fn full_name() -> ::prost::alloc::string::String {
519 "cosmos.bank.v1beta1.QueryDenomMetadataRequest".into()
520 }
521 fn type_url() -> ::prost::alloc::string::String {
522 "/cosmos.bank.v1beta1.QueryDenomMetadataRequest".into()
523 }
524}
525#[derive(Clone, PartialEq, ::prost::Message)]
528pub struct QueryDenomMetadataResponse {
529 #[prost(message, optional, tag = "1")]
531 pub metadata: ::core::option::Option<Metadata>,
532}
533impl ::prost::Name for QueryDenomMetadataResponse {
534 const NAME: &'static str = "QueryDenomMetadataResponse";
535 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
536 fn full_name() -> ::prost::alloc::string::String {
537 "cosmos.bank.v1beta1.QueryDenomMetadataResponse".into()
538 }
539 fn type_url() -> ::prost::alloc::string::String {
540 "/cosmos.bank.v1beta1.QueryDenomMetadataResponse".into()
541 }
542}
543#[derive(Clone, PartialEq, ::prost::Message)]
547pub struct QueryDenomOwnersRequest {
548 #[prost(string, tag = "1")]
550 pub denom: ::prost::alloc::string::String,
551 #[prost(message, optional, tag = "2")]
553 pub pagination: ::core::option::Option<
554 super::super::base::query::v1beta1::PageRequest,
555 >,
556}
557impl ::prost::Name for QueryDenomOwnersRequest {
558 const NAME: &'static str = "QueryDenomOwnersRequest";
559 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
560 fn full_name() -> ::prost::alloc::string::String {
561 "cosmos.bank.v1beta1.QueryDenomOwnersRequest".into()
562 }
563 fn type_url() -> ::prost::alloc::string::String {
564 "/cosmos.bank.v1beta1.QueryDenomOwnersRequest".into()
565 }
566}
567#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct DenomOwner {
574 #[prost(string, tag = "1")]
576 pub address: ::prost::alloc::string::String,
577 #[prost(message, optional, tag = "2")]
579 pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
580}
581impl ::prost::Name for DenomOwner {
582 const NAME: &'static str = "DenomOwner";
583 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
584 fn full_name() -> ::prost::alloc::string::String {
585 "cosmos.bank.v1beta1.DenomOwner".into()
586 }
587 fn type_url() -> ::prost::alloc::string::String {
588 "/cosmos.bank.v1beta1.DenomOwner".into()
589 }
590}
591#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct QueryDenomOwnersResponse {
596 #[prost(message, repeated, tag = "1")]
597 pub denom_owners: ::prost::alloc::vec::Vec<DenomOwner>,
598 #[prost(message, optional, tag = "2")]
600 pub pagination: ::core::option::Option<
601 super::super::base::query::v1beta1::PageResponse,
602 >,
603}
604impl ::prost::Name for QueryDenomOwnersResponse {
605 const NAME: &'static str = "QueryDenomOwnersResponse";
606 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
607 fn full_name() -> ::prost::alloc::string::String {
608 "cosmos.bank.v1beta1.QueryDenomOwnersResponse".into()
609 }
610 fn type_url() -> ::prost::alloc::string::String {
611 "/cosmos.bank.v1beta1.QueryDenomOwnersResponse".into()
612 }
613}
614#[derive(Clone, PartialEq, ::prost::Message)]
618pub struct QuerySendEnabledRequest {
619 #[prost(string, repeated, tag = "1")]
621 pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
622 #[prost(message, optional, tag = "99")]
625 pub pagination: ::core::option::Option<
626 super::super::base::query::v1beta1::PageRequest,
627 >,
628}
629impl ::prost::Name for QuerySendEnabledRequest {
630 const NAME: &'static str = "QuerySendEnabledRequest";
631 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
632 fn full_name() -> ::prost::alloc::string::String {
633 "cosmos.bank.v1beta1.QuerySendEnabledRequest".into()
634 }
635 fn type_url() -> ::prost::alloc::string::String {
636 "/cosmos.bank.v1beta1.QuerySendEnabledRequest".into()
637 }
638}
639#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct QuerySendEnabledResponse {
644 #[prost(message, repeated, tag = "1")]
645 pub send_enabled: ::prost::alloc::vec::Vec<SendEnabled>,
646 #[prost(message, optional, tag = "99")]
649 pub pagination: ::core::option::Option<
650 super::super::base::query::v1beta1::PageResponse,
651 >,
652}
653impl ::prost::Name for QuerySendEnabledResponse {
654 const NAME: &'static str = "QuerySendEnabledResponse";
655 const PACKAGE: &'static str = "cosmos.bank.v1beta1";
656 fn full_name() -> ::prost::alloc::string::String {
657 "cosmos.bank.v1beta1.QuerySendEnabledResponse".into()
658 }
659 fn type_url() -> ::prost::alloc::string::String {
660 "/cosmos.bank.v1beta1.QuerySendEnabledResponse".into()
661 }
662}
663#[cfg(feature = "rpc")]
665pub mod query_client {
666 #![allow(
667 unused_variables,
668 dead_code,
669 missing_docs,
670 clippy::wildcard_imports,
671 clippy::let_unit_value,
672 )]
673 use tonic::codegen::*;
674 use tonic::codegen::http::Uri;
675 #[derive(Debug, Clone)]
677 pub struct QueryClient<T> {
678 inner: tonic::client::Grpc<T>,
679 }
680 impl QueryClient<tonic::transport::Channel> {
681 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
683 where
684 D: TryInto<tonic::transport::Endpoint>,
685 D::Error: Into<StdError>,
686 {
687 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
688 Ok(Self::new(conn))
689 }
690 }
691 impl<T> QueryClient<T>
692 where
693 T: tonic::client::GrpcService<tonic::body::BoxBody>,
694 T::Error: Into<StdError>,
695 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
696 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
697 {
698 pub fn new(inner: T) -> Self {
699 let inner = tonic::client::Grpc::new(inner);
700 Self { inner }
701 }
702 pub fn with_origin(inner: T, origin: Uri) -> Self {
703 let inner = tonic::client::Grpc::with_origin(inner, origin);
704 Self { inner }
705 }
706 pub fn with_interceptor<F>(
707 inner: T,
708 interceptor: F,
709 ) -> QueryClient<InterceptedService<T, F>>
710 where
711 F: tonic::service::Interceptor,
712 T::ResponseBody: Default,
713 T: tonic::codegen::Service<
714 http::Request<tonic::body::BoxBody>,
715 Response = http::Response<
716 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
717 >,
718 >,
719 <T as tonic::codegen::Service<
720 http::Request<tonic::body::BoxBody>,
721 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
722 {
723 QueryClient::new(InterceptedService::new(inner, interceptor))
724 }
725 #[must_use]
730 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
731 self.inner = self.inner.send_compressed(encoding);
732 self
733 }
734 #[must_use]
736 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
737 self.inner = self.inner.accept_compressed(encoding);
738 self
739 }
740 #[must_use]
744 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
745 self.inner = self.inner.max_decoding_message_size(limit);
746 self
747 }
748 #[must_use]
752 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
753 self.inner = self.inner.max_encoding_message_size(limit);
754 self
755 }
756 pub async fn balance(
758 &mut self,
759 request: impl tonic::IntoRequest<super::QueryBalanceRequest>,
760 ) -> std::result::Result<
761 tonic::Response<super::QueryBalanceResponse>,
762 tonic::Status,
763 > {
764 self.inner
765 .ready()
766 .await
767 .map_err(|e| {
768 tonic::Status::unknown(
769 format!("Service was not ready: {}", e.into()),
770 )
771 })?;
772 let codec = tonic::codec::ProstCodec::default();
773 let path = http::uri::PathAndQuery::from_static(
774 "/cosmos.bank.v1beta1.Query/Balance",
775 );
776 let mut req = request.into_request();
777 req.extensions_mut()
778 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "Balance"));
779 self.inner.unary(req, path, codec).await
780 }
781 pub async fn all_balances(
786 &mut self,
787 request: impl tonic::IntoRequest<super::QueryAllBalancesRequest>,
788 ) -> std::result::Result<
789 tonic::Response<super::QueryAllBalancesResponse>,
790 tonic::Status,
791 > {
792 self.inner
793 .ready()
794 .await
795 .map_err(|e| {
796 tonic::Status::unknown(
797 format!("Service was not ready: {}", e.into()),
798 )
799 })?;
800 let codec = tonic::codec::ProstCodec::default();
801 let path = http::uri::PathAndQuery::from_static(
802 "/cosmos.bank.v1beta1.Query/AllBalances",
803 );
804 let mut req = request.into_request();
805 req.extensions_mut()
806 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "AllBalances"));
807 self.inner.unary(req, path, codec).await
808 }
809 pub async fn spendable_balances(
817 &mut self,
818 request: impl tonic::IntoRequest<super::QuerySpendableBalancesRequest>,
819 ) -> std::result::Result<
820 tonic::Response<super::QuerySpendableBalancesResponse>,
821 tonic::Status,
822 > {
823 self.inner
824 .ready()
825 .await
826 .map_err(|e| {
827 tonic::Status::unknown(
828 format!("Service was not ready: {}", e.into()),
829 )
830 })?;
831 let codec = tonic::codec::ProstCodec::default();
832 let path = http::uri::PathAndQuery::from_static(
833 "/cosmos.bank.v1beta1.Query/SpendableBalances",
834 );
835 let mut req = request.into_request();
836 req.extensions_mut()
837 .insert(
838 GrpcMethod::new("cosmos.bank.v1beta1.Query", "SpendableBalances"),
839 );
840 self.inner.unary(req, path, codec).await
841 }
842 pub async fn spendable_balance_by_denom(
850 &mut self,
851 request: impl tonic::IntoRequest<super::QuerySpendableBalanceByDenomRequest>,
852 ) -> std::result::Result<
853 tonic::Response<super::QuerySpendableBalanceByDenomResponse>,
854 tonic::Status,
855 > {
856 self.inner
857 .ready()
858 .await
859 .map_err(|e| {
860 tonic::Status::unknown(
861 format!("Service was not ready: {}", e.into()),
862 )
863 })?;
864 let codec = tonic::codec::ProstCodec::default();
865 let path = http::uri::PathAndQuery::from_static(
866 "/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom",
867 );
868 let mut req = request.into_request();
869 req.extensions_mut()
870 .insert(
871 GrpcMethod::new(
872 "cosmos.bank.v1beta1.Query",
873 "SpendableBalanceByDenom",
874 ),
875 );
876 self.inner.unary(req, path, codec).await
877 }
878 pub async fn total_supply(
883 &mut self,
884 request: impl tonic::IntoRequest<super::QueryTotalSupplyRequest>,
885 ) -> std::result::Result<
886 tonic::Response<super::QueryTotalSupplyResponse>,
887 tonic::Status,
888 > {
889 self.inner
890 .ready()
891 .await
892 .map_err(|e| {
893 tonic::Status::unknown(
894 format!("Service was not ready: {}", e.into()),
895 )
896 })?;
897 let codec = tonic::codec::ProstCodec::default();
898 let path = http::uri::PathAndQuery::from_static(
899 "/cosmos.bank.v1beta1.Query/TotalSupply",
900 );
901 let mut req = request.into_request();
902 req.extensions_mut()
903 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "TotalSupply"));
904 self.inner.unary(req, path, codec).await
905 }
906 pub async fn supply_of(
911 &mut self,
912 request: impl tonic::IntoRequest<super::QuerySupplyOfRequest>,
913 ) -> std::result::Result<
914 tonic::Response<super::QuerySupplyOfResponse>,
915 tonic::Status,
916 > {
917 self.inner
918 .ready()
919 .await
920 .map_err(|e| {
921 tonic::Status::unknown(
922 format!("Service was not ready: {}", e.into()),
923 )
924 })?;
925 let codec = tonic::codec::ProstCodec::default();
926 let path = http::uri::PathAndQuery::from_static(
927 "/cosmos.bank.v1beta1.Query/SupplyOf",
928 );
929 let mut req = request.into_request();
930 req.extensions_mut()
931 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "SupplyOf"));
932 self.inner.unary(req, path, codec).await
933 }
934 pub async fn params(
936 &mut self,
937 request: impl tonic::IntoRequest<super::QueryParamsRequest>,
938 ) -> std::result::Result<
939 tonic::Response<super::QueryParamsResponse>,
940 tonic::Status,
941 > {
942 self.inner
943 .ready()
944 .await
945 .map_err(|e| {
946 tonic::Status::unknown(
947 format!("Service was not ready: {}", e.into()),
948 )
949 })?;
950 let codec = tonic::codec::ProstCodec::default();
951 let path = http::uri::PathAndQuery::from_static(
952 "/cosmos.bank.v1beta1.Query/Params",
953 );
954 let mut req = request.into_request();
955 req.extensions_mut()
956 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "Params"));
957 self.inner.unary(req, path, codec).await
958 }
959 pub async fn denom_metadata(
961 &mut self,
962 request: impl tonic::IntoRequest<super::QueryDenomMetadataRequest>,
963 ) -> std::result::Result<
964 tonic::Response<super::QueryDenomMetadataResponse>,
965 tonic::Status,
966 > {
967 self.inner
968 .ready()
969 .await
970 .map_err(|e| {
971 tonic::Status::unknown(
972 format!("Service was not ready: {}", e.into()),
973 )
974 })?;
975 let codec = tonic::codec::ProstCodec::default();
976 let path = http::uri::PathAndQuery::from_static(
977 "/cosmos.bank.v1beta1.Query/DenomMetadata",
978 );
979 let mut req = request.into_request();
980 req.extensions_mut()
981 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomMetadata"));
982 self.inner.unary(req, path, codec).await
983 }
984 pub async fn denoms_metadata(
987 &mut self,
988 request: impl tonic::IntoRequest<super::QueryDenomsMetadataRequest>,
989 ) -> std::result::Result<
990 tonic::Response<super::QueryDenomsMetadataResponse>,
991 tonic::Status,
992 > {
993 self.inner
994 .ready()
995 .await
996 .map_err(|e| {
997 tonic::Status::unknown(
998 format!("Service was not ready: {}", e.into()),
999 )
1000 })?;
1001 let codec = tonic::codec::ProstCodec::default();
1002 let path = http::uri::PathAndQuery::from_static(
1003 "/cosmos.bank.v1beta1.Query/DenomsMetadata",
1004 );
1005 let mut req = request.into_request();
1006 req.extensions_mut()
1007 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomsMetadata"));
1008 self.inner.unary(req, path, codec).await
1009 }
1010 pub async fn denom_owners(
1018 &mut self,
1019 request: impl tonic::IntoRequest<super::QueryDenomOwnersRequest>,
1020 ) -> std::result::Result<
1021 tonic::Response<super::QueryDenomOwnersResponse>,
1022 tonic::Status,
1023 > {
1024 self.inner
1025 .ready()
1026 .await
1027 .map_err(|e| {
1028 tonic::Status::unknown(
1029 format!("Service was not ready: {}", e.into()),
1030 )
1031 })?;
1032 let codec = tonic::codec::ProstCodec::default();
1033 let path = http::uri::PathAndQuery::from_static(
1034 "/cosmos.bank.v1beta1.Query/DenomOwners",
1035 );
1036 let mut req = request.into_request();
1037 req.extensions_mut()
1038 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "DenomOwners"));
1039 self.inner.unary(req, path, codec).await
1040 }
1041 pub async fn send_enabled(
1049 &mut self,
1050 request: impl tonic::IntoRequest<super::QuerySendEnabledRequest>,
1051 ) -> std::result::Result<
1052 tonic::Response<super::QuerySendEnabledResponse>,
1053 tonic::Status,
1054 > {
1055 self.inner
1056 .ready()
1057 .await
1058 .map_err(|e| {
1059 tonic::Status::unknown(
1060 format!("Service was not ready: {}", e.into()),
1061 )
1062 })?;
1063 let codec = tonic::codec::ProstCodec::default();
1064 let path = http::uri::PathAndQuery::from_static(
1065 "/cosmos.bank.v1beta1.Query/SendEnabled",
1066 );
1067 let mut req = request.into_request();
1068 req.extensions_mut()
1069 .insert(GrpcMethod::new("cosmos.bank.v1beta1.Query", "SendEnabled"));
1070 self.inner.unary(req, path, codec).await
1071 }
1072 }
1073}
1074#[cfg(feature = "rpc")]
1076pub mod query_server {
1077 #![allow(
1078 unused_variables,
1079 dead_code,
1080 missing_docs,
1081 clippy::wildcard_imports,
1082 clippy::let_unit_value,
1083 )]
1084 use tonic::codegen::*;
1085 #[async_trait]
1087 pub trait Query: std::marker::Send + std::marker::Sync + 'static {
1088 async fn balance(
1090 &self,
1091 request: tonic::Request<super::QueryBalanceRequest>,
1092 ) -> std::result::Result<
1093 tonic::Response<super::QueryBalanceResponse>,
1094 tonic::Status,
1095 >;
1096 async fn all_balances(
1101 &self,
1102 request: tonic::Request<super::QueryAllBalancesRequest>,
1103 ) -> std::result::Result<
1104 tonic::Response<super::QueryAllBalancesResponse>,
1105 tonic::Status,
1106 >;
1107 async fn spendable_balances(
1115 &self,
1116 request: tonic::Request<super::QuerySpendableBalancesRequest>,
1117 ) -> std::result::Result<
1118 tonic::Response<super::QuerySpendableBalancesResponse>,
1119 tonic::Status,
1120 >;
1121 async fn spendable_balance_by_denom(
1129 &self,
1130 request: tonic::Request<super::QuerySpendableBalanceByDenomRequest>,
1131 ) -> std::result::Result<
1132 tonic::Response<super::QuerySpendableBalanceByDenomResponse>,
1133 tonic::Status,
1134 >;
1135 async fn total_supply(
1140 &self,
1141 request: tonic::Request<super::QueryTotalSupplyRequest>,
1142 ) -> std::result::Result<
1143 tonic::Response<super::QueryTotalSupplyResponse>,
1144 tonic::Status,
1145 >;
1146 async fn supply_of(
1151 &self,
1152 request: tonic::Request<super::QuerySupplyOfRequest>,
1153 ) -> std::result::Result<
1154 tonic::Response<super::QuerySupplyOfResponse>,
1155 tonic::Status,
1156 >;
1157 async fn params(
1159 &self,
1160 request: tonic::Request<super::QueryParamsRequest>,
1161 ) -> std::result::Result<
1162 tonic::Response<super::QueryParamsResponse>,
1163 tonic::Status,
1164 >;
1165 async fn denom_metadata(
1167 &self,
1168 request: tonic::Request<super::QueryDenomMetadataRequest>,
1169 ) -> std::result::Result<
1170 tonic::Response<super::QueryDenomMetadataResponse>,
1171 tonic::Status,
1172 >;
1173 async fn denoms_metadata(
1176 &self,
1177 request: tonic::Request<super::QueryDenomsMetadataRequest>,
1178 ) -> std::result::Result<
1179 tonic::Response<super::QueryDenomsMetadataResponse>,
1180 tonic::Status,
1181 >;
1182 async fn denom_owners(
1190 &self,
1191 request: tonic::Request<super::QueryDenomOwnersRequest>,
1192 ) -> std::result::Result<
1193 tonic::Response<super::QueryDenomOwnersResponse>,
1194 tonic::Status,
1195 >;
1196 async fn send_enabled(
1204 &self,
1205 request: tonic::Request<super::QuerySendEnabledRequest>,
1206 ) -> std::result::Result<
1207 tonic::Response<super::QuerySendEnabledResponse>,
1208 tonic::Status,
1209 >;
1210 }
1211 #[derive(Debug)]
1213 pub struct QueryServer<T> {
1214 inner: Arc<T>,
1215 accept_compression_encodings: EnabledCompressionEncodings,
1216 send_compression_encodings: EnabledCompressionEncodings,
1217 max_decoding_message_size: Option<usize>,
1218 max_encoding_message_size: Option<usize>,
1219 }
1220 impl<T> QueryServer<T> {
1221 pub fn new(inner: T) -> Self {
1222 Self::from_arc(Arc::new(inner))
1223 }
1224 pub fn from_arc(inner: Arc<T>) -> Self {
1225 Self {
1226 inner,
1227 accept_compression_encodings: Default::default(),
1228 send_compression_encodings: Default::default(),
1229 max_decoding_message_size: None,
1230 max_encoding_message_size: None,
1231 }
1232 }
1233 pub fn with_interceptor<F>(
1234 inner: T,
1235 interceptor: F,
1236 ) -> InterceptedService<Self, F>
1237 where
1238 F: tonic::service::Interceptor,
1239 {
1240 InterceptedService::new(Self::new(inner), interceptor)
1241 }
1242 #[must_use]
1244 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1245 self.accept_compression_encodings.enable(encoding);
1246 self
1247 }
1248 #[must_use]
1250 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1251 self.send_compression_encodings.enable(encoding);
1252 self
1253 }
1254 #[must_use]
1258 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1259 self.max_decoding_message_size = Some(limit);
1260 self
1261 }
1262 #[must_use]
1266 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1267 self.max_encoding_message_size = Some(limit);
1268 self
1269 }
1270 }
1271 impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
1272 where
1273 T: Query,
1274 B: Body + std::marker::Send + 'static,
1275 B::Error: Into<StdError> + std::marker::Send + 'static,
1276 {
1277 type Response = http::Response<tonic::body::BoxBody>;
1278 type Error = std::convert::Infallible;
1279 type Future = BoxFuture<Self::Response, Self::Error>;
1280 fn poll_ready(
1281 &mut self,
1282 _cx: &mut Context<'_>,
1283 ) -> Poll<std::result::Result<(), Self::Error>> {
1284 Poll::Ready(Ok(()))
1285 }
1286 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1287 match req.uri().path() {
1288 "/cosmos.bank.v1beta1.Query/Balance" => {
1289 #[allow(non_camel_case_types)]
1290 struct BalanceSvc<T: Query>(pub Arc<T>);
1291 impl<
1292 T: Query,
1293 > tonic::server::UnaryService<super::QueryBalanceRequest>
1294 for BalanceSvc<T> {
1295 type Response = super::QueryBalanceResponse;
1296 type Future = BoxFuture<
1297 tonic::Response<Self::Response>,
1298 tonic::Status,
1299 >;
1300 fn call(
1301 &mut self,
1302 request: tonic::Request<super::QueryBalanceRequest>,
1303 ) -> Self::Future {
1304 let inner = Arc::clone(&self.0);
1305 let fut = async move {
1306 <T as Query>::balance(&inner, request).await
1307 };
1308 Box::pin(fut)
1309 }
1310 }
1311 let accept_compression_encodings = self.accept_compression_encodings;
1312 let send_compression_encodings = self.send_compression_encodings;
1313 let max_decoding_message_size = self.max_decoding_message_size;
1314 let max_encoding_message_size = self.max_encoding_message_size;
1315 let inner = self.inner.clone();
1316 let fut = async move {
1317 let method = BalanceSvc(inner);
1318 let codec = tonic::codec::ProstCodec::default();
1319 let mut grpc = tonic::server::Grpc::new(codec)
1320 .apply_compression_config(
1321 accept_compression_encodings,
1322 send_compression_encodings,
1323 )
1324 .apply_max_message_size_config(
1325 max_decoding_message_size,
1326 max_encoding_message_size,
1327 );
1328 let res = grpc.unary(method, req).await;
1329 Ok(res)
1330 };
1331 Box::pin(fut)
1332 }
1333 "/cosmos.bank.v1beta1.Query/AllBalances" => {
1334 #[allow(non_camel_case_types)]
1335 struct AllBalancesSvc<T: Query>(pub Arc<T>);
1336 impl<
1337 T: Query,
1338 > tonic::server::UnaryService<super::QueryAllBalancesRequest>
1339 for AllBalancesSvc<T> {
1340 type Response = super::QueryAllBalancesResponse;
1341 type Future = BoxFuture<
1342 tonic::Response<Self::Response>,
1343 tonic::Status,
1344 >;
1345 fn call(
1346 &mut self,
1347 request: tonic::Request<super::QueryAllBalancesRequest>,
1348 ) -> Self::Future {
1349 let inner = Arc::clone(&self.0);
1350 let fut = async move {
1351 <T as Query>::all_balances(&inner, request).await
1352 };
1353 Box::pin(fut)
1354 }
1355 }
1356 let accept_compression_encodings = self.accept_compression_encodings;
1357 let send_compression_encodings = self.send_compression_encodings;
1358 let max_decoding_message_size = self.max_decoding_message_size;
1359 let max_encoding_message_size = self.max_encoding_message_size;
1360 let inner = self.inner.clone();
1361 let fut = async move {
1362 let method = AllBalancesSvc(inner);
1363 let codec = tonic::codec::ProstCodec::default();
1364 let mut grpc = tonic::server::Grpc::new(codec)
1365 .apply_compression_config(
1366 accept_compression_encodings,
1367 send_compression_encodings,
1368 )
1369 .apply_max_message_size_config(
1370 max_decoding_message_size,
1371 max_encoding_message_size,
1372 );
1373 let res = grpc.unary(method, req).await;
1374 Ok(res)
1375 };
1376 Box::pin(fut)
1377 }
1378 "/cosmos.bank.v1beta1.Query/SpendableBalances" => {
1379 #[allow(non_camel_case_types)]
1380 struct SpendableBalancesSvc<T: Query>(pub Arc<T>);
1381 impl<
1382 T: Query,
1383 > tonic::server::UnaryService<super::QuerySpendableBalancesRequest>
1384 for SpendableBalancesSvc<T> {
1385 type Response = super::QuerySpendableBalancesResponse;
1386 type Future = BoxFuture<
1387 tonic::Response<Self::Response>,
1388 tonic::Status,
1389 >;
1390 fn call(
1391 &mut self,
1392 request: tonic::Request<super::QuerySpendableBalancesRequest>,
1393 ) -> Self::Future {
1394 let inner = Arc::clone(&self.0);
1395 let fut = async move {
1396 <T as Query>::spendable_balances(&inner, request).await
1397 };
1398 Box::pin(fut)
1399 }
1400 }
1401 let accept_compression_encodings = self.accept_compression_encodings;
1402 let send_compression_encodings = self.send_compression_encodings;
1403 let max_decoding_message_size = self.max_decoding_message_size;
1404 let max_encoding_message_size = self.max_encoding_message_size;
1405 let inner = self.inner.clone();
1406 let fut = async move {
1407 let method = SpendableBalancesSvc(inner);
1408 let codec = tonic::codec::ProstCodec::default();
1409 let mut grpc = tonic::server::Grpc::new(codec)
1410 .apply_compression_config(
1411 accept_compression_encodings,
1412 send_compression_encodings,
1413 )
1414 .apply_max_message_size_config(
1415 max_decoding_message_size,
1416 max_encoding_message_size,
1417 );
1418 let res = grpc.unary(method, req).await;
1419 Ok(res)
1420 };
1421 Box::pin(fut)
1422 }
1423 "/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom" => {
1424 #[allow(non_camel_case_types)]
1425 struct SpendableBalanceByDenomSvc<T: Query>(pub Arc<T>);
1426 impl<
1427 T: Query,
1428 > tonic::server::UnaryService<
1429 super::QuerySpendableBalanceByDenomRequest,
1430 > for SpendableBalanceByDenomSvc<T> {
1431 type Response = super::QuerySpendableBalanceByDenomResponse;
1432 type Future = BoxFuture<
1433 tonic::Response<Self::Response>,
1434 tonic::Status,
1435 >;
1436 fn call(
1437 &mut self,
1438 request: tonic::Request<
1439 super::QuerySpendableBalanceByDenomRequest,
1440 >,
1441 ) -> Self::Future {
1442 let inner = Arc::clone(&self.0);
1443 let fut = async move {
1444 <T as Query>::spendable_balance_by_denom(&inner, request)
1445 .await
1446 };
1447 Box::pin(fut)
1448 }
1449 }
1450 let accept_compression_encodings = self.accept_compression_encodings;
1451 let send_compression_encodings = self.send_compression_encodings;
1452 let max_decoding_message_size = self.max_decoding_message_size;
1453 let max_encoding_message_size = self.max_encoding_message_size;
1454 let inner = self.inner.clone();
1455 let fut = async move {
1456 let method = SpendableBalanceByDenomSvc(inner);
1457 let codec = tonic::codec::ProstCodec::default();
1458 let mut grpc = tonic::server::Grpc::new(codec)
1459 .apply_compression_config(
1460 accept_compression_encodings,
1461 send_compression_encodings,
1462 )
1463 .apply_max_message_size_config(
1464 max_decoding_message_size,
1465 max_encoding_message_size,
1466 );
1467 let res = grpc.unary(method, req).await;
1468 Ok(res)
1469 };
1470 Box::pin(fut)
1471 }
1472 "/cosmos.bank.v1beta1.Query/TotalSupply" => {
1473 #[allow(non_camel_case_types)]
1474 struct TotalSupplySvc<T: Query>(pub Arc<T>);
1475 impl<
1476 T: Query,
1477 > tonic::server::UnaryService<super::QueryTotalSupplyRequest>
1478 for TotalSupplySvc<T> {
1479 type Response = super::QueryTotalSupplyResponse;
1480 type Future = BoxFuture<
1481 tonic::Response<Self::Response>,
1482 tonic::Status,
1483 >;
1484 fn call(
1485 &mut self,
1486 request: tonic::Request<super::QueryTotalSupplyRequest>,
1487 ) -> Self::Future {
1488 let inner = Arc::clone(&self.0);
1489 let fut = async move {
1490 <T as Query>::total_supply(&inner, request).await
1491 };
1492 Box::pin(fut)
1493 }
1494 }
1495 let accept_compression_encodings = self.accept_compression_encodings;
1496 let send_compression_encodings = self.send_compression_encodings;
1497 let max_decoding_message_size = self.max_decoding_message_size;
1498 let max_encoding_message_size = self.max_encoding_message_size;
1499 let inner = self.inner.clone();
1500 let fut = async move {
1501 let method = TotalSupplySvc(inner);
1502 let codec = tonic::codec::ProstCodec::default();
1503 let mut grpc = tonic::server::Grpc::new(codec)
1504 .apply_compression_config(
1505 accept_compression_encodings,
1506 send_compression_encodings,
1507 )
1508 .apply_max_message_size_config(
1509 max_decoding_message_size,
1510 max_encoding_message_size,
1511 );
1512 let res = grpc.unary(method, req).await;
1513 Ok(res)
1514 };
1515 Box::pin(fut)
1516 }
1517 "/cosmos.bank.v1beta1.Query/SupplyOf" => {
1518 #[allow(non_camel_case_types)]
1519 struct SupplyOfSvc<T: Query>(pub Arc<T>);
1520 impl<
1521 T: Query,
1522 > tonic::server::UnaryService<super::QuerySupplyOfRequest>
1523 for SupplyOfSvc<T> {
1524 type Response = super::QuerySupplyOfResponse;
1525 type Future = BoxFuture<
1526 tonic::Response<Self::Response>,
1527 tonic::Status,
1528 >;
1529 fn call(
1530 &mut self,
1531 request: tonic::Request<super::QuerySupplyOfRequest>,
1532 ) -> Self::Future {
1533 let inner = Arc::clone(&self.0);
1534 let fut = async move {
1535 <T as Query>::supply_of(&inner, request).await
1536 };
1537 Box::pin(fut)
1538 }
1539 }
1540 let accept_compression_encodings = self.accept_compression_encodings;
1541 let send_compression_encodings = self.send_compression_encodings;
1542 let max_decoding_message_size = self.max_decoding_message_size;
1543 let max_encoding_message_size = self.max_encoding_message_size;
1544 let inner = self.inner.clone();
1545 let fut = async move {
1546 let method = SupplyOfSvc(inner);
1547 let codec = tonic::codec::ProstCodec::default();
1548 let mut grpc = tonic::server::Grpc::new(codec)
1549 .apply_compression_config(
1550 accept_compression_encodings,
1551 send_compression_encodings,
1552 )
1553 .apply_max_message_size_config(
1554 max_decoding_message_size,
1555 max_encoding_message_size,
1556 );
1557 let res = grpc.unary(method, req).await;
1558 Ok(res)
1559 };
1560 Box::pin(fut)
1561 }
1562 "/cosmos.bank.v1beta1.Query/Params" => {
1563 #[allow(non_camel_case_types)]
1564 struct ParamsSvc<T: Query>(pub Arc<T>);
1565 impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest>
1566 for ParamsSvc<T> {
1567 type Response = super::QueryParamsResponse;
1568 type Future = BoxFuture<
1569 tonic::Response<Self::Response>,
1570 tonic::Status,
1571 >;
1572 fn call(
1573 &mut self,
1574 request: tonic::Request<super::QueryParamsRequest>,
1575 ) -> Self::Future {
1576 let inner = Arc::clone(&self.0);
1577 let fut = async move {
1578 <T as Query>::params(&inner, request).await
1579 };
1580 Box::pin(fut)
1581 }
1582 }
1583 let accept_compression_encodings = self.accept_compression_encodings;
1584 let send_compression_encodings = self.send_compression_encodings;
1585 let max_decoding_message_size = self.max_decoding_message_size;
1586 let max_encoding_message_size = self.max_encoding_message_size;
1587 let inner = self.inner.clone();
1588 let fut = async move {
1589 let method = ParamsSvc(inner);
1590 let codec = tonic::codec::ProstCodec::default();
1591 let mut grpc = tonic::server::Grpc::new(codec)
1592 .apply_compression_config(
1593 accept_compression_encodings,
1594 send_compression_encodings,
1595 )
1596 .apply_max_message_size_config(
1597 max_decoding_message_size,
1598 max_encoding_message_size,
1599 );
1600 let res = grpc.unary(method, req).await;
1601 Ok(res)
1602 };
1603 Box::pin(fut)
1604 }
1605 "/cosmos.bank.v1beta1.Query/DenomMetadata" => {
1606 #[allow(non_camel_case_types)]
1607 struct DenomMetadataSvc<T: Query>(pub Arc<T>);
1608 impl<
1609 T: Query,
1610 > tonic::server::UnaryService<super::QueryDenomMetadataRequest>
1611 for DenomMetadataSvc<T> {
1612 type Response = super::QueryDenomMetadataResponse;
1613 type Future = BoxFuture<
1614 tonic::Response<Self::Response>,
1615 tonic::Status,
1616 >;
1617 fn call(
1618 &mut self,
1619 request: tonic::Request<super::QueryDenomMetadataRequest>,
1620 ) -> Self::Future {
1621 let inner = Arc::clone(&self.0);
1622 let fut = async move {
1623 <T as Query>::denom_metadata(&inner, request).await
1624 };
1625 Box::pin(fut)
1626 }
1627 }
1628 let accept_compression_encodings = self.accept_compression_encodings;
1629 let send_compression_encodings = self.send_compression_encodings;
1630 let max_decoding_message_size = self.max_decoding_message_size;
1631 let max_encoding_message_size = self.max_encoding_message_size;
1632 let inner = self.inner.clone();
1633 let fut = async move {
1634 let method = DenomMetadataSvc(inner);
1635 let codec = tonic::codec::ProstCodec::default();
1636 let mut grpc = tonic::server::Grpc::new(codec)
1637 .apply_compression_config(
1638 accept_compression_encodings,
1639 send_compression_encodings,
1640 )
1641 .apply_max_message_size_config(
1642 max_decoding_message_size,
1643 max_encoding_message_size,
1644 );
1645 let res = grpc.unary(method, req).await;
1646 Ok(res)
1647 };
1648 Box::pin(fut)
1649 }
1650 "/cosmos.bank.v1beta1.Query/DenomsMetadata" => {
1651 #[allow(non_camel_case_types)]
1652 struct DenomsMetadataSvc<T: Query>(pub Arc<T>);
1653 impl<
1654 T: Query,
1655 > tonic::server::UnaryService<super::QueryDenomsMetadataRequest>
1656 for DenomsMetadataSvc<T> {
1657 type Response = super::QueryDenomsMetadataResponse;
1658 type Future = BoxFuture<
1659 tonic::Response<Self::Response>,
1660 tonic::Status,
1661 >;
1662 fn call(
1663 &mut self,
1664 request: tonic::Request<super::QueryDenomsMetadataRequest>,
1665 ) -> Self::Future {
1666 let inner = Arc::clone(&self.0);
1667 let fut = async move {
1668 <T as Query>::denoms_metadata(&inner, request).await
1669 };
1670 Box::pin(fut)
1671 }
1672 }
1673 let accept_compression_encodings = self.accept_compression_encodings;
1674 let send_compression_encodings = self.send_compression_encodings;
1675 let max_decoding_message_size = self.max_decoding_message_size;
1676 let max_encoding_message_size = self.max_encoding_message_size;
1677 let inner = self.inner.clone();
1678 let fut = async move {
1679 let method = DenomsMetadataSvc(inner);
1680 let codec = tonic::codec::ProstCodec::default();
1681 let mut grpc = tonic::server::Grpc::new(codec)
1682 .apply_compression_config(
1683 accept_compression_encodings,
1684 send_compression_encodings,
1685 )
1686 .apply_max_message_size_config(
1687 max_decoding_message_size,
1688 max_encoding_message_size,
1689 );
1690 let res = grpc.unary(method, req).await;
1691 Ok(res)
1692 };
1693 Box::pin(fut)
1694 }
1695 "/cosmos.bank.v1beta1.Query/DenomOwners" => {
1696 #[allow(non_camel_case_types)]
1697 struct DenomOwnersSvc<T: Query>(pub Arc<T>);
1698 impl<
1699 T: Query,
1700 > tonic::server::UnaryService<super::QueryDenomOwnersRequest>
1701 for DenomOwnersSvc<T> {
1702 type Response = super::QueryDenomOwnersResponse;
1703 type Future = BoxFuture<
1704 tonic::Response<Self::Response>,
1705 tonic::Status,
1706 >;
1707 fn call(
1708 &mut self,
1709 request: tonic::Request<super::QueryDenomOwnersRequest>,
1710 ) -> Self::Future {
1711 let inner = Arc::clone(&self.0);
1712 let fut = async move {
1713 <T as Query>::denom_owners(&inner, request).await
1714 };
1715 Box::pin(fut)
1716 }
1717 }
1718 let accept_compression_encodings = self.accept_compression_encodings;
1719 let send_compression_encodings = self.send_compression_encodings;
1720 let max_decoding_message_size = self.max_decoding_message_size;
1721 let max_encoding_message_size = self.max_encoding_message_size;
1722 let inner = self.inner.clone();
1723 let fut = async move {
1724 let method = DenomOwnersSvc(inner);
1725 let codec = tonic::codec::ProstCodec::default();
1726 let mut grpc = tonic::server::Grpc::new(codec)
1727 .apply_compression_config(
1728 accept_compression_encodings,
1729 send_compression_encodings,
1730 )
1731 .apply_max_message_size_config(
1732 max_decoding_message_size,
1733 max_encoding_message_size,
1734 );
1735 let res = grpc.unary(method, req).await;
1736 Ok(res)
1737 };
1738 Box::pin(fut)
1739 }
1740 "/cosmos.bank.v1beta1.Query/SendEnabled" => {
1741 #[allow(non_camel_case_types)]
1742 struct SendEnabledSvc<T: Query>(pub Arc<T>);
1743 impl<
1744 T: Query,
1745 > tonic::server::UnaryService<super::QuerySendEnabledRequest>
1746 for SendEnabledSvc<T> {
1747 type Response = super::QuerySendEnabledResponse;
1748 type Future = BoxFuture<
1749 tonic::Response<Self::Response>,
1750 tonic::Status,
1751 >;
1752 fn call(
1753 &mut self,
1754 request: tonic::Request<super::QuerySendEnabledRequest>,
1755 ) -> Self::Future {
1756 let inner = Arc::clone(&self.0);
1757 let fut = async move {
1758 <T as Query>::send_enabled(&inner, request).await
1759 };
1760 Box::pin(fut)
1761 }
1762 }
1763 let accept_compression_encodings = self.accept_compression_encodings;
1764 let send_compression_encodings = self.send_compression_encodings;
1765 let max_decoding_message_size = self.max_decoding_message_size;
1766 let max_encoding_message_size = self.max_encoding_message_size;
1767 let inner = self.inner.clone();
1768 let fut = async move {
1769 let method = SendEnabledSvc(inner);
1770 let codec = tonic::codec::ProstCodec::default();
1771 let mut grpc = tonic::server::Grpc::new(codec)
1772 .apply_compression_config(
1773 accept_compression_encodings,
1774 send_compression_encodings,
1775 )
1776 .apply_max_message_size_config(
1777 max_decoding_message_size,
1778 max_encoding_message_size,
1779 );
1780 let res = grpc.unary(method, req).await;
1781 Ok(res)
1782 };
1783 Box::pin(fut)
1784 }
1785 _ => {
1786 Box::pin(async move {
1787 let mut response = http::Response::new(empty_body());
1788 let headers = response.headers_mut();
1789 headers
1790 .insert(
1791 tonic::Status::GRPC_STATUS,
1792 (tonic::Code::Unimplemented as i32).into(),
1793 );
1794 headers
1795 .insert(
1796 http::header::CONTENT_TYPE,
1797 tonic::metadata::GRPC_CONTENT_TYPE,
1798 );
1799 Ok(response)
1800 })
1801 }
1802 }
1803 }
1804 }
1805 impl<T> Clone for QueryServer<T> {
1806 fn clone(&self) -> Self {
1807 let inner = self.inner.clone();
1808 Self {
1809 inner,
1810 accept_compression_encodings: self.accept_compression_encodings,
1811 send_compression_encodings: self.send_compression_encodings,
1812 max_decoding_message_size: self.max_decoding_message_size,
1813 max_encoding_message_size: self.max_encoding_message_size,
1814 }
1815 }
1816 }
1817 pub const SERVICE_NAME: &str = "cosmos.bank.v1beta1.Query";
1819 impl<T> tonic::server::NamedService for QueryServer<T> {
1820 const NAME: &'static str = SERVICE_NAME;
1821 }
1822}