Crate vex_anchor

Crate vex_anchor 

Source
Expand description

§VEX Anchor

Public anchoring layer for VEX audit logs.

Provides cryptographic anchoring of Merkle roots to external systems for tamper-evident, publicly-verifiable audit trails.

§Supported Backends (2026)

  • FileAnchor: Local append-only JSON log (default, for development)
  • GitAnchor: Commits roots to a Git repository
  • OpenTimestampsAnchor: Bitcoin calendar anchoring via the public OTS protocol
  • EthereumAnchor: Ethereum calldata anchoring via JSON-RPC
  • CelestiaAnchor: Celestia DA blob anchoring

§Quick Start

use vex_anchor::{AnchorBackend, FileAnchor, AnchorMetadata};
use vex_core::Hash;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let anchor = FileAnchor::new("./anchors.json");
     
    let root = Hash::digest(b"merkle_root_data");
    let metadata = AnchorMetadata::new("tenant-1", 100);
     
    let receipt = anchor.anchor(&root, metadata).await?;
    println!("Anchored at: {}", receipt.anchor_id);
     
    Ok(())
}

Structs§

AnchorMetadata
Metadata about the data being anchored
AnchorReceipt
Receipt proving that a root was anchored
CelestiaAnchor
Celestia DA anchor backend
EthereumAnchor
Ethereum anchor backend
FileAnchor
File-based anchor backend
GitAnchor
Git-based anchor backend
OpenTimestampsAnchor
OpenTimestamps calendar anchor backend

Enums§

AnchorError
Errors that can occur during anchoring operations

Traits§

AnchorBackend
Trait for anchoring backends