witness_core/lib.rs
1//! The witness core: everything needed to check XRPL data yourself,
2//! without trusting either a node or a third-party service.
3//!
4//! Transactions are not executed here. The core only reads and checks what
5//! the network has already computed and signed, so it cannot diverge from
6//! the reference implementation on edge cases of execution.
7//!
8//! What the core contains:
9//! - `hash`: SHA-512Half and XRPL hash prefixes;
10//! - `stobject`: splitting serialized objects into fields, as slices of the original bytes;
11//! - `keys`: secp256k1 and ed25519 signatures, `n9…` keys;
12//! - `validation`: parsing a validation and checking its signature;
13//! - `manifest`: the link between a validator's master key and its signing key;
14//! - `unl`: checking a publisher's signed UNL;
15//! - `negative_unl`: who the network has temporarily disabled;
16//! - `ledger`: the ledger header and its hash;
17//! - `shamap`: the transaction tree and inclusion proofs;
18//! - `skiplist`: the ledger hash lists in state that link old ledgers to new ones;
19//! - `txproof`: a transaction inclusion proof as a portable object;
20//! - `quorum`: whether a ledger is confirmed under a given trust policy;
21//! - `evidence`: an evidence bundle for one ledger, and checking it.
22//!
23//! Checking a signature, checking a quorum and checking data are different
24//! claims. The core answers the first; the second is built on top, with an
25//! explicit trust policy.
26
27pub mod evidence;
28pub mod hash;
29pub mod keys;
30pub mod ledger;
31pub mod manifest;
32pub mod negative_unl;
33pub mod quorum;
34pub mod shamap;
35pub mod skiplist;
36pub mod stateproof;
37pub mod stobject;
38pub mod txproof;
39pub mod unl;
40pub mod unlstore;
41pub mod util;
42pub mod validation;
43
44pub use hash::{HashPrefix, sha512_half, sha512_half_prefixed};
45pub use manifest::Manifest;
46pub use validation::Validation;