Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

This demo shows how to issue a connectionless credential and request a connectionless verification.

Notifications You must be signed in to change notification settings

trinsic-id/verifier-reference-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trinsic's Verifier Reference App

This demo shows how to issue a connectionless credential and request a connectionless verification. It is a Node.js Express app which makes Trinsic Credential API calls with our service client.

Use Case

This sample is to simulate a request of proof of a passport. In order to provide a passport for the sample, there is also a simple issuer function that issues a connectionless passport credential.

Prerequisites:

  • npm - Make sure you have the latest stable version;
  • Trinsic Wallet for Android or iOS.

Setup

Download project and install dependencies

  1. Clone the repository git clone https://github.com/trinsic-id/verifier-reference-app.git
  2. Navigate into the directory cd verifier-reference-app
  3. Install the dependencies npm install
  4. Open up the project in a code editor of your choice
  5. Rename the .env-template file to .env empty .env

Configure your organization

  1. Go to Trinsic Studio and login or create an account.
  2. Click the + Organization button to slide out the Add Organization slider.
  3. Enter an organization name and make sure to select the Indicio Test Network.
  4. Click on Confirm to create the organization.
    • It might take a few seconds to create the organization. Just wait for it to finish.
  5. Click on the Details button associated with the new organization to open the organization details tab. organization view
  6. In the .env file, add your organization's API Key to the ACCESSTOK field.

Define a credential

  1. Click on the organization tile to bring up the dashboard.
  2. Click on the Credentials tab on the left sidebar to navigate to the Credentials View.
  3. Click on the Create Template button using the New Schema option.
  4. Name the Template "Passport" and add the following values
    • Full Name
    • Address
    • Passport Number
    • Date of Birth

add credential

  1. Click Continue to Review and then Confirm.
  2. Copy the Credential Template ID to the .env file under Credential Definition.
  3. Click on the information icon next to the definition and copy the Schema ID to the .env file under Indicio Test Schema.

Define a verification

  1. Click on the Verifications tab on the left sidebar to navigate to the Verifications View.
  2. Click on the Create Template button to slide out the Create Verification Template slider.
  3. Name the Verification "International Plane Ticket".
  4. Click the + Credential Request button and name it "Passport".
  5. Enter both "Full Name" and "Passport Number" as attributes. add verification
  6. Click the Create button to create the verification proof.
    • It might take a few seconds to define the verification proof. Just wait for it to finish.
  7. In the .env file, add the verification's Verification ID to the POLICY_ID field.
  8. Your .env file should now be completely filled out. full .env

Run the web app

Start and use the application

  1. Run with npm. npm start
  2. Open the web app on localhost:3000
  3. Make sure your agent (upper-left on the home tab) and your mobile app (Settings>General>Network) are configured to the Indicio Test Network
  4. Fill in the desired passport information and click ISSUE PASSPORT. fill in passport
  5. Using the Trinsic Wallet mobile app, scan the QR code that pops up and accept the offered credential. issue qr code
  6. Close the QR code modal and click VERIFY PASSPORT to begin the verification process.
  7. Within 60 seconds, use the Trinsic Wallet mobile app to scan the QR code that pops.
    • If you take longer than 60 seconds to scan the verification QR code, the verification will time out and close. verify qr code
  8. On the Trinsic Wallet mobile app, present the desired information.
  9. In the web app, the QR code modal will close, and the verified information will be displayed. verification accepted

Contact support@trinsic.com for any questions.

About

This demo shows how to issue a connectionless credential and request a connectionless verification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •