Git Product home page Git Product logo

vcx-demo-java's Introduction

Running the VCX Java Demo

Alice/Faber demo

The alice/faber demo is widely used in the indy-sdk demo. The description of the VCX node demo explains it well, including the operation of the cloud agent. Description here.

Pre-requirements

Libraries

Before you'll be able to run demo, you need to make sure you've compiled

Library binaries must be located /usr/local/lib on OSX, /usr/lib on Linux.

Java wrapper for VCX library

You can skip this step because this code gets the pre-built LibVCX wrapper from skt-develop maven repository.

Or you can build and use the LibVCX wrapper. Instructions here.

See dependencies section in build.gradle.

Indy pool

You can skip this step because this code uses the skt testnet.

Or you can run pool of Indy nodes on your machine. You can achieve by simply running a docker container which encapsulates multiple interconnected Indy nodes. Instructions here.

See genesis_path of vcxConfig variable.

Dummy Cloud Agent

You can skip this step because this code uses the skt test dummy cloud agent.

Or you can run dummy cloud agent on your machine. Instructions here.

See agency_url of provisionConfig variable.

Steps to run demo

  • Run Faber agent, representing an institution
./gradlew faber
  • Give it a few seconds, then run Alice's agent which will connect with Faber's agent
./gradlew alice

Demo with Posgres wallet

You can also run demo in mode where both Faber and Alice are using Postgres wallets. Follow instructions to compile postgres wallet plugin and startup local postgres docker container.

Once you have that ready, use these commands to start demo in postgres mode.

./gradlew faber_pg
./gradlew alice_pg

Demo with webhook notifications

Another feature are webhook notifications. The above demo works based on polling, but when using webhook feature, it works based on notification.

./gradlew webhook_faber
./gradlew webhook_alice

Faber receives messages of dummy cloud agent at localhost:7201/notifications. Similarly, Alice receives at localhost:7202/notifications. The action is performed based on the message received, which is briefly described below.

Phase Faber Alice
connection STEP.1 - create connection F & send invitation STEP.2 - receive invitation & create connection A2F
STEP.3 - update connection from F to F2A STEP.4 - connection created
STEP.5 - receive connection created ACK
credential STEP.6 - send credential offer STEP.7 - accept credential offer & request credential
STEP.8 - send credential STEP.9 - accept credential
proof STEP.10 - request proof STEP.11 - send proof
STEP.12 - receive & verify proof STEP.13 - receive proof ACK

When Alice starts, it automatically gets an invitation from Faber's localhost:7201/invitations. So, in a situation where Faber is running normally, run Alice.

(Temporal) New DID registration demo

Since LibVCX does not provide APIs to register a new DID, this code was written using LibIndy.

  • Usage (default) - SEED (Keyphrase of DID): Random, ROLE: ENDORSER, ALIAS: null
./gradlew register_did
  • Usage with parameters (can be omitted)
SEED=00000000000000000000000Endorser1 ROLE=ENDORSER ALIAS=faber ./gradlew register_did

vcx-demo-java's People

Contributors

baegjae avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.