..Default::default() } .pointer(), Some(0x0807060504030201), ); assert_eq!( Inscription { pointer: Some(vec![1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 1]), ..Default::default() } .pointer(), None, ); assert_eq!( Inscription { pointer: Some(vec![1, 2, 3, 4, 5, 6, 7, 8, 1]), ..Default::default() } .pointer(), None, ); } #[test] fn pointer_encode() { assert_eq!( Inscription { pointer: None, ..Default::default() } .to_witness(), envelope(&[b"ord"]), ); assert_eq!( Inscription { pointer: Some(vec![1, 2, 3]), ..Default::default() } .to_witness(), envelope(&[b"ord", &[2], &[1, 2, 3]]), ); } #[test] fn pointer_value() { let mut file = tempfile::Builder::new().suffix(".txt").tempfile().unwrap(); write!(file, "foo").unwrap(); let inscription = Inscription::from_file(Chain::Mainnet, file.path(), None, None, None, None, false).unwrap();