Skip to main content

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 subsquid;
13pub mod wallet;
14
15// Re-export commonly used types and functions
16pub use error::{QuantusError as Error, Result};
17
18// Re-export chain client and config
19pub use chain::client::{ChainConfig, QuantusClient};
20
21// Re-export dilithium crypto
22pub use qp_dilithium_crypto;
23
24// Re-export commonly used types from sp_core and sp_runtime
25pub use sp_core::crypto::AccountId32;
26pub use sp_runtime::MultiAddress;
27
28// Re-export transfer functions for library usage
29pub use cli::send::{
30	batch_transfer, format_balance_with_symbol, get_balance, transfer, transfer_with_nonce,
31};
32
33/// Library version
34pub const VERSION: &str = env!("CARGO_PKG_VERSION");
35
36/// Library name
37pub const NAME: &str = env!("CARGO_PKG_NAME");
38
39/// Get the library version
40pub fn version() -> &'static str {
41	VERSION
42}
43
44/// Get the library name
45pub fn name() -> &'static str {
46	NAME
47}
48
49#[cfg(test)]
50mod tests {
51	use super::*;
52
53	#[test]
54	fn test_version() {
55		assert!(!version().is_empty());
56	}
57
58	#[test]
59	fn test_name() {
60		assert_eq!(name(), "quantus-cli");
61	}
62}