• This repository has been archived on 29/Feb/2024
  • Stars
    star
    669
  • Rank 67,451 (Top 2 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

indy-sdk

Indy SDK

logo This is the official SDK for Hyperledger Indy, which provides a distributed-ledger-based foundation for self-sovereign identity. Indy provides a software ecosystem for private, secure, and powerful identity, and the Indy SDK enables clients for it. The major artifact of the SDK is a C-callable library; there are also convenience wrappers for various programming languages and Indy CLI tool.

All bugs, stories, and backlog for this project are managed through Hyperledger's Jira in project IS (note that regular Indy tickets are in the INDY project instead...). Also, make sure to join us on Hyperledger's Rocket.Chat at #indy-sdk to discuss. You will need a Linux Foundation login to get access to these channels

Understanding Hyperledger Indy

If you have just started learning about self-sovereign identity, here are some resources to increase your understanding:

  • This extended tutorial introduces Indy, explains how the whole ecosystem works, and how the functions in the SDK can be used to construct rich clients: Indy-SDK Getting-Started Guide

    • Please take note that this tutorial doesn't cover how sides set up a connection and exchange messages. How this communication channel can be built you can find at Aries project which describes it in great details.
  • Hyperledger Indy Working Group calls happen every Thursday at 8amPT, 9amMT, 11amET, 4pmBST. Add to your calendar and join from any device: https://zoom.us/j/232861185

  • A recent webinar explaining self-sovereign identity using Hyperledger Indy and Sovrin: SSI Meetup Webinar

  • Visit the main resource for all things "Indy" to get acquainted with the code base, helpful resources, and up-to-date information: Hyperledger Wiki-Indy.

  • You may also want to look at the older guide that explored the ecosystem via command line. That material is being rewritten but still contains some useful ideas.

Items included in this SDK

libindy

The major artifact of the SDK is a C-callable library that provides the basic building blocks for the creation of applications on the top of Hyperledger Indy. It is available for most popular desktop, mobile and server platforms.

Libindy wrappers

A set of libindy wrappers for developing Indy-based applications in your favorite programming language. Indy SDK provides libindy wrappers for the following programming languages and platforms:

Indy CLI

Indy CLI is the official command line interface that helps Indy developers and administrators.

Libnullpay

Libnullpay is a libindy plugin that can be used for development of applications that use the Payments API of Indy SDK.

Libvcx

Libvcx is a c-callable library built on top of libindy that provides a high-level credential exchange protocol. It simplifies creation of agent applications and provides better agent-2-agent interoperability for Hyperledger Indy infrastructure.

This library is currently in an experimental state and is not part of official releases.

Libvcx wrappers

A set of libvcx wrappers for developing vcx-based applications in your favorite programming language.

Indy SDK provides libvcx wrappers for the following programming languages and platforms:

These wrappers are currently in experimental state and it is not part of official releases.

Example use

LibVCX Agency

LibVCX can be used with mediator agency which enables asynchronous communication between 2 parties.

  • Dummy Cloud Agent is simple implementation of VCX compatible Cloud Agent. The main purpose of this implementation is VCX testing, demos and documentation of VCX protocol.
  • NodeVCXAgency is alternative implementation in NodeJS.

How-To Tutorials

Short, simple tutorials that demonstrate how to accomplish common tasks are also available. See the docs/how-tos folder.

  1. Write a DID and Query Its Verkey
  2. Rotate a Key
  3. Save a Schema and Cred Def
  4. Issue a Credential
  5. Negotiate a Proof
  6. Send a Secure Message

Installing the SDK

Release channels

The Indy SDK release process defines the following release channels:

  • master - development builds for each push to master branch.
  • rc - release candidates.
  • stable - stable releases.

Please refer to our release workflow for more details.

Ubuntu based distributions (Ubuntu 16.04 and 18.04)

It is recommended to install the SDK packages with APT:

sudo apt-get install ca-certificates -y
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
sudo add-apt-repository "deb https://repo.sovrin.org/sdk/deb (xenial|bionic) {release channel}"
sudo apt-get update
sudo apt-get install -y {library}
  • {library} must be replaced with libindy, libnullpay, libvcx or indy-cli.
  • (xenial|bionic) xenial for 16.04 Ubuntu and bionic for 18.04 Ubuntu.
  • {release channel} must be replaced with master, rc or stable to define corresponded release channel. Please See the section "Release channels" above for more details.

Windows

  1. Go to https://repo.sovrin.org/windows/{library}/{release-channel}.
  2. Download last version of library.
  3. Unzip archives to the directory where you want to save working library.
  4. After unzip you will get next structure of files:
  • Your working directory for libindy
    • include
      • ...
    • lib
      • indy.dll
      • libeay32md.dll
      • libsodium.dll
      • libzmq.dll
      • ssleay32md.dll

include contains c-header files which contains all necessary declarations that may be need for your applications.

lib contains all necessary binaries which contains libindy and all it's dependencies. You must add to PATH environment variable path to lib. It's necessary for dynamic linkage your application with libindy.

{release channel} must be replaced with master, rc or stable to define corresponded release channel. See section "Release channels" for more details.

{library} must be replaced with libindy, libnullpay, libvcx or indy-cli.

iOS

See wrapper iOS install documentation.

Android

  1. Go to https://repo.sovrin.org/android/{library}/{release-channel}.
  2. 3 architecture are supported as of now arm,arm64 and x86.
  3. Download latest version of library.
  4. Unzip archives to the directory where you want to save the .so files.
  5. After unzip you will get next structure of files:
  • Your working directory for libindy
    • include
      • ...
    • lib
      • libindy.so
      • libindy_shared.so
      • libindy.a

include contains c-header files which contains all necessary declarations that may be need for your applications.

lib contains three types of binaries.

  • libindy.so - This is a shared library which is statically linked with all the depenedencies. You dont need to sidelaod other dependencies like zmq, sodium and openssl to android app if you use this.

  • libindy_shared.so - This is pure shared library. It is not dynamically linked to its dependencies. You need to sideload the binaries with its dependencies. You can download the needed pre-built dependencies from here

    • Rename this library to libindy.so before loading it into the app. This will help you in having the compatibility with existing wrappers.
  • libindy.a - This is a static library, which is compiled with NDK.

{library} must be replaced with libindy, libnullpay or libvcx.

How to use instructions.

{release channel} must be replaced with rc or stable to define corresponded release channel. See section "Release channels" for more details.

Note :

  • [WARNING] This library should be considered as experimental as currently unit tests are not executed in the CI phase.

Centos

  1. Go to https://repo.sovrin.org/rpm/{library}/{release-channel}.
  2. Download and unzip the last version of library.
  3. Install with rpm -i library-version.rpm.

{library} must be replaced with libindy, libnullpay, libvcx, indy-cli to define corresponded library.

{release channel} must be replaced with master, rc or stable to define corresponded release channel. See section "Release channels" for more details.

MacOS

  1. Go to https://repo.sovrin.org/macos/{library}/{release-channel}.
  2. Download the latest version of library.
  3. Unzip archives to the directory where you want to save working library.
  4. After unzip you will get next structure of files:
  • Your working directory
    • include - contains c-header files which contains all necessary declarations that may be need for your applications.
      • ...
    • lib - contains library binaries (static and dynamic).
      • library.a
      • library.dylib
  1. Install dependent libraries: libsodium, zeromq, openssl. The dependent libraries should match the version with what you can find from otool -L libindy.dylib.

You need add the path to lib folder to LIBRARY_PATH environment variable.

{library} must be replaced with libindy, libnullpay, libvcx or indy-cli to define corresponded library.

{release channel} must be replaced with master, rc or stable to define corresponded release channel.

How to build Indy SDK from source

Note: By default cargo build produce debug artifacts with a large amount of run-time checks. It's good for development, but this build can be in 100+ times slower for some math calculation. If you would like to analyse CPU performance of libindy for your use case, you have to use release artifacts (cargo build --release).

How to start local nodes pool with docker

To test the SDK codebase with a virtual Indy node network, you can start a pool of local nodes using docker:

Note: If you are getting a PoolLedgerTimeout error it's because the IP addresses in cli/docker_pool_transactions_genesis and the pool configuration don't match. Use method 3 to configure the IPs of the docker containers to match the pool.

1) Starting the test pool on localhost

