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(), }, " <h1>Output <span class=monospace>1{64}:1</span></h1> <dl> <dt>value</dt><dd>3</dd> <dt>script pubkey</dt><dd class=monospace>OP_DUP OP_HASH160 OP_PUSHBYTES_20 0{40} OP_EQUALVERIFY OP_CHECKSIG</dd>
Inscription number 44,982,310
Genesis block 819,058
File type text
File size 1.01 KB
Creation date