0

I have BTC data dumps from Blockchair. These have almost all the data I need, however they do not include the raw transaction hex.

Is it possible to generate the tx_hex from this data in Python? or would I need the private key to do that? The inputs/outputs do include the script if that helps...

fpghost
  • 127
  • 1
  • When you say `tx_hex` it seems like you want the raw transaction in hex form. This is public information in the bitcoin blockchain you wouldn't need a secret to produce that. – Michael Tidwell Jun 08 '23 at 17:31
  • I know, but I am grabbing these on large scale. It would be costly to query an API for each tx_id to get the tx_hex. I have the decoded data in the Blockchair data dumps, and was wondering if I can simply construct the tx_hex (in python for example) from the decoded tx – fpghost Jun 09 '23 at 05:53
  • But you don't need to grab this from Blockchair at all; any Bitcoin node can give you this data directly. That probably uses fewer resources than even just downloading all these dumps. – Pieter Wuille Jun 09 '23 at 15:00
  • I am doing this on a server in bulk. I am not running a local node. I have the tx data and found a way to build tx_hex from that using bitcoin-lib in the end. Will post the solution later. – fpghost Jun 11 '23 at 15:14

0 Answers0