pub fn try_val_as_signature(val: &PSBTValue) -> Result<(Signature, Sighash), PSBTError> {
    let (sighash_flag, sig_bytes) =
        val.items()
            .split_last()
            .ok_or(PSBTError::WrongValueLength {
                got: 0,
                expected: 75,
            })?;

    let sig = Signature::from_asn1(sig_bytes).map_err(Bip32Error::from)?;
    Ok((sig, Sighash::from_u8(*sighash_flag)?))
}
/// Attempt to deserialize a value as a signature
Attempt to deserialize a value as a signature
Attempt to deserialize a value as a signature
pub fn try_val_as_signature(val: &PSBTValue) -> Result<(Signature, Sighash), PSBTError> {
    let (sighash_flag, sig_bytes) =
        val.items()
            .split_last()
            .ok_or(PSBTError::WrongValueLength {
                got: 0,
                expected: 75,
            })?;
    let sig = Signature::from_asn1(sig_bytes).map_err(Bip32Error::from)?;
    Ok((sig, Sighash::from_u8(*sighash_flag)?))
}
pub fn try_val_as_signature ( val : & PSBTValue ) -> Result < ( Signature , Sighash ) , PSBTError > { let ( sighash_flag , sig_bytes ) = val . items ( ) . split_last ( ) . ok_or ( PSBTError :: WrongValueLength { got : 0 , expected : 75 , } ) ? ; let sig = Signature :: from_asn1 ( sig_bytes ) . map_err ( Bip32Error :: from ) ? ; Ok ( ( sig , Sighash :: from_u8 ( * sighash_flag ) ? ) ) }
Attempt to deserialize a value as a signature
Attempt to deserialize a value as a signature
val
&PSBTValue
val
&PSBTValue