transaction: outpoint.txid.to_string(), sat_ranges: match list { Some(List::Unspent(ranges)) => Some(ranges), _ => None, }, inscriptions, } } } impl PageContent for OutputHtml { fn title(&self) -> String { format!("Output {}", self.outpoint) } } #[cfg(test)] mod tests { use { super::*, bitcoin::{blockdata::script, PubkeyHash}, }; #[test] fn unspent_output() { assert_regex_match!( OutputHtml { inscriptions: Vec::new(), outpoint: outpoint(1), list: Some(List::Unspent(vec![(0, 1), (1, 3)])), chain: Chain::Mainnet, output: TxOut { value: 3, script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()), }, runes: Vec::new(), }, "