} if compressed.len() < body.len() { (compressed, Some("br".as_bytes().to_vec())) } else { (body, None) } } else { (body, None) }; if let Some(limit) = chain.inscription_content_size_limit() { let len = body.len(); if len > limit { bail!("content size of {len} bytes exceeds {limit} byte limit for {chain} inscriptions"); } } Ok(Self { body: Some(body), content_type: Some(content_type.into()), content_encoding, metadata, metaprotocol: metaprotocol.map(|metaprotocol| metaprotocol.into_bytes()), parent: parent.map(|id| id.parent_value()), pointer: pointer.map(Self::pointer_value), ..Default::default() }) } fn pointer_value(pointer: u64) -> Vec<u8> { let mut bytes = pointer.to_le_bytes().to_vec(); while bytes.last().copied() == Some(0) { bytes.pop(); } bytes } pub(crate) fn append_reveal_script_to_builder( &self, mut builder: script::Builder,
Inscription number 44,982,512
Genesis block 819,059
File type text
File size 1.01 KB
Creation date Nov 30,2023 1:34 am