This is a discussion that has already been had here, but bear with me.
We're gonna be talking about tx
- all I got is the encoded transaction
- it has been marked as segwit (marker + flag)
- tx has 3 inputs, only the last one is segwit
- the segwit input has a script sig:
- got to decode the witnesses section correctly, implied there is
In the previous discussion, they mentioned that a segwit input is easily spotted as it has an empty script sig.
The segwit input we have here
has a script sig... I know it's segwit cause I looked in a blockchain explorer. How can my software programatically tell it's segwit just by looking at the transaction's data?