pub fn validate_in_witness(key: &PSBTKey, val: &PSBTValue) -> Result<(), PSBTError> {
        validate_expected_key_type(key, 1)?;
        validate_single_byte_key_type(key)?;
        let tx_out = try_val_as_tx_out(val)?;
        match tx_out.script_pubkey.standard_type() {
            ScriptType::WSH(_) | ScriptType::WPKH(_) | ScriptType::SH(_) => Ok(()),
            _ => Err(PSBTError::InvalidWitnessTXO),
        }
    }
/// Validate a PSBT_IN_WITNESS_UTXO key-value pair in an input map
Validate a PSBT_IN_WITNESS_UTXO key-value pair in an input map
Validate a PSBT_IN_WITNESS_UTXO key - value pair in an input map
pub fn validate_in_witness(key: &PSBTKey, val: &PSBTValue) -> Result<(), PSBTError> {
        validate_expected_key_type(key, 1)?;
        validate_single_byte_key_type(key)?;
        let tx_out = try_val_as_tx_out(val)?;
        match tx_out.script_pubkey.standard_type() {
            ScriptType::WSH(_) | ScriptType::WPKH(_) | ScriptType::SH(_) => Ok(()),
            _ => Err(PSBTError::InvalidWitnessTXO),
        }
    }
pub fn validate_in_witness ( key : & PSBTKey , val : & PSBTValue ) -> Result < ( ) , PSBTError > { validate_expected_key_type ( key , 1 ) ? ; validate_single_byte_key_type ( key ) ? ; let tx_out = try_val_as_tx_out ( val ) ? ; match tx_out . script_pubkey . standard_type ( ) { ScriptType :: WSH ( _ ) | ScriptType :: WPKH ( _ ) | ScriptType :: SH ( _ ) => Ok ( ( ) ) , _ => Err ( PSBTError :: InvalidWitnessTXO ) , } }
Validate a PSBT_IN_WITNESS_UTXO key-value pair in an input map
Validate a PSBT_IN_WITNESS_UTXO key - value pair in an input map
key
&PSBTKey
val
&PSBTValue
key
&PSBTKey
val
&PSBTValue