
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@learncard/open-badge-v2-plugin
Advanced tools
OpenBadge v2 wrapper plugin for LearnCard. Wraps OBv2 assertions into self-issued VCs.
Wrap legacy Open Badges v2.0 (OBv2) assertions into self‑issued W3C Verifiable Credentials (VCs) so they can be stored, indexed, and used within the LearnCard ecosystem.
OpenBadgeV2wrapOpenBadgeV2(obv2Assertion: object | string): Promise<VC>https://ctx.learncard.com/wrappers/obv2/1.0.0.jsonLegacyOpenBadgeCredentialMany issuers still publish Open Badges v2.0 assertions (JSON), not VCs. This plugin provides a backwards‑compatibility bridge by wrapping the raw OBv2 assertion inside a signed VC you control, preserving the original badge payload under legacyAssertion.
This enables:
LegacyOpenBadgeCredential).A signed VC with these characteristics:
@context: ["https://www.w3.org/ns/credentials/v2", "https://ctx.learncard.com/wrappers/obv2/1.0.0.json"]type: ["VerifiableCredential", "LegacyOpenBadgeCredential"]issuer: your LearnCard DIDvalidFrom: new Date().toISOString()credentialSubject.id: your LearnCard DIDlegacyAssertion: the original OBv2 assertion JSONNotes:
id (string), type includes "Assertion", issuedOn (string).undici).This package is part of the monorepo. In external usage, install from npm (when published) and ensure peer packages are available.
# inside the monorepo
pnpm nx run open-badge-v2-plugin:build
Below examples assume you already have a learnCard instance and you add both the VC plugin and this plugin.
import { getVCPlugin } from '@learncard/vc-plugin';
import { openBadgeV2Plugin } from '@learncard/open-badge-v2-plugin';
// Ensure VC plugin is installed first (required for signing)
await learnCard.addPlugin(getVCPlugin(learnCard));
// Install the OpenBadge v2 wrapper plugin
await learnCard.addPlugin(openBadgeV2Plugin(learnCard));
const url = 'https://example.org/badges/assertions/123.json';
const vc = await learnCard.invoke.wrapOpenBadgeV2(url);
// Optional: verify the signed VC
const verification = await learnCard.invoke.verifyCredential(vc);
const ipfsUrl = 'ipfs://bafybeigdyr...';
const vc = await learnCard.invoke.wrapOpenBadgeV2(ipfsUrl);
const obv2 = {
'@context': 'https://w3id.org/openbadges/v2',
type: 'Assertion',
id: 'https://issuer.example.org/assertions/abc',
issuedOn: '2024-05-02T12:34:56Z',
recipient: { type: 'email', identity: 'user@example.org', hashed: false },
badge: 'https://issuer.example.org/badges/my-badge'
// ... any other OBv2 fields ...
};
const vc = await learnCard.invoke.wrapOpenBadgeV2(obv2);
const obv2String = JSON.stringify(obv2);
const vc = await learnCard.invoke.wrapOpenBadgeV2(obv2String);
wrapOpenBadgeV2(obv2Assertion: object | string): Promise<VC>
obv2Assertion may be:
Validation rules enforced:
assertion.id must be a non‑empty stringassertion.type must include "Assertion"assertion.issuedOn must be a stringThe wrapper vocabulary is published at:
https://ctx.learncard.com/wrappers/obv2/1.0.0.jsonIt defines:
LegacyOpenBadgeCredentiallegacyAssertion as @type: @json for embedding raw OBv2 JSONpnpm nx run open-badge-v2-plugin:buildpackages/plugins/open-badge-v2/src/packages/learn-card-contexts/wrappers/obv2/1.0.0.jsonMIT
FAQs
OpenBadge v2 wrapper plugin for LearnCard. Wraps OBv2 assertions into self-issued VCs.
The npm package @learncard/open-badge-v2-plugin receives a total of 22 weekly downloads. As such, @learncard/open-badge-v2-plugin popularity was classified as not popular.
We found that @learncard/open-badge-v2-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.