use { super::*, anyhow::ensure, bitcoin::{ blockdata::{ opcodes, script::{self, PushBytesBuf}, }, ScriptBuf, }, brotli::enc::{writer::CompressorWriter, BrotliEncoderParams}, http::header::HeaderValue, io::{Cursor, Read, Write}, std::str, }; #[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Eq, Default)] pub struct Inscription { pub body: Option>, pub content_encoding: Option>, pub content_type: Option>, pub duplicate_field: bool, pub incomplete_field: bool, pub metadata: Option>, pub metaprotocol: Option>, pub parent: Option>, pub pointer: Option>, pub unrecognized_even_field: bool, } impl Inscription { #[cfg(test)] pub(crate) fn new(content_type: Option>, body: Option>) -> Self { Self { content_type, body, ..Default::default() } } pub(crate) fn from_file( chain: Chain, path: impl AsRef, parent: Option,