├── indy-base-dockerfile ├── indy-cli ├── README.md ├── Makefile └── LICENSE /indy-base-dockerfile: -------------------------------------------------------------------------------- 1 | FROM solita/ubuntu-systemd:16.04 2 | 3 | # Install environment 4 | RUN apt-get update -y && apt-get install -y \ 5 | git \ 6 | wget \ 7 | python3.5 \ 8 | python3-pip \ 9 | python-setuptools \ 10 | python3-nacl \ 11 | apt-transport-https \ 12 | ca-certificates \ 13 | sudo \ 14 | nano \ 15 | emacs \ 16 | vim 17 | RUN pip3 install -U \ 18 | 'pip<10.0.0' \ 19 | setuptools 20 | RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 21 | RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BD33704C 22 | RUN echo "deb https://repo.sovrin.org/deb xenial master" >> /etc/apt/sources.list 23 | RUN echo "deb https://repo.sovrin.org/sdk/deb xenial master" >> /etc/apt/sources.list 24 | RUN apt-get update -y && apt-get install -y indy-node libindy 25 | RUN pip3 install python3-indy 26 | WORKDIR /home/indy 27 | ADD . /home/indy 28 | 29 | # Set NETWORK_NAME in indy_config.py to 'sandbox' 30 | RUN awk '{if (index($1, "NETWORK_NAME") != 0) {print("NETWORK_NAME = \"sandbox\"")} else print($0)}' /etc/indy/indy_config.py> /tmp/indy_config.py 31 | RUN mv /tmp/indy_config.py /etc/indy/indy_config.py 32 | 33 | RUN echo " " >> /etc/indy/indy_config.py 34 | RUN echo "logLevel=0" >> /etc/indy/indy_config.py 35 | RUN echo " " >> /etc/indy/indy_config.py 36 | -------------------------------------------------------------------------------- /indy-cli: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python3 2 | """ 3 | Convenience script for calling the indy command line interface (CLI). For now, 4 | the CLI is designed for experimenting with the Indy Identity platform, and not 5 | for creating a live consensus pool. For that, it's as simple as defining a node 6 | registry, creating a looper, creating a node, and running it. 7 | 8 | $ indy-cli 9 | 10 | or supply a command to be executed first 11 | 12 | $ indy-cli "new nodes all" 13 | 14 | Spec: The indy-cli is a fix for the indy script to provide a command line 15 | execution of commands which require somewhat means to be atomic. The indy 16 | script as it is today fails for executing commands from the command line 17 | if one command depends on the previous for completion. A good example 18 | is to provide a list of commands to indy script and the last one as quit and 19 | you can see that the indy script exits before finishing all the commands 20 | due to asyncronous operation and no concept of atomic operations for commands. 21 | For now this is a solution for the Alice demo to setup without a human linearly 22 | stepping through commands and waiting for responses for the next. 23 | """ 24 | 25 | import logging 26 | import os 27 | import sys 28 | import asyncio 29 | import time 30 | 31 | # NOTE: Loading of plugin should happen as early as possible 32 | # So put all other required imports after loadPlugins function call below 33 | from plenum.common.plugin_helper import loadPlugins 34 | from indy_common.config_util import getConfig 35 | 36 | logging.root.handlers = [] 37 | logger = logging.getLogger() 38 | logger.propagate = False 39 | logger.disabled = True 40 | 41 | config = getConfig() 42 | baseDir = os.path.expanduser(config.CLI_BASE_DIR) 43 | network_dir = os.path.expanduser(config.CLI_NETWORK_DIR) 44 | if not os.path.exists(baseDir): 45 | os.makedirs(baseDir) 46 | if not os.path.exists(network_dir): 47 | os.makedirs(network_dir) 48 | loadPlugins(baseDir) 49 | 50 | # NOTE: Put all regular imports below (not related to loadplugin) 51 | from indy_client.cli.cli import IndyCli 52 | from stp_core.loop.looper import Looper 53 | 54 | 55 | async def cmdline(cli,commands): 56 | for command in commands: 57 | if not command.startswith("--"): 58 | print("\nRunning command: '{}'...\n".format(command)) 59 | cli.parse(command) 60 | await asyncio.sleep(3) 61 | 62 | def run_cli(): 63 | 64 | commands = sys.argv[1:] 65 | 66 | withNode = True if '--with-node' in commands else False 67 | 68 | 69 | with Looper(debug=config.LOOPER_DEBUG) as looper: 70 | curDir = os.getcwd() 71 | logFilePath = os.path.join(curDir, config.logFilePath) 72 | cli = IndyCli(looper=looper, 73 | basedirpath=baseDir, 74 | ledger_base_dir=network_dir, 75 | logFileName=logFilePath, 76 | withNode=withNode 77 | ) 78 | 79 | looper.run(cmdline(cli,commands) ) 80 | commands = [] 81 | looper.run(cli.shell(*commands)) 82 | 83 | 84 | 85 | default_config = """ 86 | [node_reg] 87 | Alpha = 127.0.0.1 8001 88 | Beta = 127.0.0.1 8003 89 | Gamma = 127.0.0.1 8005 90 | Delta = 127.0.0.1 8007 91 | 92 | [client_node_reg] 93 | AlphaC = 127.0.0.1 8002 94 | BetaC = 127.0.0.1 8004 95 | GammaC = 127.0.0.1 8006 96 | DeltaC = 127.0.0.1 8008 97 | 98 | [storage_locations] 99 | basePath = ~ 100 | """ 101 | 102 | 103 | if __name__ == '__main__': 104 | run_cli() 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Abstract 2 | 3 | A turnkey, Docker-based sandbox that enables quick and easy exploration of Hyperledger Indy concepts. This devops repo can be used to gather hands-on experience of Indy basics using the scenarios outlined in the [Sovrin's Getting Started Guide](https://github.com/hyperledger/indy-node/blob/stable/getting-started.md). 4 | 5 | ## Quick Summary commands 6 | 7 | With just four command lines executed you have the Indy Demo ready to use. 8 | 9 | ``` 10 | $ git clone https://github.com/brycecurtis/indy-tutorial-sandbox.git 11 | $ cd indy-tutorial-sandbox 12 | $ make indy-base 13 | $ make local run-demo 14 | ``` 15 | 16 | # Indy Docker 17 | 18 | A Docker file is provided that creates and configures Indy nodes and clients. The resulting Docker image can be used to instantiate the particants in the **Alice Demo** that are described in the [Sovrin's Getting Started Guide](https://github.com/hyperledger/indy-node/blob/stable/getting-started.md). 19 | 20 | ## Dependencies 21 | 22 | While the Docker image that will be created below may run on many different versions of Docker, it was initially tested and verified on Docker v17.10.0-ce. To see what version of Docker is currently installed on your system, run: 23 | 24 | ``` 25 | $ docker --version 26 | ``` 27 | 28 | Information on downloading and installing Docker for various platforms can be found [here](https://www.docker.com/get-docker). 29 | 30 | ## Step 1: Create the Indy Docker Image 31 | 32 | Clone the **indy-tutorial-sandbox** repository. 33 | 34 | ``` 35 | $ git clone https://github.com/brycecurtis/indy-tutorial-sandbox.git 36 | ``` 37 | 38 | Change to the cloned directory and use the **Makefile** target **indy-base** to create the **indy-base** Docker image. 39 | 40 | ``` 41 | $ make indy-base 42 | ``` 43 | 44 | Now, you should have a **indy-base** Docker image available to run. 45 | 46 | ``` 47 | $ docker images 48 | REPOSITORY TAG IMAGE ID CREATED SIZE 49 | indy-base latest 0e5fe43800da 43 hours ago 1.09GB 50 | ``` 51 | 52 | ## Step 2: Run the Alice Demo 53 | 54 | You can set up and run the **Alice Demo** using the **indy-base** Docker image from Step 1. In the cloned directory there is a **Makefile** that can be used to start and stop all of the Docker containers used for the demo. 55 | 56 | The **run-demo** target starts a four-node pool (Node1-Node4), sets up and runs the Faber, Acme and Thrift agents, and starts an Indy CLI. 57 | 58 | ``` 59 | $ make run-demo 60 | ``` 61 | 62 | The **Makefile** has a number of targets that perform many tasks. An attempt is made to determine the local IP address. It can be checked using the **local** target. If you want to use a different IP address, you can edit the Makefile and set the LOCAL variable. 63 | 64 | To see what your local address is you can run the command with just the **local** target. 65 | 66 | ``` 67 | $ make local 68 | ``` 69 | 70 | After executing the **run-demo** target, you should have 8 Docker containers running. 71 | 72 | ``` 73 | $ docker ps 74 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 75 | e26633e1d1f9 indy-base "/bin/bash -c ' ..." 10 seconds ago Up 11 seconds Indy 76 | 41e9fcc0733f indy-base "/bin/bash -c 'gen..." 11 seconds ago Up 12 seconds 0.0.0.0:7777->7777/tcp Thrift 77 | 287accdc16a2 indy-base "/bin/bash -c 'gen..." 12 seconds ago Up 12 seconds 0.0.0.0:6666->6666/tcp Acme 78 | 5d13e6af5836 indy-base "/bin/bash -c 'gen..." 13 seconds ago Up 13 seconds 0.0.0.0:5555->5555/tcp Faber 79 | 70126d9120f0 indy-base "/bin/bash -c 'ini..." 13 seconds ago Up 14 seconds 0.0.0.0:9707-9708->9707-9708/tcp Node4 80 | 5305fcb69354 indy-base "/bin/bash -c 'ini..." 14 seconds ago Up 15 seconds 0.0.0.0:9705-9706->9705-9706/tcp Node3 81 | 63932d40357e indy-base "/bin/bash -c 'ini..." 15 seconds ago Up 15 seconds 0.0.0.0:9703-9704->9703-9704/tcp Node2 82 | 7e9f2f93f41e indy-base "/bin/bash -c 'ini..." 15 seconds ago Up 16 seconds 0.0.0.0:9701-9702->9701-9702/tcp Node1 83 | ``` 84 | 85 | When the Indy container starts, it runs several Indy commands that set up the agents. Once the agents are operational, you are at the **indy>** prompt and the demo environment is ready for use. You can now follow the **Alice Demo** scenario. 86 | 87 | The following commands are from the demo script and can be used to test that the demo environment is working correctly. 88 | 89 | ``` 90 | indy@sandbox> prompt ALICE 91 | ALICE@sandbox> new wallet Alice 92 | ALICE@sandbox> show sample/faber-request.indy 93 | ALICE@sandbox> load sample/faber-request.indy 94 | ALICE@sandbox> show connection "Faber College" 95 | ALICE@sandbox> accept request from "Faber College" 96 | ALICE@sandbox> show claim Transcript 97 | ALICE@sandbox> request claim Transcript 98 | ALICE@sandbox> show claim Transcript 99 | ``` 100 | 101 | The entire **Alice Demo** can be run using the **run-alice** target. This does everything that the **run-demo** target does, plus executes the remaining Indy commands to run the entire demo. 102 | 103 | You will be left at the **indy>** prompt, allowing you to explore additional commands. To get a list of all Indy commands, enter **help**. 104 | 105 | The **exit** command will exit the Indy command prompt and leave you at the bash shell command line. You can explore the file system or run the Indy command prompt again by typing **indy**. 106 | 107 | There are several directories under **~/.indy-cli** that might be interesting to explore. The network configuration is in the **~/.indy-cli/networks/sandbox** directory, and the wallets are in the **~/.indy-cli/wallets/sandbox** directory. 108 | 109 | 110 | ## Makefile Targets 111 | 112 | The following **Makefile** targets can be used to start and stop the Docker containers and set up the demo environment used for the **Alice Demo**. 113 | 114 | **indy-base** 115 | 116 | * Create the Docker image that is used for both Indy nodes and clients. 117 | 118 | **local** 119 | 120 | * Find the local host IP address. 121 | 122 | **run-demo** 123 | 124 | * Start all Indy node, Indy agents and Indy CLI used for the **Alice Demo**. This also automatically executes several Indy commands that set up the agents before leaving you at the **indy>** prompt. 125 | 126 | **run-alice** 127 | 128 | * Start all Indy node, Indy agents and Indy CLI used for the **Alice Demo**. This also automatically executes all of the Indy commands that run the entire Alice demo before leaving you at the **indy>** prompt. 129 | 130 | **indy-cli** 131 | 132 | * Start a new Indy CLI client leaving you at the **indy>** prompt. 133 | 134 | **stop** 135 | 136 | * Stop all Docker containers used for the **Alice Demo**. 137 | 138 | **start** 139 | 140 | * Start all stopped Docker containers used for the **Alice Demo** that were stopped using the **stop** target. 141 | 142 | **clean** 143 | 144 | * Stop and remove all Docker containers used for the **Alice Demo**. 145 | 146 | ## Troubleshooting 147 | 148 | Some failures running through the demo can be due to failure to contact the various service endpoints. Verify the IP addresses that the makefile is using and edit the Makefile LOCAL variable as necessary. 149 | 150 | 151 | 152 | ## Using the Docker Image 153 | 154 | The **indy-base** Docker image is used for both Indy nodes and clients. 155 | 156 | You can run the Docker image and interact with it using a bash shell. 157 | 158 | ``` 159 | $ docker run -it --rm indy-base /bin/bash 160 | ``` 161 | 162 | To start the Docker image as an Indy client: 163 | 164 | ``` 165 | $ docker run -it --rm indy-base /bin/bash 166 | # indy 167 | Loading module /usr/local/lib/python3.5/dist-packages/config/config-crypto-example1.py 168 | Module loaded. 169 | 170 | Indy-CLI (c) 2017 Evernym, Inc. 171 | Type 'help' for more information. 172 | Running Indy 1.2 173 | 174 | indy> 175 | ``` 176 | 177 | To start the docker image as an Indy node: 178 | 179 | ``` 180 | $ docker run -it --rm indy-base /bin/bash 181 | # init_indy_keys --name Alpha 182 | # start_indy_node Alpha 9701 9702 183 | ``` 184 | 185 | You can connect to an existing node: 186 | 187 | ``` 188 | $ docker exec -it Node1 /bin/bash 189 | ``` 190 | 191 | ## Cleanup 192 | 193 | To stop and remove the created Docker containers from your system: 194 | 195 | ``` 196 | $ make clean 197 | ``` 198 | 199 | To remove the Docker image from your system: 200 | 201 | ``` 202 | $ docker rmi indy-base 203 | ``` 204 | 205 | ## Links 206 | 207 | * [Getting Started with Indy](https://github.com/hyperledger/indy-node/blob/stable/getting-started.md) 208 | * [Indy Node](https://github.com/hyperledger/indy-node) 209 | * [Indy – Running the Getting Started tutorial locally](https://github.com/hyperledger/indy-node/blob/master/docs/indy-running-locally.md) 210 | * [Create a Network and Start Nodes](https://github.com/hyperledger/indy-node/blob/master/docs/start-nodes.md) 211 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash #bash syntax 2 | # 3 | # ALICE Indy Sovrin Demo 4 | # 5 | # Setup a four node Indy Cluster, and four Indy clients called Indy, Faber, Acme, and Thrift 6 | # 7 | # *** Make the indy-base docker image 8 | # 9 | # make indy-base 10 | # 11 | # *** Run the first part of the Alice demo and then interactively run the rest of the demo 12 | # 13 | # make run-demo 14 | # 15 | # *** Run the entire Alice demo 16 | # 17 | # make run-alice 18 | # 19 | # *** Start a cluster and then start indy and agents (Only run the first time) 20 | # make cluster 21 | # make indy 22 | # 23 | # *** Start a cluster and then start indy prompt 24 | # make cluster 25 | # make indy-cli 26 | # 27 | # *** Start Faber only 28 | # make faber 29 | # 30 | # *** You can stop all docker containers 31 | # make stop 32 | # 33 | # *** Remove all docker containers 34 | # make clean 35 | # 36 | 37 | # Detect the local IP address 38 | LOCAL:=$(shell ifconfig|grep 'inet '|grep -vm1 127.0.0.1|awk '{print $$2}' | sed -e 's/addr://g') 39 | 40 | # Uncomment to manually set the local IP address if not set correctly above 41 | # LOCAL=192.168.1.100 42 | 43 | NO_COLOR="\x1b[0m" 44 | OK_COLOR="\x1b[32;01m" 45 | ERROR_COLOR="\x1b[31;01m" 46 | WARN_COLOR="\x1b[33;01m" 47 | BLUE_COLOR="\x1b[34;01m" 48 | 49 | 50 | run-demo: clean info cluster faber acme thrift indy 51 | 52 | run-alice: clean info cluster faber acme thrift indy-alice 53 | 54 | indy-base: 55 | @echo -e $(BLUE_COLOR)Indy-base Docker $(NO_COLOR) 56 | -docker rmi -f indy-base 57 | docker build -t indy-base -f ./indy-base-dockerfile . 58 | @echo -e $(GREEN_COLOR)SUCCESS Indy-base Docker $(LOCAL) $(NO_COLOR) 59 | 60 | local: 61 | @echo -e $(BLUE_COLOR) Local IP is $(LOCAL) $(NO_COLOR) 62 | $(eval IPS=$(LOCAL),$(LOCAL),$(LOCAL),$(LOCAL)) 63 | $(eval IPFABER=$(LOCAL)) 64 | $(eval IPACME=$(LOCAL)) 65 | $(eval IPTHRIFT=$(LOCAL)) 66 | 67 | info: local 68 | @echo -e $(BLUE_COLOR) Settings.... $(NO_COLOR) 69 | @echo -e $(BLUE_COLOR) IPS=$(IPS) $(NO_COLOR) 70 | @echo -e $(BLUE_COLOR) IPFABER=$(IPFABER) $(NO_COLOR) 71 | @echo -e $(BLUE_COLOR) IPACME=$(IPACME) $(NO_COLOR) 72 | @echo -e $(BLUE_COLOR) IPTHRIFT=$(IPTHRIFT) $(NO_COLOR) 73 | 74 | cluster: 75 | @echo -e $(BLUE_COLOR) CLUSTER: Create 4 Nodes at IPS $(IPS) $(NO_COLOR) 76 | docker run --name Node1 -d -p 9701:9701 -p 9702:9702 indy-base /bin/bash -c "create_dirs.sh; init_indy_keys --name Node1; generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 --ips $(IPS); start_indy_node Node1 0.0.0.0 9701 0.0.0.0 9702" 77 | docker run --name Node2 -d -p 9703:9703 -p 9704:9704 indy-base /bin/bash -c "create_dirs.sh; init_indy_keys --name Node2; generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 2 --ips $(IPS); start_indy_node Node2 0.0.0.0 9703 0.0.0.0 9704" 78 | docker run --name Node3 -d -p 9705:9705 -p 9706:9706 indy-base /bin/bash -c "create_dirs.sh; init_indy_keys --name Node3; generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 3 --ips $(IPS); start_indy_node Node3 0.0.0.0 9705 0.0.0.0 9706" 79 | docker run --name Node4 -d -p 9707:9707 -p 9708:9708 indy-base /bin/bash -c "create_dirs.sh; init_indy_keys --name Node4; generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 4 --ips $(IPS); start_indy_node Node4 0.0.0.0 9707 0.0.0.0 9708" 80 | @echo -e $(OK_COLOR) SUCCESS: Cluster 4 nodes success at IPS $(IPS) $(NO_COLOR) 81 | 82 | indy-cli: info 83 | @echo -e $(BLUE_COLOR) INDY DEBUG: Create Indy $(IPS) $(NO_COLOR) 84 | docker run --rm --name IndyCli -it indy-base /bin/bash -c "create_dirs.sh; generate_indy_pool_transactions --nodes 4 --clients 5 --ips $(IPS); /bin/bash" 85 | 86 | indy: info 87 | @echo -e $(BLUE_COLOR) INDY: Create Indy and initialize with commandline jobs $(IPS) $(NO_COLOR) 88 | docker run --rm --name Indy -it indy-base /bin/bash -c "\ 89 | create_dirs.sh; generate_indy_pool_transactions --nodes 4 --clients 5 --ips $(IPS); \ 90 | ./indy-cli \ 91 | 'connect sandbox' \ 92 | 'new key with seed 000000000000000000000000Steward1' \ 93 | 'send NYM dest=ULtgFQJe6bjiFbs7ke3NJD role=TRUST_ANCHOR verkey=~5kh3FB4H3NKq7tUDqeqHc1' \ 94 | 'send NYM dest=CzkavE58zgX7rUMrzSinLr role=TRUST_ANCHOR verkey=~WjXEvZ9xj4Tz9sLtzf7HVP' \ 95 | 'send NYM dest=H2aKRiDeq8aLZSydQMDbtf role=TRUST_ANCHOR verkey=~3sphzTb2itL2mwSeJ1Ji28' \ 96 | 'new key with seed Faber000000000000000000000000000' \ 97 | 'send ATTRIB dest=ULtgFQJe6bjiFbs7ke3NJD raw={\"endpoint\": {\"ha\": \"$(IPFABER):5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}' \ 98 | 'new key with seed Acme0000000000000000000000000000' \ 99 | 'send ATTRIB dest=CzkavE58zgX7rUMrzSinLr raw={\"endpoint\": {\"ha\": \"$(IPACME):6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ\"}}' \ 100 | 'new key with seed Thrift00000000000000000000000000' \ 101 | 'send ATTRIB dest=H2aKRiDeq8aLZSydQMDbtf raw={\"endpoint\": {\"ha\": \"$(IPTHRIFT):7777\", \"pubkey\": \"AGBjYvyM3SFnoiDGAEzkSLHvqyzVkXeMZfKDvdpEsC2x\"}}' \ 102 | 'save wallet'; \ 103 | /bin/bash \ 104 | " 105 | @echo -e $(OK_COLOR) SUCCESS: Indy $(NO_COLOR) 106 | 107 | indy-alice: info 108 | @echo -e $(BLUE_COLOR) INDY ALICE: Create Indy and initialize with commandline jobs $(IPS) $(NO_COLOR) 109 | docker run --rm --name IndyAlice -it indy-base /bin/bash -c "\ 110 | create_dirs.sh; generate_indy_pool_transactions --nodes 4 --clients 5 --ips $(IPS); \ 111 | ./indy-cli \ 112 | 'connect sandbox' \ 113 | 'new key with seed 000000000000000000000000Steward1' \ 114 | 'send NYM dest=ULtgFQJe6bjiFbs7ke3NJD role=TRUST_ANCHOR verkey=~5kh3FB4H3NKq7tUDqeqHc1' \ 115 | 'send NYM dest=CzkavE58zgX7rUMrzSinLr role=TRUST_ANCHOR verkey=~WjXEvZ9xj4Tz9sLtzf7HVP' \ 116 | 'send NYM dest=H2aKRiDeq8aLZSydQMDbtf role=TRUST_ANCHOR verkey=~3sphzTb2itL2mwSeJ1Ji28' \ 117 | 'new key with seed Faber000000000000000000000000000' \ 118 | 'send ATTRIB dest=ULtgFQJe6bjiFbs7ke3NJD raw={\"endpoint\": {\"ha\": \"$(IPFABER):5555\", \"pubkey\": \"5hmMA64DDQz5NzGJNVtRzNwpkZxktNQds21q3Wxxa62z\"}}' \ 119 | 'new key with seed Acme0000000000000000000000000000' \ 120 | 'send ATTRIB dest=CzkavE58zgX7rUMrzSinLr raw={\"endpoint\": {\"ha\": \"$(IPACME):6666\", \"pubkey\": \"C5eqjU7NMVMGGfGfx2ubvX5H9X346bQt5qeziVAo3naQ\"}}' \ 121 | 'new key with seed Thrift00000000000000000000000000' \ 122 | 'send ATTRIB dest=H2aKRiDeq8aLZSydQMDbtf raw={\"endpoint\": {\"ha\": \"$(IPTHRIFT):7777\", \"pubkey\": \"AGBjYvyM3SFnoiDGAEzkSLHvqyzVkXeMZfKDvdpEsC2x\"}}' \ 123 | 'save wallet' \ 124 | 'prompt ALICE' \ 125 | 'new wallet Alice' \ 126 | 'load sample/faber-request.indy' \ 127 | 'show connection Faber' \ 128 | 'accept request from Faber' \ 129 | 'show claim Transcript' \ 130 | 'request claim Transcript' \ 131 | 'show claim Transcript' \ 132 | 'save wallet' \ 133 | 'load sample/acme-job-application.indy' \ 134 | 'accept request from Acme' \ 135 | 'show proof request Job-Application' \ 136 | 'set first_name to Alice' \ 137 | 'set last_name to Garcia' \ 138 | 'set phone_number to 123-456-7890' \ 139 | 'show proof request Job-Application' \ 140 | 'send proof Job-Application to Acme' \ 141 | 'show connection Acme' \ 142 | 'show claim Job-Certificate' \ 143 | 'request claim Job-Certificate' \ 144 | 'show claim Job-Certificate' \ 145 | 'load sample/thrift-loan-application.indy' \ 146 | 'accept request from Thrift' \ 147 | 'show proof request Loan-Application-Basic' \ 148 | 'send proof Loan-Application-Basic to Thrift' \ 149 | 'show proof request Loan-Application-KYC' \ 150 | 'send proof Loan-Application-KYC to Thrift' \ 151 | 'save wallet' \ 152 | ; \ 153 | /bin/bash \ 154 | " 155 | @echo -e $(OK_COLOR) SUCCESS: Indy $(NO_COLOR) 156 | 157 | faber: 158 | @echo -e $(BLUE_COLOR) FABER: Create Faber $(IPS) $(NO_COLOR) 159 | docker run --rm --name Faber -d -p 5555:5555 indy-base /bin/bash -c "create_dirs.sh; generate_indy_pool_transactions --nodes 4 --clients 5 --ips $(IPS); sleep 40; python3 /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/faber.py --port 5555" 160 | @echo -e $(OK_COLOR) Faber success assumes IPS $(IPS) $(NO_COLOR) 161 | 162 | acme: 163 | @echo -e $(BLUE_COLOR) ACME: Create Acme $(IPS) $(NO_COLOR) 164 | docker run --rm --name Acme -d -p 6666:6666 indy-base /bin/bash -c "create_dirs.sh; generate_indy_pool_transactions --nodes 4 --clients 5 --ips $(IPS); sleep 40; python3 /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/acme.py --port 6666" 165 | @echo -e $(OK_COLOR) Acme success assumes IPS $(IPS) $(NO_COLOR) 166 | 167 | thrift: 168 | @echo -e $(BLUE_COLOR) THRIFT: Create Thrift $(IPS) $(NO_COLOR) 169 | docker run --rm --name Thrift -d -p 7777:7777 indy-base /bin/bash -c "create_dirs.sh; generate_indy_pool_transactions --nodes 4 --clients 5 --ips $(IPS); sleep 40; python3 /usr/local/lib/python3.5/dist-packages/indy_client/test/agent/thrift.py --port 7777" 170 | @echo -e $(OK_COLOR) Thrift success assumes IPS $(IPS) $(NO_COLOR) 171 | 172 | 173 | stop: 174 | -docker stop Node1 175 | -docker stop Node2 176 | -docker stop Node3 177 | -docker stop Node4 178 | -docker stop Indy 179 | -docker stop IndyAlice 180 | -docker stop Faber 181 | -docker stop Acme 182 | -docker stop Thrift 183 | 184 | start: 185 | -docker start Node1 186 | -docker start Node2 187 | -docker start Node3 188 | -docker start Node4 189 | -docker start Indy 190 | -docker start IndyAlice 191 | -docker start Faber 192 | -docker start Acme 193 | -docker start Thrift 194 | 195 | clean: 196 | @echo -e $(BLUE_COLOR) CLEAN out docker images and prune $(NO_COLOR) 197 | -docker rm -f Indy 198 | -docker rm -f IndyAlice 199 | -docker rm -f Faber 200 | -docker rm -f Acme 201 | -docker rm -f Thrift 202 | -docker rm -f Node1 203 | -docker rm -f Node2 204 | -docker rm -f Node3 205 | -docker rm -f Node4 206 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | 179 | Copyright 2017 Sovrin Foundation 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. --------------------------------------------------------------------------------