This is a discussion that has already been had here, but bear with me.
We're gonna be talking about tx faae7e55db14a32e083cbf6a91db8a5ab6a3b05e050d9cefdec80b47f966848e
- 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:
1600140c6259927541c4f8e88fc1398691e2661d15591a
- got to decode the witnesses section correctly, implied there is
only one
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?