cosmos_sdk_proto/prost/cosmos-sdk/
cosmos.base.tendermint.v1beta1.rs

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