Is there a desktop C++/Python library to take a raw hex bitcoin block as input and then break it down to various parameters and print it.
Moreover it should be able to validate the structure of a bitcoin block based on all the latest protocols and rules. I don't have the bitcoin core and can't afford to download 400GB but what i want to achieve is the following:
- Get the latest block number, its hash and bits from online. - this part is not difficult.
- Manually lower the bits/difficulty so that mining is much easier (for testing sake).
- Create a coinbase transaction in hex (by hand) using some existing wallet address.
- Using the coinbase transaction above create a block header and get the valid hash for lowered bits.
- Completely create a new Coinbase Block in hex.
- Validate using the library if the Coinbase Block created is structurally sound according to all the rules and protocols. In other words, if the difficulty was the lower one as we assumed, the block would have been valid and mined on the 'mainnet'.