1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct RegisterResp {
4 #[prost(enumeration = "RegisterStatus", tag = "1")]
5 pub register_status: i32,
6 #[prost(uint32, tag = "2")]
8 pub code: u32,
9 #[prost(string, tag = "3")]
11 pub message: ::prost::alloc::string::String,
12}
13#[allow(clippy::derive_partial_eq_without_eq)]
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct ArchiveBlockRequest {
16 #[prost(string, tag = "1")]
17 pub chain_unique: ::prost::alloc::string::String,
18 #[prost(message, optional, tag = "2")]
19 pub block: ::core::option::Option<super::common::BlockInfo>,
20}
21#[allow(clippy::derive_partial_eq_without_eq)]
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct SingleArchiveBlockResp {
24 #[prost(uint64, tag = "1")]
25 pub archived_begin_height: u64,
26 #[prost(uint64, tag = "2")]
27 pub archived_end_height: u64,
28 #[prost(uint32, tag = "3")]
30 pub code: u32,
31 #[prost(string, tag = "4")]
33 pub message: ::prost::alloc::string::String,
34}
35#[allow(clippy::derive_partial_eq_without_eq)]
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct ArchiveBlockResp {
38 #[prost(enumeration = "ArchiveStatus", tag = "1")]
39 pub archive_status: i32,
40 #[prost(uint32, tag = "2")]
42 pub code: u32,
43 #[prost(string, tag = "3")]
45 pub message: ::prost::alloc::string::String,
46}
47#[allow(clippy::derive_partial_eq_without_eq)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct ArchiveStatusRequest {
50 #[prost(string, tag = "1")]
51 pub chain_unique: ::prost::alloc::string::String,
52}
53#[allow(clippy::derive_partial_eq_without_eq)]
54#[derive(Clone, PartialEq, ::prost::Message)]
55pub struct ArchiveStatusResp {
56 #[prost(uint64, tag = "1")]
57 pub archived_height: u64,
58 #[prost(bool, tag = "2")]
59 pub in_archive: bool,
60 #[prost(uint32, tag = "3")]
62 pub code: u32,
63 #[prost(string, tag = "4")]
65 pub message: ::prost::alloc::string::String,
66}
67#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct RangeBlocksRequest {
70 #[prost(string, tag = "1")]
71 pub chain_unique: ::prost::alloc::string::String,
72 #[prost(uint64, tag = "2")]
73 pub start_height: u64,
74 #[prost(uint64, tag = "3")]
75 pub end_height: u64,
76}
77#[allow(clippy::derive_partial_eq_without_eq)]
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct BlockByHashRequest {
80 #[prost(string, tag = "1")]
81 pub chain_unique: ::prost::alloc::string::String,
82 #[prost(string, tag = "2")]
83 pub block_hash: ::prost::alloc::string::String,
84 #[prost(enumeration = "OperationByHash", tag = "3")]
85 pub operation: i32,
86}
87#[allow(clippy::derive_partial_eq_without_eq)]
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct BlockByHeightRequest {
90 #[prost(string, tag = "1")]
91 pub chain_unique: ::prost::alloc::string::String,
92 #[prost(uint64, tag = "2")]
93 pub height: u64,
94 #[prost(enumeration = "OperationByHeight", tag = "3")]
96 pub operation: i32,
97}
98#[allow(clippy::derive_partial_eq_without_eq)]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct BlockByTxIdRequest {
101 #[prost(string, tag = "1")]
102 pub chain_unique: ::prost::alloc::string::String,
103 #[prost(string, tag = "2")]
104 pub tx_id: ::prost::alloc::string::String,
105}
106#[allow(clippy::derive_partial_eq_without_eq)]
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct TxDetailByIdRequest {
109 #[prost(string, tag = "1")]
110 pub chain_unique: ::prost::alloc::string::String,
111 #[prost(string, tag = "2")]
112 pub tx_id: ::prost::alloc::string::String,
113 #[prost(enumeration = "OperationByTxId", tag = "3")]
114 pub operation: i32,
115}
116#[allow(clippy::derive_partial_eq_without_eq)]
117#[derive(Clone, PartialEq, ::prost::Message)]
118pub struct TxDetailByIdResp {
119 #[prost(uint64, tag = "1")]
121 pub height: u64,
122 #[prost(bool, tag = "2")]
124 pub tx_exist: bool,
125 #[prost(uint64, tag = "3")]
127 pub tx_confirmed_time: u64,
128 #[prost(uint32, tag = "4")]
130 pub code: u32,
131 #[prost(string, tag = "5")]
133 pub message: ::prost::alloc::string::String,
134}
135#[allow(clippy::derive_partial_eq_without_eq)]
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct BlockWithRwSetResp {
138 #[prost(message, optional, tag = "1")]
140 pub block_data: ::core::option::Option<super::common::BlockInfo>,
141 #[prost(uint32, tag = "2")]
143 pub code: u32,
144 #[prost(string, tag = "3")]
146 pub message: ::prost::alloc::string::String,
147}
148#[allow(clippy::derive_partial_eq_without_eq)]
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct TxRwSetResp {
151 #[prost(message, optional, tag = "1")]
153 pub rw_set: ::core::option::Option<super::common::TxRwSet>,
154 #[prost(uint32, tag = "2")]
156 pub code: u32,
157 #[prost(string, tag = "3")]
159 pub message: ::prost::alloc::string::String,
160}
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct TransactionResp {
164 #[prost(message, optional, tag = "1")]
166 pub transaction: ::core::option::Option<super::common::Transaction>,
167 #[prost(uint32, tag = "2")]
169 pub code: u32,
170 #[prost(string, tag = "3")]
172 pub message: ::prost::alloc::string::String,
173}
174#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct StoreStatusResp {
177 #[prost(message, optional, tag = "1")]
178 pub store_status: ::core::option::Option<StoreStatus>,
179 #[prost(uint32, tag = "2")]
181 pub code: u32,
182 #[prost(string, tag = "3")]
184 pub message: ::prost::alloc::string::String,
185}
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct StoreStatus {
189 #[prost(string, tag = "1")]
190 pub chain_unique: ::prost::alloc::string::String,
191 #[prost(message, repeated, tag = "2")]
192 pub store_infos: ::prost::alloc::vec::Vec<StoreInfo>,
193 #[prost(int64, tag = "3")]
194 pub size: i64,
195}
196#[allow(clippy::derive_partial_eq_without_eq)]
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct StoreInfo {
199 #[prost(enumeration = "StoreDataType", tag = "1")]
200 pub r#type: i32,
201 #[prost(message, repeated, tag = "2")]
202 pub file_infos: ::prost::alloc::vec::Vec<FileInfo>,
203 #[prost(int64, tag = "3")]
204 pub size: i64,
205}
206#[allow(clippy::derive_partial_eq_without_eq)]
207#[derive(Clone, PartialEq, ::prost::Message)]
208pub struct FileInfo {
209 #[prost(string, tag = "1")]
210 pub name: ::prost::alloc::string::String,
211 #[prost(uint64, tag = "2")]
212 pub start: u64,
213 #[prost(uint64, tag = "3")]
214 pub end: u64,
215 #[prost(int64, tag = "4")]
216 pub size: i64,
217}
218#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
219#[repr(i32)]
220pub enum OperationByHash {
221 OperationBlockExists = 0,
223 OperationGetBlockByHash = 1,
225 OperationGetHeightByHash = 2,
227}
228impl OperationByHash {
229 pub fn as_str_name(&self) -> &'static str {
234 match self {
235 OperationByHash::OperationBlockExists => "OperationBlockExists",
236 OperationByHash::OperationGetBlockByHash => "OperationGetBlockByHash",
237 OperationByHash::OperationGetHeightByHash => "OperationGetHeightByHash",
238 }
239 }
240 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
242 match value {
243 "OperationBlockExists" => Some(Self::OperationBlockExists),
244 "OperationGetBlockByHash" => Some(Self::OperationGetBlockByHash),
245 "OperationGetHeightByHash" => Some(Self::OperationGetHeightByHash),
246 _ => None,
247 }
248 }
249}
250#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
251#[repr(i32)]
252pub enum OperationByHeight {
253 OperationGetBlockByHeight = 0,
255 OperationGetBlockHeaderByHeight = 1,
257}
258impl OperationByHeight {
259 pub fn as_str_name(&self) -> &'static str {
264 match self {
265 OperationByHeight::OperationGetBlockByHeight => "OperationGetBlockByHeight",
266 OperationByHeight::OperationGetBlockHeaderByHeight => "OperationGetBlockHeaderByHeight",
267 }
268 }
269 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
271 match value {
272 "OperationGetBlockByHeight" => Some(Self::OperationGetBlockByHeight),
273 "OperationGetBlockHeaderByHeight" => Some(Self::OperationGetBlockHeaderByHeight),
274 _ => None,
275 }
276 }
277}
278#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
279#[repr(i32)]
280pub enum OperationByTxId {
281 OperationGetTxHeight = 0,
283 OperationTxExists = 1,
285 OperationGetTxConfirmedTime = 2,
287}
288impl OperationByTxId {
289 pub fn as_str_name(&self) -> &'static str {
294 match self {
295 OperationByTxId::OperationGetTxHeight => "OperationGetTxHeight",
296 OperationByTxId::OperationTxExists => "OperationTxExists",
297 OperationByTxId::OperationGetTxConfirmedTime => "OperationGetTxConfirmedTime",
298 }
299 }
300 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
302 match value {
303 "OperationGetTxHeight" => Some(Self::OperationGetTxHeight),
304 "OperationTxExists" => Some(Self::OperationTxExists),
305 "OperationGetTxConfirmedTime" => Some(Self::OperationGetTxConfirmedTime),
306 _ => None,
307 }
308 }
309}
310#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
311#[repr(i32)]
312pub enum RegisterStatus {
313 Success = 0,
315 Conflict = 1,
317}
318impl RegisterStatus {
319 pub fn as_str_name(&self) -> &'static str {
324 match self {
325 RegisterStatus::Success => "RegisterStatusSuccess",
326 RegisterStatus::Conflict => "RegisterStatusConflict",
327 }
328 }
329 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
331 match value {
332 "RegisterStatusSuccess" => Some(Self::Success),
333 "RegisterStatusConflict" => Some(Self::Conflict),
334 _ => None,
335 }
336 }
337}
338#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
339#[repr(i32)]
340pub enum ArchiveStatus {
341 Failed = 0,
343 HasArchived = 1,
345 Success = 2,
347}
348impl ArchiveStatus {
349 pub fn as_str_name(&self) -> &'static str {
354 match self {
355 ArchiveStatus::Failed => "ArchiveStatusFailed",
356 ArchiveStatus::HasArchived => "ArchiveStatusHasArchived",
357 ArchiveStatus::Success => "ArchiveStatusSuccess",
358 }
359 }
360 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
362 match value {
363 "ArchiveStatusFailed" => Some(Self::Failed),
364 "ArchiveStatusHasArchived" => Some(Self::HasArchived),
365 "ArchiveStatusSuccess" => Some(Self::Success),
366 _ => None,
367 }
368 }
369}
370#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
371#[repr(i32)]
372pub enum StoreDataType {
373 BlockData = 0,
375 CompressedData = 1,
377 DecompressData = 2,
379}
380impl StoreDataType {
381 pub fn as_str_name(&self) -> &'static str {
386 match self {
387 StoreDataType::BlockData => "BlockData",
388 StoreDataType::CompressedData => "CompressedData",
389 StoreDataType::DecompressData => "DecompressData",
390 }
391 }
392 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
394 match value {
395 "BlockData" => Some(Self::BlockData),
396 "CompressedData" => Some(Self::CompressedData),
397 "DecompressData" => Some(Self::DecompressData),
398 _ => None,
399 }
400 }
401}