Converts study records exported from Koski (Oma Koski, the Finnish national education data registry) into Open Badges 3.0 achievement data.
npm installThe package has no runtime dependencies; it only uses Node's built-in node:crypto.
import { convert } from './index.js'
import data from './opintopolku.json' with { type: 'json' }
const records = convert(data, { lang: 'fi' })opintopolku.json in this repo is a sample Koski export you can use to try the converter out.
Converts a Koski/Opintopolku study record export into an array of { credentialSubject, awardedOn } items:
credentialSubjectis a spec-shaped Open Badges 3.0AchievementSubject.awardedOnis a plain ISO date fact, left for the calling issuer component to place wherever its target VC Data Model version expects it (e.g.validFromorissuanceDate).
The converter itself does not issue or sign credentials — it only produces the achievement data to embed in one.
Recognised study records include:
- Completed courses and their grades/credits (
koulutusmoduulisub-achievements) - Completed degrees (bachelor's/master's), mapped to the corresponding Open Badges
achievementType - The Finnish matriculation examination (ylioppilastutkinto) and its individual subject tests
Options:
lang— preferred output language ("fi","sv", or"en"). Falls back through the other available languages per field if the preferred one is missing, and also selects the language of text the converter itself generates (descriptions, criteria narratives, result names). Defaults to"en". Callconvertonce per language if multiple language versions are needed.
Apache-2.0