1#![deny(missing_docs)]
16
17mod cache;
18mod clients;
19mod crypto;
20mod error;
21mod gql;
22mod rues;
23mod store;
24mod wallet;
25
26pub mod currency;
27pub mod dat;
28pub mod gas;
29
30pub use error::Error;
31pub use gql::{BlockTransaction, GraphQL};
32pub use rues::RuesHttpClient;
33pub use wallet::{
34 Address, DecodedNote, Profile, SecureWalletFile, Wallet, WalletPath,
35};
36
37use dusk_core::stake::StakeData;
38use dusk_core::transfer::phoenix::{
39 ArchivedNoteLeaf, Note, NoteOpening, PublicKey as PhoenixPublicKey,
40 SecretKey as PhoenixSecretKey, ViewKey as PhoenixViewKey,
41};
42use dusk_core::{dusk, from_dusk, BlsScalar};
43
44use currency::Dusk;
45
46pub const MAX_FUNCTION_NAME_SIZE: usize = 64;
48pub const MAX_CONTRACT_INIT_ARG_SIZE: usize = 128;
50pub const MAX_CONVERTIBLE: Dusk = Dusk::MAX;
52pub const MIN_CONVERTIBLE: Dusk = Dusk::new(1);
54pub const EPOCH: u64 = 2160;
56pub const MAX_PROFILES: usize = get_max_profiles();
58
59const DEFAULT_MAX_PROFILES: usize = 2;
60
61const fn get_max_profiles() -> usize {
64 match option_env!("WALLET_MAX_PROFILES") {
65 Some(v) => match konst::primitive::parse_usize(v) {
66 Ok(e) if e > 255 => {
67 panic!("WALLET_MAX_PROFILES must be lower or equal to 255")
68 }
69 Ok(e) if e > 0 => e,
70 _ => panic!("Invalid WALLET_MAX_PROFILES"),
71 },
72 None => DEFAULT_MAX_PROFILES,
73 }
74}