0
I just need to parse a private node and lookup one bitcoin address and get all transactions going in or out of the address preferably using nodeJS within the last 200 or so blocks. Any recommendations?
0
I just need to parse a private node and lookup one bitcoin address and get all transactions going in or out of the address preferably using nodeJS within the last 200 or so blocks. Any recommendations?
0
This question is pretty broad as parsing a node involves decoding every transaction within a block(which would require txindex to be enabled), and recording each output and input until you end up with a list of all outputs that have not been used as an input aka an unspent output.
With a fully synced node and txindex=1 you can begin iterating through each block of the last 200 blocks with loops using the rpc calls getblockhash getblock getrawtransaction and decoderawtransaction, storing the outputs in a database. On each new block you should check every input to see if there is a transaction id matching an output in your existing output database, if there is that output has been spent. The node-bitcoin JSON-RPC wrapper should work fine for implementing these calls to your node. As you can imagine this would take some time.
Can you explain what "parsing a node" means here? Sounds like you mean something like parsing every block in the blockchain? – Jonathan Cross – 2019-04-23T23:22:32.983