1pub mod memo_hash;
6pub mod name_hash;
7
8use crate::error::Error;
9use crate::Result;
10use std::time::SystemTime;
11
12pub use memo_hash::{
13 encode_binary_memo, encode_text_memo, tap_memo_hash, verify_binary_memo, verify_text_memo,
14};
15pub use name_hash::{hash_name, NameHashable};
16
17pub fn get_current_time() -> Result<u64> {
24 SystemTime::now()
25 .duration_since(SystemTime::UNIX_EPOCH)
26 .map_err(|e| Error::ParseError(format!("Failed to get current time: {}", e)))
27 .map(|duration| duration.as_secs())
28}