fn sign_input(&self, psbt: &mut PSBT<A, E>, idx: usize) -> Result<(), Self::Error> {
        let tx = psbt.tx()?;
        let input_map = &mut psbt.input_maps_mut()[idx];

        if input_map.is_finalized() {
            return Err(Bip32SignerError::AlreadyFinalized(idx));
        }

        if input_map.has_non_witness_utxo() {
            Ok(self.sign_non_witness_input(idx, &tx, input_map)?)
        } else {
            Ok(self.sign_witness_input(idx, &tx.into_witness(), input_map)?)
        }
    }
/// Sign the specified input in the PST.
Sign the specified input in the PST.
Sign the specified input in the PST .
fn sign_input(&self, psbt: &mut PSBT<A, E>, idx: usize) -> Result<(), Self::Error> {
        let tx = psbt.tx()?;
        let input_map = &mut psbt.input_maps_mut()[idx];
        if input_map.is_finalized() {
            return Err(Bip32SignerError::AlreadyFinalized(idx));
        }
        if input_map.has_non_witness_utxo() {
            Ok(self.sign_non_witness_input(idx, &tx, input_map)?)
        } else {
            Ok(self.sign_witness_input(idx, &tx.into_witness(), input_map)?)
        }
    }
fn sign_input ( & self , psbt : & mut PSBT < A , E > , idx : usize ) -> Result < ( ) , Self :: Error > { let tx = psbt . tx ( ) ? ; let input_map = & mut psbt . input_maps_mut ( ) [ idx ] ; if input_map . is_finalized ( ) { return Err ( Bip32SignerError :: AlreadyFinalized ( idx ) ) ; } if input_map . has_non_witness_utxo ( ) { Ok ( self . sign_non_witness_input ( idx , & tx , input_map ) ? ) } else { Ok ( self . sign_witness_input ( idx , & tx . into_witness ( ) , input_map ) ? ) } }
Sign the specified input in the PST.
Sign the specified input in the PST .
&self
psbt
&mut PSBT<A, E>
idx
usize
&self
psbt
&mut PSBT<A, E>
idx
usize