Trinsic's Issuer Reference App
This demo shows how to add Trinsic Credentials API calls into a nodejs app with our service client. It also shows a webhook implementation can create automated workflows in your app.
Use Case
In this simple use case, you control a (very simple) issuer portal for your organization, which can issue a business card to anyone with a mobile wallet in your organization. Once a business card is issued, that holder can do business card verifications to other peers using the Trinsic Wallet app.
Prerequisites
Steps to issue a business card
Prepare issuer portal
- Clone the repository
git clone https://github.com/trinsic-id/issuer-reference-app
- Navigate into the directory
cd issuer-reference-app
- Install the dependencies
npm install
- Open up the repository in a code editor of your choice
- Rename the .env-template file to .env
- Go to Trinsic Studio and create an account
Register your organization
- Create a new organization and select the Indicio Test Network.
- 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.
Create a credential definition
-
Click on the new organization to enter its dashbaord.
-
Click on the CREDENTIALS button on the left side of the screen to open the credentials tab.
-
Click on the Create Template button and select the New Schema option.
-
Name the template "Business Card".
-
Enter the following attributes
- Full Name
- Title
- Company Name
- Phone Number
-
Click Continue to Review then Confirm.
-
Copy the Credential Template ID to the
.env
file underCredential Definition
-
Click on the information icon next to the credential definition.
-
Copy the Schema ID to the
.env
file underSovrin Staging Schema
Running the application
After defining the credential, you are ready to run the application.
- Run with npm
npm start
- On the web app (localhost:3000), fill in the details and click issue credential.
- Make sure your agent (upper-left on the home tab) and your mobile app (Settings>General>Network) are configured to the Indicio Test Network
- Scan the QR with your mobile wallet.
This is a connection invitation. Webhooks will automatically issue you a credential once this is scanned and the connection is accepted.
Then, simply accept the credential offer and receive a business card!
Contact support@trinsic.com for any questions.