scripthash to address

The following content was written by linuxqq on July 09, 2020, 03:48:47 AM in the thread scripthash to address. All content is owned by the author of the bitcointalk.org post. (original)


Maybe I don’t have a special understanding of the principles of Bitcoin, but I’m working hard to learn. I currently read the electrumx rosksdb directly. It seems that electrumx stores scripthash, but I want to get all the wallet addresses, a lot of BTC explorer How did they get the wallet address? electrumx’s database does not store scriptPubKey,I have used electrumx to synchronize all the data, but I can’t get all the addresses because the scripthash is stored

The following content was written by pooya87 on July 09, 2020, 04:59:11 AM in the thread scripthash to address. All content is owned by the author of the bitcointalk.org post. (original)


you can’t reverse a hash so you can’t go from the hash that ElectrumX database stores to the address.
it is not meant to be used like that anyways, the purpose of this design is for a user to hash their own address then send that hash to the Electrum node, then the node that has stored simple fixed length hashes can easily look up the balance and history and return it.

The following content was written by linuxqq on July 09, 2020, 05:45:59 AM in the thread scripthash to address. All content is owned by the author of the bitcointalk.org post. (original)


If all I get is an address hash, does that mean I can’t get all wallet addresses from electrumx?

The following content was written by bob123 on July 09, 2020, 08:00:28 AM in the thread scripthash to address. All content is owned by the author of the bitcointalk.org post. (original)


If all I get is an address hash, does that mean I can’t get all wallet addresses from electrumx?

Not directly in terms of calculate the input out of the resulting hash.
But in this case you could just create a list of all addresses and their hash. Then lookup the hash in your table and you got the corresponding address.


[…] It seems that electrumx stores scripthash, but I want to get all the wallet addresses, a lot of BTC explorer How did they get the wallet address?

Block explorer run a full node (e.g. bitcoin core) with txindex=1 and some custom software to query the needed data.
They most likely don’t run an electrum server. There is no obvious reason to do so.

The following content was written by linuxqq on July 09, 2020, 10:36:56 AM in the thread scripthash to address. All content is owned by the author of the bitcointalk.org post. (original)


If all I get is an address hash, does that mean I can’t get all wallet addresses from electrumx?

Not directly in terms of calculate the input out of the resulting hash.
But in this case you could just create a list of all addresses and their hash. Then lookup the hash in your table and you got the corresponding address.


[…] It seems that electrumx stores scripthash, but I want to get all the wallet addresses, a lot of BTC explorer How did they get the wallet address?

Block explorer run a full node (e.g. bitcoin core) with txindex=1 and some custom software to query the needed data.
They most likely don’t run an electrum server. There is no obvious reason to do so.

Thank you very much, I think your suggestion is very good, I can create my own database to map hash and publickey in redis

Subscribe our latest updates

Don't miss out. Be the first one to know when a new guide or tool comes out.

Subscription Form

Support Us ❤

Creating learning material requires a lot of time and resources. So if you appreciate what we do, send us a tip to bc1qm02xguzxxhk7299vytrt8sa8s6fkns2udf8gjj. Thanks!