Skip to main content

blvm_muhash/
lib.rs

1//! MuHash3072 for Bitcoin UTXO set hashing.
2//!
3//! Matches Bitcoin Core `gettxoutsetinfo` muhash output for AssumeUTXO compatibility.
4//!
5//! # Example
6//!
7//! ```rust
8//! use blvm_muhash::{MuHash3072, serialize_coin_for_muhash};
9//!
10//! let txid = [0u8; 32];
11//! let serialized = serialize_coin_for_muhash(&txid, 0, 100, true, 50_0000_0000, &[0x76, 0xa9, 0x14]);
12//! let hash = MuHash3072::new().insert(&serialized).finalize();
13//! assert_eq!(hash.len(), 32);
14//! ```
15
16pub mod coin;
17pub mod muhash;
18pub mod num3072;
19
20pub use coin::serialize_coin_for_muhash;
21pub use muhash::{MuHash3072, MUHASH_RUNNING_STATE_BYTES};
22pub use num3072::Num3072;