1use osmosis_std_derive::CosmwasmExt;
2#[allow(clippy::derive_partial_eq_without_eq)]
6#[derive(
7 Clone,
8 PartialEq,
9 Eq,
10 ::prost::Message,
11 ::serde::Serialize,
12 ::serde::Deserialize,
13 ::schemars::JsonSchema,
14 CosmwasmExt,
15)]
16#[proto_message(type_url = "/cosmos.staking.v1beta1.StakeAuthorization")]
17pub struct StakeAuthorization {
18 #[prost(message, optional, tag = "1")]
21 pub max_tokens: ::core::option::Option<super::super::base::v1beta1::Coin>,
22 #[prost(enumeration = "AuthorizationType", tag = "4")]
24 #[serde(
25 serialize_with = "crate::serde::as_str::serialize",
26 deserialize_with = "crate::serde::as_str::deserialize"
27 )]
28 pub authorization_type: i32,
29 #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")]
31 pub validators: ::core::option::Option<stake_authorization::Validators>,
32}
33pub mod stake_authorization {
35 use osmosis_std_derive::CosmwasmExt;
36 #[allow(clippy::derive_partial_eq_without_eq)]
38 #[derive(
39 Clone,
40 PartialEq,
41 Eq,
42 ::prost::Message,
43 ::serde::Serialize,
44 ::serde::Deserialize,
45 ::schemars::JsonSchema,
46 CosmwasmExt,
47 )]
48 #[proto_message(type_url = "/cosmos.staking.v1beta1.")]
49 pub struct Validators_ {
50 #[prost(string, repeated, tag = "1")]
51 pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
52 }
53 #[allow(clippy::derive_partial_eq_without_eq)]
55 #[derive(
56 Clone,
57 PartialEq,
58 Eq,
59 ::prost::Oneof,
60 ::serde::Serialize,
61 ::serde::Deserialize,
62 ::schemars::JsonSchema,
63 )]
64 pub enum Validators {
65 #[prost(message, tag = "2")]
68 AllowList(Validators_),
69 #[prost(message, tag = "3")]
71 DenyList(Validators_),
72 }
73}
74#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
78#[repr(i32)]
79#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
80pub enum AuthorizationType {
81 Unspecified = 0,
83 Delegate = 1,
85 Undelegate = 2,
87 Redelegate = 3,
89 CancelUnbondingDelegation = 4,
91}
92impl AuthorizationType {
93 pub fn as_str_name(&self) -> &'static str {
98 match self {
99 AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED",
100 AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE",
101 AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE",
102 AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE",
103 AuthorizationType::CancelUnbondingDelegation => {
104 "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION"
105 }
106 }
107 }
108 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
110 match value {
111 "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
112 "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate),
113 "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate),
114 "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate),
115 "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => {
116 Some(Self::CancelUnbondingDelegation)
117 }
118 _ => None,
119 }
120 }
121}
122#[allow(clippy::derive_partial_eq_without_eq)]
127#[derive(
128 Clone,
129 PartialEq,
130 Eq,
131 ::prost::Message,
132 ::serde::Serialize,
133 ::serde::Deserialize,
134 ::schemars::JsonSchema,
135 CosmwasmExt,
136)]
137#[proto_message(type_url = "/cosmos.staking.v1beta1.HistoricalInfo")]
138pub struct HistoricalInfo {
139 #[prost(message, optional, tag = "1")]
140 pub header: ::core::option::Option<super::super::super::tendermint::types::Header>,
141 #[prost(message, repeated, tag = "2")]
142 pub valset: ::prost::alloc::vec::Vec<Validator>,
143}
144#[allow(clippy::derive_partial_eq_without_eq)]
147#[derive(
148 Clone,
149 PartialEq,
150 Eq,
151 ::prost::Message,
152 ::serde::Serialize,
153 ::serde::Deserialize,
154 ::schemars::JsonSchema,
155 CosmwasmExt,
156)]
157#[proto_message(type_url = "/cosmos.staking.v1beta1.CommissionRates")]
158pub struct CommissionRates {
159 #[prost(string, tag = "1")]
161 pub rate: ::prost::alloc::string::String,
162 #[prost(string, tag = "2")]
164 pub max_rate: ::prost::alloc::string::String,
165 #[prost(string, tag = "3")]
167 pub max_change_rate: ::prost::alloc::string::String,
168}
169#[allow(clippy::derive_partial_eq_without_eq)]
171#[derive(
172 Clone,
173 PartialEq,
174 Eq,
175 ::prost::Message,
176 ::serde::Serialize,
177 ::serde::Deserialize,
178 ::schemars::JsonSchema,
179 CosmwasmExt,
180)]
181#[proto_message(type_url = "/cosmos.staking.v1beta1.Commission")]
182pub struct Commission {
183 #[prost(message, optional, tag = "1")]
185 pub commission_rates: ::core::option::Option<CommissionRates>,
186 #[prost(message, optional, tag = "2")]
188 pub update_time: ::core::option::Option<crate::shim::Timestamp>,
189}
190#[allow(clippy::derive_partial_eq_without_eq)]
192#[derive(
193 Clone,
194 PartialEq,
195 Eq,
196 ::prost::Message,
197 ::serde::Serialize,
198 ::serde::Deserialize,
199 ::schemars::JsonSchema,
200 CosmwasmExt,
201)]
202#[proto_message(type_url = "/cosmos.staking.v1beta1.Description")]
203pub struct Description {
204 #[prost(string, tag = "1")]
206 pub moniker: ::prost::alloc::string::String,
207 #[prost(string, tag = "2")]
209 pub identity: ::prost::alloc::string::String,
210 #[prost(string, tag = "3")]
212 pub website: ::prost::alloc::string::String,
213 #[prost(string, tag = "4")]
215 pub security_contact: ::prost::alloc::string::String,
216 #[prost(string, tag = "5")]
218 pub details: ::prost::alloc::string::String,
219}
220#[allow(clippy::derive_partial_eq_without_eq)]
229#[derive(
230 Clone,
231 PartialEq,
232 Eq,
233 ::prost::Message,
234 ::serde::Serialize,
235 ::serde::Deserialize,
236 ::schemars::JsonSchema,
237 CosmwasmExt,
238)]
239#[proto_message(type_url = "/cosmos.staking.v1beta1.Validator")]
240pub struct Validator {
241 #[prost(string, tag = "1")]
243 pub operator_address: ::prost::alloc::string::String,
244 #[prost(message, optional, tag = "2")]
246 pub consensus_pubkey: ::core::option::Option<crate::shim::Any>,
247 #[prost(bool, tag = "3")]
249 pub jailed: bool,
250 #[prost(enumeration = "BondStatus", tag = "4")]
252 #[serde(
253 serialize_with = "crate::serde::as_str::serialize",
254 deserialize_with = "crate::serde::as_str::deserialize"
255 )]
256 pub status: i32,
257 #[prost(string, tag = "5")]
259 pub tokens: ::prost::alloc::string::String,
260 #[prost(string, tag = "6")]
262 pub delegator_shares: ::prost::alloc::string::String,
263 #[prost(message, optional, tag = "7")]
265 pub description: ::core::option::Option<Description>,
266 #[prost(int64, tag = "8")]
268 #[serde(
269 serialize_with = "crate::serde::as_str::serialize",
270 deserialize_with = "crate::serde::as_str::deserialize"
271 )]
272 pub unbonding_height: i64,
273 #[prost(message, optional, tag = "9")]
275 pub unbonding_time: ::core::option::Option<crate::shim::Timestamp>,
276 #[prost(message, optional, tag = "10")]
278 pub commission: ::core::option::Option<Commission>,
279 #[prost(string, tag = "11")]
283 pub min_self_delegation: ::prost::alloc::string::String,
284 #[prost(int64, tag = "12")]
286 #[serde(
287 serialize_with = "crate::serde::as_str::serialize",
288 deserialize_with = "crate::serde::as_str::deserialize"
289 )]
290 pub unbonding_on_hold_ref_count: i64,
291 #[prost(uint64, repeated, tag = "13")]
293 #[serde(alias = "unbondingIDs")]
294 #[serde(
295 serialize_with = "crate::serde::as_str_vec::serialize",
296 deserialize_with = "crate::serde::as_str_vec::deserialize"
297 )]
298 pub unbonding_ids: ::prost::alloc::vec::Vec<u64>,
299}
300#[allow(clippy::derive_partial_eq_without_eq)]
302#[derive(
303 Clone,
304 PartialEq,
305 Eq,
306 ::prost::Message,
307 ::serde::Serialize,
308 ::serde::Deserialize,
309 ::schemars::JsonSchema,
310 CosmwasmExt,
311)]
312#[proto_message(type_url = "/cosmos.staking.v1beta1.ValAddresses")]
313pub struct ValAddresses {
314 #[prost(string, repeated, tag = "1")]
315 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
316}
317#[allow(clippy::derive_partial_eq_without_eq)]
321#[derive(
322 Clone,
323 PartialEq,
324 Eq,
325 ::prost::Message,
326 ::serde::Serialize,
327 ::serde::Deserialize,
328 ::schemars::JsonSchema,
329 CosmwasmExt,
330)]
331#[proto_message(type_url = "/cosmos.staking.v1beta1.DVPair")]
332pub struct DvPair {
333 #[prost(string, tag = "1")]
334 pub delegator_address: ::prost::alloc::string::String,
335 #[prost(string, tag = "2")]
336 pub validator_address: ::prost::alloc::string::String,
337}
338#[allow(clippy::derive_partial_eq_without_eq)]
340#[derive(
341 Clone,
342 PartialEq,
343 Eq,
344 ::prost::Message,
345 ::serde::Serialize,
346 ::serde::Deserialize,
347 ::schemars::JsonSchema,
348 CosmwasmExt,
349)]
350#[proto_message(type_url = "/cosmos.staking.v1beta1.DVPairs")]
351pub struct DvPairs {
352 #[prost(message, repeated, tag = "1")]
353 pub pairs: ::prost::alloc::vec::Vec<DvPair>,
354}
355#[allow(clippy::derive_partial_eq_without_eq)]
360#[derive(
361 Clone,
362 PartialEq,
363 Eq,
364 ::prost::Message,
365 ::serde::Serialize,
366 ::serde::Deserialize,
367 ::schemars::JsonSchema,
368 CosmwasmExt,
369)]
370#[proto_message(type_url = "/cosmos.staking.v1beta1.DVVTriplet")]
371pub struct DvvTriplet {
372 #[prost(string, tag = "1")]
373 pub delegator_address: ::prost::alloc::string::String,
374 #[prost(string, tag = "2")]
375 pub validator_src_address: ::prost::alloc::string::String,
376 #[prost(string, tag = "3")]
377 pub validator_dst_address: ::prost::alloc::string::String,
378}
379#[allow(clippy::derive_partial_eq_without_eq)]
381#[derive(
382 Clone,
383 PartialEq,
384 Eq,
385 ::prost::Message,
386 ::serde::Serialize,
387 ::serde::Deserialize,
388 ::schemars::JsonSchema,
389 CosmwasmExt,
390)]
391#[proto_message(type_url = "/cosmos.staking.v1beta1.DVVTriplets")]
392pub struct DvvTriplets {
393 #[prost(message, repeated, tag = "1")]
394 pub triplets: ::prost::alloc::vec::Vec<DvvTriplet>,
395}
396#[allow(clippy::derive_partial_eq_without_eq)]
400#[derive(
401 Clone,
402 PartialEq,
403 Eq,
404 ::prost::Message,
405 ::serde::Serialize,
406 ::serde::Deserialize,
407 ::schemars::JsonSchema,
408 CosmwasmExt,
409)]
410#[proto_message(type_url = "/cosmos.staking.v1beta1.Delegation")]
411pub struct Delegation {
412 #[prost(string, tag = "1")]
414 pub delegator_address: ::prost::alloc::string::String,
415 #[prost(string, tag = "2")]
417 pub validator_address: ::prost::alloc::string::String,
418 #[prost(string, tag = "3")]
420 pub shares: ::prost::alloc::string::String,
421}
422#[allow(clippy::derive_partial_eq_without_eq)]
425#[derive(
426 Clone,
427 PartialEq,
428 Eq,
429 ::prost::Message,
430 ::serde::Serialize,
431 ::serde::Deserialize,
432 ::schemars::JsonSchema,
433 CosmwasmExt,
434)]
435#[proto_message(type_url = "/cosmos.staking.v1beta1.UnbondingDelegation")]
436pub struct UnbondingDelegation {
437 #[prost(string, tag = "1")]
439 pub delegator_address: ::prost::alloc::string::String,
440 #[prost(string, tag = "2")]
442 pub validator_address: ::prost::alloc::string::String,
443 #[prost(message, repeated, tag = "3")]
447 pub entries: ::prost::alloc::vec::Vec<UnbondingDelegationEntry>,
448}
449#[allow(clippy::derive_partial_eq_without_eq)]
451#[derive(
452 Clone,
453 PartialEq,
454 Eq,
455 ::prost::Message,
456 ::serde::Serialize,
457 ::serde::Deserialize,
458 ::schemars::JsonSchema,
459 CosmwasmExt,
460)]
461#[proto_message(type_url = "/cosmos.staking.v1beta1.UnbondingDelegationEntry")]
462pub struct UnbondingDelegationEntry {
463 #[prost(int64, tag = "1")]
465 #[serde(
466 serialize_with = "crate::serde::as_str::serialize",
467 deserialize_with = "crate::serde::as_str::deserialize"
468 )]
469 pub creation_height: i64,
470 #[prost(message, optional, tag = "2")]
472 pub completion_time: ::core::option::Option<crate::shim::Timestamp>,
473 #[prost(string, tag = "3")]
475 pub initial_balance: ::prost::alloc::string::String,
476 #[prost(string, tag = "4")]
478 pub balance: ::prost::alloc::string::String,
479 #[prost(uint64, tag = "5")]
481 #[serde(alias = "unbondingID")]
482 #[serde(
483 serialize_with = "crate::serde::as_str::serialize",
484 deserialize_with = "crate::serde::as_str::deserialize"
485 )]
486 pub unbonding_id: u64,
487 #[prost(int64, tag = "6")]
489 #[serde(
490 serialize_with = "crate::serde::as_str::serialize",
491 deserialize_with = "crate::serde::as_str::deserialize"
492 )]
493 pub unbonding_on_hold_ref_count: i64,
494}
495#[allow(clippy::derive_partial_eq_without_eq)]
497#[derive(
498 Clone,
499 PartialEq,
500 Eq,
501 ::prost::Message,
502 ::serde::Serialize,
503 ::serde::Deserialize,
504 ::schemars::JsonSchema,
505 CosmwasmExt,
506)]
507#[proto_message(type_url = "/cosmos.staking.v1beta1.RedelegationEntry")]
508pub struct RedelegationEntry {
509 #[prost(int64, tag = "1")]
511 #[serde(
512 serialize_with = "crate::serde::as_str::serialize",
513 deserialize_with = "crate::serde::as_str::deserialize"
514 )]
515 pub creation_height: i64,
516 #[prost(message, optional, tag = "2")]
518 pub completion_time: ::core::option::Option<crate::shim::Timestamp>,
519 #[prost(string, tag = "3")]
521 pub initial_balance: ::prost::alloc::string::String,
522 #[prost(string, tag = "4")]
524 pub shares_dst: ::prost::alloc::string::String,
525 #[prost(uint64, tag = "5")]
527 #[serde(alias = "unbondingID")]
528 #[serde(
529 serialize_with = "crate::serde::as_str::serialize",
530 deserialize_with = "crate::serde::as_str::deserialize"
531 )]
532 pub unbonding_id: u64,
533 #[prost(int64, tag = "6")]
535 #[serde(
536 serialize_with = "crate::serde::as_str::serialize",
537 deserialize_with = "crate::serde::as_str::deserialize"
538 )]
539 pub unbonding_on_hold_ref_count: i64,
540}
541#[allow(clippy::derive_partial_eq_without_eq)]
544#[derive(
545 Clone,
546 PartialEq,
547 Eq,
548 ::prost::Message,
549 ::serde::Serialize,
550 ::serde::Deserialize,
551 ::schemars::JsonSchema,
552 CosmwasmExt,
553)]
554#[proto_message(type_url = "/cosmos.staking.v1beta1.Redelegation")]
555pub struct Redelegation {
556 #[prost(string, tag = "1")]
558 pub delegator_address: ::prost::alloc::string::String,
559 #[prost(string, tag = "2")]
561 pub validator_src_address: ::prost::alloc::string::String,
562 #[prost(string, tag = "3")]
564 pub validator_dst_address: ::prost::alloc::string::String,
565 #[prost(message, repeated, tag = "4")]
569 pub entries: ::prost::alloc::vec::Vec<RedelegationEntry>,
570}
571#[allow(clippy::derive_partial_eq_without_eq)]
573#[derive(
574 Clone,
575 PartialEq,
576 Eq,
577 ::prost::Message,
578 ::serde::Serialize,
579 ::serde::Deserialize,
580 ::schemars::JsonSchema,
581 CosmwasmExt,
582)]
583#[proto_message(type_url = "/cosmos.staking.v1beta1.Params")]
584pub struct Params {
585 #[prost(message, optional, tag = "1")]
587 pub unbonding_time: ::core::option::Option<crate::shim::Duration>,
588 #[prost(uint32, tag = "2")]
590 #[serde(
591 serialize_with = "crate::serde::as_str::serialize",
592 deserialize_with = "crate::serde::as_str::deserialize"
593 )]
594 pub max_validators: u32,
595 #[prost(uint32, tag = "3")]
597 #[serde(
598 serialize_with = "crate::serde::as_str::serialize",
599 deserialize_with = "crate::serde::as_str::deserialize"
600 )]
601 pub max_entries: u32,
602 #[prost(uint32, tag = "4")]
604 #[serde(
605 serialize_with = "crate::serde::as_str::serialize",
606 deserialize_with = "crate::serde::as_str::deserialize"
607 )]
608 pub historical_entries: u32,
609 #[prost(string, tag = "5")]
611 pub bond_denom: ::prost::alloc::string::String,
612 #[prost(string, tag = "6")]
614 pub min_commission_rate: ::prost::alloc::string::String,
615}
616#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(
620 Clone,
621 PartialEq,
622 Eq,
623 ::prost::Message,
624 ::serde::Serialize,
625 ::serde::Deserialize,
626 ::schemars::JsonSchema,
627 CosmwasmExt,
628)]
629#[proto_message(type_url = "/cosmos.staking.v1beta1.DelegationResponse")]
630pub struct DelegationResponse {
631 #[prost(message, optional, tag = "1")]
632 pub delegation: ::core::option::Option<Delegation>,
633 #[prost(message, optional, tag = "2")]
634 pub balance: ::core::option::Option<super::super::base::v1beta1::Coin>,
635}
636#[allow(clippy::derive_partial_eq_without_eq)]
640#[derive(
641 Clone,
642 PartialEq,
643 Eq,
644 ::prost::Message,
645 ::serde::Serialize,
646 ::serde::Deserialize,
647 ::schemars::JsonSchema,
648 CosmwasmExt,
649)]
650#[proto_message(type_url = "/cosmos.staking.v1beta1.RedelegationEntryResponse")]
651pub struct RedelegationEntryResponse {
652 #[prost(message, optional, tag = "1")]
653 pub redelegation_entry: ::core::option::Option<RedelegationEntry>,
654 #[prost(string, tag = "4")]
655 pub balance: ::prost::alloc::string::String,
656}
657#[allow(clippy::derive_partial_eq_without_eq)]
661#[derive(
662 Clone,
663 PartialEq,
664 Eq,
665 ::prost::Message,
666 ::serde::Serialize,
667 ::serde::Deserialize,
668 ::schemars::JsonSchema,
669 CosmwasmExt,
670)]
671#[proto_message(type_url = "/cosmos.staking.v1beta1.RedelegationResponse")]
672pub struct RedelegationResponse {
673 #[prost(message, optional, tag = "1")]
674 pub redelegation: ::core::option::Option<Redelegation>,
675 #[prost(message, repeated, tag = "2")]
676 pub entries: ::prost::alloc::vec::Vec<RedelegationEntryResponse>,
677}
678#[allow(clippy::derive_partial_eq_without_eq)]
681#[derive(
682 Clone,
683 PartialEq,
684 Eq,
685 ::prost::Message,
686 ::serde::Serialize,
687 ::serde::Deserialize,
688 ::schemars::JsonSchema,
689 CosmwasmExt,
690)]
691#[proto_message(type_url = "/cosmos.staking.v1beta1.Pool")]
692pub struct Pool {
693 #[prost(string, tag = "1")]
694 pub not_bonded_tokens: ::prost::alloc::string::String,
695 #[prost(string, tag = "2")]
696 pub bonded_tokens: ::prost::alloc::string::String,
697}
698#[allow(clippy::derive_partial_eq_without_eq)]
701#[derive(
702 Clone,
703 PartialEq,
704 Eq,
705 ::prost::Message,
706 ::serde::Serialize,
707 ::serde::Deserialize,
708 ::schemars::JsonSchema,
709 CosmwasmExt,
710)]
711#[proto_message(type_url = "/cosmos.staking.v1beta1.ValidatorUpdates")]
712pub struct ValidatorUpdates {
713 #[prost(message, repeated, tag = "1")]
714 pub updates: ::prost::alloc::vec::Vec<super::super::super::tendermint::abci::ValidatorUpdate>,
715}
716#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
718#[repr(i32)]
719#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
720pub enum BondStatus {
721 Unspecified = 0,
723 Unbonded = 1,
725 Unbonding = 2,
727 Bonded = 3,
729}
730impl BondStatus {
731 pub fn as_str_name(&self) -> &'static str {
736 match self {
737 BondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED",
738 BondStatus::Unbonded => "BOND_STATUS_UNBONDED",
739 BondStatus::Unbonding => "BOND_STATUS_UNBONDING",
740 BondStatus::Bonded => "BOND_STATUS_BONDED",
741 }
742 }
743 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
745 match value {
746 "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
747 "BOND_STATUS_UNBONDED" => Some(Self::Unbonded),
748 "BOND_STATUS_UNBONDING" => Some(Self::Unbonding),
749 "BOND_STATUS_BONDED" => Some(Self::Bonded),
750 _ => None,
751 }
752 }
753}
754#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
756#[repr(i32)]
757#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
758pub enum Infraction {
759 Unspecified = 0,
761 DoubleSign = 1,
763 Downtime = 2,
765}
766impl Infraction {
767 pub fn as_str_name(&self) -> &'static str {
772 match self {
773 Infraction::Unspecified => "INFRACTION_UNSPECIFIED",
774 Infraction::DoubleSign => "INFRACTION_DOUBLE_SIGN",
775 Infraction::Downtime => "INFRACTION_DOWNTIME",
776 }
777 }
778 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
780 match value {
781 "INFRACTION_UNSPECIFIED" => Some(Self::Unspecified),
782 "INFRACTION_DOUBLE_SIGN" => Some(Self::DoubleSign),
783 "INFRACTION_DOWNTIME" => Some(Self::Downtime),
784 _ => None,
785 }
786 }
787}
788#[allow(clippy::derive_partial_eq_without_eq)]
790#[derive(
791 Clone,
792 PartialEq,
793 Eq,
794 ::prost::Message,
795 ::serde::Serialize,
796 ::serde::Deserialize,
797 ::schemars::JsonSchema,
798 CosmwasmExt,
799)]
800#[proto_message(type_url = "/cosmos.staking.v1beta1.GenesisState")]
801pub struct GenesisState {
802 #[prost(message, optional, tag = "1")]
804 pub params: ::core::option::Option<Params>,
805 #[prost(bytes = "vec", tag = "2")]
808 #[serde(
809 serialize_with = "crate::serde::as_base64_encoded_string::serialize",
810 deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
811 )]
812 pub last_total_power: ::prost::alloc::vec::Vec<u8>,
813 #[prost(message, repeated, tag = "3")]
816 pub last_validator_powers: ::prost::alloc::vec::Vec<LastValidatorPower>,
817 #[prost(message, repeated, tag = "4")]
819 pub validators: ::prost::alloc::vec::Vec<Validator>,
820 #[prost(message, repeated, tag = "5")]
822 pub delegations: ::prost::alloc::vec::Vec<Delegation>,
823 #[prost(message, repeated, tag = "6")]
825 pub unbonding_delegations: ::prost::alloc::vec::Vec<UnbondingDelegation>,
826 #[prost(message, repeated, tag = "7")]
828 pub redelegations: ::prost::alloc::vec::Vec<Redelegation>,
829 #[prost(bool, tag = "8")]
831 pub exported: bool,
832}
833#[allow(clippy::derive_partial_eq_without_eq)]
835#[derive(
836 Clone,
837 PartialEq,
838 Eq,
839 ::prost::Message,
840 ::serde::Serialize,
841 ::serde::Deserialize,
842 ::schemars::JsonSchema,
843 CosmwasmExt,
844)]
845#[proto_message(type_url = "/cosmos.staking.v1beta1.LastValidatorPower")]
846pub struct LastValidatorPower {
847 #[prost(string, tag = "1")]
849 pub address: ::prost::alloc::string::String,
850 #[prost(int64, tag = "2")]
852 #[serde(
853 serialize_with = "crate::serde::as_str::serialize",
854 deserialize_with = "crate::serde::as_str::deserialize"
855 )]
856 pub power: i64,
857}
858#[allow(clippy::derive_partial_eq_without_eq)]
860#[derive(
861 Clone,
862 PartialEq,
863 Eq,
864 ::prost::Message,
865 ::serde::Serialize,
866 ::serde::Deserialize,
867 ::schemars::JsonSchema,
868 CosmwasmExt,
869)]
870#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorsRequest")]
871#[proto_query(
872 path = "/cosmos.staking.v1beta1.Query/Validators",
873 response_type = QueryValidatorsResponse
874)]
875pub struct QueryValidatorsRequest {
876 #[prost(string, tag = "1")]
878 pub status: ::prost::alloc::string::String,
879 #[prost(message, optional, tag = "2")]
881 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
882}
883#[allow(clippy::derive_partial_eq_without_eq)]
885#[derive(
886 Clone,
887 PartialEq,
888 Eq,
889 ::prost::Message,
890 ::serde::Serialize,
891 ::serde::Deserialize,
892 ::schemars::JsonSchema,
893 CosmwasmExt,
894)]
895#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorsResponse")]
896pub struct QueryValidatorsResponse {
897 #[prost(message, repeated, tag = "1")]
899 pub validators: ::prost::alloc::vec::Vec<Validator>,
900 #[prost(message, optional, tag = "2")]
902 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
903}
904#[allow(clippy::derive_partial_eq_without_eq)]
906#[derive(
907 Clone,
908 PartialEq,
909 Eq,
910 ::prost::Message,
911 ::serde::Serialize,
912 ::serde::Deserialize,
913 ::schemars::JsonSchema,
914 CosmwasmExt,
915)]
916#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorRequest")]
917#[proto_query(
918 path = "/cosmos.staking.v1beta1.Query/Validator",
919 response_type = QueryValidatorResponse
920)]
921pub struct QueryValidatorRequest {
922 #[prost(string, tag = "1")]
924 pub validator_addr: ::prost::alloc::string::String,
925}
926#[allow(clippy::derive_partial_eq_without_eq)]
928#[derive(
929 Clone,
930 PartialEq,
931 Eq,
932 ::prost::Message,
933 ::serde::Serialize,
934 ::serde::Deserialize,
935 ::schemars::JsonSchema,
936 CosmwasmExt,
937)]
938#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorResponse")]
939pub struct QueryValidatorResponse {
940 #[prost(message, optional, tag = "1")]
942 pub validator: ::core::option::Option<Validator>,
943}
944#[allow(clippy::derive_partial_eq_without_eq)]
947#[derive(
948 Clone,
949 PartialEq,
950 Eq,
951 ::prost::Message,
952 ::serde::Serialize,
953 ::serde::Deserialize,
954 ::schemars::JsonSchema,
955 CosmwasmExt,
956)]
957#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")]
958#[proto_query(
959 path = "/cosmos.staking.v1beta1.Query/ValidatorDelegations",
960 response_type = QueryValidatorDelegationsResponse
961)]
962pub struct QueryValidatorDelegationsRequest {
963 #[prost(string, tag = "1")]
965 pub validator_addr: ::prost::alloc::string::String,
966 #[prost(message, optional, tag = "2")]
968 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
969}
970#[allow(clippy::derive_partial_eq_without_eq)]
973#[derive(
974 Clone,
975 PartialEq,
976 Eq,
977 ::prost::Message,
978 ::serde::Serialize,
979 ::serde::Deserialize,
980 ::schemars::JsonSchema,
981 CosmwasmExt,
982)]
983#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")]
984pub struct QueryValidatorDelegationsResponse {
985 #[prost(message, repeated, tag = "1")]
986 pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
987 #[prost(message, optional, tag = "2")]
989 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
990}
991#[allow(clippy::derive_partial_eq_without_eq)]
994#[derive(
995 Clone,
996 PartialEq,
997 Eq,
998 ::prost::Message,
999 ::serde::Serialize,
1000 ::serde::Deserialize,
1001 ::schemars::JsonSchema,
1002 CosmwasmExt,
1003)]
1004#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")]
1005#[proto_query(
1006 path = "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations",
1007 response_type = QueryValidatorUnbondingDelegationsResponse
1008)]
1009pub struct QueryValidatorUnbondingDelegationsRequest {
1010 #[prost(string, tag = "1")]
1012 pub validator_addr: ::prost::alloc::string::String,
1013 #[prost(message, optional, tag = "2")]
1015 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1016}
1017#[allow(clippy::derive_partial_eq_without_eq)]
1020#[derive(
1021 Clone,
1022 PartialEq,
1023 Eq,
1024 ::prost::Message,
1025 ::serde::Serialize,
1026 ::serde::Deserialize,
1027 ::schemars::JsonSchema,
1028 CosmwasmExt,
1029)]
1030#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")]
1031pub struct QueryValidatorUnbondingDelegationsResponse {
1032 #[prost(message, repeated, tag = "1")]
1033 pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
1034 #[prost(message, optional, tag = "2")]
1036 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
1037}
1038#[allow(clippy::derive_partial_eq_without_eq)]
1040#[derive(
1041 Clone,
1042 PartialEq,
1043 Eq,
1044 ::prost::Message,
1045 ::serde::Serialize,
1046 ::serde::Deserialize,
1047 ::schemars::JsonSchema,
1048 CosmwasmExt,
1049)]
1050#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegationRequest")]
1051#[proto_query(
1052 path = "/cosmos.staking.v1beta1.Query/Delegation",
1053 response_type = QueryDelegationResponse
1054)]
1055pub struct QueryDelegationRequest {
1056 #[prost(string, tag = "1")]
1058 pub delegator_addr: ::prost::alloc::string::String,
1059 #[prost(string, tag = "2")]
1061 pub validator_addr: ::prost::alloc::string::String,
1062}
1063#[allow(clippy::derive_partial_eq_without_eq)]
1065#[derive(
1066 Clone,
1067 PartialEq,
1068 Eq,
1069 ::prost::Message,
1070 ::serde::Serialize,
1071 ::serde::Deserialize,
1072 ::schemars::JsonSchema,
1073 CosmwasmExt,
1074)]
1075#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegationResponse")]
1076pub struct QueryDelegationResponse {
1077 #[prost(message, optional, tag = "1")]
1079 pub delegation_response: ::core::option::Option<DelegationResponse>,
1080}
1081#[allow(clippy::derive_partial_eq_without_eq)]
1084#[derive(
1085 Clone,
1086 PartialEq,
1087 Eq,
1088 ::prost::Message,
1089 ::serde::Serialize,
1090 ::serde::Deserialize,
1091 ::schemars::JsonSchema,
1092 CosmwasmExt,
1093)]
1094#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")]
1095#[proto_query(
1096 path = "/cosmos.staking.v1beta1.Query/UnbondingDelegation",
1097 response_type = QueryUnbondingDelegationResponse
1098)]
1099pub struct QueryUnbondingDelegationRequest {
1100 #[prost(string, tag = "1")]
1102 pub delegator_addr: ::prost::alloc::string::String,
1103 #[prost(string, tag = "2")]
1105 pub validator_addr: ::prost::alloc::string::String,
1106}
1107#[allow(clippy::derive_partial_eq_without_eq)]
1110#[derive(
1111 Clone,
1112 PartialEq,
1113 Eq,
1114 ::prost::Message,
1115 ::serde::Serialize,
1116 ::serde::Deserialize,
1117 ::schemars::JsonSchema,
1118 CosmwasmExt,
1119)]
1120#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")]
1121pub struct QueryUnbondingDelegationResponse {
1122 #[prost(message, optional, tag = "1")]
1124 pub unbond: ::core::option::Option<UnbondingDelegation>,
1125}
1126#[allow(clippy::derive_partial_eq_without_eq)]
1129#[derive(
1130 Clone,
1131 PartialEq,
1132 Eq,
1133 ::prost::Message,
1134 ::serde::Serialize,
1135 ::serde::Deserialize,
1136 ::schemars::JsonSchema,
1137 CosmwasmExt,
1138)]
1139#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")]
1140#[proto_query(
1141 path = "/cosmos.staking.v1beta1.Query/DelegatorDelegations",
1142 response_type = QueryDelegatorDelegationsResponse
1143)]
1144pub struct QueryDelegatorDelegationsRequest {
1145 #[prost(string, tag = "1")]
1147 pub delegator_addr: ::prost::alloc::string::String,
1148 #[prost(message, optional, tag = "2")]
1150 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1151}
1152#[allow(clippy::derive_partial_eq_without_eq)]
1155#[derive(
1156 Clone,
1157 PartialEq,
1158 Eq,
1159 ::prost::Message,
1160 ::serde::Serialize,
1161 ::serde::Deserialize,
1162 ::schemars::JsonSchema,
1163 CosmwasmExt,
1164)]
1165#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")]
1166pub struct QueryDelegatorDelegationsResponse {
1167 #[prost(message, repeated, tag = "1")]
1169 pub delegation_responses: ::prost::alloc::vec::Vec<DelegationResponse>,
1170 #[prost(message, optional, tag = "2")]
1172 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
1173}
1174#[allow(clippy::derive_partial_eq_without_eq)]
1177#[derive(
1178 Clone,
1179 PartialEq,
1180 Eq,
1181 ::prost::Message,
1182 ::serde::Serialize,
1183 ::serde::Deserialize,
1184 ::schemars::JsonSchema,
1185 CosmwasmExt,
1186)]
1187#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")]
1188#[proto_query(
1189 path = "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations",
1190 response_type = QueryDelegatorUnbondingDelegationsResponse
1191)]
1192pub struct QueryDelegatorUnbondingDelegationsRequest {
1193 #[prost(string, tag = "1")]
1195 pub delegator_addr: ::prost::alloc::string::String,
1196 #[prost(message, optional, tag = "2")]
1198 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1199}
1200#[allow(clippy::derive_partial_eq_without_eq)]
1203#[derive(
1204 Clone,
1205 PartialEq,
1206 Eq,
1207 ::prost::Message,
1208 ::serde::Serialize,
1209 ::serde::Deserialize,
1210 ::schemars::JsonSchema,
1211 CosmwasmExt,
1212)]
1213#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")]
1214pub struct QueryDelegatorUnbondingDelegationsResponse {
1215 #[prost(message, repeated, tag = "1")]
1216 pub unbonding_responses: ::prost::alloc::vec::Vec<UnbondingDelegation>,
1217 #[prost(message, optional, tag = "2")]
1219 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
1220}
1221#[allow(clippy::derive_partial_eq_without_eq)]
1224#[derive(
1225 Clone,
1226 PartialEq,
1227 Eq,
1228 ::prost::Message,
1229 ::serde::Serialize,
1230 ::serde::Deserialize,
1231 ::schemars::JsonSchema,
1232 CosmwasmExt,
1233)]
1234#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryRedelegationsRequest")]
1235#[proto_query(
1236 path = "/cosmos.staking.v1beta1.Query/Redelegations",
1237 response_type = QueryRedelegationsResponse
1238)]
1239pub struct QueryRedelegationsRequest {
1240 #[prost(string, tag = "1")]
1242 pub delegator_addr: ::prost::alloc::string::String,
1243 #[prost(string, tag = "2")]
1245 pub src_validator_addr: ::prost::alloc::string::String,
1246 #[prost(string, tag = "3")]
1248 pub dst_validator_addr: ::prost::alloc::string::String,
1249 #[prost(message, optional, tag = "4")]
1251 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1252}
1253#[allow(clippy::derive_partial_eq_without_eq)]
1256#[derive(
1257 Clone,
1258 PartialEq,
1259 Eq,
1260 ::prost::Message,
1261 ::serde::Serialize,
1262 ::serde::Deserialize,
1263 ::schemars::JsonSchema,
1264 CosmwasmExt,
1265)]
1266#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryRedelegationsResponse")]
1267pub struct QueryRedelegationsResponse {
1268 #[prost(message, repeated, tag = "1")]
1269 pub redelegation_responses: ::prost::alloc::vec::Vec<RedelegationResponse>,
1270 #[prost(message, optional, tag = "2")]
1272 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
1273}
1274#[allow(clippy::derive_partial_eq_without_eq)]
1277#[derive(
1278 Clone,
1279 PartialEq,
1280 Eq,
1281 ::prost::Message,
1282 ::serde::Serialize,
1283 ::serde::Deserialize,
1284 ::schemars::JsonSchema,
1285 CosmwasmExt,
1286)]
1287#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")]
1288#[proto_query(
1289 path = "/cosmos.staking.v1beta1.Query/DelegatorValidators",
1290 response_type = QueryDelegatorValidatorsResponse
1291)]
1292pub struct QueryDelegatorValidatorsRequest {
1293 #[prost(string, tag = "1")]
1295 pub delegator_addr: ::prost::alloc::string::String,
1296 #[prost(message, optional, tag = "2")]
1298 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1299}
1300#[allow(clippy::derive_partial_eq_without_eq)]
1303#[derive(
1304 Clone,
1305 PartialEq,
1306 Eq,
1307 ::prost::Message,
1308 ::serde::Serialize,
1309 ::serde::Deserialize,
1310 ::schemars::JsonSchema,
1311 CosmwasmExt,
1312)]
1313#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")]
1314pub struct QueryDelegatorValidatorsResponse {
1315 #[prost(message, repeated, tag = "1")]
1317 pub validators: ::prost::alloc::vec::Vec<Validator>,
1318 #[prost(message, optional, tag = "2")]
1320 pub pagination: ::core::option::Option<super::super::base::query::v1beta1::PageResponse>,
1321}
1322#[allow(clippy::derive_partial_eq_without_eq)]
1325#[derive(
1326 Clone,
1327 PartialEq,
1328 Eq,
1329 ::prost::Message,
1330 ::serde::Serialize,
1331 ::serde::Deserialize,
1332 ::schemars::JsonSchema,
1333 CosmwasmExt,
1334)]
1335#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")]
1336#[proto_query(
1337 path = "/cosmos.staking.v1beta1.Query/DelegatorValidator",
1338 response_type = QueryDelegatorValidatorResponse
1339)]
1340pub struct QueryDelegatorValidatorRequest {
1341 #[prost(string, tag = "1")]
1343 pub delegator_addr: ::prost::alloc::string::String,
1344 #[prost(string, tag = "2")]
1346 pub validator_addr: ::prost::alloc::string::String,
1347}
1348#[allow(clippy::derive_partial_eq_without_eq)]
1351#[derive(
1352 Clone,
1353 PartialEq,
1354 Eq,
1355 ::prost::Message,
1356 ::serde::Serialize,
1357 ::serde::Deserialize,
1358 ::schemars::JsonSchema,
1359 CosmwasmExt,
1360)]
1361#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")]
1362pub struct QueryDelegatorValidatorResponse {
1363 #[prost(message, optional, tag = "1")]
1365 pub validator: ::core::option::Option<Validator>,
1366}
1367#[allow(clippy::derive_partial_eq_without_eq)]
1370#[derive(
1371 Clone,
1372 PartialEq,
1373 Eq,
1374 ::prost::Message,
1375 ::serde::Serialize,
1376 ::serde::Deserialize,
1377 ::schemars::JsonSchema,
1378 CosmwasmExt,
1379)]
1380#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest")]
1381#[proto_query(
1382 path = "/cosmos.staking.v1beta1.Query/HistoricalInfo",
1383 response_type = QueryHistoricalInfoResponse
1384)]
1385pub struct QueryHistoricalInfoRequest {
1386 #[prost(int64, tag = "1")]
1388 #[serde(
1389 serialize_with = "crate::serde::as_str::serialize",
1390 deserialize_with = "crate::serde::as_str::deserialize"
1391 )]
1392 pub height: i64,
1393}
1394#[allow(clippy::derive_partial_eq_without_eq)]
1397#[derive(
1398 Clone,
1399 PartialEq,
1400 Eq,
1401 ::prost::Message,
1402 ::serde::Serialize,
1403 ::serde::Deserialize,
1404 ::schemars::JsonSchema,
1405 CosmwasmExt,
1406)]
1407#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse")]
1408pub struct QueryHistoricalInfoResponse {
1409 #[prost(message, optional, tag = "1")]
1411 pub hist: ::core::option::Option<HistoricalInfo>,
1412}
1413#[allow(clippy::derive_partial_eq_without_eq)]
1415#[derive(
1416 Clone,
1417 PartialEq,
1418 Eq,
1419 ::prost::Message,
1420 ::serde::Serialize,
1421 ::serde::Deserialize,
1422 ::schemars::JsonSchema,
1423 CosmwasmExt,
1424)]
1425#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryPoolRequest")]
1426#[proto_query(
1427 path = "/cosmos.staking.v1beta1.Query/Pool",
1428 response_type = QueryPoolResponse
1429)]
1430pub struct QueryPoolRequest {}
1431#[allow(clippy::derive_partial_eq_without_eq)]
1433#[derive(
1434 Clone,
1435 PartialEq,
1436 Eq,
1437 ::prost::Message,
1438 ::serde::Serialize,
1439 ::serde::Deserialize,
1440 ::schemars::JsonSchema,
1441 CosmwasmExt,
1442)]
1443#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryPoolResponse")]
1444pub struct QueryPoolResponse {
1445 #[prost(message, optional, tag = "1")]
1447 pub pool: ::core::option::Option<Pool>,
1448}
1449#[allow(clippy::derive_partial_eq_without_eq)]
1451#[derive(
1452 Clone,
1453 PartialEq,
1454 Eq,
1455 ::prost::Message,
1456 ::serde::Serialize,
1457 ::serde::Deserialize,
1458 ::schemars::JsonSchema,
1459 CosmwasmExt,
1460)]
1461#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryParamsRequest")]
1462#[proto_query(
1463 path = "/cosmos.staking.v1beta1.Query/Params",
1464 response_type = QueryParamsResponse
1465)]
1466pub struct QueryParamsRequest {}
1467#[allow(clippy::derive_partial_eq_without_eq)]
1469#[derive(
1470 Clone,
1471 PartialEq,
1472 Eq,
1473 ::prost::Message,
1474 ::serde::Serialize,
1475 ::serde::Deserialize,
1476 ::schemars::JsonSchema,
1477 CosmwasmExt,
1478)]
1479#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryParamsResponse")]
1480pub struct QueryParamsResponse {
1481 #[prost(message, optional, tag = "1")]
1483 pub params: ::core::option::Option<Params>,
1484}
1485#[allow(clippy::derive_partial_eq_without_eq)]
1487#[derive(
1488 Clone,
1489 PartialEq,
1490 Eq,
1491 ::prost::Message,
1492 ::serde::Serialize,
1493 ::serde::Deserialize,
1494 ::schemars::JsonSchema,
1495 CosmwasmExt,
1496)]
1497#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCreateValidator")]
1498pub struct MsgCreateValidator {
1499 #[prost(message, optional, tag = "1")]
1500 pub description: ::core::option::Option<Description>,
1501 #[prost(message, optional, tag = "2")]
1502 pub commission: ::core::option::Option<CommissionRates>,
1503 #[prost(string, tag = "3")]
1504 pub min_self_delegation: ::prost::alloc::string::String,
1505 #[deprecated]
1509 #[prost(string, tag = "4")]
1510 pub delegator_address: ::prost::alloc::string::String,
1511 #[prost(string, tag = "5")]
1512 pub validator_address: ::prost::alloc::string::String,
1513 #[prost(message, optional, tag = "6")]
1514 pub pubkey: ::core::option::Option<crate::shim::Any>,
1515 #[prost(message, optional, tag = "7")]
1516 pub value: ::core::option::Option<super::super::base::v1beta1::Coin>,
1517}
1518#[allow(clippy::derive_partial_eq_without_eq)]
1520#[derive(
1521 Clone,
1522 PartialEq,
1523 Eq,
1524 ::prost::Message,
1525 ::serde::Serialize,
1526 ::serde::Deserialize,
1527 ::schemars::JsonSchema,
1528 CosmwasmExt,
1529)]
1530#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCreateValidatorResponse")]
1531pub struct MsgCreateValidatorResponse {}
1532#[allow(clippy::derive_partial_eq_without_eq)]
1534#[derive(
1535 Clone,
1536 PartialEq,
1537 Eq,
1538 ::prost::Message,
1539 ::serde::Serialize,
1540 ::serde::Deserialize,
1541 ::schemars::JsonSchema,
1542 CosmwasmExt,
1543)]
1544#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgEditValidator")]
1545pub struct MsgEditValidator {
1546 #[prost(message, optional, tag = "1")]
1547 pub description: ::core::option::Option<Description>,
1548 #[prost(string, tag = "2")]
1549 pub validator_address: ::prost::alloc::string::String,
1550 #[prost(string, tag = "3")]
1555 pub commission_rate: ::prost::alloc::string::String,
1556 #[prost(string, tag = "4")]
1557 pub min_self_delegation: ::prost::alloc::string::String,
1558}
1559#[allow(clippy::derive_partial_eq_without_eq)]
1561#[derive(
1562 Clone,
1563 PartialEq,
1564 Eq,
1565 ::prost::Message,
1566 ::serde::Serialize,
1567 ::serde::Deserialize,
1568 ::schemars::JsonSchema,
1569 CosmwasmExt,
1570)]
1571#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgEditValidatorResponse")]
1572pub struct MsgEditValidatorResponse {}
1573#[allow(clippy::derive_partial_eq_without_eq)]
1576#[derive(
1577 Clone,
1578 PartialEq,
1579 Eq,
1580 ::prost::Message,
1581 ::serde::Serialize,
1582 ::serde::Deserialize,
1583 ::schemars::JsonSchema,
1584 CosmwasmExt,
1585)]
1586#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgDelegate")]
1587pub struct MsgDelegate {
1588 #[prost(string, tag = "1")]
1589 pub delegator_address: ::prost::alloc::string::String,
1590 #[prost(string, tag = "2")]
1591 pub validator_address: ::prost::alloc::string::String,
1592 #[prost(message, optional, tag = "3")]
1593 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1594}
1595#[allow(clippy::derive_partial_eq_without_eq)]
1597#[derive(
1598 Clone,
1599 PartialEq,
1600 Eq,
1601 ::prost::Message,
1602 ::serde::Serialize,
1603 ::serde::Deserialize,
1604 ::schemars::JsonSchema,
1605 CosmwasmExt,
1606)]
1607#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgDelegateResponse")]
1608pub struct MsgDelegateResponse {}
1609#[allow(clippy::derive_partial_eq_without_eq)]
1612#[derive(
1613 Clone,
1614 PartialEq,
1615 Eq,
1616 ::prost::Message,
1617 ::serde::Serialize,
1618 ::serde::Deserialize,
1619 ::schemars::JsonSchema,
1620 CosmwasmExt,
1621)]
1622#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgBeginRedelegate")]
1623pub struct MsgBeginRedelegate {
1624 #[prost(string, tag = "1")]
1625 pub delegator_address: ::prost::alloc::string::String,
1626 #[prost(string, tag = "2")]
1627 pub validator_src_address: ::prost::alloc::string::String,
1628 #[prost(string, tag = "3")]
1629 pub validator_dst_address: ::prost::alloc::string::String,
1630 #[prost(message, optional, tag = "4")]
1631 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1632}
1633#[allow(clippy::derive_partial_eq_without_eq)]
1635#[derive(
1636 Clone,
1637 PartialEq,
1638 Eq,
1639 ::prost::Message,
1640 ::serde::Serialize,
1641 ::serde::Deserialize,
1642 ::schemars::JsonSchema,
1643 CosmwasmExt,
1644)]
1645#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse")]
1646pub struct MsgBeginRedelegateResponse {
1647 #[prost(message, optional, tag = "1")]
1648 pub completion_time: ::core::option::Option<crate::shim::Timestamp>,
1649}
1650#[allow(clippy::derive_partial_eq_without_eq)]
1653#[derive(
1654 Clone,
1655 PartialEq,
1656 Eq,
1657 ::prost::Message,
1658 ::serde::Serialize,
1659 ::serde::Deserialize,
1660 ::schemars::JsonSchema,
1661 CosmwasmExt,
1662)]
1663#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUndelegate")]
1664pub struct MsgUndelegate {
1665 #[prost(string, tag = "1")]
1666 pub delegator_address: ::prost::alloc::string::String,
1667 #[prost(string, tag = "2")]
1668 pub validator_address: ::prost::alloc::string::String,
1669 #[prost(message, optional, tag = "3")]
1670 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1671}
1672#[allow(clippy::derive_partial_eq_without_eq)]
1674#[derive(
1675 Clone,
1676 PartialEq,
1677 Eq,
1678 ::prost::Message,
1679 ::serde::Serialize,
1680 ::serde::Deserialize,
1681 ::schemars::JsonSchema,
1682 CosmwasmExt,
1683)]
1684#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUndelegateResponse")]
1685pub struct MsgUndelegateResponse {
1686 #[prost(message, optional, tag = "1")]
1687 pub completion_time: ::core::option::Option<crate::shim::Timestamp>,
1688 #[prost(message, optional, tag = "2")]
1692 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1693}
1694#[allow(clippy::derive_partial_eq_without_eq)]
1698#[derive(
1699 Clone,
1700 PartialEq,
1701 Eq,
1702 ::prost::Message,
1703 ::serde::Serialize,
1704 ::serde::Deserialize,
1705 ::schemars::JsonSchema,
1706 CosmwasmExt,
1707)]
1708#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")]
1709pub struct MsgCancelUnbondingDelegation {
1710 #[prost(string, tag = "1")]
1711 pub delegator_address: ::prost::alloc::string::String,
1712 #[prost(string, tag = "2")]
1713 pub validator_address: ::prost::alloc::string::String,
1714 #[prost(message, optional, tag = "3")]
1716 pub amount: ::core::option::Option<super::super::base::v1beta1::Coin>,
1717 #[prost(int64, tag = "4")]
1719 #[serde(
1720 serialize_with = "crate::serde::as_str::serialize",
1721 deserialize_with = "crate::serde::as_str::deserialize"
1722 )]
1723 pub creation_height: i64,
1724}
1725#[allow(clippy::derive_partial_eq_without_eq)]
1729#[derive(
1730 Clone,
1731 PartialEq,
1732 Eq,
1733 ::prost::Message,
1734 ::serde::Serialize,
1735 ::serde::Deserialize,
1736 ::schemars::JsonSchema,
1737 CosmwasmExt,
1738)]
1739#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")]
1740pub struct MsgCancelUnbondingDelegationResponse {}
1741#[allow(clippy::derive_partial_eq_without_eq)]
1745#[derive(
1746 Clone,
1747 PartialEq,
1748 Eq,
1749 ::prost::Message,
1750 ::serde::Serialize,
1751 ::serde::Deserialize,
1752 ::schemars::JsonSchema,
1753 CosmwasmExt,
1754)]
1755#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUpdateParams")]
1756pub struct MsgUpdateParams {
1757 #[prost(string, tag = "1")]
1759 pub authority: ::prost::alloc::string::String,
1760 #[prost(message, optional, tag = "2")]
1764 pub params: ::core::option::Option<Params>,
1765}
1766#[allow(clippy::derive_partial_eq_without_eq)]
1771#[derive(
1772 Clone,
1773 PartialEq,
1774 Eq,
1775 ::prost::Message,
1776 ::serde::Serialize,
1777 ::serde::Deserialize,
1778 ::schemars::JsonSchema,
1779 CosmwasmExt,
1780)]
1781#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUpdateParamsResponse")]
1782pub struct MsgUpdateParamsResponse {}
1783pub struct StakingQuerier<'a, Q: cosmwasm_std::CustomQuery> {
1784 querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
1785}
1786impl<'a, Q: cosmwasm_std::CustomQuery> StakingQuerier<'a, Q> {
1787 pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
1788 Self { querier }
1789 }
1790 pub fn validators(
1791 &self,
1792 status: ::prost::alloc::string::String,
1793 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1794 ) -> Result<QueryValidatorsResponse, cosmwasm_std::StdError> {
1795 QueryValidatorsRequest { status, pagination }.query(self.querier)
1796 }
1797 pub fn validator(
1798 &self,
1799 validator_addr: ::prost::alloc::string::String,
1800 ) -> Result<QueryValidatorResponse, cosmwasm_std::StdError> {
1801 QueryValidatorRequest { validator_addr }.query(self.querier)
1802 }
1803 pub fn validator_delegations(
1804 &self,
1805 validator_addr: ::prost::alloc::string::String,
1806 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1807 ) -> Result<QueryValidatorDelegationsResponse, cosmwasm_std::StdError> {
1808 QueryValidatorDelegationsRequest {
1809 validator_addr,
1810 pagination,
1811 }
1812 .query(self.querier)
1813 }
1814 pub fn validator_unbonding_delegations(
1815 &self,
1816 validator_addr: ::prost::alloc::string::String,
1817 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1818 ) -> Result<QueryValidatorUnbondingDelegationsResponse, cosmwasm_std::StdError> {
1819 QueryValidatorUnbondingDelegationsRequest {
1820 validator_addr,
1821 pagination,
1822 }
1823 .query(self.querier)
1824 }
1825 pub fn delegation(
1826 &self,
1827 delegator_addr: ::prost::alloc::string::String,
1828 validator_addr: ::prost::alloc::string::String,
1829 ) -> Result<QueryDelegationResponse, cosmwasm_std::StdError> {
1830 QueryDelegationRequest {
1831 delegator_addr,
1832 validator_addr,
1833 }
1834 .query(self.querier)
1835 }
1836 pub fn unbonding_delegation(
1837 &self,
1838 delegator_addr: ::prost::alloc::string::String,
1839 validator_addr: ::prost::alloc::string::String,
1840 ) -> Result<QueryUnbondingDelegationResponse, cosmwasm_std::StdError> {
1841 QueryUnbondingDelegationRequest {
1842 delegator_addr,
1843 validator_addr,
1844 }
1845 .query(self.querier)
1846 }
1847 pub fn delegator_delegations(
1848 &self,
1849 delegator_addr: ::prost::alloc::string::String,
1850 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1851 ) -> Result<QueryDelegatorDelegationsResponse, cosmwasm_std::StdError> {
1852 QueryDelegatorDelegationsRequest {
1853 delegator_addr,
1854 pagination,
1855 }
1856 .query(self.querier)
1857 }
1858 pub fn delegator_unbonding_delegations(
1859 &self,
1860 delegator_addr: ::prost::alloc::string::String,
1861 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1862 ) -> Result<QueryDelegatorUnbondingDelegationsResponse, cosmwasm_std::StdError> {
1863 QueryDelegatorUnbondingDelegationsRequest {
1864 delegator_addr,
1865 pagination,
1866 }
1867 .query(self.querier)
1868 }
1869 pub fn redelegations(
1870 &self,
1871 delegator_addr: ::prost::alloc::string::String,
1872 src_validator_addr: ::prost::alloc::string::String,
1873 dst_validator_addr: ::prost::alloc::string::String,
1874 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1875 ) -> Result<QueryRedelegationsResponse, cosmwasm_std::StdError> {
1876 QueryRedelegationsRequest {
1877 delegator_addr,
1878 src_validator_addr,
1879 dst_validator_addr,
1880 pagination,
1881 }
1882 .query(self.querier)
1883 }
1884 pub fn delegator_validators(
1885 &self,
1886 delegator_addr: ::prost::alloc::string::String,
1887 pagination: ::core::option::Option<super::super::base::query::v1beta1::PageRequest>,
1888 ) -> Result<QueryDelegatorValidatorsResponse, cosmwasm_std::StdError> {
1889 QueryDelegatorValidatorsRequest {
1890 delegator_addr,
1891 pagination,
1892 }
1893 .query(self.querier)
1894 }
1895 pub fn delegator_validator(
1896 &self,
1897 delegator_addr: ::prost::alloc::string::String,
1898 validator_addr: ::prost::alloc::string::String,
1899 ) -> Result<QueryDelegatorValidatorResponse, cosmwasm_std::StdError> {
1900 QueryDelegatorValidatorRequest {
1901 delegator_addr,
1902 validator_addr,
1903 }
1904 .query(self.querier)
1905 }
1906 pub fn historical_info(
1907 &self,
1908 height: i64,
1909 ) -> Result<QueryHistoricalInfoResponse, cosmwasm_std::StdError> {
1910 QueryHistoricalInfoRequest { height }.query(self.querier)
1911 }
1912 pub fn pool(&self) -> Result<QueryPoolResponse, cosmwasm_std::StdError> {
1913 QueryPoolRequest {}.query(self.querier)
1914 }
1915 pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
1916 QueryParamsRequest {}.query(self.querier)
1917 }
1918}