1
I'd like to parse the blockchain in order to produce a list of all addresses that are mentioned in the blockchain.
I'd like to do this with a program, language agnostic.
1
I'd like to parse the blockchain in order to produce a list of all addresses that are mentioned in the blockchain.
I'd like to do this with a program, language agnostic.
1
Addresses aren't mentioned in the blockchain. But you can calculate them based on the transaction scripts. In order to do this, you need to calculate the address from the scriptPubkey of each transaction. To calculate the address you have to:
P2PKH or P2SH, so you know what prefix to use: List of address prefixes.BASE58CHECK(HASH160(<prefix><scriptPubKey>))
Just use a tool: https://github.com/mrqc/bitcoin-blk-file-reader and modify the code as you like.
– Erhard Dinhobl – 2018-08-19T18:32:43.340Several Bitcoin implementations index by address already. See libbitcoin-server, which allows you to query for all tx spending to/from an address. Unless you are interested in doing this yourself :) – James C. – 2019-01-07T12:08:08.527