provwasm_std/types/tendermint/
abci.rs

1use provwasm_proc_macro::CosmwasmExt;
2#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
3#[proto_message(type_url = "/tendermint.abci.Request")]
4pub struct Request {
5    #[prost(
6        oneof = "request::Value",
7        tags = "1, 2, 3, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20"
8    )]
9    pub value: ::core::option::Option<request::Value>,
10}
11/// Nested message and enum types in `Request`.
12pub mod request {
13    use provwasm_proc_macro::CosmwasmExt;
14    #[derive(Clone, PartialEq, Eq, ::prost::Oneof, ::schemars::JsonSchema)]
15    pub enum Value {
16        #[prost(message, tag = "1")]
17        Echo(super::RequestEcho),
18        #[prost(message, tag = "2")]
19        Flush(super::RequestFlush),
20        #[prost(message, tag = "3")]
21        Info(super::RequestInfo),
22        #[prost(message, tag = "5")]
23        InitChain(super::RequestInitChain),
24        #[prost(message, tag = "6")]
25        Query(super::RequestQuery),
26        #[prost(message, tag = "8")]
27        CheckTx(super::RequestCheckTx),
28        #[prost(message, tag = "11")]
29        Commit(super::RequestCommit),
30        #[prost(message, tag = "12")]
31        ListSnapshots(super::RequestListSnapshots),
32        #[prost(message, tag = "13")]
33        OfferSnapshot(super::RequestOfferSnapshot),
34        #[prost(message, tag = "14")]
35        LoadSnapshotChunk(super::RequestLoadSnapshotChunk),
36        #[prost(message, tag = "15")]
37        ApplySnapshotChunk(super::RequestApplySnapshotChunk),
38        #[prost(message, tag = "16")]
39        PrepareProposal(super::RequestPrepareProposal),
40        #[prost(message, tag = "17")]
41        ProcessProposal(super::RequestProcessProposal),
42        #[prost(message, tag = "18")]
43        ExtendVote(super::RequestExtendVote),
44        #[prost(message, tag = "19")]
45        VerifyVoteExtension(super::RequestVerifyVoteExtension),
46        #[prost(message, tag = "20")]
47        FinalizeBlock(super::RequestFinalizeBlock),
48    }
49}
50#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
51#[proto_message(type_url = "/tendermint.abci.RequestEcho")]
52pub struct RequestEcho {
53    #[prost(string, tag = "1")]
54    pub message: ::prost::alloc::string::String,
55}
56#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
57#[proto_message(type_url = "/tendermint.abci.RequestFlush")]
58pub struct RequestFlush {}
59#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
60#[proto_message(type_url = "/tendermint.abci.RequestInfo")]
61pub struct RequestInfo {
62    #[prost(string, tag = "1")]
63    pub version: ::prost::alloc::string::String,
64    #[prost(uint64, tag = "2")]
65    pub block_version: u64,
66    #[prost(uint64, tag = "3")]
67    pub p2p_version: u64,
68    #[prost(string, tag = "4")]
69    pub abci_version: ::prost::alloc::string::String,
70}
71#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
72#[proto_message(type_url = "/tendermint.abci.RequestInitChain")]
73pub struct RequestInitChain {
74    #[prost(message, optional, tag = "1")]
75    pub time: ::core::option::Option<crate::shim::Timestamp>,
76    #[prost(string, tag = "2")]
77    pub chain_id: ::prost::alloc::string::String,
78    #[prost(message, optional, tag = "3")]
79    pub consensus_params: ::core::option::Option<super::types::ConsensusParams>,
80    #[prost(message, repeated, tag = "4")]
81    pub validators: ::prost::alloc::vec::Vec<ValidatorUpdate>,
82    #[prost(bytes = "vec", tag = "5")]
83    pub app_state_bytes: ::prost::alloc::vec::Vec<u8>,
84    #[prost(int64, tag = "6")]
85    pub initial_height: i64,
86}
87#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
88#[proto_message(type_url = "/tendermint.abci.RequestQuery")]
89pub struct RequestQuery {
90    #[prost(bytes = "vec", tag = "1")]
91    pub data: ::prost::alloc::vec::Vec<u8>,
92    #[prost(string, tag = "2")]
93    pub path: ::prost::alloc::string::String,
94    #[prost(int64, tag = "3")]
95    pub height: i64,
96    #[prost(bool, tag = "4")]
97    pub prove: bool,
98}
99#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
100#[proto_message(type_url = "/tendermint.abci.RequestCheckTx")]
101pub struct RequestCheckTx {
102    #[prost(bytes = "vec", tag = "1")]
103    pub tx: ::prost::alloc::vec::Vec<u8>,
104    #[prost(enumeration = "CheckTxType", tag = "2")]
105    pub r#type: i32,
106}
107#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
108#[proto_message(type_url = "/tendermint.abci.RequestCommit")]
109pub struct RequestCommit {}
110/// lists available snapshots
111#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
112#[proto_message(type_url = "/tendermint.abci.RequestListSnapshots")]
113pub struct RequestListSnapshots {}
114/// offers a snapshot to the application
115#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
116#[proto_message(type_url = "/tendermint.abci.RequestOfferSnapshot")]
117pub struct RequestOfferSnapshot {
118    /// snapshot offered by peers
119    #[prost(message, optional, tag = "1")]
120    pub snapshot: ::core::option::Option<Snapshot>,
121    /// light client-verified app hash for snapshot height
122    #[prost(bytes = "vec", tag = "2")]
123    pub app_hash: ::prost::alloc::vec::Vec<u8>,
124}
125/// loads a snapshot chunk
126#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
127#[proto_message(type_url = "/tendermint.abci.RequestLoadSnapshotChunk")]
128pub struct RequestLoadSnapshotChunk {
129    #[prost(uint64, tag = "1")]
130    pub height: u64,
131    #[prost(uint32, tag = "2")]
132    pub format: u32,
133    #[prost(uint32, tag = "3")]
134    pub chunk: u32,
135}
136/// Applies a snapshot chunk
137#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
138#[proto_message(type_url = "/tendermint.abci.RequestApplySnapshotChunk")]
139pub struct RequestApplySnapshotChunk {
140    #[prost(uint32, tag = "1")]
141    pub index: u32,
142    #[prost(bytes = "vec", tag = "2")]
143    pub chunk: ::prost::alloc::vec::Vec<u8>,
144    #[prost(string, tag = "3")]
145    pub sender: ::prost::alloc::string::String,
146}
147#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
148#[proto_message(type_url = "/tendermint.abci.RequestPrepareProposal")]
149pub struct RequestPrepareProposal {
150    /// the modified transactions cannot exceed this size.
151    #[prost(int64, tag = "1")]
152    pub max_tx_bytes: i64,
153    /// txs is an array of transactions that will be included in a block,
154    /// sent to the app for possible modifications.
155    #[prost(bytes = "vec", repeated, tag = "2")]
156    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
157    #[prost(message, optional, tag = "3")]
158    pub local_last_commit: ::core::option::Option<ExtendedCommitInfo>,
159    #[prost(message, repeated, tag = "4")]
160    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
161    #[prost(int64, tag = "5")]
162    pub height: i64,
163    #[prost(message, optional, tag = "6")]
164    pub time: ::core::option::Option<crate::shim::Timestamp>,
165    #[prost(bytes = "vec", tag = "7")]
166    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
167    /// address of the public key of the validator proposing the block.
168    #[prost(bytes = "vec", tag = "8")]
169    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
170}
171#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
172#[proto_message(type_url = "/tendermint.abci.RequestProcessProposal")]
173pub struct RequestProcessProposal {
174    #[prost(bytes = "vec", repeated, tag = "1")]
175    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
176    #[prost(message, optional, tag = "2")]
177    pub proposed_last_commit: ::core::option::Option<CommitInfo>,
178    #[prost(message, repeated, tag = "3")]
179    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
180    /// hash is the merkle root hash of the fields of the proposed block.
181    #[prost(bytes = "vec", tag = "4")]
182    pub hash: ::prost::alloc::vec::Vec<u8>,
183    #[prost(int64, tag = "5")]
184    pub height: i64,
185    #[prost(message, optional, tag = "6")]
186    pub time: ::core::option::Option<crate::shim::Timestamp>,
187    #[prost(bytes = "vec", tag = "7")]
188    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
189    /// address of the public key of the original proposer of the block.
190    #[prost(bytes = "vec", tag = "8")]
191    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
192}
193/// Extends a vote with application-injected data
194#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
195#[proto_message(type_url = "/tendermint.abci.RequestExtendVote")]
196pub struct RequestExtendVote {
197    /// the hash of the block that this vote may be referring to
198    #[prost(bytes = "vec", tag = "1")]
199    pub hash: ::prost::alloc::vec::Vec<u8>,
200    /// the height of the extended vote
201    #[prost(int64, tag = "2")]
202    pub height: i64,
203    /// info of the block that this vote may be referring to
204    #[prost(message, optional, tag = "3")]
205    pub time: ::core::option::Option<crate::shim::Timestamp>,
206    #[prost(bytes = "vec", repeated, tag = "4")]
207    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
208    #[prost(message, optional, tag = "5")]
209    pub proposed_last_commit: ::core::option::Option<CommitInfo>,
210    #[prost(message, repeated, tag = "6")]
211    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
212    #[prost(bytes = "vec", tag = "7")]
213    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
214    /// address of the public key of the original proposer of the block.
215    #[prost(bytes = "vec", tag = "8")]
216    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
217}
218/// Verify the vote extension
219#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
220#[proto_message(type_url = "/tendermint.abci.RequestVerifyVoteExtension")]
221pub struct RequestVerifyVoteExtension {
222    /// the hash of the block that this received vote corresponds to
223    #[prost(bytes = "vec", tag = "1")]
224    pub hash: ::prost::alloc::vec::Vec<u8>,
225    /// the validator that signed the vote extension
226    #[prost(bytes = "vec", tag = "2")]
227    pub validator_address: ::prost::alloc::vec::Vec<u8>,
228    #[prost(int64, tag = "3")]
229    pub height: i64,
230    #[prost(bytes = "vec", tag = "4")]
231    pub vote_extension: ::prost::alloc::vec::Vec<u8>,
232}
233#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
234#[proto_message(type_url = "/tendermint.abci.RequestFinalizeBlock")]
235pub struct RequestFinalizeBlock {
236    #[prost(bytes = "vec", repeated, tag = "1")]
237    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
238    #[prost(message, optional, tag = "2")]
239    pub decided_last_commit: ::core::option::Option<CommitInfo>,
240    #[prost(message, repeated, tag = "3")]
241    pub misbehavior: ::prost::alloc::vec::Vec<Misbehavior>,
242    /// hash is the merkle root hash of the fields of the decided block.
243    #[prost(bytes = "vec", tag = "4")]
244    pub hash: ::prost::alloc::vec::Vec<u8>,
245    #[prost(int64, tag = "5")]
246    pub height: i64,
247    #[prost(message, optional, tag = "6")]
248    pub time: ::core::option::Option<crate::shim::Timestamp>,
249    #[prost(bytes = "vec", tag = "7")]
250    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
251    /// proposer_address is the address of the public key of the original proposer of the block.
252    #[prost(bytes = "vec", tag = "8")]
253    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
254}
255#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
256#[proto_message(type_url = "/tendermint.abci.Response")]
257pub struct Response {
258    #[prost(
259        oneof = "response::Value",
260        tags = "1, 2, 3, 4, 6, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21"
261    )]
262    pub value: ::core::option::Option<response::Value>,
263}
264/// Nested message and enum types in `Response`.
265pub mod response {
266    use provwasm_proc_macro::CosmwasmExt;
267    #[derive(Clone, PartialEq, Eq, ::prost::Oneof, ::schemars::JsonSchema)]
268    pub enum Value {
269        #[prost(message, tag = "1")]
270        Exception(super::ResponseException),
271        #[prost(message, tag = "2")]
272        Echo(super::ResponseEcho),
273        #[prost(message, tag = "3")]
274        Flush(super::ResponseFlush),
275        #[prost(message, tag = "4")]
276        Info(super::ResponseInfo),
277        #[prost(message, tag = "6")]
278        InitChain(super::ResponseInitChain),
279        #[prost(message, tag = "7")]
280        Query(super::ResponseQuery),
281        #[prost(message, tag = "9")]
282        CheckTx(super::ResponseCheckTx),
283        #[prost(message, tag = "12")]
284        Commit(super::ResponseCommit),
285        #[prost(message, tag = "13")]
286        ListSnapshots(super::ResponseListSnapshots),
287        #[prost(message, tag = "14")]
288        OfferSnapshot(super::ResponseOfferSnapshot),
289        #[prost(message, tag = "15")]
290        LoadSnapshotChunk(super::ResponseLoadSnapshotChunk),
291        #[prost(message, tag = "16")]
292        ApplySnapshotChunk(super::ResponseApplySnapshotChunk),
293        #[prost(message, tag = "17")]
294        PrepareProposal(super::ResponsePrepareProposal),
295        #[prost(message, tag = "18")]
296        ProcessProposal(super::ResponseProcessProposal),
297        #[prost(message, tag = "19")]
298        ExtendVote(super::ResponseExtendVote),
299        #[prost(message, tag = "20")]
300        VerifyVoteExtension(super::ResponseVerifyVoteExtension),
301        #[prost(message, tag = "21")]
302        FinalizeBlock(super::ResponseFinalizeBlock),
303    }
304}
305/// nondeterministic
306#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
307#[proto_message(type_url = "/tendermint.abci.ResponseException")]
308pub struct ResponseException {
309    #[prost(string, tag = "1")]
310    pub error: ::prost::alloc::string::String,
311}
312#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
313#[proto_message(type_url = "/tendermint.abci.ResponseEcho")]
314pub struct ResponseEcho {
315    #[prost(string, tag = "1")]
316    pub message: ::prost::alloc::string::String,
317}
318#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
319#[proto_message(type_url = "/tendermint.abci.ResponseFlush")]
320pub struct ResponseFlush {}
321#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
322#[proto_message(type_url = "/tendermint.abci.ResponseInfo")]
323pub struct ResponseInfo {
324    #[prost(string, tag = "1")]
325    pub data: ::prost::alloc::string::String,
326    #[prost(string, tag = "2")]
327    pub version: ::prost::alloc::string::String,
328    #[prost(uint64, tag = "3")]
329    pub app_version: u64,
330    #[prost(int64, tag = "4")]
331    pub last_block_height: i64,
332    #[prost(bytes = "vec", tag = "5")]
333    pub last_block_app_hash: ::prost::alloc::vec::Vec<u8>,
334}
335#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
336#[proto_message(type_url = "/tendermint.abci.ResponseInitChain")]
337pub struct ResponseInitChain {
338    #[prost(message, optional, tag = "1")]
339    pub consensus_params: ::core::option::Option<super::types::ConsensusParams>,
340    #[prost(message, repeated, tag = "2")]
341    pub validators: ::prost::alloc::vec::Vec<ValidatorUpdate>,
342    #[prost(bytes = "vec", tag = "3")]
343    pub app_hash: ::prost::alloc::vec::Vec<u8>,
344}
345#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
346#[proto_message(type_url = "/tendermint.abci.ResponseQuery")]
347pub struct ResponseQuery {
348    #[prost(uint32, tag = "1")]
349    pub code: u32,
350    /// bytes data = 2; // use "value" instead.
351    ///
352    /// nondeterministic
353    #[prost(string, tag = "3")]
354    pub log: ::prost::alloc::string::String,
355    /// nondeterministic
356    #[prost(string, tag = "4")]
357    pub info: ::prost::alloc::string::String,
358    #[prost(int64, tag = "5")]
359    pub index: i64,
360    #[prost(bytes = "vec", tag = "6")]
361    pub key: ::prost::alloc::vec::Vec<u8>,
362    #[prost(bytes = "vec", tag = "7")]
363    pub value: ::prost::alloc::vec::Vec<u8>,
364    #[prost(message, optional, tag = "8")]
365    pub proof_ops: ::core::option::Option<super::crypto::ProofOps>,
366    #[prost(int64, tag = "9")]
367    pub height: i64,
368    #[prost(string, tag = "10")]
369    pub codespace: ::prost::alloc::string::String,
370}
371#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
372#[proto_message(type_url = "/tendermint.abci.ResponseCheckTx")]
373pub struct ResponseCheckTx {
374    #[prost(uint32, tag = "1")]
375    pub code: u32,
376    #[prost(bytes = "vec", tag = "2")]
377    pub data: ::prost::alloc::vec::Vec<u8>,
378    /// nondeterministic
379    #[prost(string, tag = "3")]
380    pub log: ::prost::alloc::string::String,
381    /// nondeterministic
382    #[prost(string, tag = "4")]
383    pub info: ::prost::alloc::string::String,
384    #[prost(int64, tag = "5")]
385    pub gas_wanted: i64,
386    #[prost(int64, tag = "6")]
387    pub gas_used: i64,
388    #[prost(message, repeated, tag = "7")]
389    pub events: ::prost::alloc::vec::Vec<Event>,
390    #[prost(string, tag = "8")]
391    pub codespace: ::prost::alloc::string::String,
392}
393#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
394#[proto_message(type_url = "/tendermint.abci.ResponseCommit")]
395pub struct ResponseCommit {
396    #[prost(int64, tag = "3")]
397    pub retain_height: i64,
398}
399#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
400#[proto_message(type_url = "/tendermint.abci.ResponseListSnapshots")]
401pub struct ResponseListSnapshots {
402    #[prost(message, repeated, tag = "1")]
403    pub snapshots: ::prost::alloc::vec::Vec<Snapshot>,
404}
405#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
406#[proto_message(type_url = "/tendermint.abci.ResponseOfferSnapshot")]
407pub struct ResponseOfferSnapshot {
408    #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")]
409    pub result: i32,
410}
411/// Nested message and enum types in `ResponseOfferSnapshot`.
412pub mod response_offer_snapshot {
413    use provwasm_proc_macro::CosmwasmExt;
414    #[derive(
415        Clone,
416        Copy,
417        Debug,
418        PartialEq,
419        Eq,
420        PartialOrd,
421        Ord,
422        ::prost::Enumeration,
423        ::schemars::JsonSchema,
424    )]
425    #[repr(i32)]
426    pub enum Result {
427        /// Unknown result, abort all snapshot restoration
428        Unknown = 0,
429        /// Snapshot accepted, apply chunks
430        Accept = 1,
431        /// Abort all snapshot restoration
432        Abort = 2,
433        /// Reject this specific snapshot, try others
434        Reject = 3,
435        /// Reject all snapshots of this format, try others
436        RejectFormat = 4,
437        /// Reject all snapshots from the sender(s), try others
438        RejectSender = 5,
439    }
440    impl Result {
441        /// String value of the enum field names used in the ProtoBuf definition.
442        ///
443        /// The values are not transformed in any way and thus are considered stable
444        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
445        pub fn as_str_name(&self) -> &'static str {
446            match self {
447                Self::Unknown => "UNKNOWN",
448                Self::Accept => "ACCEPT",
449                Self::Abort => "ABORT",
450                Self::Reject => "REJECT",
451                Self::RejectFormat => "REJECT_FORMAT",
452                Self::RejectSender => "REJECT_SENDER",
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                "UNKNOWN" => Some(Self::Unknown),
459                "ACCEPT" => Some(Self::Accept),
460                "ABORT" => Some(Self::Abort),
461                "REJECT" => Some(Self::Reject),
462                "REJECT_FORMAT" => Some(Self::RejectFormat),
463                "REJECT_SENDER" => Some(Self::RejectSender),
464                _ => None,
465            }
466        }
467    }
468}
469#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
470#[proto_message(type_url = "/tendermint.abci.ResponseLoadSnapshotChunk")]
471pub struct ResponseLoadSnapshotChunk {
472    #[prost(bytes = "vec", tag = "1")]
473    pub chunk: ::prost::alloc::vec::Vec<u8>,
474}
475#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
476#[proto_message(type_url = "/tendermint.abci.ResponseApplySnapshotChunk")]
477pub struct ResponseApplySnapshotChunk {
478    #[prost(enumeration = "response_apply_snapshot_chunk::Result", tag = "1")]
479    pub result: i32,
480    /// Chunks to refetch and reapply
481    #[prost(uint32, repeated, tag = "2")]
482    pub refetch_chunks: ::prost::alloc::vec::Vec<u32>,
483    /// Chunk senders to reject and ban
484    #[prost(string, repeated, tag = "3")]
485    pub reject_senders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
486}
487/// Nested message and enum types in `ResponseApplySnapshotChunk`.
488pub mod response_apply_snapshot_chunk {
489    use provwasm_proc_macro::CosmwasmExt;
490    #[derive(
491        Clone,
492        Copy,
493        Debug,
494        PartialEq,
495        Eq,
496        PartialOrd,
497        Ord,
498        ::prost::Enumeration,
499        ::schemars::JsonSchema,
500    )]
501    #[repr(i32)]
502    pub enum Result {
503        /// Unknown result, abort all snapshot restoration
504        Unknown = 0,
505        /// Chunk successfully accepted
506        Accept = 1,
507        /// Abort all snapshot restoration
508        Abort = 2,
509        /// Retry chunk (combine with refetch and reject)
510        Retry = 3,
511        /// Retry snapshot (combine with refetch and reject)
512        RetrySnapshot = 4,
513        /// Reject this snapshot, try others
514        RejectSnapshot = 5,
515    }
516    impl Result {
517        /// String value of the enum field names used in the ProtoBuf definition.
518        ///
519        /// The values are not transformed in any way and thus are considered stable
520        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
521        pub fn as_str_name(&self) -> &'static str {
522            match self {
523                Self::Unknown => "UNKNOWN",
524                Self::Accept => "ACCEPT",
525                Self::Abort => "ABORT",
526                Self::Retry => "RETRY",
527                Self::RetrySnapshot => "RETRY_SNAPSHOT",
528                Self::RejectSnapshot => "REJECT_SNAPSHOT",
529            }
530        }
531        /// Creates an enum from field names used in the ProtoBuf definition.
532        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
533            match value {
534                "UNKNOWN" => Some(Self::Unknown),
535                "ACCEPT" => Some(Self::Accept),
536                "ABORT" => Some(Self::Abort),
537                "RETRY" => Some(Self::Retry),
538                "RETRY_SNAPSHOT" => Some(Self::RetrySnapshot),
539                "REJECT_SNAPSHOT" => Some(Self::RejectSnapshot),
540                _ => None,
541            }
542        }
543    }
544}
545#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
546#[proto_message(type_url = "/tendermint.abci.ResponsePrepareProposal")]
547pub struct ResponsePrepareProposal {
548    #[prost(bytes = "vec", repeated, tag = "1")]
549    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
550}
551#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
552#[proto_message(type_url = "/tendermint.abci.ResponseProcessProposal")]
553pub struct ResponseProcessProposal {
554    #[prost(enumeration = "response_process_proposal::ProposalStatus", tag = "1")]
555    pub status: i32,
556}
557/// Nested message and enum types in `ResponseProcessProposal`.
558pub mod response_process_proposal {
559    use provwasm_proc_macro::CosmwasmExt;
560    #[derive(
561        Clone,
562        Copy,
563        Debug,
564        PartialEq,
565        Eq,
566        PartialOrd,
567        Ord,
568        ::prost::Enumeration,
569        ::schemars::JsonSchema,
570    )]
571    #[repr(i32)]
572    pub enum ProposalStatus {
573        Unknown = 0,
574        Accept = 1,
575        Reject = 2,
576    }
577    impl ProposalStatus {
578        /// String value of the enum field names used in the ProtoBuf definition.
579        ///
580        /// The values are not transformed in any way and thus are considered stable
581        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
582        pub fn as_str_name(&self) -> &'static str {
583            match self {
584                Self::Unknown => "UNKNOWN",
585                Self::Accept => "ACCEPT",
586                Self::Reject => "REJECT",
587            }
588        }
589        /// Creates an enum from field names used in the ProtoBuf definition.
590        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
591            match value {
592                "UNKNOWN" => Some(Self::Unknown),
593                "ACCEPT" => Some(Self::Accept),
594                "REJECT" => Some(Self::Reject),
595                _ => None,
596            }
597        }
598    }
599}
600#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
601#[proto_message(type_url = "/tendermint.abci.ResponseExtendVote")]
602pub struct ResponseExtendVote {
603    #[prost(bytes = "vec", tag = "1")]
604    pub vote_extension: ::prost::alloc::vec::Vec<u8>,
605}
606#[derive(Clone, Copy, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
607#[proto_message(type_url = "/tendermint.abci.ResponseVerifyVoteExtension")]
608pub struct ResponseVerifyVoteExtension {
609    #[prost(
610        enumeration = "response_verify_vote_extension::VerifyStatus",
611        tag = "1"
612    )]
613    pub status: i32,
614}
615/// Nested message and enum types in `ResponseVerifyVoteExtension`.
616pub mod response_verify_vote_extension {
617    use provwasm_proc_macro::CosmwasmExt;
618    #[derive(
619        Clone,
620        Copy,
621        Debug,
622        PartialEq,
623        Eq,
624        PartialOrd,
625        Ord,
626        ::prost::Enumeration,
627        ::schemars::JsonSchema,
628    )]
629    #[repr(i32)]
630    pub enum VerifyStatus {
631        Unknown = 0,
632        Accept = 1,
633        /// Rejecting the vote extension will reject the entire precommit by the sender.
634        /// Incorrectly implementing this thus has liveness implications as it may affect
635        /// CometBFT's ability to receive 2/3+ valid votes to finalize the block.
636        /// Honest nodes should never be rejected.
637        Reject = 2,
638    }
639    impl VerifyStatus {
640        /// String value of the enum field names used in the ProtoBuf definition.
641        ///
642        /// The values are not transformed in any way and thus are considered stable
643        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
644        pub fn as_str_name(&self) -> &'static str {
645            match self {
646                Self::Unknown => "UNKNOWN",
647                Self::Accept => "ACCEPT",
648                Self::Reject => "REJECT",
649            }
650        }
651        /// Creates an enum from field names used in the ProtoBuf definition.
652        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
653            match value {
654                "UNKNOWN" => Some(Self::Unknown),
655                "ACCEPT" => Some(Self::Accept),
656                "REJECT" => Some(Self::Reject),
657                _ => None,
658            }
659        }
660    }
661}
662#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
663#[proto_message(type_url = "/tendermint.abci.ResponseFinalizeBlock")]
664pub struct ResponseFinalizeBlock {
665    /// set of block events emmitted as part of executing the block
666    #[prost(message, repeated, tag = "1")]
667    pub events: ::prost::alloc::vec::Vec<Event>,
668    /// the result of executing each transaction including the events
669    /// the particular transction emitted. This should match the order
670    /// of the transactions delivered in the block itself
671    #[prost(message, repeated, tag = "2")]
672    pub tx_results: ::prost::alloc::vec::Vec<ExecTxResult>,
673    /// a list of updates to the validator set. These will reflect the validator set at current height + 2.
674    #[prost(message, repeated, tag = "3")]
675    pub validator_updates: ::prost::alloc::vec::Vec<ValidatorUpdate>,
676    /// updates to the consensus params, if any.
677    #[prost(message, optional, tag = "4")]
678    pub consensus_param_updates: ::core::option::Option<super::types::ConsensusParams>,
679    /// app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was deterministic. It is up to the application to decide which algorithm to use.
680    #[prost(bytes = "vec", tag = "5")]
681    pub app_hash: ::prost::alloc::vec::Vec<u8>,
682}
683#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
684#[proto_message(type_url = "/tendermint.abci.CommitInfo")]
685pub struct CommitInfo {
686    #[prost(int32, tag = "1")]
687    pub round: i32,
688    #[prost(message, repeated, tag = "2")]
689    pub votes: ::prost::alloc::vec::Vec<VoteInfo>,
690}
691/// ExtendedCommitInfo is similar to CommitInfo except that it is only used in
692/// the PrepareProposal request such that CometBFT can provide vote extensions
693/// to the application.
694#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
695#[proto_message(type_url = "/tendermint.abci.ExtendedCommitInfo")]
696pub struct ExtendedCommitInfo {
697    /// The round at which the block proposer decided in the previous height.
698    #[prost(int32, tag = "1")]
699    pub round: i32,
700    /// List of validators' addresses in the last validator set with their voting
701    /// information, including vote extensions.
702    #[prost(message, repeated, tag = "2")]
703    pub votes: ::prost::alloc::vec::Vec<ExtendedVoteInfo>,
704}
705/// Event allows application developers to attach additional information to
706/// ResponseFinalizeBlock and ResponseCheckTx.
707/// Later, transactions may be queried using these events.
708#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
709#[proto_message(type_url = "/tendermint.abci.Event")]
710pub struct Event {
711    #[prost(string, tag = "1")]
712    pub r#type: ::prost::alloc::string::String,
713    #[prost(message, repeated, tag = "2")]
714    pub attributes: ::prost::alloc::vec::Vec<EventAttribute>,
715}
716/// EventAttribute is a single key-value pair, associated with an event.
717#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
718#[proto_message(type_url = "/tendermint.abci.EventAttribute")]
719pub struct EventAttribute {
720    #[prost(string, tag = "1")]
721    pub key: ::prost::alloc::string::String,
722    #[prost(string, tag = "2")]
723    pub value: ::prost::alloc::string::String,
724    /// nondeterministic
725    #[prost(bool, tag = "3")]
726    pub index: bool,
727}
728/// ExecTxResult contains results of executing one individual transaction.
729///
730/// * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted
731#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
732#[proto_message(type_url = "/tendermint.abci.ExecTxResult")]
733pub struct ExecTxResult {
734    #[prost(uint32, tag = "1")]
735    pub code: u32,
736    #[prost(bytes = "vec", tag = "2")]
737    pub data: ::prost::alloc::vec::Vec<u8>,
738    /// nondeterministic
739    #[prost(string, tag = "3")]
740    pub log: ::prost::alloc::string::String,
741    /// nondeterministic
742    #[prost(string, tag = "4")]
743    pub info: ::prost::alloc::string::String,
744    #[prost(int64, tag = "5")]
745    pub gas_wanted: i64,
746    #[prost(int64, tag = "6")]
747    pub gas_used: i64,
748    /// nondeterministic
749    #[prost(message, repeated, tag = "7")]
750    pub events: ::prost::alloc::vec::Vec<Event>,
751    #[prost(string, tag = "8")]
752    pub codespace: ::prost::alloc::string::String,
753}
754/// TxResult contains results of executing the transaction.
755///
756/// One usage is indexing transaction results.
757#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
758#[proto_message(type_url = "/tendermint.abci.TxResult")]
759pub struct TxResult {
760    #[prost(int64, tag = "1")]
761    pub height: i64,
762    #[prost(uint32, tag = "2")]
763    pub index: u32,
764    #[prost(bytes = "vec", tag = "3")]
765    pub tx: ::prost::alloc::vec::Vec<u8>,
766    #[prost(message, optional, tag = "4")]
767    pub result: ::core::option::Option<ExecTxResult>,
768}
769#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
770#[proto_message(type_url = "/tendermint.abci.Validator")]
771pub struct Validator {
772    /// The first 20 bytes of SHA256(public key)
773    #[prost(bytes = "vec", tag = "1")]
774    pub address: ::prost::alloc::vec::Vec<u8>,
775    /// PubKey pub_key = 2 \[(gogoproto.nullable)=false\];
776    ///
777    /// The voting power
778    #[prost(int64, tag = "3")]
779    pub power: i64,
780}
781#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
782#[proto_message(type_url = "/tendermint.abci.ValidatorUpdate")]
783pub struct ValidatorUpdate {
784    #[prost(message, optional, tag = "1")]
785    pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
786    #[prost(int64, tag = "2")]
787    pub power: i64,
788}
789#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
790#[proto_message(type_url = "/tendermint.abci.VoteInfo")]
791pub struct VoteInfo {
792    #[prost(message, optional, tag = "1")]
793    pub validator: ::core::option::Option<Validator>,
794    #[prost(enumeration = "super::types::BlockIdFlag", tag = "3")]
795    pub block_id_flag: i32,
796}
797#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
798#[proto_message(type_url = "/tendermint.abci.ExtendedVoteInfo")]
799pub struct ExtendedVoteInfo {
800    /// The validator that sent the vote.
801    #[prost(message, optional, tag = "1")]
802    pub validator: ::core::option::Option<Validator>,
803    /// Non-deterministic extension provided by the sending validator's application.
804    #[prost(bytes = "vec", tag = "3")]
805    pub vote_extension: ::prost::alloc::vec::Vec<u8>,
806    /// Vote extension signature created by CometBFT
807    #[prost(bytes = "vec", tag = "4")]
808    pub extension_signature: ::prost::alloc::vec::Vec<u8>,
809    /// block_id_flag indicates whether the validator voted for a block, nil, or did not vote at all
810    #[prost(enumeration = "super::types::BlockIdFlag", tag = "5")]
811    pub block_id_flag: i32,
812}
813#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
814#[proto_message(type_url = "/tendermint.abci.Misbehavior")]
815pub struct Misbehavior {
816    #[prost(enumeration = "MisbehaviorType", tag = "1")]
817    pub r#type: i32,
818    /// The offending validator
819    #[prost(message, optional, tag = "2")]
820    pub validator: ::core::option::Option<Validator>,
821    /// The height when the offense occurred
822    #[prost(int64, tag = "3")]
823    pub height: i64,
824    /// The corresponding time where the offense occurred
825    #[prost(message, optional, tag = "4")]
826    pub time: ::core::option::Option<crate::shim::Timestamp>,
827    /// Total voting power of the validator set in case the ABCI application does
828    /// not store historical validators.
829    /// <https://github.com/tendermint/tendermint/issues/4581>
830    #[prost(int64, tag = "5")]
831    pub total_voting_power: i64,
832}
833#[derive(Clone, PartialEq, Eq, ::prost::Message, ::schemars::JsonSchema, CosmwasmExt)]
834#[proto_message(type_url = "/tendermint.abci.Snapshot")]
835pub struct Snapshot {
836    /// The height at which the snapshot was taken
837    #[prost(uint64, tag = "1")]
838    pub height: u64,
839    /// The application-specific snapshot format
840    #[prost(uint32, tag = "2")]
841    pub format: u32,
842    /// Number of chunks in the snapshot
843    #[prost(uint32, tag = "3")]
844    pub chunks: u32,
845    /// Arbitrary snapshot hash, equal only if identical
846    #[prost(bytes = "vec", tag = "4")]
847    pub hash: ::prost::alloc::vec::Vec<u8>,
848    /// Arbitrary application metadata
849    #[prost(bytes = "vec", tag = "5")]
850    pub metadata: ::prost::alloc::vec::Vec<u8>,
851}
852#[derive(
853    Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, ::prost::Enumeration, ::schemars::JsonSchema,
854)]
855#[repr(i32)]
856pub enum CheckTxType {
857    New = 0,
858    Recheck = 1,
859}
860impl CheckTxType {
861    /// String value of the enum field names used in the ProtoBuf definition.
862    ///
863    /// The values are not transformed in any way and thus are considered stable
864    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
865    pub fn as_str_name(&self) -> &'static str {
866        match self {
867            Self::New => "NEW",
868            Self::Recheck => "RECHECK",
869        }
870    }
871    /// Creates an enum from field names used in the ProtoBuf definition.
872    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
873        match value {
874            "NEW" => Some(Self::New),
875            "RECHECK" => Some(Self::Recheck),
876            _ => None,
877        }
878    }
879}
880#[derive(
881    Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, ::prost::Enumeration, ::schemars::JsonSchema,
882)]
883#[repr(i32)]
884pub enum MisbehaviorType {
885    Unknown = 0,
886    DuplicateVote = 1,
887    LightClientAttack = 2,
888}
889impl MisbehaviorType {
890    /// String value of the enum field names used in the ProtoBuf definition.
891    ///
892    /// The values are not transformed in any way and thus are considered stable
893    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
894    pub fn as_str_name(&self) -> &'static str {
895        match self {
896            Self::Unknown => "UNKNOWN",
897            Self::DuplicateVote => "DUPLICATE_VOTE",
898            Self::LightClientAttack => "LIGHT_CLIENT_ATTACK",
899        }
900    }
901    /// Creates an enum from field names used in the ProtoBuf definition.
902    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
903        match value {
904            "UNKNOWN" => Some(Self::Unknown),
905            "DUPLICATE_VOTE" => Some(Self::DuplicateVote),
906            "LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack),
907            _ => None,
908        }
909    }
910}