SelfServe

ADD YOUR ENDORSER DID TO AN INDICIO TEST LEDGER

How to create a DID and Verkey using indy-cli, step-by-step
SelfServe is a website designed to help you with one part of getting started using the Indicio Test Networks. The TestNet is for your initial trials with setting up your initial agents, DIDs, Schemas, etc. and is the most volatile of the networks because it gets the newest upgrades first. The DemoNet, is more stable and can be safely used for end-user testing and demos when you are ready to move forward.

To be able to enter a DID and a Verkey into the form provided, you will need to install an agent with a wallet that can store the private counterparts of the public keys for these items that you will provide to the form. In other words, you have to create the items in your own wallet before the SelfServe tool can add them to the ledger on the requested Network. While other tools can also be used to create the DID, these instructions will give you a step-by-step guide to installing indy-cli, a command line interface that provides access to your very own wallet on your Ubuntu, Mac, or Windows machine.

 

I. Install indy-cli 

a) Please see Appendix A (below) and select the right section for instructions on installing the indy-cli on your Ubuntu, Mac, or Windows machine.

II. Start indy-cli 

a) Start your indy-cli using the instructions from Appendix A for your platform.

 1. indy-cli ––config cliconfig

b) Type ‘y’ to accept the TAA agreements, if needed.

III. Create Pools 

a) “Creating a pool” is really just adding a named link to an existing network (or pool). You only need to create the one you need, but here are the instructions for each:

b) pool create testnet gen_txn_file=pool_transactions_testnet_genesis

c) pool create demonet gen_txn_file=pool_transactions_demonet_genesis

d) Creating a pool only needs done once for each pool on each machine on which you install indy-cli.  Pool connect (the following command) must be done every time you rerun indy-cli.  

e) pool connect <pool-name>

1. pool connect testnet

IV. Create and open a Wallet 

a) The <wallet key> is a secure key that only you should know. Quotes are not required for this key. Save it in a secure place for later use. You will use it every time you need to run commands from the CLI.

b) wallet create my_wallet key=<wallet key>

c) “wallet create” only needs to be run once for each wallet on your machine.  The following command “wallet open” will need to be run every time you restart indy-cli and would like to use the keys in that wallet.

d) wallet open my_wallet key=<wallet key>

e) Note: Keep your wallet open for the remaining commands in this guide.

V. Create a DID 

a) did new

b) The return for this command is the DID and Verkey needed in the selfserve web page.  To see all of the DID’s in your wallet use did list . To verify that your DID is on the network you are connected to (your pool) use ledger get-nym did=<your DID>

c) Please note that you can add a seed=<32 character secret seed> to the “did new” command. The seed parameter allows you to recreate your DID in a different wallet if needed. The seed parameter is not required, and might not be needed on the test networks but should be used for DIDs needed for demos or DIDs used on the production network.

Appendix A: Installing the Indy CLI 

You will need to perform the following once for each Indy CLI machine you would like to set up.  Assistance for each method listed below is available via support@indicio.tech.

Windows

To install the CLI on Windows 10 perform the following steps:

a) Download indy-cli_1.16.0.zip and unzip it. 

b) Run indy-cli.exe to verify proper installation.  You should see a new window appear with an indy> prompt.  Type “exit” to close the app. 

c) If you get an error stating that it is missing vcruntime140.dll then do the following: 

1. Download and install vc_redist.x64.exe from the Visual Studio 2017 section on the https://support.microsoft.com/en-ae/help/2977003/the-latest-supported-visual-c-downloads page 

2. Rerun indy-cli.exe to see if it works as described in previous step. 

d) Download the GENESIS files to the indy-cli directory for later use: 

1. Open a command prompt.  (This will work differently if you use Windows Terminal)

2. cd to the directory where you unzipped the indy-cli package. For example, if you unzipped directly in your ‘downloads’ directory like I did you would type:  cd \Users\LBendixsen\Downloads\indy-cli_1.15.0

3. Download the following two files:

4. This one is for the Indicio TestNet (be sure to copy the entire command from the two lines):

5. curl -O https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis

6. And this one is for the Indicio DemoNet:

7. curl -O https://github.com/Indicio-tech/indicio-network/tree/main/genesis_files

