monero_serai/
lib.rs

1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
2#![doc = include_str!("../README.md")]
3#![deny(missing_docs)]
4#![cfg_attr(not(feature = "std"), no_std)]
5
6pub use monero_io as io;
7pub use monero_generators as generators;
8pub use monero_primitives as primitives;
9
10mod merkle;
11
12/// Ring Signature structs and functionality.
13pub mod ring_signatures;
14
15/// RingCT structs and functionality.
16pub mod ringct;
17
18/// Transaction structs and functionality.
19pub mod transaction;
20/// Block structs and functionality.
21pub mod block;
22
23#[cfg(test)]
24mod tests;
25
26/// The minimum amount of blocks an output is locked for.
27///
28/// If Monero suffered a re-organization, any transactions which selected decoys belonging to
29/// recent blocks would become invalidated. Accordingly, transactions must use decoys which are
30/// presumed to not be invalidated in the future. If wallets only selected n-block-old outputs as
31/// decoys, then any ring member within the past n blocks would have to be the real spend.
32/// Preventing this at the consensus layer ensures privacy and integrity.
33pub const DEFAULT_LOCK_WINDOW: usize = 10;
34
35/// The minimum amount of blocks a coinbase output is locked for.
36pub const COINBASE_LOCK_WINDOW: usize = 60;
37
38/// Monero's block time target, in seconds.
39pub const BLOCK_TIME: usize = 120;