Prerequisites

Before proceeding with this project, a general knowledge of programming concepts and JavaScript is highly recommended. To start coding, we need to have the following elements installed:

  • npm (the npm package gets installed along with Node.js)
  • bower
  • git

For this project, I suggest we switch bitcoin client to operate on the testnet. In your bitcoin.conf file, keep the same user and password and edit the following values:

regtest=0testnet=1prune=550

Afterward, run bitcoin-qt and generate two addresses, one for the merchant and the other for the customer, and then provision some testnet bitcoins to the customer's address from an online bitcoin faucet such as https://testnet.manu.backend.hamburg/faucet.

Get Blockchain By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.