if hex.is_empty() || hex.len() > 1 { panic!(); } hex.repeat(64).parse().unwrap() } pub(crate) fn txid(n: u64) -> Txid { let hex = format!("{n:x}"); if hex.is_empty() || hex.len() > 1 { panic!(); } hex.repeat(64).parse().unwrap() } pub(crate) fn outpoint(n: u64) -> OutPoint { format!("{}:{}", txid(n), n).parse().unwrap() } pub(crate) fn satpoint(n: u64, offset: u64) -> SatPoint { SatPoint { outpoint: outpoint(n), offset, } } pub(crate) fn address() -> Address { "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4" .parse::
>() .unwrap() .assume_checked() } pub(crate) fn recipient() -> Address { "tb1q6en7qjxgw4ev8xwx94pzdry6a6ky7wlfeqzunz" .parse::>() .unwrap() .assume_checked() } pub(crate) fn change(n: u64) -> Address { match n { 0 => "tb1qjsv26lap3ffssj6hfy8mzn0lg5vte6a42j75ww", 1 => "tb1qakxxzv9n7706kc3xdcycrtfv8cqv62hnwexc0l", 2 => "tb1qxz9yk0td0yye009gt6ayn7jthz5p07a75luryg", 3 => "tb1qe62s57n77pfhlw2vtqlhm87dwj75l6fguavjjq",