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
use mina_serialization_types_macros::AutoFrom;
use serde::{Deserialize, Serialize};
use crate::{
common::{U32Json, U64Json},
json::*,
v1::*,
};
use versioned::*;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
pub struct EpochLedger {
pub hash: HashV1,
pub total_currency: AmountV1,
}
pub type EpochLedgerV1 = Versioned<Versioned<EpochLedger, 1>, 1>;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, AutoFrom)]
#[auto_from(EpochLedger)]
pub struct EpochLedgerJson {
pub hash: LedgerHashV1Json,
pub total_currency: U64Json,
}
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq)]
pub struct EpochData {
pub ledger: EpochLedgerV1,
pub seed: HashV1,
pub start_checkpoint: HashV1,
pub lock_checkpoint: HashV1,
pub epoch_length: LengthV1,
}
pub type EpochDataV1 = Versioned<Versioned<EpochData, 1>, 1>;
#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, AutoFrom)]
#[auto_from(EpochData)]
pub struct EpochDataJson {
pub ledger: EpochLedgerJson,
pub seed: EpochSeedHashV1Json,
pub start_checkpoint: StateHashV1Json,
pub lock_checkpoint: StateHashV1Json,
pub epoch_length: U32Json,
}