2) Install necessary packages

  1. Open your preferred code editor and create a new project directory titled MyDigitalArtifact.

  2. Install Node.js and npm (if not already installed):

  • To check if Node.js is already installed, you can run node -v in your terminal, and it should display the version number.

  • If you haven't already installed Node.js and npm, you can download and install them from here.

  1. Initialize a new npm project:

Navigate to your project directory and in the terminal and run

npm init -y

This will create a package.json file in your directory with default values.

  1. Install the bitcoinjs-lib library:

In the terminal, while still in your project directory, run:

npm install bitcoinjs-lib

This will install the bitcoinjs-lib library and add it to your node_modules folder. It will also add an entry for it in the package.json file.

Last updated