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
//! Provenance and integrity verification features.
//!
//! This module provides:
//!
//! - **Merkle Trees**: Content-addressable tree structures for efficient verification
//! - **Block Index**: Persistent block hash index for Merkle proof generation
//! - **Block Proofs**: Selective disclosure proofs for individual content blocks
//! - **Lineage Verification**: Chain verification for document version history
//! - **Timestamp Anchoring**: Multiple timestamp methods:
//! - RFC 3161 Time Stamp Protocol (feature: `timestamps-rfc3161`)
//! - OpenTimestamps/Bitcoin anchoring (feature: `timestamps-ots`)
//! - Ethereum blockchain anchoring (types and offline verification)
//! - **Provenance Records**: Complete provenance tracking for documents
//!
//! # Block Index Example
//!
//! ```rust,ignore
//! use cdx_core::provenance::BlockIndex;
//! use cdx_core::HashAlgorithm;
//!
//! // Create block index from document content
//! let index = BlockIndex::from_content(&content, HashAlgorithm::Sha256)?;
//! let merkle_root = index.merkle_root();
//! ```
//!
//! # Merkle Tree Example
//!
//! ```rust,ignore
//! use cdx_core::provenance::{MerkleTree, MerkleProof};
//!
//! // Build a tree from content blocks
//! let tree = MerkleTree::from_blocks(&blocks, HashAlgorithm::Sha256)?;
//! let root = tree.root();
//!
//! // Generate a proof for a specific block
//! let proof = tree.prove(2)?; // Proof for block at index 2
//!
//! // Verify the proof
//! assert!(proof.verify(&block_hash, &root));
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;