Author

Topic: scripthash to address (Read 159 times)

jr. member
Activity: 34
Merit: 6
July 09, 2020, 06:36:56 AM
#5
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
legendary
Activity: 1624
Merit: 2481
July 09, 2020, 04:00:28 AM
#4
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.
jr. member
Activity: 34
Merit: 6
July 09, 2020, 01:45:59 AM
#3
If all I get is an address hash, does that mean I can't get all wallet addresses from electrumx?
legendary
Activity: 3472
Merit: 10611
July 09, 2020, 12:59:11 AM
#2
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.
jr. member
Activity: 34
Merit: 6
July 08, 2020, 11:48:47 PM
#1
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
Jump to: