3

I am just developing and testing Bitcoin mining application in plain Javascript (slow but can be run off-line).

To test it to work correctly I need to download Bitcoin block headers from Blockchain.info , 6 input parameters .

Are you aware how to call Blockchain API https://blockchain.info/api/blockchain_api

I don't use Bitcoin address, no other mining app, just need to download a number block headers from hashed blocks.

Any idea, demo, example or csv file coming with 6 input parameters as described in Bitcoin hashing algorithm

https://en.bitcoin.it/wiki/Block_hashing_algorithm

2
  • 1
    ever thought of using testnet?
    – T9b
    Commented Jan 28, 2014 at 16:25
  • It might be easier to test (and more profitable to run) should you target an alt-coin rather than Bitcoin
    – Joe Pineda
    Commented Mar 12, 2014 at 13:43

1 Answer 1

2

You can download the blockchain headers using ElectrumX. The data is binary packed, but can be deserialized easily enough. You seem to be trying to solo mine, which is a bad idea at the best of times, let alone with JavaScript. You also seems to be trying to build a SPV client. An easier way would just be to use https://blockchain.info/latestblock to get the lastblock hash and use that.

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.