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.
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.
Install mobile wallet
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
- Install the dependencies
- 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 Sovrin Staging 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 access token to the
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
- Company Name
- Phone Number
Click Continue to Review then Confirm.
Copy the Credential Template ID to the
Click on the information icon next to the credential definition.
Copy the Schema ID to the
Sovrin Staging Schema
Running the application
After defining the credential, you are ready to run the application.
- Run with npm
- On the web app, fill in the details and click issue credential.
- Make sure your agent is configured to the Sovrin Staging network (upper-left on the home tab).
- 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 email@example.com for any questions.