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
mod cache;
mod client;
mod inmemory_truststore;
#[cfg(feature = "server")]
mod server;
pub use client::*;
pub use inmemory_truststore::*;
#[cfg(feature = "server")]
pub use server::*;
use serde::{Deserialize, Serialize};
use themelio_structs::{Address, BlockHeight, ConsensusProof, Header, NetID, Transaction, TxHash};
use tmelcrypt::HashVal;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StateSummary {
pub netid: NetID,
pub height: BlockHeight,
pub header: Header,
pub proof: ConsensusProof,
}
#[derive(Debug, Clone, Copy, Serialize, Deserialize, Eq, Hash, PartialEq, PartialOrd, Ord)]
pub enum Substate {
History,
Coins,
Transactions,
Pools,
Stakes,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[non_exhaustive]
pub enum NodeRequest {
SendTx(Transaction),
GetAbbrBlock(BlockHeight),
GetSummary,
GetSmtBranch(BlockHeight, Substate, HashVal),
GetStakersRaw(BlockHeight),
GetPartialBlock(BlockHeight, Vec<TxHash>),
GetSomeCoins(BlockHeight, Address),
}