use std::fmt::Debug; use std::sync::{Mutex, MutexGuard}; pub use aes_gcm; pub use env_logger; pub use log; pub use sp_client; pub mod crypto; pub mod device; pub mod error; pub mod network; pub mod pcd; pub mod prd; pub mod process; pub mod secrets; pub mod signature; pub mod silentpayments; pub const MAX_PRD_PAYLOAD_SIZE: usize = u16::MAX as usize; // 64KiB sounds reasonable for now pub trait MutexExt { fn lock_anyhow(&self) -> Result, anyhow::Error>; } impl MutexExt for Mutex { fn lock_anyhow(&self) -> Result, anyhow::Error> { self.lock() .map_err(|e| anyhow::Error::msg(format!("Failed to lock: {}", e))) } }