fn transparent_value_balance_from_outputs(
        &self,
        outputs: &HashMap<transparent::OutPoint, transparent::Output>,
    ) -> Result<ValueBalance<NegativeAllowed>, ValueBalanceError> {
        let input_value = self
            .inputs()
            .iter()
            .map(|i| i.value_from_outputs(outputs))
            .sum::<Result<Amount<NonNegative>, AmountError>>()
            .map_err(ValueBalanceError::Transparent)?
            .constrain()
            .expect("conversion from NonNegative to NegativeAllowed is always valid");

        let output_value = self
            .outputs()
            .iter()
            .map(|o| o.value())
            .sum::<Result<Amount<NonNegative>, AmountError>>()
            .map_err(ValueBalanceError::Transparent)?
            .constrain()
            .expect("conversion from NonNegative to NegativeAllowed is always valid");

        (input_value - output_value)
            .map(ValueBalance::from_transparent_amount)
            .map_err(ValueBalanceError::Transparent)
    }
/// Return the transparent value balance,
/// using the outputs spent by this transaction.
///
/// See `transparent_value_balance` for details.
Return the transparent value balance,
using the outputs spent by this transaction.

See `transparent_value_balance` for details.
Return the transparent value balance using the outputs spent by this transaction . See ` transparent_value_balance ` for details .
fn transparent_value_balance_from_outputs(
        &self,
        outputs: &HashMap<transparent::OutPoint, transparent::Output>,
    ) -> Result<ValueBalance<NegativeAllowed>, ValueBalanceError> {
        let input_value = self
            .inputs()
            .iter()
            .map(|i| i.value_from_outputs(outputs))
            .sum::<Result<Amount<NonNegative>, AmountError>>()
            .map_err(ValueBalanceError::Transparent)?
            .constrain()
            .expect("conversion from NonNegative to NegativeAllowed is always valid");
        let output_value = self
            .outputs()
            .iter()
            .map(|o| o.value())
            .sum::<Result<Amount<NonNegative>, AmountError>>()
            .map_err(ValueBalanceError::Transparent)?
            .constrain()
            .expect("conversion from NonNegative to NegativeAllowed is always valid");
        (input_value - output_value)
            .map(ValueBalance::from_transparent_amount)
            .map_err(ValueBalanceError::Transparent)
    }
fn transparent_value_balance_from_outputs ( & self , outputs : & HashMap < transparent :: OutPoint , transparent :: Output > , ) -> Result < ValueBalance < NegativeAllowed > , ValueBalanceError > { let input_value = self . inputs ( ) . iter ( ) . map ( | i | i . value_from_outputs ( outputs ) ) . sum :: < Result < Amount < NonNegative > , AmountError > > ( ) . map_err ( ValueBalanceError :: Transparent ) ? . constrain ( ) . expect ( " " ) ; let output_value = self . outputs ( ) . iter ( ) . map ( | o | o . value ( ) ) . sum :: < Result < Amount < NonNegative > , AmountError > > ( ) . map_err ( ValueBalanceError :: Transparent ) ? . constrain ( ) . expect ( " " ) ; ( input_value - output_value ) . map ( ValueBalance :: from_transparent_amount ) . map_err ( ValueBalanceError :: Transparent ) }
Return the transparent value balance,
using the outputs spent by this transaction.
Return the transparent value balance using the outputs spent by this transaction .
&self
outputs
&HashMap<transparent::OutPoint, transparent::Output>