pub mod amount;
pub mod error;
pub mod webcash;
pub mod crypto;
pub mod wallet;
pub mod server;
pub mod hd;
pub mod biometric;
pub use amount::Amount;
pub use error::{Error, Result};
pub use webcash::{SecretWebcash, PublicWebcash};
pub use wallet::Wallet;
#[cfg(target_os = "ios")]
pub use server::ios::{IOSServerClient, IOSServerConfig, IOSCustomTLS};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub mod endpoints {
pub const HEALTH_CHECK: &str = "/api/v1/health_check";
pub const REPLACE: &str = "/api/v1/replace";
pub const TARGET: &str = "/api/v1/target";
pub const MINING_REPORT: &str = "/api/v1/mining_report";
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ChainCode {
Receive = 0,
Pay = 1,
Change = 2,
Mining = 3,
}
impl ChainCode {
pub fn from_u64(value: u64) -> Option<Self> {
match value {
0 => Some(ChainCode::Receive),
1 => Some(ChainCode::Pay),
2 => Some(ChainCode::Change),
3 => Some(ChainCode::Mining),
_ => None,
}
}
pub fn as_u64(self) -> u64 {
self as u64
}
}
pub const TERMS_OF_SERVICE: &str = "I acknowledge and agree to the Terms of Service located at https://webcash.org/terms";