1
A few days ago, I got a BITCOIN traffic which contains some tx message. some of tx messages contain witness data. I want to produce all output addresses from transaction output scripts. I extracted some of them, but in some cases, generated output address however seems to be valid, but I can't track them in some sites like
as an example, in tx output script which is showed below, how I can extract True address?
00142f82e61a98eb7027672760c691784d5fbccf7ce3
it seems a script which has op_code = 0x00 and push data length = 0x14.
Are you sure? but the address you entered is wrong and is not in https://www.blockchain.com/ or https://www.blockchain.com
– Saeed – 2019-05-21T17:08:38.213@Saeed The address I have listed in the answer is correct. Most block explorers have still not implemented support for bech32 native segwit addresses. You can check the transaction containing the address here. Note the first output of the transaction. http://chainquery.com/bitcoin-api/getrawtransaction/0a9ac867a88cbfb60bdbf2a9063e4dffb374201490075e41057450ebbdf689e4/1
– Ugam Kamat – 2019-05-21T17:20:01.247Thank you. it seems that the address you generated is valid, but I can't generate it with bech32 which you introduced before. first I extract public key (2f82e61a98eb7027672760c691784d5fbccf7ce3 ) then encode it with sha256 and then encode it with RIPEMD160. at last, I give generated output to bech32 encoder and it generates a valid bitcoin address but it is not bc1q97pwvx5cadczwee8vrrfz7zdt77v7l8re20cz4 which you produced. – Saeed – 2019-05-26T07:51:40.457
@Saeed
2f82e61a98eb7027672760c691784d5fbccf7ce3is not the public key but the hash160 of the public key. So you do not have to calculate the hash again. Just bech32 encode2f82e61a98eb7027672760c691784d5fbccf7ce3using version 0. – Ugam Kamat – 2019-05-26T10:50:21.757