Skip to main content

treeship_core/merkle/
proof.rs

1use serde::{Deserialize, Serialize};
2
3use super::checkpoint::Checkpoint;
4use super::tree::InclusionProof;
5
6// Re-export Direction and ProofStep from tree module for convenience.
7pub use super::tree::{Direction, ProofStep};
8
9/// A self-contained proof file that can be exported and verified offline.
10#[derive(Debug, Clone, Serialize, Deserialize)]
11pub struct ProofFile {
12    pub artifact_id: String,
13    pub artifact_summary: ArtifactSummary,
14    pub inclusion_proof: InclusionProof,
15    pub checkpoint: Checkpoint,
16}
17
18/// Summary of the artifact being proved (human-readable context).
19#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct ArtifactSummary {
21    pub actor: String,
22    pub action: String,
23    pub timestamp: String,
24    pub key_id: String,
25}