persistence_std/types/cosmos/base/tendermint/
v1beta1.rs

1use persistence_std_derive::CosmwasmExt;
2/// Block is tendermint type Block, with the Header proposer address
3/// field converted to bech32 string.
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(
6    Clone,
7    PartialEq,
8    Eq,
9    ::prost::Message,
10    ::serde::Serialize,
11    ::serde::Deserialize,
12    ::schemars::JsonSchema,
13    CosmwasmExt,
14)]
15#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Block")]
16pub struct Block {
17    #[prost(message, optional, tag = "1")]
18    pub header: ::core::option::Option<Header>,
19    #[prost(message, optional, tag = "2")]
20    pub data: ::core::option::Option<super::super::super::super::tendermint::types::Data>,
21    #[prost(message, optional, tag = "3")]
22    pub evidence:
23        ::core::option::Option<super::super::super::super::tendermint::types::EvidenceList>,
24    #[prost(message, optional, tag = "4")]
25    pub last_commit: ::core::option::Option<super::super::super::super::tendermint::types::Commit>,
26}
27/// Header defines the structure of a Tendermint block header.
28#[allow(clippy::derive_partial_eq_without_eq)]
29#[derive(
30    Clone,
31    PartialEq,
32    Eq,
33    ::prost::Message,
34    ::serde::Serialize,
35    ::serde::Deserialize,
36    ::schemars::JsonSchema,
37    CosmwasmExt,
38)]
39#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Header")]
40pub struct Header {
41    /// basic block info
42    #[prost(message, optional, tag = "1")]
43    pub version: ::core::option::Option<super::super::super::super::tendermint::version::Consensus>,
44    #[prost(string, tag = "2")]
45    #[serde(alias = "chainID")]
46    pub chain_id: ::prost::alloc::string::String,
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 height: i64,
53    #[prost(message, optional, tag = "4")]
54    pub time: ::core::option::Option<crate::shim::Timestamp>,
55    /// prev block info
56    #[prost(message, optional, tag = "5")]
57    #[serde(alias = "last_blockID")]
58    pub last_block_id:
59        ::core::option::Option<super::super::super::super::tendermint::types::BlockId>,
60    /// hashes of block data
61    ///
62    /// commit from validators from the last block
63    #[prost(bytes = "vec", tag = "6")]
64    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
65    /// transactions
66    #[prost(bytes = "vec", tag = "7")]
67    pub data_hash: ::prost::alloc::vec::Vec<u8>,
68    /// hashes from the app output from the prev block
69    ///
70    /// validators for the current block
71    #[prost(bytes = "vec", tag = "8")]
72    pub validators_hash: ::prost::alloc::vec::Vec<u8>,
73    /// validators for the next block
74    #[prost(bytes = "vec", tag = "9")]
75    pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
76    /// consensus params for current block
77    #[prost(bytes = "vec", tag = "10")]
78    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
79    /// state after txs from the previous block
80    #[prost(bytes = "vec", tag = "11")]
81    pub app_hash: ::prost::alloc::vec::Vec<u8>,
82    /// root hash of all results from the txs from the previous block
83    #[prost(bytes = "vec", tag = "12")]
84    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
85    /// consensus info
86    ///
87    /// evidence included in the block
88    #[prost(bytes = "vec", tag = "13")]
89    pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
90    /// proposer_address is the original block proposer address, formatted as a Bech32 string.
91    /// In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string
92    /// for better UX.
93    ///
94    /// original proposer of the block
95    #[prost(string, tag = "14")]
96    pub proposer_address: ::prost::alloc::string::String,
97}
98/// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method.
99#[allow(clippy::derive_partial_eq_without_eq)]
100#[derive(
101    Clone,
102    PartialEq,
103    Eq,
104    ::prost::Message,
105    ::serde::Serialize,
106    ::serde::Deserialize,
107    ::schemars::JsonSchema,
108    CosmwasmExt,
109)]
110#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")]
111pub struct GetValidatorSetByHeightRequest {
112    #[prost(int64, tag = "1")]
113    #[serde(
114        serialize_with = "crate::serde::as_str::serialize",
115        deserialize_with = "crate::serde::as_str::deserialize"
116    )]
117    pub height: i64,
118    /// pagination defines an pagination for the request.
119    #[prost(message, optional, tag = "2")]
120    pub pagination: ::core::option::Option<super::super::query::v1beta1::PageRequest>,
121}
122/// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.
123#[allow(clippy::derive_partial_eq_without_eq)]
124#[derive(
125    Clone,
126    PartialEq,
127    Eq,
128    ::prost::Message,
129    ::serde::Serialize,
130    ::serde::Deserialize,
131    ::schemars::JsonSchema,
132    CosmwasmExt,
133)]
134#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")]
135pub struct GetValidatorSetByHeightResponse {
136    #[prost(int64, tag = "1")]
137    #[serde(
138        serialize_with = "crate::serde::as_str::serialize",
139        deserialize_with = "crate::serde::as_str::deserialize"
140    )]
141    pub block_height: i64,
142    #[prost(message, repeated, tag = "2")]
143    pub validators: ::prost::alloc::vec::Vec<Validator>,
144    /// pagination defines an pagination for the response.
145    #[prost(message, optional, tag = "3")]
146    pub pagination: ::core::option::Option<super::super::query::v1beta1::PageResponse>,
147}
148/// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method.
149#[allow(clippy::derive_partial_eq_without_eq)]
150#[derive(
151    Clone,
152    PartialEq,
153    Eq,
154    ::prost::Message,
155    ::serde::Serialize,
156    ::serde::Deserialize,
157    ::schemars::JsonSchema,
158    CosmwasmExt,
159)]
160#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")]
161pub struct GetLatestValidatorSetRequest {
162    /// pagination defines an pagination for the request.
163    #[prost(message, optional, tag = "1")]
164    pub pagination: ::core::option::Option<super::super::query::v1beta1::PageRequest>,
165}
166/// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.
167#[allow(clippy::derive_partial_eq_without_eq)]
168#[derive(
169    Clone,
170    PartialEq,
171    Eq,
172    ::prost::Message,
173    ::serde::Serialize,
174    ::serde::Deserialize,
175    ::schemars::JsonSchema,
176    CosmwasmExt,
177)]
178#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")]
179pub struct GetLatestValidatorSetResponse {
180    #[prost(int64, tag = "1")]
181    #[serde(
182        serialize_with = "crate::serde::as_str::serialize",
183        deserialize_with = "crate::serde::as_str::deserialize"
184    )]
185    pub block_height: i64,
186    #[prost(message, repeated, tag = "2")]
187    pub validators: ::prost::alloc::vec::Vec<Validator>,
188    /// pagination defines an pagination for the response.
189    #[prost(message, optional, tag = "3")]
190    pub pagination: ::core::option::Option<super::super::query::v1beta1::PageResponse>,
191}
192/// Validator is the type for the validator-set.
193#[allow(clippy::derive_partial_eq_without_eq)]
194#[derive(
195    Clone,
196    PartialEq,
197    Eq,
198    ::prost::Message,
199    ::serde::Serialize,
200    ::serde::Deserialize,
201    ::schemars::JsonSchema,
202    CosmwasmExt,
203)]
204#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Validator")]
205pub struct Validator {
206    #[prost(string, tag = "1")]
207    pub address: ::prost::alloc::string::String,
208    #[prost(message, optional, tag = "2")]
209    pub pub_key: ::core::option::Option<crate::shim::Any>,
210    #[prost(int64, tag = "3")]
211    #[serde(
212        serialize_with = "crate::serde::as_str::serialize",
213        deserialize_with = "crate::serde::as_str::deserialize"
214    )]
215    pub voting_power: i64,
216    #[prost(int64, tag = "4")]
217    #[serde(
218        serialize_with = "crate::serde::as_str::serialize",
219        deserialize_with = "crate::serde::as_str::deserialize"
220    )]
221    pub proposer_priority: i64,
222}
223/// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method.
224#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(
226    Clone,
227    PartialEq,
228    Eq,
229    ::prost::Message,
230    ::serde::Serialize,
231    ::serde::Deserialize,
232    ::schemars::JsonSchema,
233    CosmwasmExt,
234)]
235#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")]
236pub struct GetBlockByHeightRequest {
237    #[prost(int64, tag = "1")]
238    #[serde(
239        serialize_with = "crate::serde::as_str::serialize",
240        deserialize_with = "crate::serde::as_str::deserialize"
241    )]
242    pub height: i64,
243}
244/// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.
245#[allow(clippy::derive_partial_eq_without_eq)]
246#[derive(
247    Clone,
248    PartialEq,
249    Eq,
250    ::prost::Message,
251    ::serde::Serialize,
252    ::serde::Deserialize,
253    ::schemars::JsonSchema,
254    CosmwasmExt,
255)]
256#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")]
257pub struct GetBlockByHeightResponse {
258    #[prost(message, optional, tag = "1")]
259    #[serde(alias = "blockID")]
260    pub block_id: ::core::option::Option<super::super::super::super::tendermint::types::BlockId>,
261    /// Deprecated: please use `sdk_block` instead
262    #[prost(message, optional, tag = "2")]
263    pub block: ::core::option::Option<super::super::super::super::tendermint::types::Block>,
264    /// Since: cosmos-sdk 0.47
265    #[prost(message, optional, tag = "3")]
266    pub sdk_block: ::core::option::Option<Block>,
267}
268/// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method.
269#[allow(clippy::derive_partial_eq_without_eq)]
270#[derive(
271    Clone,
272    PartialEq,
273    Eq,
274    ::prost::Message,
275    ::serde::Serialize,
276    ::serde::Deserialize,
277    ::schemars::JsonSchema,
278    CosmwasmExt,
279)]
280#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")]
281pub struct GetLatestBlockRequest {}
282/// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.
283#[allow(clippy::derive_partial_eq_without_eq)]
284#[derive(
285    Clone,
286    PartialEq,
287    Eq,
288    ::prost::Message,
289    ::serde::Serialize,
290    ::serde::Deserialize,
291    ::schemars::JsonSchema,
292    CosmwasmExt,
293)]
294#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")]
295pub struct GetLatestBlockResponse {
296    #[prost(message, optional, tag = "1")]
297    #[serde(alias = "blockID")]
298    pub block_id: ::core::option::Option<super::super::super::super::tendermint::types::BlockId>,
299    /// Deprecated: please use `sdk_block` instead
300    #[prost(message, optional, tag = "2")]
301    pub block: ::core::option::Option<super::super::super::super::tendermint::types::Block>,
302    /// Since: cosmos-sdk 0.47
303    #[prost(message, optional, tag = "3")]
304    pub sdk_block: ::core::option::Option<Block>,
305}
306/// GetSyncingRequest is the request type for the Query/GetSyncing RPC method.
307#[allow(clippy::derive_partial_eq_without_eq)]
308#[derive(
309    Clone,
310    PartialEq,
311    Eq,
312    ::prost::Message,
313    ::serde::Serialize,
314    ::serde::Deserialize,
315    ::schemars::JsonSchema,
316    CosmwasmExt,
317)]
318#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetSyncingRequest")]
319pub struct GetSyncingRequest {}
320/// GetSyncingResponse is the response type for the Query/GetSyncing RPC method.
321#[allow(clippy::derive_partial_eq_without_eq)]
322#[derive(
323    Clone,
324    PartialEq,
325    Eq,
326    ::prost::Message,
327    ::serde::Serialize,
328    ::serde::Deserialize,
329    ::schemars::JsonSchema,
330    CosmwasmExt,
331)]
332#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetSyncingResponse")]
333pub struct GetSyncingResponse {
334    #[prost(bool, tag = "1")]
335    pub syncing: bool,
336}
337/// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method.
338#[allow(clippy::derive_partial_eq_without_eq)]
339#[derive(
340    Clone,
341    PartialEq,
342    Eq,
343    ::prost::Message,
344    ::serde::Serialize,
345    ::serde::Deserialize,
346    ::schemars::JsonSchema,
347    CosmwasmExt,
348)]
349#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")]
350pub struct GetNodeInfoRequest {}
351/// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method.
352#[allow(clippy::derive_partial_eq_without_eq)]
353#[derive(
354    Clone,
355    PartialEq,
356    Eq,
357    ::prost::Message,
358    ::serde::Serialize,
359    ::serde::Deserialize,
360    ::schemars::JsonSchema,
361    CosmwasmExt,
362)]
363#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")]
364pub struct GetNodeInfoResponse {
365    #[prost(message, optional, tag = "1")]
366    pub default_node_info:
367        ::core::option::Option<super::super::super::super::tendermint::p2p::DefaultNodeInfo>,
368    #[prost(message, optional, tag = "2")]
369    pub application_version: ::core::option::Option<VersionInfo>,
370}
371/// VersionInfo is the type for the GetNodeInfoResponse message.
372#[allow(clippy::derive_partial_eq_without_eq)]
373#[derive(
374    Clone,
375    PartialEq,
376    Eq,
377    ::prost::Message,
378    ::serde::Serialize,
379    ::serde::Deserialize,
380    ::schemars::JsonSchema,
381    CosmwasmExt,
382)]
383#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.VersionInfo")]
384pub struct VersionInfo {
385    #[prost(string, tag = "1")]
386    pub name: ::prost::alloc::string::String,
387    #[prost(string, tag = "2")]
388    pub app_name: ::prost::alloc::string::String,
389    #[prost(string, tag = "3")]
390    pub version: ::prost::alloc::string::String,
391    #[prost(string, tag = "4")]
392    pub git_commit: ::prost::alloc::string::String,
393    #[prost(string, tag = "5")]
394    pub build_tags: ::prost::alloc::string::String,
395    #[prost(string, tag = "6")]
396    pub go_version: ::prost::alloc::string::String,
397    #[prost(message, repeated, tag = "7")]
398    pub build_deps: ::prost::alloc::vec::Vec<Module>,
399    /// Since: cosmos-sdk 0.43
400    #[prost(string, tag = "8")]
401    pub cosmos_sdk_version: ::prost::alloc::string::String,
402}
403/// Module is the type for VersionInfo
404#[allow(clippy::derive_partial_eq_without_eq)]
405#[derive(
406    Clone,
407    PartialEq,
408    Eq,
409    ::prost::Message,
410    ::serde::Serialize,
411    ::serde::Deserialize,
412    ::schemars::JsonSchema,
413    CosmwasmExt,
414)]
415#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Module")]
416pub struct Module {
417    /// module path
418    #[prost(string, tag = "1")]
419    pub path: ::prost::alloc::string::String,
420    /// module version
421    #[prost(string, tag = "2")]
422    pub version: ::prost::alloc::string::String,
423    /// checksum
424    #[prost(string, tag = "3")]
425    pub sum: ::prost::alloc::string::String,
426}
427/// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query.
428#[allow(clippy::derive_partial_eq_without_eq)]
429#[derive(
430    Clone,
431    PartialEq,
432    Eq,
433    ::prost::Message,
434    ::serde::Serialize,
435    ::serde::Deserialize,
436    ::schemars::JsonSchema,
437    CosmwasmExt,
438)]
439#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ABCIQueryRequest")]
440pub struct AbciQueryRequest {
441    #[prost(bytes = "vec", tag = "1")]
442    pub data: ::prost::alloc::vec::Vec<u8>,
443    #[prost(string, tag = "2")]
444    pub path: ::prost::alloc::string::String,
445    #[prost(int64, tag = "3")]
446    #[serde(
447        serialize_with = "crate::serde::as_str::serialize",
448        deserialize_with = "crate::serde::as_str::deserialize"
449    )]
450    pub height: i64,
451    #[prost(bool, tag = "4")]
452    pub prove: bool,
453}
454/// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query.
455///
456/// Note: This type is a duplicate of the ResponseQuery proto type defined in
457/// Tendermint.
458#[allow(clippy::derive_partial_eq_without_eq)]
459#[derive(
460    Clone,
461    PartialEq,
462    Eq,
463    ::prost::Message,
464    ::serde::Serialize,
465    ::serde::Deserialize,
466    ::schemars::JsonSchema,
467    CosmwasmExt,
468)]
469#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ABCIQueryResponse")]
470pub struct AbciQueryResponse {
471    #[prost(uint32, tag = "1")]
472    #[serde(
473        serialize_with = "crate::serde::as_str::serialize",
474        deserialize_with = "crate::serde::as_str::deserialize"
475    )]
476    pub code: u32,
477    /// nondeterministic
478    #[prost(string, tag = "3")]
479    pub log: ::prost::alloc::string::String,
480    /// nondeterministic
481    #[prost(string, tag = "4")]
482    pub info: ::prost::alloc::string::String,
483    #[prost(int64, tag = "5")]
484    #[serde(
485        serialize_with = "crate::serde::as_str::serialize",
486        deserialize_with = "crate::serde::as_str::deserialize"
487    )]
488    pub index: i64,
489    #[prost(bytes = "vec", tag = "6")]
490    pub key: ::prost::alloc::vec::Vec<u8>,
491    #[prost(bytes = "vec", tag = "7")]
492    pub value: ::prost::alloc::vec::Vec<u8>,
493    #[prost(message, optional, tag = "8")]
494    pub proof_ops: ::core::option::Option<ProofOps>,
495    #[prost(int64, tag = "9")]
496    #[serde(
497        serialize_with = "crate::serde::as_str::serialize",
498        deserialize_with = "crate::serde::as_str::deserialize"
499    )]
500    pub height: i64,
501    #[prost(string, tag = "10")]
502    pub codespace: ::prost::alloc::string::String,
503}
504/// ProofOp defines an operation used for calculating Merkle root. The data could
505/// be arbitrary format, providing necessary data for example neighbouring node
506/// hash.
507///
508/// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint.
509#[allow(clippy::derive_partial_eq_without_eq)]
510#[derive(
511    Clone,
512    PartialEq,
513    Eq,
514    ::prost::Message,
515    ::serde::Serialize,
516    ::serde::Deserialize,
517    ::schemars::JsonSchema,
518    CosmwasmExt,
519)]
520#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ProofOp")]
521pub struct ProofOp {
522    #[prost(string, tag = "1")]
523    pub r#type: ::prost::alloc::string::String,
524    #[prost(bytes = "vec", tag = "2")]
525    pub key: ::prost::alloc::vec::Vec<u8>,
526    #[prost(bytes = "vec", tag = "3")]
527    pub data: ::prost::alloc::vec::Vec<u8>,
528}
529/// ProofOps is Merkle proof defined by the list of ProofOps.
530///
531/// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint.
532#[allow(clippy::derive_partial_eq_without_eq)]
533#[derive(
534    Clone,
535    PartialEq,
536    Eq,
537    ::prost::Message,
538    ::serde::Serialize,
539    ::serde::Deserialize,
540    ::schemars::JsonSchema,
541    CosmwasmExt,
542)]
543#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ProofOps")]
544pub struct ProofOps {
545    #[prost(message, repeated, tag = "1")]
546    pub ops: ::prost::alloc::vec::Vec<ProofOp>,
547}