This project provides a simple web application for working with Bitcoin data. It includes two tools:
- Target Calculator: This tool allows you to calculate the target value from a given compact target.
- Block Verifier: This tool takes a block header as input and verifies its hash.
The application is built using HTML, CSS, and JavaScript. It utilizes Tailwind CSS for styling.
- Clone the repository.
- Open
index.htmlin your web browser. - Or you can also checkout at https://dongyukang.github.io/bitcoin-validator
- Enter a compact target value in hexadecimal format (e.g.,
0x17038a6d). - Click the "Calculate" button.
- The results will be displayed, including the target value in decimal and hexadecimal formats, as well as the difficulty.
- Enter a block header in hexadecimal format (80 bytes).
- Click the "Verify" button.
- The application will split the input into its components and display the SHA256 hash of the block header.
Contributions are welcome! Please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.