monero_oxide/
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
10/// Merkle tree functionality.
11pub mod merkle;
12
13/// Ring Signature structs and functionality.
14pub mod ring_signatures;
15
16/// RingCT structs and functionality.
17pub mod ringct;
18
19/// Transaction structs and functionality.
20pub mod transaction;
21/// Block structs and functionality.
22pub mod block;
23
24#[cfg(test)]
25mod tests;
26
27/// The minimum amount of blocks an output is locked for.
28///
29/// If Monero suffered a re-organization, any transactions which selected decoys belonging to
30/// recent blocks would become invalidated. Accordingly, transactions must use decoys which are
31/// presumed to not be invalidated in the future. If wallets only selected n-block-old outputs as
32/// decoys, then any ring member within the past n blocks would have to be the real spend.
33/// Preventing this at the consensus layer ensures privacy and integrity.
34pub const DEFAULT_LOCK_WINDOW: usize = 10;
35
36/// The minimum amount of blocks a coinbase output is locked for.
37pub const COINBASE_LOCK_WINDOW: usize = 60;
38
39/// Monero's block time target, in seconds.
40pub const BLOCK_TIME: usize = 120;