Skip to content

Latest commit

 

History

History

demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Running the Alice/Faber Python demo

There are 2 versions of this demo, the original version (faber.py and alice.py), and a slightly modified version (faber-pg.py and alice-pg.py) that supports postgres wallet storage, and illustrated how the vcx object serializtion/deserialization can be used.

Original Demo

This demo consists of 3 files:

faber*.py - scripts that acts as an institution/enterprise by initiating connection, writing a schema/cred_def to the ledger, sending a credential, and requesting proof.

alice*.py - a script that acts as an individual by accepting a connection offer, requesting a credential and offering proof.

pool.txn - genesis files for connecting to an indy pool (existing file connects to libindy/sovtoken ledger)

Run

  1. Set value for sponsor_server_endpoint variable in `alice.py. file. The value is an endpoint which will be called to get a provisioning token.

In Docker

  1. Build and run docker image
docker build -f Dockerfile -t vcx_demo .
docker run -v $(pwd):/demo -i -t vcx_demo
  1. Run scripts inside the container.

Locally

  1. Install libindy and libnullpay libraries:

  2. Install or build libvcx:

  3. Install the python requirements:

    • pip install -r requirements.txt
    • Install vcx python wrapper from sources: https://repo.corp.evernym.com/portal/dev/ or Set up environment variable to use sources from vcx/wrappers/python3/vcx.
  4. Devteam1 environment is used by default. In order to use different environment you need to change agency related fields in provisionConfig variable and change genesis transactions in docker.txn file. Note: you need to delete ~/.indy_client folder after changing docker.txn file.

  5. Run scripts with python3 faber.py and python3 alice.py.

Scripts

  • Faber:
    • faber.py - base script representing Inviter / Issuer / Verifier sides.
    • faber-pg.py - same as faber.py but using Postgres as a wallet storage.
    • faber_commitedanswer_1.0.py - script to test commited-answer protocol for proprietary connection.
    • faber_commitedanswer_3.0.py - script to test commited-answer protocol for aries connection.
    • faber_question_3.0.py - script to test question-answer protocol for aries connection.
    • faber_credential_with_attachment.py - script to test credentials with attachments.
    • faber_redirect_1.0.py - script to test connection redirection for proprietary connection.
  • Alice:
    • alice.py - base script representing Invitee / Holder / Prover sides.
    • alice_create_with_message_flow.py - similar to alice.py but used different functions for creating state objects.
    • alice_create_with_message_id_flow.py - similar to alice.py but used different functions for creating state objects.
    • alternate_wallet_path.py - similar to alice.py but used custom wallet storage.