Start the pool of local nodes on 127.0.0.1:9701-9708 with Docker by running:

docker build -f ci/indy-pool.dockerfile -t indy_pool .
docker run -itd -p 9701-9708:9701-9708 indy_pool

2) Starting the test pool on a specific IP address

Dockerfile ci/indy-pool.dockerfile supports an optional pool_ip param that allows changing ip of pool nodes in generated pool configuration.

You can start the pool with e.g. with the IP address of your development machine's WIFI interface so that mobile apps in the same network can reach the pool.

# replace 192.168.179.90 with your wifi IP address
docker build --build-arg pool_ip=192.168.179.90 -f ci/indy-pool.dockerfile -t indy_pool .
docker run -itd -p 192.168.179.90:9701-9708:9701-9708 indy_pool

To connect to the pool the IP addresses in /var/lib/indy/sandbox/pool_transactions_genesis (in docker) and the pool configuration you use in your mobile app must match.

3) Starting the test pool on a docker network

The following commands allow to start local nodes pool in custom docker network and access this pool by custom ip in docker network:

docker network create --subnet 10.0.0.0/8 indy_pool_network
docker build --build-arg pool_ip=10.0.0.2 -f ci/indy-pool.dockerfile -t indy_pool .
docker run -d --ip="10.0.0.2" --net=indy_pool_network indy_pool

