Skip to main content

tf_types/generated/
proof_bundle.rs

1// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.
2
3#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6use super::*;
7
8/// JSON representation of a .tfproof bundle (TF-0005). Binary framing is defined in Phase 2.
9#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub struct ProofBundle {
11    /// Version of the proof-bundle schema itself.
12    pub bundle_version: ProofBundle_BundleVersion,
13    /// Proof events carried by this bundle, in their hash-chain order.
14    pub events: Vec<ProofEvent>,
15    /// Merkle root over the events, if computed.
16    #[serde(skip_serializing_if = "Option::is_none", default)]
17    pub merkle_root: Option<HashRef>,
18    /// Hash over the event sequence as a linear hash-chain.
19    #[serde(skip_serializing_if = "Option::is_none", default)]
20    pub chain_hash: Option<HashRef>,
21    /// Anchoring metadata if this bundle was submitted to a transparency log.
22    #[serde(skip_serializing_if = "Option::is_none", default)]
23    pub transparency_anchor: Option<ProofBundle_TransparencyAnchor>,
24    /// Signature envelope over the canonical form of this bundle (not verified in the foundation phase).
25    pub signature: SignatureEnvelope,
26}
27
28/// Version of the proof-bundle schema itself.
29#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
30pub enum ProofBundle_BundleVersion {
31    #[serde(rename = "1")]
32    V1,
33}
34
35/// Anchoring metadata if this bundle was submitted to a transparency log.
36#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
37pub struct ProofBundle_TransparencyAnchor {
38    /// Anchor backend kind.
39    pub kind: String,
40    /// Endpoint of the anchor backend.
41    #[serde(skip_serializing_if = "Option::is_none", default)]
42    pub url: Option<String>,
43    /// Opaque inclusion-proof blob returned by the backend.
44    #[serde(skip_serializing_if = "Option::is_none", default)]
45    pub inclusion_proof: Option<serde_json::Value>,
46}