zeldhash_protocol/lib.rs
1//! # zeldhash-protocol
2//!
3//! A Rust implementation of the **ZELDHASH(ZELD)** protocol — a system
4//! that rewards Bitcoin transactions with aesthetically pleasing transaction IDs
5//! (those starting with leading zeros).
6//!
7//! ## Overview
8//!
9//! This library provides a database-agnostic and block parser-agnostic
10//! implementation of the ZELD protocol. It focuses purely on the protocol logic,
11//! allowing you to integrate it with any Bitcoin block source and any storage backend.
12//!
13//! ## Quick Start
14//!
15//! ```rust,ignore
16//! use zeldhash_protocol::{ZeldProtocol, ZeldConfig, ZeldStore};
17//!
18//! let protocol = ZeldProtocol::new(ZeldConfig::default());
19//!
20//! // Pre-process blocks (parallelizable)
21//! let zeld_block = protocol.pre_process_block(&bitcoin_block);
22//!
23//! // Process blocks sequentially
24//! protocol.process_block(&zeld_block, &mut store);
25//! ```
26
27/// Protocol configuration.
28pub mod config;
29/// Helper functions for ZELD protocol operations.
30pub mod helpers;
31/// Core protocol implementation.
32pub mod protocol;
33/// Storage trait abstraction.
34pub mod store;
35/// Core types used by the protocol.
36pub mod types;
37
38pub use config::{ZeldConfig, ZeldNetwork};
39pub use protocol::ZeldProtocol;
40pub use store::ZeldStore;
41pub use types::{Amount, PreProcessedZeldBlock, UtxoKey, ZeldInput, ZeldOutput, ZeldTransaction};