qudag_exchange_core/
lib.rs1#![cfg_attr(not(feature = "std"), no_std)]
13#![deny(unsafe_code)]
14#![warn(missing_docs)]
15
16#[cfg(not(feature = "std"))]
17extern crate alloc;
18
19#[cfg(not(feature = "std"))]
20use alloc::{collections::BTreeMap, string::String, vec::Vec};
21
22#[cfg(feature = "std")]
23use std::{collections::BTreeMap, string::String, vec::Vec};
24
25pub mod account;
27pub mod config;
28pub mod consensus;
29pub mod error;
30pub mod fee_model;
31pub mod immutable;
32pub mod ledger;
33pub mod metering;
34pub mod payout;
35pub mod state;
36pub mod transaction;
37pub mod types;
38
39pub use account::{Account, AccountId, Balance};
41pub use config::{
42 BusinessPlanConfig, BusinessPlanSummary, ConfigSummary, ExchangeConfig, ExchangeConfigBuilder,
43 GovernanceConfig, NetworkConfig, SecurityConfig,
44};
45pub use consensus::ConsensusAdapter;
46pub use error::{Error, Result};
47pub use fee_model::{AgentStatus, FeeCalculator, FeeModel, FeeModelParams};
48pub use immutable::{
49 ImmutableConfig, ImmutableDeployment, ImmutableSignature, ImmutableStatus, LockableConfig,
50};
51pub use ledger::Ledger;
52pub use metering::{OperationCost, ResourceMeter};
53pub use payout::{
54 ContributorInfo, ContributorRole, ContributorType, FeeRouter, PayoutConfig, PayoutEntry,
55 PayoutSplit, PayoutSplitTemplates, PayoutTransaction,
56};
57pub use state::LedgerState;
58pub use transaction::{Transaction, TransactionId, TransactionStatus};
59pub use types::rUv;
60
61pub const VERSION: &str = env!("CARGO_PKG_VERSION");
63
64pub fn version() -> &'static str {
66 VERSION
67}
68
69#[cfg(test)]
70mod tests {
71 use super::*;
72
73 #[test]
74 fn test_version() {
75 assert!(!version().is_empty());
76 assert!(version().contains('.'));
77 }
78}