Transaction 2bcfd1c1ae8bcaef6360ac43b78009c8aefe1d1635f199fe1129e5e3989e1521
1 Input
-
cb7267f139844f268f09e1c64d698f70e35a4549fa0e39cb4034788af76be2d4:1
OP_DATA_32(32) de79e9551198953abde9b5ce4a609cd95166e264a1777f6327c5b61ff3ff24fcOP_CHECKSIG(172)OP_0(0)OP_IF(99)OP_DATA_3(3) ordOP_DATA_1(1)OP_DATA_24(24) text/plain;charset=utf-8OP_0(0)OP_PUSHDATA2(77) rarity, name, }); } Ok(Box::new(outputs)) } Some(crate::index::List::Spent) => Err(anyhow!("output spent.")), None => Err(anyhow!("output not found")), } } } fn list(outpoint: OutPoint, ranges: Vec<(u64, u64)>) -> Vec<Output> { let mut offset = 0; ranges .into_iter() .map(|(start, end)| { let size = end - start; let output = Output { output: outpoint, start, end, size, offset,OP_PUSHDATA2(77) name: Sat(start).name(), rarity: Sat(start).rarity(), }; offset += size; output }) .collect() } #[cfg(test)] mod tests { use super::*; fn output( output: OutPoint, start: u64, end: u64, size: u64, offset: u64, rarity: Rarity, name: String, ) -> super::Output { super::Output { output, start, end, size, offset, name, rarity, } } #[test] fn list_ranges() { let outpoint =OP_ENDIF(104)
1 Outputs
- 2bcfd1c1ae8bcaef6360ac43b78009c8aefe1d1635f199fe1129e5e3989e1521:0
value 546
address bc1pqy0efme3mkwy3zp03dzktp59zzdhze9xeshnypdn8pwt78njhapsl7e3zw