1#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct StakeAuthorization {
7 #[prost(message, optional, tag = "1")]
10 pub max_tokens: ::core::option::Option<super::super::base::v1beta1::Coin>,
11 #[prost(enumeration = "AuthorizationType", tag = "4")]
13 pub authorization_type: i32,
14 #[prost(oneof = "stake_authorization::ValidatorsEnum", tags = "2, 3")]
16 pub validators: ::core::option::Option<stake_authorization::ValidatorsEnum>,
17}
18pub mod stake_authorization {
20 #[derive(Clone, PartialEq, ::prost::Message)]
22 pub struct Validators {
23 #[prost(string, repeated, tag = "1")]
24 pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
25 }
26 #[derive(Clone, PartialEq, ::prost::Oneof)]
28 pub enum ValidatorsEnum {
29 #[prost(message, tag = "2")]
32 AllowList(Validators),
33 #[prost(message, tag = "3")]
35 DenyList(Validators),
36 }
37}
38#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
42#[repr(i32)]
43pub enum AuthorizationType {
44 Unspecified = 0,
46 Delegate = 1,
48 Undelegate = 2,
50 Redelegate = 3,
52 CancelUnbondingDelegation = 4,
54}
55impl AuthorizationType {
56 pub fn as_str_name(&self) -> &'static str {
61 match self {
62 Self::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED",
63 Self::Delegate => "AUTHORIZATION_TYPE_DELEGATE",
64 Self::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE",
65 Self::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE",
66 Self::CancelUnbondingDelegation => {
67 "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION"
68 }
69 }
70 }
71 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
73 match value {
74 "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
75 "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate),
76 "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate),
77 "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate),
78 "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => {
79 Some(Self::CancelUnbondingDelegation)
80 }
81 _ => None,
82 }
83 }
84}
85#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct HistoricalInfo {
91 #[prost(message, optional, tag = "1")]
92 pub header: ::core::option::Option<crate::tendermint::types::Header>,
93 #[prost(message, repeated, tag = "2")]
94 pub valset: ::prost::alloc::vec::Vec<Validator>,
95}
96#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct CommissionRates {
100 #[prost(string, tag = "1")]
102 pub rate: ::prost::alloc::string::String,
103 #[prost(string, tag = "2")]
105 pub max_rate: ::prost::alloc::string::String,
106 #[prost(string, tag = "3")]
108 pub max_change_rate: ::prost::alloc::string::String,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct Commission {
113 #[prost(message, optional, tag = "1")]
115 pub commission_rates: ::core::option::Option<CommissionRates>,
116 #[prost(message, optional, tag = "2")]
118 pub update_time: ::core::option::Option<::prost_types::Timestamp>,
119}
120#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct Description {
123 #[prost(string, tag = "1")]
125 pub moniker: ::prost::alloc::string::String,
126 #[prost(string, tag = "2")]
128 pub identity: ::prost::alloc::string::String,
129 #[prost(string, tag = "3")]
131 pub website: ::prost::alloc::string::String,
132 #[prost(string, tag = "4")]
134 pub security_contact: ::prost::alloc::string::String,
135 #[prost(string, tag = "5")]
137 pub details: ::prost::alloc::string::String,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct Validator {
149 #[prost(string, tag = "1")]
151 pub operator_address: ::prost::alloc::string::String,
152 #[prost(message, optional, tag = "2")]
154 pub consensus_pubkey: ::core::option::Option<::prost_types::Any>,
155 #[prost(bool, tag = "3")]
157 pub jailed: bool,
158 #[prost(enumeration = "BondStatus", tag = "4")]
160 pub status: i32,
161 #[prost(string, tag = "5")]
163 pub tokens: ::prost::alloc::string::String,
164 #[prost(string, tag = "6")]
166 pub delegator_shares: ::prost::alloc::string::String,
167 #[prost(message, optional, tag = "7")]
169 pub description: ::core::option::Option<Description>,
170 #[prost(int64, tag = "8")]
172 pub unbonding_height: i64,
173 #[prost(message, optional, tag = "9")]
175 pub unbonding_time: ::core::option::Option<::prost_types::Timestamp>,
176 #[prost(message, optional, tag = "10")]
178 pub commission: ::core::option::Option<Commission>,
179 #[prost(string, tag = "11")]
183 pub min_self_delegation: ::prost::alloc::string::String,
184 #[prost(int64, tag = "12")]
186 pub unbonding_on_hold_ref_count: i64,
187 #[prost(uint64, repeated, tag = "13")]
189 pub unbonding_ids: ::prost::alloc::vec::Vec<u64>,
190}
191#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct ValAddresses {
194 #[prost(string, repeated, tag = "1")]
195 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
196}
197#[derive(Clone, PartialEq, ::prost::Message)]
201pub struct DvPair {
202 #[prost(string, tag = "1")]
203 pub delegator_address: ::prost::alloc::string::String,
204 #[prost(string, tag = "2")]
205 pub validator_address: ::prost::alloc::string::String,
206}
207#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct DvPairs {
210 #[prost(message, repeated, tag = "1")]
211 pub pairs: ::prost::alloc::vec::Vec<DvPair>,
212}
213#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct DvvTriplet {
219 #[prost(string, tag = "1")]
220 pub delegator_address: ::prost::alloc::string::String,
221 #[prost(string, tag = "2")]
222 pub validator_src_address: ::prost::alloc::string::String,
223 #[prost(string, tag = "3")]
224 pub validator_dst_address: ::prost::alloc::string::String,
225}
226#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct DvvTriplets {
229 #[prost(message, repeated, tag = "1")]
230 pub triplets: ::prost::alloc::vec::Vec<DvvTriplet>,
231}
232#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct Delegation {
237 #[prost(string, tag = "1")]
239 pub delegator_address: ::prost::alloc::string::String,
240 #[prost(string, tag = "2")]
242 pub validator_address: ::prost::alloc::string::String,
243 #[prost(string, tag = "3")]
245 pub shares: ::prost::alloc::string::String,
246}
247#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct UnbondingDelegation {
251 #[prost(string, tag = "1")]
253 pub delegator_address: ::prost::alloc::string::String,
254 #[prost(string, tag = "2")]
256 pub validator_address: ::prost::alloc::string::String,
257 #[prost(message, repeated, tag = "3")]
261 pub entries: ::prost::alloc::vec::Vec<UnbondingDelegationEntry>,
262}
263#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct UnbondingDelegationEntry {
266 #[prost(int64, tag = "1")]
268 pub creation_height: i64,
269 #[prost(message, optional, tag = "2")]
271 pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
272 #[prost(string, tag = "3")]
274 pub initial_balance: ::prost::alloc::string::String,
275 #[prost(string, tag = "4")]
277 pub balance: ::prost::alloc::string::String,
278 #[prost(uint64, tag = "5")]
280 pub unbonding_id: u64,
281 #[prost(int64, tag = "6")]
283 pub unbonding_on_hold_ref_count: i64,
284}
285#[derive(Clone, PartialEq, ::prost::Message)]
287pub struct RedelegationEntry {
288 #[prost(int64, tag = "1")]
290 pub creation_height: i64,
291 #[prost(message, optional, tag = "2")]
293 pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
294 #[prost(string, tag = "3")]
296 pub initial_balance: ::prost::alloc::string::String,
297 #[prost(string, tag = "4")]
299 pub shares_dst: ::prost::alloc::string::String,
300 #[prost(uint64, tag = "5")]
302 pub unbonding_id: u64,
303 #[prost(int64, tag = "6")]
305 pub unbonding_on_hold_ref_count: i64,
306}
307#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct Redelegation {
311 #[prost(string, tag = "1")]
313 pub delegator_address: ::prost::alloc::string::String,
314 #[prost(string, tag = "2")]
316 pub validator_src_address: ::prost::alloc::string::String,
317 #[prost(string, tag = "3")]
319 pub validator_dst_address: ::prost::alloc::string::String,
320 #[prost(message, repeated, tag = "4")]
324 pub entries: ::prost::alloc::vec::Vec<RedelegationEntry>,
325}
326#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct Params {
329 #[prost(message, optional, tag = "1")]
331 pub unbonding_time: ::core::option::Option<::prost_types::Duration>,
332 #[prost(uint32, tag = "2")]
334 pub max_validators: u32,
335 #[prost(uint32, tag = "3")]
337 pub max_entries: u32,
338 #[prost(uint32, tag = "4")]
340 pub historical_entries: u32,
341 #[prost(string, tag = "5")]
343 pub bond_denom: ::prost::alloc::string::String,
344 #[prost(string, tag = "6")]
346 pub min_commission_rate: ::prost::alloc::string::String,
347}
348#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct DelegationResponse {
352 #[prost(message, optional, tag = "1")]
353 pub delegation: ::core::option::Option<Delegation>,
354 #[prost(message, optional, tag = "2")]
355 pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
356}
357#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct RedelegationEntryResponse {
362 #[prost(message, optional, tag = "1")]
363 pub redelegation_entry: ::core::option::Option<RedelegationEntry>,
364 #[prost(string, tag = "4")]
365 pub balance: ::prost::alloc::string::String,
366}
367#[derive(Clone, PartialEq, ::prost::Message)]
371pub struct RedelegationResponse {
372 #[prost(message, optional, tag = "1")]
373 pub redelegation: ::core::option::Option<Redelegation>,
374 #[prost(message, repeated, tag = "2")]
375 pub entries: ::prost::alloc::vec::Vec<RedelegationEntryResponse>,
376}
377#[derive(Clone, PartialEq, ::prost::Message)]
380pub struct Pool {
381 #[prost(string, tag = "1")]
382 pub not_bonded_tokens: ::prost::alloc::string::String,
383 #[prost(string, tag = "2")]
384 pub bonded_tokens: ::prost::alloc::string::String,
385}
386#[derive(Clone, PartialEq, ::prost::Message)]
389pub struct ValidatorUpdates {
390 #[prost(message, repeated, tag = "1")]
391 pub updates: ::prost::alloc::vec::Vec<
392 crate::tendermint::abci::ValidatorUpdate,
393 >,
394}
395#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
397#[repr(i32)]
398pub enum BondStatus {
399 Unspecified = 0,
401 Unbonded = 1,
403 Unbonding = 2,
405 Bonded = 3,
407}
408impl BondStatus {
409 pub fn as_str_name(&self) -> &'static str {
414 match self {
415 Self::Unspecified => "BOND_STATUS_UNSPECIFIED",
416 Self::Unbonded => "BOND_STATUS_UNBONDED",
417 Self::Unbonding => "BOND_STATUS_UNBONDING",
418 Self::Bonded => "BOND_STATUS_BONDED",
419 }
420 }
421 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
423 match value {
424 "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
425 "BOND_STATUS_UNBONDED" => Some(Self::Unbonded),
426 "BOND_STATUS_UNBONDING" => Some(Self::Unbonding),
427 "BOND_STATUS_BONDED" => Some(Self::Bonded),
428 _ => None,
429 }
430 }
431}
432#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
434#[repr(i32)]
435pub enum Infraction {
436 Unspecified = 0,
438 DoubleSign = 1,
440 Downtime = 2,
442}
443impl Infraction {
444 pub fn as_str_name(&self) -> &'static str {
449 match self {
450 Self::Unspecified => "INFRACTION_UNSPECIFIED",
451 Self::DoubleSign => "INFRACTION_DOUBLE_SIGN",
452 Self::Downtime => "INFRACTION_DOWNTIME",
453 }
454 }
455 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
457 match value {
458 "INFRACTION_UNSPECIFIED" => Some(Self::Unspecified),
459 "INFRACTION_DOUBLE_SIGN" => Some(Self::DoubleSign),
460 "INFRACTION_DOWNTIME" => Some(Self::Downtime),
461 _ => None,
462 }
463 }
464}
465#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct GenesisState {
468 #[prost(message, optional, tag = "1")]
470 pub params: ::core::option::Option<Params>,
471 #[prost(bytes = "vec", tag = "2")]
474 pub last_total_power: ::prost::alloc::vec::Vec<u8>,
475 #[prost(message, repeated, tag = "3")]
478 pub last_validator_powers: ::prost::alloc::vec::Vec<LastValidatorPower>,
479 #[prost(message, repeated, tag = "4")]
481 pub validators: ::prost::alloc::vec::Vec<Validator>,
482 #[prost(message, repeated, tag = "5")]
484 pub delegations: ::prost::alloc::vec::Vec<Delegation>,
485 #[prost(message, repeated, tag = "6")]
487 pub unbonding_delegations: ::prost::alloc::vec::Vec<UnbondingDelegation>,
488 #[prost(message, repeated, tag = "7")]
490 pub redelegations: ::prost::alloc::vec::Vec<Redelegation>,
491 #[prost(bool, tag = "8")]
493 pub exported: bool,
494}
495#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct LastValidatorPower {
498 #[prost(string, tag = "1")]
500 pub address: ::prost::alloc::string::String,
501 #[prost(int64, tag = "2")]
503 pub power: i64,
504}
505#[derive(Clone, PartialEq, ::prost::Message)]
507pub struct QueryValidatorsRequest {
508 #[prost(string, tag = "1")]
510 pub status: ::prost::alloc::string::String,
511 #[prost(message, optional, tag = "2")]
513 pub pagination: ::core::option::Option<
514 super::super::base::query::v1beta1::PageRequest,
515 >,
516}
517#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct QueryValidatorsResponse {
520 #[prost(message, repeated, tag = "1")]
522 pub validators: ::prost::alloc::vec::Vec<Validator>,
523 #[prost(message, optional, tag = "2")]
525 pub pagination: ::core::option::Option<
526 super::super::base::query::v1beta1::PageResponse,
527 >,
528}
529#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct QueryValidatorRequest {
532 #[prost(string, tag = "1")]
534 pub validator_addr: ::prost::alloc::string::String,
535}
536#[derive(Clone, PartialEq, ::prost::Message)]
538pub struct QueryValidatorResponse {
539 #[prost(message, optional, tag = "1")]
541 pub validator: ::core::option::Option<Validator>,
542}
543#[derive(Clone, PartialEq, ::prost::Message)]
546pub struct QueryValidatorDelegationsRequest {
547 #[prost(string, tag = "1")]
549 pub validator_addr: ::prost::alloc::string::String,
550 #[prost(message, optional, tag = "2")]
552 pub pagination: ::core::option::Option<
553 super::super::base::query::v1beta1::PageRequest,
554 >,
555}
556#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct QueryValidatorDelegationsResponse {
560 #[prost(message, repeated, tag = "1")]
561 pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
562 #[prost(message, optional, tag = "2")]
564 pub pagination: ::core::option::Option<
565 super::super::base::query::v1beta1::PageResponse,
566 >,
567}
568#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct QueryValidatorUnbondingDelegationsRequest {
572 #[prost(string, tag = "1")]
574 pub validator_addr: ::prost::alloc::string::String,
575 #[prost(message, optional, tag = "2")]
577 pub pagination: ::core::option::Option<
578 super::super::base::query::v1beta1::PageRequest,
579 >,
580}
581#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct QueryValidatorUnbondingDelegationsResponse {
585 #[prost(message, repeated, tag = "1")]
586 pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
587 #[prost(message, optional, tag = "2")]
589 pub pagination: ::core::option::Option<
590 super::super::base::query::v1beta1::PageResponse,
591 >,
592}
593#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct QueryDelegationRequest {
596 #[prost(string, tag = "1")]
598 pub delegator_addr: ::prost::alloc::string::String,
599 #[prost(string, tag = "2")]
601 pub validator_addr: ::prost::alloc::string::String,
602}
603#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct QueryDelegationResponse {
606 #[prost(message, optional, tag = "1")]
608 pub delegation_response: ::core::option::Option<DelegationResponse>,
609}
610#[derive(Clone, PartialEq, ::prost::Message)]
613pub struct QueryUnbondingDelegationRequest {
614 #[prost(string, tag = "1")]
616 pub delegator_addr: ::prost::alloc::string::String,
617 #[prost(string, tag = "2")]
619 pub validator_addr: ::prost::alloc::string::String,
620}
621#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct QueryUnbondingDelegationResponse {
625 #[prost(message, optional, tag = "1")]
627 pub unbond: ::core::option::Option<UnbondingDelegation>,
628}
629#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct QueryDelegatorDelegationsRequest {
633 #[prost(string, tag = "1")]
635 pub delegator_addr: ::prost::alloc::string::String,
636 #[prost(message, optional, tag = "2")]
638 pub pagination: ::core::option::Option<
639 super::super::base::query::v1beta1::PageRequest,
640 >,
641}
642#[derive(Clone, PartialEq, ::prost::Message)]
645pub struct QueryDelegatorDelegationsResponse {
646 #[prost(message, repeated, tag = "1")]
648 pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
649 #[prost(message, optional, tag = "2")]
651 pub pagination: ::core::option::Option<
652 super::super::base::query::v1beta1::PageResponse,
653 >,
654}
655#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct QueryDelegatorUnbondingDelegationsRequest {
659 #[prost(string, tag = "1")]
661 pub delegator_addr: ::prost::alloc::string::String,
662 #[prost(message, optional, tag = "2")]
664 pub pagination: ::core::option::Option<
665 super::super::base::query::v1beta1::PageRequest,
666 >,
667}
668#[derive(Clone, PartialEq, ::prost::Message)]
671pub struct QueryDelegatorUnbondingDelegationsResponse {
672 #[prost(message, repeated, tag = "1")]
673 pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
674 #[prost(message, optional, tag = "2")]
676 pub pagination: ::core::option::Option<
677 super::super::base::query::v1beta1::PageResponse,
678 >,
679}
680#[derive(Clone, PartialEq, ::prost::Message)]
683pub struct QueryRedelegationsRequest {
684 #[prost(string, tag = "1")]
686 pub delegator_addr: ::prost::alloc::string::String,
687 #[prost(string, tag = "2")]
689 pub src_validator_addr: ::prost::alloc::string::String,
690 #[prost(string, tag = "3")]
692 pub dst_validator_addr: ::prost::alloc::string::String,
693 #[prost(message, optional, tag = "4")]
695 pub pagination: ::core::option::Option<
696 super::super::base::query::v1beta1::PageRequest,
697 >,
698}
699#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct QueryRedelegationsResponse {
703 #[prost(message, repeated, tag = "1")]
704 pub redelegation_responses: ::prost::alloc::vec::Vec<RedelegationResponse>,
705 #[prost(message, optional, tag = "2")]
707 pub pagination: ::core::option::Option<
708 super::super::base::query::v1beta1::PageResponse,
709 >,
710}
711#[derive(Clone, PartialEq, ::prost::Message)]
714pub struct QueryDelegatorValidatorsRequest {
715 #[prost(string, tag = "1")]
717 pub delegator_addr: ::prost::alloc::string::String,
718 #[prost(message, optional, tag = "2")]
720 pub pagination: ::core::option::Option<
721 super::super::base::query::v1beta1::PageRequest,
722 >,
723}
724#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct QueryDelegatorValidatorsResponse {
728 #[prost(message, repeated, tag = "1")]
730 pub validators: ::prost::alloc::vec::Vec<Validator>,
731 #[prost(message, optional, tag = "2")]
733 pub pagination: ::core::option::Option<
734 super::super::base::query::v1beta1::PageResponse,
735 >,
736}
737#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct QueryDelegatorValidatorRequest {
741 #[prost(string, tag = "1")]
743 pub delegator_addr: ::prost::alloc::string::String,
744 #[prost(string, tag = "2")]
746 pub validator_addr: ::prost::alloc::string::String,
747}
748#[derive(Clone, PartialEq, ::prost::Message)]
751pub struct QueryDelegatorValidatorResponse {
752 #[prost(message, optional, tag = "1")]
754 pub validator: ::core::option::Option<Validator>,
755}
756#[derive(Clone, Copy, PartialEq, ::prost::Message)]
759pub struct QueryHistoricalInfoRequest {
760 #[prost(int64, tag = "1")]
762 pub height: i64,
763}
764#[derive(Clone, PartialEq, ::prost::Message)]
767pub struct QueryHistoricalInfoResponse {
768 #[prost(message, optional, tag = "1")]
770 pub hist: ::core::option::Option<HistoricalInfo>,
771}
772#[derive(Clone, Copy, PartialEq, ::prost::Message)]
774pub struct QueryPoolRequest {}
775#[derive(Clone, PartialEq, ::prost::Message)]
777pub struct QueryPoolResponse {
778 #[prost(message, optional, tag = "1")]
780 pub pool: ::core::option::Option<Pool>,
781}
782#[derive(Clone, Copy, PartialEq, ::prost::Message)]
784pub struct QueryParamsRequest {}
785#[derive(Clone, PartialEq, ::prost::Message)]
787pub struct QueryParamsResponse {
788 #[prost(message, optional, tag = "1")]
790 pub params: ::core::option::Option<Params>,
791}
792pub mod query_client {
794 #![allow(
795 unused_variables,
796 dead_code,
797 missing_docs,
798 clippy::wildcard_imports,
799 clippy::let_unit_value,
800 )]
801 use tonic::codegen::*;
802 use tonic::codegen::http::Uri;
803 #[derive(Debug, Clone)]
805 pub struct QueryClient<T> {
806 inner: tonic::client::Grpc<T>,
807 }
808 impl QueryClient<tonic::transport::Channel> {
809 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
811 where
812 D: TryInto<tonic::transport::Endpoint>,
813 D::Error: Into<StdError>,
814 {
815 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
816 Ok(Self::new(conn))
817 }
818 }
819 impl<T> QueryClient<T>
820 where
821 T: tonic::client::GrpcService<tonic::body::BoxBody>,
822 T::Error: Into<StdError>,
823 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
824 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
825 {
826 pub fn new(inner: T) -> Self {
827 let inner = tonic::client::Grpc::new(inner);
828 Self { inner }
829 }
830 pub fn with_origin(inner: T, origin: Uri) -> Self {
831 let inner = tonic::client::Grpc::with_origin(inner, origin);
832 Self { inner }
833 }
834 pub fn with_interceptor<F>(
835 inner: T,
836 interceptor: F,
837 ) -> QueryClient<InterceptedService<T, F>>
838 where
839 F: tonic::service::Interceptor,
840 T::ResponseBody: Default,
841 T: tonic::codegen::Service<
842 http::Request<tonic::body::BoxBody>,
843 Response = http::Response<
844 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
845 >,
846 >,
847 <T as tonic::codegen::Service<
848 http::Request<tonic::body::BoxBody>,
849 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
850 {
851 QueryClient::new(InterceptedService::new(inner, interceptor))
852 }
853 #[must_use]
858 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
859 self.inner = self.inner.send_compressed(encoding);
860 self
861 }
862 #[must_use]
864 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
865 self.inner = self.inner.accept_compressed(encoding);
866 self
867 }
868 #[must_use]
872 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
873 self.inner = self.inner.max_decoding_message_size(limit);
874 self
875 }
876 #[must_use]
880 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
881 self.inner = self.inner.max_encoding_message_size(limit);
882 self
883 }
884 pub async fn validators(
889 &mut self,
890 request: impl tonic::IntoRequest<super::QueryValidatorsRequest>,
891 ) -> std::result::Result<
892 tonic::Response<super::QueryValidatorsResponse>,
893 tonic::Status,
894 > {
895 self.inner
896 .ready()
897 .await
898 .map_err(|e| {
899 tonic::Status::unknown(
900 format!("Service was not ready: {}", e.into()),
901 )
902 })?;
903 let codec = tonic::codec::ProstCodec::default();
904 let path = http::uri::PathAndQuery::from_static(
905 "/cosmos.staking.v1beta1.Query/Validators",
906 );
907 let mut req = request.into_request();
908 req.extensions_mut()
909 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validators"));
910 self.inner.unary(req, path, codec).await
911 }
912 pub async fn validator(
914 &mut self,
915 request: impl tonic::IntoRequest<super::QueryValidatorRequest>,
916 ) -> std::result::Result<
917 tonic::Response<super::QueryValidatorResponse>,
918 tonic::Status,
919 > {
920 self.inner
921 .ready()
922 .await
923 .map_err(|e| {
924 tonic::Status::unknown(
925 format!("Service was not ready: {}", e.into()),
926 )
927 })?;
928 let codec = tonic::codec::ProstCodec::default();
929 let path = http::uri::PathAndQuery::from_static(
930 "/cosmos.staking.v1beta1.Query/Validator",
931 );
932 let mut req = request.into_request();
933 req.extensions_mut()
934 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Validator"));
935 self.inner.unary(req, path, codec).await
936 }
937 pub async fn validator_delegations(
942 &mut self,
943 request: impl tonic::IntoRequest<super::QueryValidatorDelegationsRequest>,
944 ) -> std::result::Result<
945 tonic::Response<super::QueryValidatorDelegationsResponse>,
946 tonic::Status,
947 > {
948 self.inner
949 .ready()
950 .await
951 .map_err(|e| {
952 tonic::Status::unknown(
953 format!("Service was not ready: {}", e.into()),
954 )
955 })?;
956 let codec = tonic::codec::ProstCodec::default();
957 let path = http::uri::PathAndQuery::from_static(
958 "/cosmos.staking.v1beta1.Query/ValidatorDelegations",
959 );
960 let mut req = request.into_request();
961 req.extensions_mut()
962 .insert(
963 GrpcMethod::new(
964 "cosmos.staking.v1beta1.Query",
965 "ValidatorDelegations",
966 ),
967 );
968 self.inner.unary(req, path, codec).await
969 }
970 pub async fn validator_unbonding_delegations(
975 &mut self,
976 request: impl tonic::IntoRequest<
977 super::QueryValidatorUnbondingDelegationsRequest,
978 >,
979 ) -> std::result::Result<
980 tonic::Response<super::QueryValidatorUnbondingDelegationsResponse>,
981 tonic::Status,
982 > {
983 self.inner
984 .ready()
985 .await
986 .map_err(|e| {
987 tonic::Status::unknown(
988 format!("Service was not ready: {}", e.into()),
989 )
990 })?;
991 let codec = tonic::codec::ProstCodec::default();
992 let path = http::uri::PathAndQuery::from_static(
993 "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations",
994 );
995 let mut req = request.into_request();
996 req.extensions_mut()
997 .insert(
998 GrpcMethod::new(
999 "cosmos.staking.v1beta1.Query",
1000 "ValidatorUnbondingDelegations",
1001 ),
1002 );
1003 self.inner.unary(req, path, codec).await
1004 }
1005 pub async fn delegation(
1007 &mut self,
1008 request: impl tonic::IntoRequest<super::QueryDelegationRequest>,
1009 ) -> std::result::Result<
1010 tonic::Response<super::QueryDelegationResponse>,
1011 tonic::Status,
1012 > {
1013 self.inner
1014 .ready()
1015 .await
1016 .map_err(|e| {
1017 tonic::Status::unknown(
1018 format!("Service was not ready: {}", e.into()),
1019 )
1020 })?;
1021 let codec = tonic::codec::ProstCodec::default();
1022 let path = http::uri::PathAndQuery::from_static(
1023 "/cosmos.staking.v1beta1.Query/Delegation",
1024 );
1025 let mut req = request.into_request();
1026 req.extensions_mut()
1027 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Delegation"));
1028 self.inner.unary(req, path, codec).await
1029 }
1030 pub async fn unbonding_delegation(
1033 &mut self,
1034 request: impl tonic::IntoRequest<super::QueryUnbondingDelegationRequest>,
1035 ) -> std::result::Result<
1036 tonic::Response<super::QueryUnbondingDelegationResponse>,
1037 tonic::Status,
1038 > {
1039 self.inner
1040 .ready()
1041 .await
1042 .map_err(|e| {
1043 tonic::Status::unknown(
1044 format!("Service was not ready: {}", e.into()),
1045 )
1046 })?;
1047 let codec = tonic::codec::ProstCodec::default();
1048 let path = http::uri::PathAndQuery::from_static(
1049 "/cosmos.staking.v1beta1.Query/UnbondingDelegation",
1050 );
1051 let mut req = request.into_request();
1052 req.extensions_mut()
1053 .insert(
1054 GrpcMethod::new(
1055 "cosmos.staking.v1beta1.Query",
1056 "UnbondingDelegation",
1057 ),
1058 );
1059 self.inner.unary(req, path, codec).await
1060 }
1061 pub async fn delegator_delegations(
1066 &mut self,
1067 request: impl tonic::IntoRequest<super::QueryDelegatorDelegationsRequest>,
1068 ) -> std::result::Result<
1069 tonic::Response<super::QueryDelegatorDelegationsResponse>,
1070 tonic::Status,
1071 > {
1072 self.inner
1073 .ready()
1074 .await
1075 .map_err(|e| {
1076 tonic::Status::unknown(
1077 format!("Service was not ready: {}", e.into()),
1078 )
1079 })?;
1080 let codec = tonic::codec::ProstCodec::default();
1081 let path = http::uri::PathAndQuery::from_static(
1082 "/cosmos.staking.v1beta1.Query/DelegatorDelegations",
1083 );
1084 let mut req = request.into_request();
1085 req.extensions_mut()
1086 .insert(
1087 GrpcMethod::new(
1088 "cosmos.staking.v1beta1.Query",
1089 "DelegatorDelegations",
1090 ),
1091 );
1092 self.inner.unary(req, path, codec).await
1093 }
1094 pub async fn delegator_unbonding_delegations(
1100 &mut self,
1101 request: impl tonic::IntoRequest<
1102 super::QueryDelegatorUnbondingDelegationsRequest,
1103 >,
1104 ) -> std::result::Result<
1105 tonic::Response<super::QueryDelegatorUnbondingDelegationsResponse>,
1106 tonic::Status,
1107 > {
1108 self.inner
1109 .ready()
1110 .await
1111 .map_err(|e| {
1112 tonic::Status::unknown(
1113 format!("Service was not ready: {}", e.into()),
1114 )
1115 })?;
1116 let codec = tonic::codec::ProstCodec::default();
1117 let path = http::uri::PathAndQuery::from_static(
1118 "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations",
1119 );
1120 let mut req = request.into_request();
1121 req.extensions_mut()
1122 .insert(
1123 GrpcMethod::new(
1124 "cosmos.staking.v1beta1.Query",
1125 "DelegatorUnbondingDelegations",
1126 ),
1127 );
1128 self.inner.unary(req, path, codec).await
1129 }
1130 pub async fn redelegations(
1135 &mut self,
1136 request: impl tonic::IntoRequest<super::QueryRedelegationsRequest>,
1137 ) -> std::result::Result<
1138 tonic::Response<super::QueryRedelegationsResponse>,
1139 tonic::Status,
1140 > {
1141 self.inner
1142 .ready()
1143 .await
1144 .map_err(|e| {
1145 tonic::Status::unknown(
1146 format!("Service was not ready: {}", e.into()),
1147 )
1148 })?;
1149 let codec = tonic::codec::ProstCodec::default();
1150 let path = http::uri::PathAndQuery::from_static(
1151 "/cosmos.staking.v1beta1.Query/Redelegations",
1152 );
1153 let mut req = request.into_request();
1154 req.extensions_mut()
1155 .insert(
1156 GrpcMethod::new("cosmos.staking.v1beta1.Query", "Redelegations"),
1157 );
1158 self.inner.unary(req, path, codec).await
1159 }
1160 pub async fn delegator_validators(
1166 &mut self,
1167 request: impl tonic::IntoRequest<super::QueryDelegatorValidatorsRequest>,
1168 ) -> std::result::Result<
1169 tonic::Response<super::QueryDelegatorValidatorsResponse>,
1170 tonic::Status,
1171 > {
1172 self.inner
1173 .ready()
1174 .await
1175 .map_err(|e| {
1176 tonic::Status::unknown(
1177 format!("Service was not ready: {}", e.into()),
1178 )
1179 })?;
1180 let codec = tonic::codec::ProstCodec::default();
1181 let path = http::uri::PathAndQuery::from_static(
1182 "/cosmos.staking.v1beta1.Query/DelegatorValidators",
1183 );
1184 let mut req = request.into_request();
1185 req.extensions_mut()
1186 .insert(
1187 GrpcMethod::new(
1188 "cosmos.staking.v1beta1.Query",
1189 "DelegatorValidators",
1190 ),
1191 );
1192 self.inner.unary(req, path, codec).await
1193 }
1194 pub async fn delegator_validator(
1197 &mut self,
1198 request: impl tonic::IntoRequest<super::QueryDelegatorValidatorRequest>,
1199 ) -> std::result::Result<
1200 tonic::Response<super::QueryDelegatorValidatorResponse>,
1201 tonic::Status,
1202 > {
1203 self.inner
1204 .ready()
1205 .await
1206 .map_err(|e| {
1207 tonic::Status::unknown(
1208 format!("Service was not ready: {}", e.into()),
1209 )
1210 })?;
1211 let codec = tonic::codec::ProstCodec::default();
1212 let path = http::uri::PathAndQuery::from_static(
1213 "/cosmos.staking.v1beta1.Query/DelegatorValidator",
1214 );
1215 let mut req = request.into_request();
1216 req.extensions_mut()
1217 .insert(
1218 GrpcMethod::new("cosmos.staking.v1beta1.Query", "DelegatorValidator"),
1219 );
1220 self.inner.unary(req, path, codec).await
1221 }
1222 pub async fn historical_info(
1224 &mut self,
1225 request: impl tonic::IntoRequest<super::QueryHistoricalInfoRequest>,
1226 ) -> std::result::Result<
1227 tonic::Response<super::QueryHistoricalInfoResponse>,
1228 tonic::Status,
1229 > {
1230 self.inner
1231 .ready()
1232 .await
1233 .map_err(|e| {
1234 tonic::Status::unknown(
1235 format!("Service was not ready: {}", e.into()),
1236 )
1237 })?;
1238 let codec = tonic::codec::ProstCodec::default();
1239 let path = http::uri::PathAndQuery::from_static(
1240 "/cosmos.staking.v1beta1.Query/HistoricalInfo",
1241 );
1242 let mut req = request.into_request();
1243 req.extensions_mut()
1244 .insert(
1245 GrpcMethod::new("cosmos.staking.v1beta1.Query", "HistoricalInfo"),
1246 );
1247 self.inner.unary(req, path, codec).await
1248 }
1249 pub async fn pool(
1251 &mut self,
1252 request: impl tonic::IntoRequest<super::QueryPoolRequest>,
1253 ) -> std::result::Result<
1254 tonic::Response<super::QueryPoolResponse>,
1255 tonic::Status,
1256 > {
1257 self.inner
1258 .ready()
1259 .await
1260 .map_err(|e| {
1261 tonic::Status::unknown(
1262 format!("Service was not ready: {}", e.into()),
1263 )
1264 })?;
1265 let codec = tonic::codec::ProstCodec::default();
1266 let path = http::uri::PathAndQuery::from_static(
1267 "/cosmos.staking.v1beta1.Query/Pool",
1268 );
1269 let mut req = request.into_request();
1270 req.extensions_mut()
1271 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Pool"));
1272 self.inner.unary(req, path, codec).await
1273 }
1274 pub async fn params(
1276 &mut self,
1277 request: impl tonic::IntoRequest<super::QueryParamsRequest>,
1278 ) -> std::result::Result<
1279 tonic::Response<super::QueryParamsResponse>,
1280 tonic::Status,
1281 > {
1282 self.inner
1283 .ready()
1284 .await
1285 .map_err(|e| {
1286 tonic::Status::unknown(
1287 format!("Service was not ready: {}", e.into()),
1288 )
1289 })?;
1290 let codec = tonic::codec::ProstCodec::default();
1291 let path = http::uri::PathAndQuery::from_static(
1292 "/cosmos.staking.v1beta1.Query/Params",
1293 );
1294 let mut req = request.into_request();
1295 req.extensions_mut()
1296 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Query", "Params"));
1297 self.inner.unary(req, path, codec).await
1298 }
1299 }
1300}
1301#[derive(Clone, PartialEq, ::prost::Message)]
1303pub struct MsgCreateValidator {
1304 #[prost(message, optional, tag = "1")]
1305 pub description: ::core::option::Option<Description>,
1306 #[prost(message, optional, tag = "2")]
1307 pub commission: ::core::option::Option<CommissionRates>,
1308 #[prost(string, tag = "3")]
1309 pub min_self_delegation: ::prost::alloc::string::String,
1310 #[deprecated]
1314 #[prost(string, tag = "4")]
1315 pub delegator_address: ::prost::alloc::string::String,
1316 #[prost(string, tag = "5")]
1317 pub validator_address: ::prost::alloc::string::String,
1318 #[prost(message, optional, tag = "6")]
1319 pub pubkey: ::core::option::Option<::prost_types::Any>,
1320 #[prost(message, optional, tag = "7")]
1321 pub value: ::core::option::Option<super::super::base::v1beta1::Coin>,
1322}
1323#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1325pub struct MsgCreateValidatorResponse {}
1326#[derive(Clone, PartialEq, ::prost::Message)]
1328pub struct MsgEditValidator {
1329 #[prost(message, optional, tag = "1")]
1330 pub description: ::core::option::Option<Description>,
1331 #[prost(string, tag = "2")]
1332 pub validator_address: ::prost::alloc::string::String,
1333 #[prost(string, tag = "3")]
1338 pub commission_rate: ::prost::alloc::string::String,
1339 #[prost(string, tag = "4")]
1340 pub min_self_delegation: ::prost::alloc::string::String,
1341}
1342#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1344pub struct MsgEditValidatorResponse {}
1345#[derive(Clone, PartialEq, ::prost::Message)]
1348pub struct MsgDelegate {
1349 #[prost(string, tag = "1")]
1350 pub delegator_address: ::prost::alloc::string::String,
1351 #[prost(string, tag = "2")]
1352 pub validator_address: ::prost::alloc::string::String,
1353 #[prost(message, optional, tag = "3")]
1354 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1355}
1356#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1358pub struct MsgDelegateResponse {}
1359#[derive(Clone, PartialEq, ::prost::Message)]
1362pub struct MsgBeginRedelegate {
1363 #[prost(string, tag = "1")]
1364 pub delegator_address: ::prost::alloc::string::String,
1365 #[prost(string, tag = "2")]
1366 pub validator_src_address: ::prost::alloc::string::String,
1367 #[prost(string, tag = "3")]
1368 pub validator_dst_address: ::prost::alloc::string::String,
1369 #[prost(message, optional, tag = "4")]
1370 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1371}
1372#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1374pub struct MsgBeginRedelegateResponse {
1375 #[prost(message, optional, tag = "1")]
1376 pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
1377}
1378#[derive(Clone, PartialEq, ::prost::Message)]
1381pub struct MsgUndelegate {
1382 #[prost(string, tag = "1")]
1383 pub delegator_address: ::prost::alloc::string::String,
1384 #[prost(string, tag = "2")]
1385 pub validator_address: ::prost::alloc::string::String,
1386 #[prost(message, optional, tag = "3")]
1387 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1388}
1389#[derive(Clone, PartialEq, ::prost::Message)]
1391pub struct MsgUndelegateResponse {
1392 #[prost(message, optional, tag = "1")]
1393 pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
1394 #[prost(message, optional, tag = "2")]
1398 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1399}
1400#[derive(Clone, PartialEq, ::prost::Message)]
1404pub struct MsgCancelUnbondingDelegation {
1405 #[prost(string, tag = "1")]
1406 pub delegator_address: ::prost::alloc::string::String,
1407 #[prost(string, tag = "2")]
1408 pub validator_address: ::prost::alloc::string::String,
1409 #[prost(message, optional, tag = "3")]
1411 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1412 #[prost(int64, tag = "4")]
1414 pub creation_height: i64,
1415}
1416#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1420pub struct MsgCancelUnbondingDelegationResponse {}
1421#[derive(Clone, PartialEq, ::prost::Message)]
1425pub struct MsgUpdateParams {
1426 #[prost(string, tag = "1")]
1428 pub authority: ::prost::alloc::string::String,
1429 #[prost(message, optional, tag = "2")]
1433 pub params: ::core::option::Option<Params>,
1434}
1435#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1440pub struct MsgUpdateParamsResponse {}
1441pub mod msg_client {
1443 #![allow(
1444 unused_variables,
1445 dead_code,
1446 missing_docs,
1447 clippy::wildcard_imports,
1448 clippy::let_unit_value,
1449 )]
1450 use tonic::codegen::*;
1451 use tonic::codegen::http::Uri;
1452 #[derive(Debug, Clone)]
1454 pub struct MsgClient<T> {
1455 inner: tonic::client::Grpc<T>,
1456 }
1457 impl MsgClient<tonic::transport::Channel> {
1458 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1460 where
1461 D: TryInto<tonic::transport::Endpoint>,
1462 D::Error: Into<StdError>,
1463 {
1464 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1465 Ok(Self::new(conn))
1466 }
1467 }
1468 impl<T> MsgClient<T>
1469 where
1470 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1471 T::Error: Into<StdError>,
1472 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1473 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1474 {
1475 pub fn new(inner: T) -> Self {
1476 let inner = tonic::client::Grpc::new(inner);
1477 Self { inner }
1478 }
1479 pub fn with_origin(inner: T, origin: Uri) -> Self {
1480 let inner = tonic::client::Grpc::with_origin(inner, origin);
1481 Self { inner }
1482 }
1483 pub fn with_interceptor<F>(
1484 inner: T,
1485 interceptor: F,
1486 ) -> MsgClient<InterceptedService<T, F>>
1487 where
1488 F: tonic::service::Interceptor,
1489 T::ResponseBody: Default,
1490 T: tonic::codegen::Service<
1491 http::Request<tonic::body::BoxBody>,
1492 Response = http::Response<
1493 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1494 >,
1495 >,
1496 <T as tonic::codegen::Service<
1497 http::Request<tonic::body::BoxBody>,
1498 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1499 {
1500 MsgClient::new(InterceptedService::new(inner, interceptor))
1501 }
1502 #[must_use]
1507 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1508 self.inner = self.inner.send_compressed(encoding);
1509 self
1510 }
1511 #[must_use]
1513 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1514 self.inner = self.inner.accept_compressed(encoding);
1515 self
1516 }
1517 #[must_use]
1521 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1522 self.inner = self.inner.max_decoding_message_size(limit);
1523 self
1524 }
1525 #[must_use]
1529 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1530 self.inner = self.inner.max_encoding_message_size(limit);
1531 self
1532 }
1533 pub async fn create_validator(
1535 &mut self,
1536 request: impl tonic::IntoRequest<super::MsgCreateValidator>,
1537 ) -> std::result::Result<
1538 tonic::Response<super::MsgCreateValidatorResponse>,
1539 tonic::Status,
1540 > {
1541 self.inner
1542 .ready()
1543 .await
1544 .map_err(|e| {
1545 tonic::Status::unknown(
1546 format!("Service was not ready: {}", e.into()),
1547 )
1548 })?;
1549 let codec = tonic::codec::ProstCodec::default();
1550 let path = http::uri::PathAndQuery::from_static(
1551 "/cosmos.staking.v1beta1.Msg/CreateValidator",
1552 );
1553 let mut req = request.into_request();
1554 req.extensions_mut()
1555 .insert(
1556 GrpcMethod::new("cosmos.staking.v1beta1.Msg", "CreateValidator"),
1557 );
1558 self.inner.unary(req, path, codec).await
1559 }
1560 pub async fn edit_validator(
1562 &mut self,
1563 request: impl tonic::IntoRequest<super::MsgEditValidator>,
1564 ) -> std::result::Result<
1565 tonic::Response<super::MsgEditValidatorResponse>,
1566 tonic::Status,
1567 > {
1568 self.inner
1569 .ready()
1570 .await
1571 .map_err(|e| {
1572 tonic::Status::unknown(
1573 format!("Service was not ready: {}", e.into()),
1574 )
1575 })?;
1576 let codec = tonic::codec::ProstCodec::default();
1577 let path = http::uri::PathAndQuery::from_static(
1578 "/cosmos.staking.v1beta1.Msg/EditValidator",
1579 );
1580 let mut req = request.into_request();
1581 req.extensions_mut()
1582 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "EditValidator"));
1583 self.inner.unary(req, path, codec).await
1584 }
1585 pub async fn delegate(
1588 &mut self,
1589 request: impl tonic::IntoRequest<super::MsgDelegate>,
1590 ) -> std::result::Result<
1591 tonic::Response<super::MsgDelegateResponse>,
1592 tonic::Status,
1593 > {
1594 self.inner
1595 .ready()
1596 .await
1597 .map_err(|e| {
1598 tonic::Status::unknown(
1599 format!("Service was not ready: {}", e.into()),
1600 )
1601 })?;
1602 let codec = tonic::codec::ProstCodec::default();
1603 let path = http::uri::PathAndQuery::from_static(
1604 "/cosmos.staking.v1beta1.Msg/Delegate",
1605 );
1606 let mut req = request.into_request();
1607 req.extensions_mut()
1608 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Delegate"));
1609 self.inner.unary(req, path, codec).await
1610 }
1611 pub async fn begin_redelegate(
1614 &mut self,
1615 request: impl tonic::IntoRequest<super::MsgBeginRedelegate>,
1616 ) -> std::result::Result<
1617 tonic::Response<super::MsgBeginRedelegateResponse>,
1618 tonic::Status,
1619 > {
1620 self.inner
1621 .ready()
1622 .await
1623 .map_err(|e| {
1624 tonic::Status::unknown(
1625 format!("Service was not ready: {}", e.into()),
1626 )
1627 })?;
1628 let codec = tonic::codec::ProstCodec::default();
1629 let path = http::uri::PathAndQuery::from_static(
1630 "/cosmos.staking.v1beta1.Msg/BeginRedelegate",
1631 );
1632 let mut req = request.into_request();
1633 req.extensions_mut()
1634 .insert(
1635 GrpcMethod::new("cosmos.staking.v1beta1.Msg", "BeginRedelegate"),
1636 );
1637 self.inner.unary(req, path, codec).await
1638 }
1639 pub async fn undelegate(
1642 &mut self,
1643 request: impl tonic::IntoRequest<super::MsgUndelegate>,
1644 ) -> std::result::Result<
1645 tonic::Response<super::MsgUndelegateResponse>,
1646 tonic::Status,
1647 > {
1648 self.inner
1649 .ready()
1650 .await
1651 .map_err(|e| {
1652 tonic::Status::unknown(
1653 format!("Service was not ready: {}", e.into()),
1654 )
1655 })?;
1656 let codec = tonic::codec::ProstCodec::default();
1657 let path = http::uri::PathAndQuery::from_static(
1658 "/cosmos.staking.v1beta1.Msg/Undelegate",
1659 );
1660 let mut req = request.into_request();
1661 req.extensions_mut()
1662 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "Undelegate"));
1663 self.inner.unary(req, path, codec).await
1664 }
1665 pub async fn cancel_unbonding_delegation(
1670 &mut self,
1671 request: impl tonic::IntoRequest<super::MsgCancelUnbondingDelegation>,
1672 ) -> std::result::Result<
1673 tonic::Response<super::MsgCancelUnbondingDelegationResponse>,
1674 tonic::Status,
1675 > {
1676 self.inner
1677 .ready()
1678 .await
1679 .map_err(|e| {
1680 tonic::Status::unknown(
1681 format!("Service was not ready: {}", e.into()),
1682 )
1683 })?;
1684 let codec = tonic::codec::ProstCodec::default();
1685 let path = http::uri::PathAndQuery::from_static(
1686 "/cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation",
1687 );
1688 let mut req = request.into_request();
1689 req.extensions_mut()
1690 .insert(
1691 GrpcMethod::new(
1692 "cosmos.staking.v1beta1.Msg",
1693 "CancelUnbondingDelegation",
1694 ),
1695 );
1696 self.inner.unary(req, path, codec).await
1697 }
1698 pub async fn update_params(
1702 &mut self,
1703 request: impl tonic::IntoRequest<super::MsgUpdateParams>,
1704 ) -> std::result::Result<
1705 tonic::Response<super::MsgUpdateParamsResponse>,
1706 tonic::Status,
1707 > {
1708 self.inner
1709 .ready()
1710 .await
1711 .map_err(|e| {
1712 tonic::Status::unknown(
1713 format!("Service was not ready: {}", e.into()),
1714 )
1715 })?;
1716 let codec = tonic::codec::ProstCodec::default();
1717 let path = http::uri::PathAndQuery::from_static(
1718 "/cosmos.staking.v1beta1.Msg/UpdateParams",
1719 );
1720 let mut req = request.into_request();
1721 req.extensions_mut()
1722 .insert(GrpcMethod::new("cosmos.staking.v1beta1.Msg", "UpdateParams"));
1723 self.inner.unary(req, path, codec).await
1724 }
1725 }
1726}