#![allow(clippy::result_large_err)]
#![allow(clippy::module_inception)]
#![deny(missing_docs)]
#![forbid(unsafe_code)]
#![cfg_attr(all(doc, CHANNEL_NIGHTLY), feature(doc_auto_cfg))]
#[cfg(feature = "client")]
pub mod client;
mod error;
#[cfg(feature = "server")]
pub mod server;
pub type Result<T> = std::result::Result<T, error::Error>;
pub use error::Error;
#[cfg(feature = "client")]
pub use reqwest;
pub use sos_sdk as sdk;
#[cfg(feature = "listen")]
use sos_sdk::signer::ecdsa::Address;
#[cfg(feature = "listen")]
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone)]
pub struct ChangeNotification {
address: Address,
}
#[cfg(feature = "listen")]
impl ChangeNotification {
pub fn new(address: &Address) -> Self {
Self { address: *address }
}
pub fn address(&self) -> &Address {
&self.address
}
}