add Transaction::hash inline docs

This commit is contained in:
Sergio Chouhy 2025-07-10 12:52:48 -03:00
parent b16575b407
commit 81b6d34693

View File

@ -151,6 +151,7 @@ impl ActionData {
}
impl Transaction {
/// Computes and returns the SHA-256 hash of the JSON-serialized representation of `self`.
pub fn hash(&self) -> TreeHashType {
let raw_data = serde_json::to_vec(&self).unwrap();
let mut hasher = sha2::Sha256::new();