description |
---|
A zero to sixty guide on this |
This guide assumes the following:
- You have a web application, such as an online learning platform.
- You would like to issue Verifiable Credentials from your platform into a learner wallet, such as LearnCard.
- You are a participant in JFF's Plugfest II, and/or you would like to follow the major, interoperable standards in the larger ecosystem for issuing credentials.
If that all sounds true, let's get started 🎉
For the purposes of plugfest, we can use the JFF Plugfest I example achievement. If you'd like to customize it, these are the 4 main fields you will want to tweak for each achievement:
- Name: the primary name for identifying your Verifiable Credential.
- Achievement Name: the granular name for the particular achievement claim in your Verifiable Credential.
- Description: common description of what this achievement represents.
- Narrative: description of how someone earns this achievement.
- Image: a picture representation of this achievement.
// JSON Representation of Achievement
{
"name": "Achievement Unlocked",
"achievementName": "Teamwork Achievement",
"description": "This is a description",
"criteriaNarrative": "Earned by completing a basic tutorial on our website.",
"image": "https://www.example.com"
}
Ideally, these credentials would be mapped to credential-able items in your platform i.e. for completing a course in your platform.
Once you've established what credentials you would like to issue, you can checkout the guide for creating new credentials, then return here.
On the client side, you will need to prepare your web application for issuing credentials. An easy way to achieve interoperability is to use CHAPI.
- Install learn-card-core package from pnpm, yarn, or npm into your project.
- Initialize LearnCard in your web application with CHAPI enabled. Reference the Issuer cheatsheet for CHAPI.
- Replace the Test VC with the
newCredential()
you defined in step 1.
- Deploy LearnCard Bridge as your VC-API endpoint. (🚧 guide coming soon).
- Configure your LearnCard to use your VC-API endpoint upon initialization.
- When you use
learnCard.invoke.storeCredentialViaChapiDidAuth(vc)
to send the signed credential to an interoperable wallet, your LearnCard will now use your VC-API endpoint for signing the Verifiable Credential! ✅
{% hint style="success" %} Need extra help, or have a question? Engage in our Github Discussions!
Don't have access to the Github Discussions yet? Click here. {% endhint %}