ev-types 0.0.1

Protocol buffer generated types for Ev
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
// This file is @generated by prost-build.
/// The SignRequest holds the bytes we want to sign.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub message: ::prost::alloc::vec::Vec<u8>,
}
/// The SignResponse returns the signature bytes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
/// The GetPublicRequest is an empty request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicRequest {}
/// The GetPublicResponse returns the public key.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub public_key: ::prost::alloc::vec::Vec<u8>,
}
/// Version captures the consensus rules for processing a block in the blockchain,
/// including all blockchain data structures and the rules of the application's
/// state transition machine.
/// This is equivalent to the tmversion.Consensus type in Tendermint.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
    #[prost(uint64, tag = "1")]
    pub block: u64,
    #[prost(uint64, tag = "2")]
    pub app: u64,
}
/// Header is the header of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Header {
    /// Block and App version
    #[prost(message, optional, tag = "1")]
    pub version: ::core::option::Option<Version>,
    /// Block height
    #[prost(uint64, tag = "2")]
    pub height: u64,
    /// Block creation time
    #[prost(uint64, tag = "3")]
    pub time: u64,
    /// Previous block info
    #[prost(bytes = "vec", tag = "4")]
    pub last_header_hash: ::prost::alloc::vec::Vec<u8>,
    /// Commit from aggregator(s) from the last block
    #[prost(bytes = "vec", tag = "5")]
    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
    /// Block.Data root aka Transactions
    #[prost(bytes = "vec", tag = "6")]
    pub data_hash: ::prost::alloc::vec::Vec<u8>,
    /// Consensus params for current block
    #[prost(bytes = "vec", tag = "7")]
    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
    /// State after applying txs from the current block
    #[prost(bytes = "vec", tag = "8")]
    pub app_hash: ::prost::alloc::vec::Vec<u8>,
    /// Root hash of all results from the txs from the previous block.
    /// This is ABCI specific but smart-contract chains require some way of committing
    /// to transaction receipts/results.
    #[prost(bytes = "vec", tag = "9")]
    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
    /// Original proposer of the block
    /// Note that the address can be derived from the pubkey which can be derived
    /// from the signature when using secp256k.
    /// We keep this in case users choose another signature format where the
    /// pubkey can't be recovered by the signature (e.g. ed25519).
    #[prost(bytes = "vec", tag = "10")]
    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
    /// validatorhash for compatibility with tendermint light client.
    #[prost(bytes = "vec", tag = "11")]
    pub validator_hash: ::prost::alloc::vec::Vec<u8>,
    /// Chain ID the block belongs to
    #[prost(string, tag = "12")]
    pub chain_id: ::prost::alloc::string::String,
}
/// SignedHeader is a header with a signature and a signer.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedHeader {
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<Header>,
    #[prost(bytes = "vec", tag = "2")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub signer: ::core::option::Option<Signer>,
}
/// Signer is a signer of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Signer {
    /// Address of the signer
    #[prost(bytes = "vec", tag = "1")]
    pub address: ::prost::alloc::vec::Vec<u8>,
    /// Public key of the signer
    #[prost(bytes = "vec", tag = "2")]
    pub pub_key: ::prost::alloc::vec::Vec<u8>,
}
/// Metadata is the metadata of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
    /// chain id
    #[prost(string, tag = "1")]
    pub chain_id: ::prost::alloc::string::String,
    /// Block height
    #[prost(uint64, tag = "2")]
    pub height: u64,
    /// Block creation time
    #[prost(uint64, tag = "3")]
    pub time: u64,
    /// Previous block info
    #[prost(bytes = "vec", tag = "4")]
    pub last_data_hash: ::prost::alloc::vec::Vec<u8>,
}
/// Data is the data of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Data {
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<Metadata>,
    #[prost(bytes = "vec", repeated, tag = "2")]
    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// SignedData is a data with a signature and a signer.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedData {
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<Data>,
    #[prost(bytes = "vec", tag = "2")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub signer: ::core::option::Option<Signer>,
}
/// Vote is a vote for a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vote {
    /// Chain ID
    #[prost(string, tag = "1")]
    pub chain_id: ::prost::alloc::string::String,
    /// Block height
    #[prost(uint64, tag = "2")]
    pub height: u64,
    /// Timestamp
    #[prost(message, optional, tag = "3")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// Block ID hash
    #[prost(bytes = "vec", tag = "4")]
    pub block_id_hash: ::prost::alloc::vec::Vec<u8>,
    /// Validator address
    #[prost(bytes = "vec", tag = "5")]
    pub validator_address: ::prost::alloc::vec::Vec<u8>,
}
/// State is the state of the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct State {
    #[prost(message, optional, tag = "1")]
    pub version: ::core::option::Option<Version>,
    #[prost(string, tag = "2")]
    pub chain_id: ::prost::alloc::string::String,
    #[prost(uint64, tag = "3")]
    pub initial_height: u64,
    #[prost(uint64, tag = "4")]
    pub last_block_height: u64,
    #[prost(message, optional, tag = "5")]
    pub last_block_time: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(uint64, tag = "6")]
    pub da_height: u64,
    #[prost(bytes = "vec", tag = "7")]
    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "8")]
    pub app_hash: ::prost::alloc::vec::Vec<u8>,
}
/// GetPeerInfoResponse defines the response for retrieving peer information
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPeerInfoResponse {
    /// List of connected peers
    #[prost(message, repeated, tag = "1")]
    pub peers: ::prost::alloc::vec::Vec<PeerInfo>,
}
/// GetNetInfoResponse defines the response for retrieving network information
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNetInfoResponse {
    /// Network information
    #[prost(message, optional, tag = "1")]
    pub net_info: ::core::option::Option<NetInfo>,
}
/// PeerInfo contains information about a connected peer
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerInfo {
    /// Peer ID
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Peer address
    #[prost(string, tag = "2")]
    pub address: ::prost::alloc::string::String,
}
/// NetInfo contains information about the network
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetInfo {
    /// Network ID
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Listen address
    #[prost(string, repeated, tag = "2")]
    pub listen_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// List of connected peers
    #[prost(string, repeated, tag = "3")]
    pub connected_peers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Batch is a collection of transactions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Batch {
    #[prost(bytes = "vec", repeated, tag = "1")]
    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// GetHealthResponse defines the response for retrieving health status
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHealthResponse {
    /// Health status
    #[prost(enumeration = "HealthStatus", tag = "1")]
    pub status: i32,
}
/// HealthStatus defines the health status of the node
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HealthStatus {
    /// Unknown health status
    Unknown = 0,
    /// Healthy status (Healthy)
    Pass = 1,
    /// Degraded but still serving
    Warn = 2,
    /// Hard fail
    Fail = 3,
}
impl HealthStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            HealthStatus::Unknown => "UNKNOWN",
            HealthStatus::Pass => "PASS",
            HealthStatus::Warn => "WARN",
            HealthStatus::Fail => "FAIL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN" => Some(Self::Unknown),
            "PASS" => Some(Self::Pass),
            "WARN" => Some(Self::Warn),
            "FAIL" => Some(Self::Fail),
            _ => None,
        }
    }
}
/// InitChainRequest contains the genesis parameters for chain initialization
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitChainRequest {
    /// Timestamp marking chain start time in UTC
    #[prost(message, optional, tag = "1")]
    pub genesis_time: ::core::option::Option<::prost_types::Timestamp>,
    /// First block height (must be > 0)
    #[prost(uint64, tag = "2")]
    pub initial_height: u64,
    /// Unique identifier string for the blockchain
    #[prost(string, tag = "3")]
    pub chain_id: ::prost::alloc::string::String,
}
/// InitChainResponse contains the initial state and configuration
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InitChainResponse {
    /// Hash representing initial state
    #[prost(bytes = "vec", tag = "1")]
    pub state_root: ::prost::alloc::vec::Vec<u8>,
    /// Maximum allowed bytes for transactions in a block
    #[prost(uint64, tag = "2")]
    pub max_bytes: u64,
}
/// GetTxsRequest is the request for fetching transactions
///
/// Empty for now, may include filtering criteria in the future
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsRequest {}
/// GetTxsResponse contains the available transactions
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTxsResponse {
    /// Slice of valid transactions from mempool
    #[prost(bytes = "vec", repeated, tag = "1")]
    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// ExecuteTxsRequest contains transactions and block context for execution
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteTxsRequest {
    /// Ordered list of transactions to execute
    #[prost(bytes = "vec", repeated, tag = "1")]
    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
    /// Height of block being created (must be > 0)
    #[prost(uint64, tag = "2")]
    pub block_height: u64,
    /// Block creation time in UTC
    #[prost(message, optional, tag = "3")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// Previous block's state root hash
    #[prost(bytes = "vec", tag = "4")]
    pub prev_state_root: ::prost::alloc::vec::Vec<u8>,
}
/// ExecuteTxsResponse contains the result of transaction execution
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteTxsResponse {
    /// New state root after executing transactions
    #[prost(bytes = "vec", tag = "1")]
    pub updated_state_root: ::prost::alloc::vec::Vec<u8>,
    /// Maximum allowed transaction size (may change with protocol updates)
    #[prost(uint64, tag = "2")]
    pub max_bytes: u64,
}
/// SetFinalRequest marks a block as finalized
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetFinalRequest {
    /// Height of block to finalize
    #[prost(uint64, tag = "1")]
    pub block_height: u64,
}
/// SetFinalResponse indicates whether finalization was successful
///
/// Empty response, errors are returned via gRPC status
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetFinalResponse {}
/// Block contains all the components of a complete block
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<SignedHeader>,
    #[prost(message, optional, tag = "2")]
    pub data: ::core::option::Option<Data>,
}
/// GetBlockRequest defines the request for retrieving a block
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockRequest {
    /// The height or hash of the block to retrieve
    #[prost(oneof = "get_block_request::Identifier", tags = "1, 2")]
    pub identifier: ::core::option::Option<get_block_request::Identifier>,
}
/// Nested message and enum types in `GetBlockRequest`.
pub mod get_block_request {
    /// The height or hash of the block to retrieve
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(uint64, tag = "1")]
        Height(u64),
        #[prost(bytes, tag = "2")]
        Hash(::prost::alloc::vec::Vec<u8>),
    }
}
/// GetBlockResponse defines the response for retrieving a block
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockResponse {
    #[prost(message, optional, tag = "1")]
    pub block: ::core::option::Option<Block>,
    #[prost(uint64, tag = "2")]
    pub header_da_height: u64,
    #[prost(uint64, tag = "3")]
    pub data_da_height: u64,
}
/// GetStateResponse defines the response for retrieving the current state
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStateResponse {
    #[prost(message, optional, tag = "1")]
    pub state: ::core::option::Option<State>,
}
/// GetMetadataRequest defines the request for retrieving metadata by key
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetadataRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
}
/// GetMetadataResponse defines the response for retrieving metadata
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetadataResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}