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
//! Structs for parsing server response.

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct STH {
  pub tree_size: u64,
  pub timestamp: u64,
  pub sha256_root_hash: String,
  pub tree_head_signature: String,
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct ConsistencyProof {
  pub consistency: Vec<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct GetEntries {
  pub entries: Vec<LeafEntry>,
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct LeafEntry {
  pub leaf_input: String,
  pub extra_data: String,
}

#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct AuditProof {
  pub leaf_index: u64,
  pub audit_path: Vec<String>,
}