quantus_cli/
lib.rs

1//! # Quantus CLI Library
2//!
3//! This library provides the core functionality for interacting with the Quantus Network.
4//! It can be used as a dependency in other Rust projects that need to interact with
5//! the Quantus blockchain.
6
7pub mod chain;
8pub mod cli;
9pub mod config;
10pub mod error;
11pub mod log;
12pub mod wallet;
13
14// Re-export commonly used types and functions
15pub use error::{QuantusError as Error, Result};
16
17// Re-export chain client and config
18pub use chain::client::{ChainConfig, QuantusClient};
19
20// Re-export dilithium crypto
21pub use qp_dilithium_crypto;
22
23// Re-export commonly used types from sp_core and sp_runtime
24pub use sp_core::crypto::AccountId32;
25pub use sp_runtime::MultiAddress;
26
27// Re-export transfer functions for library usage
28pub use cli::send::{
29	batch_transfer, format_balance_with_symbol, get_balance, transfer, transfer_with_nonce,
30};
31
32/// Library version
33pub const VERSION: &str = env!("CARGO_PKG_VERSION");
34
35/// Library name
36pub const NAME: &str = env!("CARGO_PKG_NAME");
37
38/// Get the library version
39pub fn version() -> &'static str {
40	VERSION
41}
42
43/// Get the library name
44pub fn name() -> &'static str {
45	NAME
46}
47
48#[cfg(test)]
49mod tests {
50	use super::*;
51
52	#[test]
53	fn test_version() {
54		assert!(!version().is_empty());
55	}
56
57	#[test]
58	fn test_name() {
59		assert_eq!(name(), "quantus-cli");
60	}
61}