pub fn from_unsigned_tx(tx: Transaction) -> Result<Self, psbt::Error> {
        for txin in &tx.input {
            if !txin.script_sig.is_empty() {
                return Err(Error::UnsignedTxHasScriptSigs);
            }

            if !txin.witness.is_empty() {
                return Err(Error::UnsignedTxHasScriptWitnesses);
            }
        }

        Ok(Global {
            unsigned_tx: tx,
            unknown: Default::default(),
        })
    }
/// Create a Global from an unsigned transaction, error if not unsigned
Create a Global from an unsigned transaction, error if not unsigned
Create a Global from an unsigned transaction error if not unsigned
pub fn from_unsigned_tx(tx: Transaction) -> Result<Self, psbt::Error> {
        for txin in &tx.input {
            if !txin.script_sig.is_empty() {
                return Err(Error::UnsignedTxHasScriptSigs);
            }
            if !txin.witness.is_empty() {
                return Err(Error::UnsignedTxHasScriptWitnesses);
            }
        }
        Ok(Global {
            unsigned_tx: tx,
            unknown: Default::default(),
        })
    }
pub fn from_unsigned_tx ( tx : Transaction ) -> Result < Self , psbt :: Error > { for txin in & tx . input { if ! txin . script_sig . is_empty ( ) { return Err ( Error :: UnsignedTxHasScriptSigs ) ; } if ! txin . witness . is_empty ( ) { return Err ( Error :: UnsignedTxHasScriptWitnesses ) ; } } Ok ( Global { unsigned_tx : tx , unknown : Default :: default ( ) , } ) }
Create a Global from an unsigned transaction, error if not unsigned
Create a Global from an unsigned transaction error if not unsigned
tx
Transaction
tx
Transaction