Issuers

Add the following code to issue credentials via CHAPI with LearnCard!

import { initLearnCard } from '@learncard/init';

const learnCard = await initLearnCard({ seed: '1234' });

const vc = learnCard.invoke.newCredential(); // Or otherwise generate a credential, i.e. VC-API or OIDC

const result = await learnCard.invoke.storeCredentialViaChapiDidAuth(vc);

if (result.success) console.log('Credential stored! 😎');

This cheat-sheet uses a test credential. Often, issuers will want to use VC-API or OIDCv4 protocols for signing the actual credential in tandem with CHAPI for selecting which wallet to send the credential to. Once you've got CHAPI setup, check out LearnCard Bridge to setup VC-API.

More Info

🔰Using LearnCard to Interact with a CHAPI Wallet

Last updated