Note that for Windows and MacOS this approach has some issues. Docker for these OS run in their virtual environment. First command creates network for container and host can't get access to that network because container placed on virtual machine. You must appropriate set up networking on your virtual environment. See the instructions for MacOS below.

Docker port mapping on MacOS

If you use some Docker distribution based on Virtual Box you can use Virtual Box's port forwarding future to map 9701-9709 container ports to local 9701-9709 ports.

If you use VMWare Fusion to run Docker locally, follow the instructions from this article and add the following lines to /Library/Preferences/VMware Fusion/vmnet8/nat.conf:

# Use these with care - anyone can enter into your VM through these...
# The format and example are as follows:
#<external port number> = <VM's IP address>:<VM's port number>
#8080 = 172.16.3.128:80
9701 = <your_docker_ip>:9701
9702 = <your_docker_ip>:9702
9703 = <your_docker_ip>:9703
9704 = <your_docker_ip>:9704
9705 = <your_docker_ip>:9705
9706 = <your_docker_ip>:9706
9707 = <your_docker_ip>:9707
9708 = <your_docker_ip>:9708
9709 = <your_docker_ip>:9709

where <your_docker_ip> is your Docker host IP.

Docker machine needs to be rebooted after these changes.

Wrappers documentation

The following wrappers are tested and complete.

There is also active work on a wrapper for Go; visit #indy-sdk on Rocket.Chat for details.

Indy CLI documentation

  • An explanation of how to install the official command line interface for that provides commands to manage wallets and interactions with the ledger: Indy CLI

How to migrate

The documents that provide necessary information for Libindy migrations.

How to Contribute

  • We'd love your help; see these HL Indy Wiki and slides on how to contribute.
  • If you need to add a new call, read this instruction.
  • You may also want to read this info about maintainers and our process.
  • We use developer certificate of origin (DCO) in all hyperledger repositories, so to get your pull requests accepted, you must certify your commits by signing off on each commit. More information can be found in Signing Commits article.

Notes

  • Libindy implements multithreading approach based on mpsc channels. If your application needs to use Libindy from multiple processes you should keep in mind the following restrictions:
    • Fork - duplicates only the main thread. So, child threads will not be duplicated. If any out-of-process requirements are possible, the caller must fork first before any calls to Libindy (otherwise the command from a child thread will hang). Fork is only available on Unix.
    • Popen - spawns a new OS level process which will create its own child threads. Popen is cross-platform.

