Step by Step Guide to Set Up Hyperledger Indy with Node.js

Laxman Kumar
Akeo
Published in
3 min readMay 31, 2019
Hyperledger Indy

If you have just begun your career as a blockchain developer and need to understand what is Hyperledger Indy, then read our article here.
As mentioned in our first article, Hyperledger Indy provides tools, libraries, and reusable components for providing digital identities rooted on blockchains or other distributed ledgers so, that they are interoperable across digital networks, administrative domains, and applications.
Now let’s begin to understand how to use these elements to set up Hyperledger Indy as well as create wallets in the blockchain.
The following are prerequisites for installing Hyperledger Indy:

1. Git

2. Node Js

3. NPM

4. Libindy

5. Docker

Steps to set up Hyperledger Indy

  1. Clone the Hyperledger Indy SDK in your system
    Git clone https://github.com/hyperledger/indy-sdk.git

2. Run -> cd indy-sdk/samples/nodejs/

3. Run npm install

Note:- Before run npm install Make sure you have libindy installed.
If you have not install libindy then you can run below command
sudo apt-get install -y libindy

After that you can set PATH in your system. Export the `LD_LIBRARY_PATH` environment variable to point to the `libindy.so` parent directory, or copy libindy.so to `/usr/lib/libindy.so`

4. run npm run ledger:start

Make sure your command should run successfully as shown in the image below:

Now your Indy pool is ready, you can create the wallet.
Lets run a sample code of indy-sdk repository

  1. cd src
  2. run node main.js

Conclusion

  1. When the code is run, it will setup a Hyperledger Indy node by pulling and starting the required dockers.
  2. For the wallet: The code will create wallets according to requirement. Moreover, one can change or modify the wallet creation code as per their needs or requirements.

If you want to learn more about main.js code and how it is work you can read
https://github.com/hyperledger/indy-sdk/blob/master/docs/getting-started/indy-walkthrough.md#step-1-getting-trust-anchor-credentials-for-faber-acme-thrift-and-government

--

--