1#![deny(missing_docs)]
16
17mod block;
18mod cache;
19mod clients;
20mod crypto;
21
22mod currency;
23mod error;
24mod rusk;
25mod store;
26mod wallet;
27
28pub mod dat;
30
31pub use rusk::{RuskHttpClient, RuskRequest};
32
33pub use currency::{Dusk, Lux};
34pub use error::Error;
35pub use wallet::gas;
36pub use wallet::{Address, DecodedNote, SecureWalletFile, Wallet, WalletPath};
37
38pub const MAX_CONVERTIBLE: Dusk = Dusk::MAX;
40pub const MIN_CONVERTIBLE: Dusk = Dusk::new(1);
42pub const EPOCH: u64 = 2160;
44pub const MAX_ADDRESSES: usize = get_max_addresses();
46
47const DEFAULT_MAX_ADDRESSES: usize = 25;
48
49const fn get_max_addresses() -> usize {
50 match option_env!("WALLET_MAX_ADDR") {
51 Some(v) => match konst::primitive::parse_usize(v) {
52 Ok(e) if e > 255 => {
53 panic!("WALLET_MAX_ADDR must be lower or equal to 255")
54 }
55 Ok(e) if e > 0 => e,
56 _ => panic!("Invalid WALLET_MAX_ADDR"),
57 },
58 None => DEFAULT_MAX_ADDRESSES,
59 }
60}