More Repositories

1

composer

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
JavaScript
1,629
star
2

sawtooth-core

Core repository for Sawtooth Distributed Ledger
Python
1,424
star
3

fabric

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted
Go
1,168
star
4

burrow

https://wiki.hyperledger.org/display/burrow
Go
1,027
star
5

iroha

Iroha - A simple, decentralized ledger
C++
989
star
6

education

Hyperledger training material
JavaScript
372
star
7

ursa

Hyperledger Ursa (a shared cryptographic library) has moved to end-of-life status, with the components of Ursa still in use moved to their relevant Hyperledger projects (AnonCreds, Indy, Aries and Iroha).
Rust
319
star
8

sawtooth-supply-chain

Sawtooth Supply Chain
JavaScript
261
star
9

aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
Go
240
star
10

composer-sample-networks

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
JavaScript
222
star
11

quilt

Hyperledger Quilt - An implementation of the Interledger Protocol
Java
219
star
12

grid

Grid has moved to end-of-life status.
Rust
208
star
13

fabric-chaincode-evm

Go
175
star
14

avalon

Hyperledger Avalon enables privacy in blockchain transactions, moving intensive processing from a main blockchain to improve scalability and latency, and to support attested Oracles
Python
136
star
15

iroha-android

Android library for Iroha, a Distributed Ledger Technology (blockchain) platform.
Java
107
star
16

composer-sample-applications

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
JavaScript
105
star
17

education-cryptomoji

JavaScript
97
star
18

fabric-chaintool

Clojure
91
star
19

sawtooth-next-directory

HTML
87
star
20

aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
C#
84
star
21

sawtooth-marketplace

Python
84
star
22

fabric-sdk-rest

Read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-rest
JavaScript
79
star
23

sawtooth-pbft

Sawtooth PBFT consensus engine
Rust
76
star
24

composer-tools

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
JavaScript
74
star
25

caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions
JavaScript
74
star
26

sawtooth-seth

Rust
73
star
27

transact

Transact is a transaction execution platform designed to be used as a library or component when implementing distributed ledgers, including blockchains.
Rust
66
star
28

fabric-baseimage

Deprecated Fabric Base Images
Shell
54
star
29

sawtooth-sabre

Sawtooth Sabre (WASM Smart Contracts)
Rust
52
star
30

education-sawtooth-simple-supply

Python
51
star
31

fabric-api-archive

Read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-api
Java
49
star
32

indy-crypto

Archive of Indy Crypto library. Superseded by the Hyperledger Ursa Project.
Rust
49
star
33

aries-toolbox

Hyperledger Aries
Vue
43
star
34

indy-agent

Archive of Indy Reference Agents and Tools. Superseded by the Hyperledger Aries Project.
Python
43
star
35

composer-knowledge-wiki

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
40
star
36

aries-mobile-agent-xamarin

C#
39
star
37

fabric-chaintool-original

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric-chaintool . pull requests not accepted
Clojure
38
star
38

sawtooth-explorer

TypeScript
37
star
39

iroha-dotnet

.NET library for Hyperledger Iroha, a simple distributed ledger.
C++
32
star
40

iroha-api

Iroha API
HTML
32
star
41

fabric-api

Read-only historic repo. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric-api . pull requests not accepted
Java
32
star
42

sawtooth-sdk-javascript

JavaScript
30
star
43

composer-sample-models

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
JavaScript
29
star
44

hyperledgerwp

Hyperledger Whitepaper
TeX
28
star
45

sawtooth-sdk-go

Go
28
star
46

iroha-scala

Scala library for Hyperledger Iroha, a simple distributed ledger. http://iroha.tech
Scala
28
star
47

composer-vscode-plugin

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
TypeScript
27
star
48

sawtooth-sdk-rust

Rust
27
star
49

aries-protocol-test-suite

Test Suite for testing protocol compliance of Aries Agents
Python
26
star
50

