dusk_wallet_core/
lib.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4//
5// Copyright (c) DUSK NETWORK. All rights reserved.
6
7//! Implementations of basic wallet functionalities.
8
9#![cfg_attr(target_family = "wasm", no_std)]
10#![deny(missing_docs)]
11#![deny(rustdoc::broken_intra_doc_links)]
12#![deny(clippy::pedantic)]
13#![feature(try_trait_v2)]
14#![cfg_attr(not(target_family = "wasm"), deny(unused_crate_dependencies))]
15#![deny(unused_extern_crates)]
16
17#[cfg(target_family = "wasm")]
18#[global_allocator]
19static ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;
20
21extern crate alloc;
22
23#[cfg(target_family = "wasm")]
24#[macro_use]
25mod ffi;
26
27pub mod keys;
28pub mod notes;
29pub mod transaction;
30
31/// The seed used to generate the entropy for the keys
32pub type Seed = [u8; 64];
33
34pub mod prelude {
35    //! Re-export of the most commonly used types and traits.
36    pub use crate::keys;
37    pub use crate::notes::MAX_INPUT_NOTES;
38}
39
40pub use notes::balance::{
41    calculate as phoenix_balance, TotalAmount as BalanceInfo,
42};
43pub use notes::owned::map as map_owned;
44pub use notes::pick::notes as pick_notes;