I am learning how transactions are coded in the blockchain, so I used a python script to compute bitcoin address from public key. This works with the public key:
within the sigscript if this transaction: https://www.blockchain.com/btc/tx/56beef8afe5a4b5b41225211e62c3e7bce5747c4c8dcdd982173e8496687794b I correctly get the corresponding address:
I tried with the same python code to check where is the public key of the first input of this transaction: https://www.blockchain.com/btc/tx/01e7c525a5759cde1d04d2e9a363424053ace3ff1d2dde9cd1b368493254bd0d
I tried to check if I get the address of this input:
Unfortunately, I didn't manage to end with this address when I use the second field of the witness of this input, which should be the public key of the address I am trying to get (the one starting with 34xp):
SHA256+RIPEMD160+b58encode on this data doesn't correspond to the address above (the one starting with 34xp), and I didn't figured out why, and where is the public key of this address in this transaction input. Could anyone please give me a clue about it?