zebra_chain/
lib.rs

1//! Core Zcash data structures.
2//!
3//! This crate provides definitions of core data structures for Zcash, such as
4//! blocks, transactions, addresses, etc.
5
6#![doc(html_favicon_url = "https://zfnd.org/wp-content/uploads/2022/03/zebra-favicon-128.png")]
7#![doc(html_logo_url = "https://zfnd.org/wp-content/uploads/2022/03/zebra-icon.png")]
8#![doc(html_root_url = "https://docs.rs/zebra_chain")]
9// Required by bitvec! macro
10#![recursion_limit = "256"]
11
12#[macro_use]
13extern crate bitflags;
14
15#[macro_use]
16extern crate serde;
17
18#[macro_use]
19extern crate tracing;
20
21pub mod amount;
22pub mod block;
23pub mod chain_sync_status;
24pub mod chain_tip;
25pub mod common;
26pub mod diagnostic;
27pub mod error;
28pub mod fmt;
29pub mod history_tree;
30pub mod orchard;
31pub mod parallel;
32pub mod parameters;
33pub mod primitives;
34pub mod sapling;
35pub mod serialization;
36pub mod shutdown;
37pub mod sprout;
38pub mod subtree;
39pub mod transaction;
40pub mod transparent;
41pub mod value_balance;
42pub mod work;
43
44pub use error::Error;
45
46#[cfg(any(test, feature = "proptest-impl"))]
47pub use block::LedgerState;
48
49#[cfg(any(test, feature = "proptest-impl"))]
50pub mod tests;
51
52/// Error type alias to make working with generic errors easier.
53///
54/// Note: the 'static lifetime bound means that the *type* cannot have any
55/// non-'static lifetimes, (e.g., when a type contains a borrow and is
56/// parameterized by 'a), *not* that the object itself has 'static lifetime.
57pub type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;