Closed deefactorial closed 1 year 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.
closing for archival
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?