2) Install necessary packages
Open your preferred code editor and create a new project directory titled
MyDigitalArtifact.Install Node.js and npm (if not already installed):
To check if Node.js is already installed, you can run
node -vin 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.
Initialize a new
npmproject:
Navigate to your project directory and in the terminal and run
npm init -yThis will create a package.json file in your directory with default values.
Install the
bitcoinjs-liblibrary:
In the terminal, while still in your project directory, run:
npm install bitcoinjs-libThis 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