This folder contains a demonstration of basic Hyperledger Indy and Aries Agents, which are built on the Ursa project. The agents provide a web browser interface to show establishing relationships between agents, issuing verifiable credentials, and proving claims from verifiable credentials.
This demonstration is based on some early Indy agent code that should NOT be used as the basis of new implementations or as a reference for implementing an agent. Since this demonstration was developed the Indy (and Aries) community has evolved the notion of Agents significantly and this code base has been abandoned. It is still a good demo for understanding how agents work on a superficial level—the concepts of agents connecting and exchanging credentials. However, if you are interested in building on the latest Indy/Aries code, you should look at the Aries project, the Aries Cloud Agent - Python and other interoperable components. If you are a developer (or wannabe), check out this Becoming an Indy/Aries Developer guide.
- To learn more about Hyperledger Indy, see the Indy project wiki.
- To learn more about Hyperledger Aries, see the Aries project wiki.
- To learn more about Hyperledger Ursa, see the Ursa project wiki
This demo is used as a demonstration for those taking the Linux Foundations's edX LF172x course, Introduction to Hyperledger Sovereign Identity Blockchain Solutions: Indy, Aries and Ursa.
Click here to view a short screencast of the demo.
The only prequisite (other than a browser) is an account with Docker Hub. Docker Hub is the "Play Store" for the Docker ecosystem.
Go to the Play with Docker and (if necessary) login. This site is operated by Docker to support developers learning about Docker.
If you want to learn more about the
Play with Docker
environment, look at the About and the Docker related tutorials at the Docker Labs Training Site.
Click the "Start" button to start a Docker sandbox you can use to run the demo, and then click the +Add an Instance
link to start a terminal in your browser. Within the terminal that is visible in your browser, run the following commands:
git clone https://github.com/cloudcompass/ToIPLabs
cd ToIPLabs/src/indy-material/nodejs
Tip: To paste text in the terminal window, right-click on the window and choose
paste
The steps for running the demonstration are:
- Run the command
./manage build
to build the components of the software - Run the command
./manage up
to run the components
It takes a while for the demo to start—lots of things are happening. The logs for all of the containers will display in the terminal window. Logs show the output of both the Blockchain Ledger nodes communicating and the Indy agents starting up and communicating with the ledger.
Things to watch for as the demo starts up:
- You should periodically see things like "Listening on port 3001," which indicates an Agent is up and running.
- You should not see a stack trace error in the code—that would indicate a problem.
- You should not see any "Container exiting" messages, indicating containers not starting up properly.
- There should be 10 docker containers running. You can hit
ctrl-c
to exit the log viewer and run the commanddocker ps
to see all of the containers running.- To get back to seeing the scrolling logs, run
./manage logs
.
- To get back to seeing the scrolling logs, run
- Once the output slows significantly and you only see messages from the nodes (the containers running the ledger), everything should be working.
As the demo starts up, a series of four digit numbers will appear above the terminal. Those are the exposed ports of the running containers and the numbers are links to start a browser tab accessing that port.
To go through the demonstration, click the following numbers from the list:
- 3000 for Alice
- 3002 for Faber College
- 3003 for Acme Corporation
If you click the links before the agent is active, you might get a Connection reset by peer
error messages. Monitor the logs and wait longer and then try again.
The instructions for walking through the demonstration script are here: Agent Demo Script.
You can also open the Blockchain Ledger Explorer:
- 9000 for the Ledger Explorer
Although we don't talk about them in the demo overview, there are two additional agents running that you can access:
- 3001 for Bob
- 3004 for Thrift Bank
The remainder of the numbers, (ports 9701-9708) are the ports to the Blockchain Ledger nodes, two per node.
To stop the demo, go to the browser tab where you ran docker-compose up
, click the red Close Session
button on the left and close the browser tab. Note that if you don't close the session or the tab, the terminal session will expire 4 hours after you started it.
If you'd like to run the demo locally, on your own machine, see the instructions here.
The code for this demonstration was initially written by Spencer Holman and Matthew Hailstone of Brigham Young University. Carol Howard created the documentation for the demonstration.