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.
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.
- Clone the repository
git clone https://github.com/trinsic-id/verifier-reference-app.git
- Navigate into the directory
cd verifier-reference-app
- Install the dependencies
npm install
- Open up the project in a code editor of your choice
- Rename the
.env-template
file to.env
- Go to Trinsic Studio and login or create an account.
- Click the + Organization button to slide out the Add Organization slider.
- Enter an organization name and make sure to select the Indicio Test Network.
- Click on Confirm to create the organization.
- It might take a few seconds to create the organization. Just wait for it to finish.
- Click on the Details button associated with the new organization to open the organization details tab.
- In the .env file, add your organization's API Key to the
ACCESSTOK
field.
- Click on the organization tile to bring up the dashboard.
- Click on the Credentials tab on the left sidebar to navigate to the Credentials View.
- Click on the Create Template button using the New Schema option.
- Name the Template "Passport" and add the following values
- Full Name
- Address
- Passport Number
- Date of Birth
- Click Continue to Review and then Confirm.
- Copy the
Credential Template ID
to the.env
file underCredential Definition
. - Click on the information icon next to the definition and copy the
Schema ID
to the.env
file underIndicio Test Schema
.
- Click on the Verifications tab on the left sidebar to navigate to the Verifications View.
- Click on the Create Template button to slide out the Create Verification Template slider.
- Name the Verification "International Plane Ticket".
- Click the + Credential Request button and name it "Passport".
- Enter both "Full Name" and "Passport Number" as attributes.
- 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.
- In the
.env
file, add the verification's Verification ID to thePOLICY_ID
field. - Your .env file should now be completely filled out.
- Run with npm.
npm start
- Open the web app on localhost:3000
- Make sure your agent (upper-left on the home tab) and your mobile app (Settings>General>Network) are configured to the Indicio Test Network
- Fill in the desired passport information and click ISSUE PASSPORT.
- Using the Trinsic Wallet mobile app, scan the QR code that pops up and accept the offered credential.
- Close the QR code modal and click VERIFY PASSPORT to begin the verification process.
- Within 60 seconds, use the Trinsic Wallet mobile app to scan the QR code that pops.
- On the Trinsic Wallet mobile app, present the desired information.
- In the web app, the QR code modal will close, and the verified information will be displayed.
Contact support@trinsic.com for any questions.