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 to setup VC-API.