Recently, I wrote a c++ code to extract some information from some messages in BITCOIN protocol. for example, I extracted bitcoin value and output address corresponded to it from tx messages of this protocol.
Extraction algorithm for output addresses is based on type of scripts such as P2PK, P2PKH, P2SH, P2WPKH and etc. but it is not clear how to extract input addresses.
can anyone explain what is the extraction method for input addresses in tx messages?