1 2 3 4 5 6 7 8 9
use crate::utils::hash; pub fn sighash(namespace: &str, name: &str) -> [u8; 8] { let preimage = format!("{}:{}", namespace, name); let mut sighash = [0u8; 8]; sighash.copy_from_slice(&hash::hash(preimage.as_bytes()).to_bytes()[..8]); sighash }