Welcome to Driving License Use Case - Issuer application. In this application, you will experience how does a normal applicant would like to sign up for a verifiable credential and thereafter how a Issuer checks the information and issues a verifiable credential to the applicant.
You can either run this program in your local machine or try it out here: https://usecases.drivinglicense-issuer.vc-generator.com/
Before you could use our API and SDK services, you would have to register to get the API keys.
- Go to apikey.affinidi.com
- Register for an account
- Store the
API Key
andAPI Key Hash
safely
In case you want to use EmailJS for smtp please follow these steps.
- Register on EmailJS
- Create a service
- Create an template with the following structure
- Save the Service ID, Template ID and User ID in the
.env
file. - You can find the User ID in the Integration menu.
Note: This step will be optional.
In our issuer application, we will be using firebase to mimic issuer's database which stores all of the applications.
- Go to Firebase Console https://console.firebase.google.com/
- Create a new Firestore
- Navigation to Project Settings
- Look for
firebaseConfig
and copy the credentials. It should look like
var firebaseConfig = {
apiKey: <<SOME API KEY>>,
authDomain: "<<SOMEP PROJECT NAME>>.firebaseapp.com",
projectId: "<<SOMEP PROJECT NAME>>",
storageBucket: "<<SOMEP PROJECT NAME>>.appspot.com",
messagingSenderId: <<SOME STRING>>,
appId: <<SOME STRING>>
};
- Open terminal and navigate to the project folder
- Run
cp .env.example .env
- Fill in the .env file with the details that you have gathered in the previous steps
REACT_APP_API_KEY=<<Afffinidi's API Key>>
REACT_APP_API_KEY_HASH=<<Affinidi's API Key Hash>>
REACT_APP_ENVIRONMENT=prod
REACT_APP_WALLET_URL=<<URL OF THE WALLET APPLICATION>>
REACT_APP_FIREBASE_API_KEY=<<Firebase's apiKey>>
REACT_APP_FIREBASE_AUTHDOMAIN=<<Firebase's authDomain>>
REACT_APP_FIREBASE_PROJECT_ID=<<Firebase's projectId>>
REACT_APP_FIREBASE_STORAGEBUCKET=<<Firebase's storageBucket>>
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=<<Firebase's messagingSenderId>>
REACT_APP_FIREBASE_APP_ID=<<Firebase's appId>>
REACT_APP_EMAIL_JS_SERVICE_ID=<<EmailJs service ID>>
REACT_APP_EMAIL_JS_TEMPLATE_ID=<<EmailJs template ID>>
REACT_APP_EMAIL_JS_USER_ID=<<EmailJs user ID>>
- Open terminal and navigate to the project folder
- Run
npm install
- Run
cp .env.example .env
- Populate the credentials in
.env
- Run
npm start
Run Issuer, Holder and Verifier in this sequence in your local machine.