cosmos_sdk_proto_althea/prost/
cosmos.staking.v1beta1.rs

1// This file is @generated by prost-build.
2/// StakeAuthorization defines authorization for delegate/undelegate/redelegate.
3///
4/// Since: cosmos-sdk 0.43
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct StakeAuthorization {
7    /// max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
8    /// empty, there is no spend limit and any amount of coins can be delegated.
9    #[prost(message, optional, tag = "1")]
10    pub max_tokens: ::core::option::Option<super::super::base::v1beta1::Coin>,
11    /// authorization_type defines one of AuthorizationType.
12    #[prost(enumeration = "AuthorizationType", tag = "4")]
13    pub authorization_type: i32,
14    /// validators is the oneof that represents either allow_list or deny_list
15    #[prost(oneof = "stake_authorization::ValidatorsEnum", tags = "2, 3")]
16    pub validators: ::core::option::Option<stake_authorization::ValidatorsEnum>,
17}
18/// Nested message and enum types in `StakeAuthorization`.
19pub mod stake_authorization {
20    /// Validators defines list of validator addresses.
21    #[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    /// validators is the oneof that represents either allow_list or deny_list
27    #[derive(Clone, PartialEq, ::prost::Oneof)]
28    pub enum ValidatorsEnum {
29        /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
30        /// account.
31        #[prost(message, tag = "2")]
32        AllowList(Validators),
33        /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
34        #[prost(message, tag = "3")]
35        DenyList(Validators),
36    }
37}
38/// AuthorizationType defines the type of staking module authorization type
39///
40/// Since: cosmos-sdk 0.43
41#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
42#[repr(i32)]
43pub enum AuthorizationType {
44    /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type
45    Unspecified = 0,
46    /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate
47    Delegate = 1,
48    /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate
49    Undelegate = 2,
50    /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate
51    Redelegate = 3,
52    /// AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation
53    CancelUnbondingDelegation = 4,
54}
55impl AuthorizationType {
56    /// String value of the enum field names used in the ProtoBuf definition.
57    ///
58    /// The values are not transformed in any way and thus are considered stable
59    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
60    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    /// Creates an enum from field names used in the ProtoBuf definition.
72    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/// HistoricalInfo contains header and validator information for a given block.
86/// It is stored as part of staking module's state, which persists the `n` most
87/// recent HistoricalInfo
88/// (`n` is set by the staking module's `historical_entries` parameter).
89#[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/// CommissionRates defines the initial commission rates to be used for creating
97/// a validator.
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct CommissionRates {
100    /// rate is the commission rate charged to delegators, as a fraction.
101    #[prost(string, tag = "1")]
102    pub rate: ::prost::alloc::string::String,
103    /// max_rate defines the maximum commission rate which validator can ever charge, as a fraction.
104    #[prost(string, tag = "2")]
105    pub max_rate: ::prost::alloc::string::String,
106    /// max_change_rate defines the maximum daily increase of the validator commission, as a fraction.
107    #[prost(string, tag = "3")]
108    pub max_change_rate: ::prost::alloc::string::String,
109}
110/// Commission defines commission parameters for a given validator.
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct Commission {
113    /// commission_rates defines the initial commission rates to be used for creating a validator.
114    #[prost(message, optional, tag = "1")]
115    pub commission_rates: ::core::option::Option<CommissionRates>,
116    /// update_time is the last time the commission rate was changed.
117    #[prost(message, optional, tag = "2")]
118    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
119}
120/// Description defines a validator description.
121#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct Description {
123    /// moniker defines a human-readable name for the validator.
124    #[prost(string, tag = "1")]
125    pub moniker: ::prost::alloc::string::String,
126    /// identity defines an optional identity signature (ex. UPort or Keybase).
127    #[prost(string, tag = "2")]
128    pub identity: ::prost::alloc::string::String,
129    /// website defines an optional website link.
130    #[prost(string, tag = "3")]
131    pub website: ::prost::alloc::string::String,
132    /// security_contact defines an optional email for security contact.
133    #[prost(string, tag = "4")]
134    pub security_contact: ::prost::alloc::string::String,
135    /// details define other optional details.
136    #[prost(string, tag = "5")]
137    pub details: ::prost::alloc::string::String,
138}
139/// Validator defines a validator, together with the total amount of the
140/// Validator's bond shares and their exchange rate to coins. Slashing results in
141/// a decrease in the exchange rate, allowing correct calculation of future
142/// undelegations without iterating over delegators. When coins are delegated to
143/// this validator, the validator is credited with a delegation whose number of
144/// bond shares is based on the amount of coins delegated divided by the current
145/// exchange rate. Voting power can be calculated as total bonded shares
146/// multiplied by exchange rate.
147#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct Validator {
149    /// operator_address defines the address of the validator's operator; bech encoded in JSON.
150    #[prost(string, tag = "1")]
151    pub operator_address: ::prost::alloc::string::String,
152    /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any.
153    #[prost(message, optional, tag = "2")]
154    pub consensus_pubkey: ::core::option::Option<::prost_types::Any>,
155    /// jailed defined whether the validator has been jailed from bonded status or not.
156    #[prost(bool, tag = "3")]
157    pub jailed: bool,
158    /// status is the validator status (bonded/unbonding/unbonded).
159    #[prost(enumeration = "BondStatus", tag = "4")]
160    pub status: i32,
161    /// tokens define the delegated tokens (incl. self-delegation).
162    #[prost(string, tag = "5")]
163    pub tokens: ::prost::alloc::string::String,
164    /// delegator_shares defines total shares issued to a validator's delegators.
165    #[prost(string, tag = "6")]
166    pub delegator_shares: ::prost::alloc::string::String,
167    /// description defines the description terms for the validator.
168    #[prost(message, optional, tag = "7")]
169    pub description: ::core::option::Option<Description>,
170    /// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding.
171    #[prost(int64, tag = "8")]
172    pub unbonding_height: i64,
173    /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding.
174    #[prost(message, optional, tag = "9")]
175    pub unbonding_time: ::core::option::Option<::prost_types::Timestamp>,
176    /// commission defines the commission parameters.
177    #[prost(message, optional, tag = "10")]
178    pub commission: ::core::option::Option<Commission>,
179    /// min_self_delegation is the validator's self declared minimum self delegation.
180    ///
181    /// Since: cosmos-sdk 0.46
182    #[prost(string, tag = "11")]
183    pub min_self_delegation: ::prost::alloc::string::String,
184    /// strictly positive if this validator's unbonding has been stopped by external modules
185    #[prost(int64, tag = "12")]
186    pub unbonding_on_hold_ref_count: i64,
187    /// list of unbonding ids, each uniquely identifing an unbonding of this validator
188    #[prost(uint64, repeated, tag = "13")]
189    pub unbonding_ids: ::prost::alloc::vec::Vec<u64>,
190}
191/// ValAddresses defines a repeated set of validator addresses.
192#[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/// DVPair is struct that just has a delegator-validator pair with no other data.
198/// It is intended to be used as a marshalable pointer. For example, a DVPair can
199/// be used to construct the key to getting an UnbondingDelegation from state.
200#[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/// DVPairs defines an array of DVPair objects.
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct DvPairs {
210    #[prost(message, repeated, tag = "1")]
211    pub pairs: ::prost::alloc::vec::Vec<DvPair>,
212}
213/// DVVTriplet is struct that just has a delegator-validator-validator triplet
214/// with no other data. It is intended to be used as a marshalable pointer. For
215/// example, a DVVTriplet can be used to construct the key to getting a
216/// Redelegation from state.
217#[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/// DVVTriplets defines an array of DVVTriplet objects.
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct DvvTriplets {
229    #[prost(message, repeated, tag = "1")]
230    pub triplets: ::prost::alloc::vec::Vec<DvvTriplet>,
231}
232/// Delegation represents the bond with tokens held by an account. It is
233/// owned by one delegator, and is associated with the voting power of one
234/// validator.
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct Delegation {
237    /// delegator_address is the encoded address of the delegator.
238    #[prost(string, tag = "1")]
239    pub delegator_address: ::prost::alloc::string::String,
240    /// validator_address is the encoded address of the validator.
241    #[prost(string, tag = "2")]
242    pub validator_address: ::prost::alloc::string::String,
243    /// shares define the delegation shares received.
244    #[prost(string, tag = "3")]
245    pub shares: ::prost::alloc::string::String,
246}
247/// UnbondingDelegation stores all of a single delegator's unbonding bonds
248/// for a single validator in an time-ordered list.
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct UnbondingDelegation {
251    /// delegator_address is the encoded address of the delegator.
252    #[prost(string, tag = "1")]
253    pub delegator_address: ::prost::alloc::string::String,
254    /// validator_address is the encoded address of the validator.
255    #[prost(string, tag = "2")]
256    pub validator_address: ::prost::alloc::string::String,
257    /// entries are the unbonding delegation entries.
258    ///
259    /// unbonding delegation entries
260    #[prost(message, repeated, tag = "3")]
261    pub entries: ::prost::alloc::vec::Vec<UnbondingDelegationEntry>,
262}
263/// UnbondingDelegationEntry defines an unbonding object with relevant metadata.
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct UnbondingDelegationEntry {
266    /// creation_height is the height which the unbonding took place.
267    #[prost(int64, tag = "1")]
268    pub creation_height: i64,
269    /// completion_time is the unix time for unbonding completion.
270    #[prost(message, optional, tag = "2")]
271    pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
272    /// initial_balance defines the tokens initially scheduled to receive at completion.
273    #[prost(string, tag = "3")]
274    pub initial_balance: ::prost::alloc::string::String,
275    /// balance defines the tokens to receive at completion.
276    #[prost(string, tag = "4")]
277    pub balance: ::prost::alloc::string::String,
278    /// Incrementing id that uniquely identifies this entry
279    #[prost(uint64, tag = "5")]
280    pub unbonding_id: u64,
281    /// Strictly positive if this entry's unbonding has been stopped by external modules
282    #[prost(int64, tag = "6")]
283    pub unbonding_on_hold_ref_count: i64,
284}
285/// RedelegationEntry defines a redelegation object with relevant metadata.
286#[derive(Clone, PartialEq, ::prost::Message)]
287pub struct RedelegationEntry {
288    /// creation_height  defines the height which the redelegation took place.
289    #[prost(int64, tag = "1")]
290    pub creation_height: i64,
291    /// completion_time defines the unix time for redelegation completion.
292    #[prost(message, optional, tag = "2")]
293    pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
294    /// initial_balance defines the initial balance when redelegation started.
295    #[prost(string, tag = "3")]
296    pub initial_balance: ::prost::alloc::string::String,
297    /// shares_dst is the amount of destination-validator shares created by redelegation.
298    #[prost(string, tag = "4")]
299    pub shares_dst: ::prost::alloc::string::String,
300    /// Incrementing id that uniquely identifies this entry
301    #[prost(uint64, tag = "5")]
302    pub unbonding_id: u64,
303    /// Strictly positive if this entry's unbonding has been stopped by external modules
304    #[prost(int64, tag = "6")]
305    pub unbonding_on_hold_ref_count: i64,
306}
307/// Redelegation contains the list of a particular delegator's redelegating bonds
308/// from a particular source validator to a particular destination validator.
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct Redelegation {
311    /// delegator_address is the bech32-encoded address of the delegator.
312    #[prost(string, tag = "1")]
313    pub delegator_address: ::prost::alloc::string::String,
314    /// validator_src_address is the validator redelegation source operator address.
315    #[prost(string, tag = "2")]
316    pub validator_src_address: ::prost::alloc::string::String,
317    /// validator_dst_address is the validator redelegation destination operator address.
318    #[prost(string, tag = "3")]
319    pub validator_dst_address: ::prost::alloc::string::String,
320    /// entries are the redelegation entries.
321    ///
322    /// redelegation entries
323    #[prost(message, repeated, tag = "4")]
324    pub entries: ::prost::alloc::vec::Vec<RedelegationEntry>,
325}
326/// Params defines the parameters for the x/staking module.
327#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct Params {
329    /// unbonding_time is the time duration of unbonding.
330    #[prost(message, optional, tag = "1")]
331    pub unbonding_time: ::core::option::Option<::prost_types::Duration>,
332    /// max_validators is the maximum number of validators.
333    #[prost(uint32, tag = "2")]
334    pub max_validators: u32,
335    /// max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio).
336    #[prost(uint32, tag = "3")]
337    pub max_entries: u32,
338    /// historical_entries is the number of historical entries to persist.
339    #[prost(uint32, tag = "4")]
340    pub historical_entries: u32,
341    /// bond_denom defines the bondable coin denomination.
342    #[prost(string, tag = "5")]
343    pub bond_denom: ::prost::alloc::string::String,
344    /// min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators
345    #[prost(string, tag = "6")]
346    pub min_commission_rate: ::prost::alloc::string::String,
347}
348/// DelegationResponse is equivalent to Delegation except that it contains a
349/// balance in addition to shares which is more suitable for client responses.
350#[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/// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
358/// contains a balance in addition to shares which is more suitable for client
359/// responses.
360#[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/// RedelegationResponse is equivalent to a Redelegation except that its entries
368/// contain a balance in addition to shares which is more suitable for client
369/// responses.
370#[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/// Pool is used for tracking bonded and not-bonded token supply of the bond
378/// denomination.
379#[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/// ValidatorUpdates defines an array of abci.ValidatorUpdate objects.
387/// TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence
388#[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/// BondStatus is the status of a validator.
396#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
397#[repr(i32)]
398pub enum BondStatus {
399    /// UNSPECIFIED defines an invalid validator status.
400    Unspecified = 0,
401    /// UNBONDED defines a validator that is not bonded.
402    Unbonded = 1,
403    /// UNBONDING defines a validator that is unbonding.
404    Unbonding = 2,
405    /// BONDED defines a validator that is bonded.
406    Bonded = 3,
407}
408impl BondStatus {
409    /// String value of the enum field names used in the ProtoBuf definition.
410    ///
411    /// The values are not transformed in any way and thus are considered stable
412    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
413    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    /// Creates an enum from field names used in the ProtoBuf definition.
422    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/// Infraction indicates the infraction a validator commited.
433#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
434#[repr(i32)]
435pub enum Infraction {
436    /// UNSPECIFIED defines an empty infraction.
437    Unspecified = 0,
438    /// DOUBLE_SIGN defines a validator that double-signs a block.
439    DoubleSign = 1,
440    /// DOWNTIME defines a validator that missed signing too many blocks.
441    Downtime = 2,
442}
443impl Infraction {
444    /// String value of the enum field names used in the ProtoBuf definition.
445    ///
446    /// The values are not transformed in any way and thus are considered stable
447    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
448    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    /// Creates an enum from field names used in the ProtoBuf definition.
456    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/// GenesisState defines the staking module's genesis state.
466#[derive(Clone, PartialEq, ::prost::Message)]
467pub struct GenesisState {
468    /// params defines all the parameters of related to deposit.
469    #[prost(message, optional, tag = "1")]
470    pub params: ::core::option::Option<Params>,
471    /// last_total_power tracks the total amounts of bonded tokens recorded during
472    /// the previous end block.
473    #[prost(bytes = "vec", tag = "2")]
474    pub last_total_power: ::prost::alloc::vec::Vec<u8>,
475    /// last_validator_powers is a special index that provides a historical list
476    /// of the last-block's bonded validators.
477    #[prost(message, repeated, tag = "3")]
478    pub last_validator_powers: ::prost::alloc::vec::Vec<LastValidatorPower>,
479    /// validators defines the validator set at genesis.
480    #[prost(message, repeated, tag = "4")]
481    pub validators: ::prost::alloc::vec::Vec<Validator>,
482    /// delegations defines the delegations active at genesis.
483    #[prost(message, repeated, tag = "5")]
484    pub delegations: ::prost::alloc::vec::Vec<Delegation>,
485    /// unbonding_delegations defines the unbonding delegations active at genesis.
486    #[prost(message, repeated, tag = "6")]
487    pub unbonding_delegations: ::prost::alloc::vec::Vec<UnbondingDelegation>,
488    /// redelegations defines the redelegations active at genesis.
489    #[prost(message, repeated, tag = "7")]
490    pub redelegations: ::prost::alloc::vec::Vec<Redelegation>,
491    /// exported defines a bool to identify whether the chain dealing with exported or initialized genesis.
492    #[prost(bool, tag = "8")]
493    pub exported: bool,
494}
495/// LastValidatorPower required for validator set update logic.
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct LastValidatorPower {
498    /// address is the address of the validator.
499    #[prost(string, tag = "1")]
500    pub address: ::prost::alloc::string::String,
501    /// power defines the power of the validator.
502    #[prost(int64, tag = "2")]
503    pub power: i64,
504}
505/// QueryValidatorsRequest is request type for Query/Validators RPC method.
506#[derive(Clone, PartialEq, ::prost::Message)]
507pub struct QueryValidatorsRequest {
508    /// status enables to query for validators matching a given status.
509    #[prost(string, tag = "1")]
510    pub status: ::prost::alloc::string::String,
511    /// pagination defines an optional pagination for the request.
512    #[prost(message, optional, tag = "2")]
513    pub pagination: ::core::option::Option<
514        super::super::base::query::v1beta1::PageRequest,
515    >,
516}
517/// QueryValidatorsResponse is response type for the Query/Validators RPC method
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct QueryValidatorsResponse {
520    /// validators contains all the queried validators.
521    #[prost(message, repeated, tag = "1")]
522    pub validators: ::prost::alloc::vec::Vec<Validator>,
523    /// pagination defines the pagination in the response.
524    #[prost(message, optional, tag = "2")]
525    pub pagination: ::core::option::Option<
526        super::super::base::query::v1beta1::PageResponse,
527    >,
528}
529/// QueryValidatorRequest is response type for the Query/Validator RPC method
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct QueryValidatorRequest {
532    /// validator_addr defines the validator address to query for.
533    #[prost(string, tag = "1")]
534    pub validator_addr: ::prost::alloc::string::String,
535}
536/// QueryValidatorResponse is response type for the Query/Validator RPC method
537#[derive(Clone, PartialEq, ::prost::Message)]
538pub struct QueryValidatorResponse {
539    /// validator defines the validator info.
540    #[prost(message, optional, tag = "1")]
541    pub validator: ::core::option::Option<Validator>,
542}
543/// QueryValidatorDelegationsRequest is request type for the
544/// Query/ValidatorDelegations RPC method
545#[derive(Clone, PartialEq, ::prost::Message)]
546pub struct QueryValidatorDelegationsRequest {
547    /// validator_addr defines the validator address to query for.
548    #[prost(string, tag = "1")]
549    pub validator_addr: ::prost::alloc::string::String,
550    /// pagination defines an optional pagination for the request.
551    #[prost(message, optional, tag = "2")]
552    pub pagination: ::core::option::Option<
553        super::super::base::query::v1beta1::PageRequest,
554    >,
555}
556/// QueryValidatorDelegationsResponse is response type for the
557/// Query/ValidatorDelegations RPC method
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct QueryValidatorDelegationsResponse {
560    #[prost(message, repeated, tag = "1")]
561    pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
562    /// pagination defines the pagination in the response.
563    #[prost(message, optional, tag = "2")]
564    pub pagination: ::core::option::Option<
565        super::super::base::query::v1beta1::PageResponse,
566    >,
567}
568/// QueryValidatorUnbondingDelegationsRequest is required type for the
569/// Query/ValidatorUnbondingDelegations RPC method
570#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct QueryValidatorUnbondingDelegationsRequest {
572    /// validator_addr defines the validator address to query for.
573    #[prost(string, tag = "1")]
574    pub validator_addr: ::prost::alloc::string::String,
575    /// pagination defines an optional pagination for the request.
576    #[prost(message, optional, tag = "2")]
577    pub pagination: ::core::option::Option<
578        super::super::base::query::v1beta1::PageRequest,
579    >,
580}
581/// QueryValidatorUnbondingDelegationsResponse is response type for the
582/// Query/ValidatorUnbondingDelegations RPC method.
583#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct QueryValidatorUnbondingDelegationsResponse {
585    #[prost(message, repeated, tag = "1")]
586    pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
587    /// pagination defines the pagination in the response.
588    #[prost(message, optional, tag = "2")]
589    pub pagination: ::core::option::Option<
590        super::super::base::query::v1beta1::PageResponse,
591    >,
592}
593/// QueryDelegationRequest is request type for the Query/Delegation RPC method.
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct QueryDelegationRequest {
596    /// delegator_addr defines the delegator address to query for.
597    #[prost(string, tag = "1")]
598    pub delegator_addr: ::prost::alloc::string::String,
599    /// validator_addr defines the validator address to query for.
600    #[prost(string, tag = "2")]
601    pub validator_addr: ::prost::alloc::string::String,
602}
603/// QueryDelegationResponse is response type for the Query/Delegation RPC method.
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct QueryDelegationResponse {
606    /// delegation_responses defines the delegation info of a delegation.
607    #[prost(message, optional, tag = "1")]
608    pub delegation_response: ::core::option::Option<DelegationResponse>,
609}
610/// QueryUnbondingDelegationRequest is request type for the
611/// Query/UnbondingDelegation RPC method.
612#[derive(Clone, PartialEq, ::prost::Message)]
613pub struct QueryUnbondingDelegationRequest {
614    /// delegator_addr defines the delegator address to query for.
615    #[prost(string, tag = "1")]
616    pub delegator_addr: ::prost::alloc::string::String,
617    /// validator_addr defines the validator address to query for.
618    #[prost(string, tag = "2")]
619    pub validator_addr: ::prost::alloc::string::String,
620}
621/// QueryDelegationResponse is response type for the Query/UnbondingDelegation
622/// RPC method.
623#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct QueryUnbondingDelegationResponse {
625    /// unbond defines the unbonding information of a delegation.
626    #[prost(message, optional, tag = "1")]
627    pub unbond: ::core::option::Option<UnbondingDelegation>,
628}
629/// QueryDelegatorDelegationsRequest is request type for the
630/// Query/DelegatorDelegations RPC method.
631#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct QueryDelegatorDelegationsRequest {
633    /// delegator_addr defines the delegator address to query for.
634    #[prost(string, tag = "1")]
635    pub delegator_addr: ::prost::alloc::string::String,
636    /// pagination defines an optional pagination for the request.
637    #[prost(message, optional, tag = "2")]
638    pub pagination: ::core::option::Option<
639        super::super::base::query::v1beta1::PageRequest,
640    >,
641}
642/// QueryDelegatorDelegationsResponse is response type for the
643/// Query/DelegatorDelegations RPC method.
644#[derive(Clone, PartialEq, ::prost::Message)]
645pub struct QueryDelegatorDelegationsResponse {
646    /// delegation_responses defines all the delegations' info of a delegator.
647    #[prost(message, repeated, tag = "1")]
648    pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
649    /// pagination defines the pagination in the response.
650    #[prost(message, optional, tag = "2")]
651    pub pagination: ::core::option::Option<
652        super::super::base::query::v1beta1::PageResponse,
653    >,
654}
655/// QueryDelegatorUnbondingDelegationsRequest is request type for the
656/// Query/DelegatorUnbondingDelegations RPC method.
657#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct QueryDelegatorUnbondingDelegationsRequest {
659    /// delegator_addr defines the delegator address to query for.
660    #[prost(string, tag = "1")]
661    pub delegator_addr: ::prost::alloc::string::String,
662    /// pagination defines an optional pagination for the request.
663    #[prost(message, optional, tag = "2")]
664    pub pagination: ::core::option::Option<
665        super::super::base::query::v1beta1::PageRequest,
666    >,
667}
668/// QueryUnbondingDelegatorDelegationsResponse is response type for the
669/// Query/UnbondingDelegatorDelegations RPC method.
670#[derive(Clone, PartialEq, ::prost::Message)]
671pub struct QueryDelegatorUnbondingDelegationsResponse {
672    #[prost(message, repeated, tag = "1")]
673    pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
674    /// pagination defines the pagination in the response.
675    #[prost(message, optional, tag = "2")]
676    pub pagination: ::core::option::Option<
677        super::super::base::query::v1beta1::PageResponse,
678    >,
679}
680/// QueryRedelegationsRequest is request type for the Query/Redelegations RPC
681/// method.
682#[derive(Clone, PartialEq, ::prost::Message)]
683pub struct QueryRedelegationsRequest {
684    /// delegator_addr defines the delegator address to query for.
685    #[prost(string, tag = "1")]
686    pub delegator_addr: ::prost::alloc::string::String,
687    /// src_validator_addr defines the validator address to redelegate from.
688    #[prost(string, tag = "2")]
689    pub src_validator_addr: ::prost::alloc::string::String,
690    /// dst_validator_addr defines the validator address to redelegate to.
691    #[prost(string, tag = "3")]
692    pub dst_validator_addr: ::prost::alloc::string::String,
693    /// pagination defines an optional pagination for the request.
694    #[prost(message, optional, tag = "4")]
695    pub pagination: ::core::option::Option<
696        super::super::base::query::v1beta1::PageRequest,
697    >,
698}
699/// QueryRedelegationsResponse is response type for the Query/Redelegations RPC
700/// method.
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct QueryRedelegationsResponse {
703    #[prost(message, repeated, tag = "1")]
704    pub redelegation_responses: ::prost::alloc::vec::Vec<RedelegationResponse>,
705    /// pagination defines the pagination in the response.
706    #[prost(message, optional, tag = "2")]
707    pub pagination: ::core::option::Option<
708        super::super::base::query::v1beta1::PageResponse,
709    >,
710}
711/// QueryDelegatorValidatorsRequest is request type for the
712/// Query/DelegatorValidators RPC method.
713#[derive(Clone, PartialEq, ::prost::Message)]
714pub struct QueryDelegatorValidatorsRequest {
715    /// delegator_addr defines the delegator address to query for.
716    #[prost(string, tag = "1")]
717    pub delegator_addr: ::prost::alloc::string::String,
718    /// pagination defines an optional pagination for the request.
719    #[prost(message, optional, tag = "2")]
720    pub pagination: ::core::option::Option<
721        super::super::base::query::v1beta1::PageRequest,
722    >,
723}
724/// QueryDelegatorValidatorsResponse is response type for the
725/// Query/DelegatorValidators RPC method.
726#[derive(Clone, PartialEq, ::prost::Message)]
727pub struct QueryDelegatorValidatorsResponse {
728    /// validators defines the validators' info of a delegator.
729    #[prost(message, repeated, tag = "1")]
730    pub validators: ::prost::alloc::vec::Vec<Validator>,
731    /// pagination defines the pagination in the response.
732    #[prost(message, optional, tag = "2")]
733    pub pagination: ::core::option::Option<
734        super::super::base::query::v1beta1::PageResponse,
735    >,
736}
737/// QueryDelegatorValidatorRequest is request type for the
738/// Query/DelegatorValidator RPC method.
739#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct QueryDelegatorValidatorRequest {
741    /// delegator_addr defines the delegator address to query for.
742    #[prost(string, tag = "1")]
743    pub delegator_addr: ::prost::alloc::string::String,
744    /// validator_addr defines the validator address to query for.
745    #[prost(string, tag = "2")]
746    pub validator_addr: ::prost::alloc::string::String,
747}
748/// QueryDelegatorValidatorResponse response type for the
749/// Query/DelegatorValidator RPC method.
750#[derive(Clone, PartialEq, ::prost::Message)]
751pub struct QueryDelegatorValidatorResponse {
752    /// validator defines the validator info.
753    #[prost(message, optional, tag = "1")]
754    pub validator: ::core::option::Option<Validator>,
755}
756/// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
757/// method.
758#[derive(Clone, Copy, PartialEq, ::prost::Message)]
759pub struct QueryHistoricalInfoRequest {
760    /// height defines at which height to query the historical info.
761    #[prost(int64, tag = "1")]
762    pub height: i64,
763}
764/// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
765/// method.
766#[derive(Clone, PartialEq, ::prost::Message)]
767pub struct QueryHistoricalInfoResponse {
768    /// hist defines the historical info at the given height.
769    #[prost(message, optional, tag = "1")]
770    pub hist: ::core::option::Option<HistoricalInfo>,
771}
772/// QueryPoolRequest is request type for the Query/Pool RPC method.
773#[derive(Clone, Copy, PartialEq, ::prost::Message)]
774pub struct QueryPoolRequest {}
775/// QueryPoolResponse is response type for the Query/Pool RPC method.
776#[derive(Clone, PartialEq, ::prost::Message)]
777pub struct QueryPoolResponse {
778    /// pool defines the pool info.
779    #[prost(message, optional, tag = "1")]
780    pub pool: ::core::option::Option<Pool>,
781}
782/// QueryParamsRequest is request type for the Query/Params RPC method.
783#[derive(Clone, Copy, PartialEq, ::prost::Message)]
784pub struct QueryParamsRequest {}
785/// QueryParamsResponse is response type for the Query/Params RPC method.
786#[derive(Clone, PartialEq, ::prost::Message)]
787pub struct QueryParamsResponse {
788    /// params holds all the parameters of this module.
789    #[prost(message, optional, tag = "1")]
790    pub params: ::core::option::Option<Params>,
791}
792/// Generated client implementations.
793pub 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    /// Query defines the gRPC querier service.
804    #[derive(Debug, Clone)]
805    pub struct QueryClient<T> {
806        inner: tonic::client::Grpc<T>,
807    }
808    impl QueryClient<tonic::transport::Channel> {
809        /// Attempt to create a new client by connecting to a given endpoint.
810        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        /// Compress requests with the given encoding.
854        ///
855        /// This requires the server to support it otherwise it might respond with an
856        /// error.
857        #[must_use]
858        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
859            self.inner = self.inner.send_compressed(encoding);
860            self
861        }
862        /// Enable decompressing responses.
863        #[must_use]
864        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
865            self.inner = self.inner.accept_compressed(encoding);
866            self
867        }
868        /// Limits the maximum size of a decoded message.
869        ///
870        /// Default: `4MB`
871        #[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        /// Limits the maximum size of an encoded message.
877        ///
878        /// Default: `usize::MAX`
879        #[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        /// Validators queries all validators that match the given status.
885        ///
886        /// When called from another module, this query might consume a high amount of
887        /// gas if the pagination field is incorrectly set.
888        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        /// Validator queries validator info for given validator address.
913        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        /// ValidatorDelegations queries delegate info for given validator.
938        ///
939        /// When called from another module, this query might consume a high amount of
940        /// gas if the pagination field is incorrectly set.
941        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        /// ValidatorUnbondingDelegations queries unbonding delegations of a validator.
971        ///
972        /// When called from another module, this query might consume a high amount of
973        /// gas if the pagination field is incorrectly set.
974        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        /// Delegation queries delegate info for given validator delegator pair.
1006        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        /// UnbondingDelegation queries unbonding info for given validator delegator
1031        /// pair.
1032        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        /// DelegatorDelegations queries all delegations of a given delegator address.
1062        ///
1063        /// When called from another module, this query might consume a high amount of
1064        /// gas if the pagination field is incorrectly set.
1065        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        /// DelegatorUnbondingDelegations queries all unbonding delegations of a given
1095        /// delegator address.
1096        ///
1097        /// When called from another module, this query might consume a high amount of
1098        /// gas if the pagination field is incorrectly set.
1099        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        /// Redelegations queries redelegations of given address.
1131        ///
1132        /// When called from another module, this query might consume a high amount of
1133        /// gas if the pagination field is incorrectly set.
1134        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        /// DelegatorValidators queries all validators info for given delegator
1161        /// address.
1162        ///
1163        /// When called from another module, this query might consume a high amount of
1164        /// gas if the pagination field is incorrectly set.
1165        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        /// DelegatorValidator queries validator info for given delegator validator
1195        /// pair.
1196        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        /// HistoricalInfo queries the historical info for given height.
1223        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        /// Pool queries the pool info.
1250        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        /// Parameters queries the staking parameters.
1275        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/// MsgCreateValidator defines a SDK message for creating a new validator.
1302#[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: Use of Delegator Address in MsgCreateValidator is deprecated.
1311    /// The validator address bytes and delegator address bytes refer to the same account while creating validator (defer
1312    /// only in bech32 notation).
1313    #[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/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type.
1324#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1325pub struct MsgCreateValidatorResponse {}
1326/// MsgEditValidator defines a SDK message for editing an existing validator.
1327#[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    /// We pass a reference to the new commission rate and min self delegation as
1334    /// it's not mandatory to update. If not updated, the deserialized rate will be
1335    /// zero with no way to distinguish if an update was intended.
1336    /// REF: #2373
1337    #[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/// MsgEditValidatorResponse defines the Msg/EditValidator response type.
1343#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1344pub struct MsgEditValidatorResponse {}
1345/// MsgDelegate defines a SDK message for performing a delegation of coins
1346/// from a delegator to a validator.
1347#[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/// MsgDelegateResponse defines the Msg/Delegate response type.
1357#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1358pub struct MsgDelegateResponse {}
1359/// MsgBeginRedelegate defines a SDK message for performing a redelegation
1360/// of coins from a delegator and source validator to a destination validator.
1361#[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/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type.
1373#[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/// MsgUndelegate defines a SDK message for performing an undelegation from a
1379/// delegate and a validator.
1380#[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/// MsgUndelegateResponse defines the Msg/Undelegate response type.
1390#[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    /// amount returns the amount of undelegated coins
1395    ///
1396    /// Since: cosmos-sdk 0.50
1397    #[prost(message, optional, tag = "2")]
1398    pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1399}
1400/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator
1401///
1402/// Since: cosmos-sdk 0.46
1403#[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    /// amount is always less than or equal to unbonding delegation entry balance
1410    #[prost(message, optional, tag = "3")]
1411    pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1412    /// creation_height is the height which the unbonding took place.
1413    #[prost(int64, tag = "4")]
1414    pub creation_height: i64,
1415}
1416/// MsgCancelUnbondingDelegationResponse
1417///
1418/// Since: cosmos-sdk 0.46
1419#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1420pub struct MsgCancelUnbondingDelegationResponse {}
1421/// MsgUpdateParams is the Msg/UpdateParams request type.
1422///
1423/// Since: cosmos-sdk 0.47
1424#[derive(Clone, PartialEq, ::prost::Message)]
1425pub struct MsgUpdateParams {
1426    /// authority is the address that controls the module (defaults to x/gov unless overwritten).
1427    #[prost(string, tag = "1")]
1428    pub authority: ::prost::alloc::string::String,
1429    /// params defines the x/staking parameters to update.
1430    ///
1431    /// NOTE: All parameters must be supplied.
1432    #[prost(message, optional, tag = "2")]
1433    pub params: ::core::option::Option<Params>,
1434}
1435/// MsgUpdateParamsResponse defines the response structure for executing a
1436/// MsgUpdateParams message.
1437///
1438/// Since: cosmos-sdk 0.47
1439#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1440pub struct MsgUpdateParamsResponse {}
1441/// Generated client implementations.
1442pub 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    /// Msg defines the staking Msg service.
1453    #[derive(Debug, Clone)]
1454    pub struct MsgClient<T> {
1455        inner: tonic::client::Grpc<T>,
1456    }
1457    impl MsgClient<tonic::transport::Channel> {
1458        /// Attempt to create a new client by connecting to a given endpoint.
1459        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        /// Compress requests with the given encoding.
1503        ///
1504        /// This requires the server to support it otherwise it might respond with an
1505        /// error.
1506        #[must_use]
1507        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1508            self.inner = self.inner.send_compressed(encoding);
1509            self
1510        }
1511        /// Enable decompressing responses.
1512        #[must_use]
1513        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1514            self.inner = self.inner.accept_compressed(encoding);
1515            self
1516        }
1517        /// Limits the maximum size of a decoded message.
1518        ///
1519        /// Default: `4MB`
1520        #[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        /// Limits the maximum size of an encoded message.
1526        ///
1527        /// Default: `usize::MAX`
1528        #[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        /// CreateValidator defines a method for creating a new validator.
1534        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        /// EditValidator defines a method for editing an existing validator.
1561        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        /// Delegate defines a method for performing a delegation of coins
1586        /// from a delegator to a validator.
1587        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        /// BeginRedelegate defines a method for performing a redelegation
1612        /// of coins from a delegator and source validator to a destination validator.
1613        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        /// Undelegate defines a method for performing an undelegation from a
1640        /// delegate and a validator.
1641        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        /// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation
1666        /// and delegate back to previous validator.
1667        ///
1668        /// Since: cosmos-sdk 0.46
1669        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        /// UpdateParams defines an operation for updating the x/staking module
1699        /// parameters.
1700        /// Since: cosmos-sdk 0.47
1701        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}