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
#![deny(warnings, missing_docs)]
#[cfg(feature = "types")]
mod types;
pub mod proto {
#![allow(missing_docs)]
tonic::include_proto!("inx");
}
pub mod tonic {
pub use tonic::{
transport::{Channel, Error},
Code, Request, Response, Status,
};
}
pub use self::proto::{inx_client as client, inx_server as server};
#[cfg(feature = "types")]
pub use self::types::*;
impl proto::MilestoneRequest {
pub fn from_index(milestone_index: u32) -> Self {
Self {
milestone_index,
milestone_id: None,
}
}
pub fn from_id(milestone_id: proto::MilestoneId) -> Self {
Self {
milestone_index: 0,
milestone_id: Some(milestone_id),
}
}
}