ipld / js-ipld-bitcoin

JavaScript implementation of Bitcoin IPLD formats
MIT License
12 stars 11 forks source link

How to generate Block Binary? #67

Closed deefactorial closed 1 year ago

deefactorial commented 4 years ago

the tests give examples with pre-compiled hex binary of a block but don't explain how to generate those. The best examples I could get are https://en.bitcoin.it/wiki/Block_hashing_algorithm how do I generate these hex examples from block headers?

rvagg commented 4 years ago

Have a look in https://github.com/ipld/js-bitcoin where there's a full two-way process, you can go from binary to data model and data model to binary.

js-bitcoin needs some minor restructuring because it's using an older form of our multiformats work, I need to tidy that up, get it published as @ipld/bitcoin and deprecate this repo. So you're best off looking over there for these kinds of things.

rvagg commented 1 year ago

closing for archival