This Node.js script decodes a Bitcoin transaction hex, providing details such as version, inputs, outputs, and locktime. Additionally, a sample test script is included to validate the decoding functionality.
- Node.js installed (https://nodejs.org/)
- npm (Node Package Manager) installed (included with Node.js)
-
Clone the repository:
git clone https://github.com/your-username/bitcoin-transaction-decoder.git
-
Navigate to the project directory:
cd bitcoin-transaction-decoder
-
Install dependencies:
npm install
Run the script:
node index.js
To run the test script:
npm test
Dependencies bitcoinjs-lib: A library for Bitcoin-related functions. Contributing Contributions are welcome! Feel free to open issues or submit pull requests.