App Developer & EdTech
How to add LearnCard to your existing apps, services, and platforms!
Last updated
How to add LearnCard to your existing apps, services, and platforms!
Last updated
If you are an app developer, ed-tech provider, or systems architect and are interested in understanding how LearnCard can augment your existing platform—you've come to the right place!
This guide will walk you through everything you need to get started. Baseline experience and familiarity with software development tooling and processes is expected. No prior knowledge of decentralized identity or verifiable credentials necessary.
First things first: you need to identify your use case. Why are you interested in using LearnCard in the first place?
Courses: users complete courses and curriculum in your platform or app, and you are interested in issuing achievements, skills, learning certificates, IDs, and more that can be recognized in the broader ecosystem. Start here.
Hiring: candidates search for work opportunities and/or hiring managers validate job applications in your platform, and you are interested in streamlining the verification process of credentials from many different sources inside an ecosystem. Start here.
Gated Content: you want to enable your users to gate content based on the validation of specific credentials—community membership, skills, achievements, accomplishments, endorsements, etc. Start here.
Proof-of-progress: you want to integrate verifiable progress within your platform, such as credentials issues for completing a task list.
Identity: you want to enable your users to anchor verifiable, decentralized identities with your platform. Start here.
Metaverse & Games: you want to integrate LearnCard into your digital experiences and games, enabling issuing, recognition, and/or validation of credentials within your ecosystem. Start here.
We'd love to hear to hear from you! Share your story in our Github Discussions, or send us an email at community@learningeconomy.io—we'd love to feature your work 🙌.
These are some of the most common and quickest ways to get started.
The easiest way to sign and send credentials from your platform, is to leverage the LearnCard Network.
As an App Developer, if you want to sign and send credentials using the LearnCard Network Plugin, follow the steps below. This guide assumes you have already set up the LearnCard SDK and the LearnCard Network Plugin in your platform.
Follow the instructions in "Connect Your Application" to setup your platform's DID, register your service profile, and connect to the LearnCard Network.
Then, ensure you have initialized the LearnCard Network Plugin with your platform's configuration.
Create a credential template that specifies the type of credential you want to issue. In this example, we'll use UniversityDegreeCredential
.
For more info on creating credential templates, click here.
First, determine who you are sending your credential to. If you followed the flow for connecting your application, you can retrieve users who have granted you permission to send them credentials:
To sign the credential, use the LearnCard SDK's learnCard.invoke.issueCredential()
function, passing the credential template and your platform's DID as parameters.
This will return a signed credential object that includes a proof generated by your platform's DID.
Next, use the sendCredential()
method provided by the LearnCard Network Plugin to send the signed credential to the recipient.
By following these steps, you can sign and send credentials to users within your platform using the LearnCard Network Plugin.
Alternatively, given your specific use case, you may not want to leverage the LearnCard Network for sending credentials from your platform. In that case, you have several options!
Deploy your own federated LearnCard Network node: have full control over the exchange network while remaining fully interoperable with the total ecosystem!
Note: these options are not mutually exclusive! For example, you can use your existing or new VC-API compliant issuer within the LearnCard Network to send and sign VCs and handle key material. Or, you could launch your own Network node and use your own VC-API.
In a hiring platform, you want to streamline the verification process of candidates' credentials from various sources within an ecosystem. You can achieve this using the CHAPI (Credential Handler API) and the LearnCard SDK. The following steps outline how an App Developer can accept and verify credentials in their platform using CHAPI and LearnCard SDK.
Import the CHAPI Polyfill into your platform based on your development environment. You can either use the script tag method for vanilla JavaScript or import the polyfill library in Node.js.
Construct a Verifiable Presentation Request using the desired credential types (e.g., UniversityDegreeCredential
for a job application).
Wrap the Verifiable Presentation Request in a Web Credential Query, allowing your platform to request credentials from a user's digital wallet.
Request a Web Credential using the navigator.credentials.get(credentialQuery)
function. The user will be prompted to present the requested credentials from their digital wallet.
Handle null results, which can occur when the user denies the request or does not have a wallet installed. As a developer, decide how to handle these situations by offering fallback mechanisms, retry options, or alternate paths.
See the full CHAPI documentation for verifiers here.
After receiving the credentials from the user's wallet, use the LearnCard SDK's learnCard.invoke.verifyCredential(signedVc)
function to verify the received credentials.
Check the results of the verification to ensure the validity of the credentials. The result will contain an array of objects with status, check, and message properties.
If the verification is successful, proceed with the next steps in the hiring process. Otherwise, handle the failed verification case by either requesting the user to provide valid credentials or implementing any other suitable action.
By integrating CHAPI and LearnCard SDK into your hiring platform, you can create a seamless and secure process for accepting and verifying candidate credentials from various sources within the ecosystem. This will not only streamline the verification process but also provide added security and trust in the credentials presented by the candidates.
Sometimes you need more than the basic, out-of-the-box flows because you have a complex community or use case. That's great! All of our tooling is fully pluggable and open-source, so with a little elbow grease and developer time, you should be able to accomplish your goals.
Need additional development assistance? We're here to help.
These features aren't yet available, but they are coming soon on our roadmap—never too early to get excited!
Earn-and-learn: you want to enable incentivized learning within your platform on a specific topic, or even incentivize people to learn about your platform.
Skill Bounties: you want to enable users on your platform to fund and claim micro-scholarships for demonstrating specific skills.
Work Bounties: you want to enable users on your platform to fund and claim payments for demonstrating completed work.
Skills Dashboards: add support in your platform for visualizing skills, achievements, and opportunities data to enhance learning outcomes.