I'm writing a stand alone process that needs to verify that a known UTXO is part of a new transaction with a valid signature.
Inputs [ UTXO, raw transaction, input_number ]
How do to I verify the signature for this specific input?
As I understand, depending on the SIGHASH, I would need to parse the entire transaction and replace/remove some data. However, the length bytes seem to make the entire process extremely complex.
Does a segwit transaction make everything easier? Or are there still bytes that need to be removed depending on SIGHASH?
On a side note. in general, will APIs that return "raw transactions" no longer have the signature data for segwit transactions? or are they all appended to the end?