omniflix_std/types/tendermint/
types.rs

1use omniflix_std_derive::CosmwasmExt;
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(
4    Clone,
5    PartialEq,
6    Eq,
7    ::prost::Message,
8    ::serde::Serialize,
9    ::serde::Deserialize,
10    ::schemars::JsonSchema,
11    CosmwasmExt,
12)]
13#[proto_message(type_url = "/tendermint.types.ValidatorSet")]
14pub struct ValidatorSet {
15    #[prost(message, repeated, tag = "1")]
16    pub validators: ::prost::alloc::vec::Vec<Validator>,
17    #[prost(message, optional, tag = "2")]
18    pub proposer: ::core::option::Option<Validator>,
19    #[prost(int64, tag = "3")]
20    #[serde(
21        serialize_with = "crate::serde::as_str::serialize",
22        deserialize_with = "crate::serde::as_str::deserialize"
23    )]
24    pub total_voting_power: i64,
25}
26#[allow(clippy::derive_partial_eq_without_eq)]
27#[derive(
28    Clone,
29    PartialEq,
30    Eq,
31    ::prost::Message,
32    ::serde::Serialize,
33    ::serde::Deserialize,
34    ::schemars::JsonSchema,
35    CosmwasmExt,
36)]
37#[proto_message(type_url = "/tendermint.types.Validator")]
38pub struct Validator {
39    #[prost(bytes = "vec", tag = "1")]
40    #[serde(
41        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
42        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
43    )]
44    pub address: ::prost::alloc::vec::Vec<u8>,
45    #[prost(message, optional, tag = "2")]
46    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
47    #[prost(int64, tag = "3")]
48    #[serde(
49        serialize_with = "crate::serde::as_str::serialize",
50        deserialize_with = "crate::serde::as_str::deserialize"
51    )]
52    pub voting_power: i64,
53    #[prost(int64, tag = "4")]
54    #[serde(
55        serialize_with = "crate::serde::as_str::serialize",
56        deserialize_with = "crate::serde::as_str::deserialize"
57    )]
58    pub proposer_priority: i64,
59}
60#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(
62    Clone,
63    PartialEq,
64    Eq,
65    ::prost::Message,
66    ::serde::Serialize,
67    ::serde::Deserialize,
68    ::schemars::JsonSchema,
69    CosmwasmExt,
70)]
71#[proto_message(type_url = "/tendermint.types.SimpleValidator")]
72pub struct SimpleValidator {
73    #[prost(message, optional, tag = "1")]
74    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
75    #[prost(int64, tag = "2")]
76    #[serde(
77        serialize_with = "crate::serde::as_str::serialize",
78        deserialize_with = "crate::serde::as_str::deserialize"
79    )]
80    pub voting_power: i64,
81}
82/// PartsetHeader
83#[allow(clippy::derive_partial_eq_without_eq)]
84#[derive(
85    Clone,
86    PartialEq,
87    Eq,
88    ::prost::Message,
89    ::serde::Serialize,
90    ::serde::Deserialize,
91    ::schemars::JsonSchema,
92    CosmwasmExt,
93)]
94#[proto_message(type_url = "/tendermint.types.PartSetHeader")]
95pub struct PartSetHeader {
96    #[prost(uint32, tag = "1")]
97    #[serde(
98        serialize_with = "crate::serde::as_str::serialize",
99        deserialize_with = "crate::serde::as_str::deserialize"
100    )]
101    pub total: u32,
102    #[prost(bytes = "vec", tag = "2")]
103    #[serde(
104        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
105        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
106    )]
107    pub hash: ::prost::alloc::vec::Vec<u8>,
108}
109#[allow(clippy::derive_partial_eq_without_eq)]
110#[derive(
111    Clone,
112    PartialEq,
113    Eq,
114    ::prost::Message,
115    ::serde::Serialize,
116    ::serde::Deserialize,
117    ::schemars::JsonSchema,
118    CosmwasmExt,
119)]
120#[proto_message(type_url = "/tendermint.types.Part")]
121pub struct Part {
122    #[prost(uint32, tag = "1")]
123    #[serde(
124        serialize_with = "crate::serde::as_str::serialize",
125        deserialize_with = "crate::serde::as_str::deserialize"
126    )]
127    pub index: u32,
128    #[prost(bytes = "vec", tag = "2")]
129    #[serde(
130        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
131        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
132    )]
133    pub bytes: ::prost::alloc::vec::Vec<u8>,
134    #[prost(message, optional, tag = "3")]
135    pub proof: ::core::option::Option<super::crypto::Proof>,
136}
137/// BlockID
138#[allow(clippy::derive_partial_eq_without_eq)]
139#[derive(
140    Clone,
141    PartialEq,
142    Eq,
143    ::prost::Message,
144    ::serde::Serialize,
145    ::serde::Deserialize,
146    ::schemars::JsonSchema,
147    CosmwasmExt,
148)]
149#[proto_message(type_url = "/tendermint.types.BlockID")]
150pub struct BlockId {
151    #[prost(bytes = "vec", tag = "1")]
152    #[serde(
153        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
154        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
155    )]
156    pub hash: ::prost::alloc::vec::Vec<u8>,
157    #[prost(message, optional, tag = "2")]
158    pub part_set_header: ::core::option::Option<PartSetHeader>,
159}
160/// Header defines the structure of a block header.
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(
163    Clone,
164    PartialEq,
165    Eq,
166    ::prost::Message,
167    ::serde::Serialize,
168    ::serde::Deserialize,
169    ::schemars::JsonSchema,
170    CosmwasmExt,
171)]
172#[proto_message(type_url = "/tendermint.types.Header")]
173pub struct Header {
174    /// basic block info
175    #[prost(message, optional, tag = "1")]
176    pub version: ::core::option::Option<super::version::Consensus>,
177    #[prost(string, tag = "2")]
178    #[serde(alias = "chainID")]
179    pub chain_id: ::prost::alloc::string::String,
180    #[prost(int64, tag = "3")]
181    #[serde(
182        serialize_with = "crate::serde::as_str::serialize",
183        deserialize_with = "crate::serde::as_str::deserialize"
184    )]
185    pub height: i64,
186    #[prost(message, optional, tag = "4")]
187    pub time: ::core::option::Option<crate::shim::Timestamp>,
188    /// prev block info
189    #[prost(message, optional, tag = "5")]
190    #[serde(alias = "last_blockID")]
191    pub last_block_id: ::core::option::Option<BlockId>,
192    /// hashes of block data
193    ///
194    /// commit from validators from the last block
195    #[prost(bytes = "vec", tag = "6")]
196    #[serde(
197        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
198        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
199    )]
200    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
201    /// transactions
202    #[prost(bytes = "vec", tag = "7")]
203    #[serde(
204        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
205        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
206    )]
207    pub data_hash: ::prost::alloc::vec::Vec<u8>,
208    /// hashes from the app output from the prev block
209    ///
210    /// validators for the current block
211    #[prost(bytes = "vec", tag = "8")]
212    #[serde(
213        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
214        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
215    )]
216    pub validators_hash: ::prost::alloc::vec::Vec<u8>,
217    /// validators for the next block
218    #[prost(bytes = "vec", tag = "9")]
219    #[serde(
220        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
221        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
222    )]
223    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
224    /// consensus params for current block
225    #[prost(bytes = "vec", tag = "10")]
226    #[serde(
227        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
228        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
229    )]
230    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
231    /// state after txs from the previous block
232    #[prost(bytes = "vec", tag = "11")]
233    #[serde(
234        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
235        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
236    )]
237    pub app_hash: ::prost::alloc::vec::Vec<u8>,
238    /// root hash of all results from the txs from the previous block
239    #[prost(bytes = "vec", tag = "12")]
240    #[serde(
241        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
242        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
243    )]
244    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
245    /// consensus info
246    ///
247    /// evidence included in the block
248    #[prost(bytes = "vec", tag = "13")]
249    #[serde(
250        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
251        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
252    )]
253    pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
254    /// original proposer of the block
255    #[prost(bytes = "vec", tag = "14")]
256    #[serde(
257        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
258        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
259    )]
260    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
261}
262/// Data contains the set of transactions included in the block
263#[allow(clippy::derive_partial_eq_without_eq)]
264#[derive(
265    Clone,
266    PartialEq,
267    Eq,
268    ::prost::Message,
269    ::serde::Serialize,
270    ::serde::Deserialize,
271    ::schemars::JsonSchema,
272    CosmwasmExt,
273)]
274#[proto_message(type_url = "/tendermint.types.Data")]
275pub struct Data {
276    /// Txs that will be applied by state @ block.Height+1.
277    /// NOTE: not all txs here are valid.  We're just agreeing on the order first.
278    /// This means that block.AppHash does not include these txs.
279    #[prost(bytes = "vec", repeated, tag = "1")]
280    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
281}
282/// Vote represents a prevote, precommit, or commit vote from validators for
283/// consensus.
284#[allow(clippy::derive_partial_eq_without_eq)]
285#[derive(
286    Clone,
287    PartialEq,
288    Eq,
289    ::prost::Message,
290    ::serde::Serialize,
291    ::serde::Deserialize,
292    ::schemars::JsonSchema,
293    CosmwasmExt,
294)]
295#[proto_message(type_url = "/tendermint.types.Vote")]
296pub struct Vote {
297    #[prost(enumeration = "SignedMsgType", tag = "1")]
298    #[serde(
299        serialize_with = "crate::serde::as_str::serialize",
300        deserialize_with = "crate::serde::as_str::deserialize"
301    )]
302    pub r#type: i32,
303    #[prost(int64, tag = "2")]
304    #[serde(
305        serialize_with = "crate::serde::as_str::serialize",
306        deserialize_with = "crate::serde::as_str::deserialize"
307    )]
308    pub height: i64,
309    #[prost(int32, tag = "3")]
310    #[serde(
311        serialize_with = "crate::serde::as_str::serialize",
312        deserialize_with = "crate::serde::as_str::deserialize"
313    )]
314    pub round: i32,
315    /// zero if vote is nil.
316    #[prost(message, optional, tag = "4")]
317    #[serde(alias = "blockID")]
318    pub block_id: ::core::option::Option<BlockId>,
319    #[prost(message, optional, tag = "5")]
320    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
321    #[prost(bytes = "vec", tag = "6")]
322    #[serde(
323        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
324        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
325    )]
326    pub validator_address: ::prost::alloc::vec::Vec<u8>,
327    #[prost(int32, tag = "7")]
328    #[serde(
329        serialize_with = "crate::serde::as_str::serialize",
330        deserialize_with = "crate::serde::as_str::deserialize"
331    )]
332    pub validator_index: i32,
333    #[prost(bytes = "vec", tag = "8")]
334    #[serde(
335        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
336        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
337    )]
338    pub signature: ::prost::alloc::vec::Vec<u8>,
339}
340/// Commit contains the evidence that a block was committed by a set of validators.
341#[allow(clippy::derive_partial_eq_without_eq)]
342#[derive(
343    Clone,
344    PartialEq,
345    Eq,
346    ::prost::Message,
347    ::serde::Serialize,
348    ::serde::Deserialize,
349    ::schemars::JsonSchema,
350    CosmwasmExt,
351)]
352#[proto_message(type_url = "/tendermint.types.Commit")]
353pub struct Commit {
354    #[prost(int64, tag = "1")]
355    #[serde(
356        serialize_with = "crate::serde::as_str::serialize",
357        deserialize_with = "crate::serde::as_str::deserialize"
358    )]
359    pub height: i64,
360    #[prost(int32, tag = "2")]
361    #[serde(
362        serialize_with = "crate::serde::as_str::serialize",
363        deserialize_with = "crate::serde::as_str::deserialize"
364    )]
365    pub round: i32,
366    #[prost(message, optional, tag = "3")]
367    #[serde(alias = "blockID")]
368    pub block_id: ::core::option::Option<BlockId>,
369    #[prost(message, repeated, tag = "4")]
370    pub signatures: ::prost::alloc::vec::Vec<CommitSig>,
371}
372/// CommitSig is a part of the Vote included in a Commit.
373#[allow(clippy::derive_partial_eq_without_eq)]
374#[derive(
375    Clone,
376    PartialEq,
377    Eq,
378    ::prost::Message,
379    ::serde::Serialize,
380    ::serde::Deserialize,
381    ::schemars::JsonSchema,
382    CosmwasmExt,
383)]
384#[proto_message(type_url = "/tendermint.types.CommitSig")]
385pub struct CommitSig {
386    #[prost(enumeration = "BlockIdFlag", tag = "1")]
387    #[serde(alias = "blockID_flag")]
388    #[serde(
389        serialize_with = "crate::serde::as_str::serialize",
390        deserialize_with = "crate::serde::as_str::deserialize"
391    )]
392    pub block_id_flag: i32,
393    #[prost(bytes = "vec", tag = "2")]
394    #[serde(
395        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
396        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
397    )]
398    pub validator_address: ::prost::alloc::vec::Vec<u8>,
399    #[prost(message, optional, tag = "3")]
400    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
401    #[prost(bytes = "vec", tag = "4")]
402    #[serde(
403        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
404        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
405    )]
406    pub signature: ::prost::alloc::vec::Vec<u8>,
407}
408#[allow(clippy::derive_partial_eq_without_eq)]
409#[derive(
410    Clone,
411    PartialEq,
412    Eq,
413    ::prost::Message,
414    ::serde::Serialize,
415    ::serde::Deserialize,
416    ::schemars::JsonSchema,
417    CosmwasmExt,
418)]
419#[proto_message(type_url = "/tendermint.types.Proposal")]
420pub struct Proposal {
421    #[prost(enumeration = "SignedMsgType", tag = "1")]
422    #[serde(
423        serialize_with = "crate::serde::as_str::serialize",
424        deserialize_with = "crate::serde::as_str::deserialize"
425    )]
426    pub r#type: i32,
427    #[prost(int64, tag = "2")]
428    #[serde(
429        serialize_with = "crate::serde::as_str::serialize",
430        deserialize_with = "crate::serde::as_str::deserialize"
431    )]
432    pub height: i64,
433    #[prost(int32, tag = "3")]
434    #[serde(
435        serialize_with = "crate::serde::as_str::serialize",
436        deserialize_with = "crate::serde::as_str::deserialize"
437    )]
438    pub round: i32,
439    #[prost(int32, tag = "4")]
440    #[serde(
441        serialize_with = "crate::serde::as_str::serialize",
442        deserialize_with = "crate::serde::as_str::deserialize"
443    )]
444    pub pol_round: i32,
445    #[prost(message, optional, tag = "5")]
446    #[serde(alias = "blockID")]
447    pub block_id: ::core::option::Option<BlockId>,
448    #[prost(message, optional, tag = "6")]
449    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
450    #[prost(bytes = "vec", tag = "7")]
451    #[serde(
452        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
453        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
454    )]
455    pub signature: ::prost::alloc::vec::Vec<u8>,
456}
457#[allow(clippy::derive_partial_eq_without_eq)]
458#[derive(
459    Clone,
460    PartialEq,
461    Eq,
462    ::prost::Message,
463    ::serde::Serialize,
464    ::serde::Deserialize,
465    ::schemars::JsonSchema,
466    CosmwasmExt,
467)]
468#[proto_message(type_url = "/tendermint.types.SignedHeader")]
469pub struct SignedHeader {
470    #[prost(message, optional, tag = "1")]
471    pub header: ::core::option::Option<Header>,
472    #[prost(message, optional, tag = "2")]
473    pub commit: ::core::option::Option<Commit>,
474}
475#[allow(clippy::derive_partial_eq_without_eq)]
476#[derive(
477    Clone,
478    PartialEq,
479    Eq,
480    ::prost::Message,
481    ::serde::Serialize,
482    ::serde::Deserialize,
483    ::schemars::JsonSchema,
484    CosmwasmExt,
485)]
486#[proto_message(type_url = "/tendermint.types.LightBlock")]
487pub struct LightBlock {
488    #[prost(message, optional, tag = "1")]
489    pub signed_header: ::core::option::Option<SignedHeader>,
490    #[prost(message, optional, tag = "2")]
491    pub validator_set: ::core::option::Option<ValidatorSet>,
492}
493#[allow(clippy::derive_partial_eq_without_eq)]
494#[derive(
495    Clone,
496    PartialEq,
497    Eq,
498    ::prost::Message,
499    ::serde::Serialize,
500    ::serde::Deserialize,
501    ::schemars::JsonSchema,
502    CosmwasmExt,
503)]
504#[proto_message(type_url = "/tendermint.types.BlockMeta")]
505pub struct BlockMeta {
506    #[prost(message, optional, tag = "1")]
507    #[serde(alias = "blockID")]
508    pub block_id: ::core::option::Option<BlockId>,
509    #[prost(int64, tag = "2")]
510    #[serde(
511        serialize_with = "crate::serde::as_str::serialize",
512        deserialize_with = "crate::serde::as_str::deserialize"
513    )]
514    pub block_size: i64,
515    #[prost(message, optional, tag = "3")]
516    pub header: ::core::option::Option<Header>,
517    #[prost(int64, tag = "4")]
518    #[serde(
519        serialize_with = "crate::serde::as_str::serialize",
520        deserialize_with = "crate::serde::as_str::deserialize"
521    )]
522    pub num_txs: i64,
523}
524/// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
525#[allow(clippy::derive_partial_eq_without_eq)]
526#[derive(
527    Clone,
528    PartialEq,
529    Eq,
530    ::prost::Message,
531    ::serde::Serialize,
532    ::serde::Deserialize,
533    ::schemars::JsonSchema,
534    CosmwasmExt,
535)]
536#[proto_message(type_url = "/tendermint.types.TxProof")]
537pub struct TxProof {
538    #[prost(bytes = "vec", tag = "1")]
539    #[serde(
540        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
541        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
542    )]
543    pub root_hash: ::prost::alloc::vec::Vec<u8>,
544    #[prost(bytes = "vec", tag = "2")]
545    #[serde(
546        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
547        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
548    )]
549    pub data: ::prost::alloc::vec::Vec<u8>,
550    #[prost(message, optional, tag = "3")]
551    pub proof: ::core::option::Option<super::crypto::Proof>,
552}
553/// BlockIdFlag indicates which BlcokID the signature is for
554#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
555#[repr(i32)]
556#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
557pub enum BlockIdFlag {
558    Unknown = 0,
559    Absent = 1,
560    Commit = 2,
561    Nil = 3,
562}
563impl BlockIdFlag {
564    /// String value of the enum field names used in the ProtoBuf definition.
565    ///
566    /// The values are not transformed in any way and thus are considered stable
567    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
568    pub fn as_str_name(&self) -> &'static str {
569        match self {
570            BlockIdFlag::Unknown => "BLOCK_ID_FLAG_UNKNOWN",
571            BlockIdFlag::Absent => "BLOCK_ID_FLAG_ABSENT",
572            BlockIdFlag::Commit => "BLOCK_ID_FLAG_COMMIT",
573            BlockIdFlag::Nil => "BLOCK_ID_FLAG_NIL",
574        }
575    }
576    /// Creates an enum from field names used in the ProtoBuf definition.
577    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
578        match value {
579            "BLOCK_ID_FLAG_UNKNOWN" => Some(Self::Unknown),
580            "BLOCK_ID_FLAG_ABSENT" => Some(Self::Absent),
581            "BLOCK_ID_FLAG_COMMIT" => Some(Self::Commit),
582            "BLOCK_ID_FLAG_NIL" => Some(Self::Nil),
583            _ => None,
584        }
585    }
586}
587/// SignedMsgType is a type of signed message in the consensus.
588#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
589#[repr(i32)]
590#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)]
591pub enum SignedMsgType {
592    Unknown = 0,
593    /// Votes
594    Prevote = 1,
595    Precommit = 2,
596    /// Proposals
597    Proposal = 32,
598}
599impl SignedMsgType {
600    /// String value of the enum field names used in the ProtoBuf definition.
601    ///
602    /// The values are not transformed in any way and thus are considered stable
603    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
604    pub fn as_str_name(&self) -> &'static str {
605        match self {
606            SignedMsgType::Unknown => "SIGNED_MSG_TYPE_UNKNOWN",
607            SignedMsgType::Prevote => "SIGNED_MSG_TYPE_PREVOTE",
608            SignedMsgType::Precommit => "SIGNED_MSG_TYPE_PRECOMMIT",
609            SignedMsgType::Proposal => "SIGNED_MSG_TYPE_PROPOSAL",
610        }
611    }
612    /// Creates an enum from field names used in the ProtoBuf definition.
613    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
614        match value {
615            "SIGNED_MSG_TYPE_UNKNOWN" => Some(Self::Unknown),
616            "SIGNED_MSG_TYPE_PREVOTE" => Some(Self::Prevote),
617            "SIGNED_MSG_TYPE_PRECOMMIT" => Some(Self::Precommit),
618            "SIGNED_MSG_TYPE_PROPOSAL" => Some(Self::Proposal),
619            _ => None,
620        }
621    }
622}
623/// ConsensusParams contains consensus critical parameters that determine the
624/// validity of blocks.
625#[allow(clippy::derive_partial_eq_without_eq)]
626#[derive(
627    Clone,
628    PartialEq,
629    Eq,
630    ::prost::Message,
631    ::serde::Serialize,
632    ::serde::Deserialize,
633    ::schemars::JsonSchema,
634    CosmwasmExt,
635)]
636#[proto_message(type_url = "/tendermint.types.ConsensusParams")]
637pub struct ConsensusParams {
638    #[prost(message, optional, tag = "1")]
639    pub block: ::core::option::Option<BlockParams>,
640    #[prost(message, optional, tag = "2")]
641    pub evidence: ::core::option::Option<EvidenceParams>,
642    #[prost(message, optional, tag = "3")]
643    pub validator: ::core::option::Option<ValidatorParams>,
644    #[prost(message, optional, tag = "4")]
645    pub version: ::core::option::Option<VersionParams>,
646}
647/// BlockParams contains limits on the block size.
648#[allow(clippy::derive_partial_eq_without_eq)]
649#[derive(
650    Clone,
651    PartialEq,
652    Eq,
653    ::prost::Message,
654    ::serde::Serialize,
655    ::serde::Deserialize,
656    ::schemars::JsonSchema,
657    CosmwasmExt,
658)]
659#[proto_message(type_url = "/tendermint.types.BlockParams")]
660pub struct BlockParams {
661    /// Max block size, in bytes.
662    /// Note: must be greater than 0
663    #[prost(int64, tag = "1")]
664    #[serde(
665        serialize_with = "crate::serde::as_str::serialize",
666        deserialize_with = "crate::serde::as_str::deserialize"
667    )]
668    pub max_bytes: i64,
669    /// Max gas per block.
670    /// Note: must be greater or equal to -1
671    #[prost(int64, tag = "2")]
672    #[serde(
673        serialize_with = "crate::serde::as_str::serialize",
674        deserialize_with = "crate::serde::as_str::deserialize"
675    )]
676    pub max_gas: i64,
677}
678/// EvidenceParams determine how we handle evidence of malfeasance.
679#[allow(clippy::derive_partial_eq_without_eq)]
680#[derive(
681    Clone,
682    PartialEq,
683    Eq,
684    ::prost::Message,
685    ::serde::Serialize,
686    ::serde::Deserialize,
687    ::schemars::JsonSchema,
688    CosmwasmExt,
689)]
690#[proto_message(type_url = "/tendermint.types.EvidenceParams")]
691pub struct EvidenceParams {
692    /// Max age of evidence, in blocks.
693    ///
694    /// The basic formula for calculating this is: MaxAgeDuration / {average block
695    /// time}.
696    #[prost(int64, tag = "1")]
697    #[serde(
698        serialize_with = "crate::serde::as_str::serialize",
699        deserialize_with = "crate::serde::as_str::deserialize"
700    )]
701    pub max_age_num_blocks: i64,
702    /// Max age of evidence, in time.
703    ///
704    /// It should correspond with an app's "unbonding period" or other similar
705    /// mechanism for handling [Nothing-At-Stake
706    /// attacks](<https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed>).
707    #[prost(message, optional, tag = "2")]
708    pub max_age_duration: ::core::option::Option<crate::shim::Duration>,
709    /// This sets the maximum size of total evidence in bytes that can be committed in a single block.
710    /// and should fall comfortably under the max block bytes.
711    /// Default is 1048576 or 1MB
712    #[prost(int64, tag = "3")]
713    #[serde(
714        serialize_with = "crate::serde::as_str::serialize",
715        deserialize_with = "crate::serde::as_str::deserialize"
716    )]
717    pub max_bytes: i64,
718}
719/// ValidatorParams restrict the public key types validators can use.
720/// NOTE: uses ABCI pubkey naming, not Amino names.
721#[allow(clippy::derive_partial_eq_without_eq)]
722#[derive(
723    Clone,
724    PartialEq,
725    Eq,
726    ::prost::Message,
727    ::serde::Serialize,
728    ::serde::Deserialize,
729    ::schemars::JsonSchema,
730    CosmwasmExt,
731)]
732#[proto_message(type_url = "/tendermint.types.ValidatorParams")]
733pub struct ValidatorParams {
734    #[prost(string, repeated, tag = "1")]
735    pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
736}
737/// VersionParams contains the ABCI application version.
738#[allow(clippy::derive_partial_eq_without_eq)]
739#[derive(
740    Clone,
741    PartialEq,
742    Eq,
743    ::prost::Message,
744    ::serde::Serialize,
745    ::serde::Deserialize,
746    ::schemars::JsonSchema,
747    CosmwasmExt,
748)]
749#[proto_message(type_url = "/tendermint.types.VersionParams")]
750pub struct VersionParams {
751    #[prost(uint64, tag = "1")]
752    #[serde(
753        serialize_with = "crate::serde::as_str::serialize",
754        deserialize_with = "crate::serde::as_str::deserialize"
755    )]
756    pub app: u64,
757}
758/// HashedParams is a subset of ConsensusParams.
759///
760/// It is hashed into the Header.ConsensusHash.
761#[allow(clippy::derive_partial_eq_without_eq)]
762#[derive(
763    Clone,
764    PartialEq,
765    Eq,
766    ::prost::Message,
767    ::serde::Serialize,
768    ::serde::Deserialize,
769    ::schemars::JsonSchema,
770    CosmwasmExt,
771)]
772#[proto_message(type_url = "/tendermint.types.HashedParams")]
773pub struct HashedParams {
774    #[prost(int64, tag = "1")]
775    #[serde(
776        serialize_with = "crate::serde::as_str::serialize",
777        deserialize_with = "crate::serde::as_str::deserialize"
778    )]
779    pub block_max_bytes: i64,
780    #[prost(int64, tag = "2")]
781    #[serde(
782        serialize_with = "crate::serde::as_str::serialize",
783        deserialize_with = "crate::serde::as_str::deserialize"
784    )]
785    pub block_max_gas: i64,
786}
787#[allow(clippy::derive_partial_eq_without_eq)]
788#[derive(
789    Clone,
790    PartialEq,
791    Eq,
792    ::prost::Message,
793    ::serde::Serialize,
794    ::serde::Deserialize,
795    ::schemars::JsonSchema,
796    CosmwasmExt,
797)]
798#[proto_message(type_url = "/tendermint.types.Evidence")]
799pub struct Evidence {
800    #[prost(oneof = "evidence::Sum", tags = "1, 2")]
801    pub sum: ::core::option::Option<evidence::Sum>,
802}
803/// Nested message and enum types in `Evidence`.
804pub mod evidence {
805    use omniflix_std_derive::CosmwasmExt;
806    #[allow(clippy::derive_partial_eq_without_eq)]
807    #[derive(
808        Clone,
809        PartialEq,
810        Eq,
811        ::prost::Oneof,
812        ::serde::Serialize,
813        ::serde::Deserialize,
814        ::schemars::JsonSchema,
815    )]
816    pub enum Sum {
817        #[prost(message, tag = "1")]
818        DuplicateVoteEvidence(super::DuplicateVoteEvidence),
819        #[prost(message, tag = "2")]
820        LightClientAttackEvidence(super::LightClientAttackEvidence),
821    }
822}
823/// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
824#[allow(clippy::derive_partial_eq_without_eq)]
825#[derive(
826    Clone,
827    PartialEq,
828    Eq,
829    ::prost::Message,
830    ::serde::Serialize,
831    ::serde::Deserialize,
832    ::schemars::JsonSchema,
833    CosmwasmExt,
834)]
835#[proto_message(type_url = "/tendermint.types.DuplicateVoteEvidence")]
836pub struct DuplicateVoteEvidence {
837    #[prost(message, optional, tag = "1")]
838    pub vote_a: ::core::option::Option<Vote>,
839    #[prost(message, optional, tag = "2")]
840    pub vote_b: ::core::option::Option<Vote>,
841    #[prost(int64, tag = "3")]
842    #[serde(
843        serialize_with = "crate::serde::as_str::serialize",
844        deserialize_with = "crate::serde::as_str::deserialize"
845    )]
846    pub total_voting_power: i64,
847    #[prost(int64, tag = "4")]
848    #[serde(
849        serialize_with = "crate::serde::as_str::serialize",
850        deserialize_with = "crate::serde::as_str::deserialize"
851    )]
852    pub validator_power: i64,
853    #[prost(message, optional, tag = "5")]
854    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
855}
856/// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
857#[allow(clippy::derive_partial_eq_without_eq)]
858#[derive(
859    Clone,
860    PartialEq,
861    Eq,
862    ::prost::Message,
863    ::serde::Serialize,
864    ::serde::Deserialize,
865    ::schemars::JsonSchema,
866    CosmwasmExt,
867)]
868#[proto_message(type_url = "/tendermint.types.LightClientAttackEvidence")]
869pub struct LightClientAttackEvidence {
870    #[prost(message, optional, tag = "1")]
871    pub conflicting_block: ::core::option::Option<LightBlock>,
872    #[prost(int64, tag = "2")]
873    #[serde(
874        serialize_with = "crate::serde::as_str::serialize",
875        deserialize_with = "crate::serde::as_str::deserialize"
876    )]
877    pub common_height: i64,
878    #[prost(message, repeated, tag = "3")]
879    pub byzantine_validators: ::prost::alloc::vec::Vec<Validator>,
880    #[prost(int64, tag = "4")]
881    #[serde(
882        serialize_with = "crate::serde::as_str::serialize",
883        deserialize_with = "crate::serde::as_str::deserialize"
884    )]
885    pub total_voting_power: i64,
886    #[prost(message, optional, tag = "5")]
887    pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
888}
889#[allow(clippy::derive_partial_eq_without_eq)]
890#[derive(
891    Clone,
892    PartialEq,
893    Eq,
894    ::prost::Message,
895    ::serde::Serialize,
896    ::serde::Deserialize,
897    ::schemars::JsonSchema,
898    CosmwasmExt,
899)]
900#[proto_message(type_url = "/tendermint.types.EvidenceList")]
901pub struct EvidenceList {
902    #[prost(message, repeated, tag = "1")]
903    pub evidence: ::prost::alloc::vec::Vec<Evidence>,
904}
905#[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 = "/tendermint.types.Block")]
917pub struct Block {
918    #[prost(message, optional, tag = "1")]
919    pub header: ::core::option::Option<Header>,
920    #[prost(message, optional, tag = "2")]
921    pub data: ::core::option::Option<Data>,
922    #[prost(message, optional, tag = "3")]
923    pub evidence: ::core::option::Option<EvidenceList>,
924    #[prost(message, optional, tag = "4")]
925    pub last_commit: ::core::option::Option<Commit>,
926}