sawtooth-raft

Rust
26
star
51

indy-anoncreds

Python
24
star
52

sawtooth-rfcs

22
star
53

indy-sdk-react-native

React Native wrapper around Indy SDK Java and Objective-C wrappers.
Java
22
star
54

ci-management

Read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/ci-management
Shell
20
star
55

sawtooth-sdk-java

Java
19
star
56

indy-client

Sovrin client
Python
18
star
57

aries-cloudagent-loadgenerator

aries-cloudagent-loadgenerator
Kotlin
17
star
58

grid-contrib

Grid has moved to end-of-life status.
JavaScript
17
star
59

sawtooth-sdk-python

Python
17
star
60

iroha-ametsuchi

Flatbuffer database for the Hyperledger Iroha project.
C++
15
star
61

aries-framework-go-ext

Go
14
star
62

ursa-rfcs

Hyperledger Ursa has moved to end-of-life status.
TeX
13
star
63

composer-atom-plugin

⚠️ ⚠️ ⚠️ Hyperledger Composer has been deprecated ⚠️ ⚠️ ⚠️
CoffeeScript
12
star
64

fabric-cop

This is a read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-cop no pull requests accepted
Go
12
star
65

aries-sdk-javascript

C++
12
star
66

sawtooth-private-utxo

11
star
67

sawtooth-sdk-dotnet

C#
11
star
68

ursa-wrapper-go

Hyperledger Ursa has moved to end-of-life status.
Go
11
star
69

indy-common

Common utility functions for other sovrin repos (like sovrin-client, sovrin-node etc)
Python
10
star
70

sawtooth-docs

Documentation source for Sawtooth Lake. Published docs at the link.
Python
10
star
71

iroha-docker

Dockerfiles for Iroha
Shell
10
star
72

sawtooth-poet

Python
9
star
73

grid-rfcs

Grid has moved to end-of-life status.
8
star
74

cello-analytics

Shell
8
star
75

sawtooth-mktplace

Example trading system for Sawtooth Lake distributed ledger.
Python
8
star
76

sawtooth-sdk-swift

Sawtooth SDK Swift
Swift
8
star
77

indy-ledger

Python
8
star
78

iroha-network-tools

Network tools for Hyperledger Iroha
7
star
79

sawtooth-validator

This repo builds a validator (miner) for the Sawtooth Lake ledger. Docs at the link:
Python
7
star
80

smart-contracts-wg

Repository for HL Smart Contracts Working Group working products
7
star
81

aries-sdk-java

Java
7
star
82

learning-materials-dev

https://wiki.hyperledger.org/display/LMDWG
Shell
7
star
83

sawtooth-arcade

Example transaction families for Sawtooth Lake distributed ledger.
Python
7
star
84

sawtooth-lib

Rust
6
star
85

sawtooth-dev-tools

Development environment and tools for Sawtooth Lake distributed ledger.
Shell
6
star
86

fabric-test-resources-gerrit

READ ONLY MIRROR of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-test-resources NO PULL REQUESTS
Java
6
star
87

transact-contrib

5
star
88

homebrew-fabric

Ruby
5
star
89

sawtooth-devmode

Simple consensus engine for Hyperledger Sawtooth for developers
Python
5
star
90

sawtooth-ansible

5
star
91

aries-sdk-ruby

Rust
5
star
92

composer-sample-applications-hlfv1

Sample applications for Composer (with Fabric v1.0 support)
JavaScript
5
star
93

sawtooth-sdk-cxx

C++
4
star
94

sawtooth-docs-archive

Source files for the Hyperledger Sawtooth website
HTML
4
star
95

IDWG

All resources related to the Identity Working Group in Hyperledger
4
star
96

fabric-docs

Read-only mirror of https://gerrit.hyperledger.org/r/#/admin/projects/fabric-docs
4
star
97

transact-rfcs

3
star
98

fabric-gerrit

JavaScript
3
star
99

tf-security

Documentation and other things for the security task force.
TeX
3
star
100

aries-sdk-android

3
star