let batchfile: Batchfile = serde_yaml::from_reader(File::open(path)?)?; if batchfile.inscriptions.is_empty() { bail!("batchfile must contain at least one inscription"); } Ok(batchfile) } pub(crate) fn inscriptions( &self, client: &Client, chain: Chain, parent_value: Option, metadata: Option>, postage: Amount, compress: bool, ) -> Result<(Vec, Vec
)> { assert!(!self.inscriptions.is_empty()); if self .inscriptions .iter() .any(|entry| entry.destination.is_some()) && self.mode == Mode::SharedOutput { return Err(anyhow!( "individual inscription destinations cannot be set in shared-output mode" )); } if metadata.is_some() { assert!(self .inscriptions .iter() .all(|entry| entry.metadata.is_none())); } let mut pointer = parent_value.unwrap_or_default(); let mut inscriptions = Vec::new(); for (i, entry) in self.inscriptions.iter().enumerate() {