whisky_csl/tx_parser/
reference_inputs.rs1use whisky_common::{RefTxIn, WError};
2
3use super::{utxo_converter::utxo_to_ref_tx_in, CSLParser};
4
5impl CSLParser {
6 pub fn get_reference_inputs(&self) -> &Vec<RefTxIn> {
7 &self.tx_body.reference_inputs
8 }
9
10 pub(super) fn extract_reference_inputs(&mut self) -> Result<(), WError> {
11 let ref_inputs = self.csl_tx_body.reference_inputs();
12 if let Some(ref_inputs) = ref_inputs {
13 for input in &ref_inputs {
14 let tx_in = utxo_to_ref_tx_in(&input, &self.context)?;
15 self.tx_body.reference_inputs.push(tx_in);
16 }
17 }
18 Ok(())
19 }
20}