e) Create a file named cliconfig in the same directory with indy-cli.exe and add to it the following contents: 

{ 

  “taaAcceptanceMechanism”: “for_session” 

} 

f)  Run indy-cli using a parameter:

1. indy-cli ––config cliconfig

2. A full path for cliconfig is needed if you do not run indy-cli from its directory.

 

Ubuntu

To install the CLI on Ubuntu, perform the following steps from the ubuntu command line:

a) sudo apt-key adv ––keyserver keyserver.ubuntu.com recv-keys CE7709D068DB5E88

b) sudo add-apt-repository “deb https://repo.sovrin.org/sdk/deb xenial stable”

c) sudo add-apt-repository “deb https://repo.sovrin.org/deb xenial stable”

d) sudo apt-get update -y

e) sudo apt-get upgrade -y

f) sudo apt-get install -y indy-cli

g) cd ~

h) Download the Genesis files for later use:

i) This one is for the Indicio TestNet (be sure to copy the entire command from the two lines)

j) curl -O https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis

k) And this one is for the Indicio DemoNet:

l) curl -O https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_demonet_genesis

m) Create a cliconfig file in your home directory and add the following contents:

{

   “taaAcceptanceMechanism”: “for_session”

 }

n) Run indy-cli:

1. indy-cli ––config cliconfig

2. A full path for cliconfig is needed if you do not run indy-cli from its directory.

Mac

Since there is not a prepackaged version of the CLI prepared for the Mac, the following steps will help you to create an environment, build, and run the CLI in a Mac terminal.

a) Open a Terminal

b) Run the following commands in the terminal:

1. cd ~

2. mkdir github

3. cd github

4. git clone https://github.com/hyperledger/indy-sdk.git

5. /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

6. curl https://sh.rustup.rs -sSf | sh

7. brew install pkg-config libsodium automake autoconf cmake openssl zeromq zmq

c) NOTE: the openssl path needs to match what you currently have on your system

1. Run > ls /usr/local/Cellar/openssl/

2. Note the name of the directory shown (mine is 1.0.2p but latest is 1.0.2q)

3. Use this directory in place of the one listed below in your .profile file

d) Add the following lines to your ~/.profile file (making the correction shown in the previous step if needed)

export PATH=”$HOME/.cargo/bin:$PATH:~/github/indy-

sdk/libindy/target/debug:~/github/indy-sdk/cli/target/debug”

export PKG_CONFIG_ALLOW_CROSS=1

export CARGO_INCREMENTAL=1

export RUST_LOG=indy=trace

export RUST_TEST_THREADS=1

export OPENSSL_DIR=/usr/local/Cellar/openssl/1.0.2p #use your path

export LIBRARY_PATH=~/github/indy-sdk/libindy/target/debug/

export LIBINDY_DIR=~/github/indy-sdk/libindy/target/debug/

e) Run the following commands from your terminal to build the CLI and other dependencies:

1. source ~/.profile

2. cd ~/github/indy-sdk/libindy

3. cargo build

4. cd ../cli

5. cargo build</p

f) You can now run indy-cli to make sure it starts from within a terminal by typing:

1. indy-cli

2. exit (To exit from the indy-cli prompt when you are done)

g) Download the Genesis files using the following commands:

1. cd ~

2. This one is for the Indicio TestNet (be sure to copy the entire command from the two lines)

3. curl -O https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_testnet_genesis

4. And this one is for the Indicio DemoNet:

5. curl -O https://raw.githubusercontent.com/Indicio-tech/indicio-network/main/genesis_files/pool_transactions_demonet_genesis

h) Create a cliconfig file in your home directory and add the following contents:
{
“taaAcceptanceMechanism”: “for_session”
}

i) Run indy-cli:

1. indy-cli ––config cliconfig

2. A full path for cliconfig is needed if you do not run indy-cli from its directory.

 

Indicio provides development and hosting for Trusted Data Ecosystems. Enterprise, consumer, and mobile applications run on Indicio’s network and use its comprehensive ecosystem of software to issue, verify, and exchange verifiable digital credentials.

© 2021 Indicio, PBC All Rights Reserved.

Share This