@learncard/credential-library 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credential-library.cjs.development.js +209 -16
- package/dist/credential-library.cjs.development.js.map +4 -4
- package/dist/credential-library.cjs.production.min.js +1 -1
- package/dist/credential-library.cjs.production.min.js.map +4 -4
- package/dist/credential-library.esm.js +199 -6
- package/dist/credential-library.esm.js.map +4 -4
- package/dist/fixtures/index.d.ts +2 -1
- package/dist/fixtures/index.d.ts.map +1 -1
- package/dist/fixtures/obv3/standalone-full-course.d.ts +3 -0
- package/dist/fixtures/obv3/standalone-full-course.d.ts.map +1 -0
- package/package.json +8 -6
- package/src/fixtures/index.ts +3 -0
- package/src/fixtures/obv3/standalone-full-course.ts +207 -0
|
@@ -1162,6 +1162,197 @@ var obv3CourseCompletion = {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
};
|
|
1164
1164
|
|
|
1165
|
+
// src/fixtures/obv3/standalone-full-course.ts
|
|
1166
|
+
import { UnsignedAchievementCredentialValidator as UnsignedAchievementCredentialValidator6 } from "@learncard/types";
|
|
1167
|
+
var obv3StandaloneFullCourse = {
|
|
1168
|
+
id: "obv3/standalone-full-course",
|
|
1169
|
+
name: "Applied Data Ethics and Responsible AI Course Completion",
|
|
1170
|
+
description: "A standalone Open Badges v3 course credential with the academic metadata commonly present on a course nested inside a Comprehensive Learner Record.",
|
|
1171
|
+
spec: "obv3",
|
|
1172
|
+
profile: "course",
|
|
1173
|
+
features: ["image", "evidence", "alignment", "results", "source"],
|
|
1174
|
+
source: "synthetic",
|
|
1175
|
+
signed: false,
|
|
1176
|
+
validity: "valid",
|
|
1177
|
+
validator: UnsignedAchievementCredentialValidator6,
|
|
1178
|
+
tags: ["course", "standalone", "higher-education", "responsible-ai", "full-metadata"],
|
|
1179
|
+
credential: {
|
|
1180
|
+
"@context": [
|
|
1181
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
1182
|
+
"https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"
|
|
1183
|
+
],
|
|
1184
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418101",
|
|
1185
|
+
type: ["VerifiableCredential", "AchievementCredential"],
|
|
1186
|
+
name: "Applied Data Ethics and Responsible AI",
|
|
1187
|
+
description: "Recognizes successful completion of a four-credit undergraduate course in ethical data practice and responsible artificial intelligence.",
|
|
1188
|
+
image: {
|
|
1189
|
+
id: "https://aster-ridge.example/credentials/images/data-ethics-course.png",
|
|
1190
|
+
type: "Image",
|
|
1191
|
+
caption: "Applied Data Ethics and Responsible AI course credential"
|
|
1192
|
+
},
|
|
1193
|
+
issuer: {
|
|
1194
|
+
id: "did:web:aster-ridge.example",
|
|
1195
|
+
type: ["Profile"],
|
|
1196
|
+
name: "Aster Ridge Institute",
|
|
1197
|
+
url: "https://aster-ridge.example",
|
|
1198
|
+
description: "A fictional higher education institution focused on technology and public impact.",
|
|
1199
|
+
email: "registrar@aster-ridge.example",
|
|
1200
|
+
image: {
|
|
1201
|
+
id: "https://aster-ridge.example/brand/institute-mark.png",
|
|
1202
|
+
type: "Image",
|
|
1203
|
+
caption: "Aster Ridge Institute mark"
|
|
1204
|
+
}
|
|
1205
|
+
},
|
|
1206
|
+
validFrom: "2026-05-22T16:00:00Z",
|
|
1207
|
+
credentialSubject: {
|
|
1208
|
+
id: "did:example:learner-ari-1087",
|
|
1209
|
+
type: ["AchievementSubject"],
|
|
1210
|
+
activityStartDate: "2026-01-12T08:00:00Z",
|
|
1211
|
+
activityEndDate: "2026-05-18T23:59:59Z",
|
|
1212
|
+
creditsEarned: 4,
|
|
1213
|
+
term: "Spring 2026",
|
|
1214
|
+
narrative: "The learner completed the course requirements, including a team audit of an automated decision system.",
|
|
1215
|
+
source: {
|
|
1216
|
+
id: "https://aster-ridge.example/offices/registrar",
|
|
1217
|
+
type: ["Profile"],
|
|
1218
|
+
name: "Aster Ridge Institute Registrar",
|
|
1219
|
+
url: "https://aster-ridge.example/offices/registrar"
|
|
1220
|
+
},
|
|
1221
|
+
achievement: {
|
|
1222
|
+
id: "https://aster-ridge.example/catalog/courses/DAI-318",
|
|
1223
|
+
type: ["Achievement"],
|
|
1224
|
+
achievementType: "Course",
|
|
1225
|
+
name: "Applied Data Ethics and Responsible AI",
|
|
1226
|
+
description: "An interdisciplinary course covering data governance, algorithmic accountability, bias assessment, privacy, transparency, and responsible deployment of artificial intelligence systems.",
|
|
1227
|
+
humanCode: "DAI-318",
|
|
1228
|
+
fieldOfStudy: "Data Science",
|
|
1229
|
+
creditsAvailable: 4,
|
|
1230
|
+
inLanguage: "en-US",
|
|
1231
|
+
version: "2026.1",
|
|
1232
|
+
criteria: {
|
|
1233
|
+
id: "https://aster-ridge.example/catalog/courses/DAI-318/criteria",
|
|
1234
|
+
narrative: "Complete all seminars and labs, earn at least 70 percent overall, and pass the final algorithmic impact assessment project."
|
|
1235
|
+
},
|
|
1236
|
+
image: {
|
|
1237
|
+
id: "https://aster-ridge.example/credentials/images/data-ethics-course.png",
|
|
1238
|
+
type: "Image",
|
|
1239
|
+
caption: "Applied Data Ethics and Responsible AI course credential"
|
|
1240
|
+
},
|
|
1241
|
+
creator: {
|
|
1242
|
+
id: "https://aster-ridge.example/schools/computing-and-society",
|
|
1243
|
+
type: ["Profile"],
|
|
1244
|
+
name: "School of Computing and Society",
|
|
1245
|
+
url: "https://aster-ridge.example/schools/computing-and-society",
|
|
1246
|
+
description: "The academic unit responsible for the course curriculum and assessment.",
|
|
1247
|
+
parentOrg: {
|
|
1248
|
+
id: "did:web:aster-ridge.example",
|
|
1249
|
+
type: ["Profile"],
|
|
1250
|
+
name: "Aster Ridge Institute"
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
otherIdentifier: [
|
|
1254
|
+
{
|
|
1255
|
+
type: "IdentifierEntry",
|
|
1256
|
+
identifier: "ARI-DAI-318-2026-SP",
|
|
1257
|
+
identifierType: "identifier"
|
|
1258
|
+
}
|
|
1259
|
+
],
|
|
1260
|
+
alignment: [
|
|
1261
|
+
{
|
|
1262
|
+
type: ["Alignment"],
|
|
1263
|
+
targetCode: "ARIDF-4.2",
|
|
1264
|
+
targetName: "Evaluate algorithmic bias and disparate impact",
|
|
1265
|
+
targetDescription: "Evaluate automated systems for bias, disparate impact, and limitations in representative data.",
|
|
1266
|
+
targetFramework: "Aster Ridge Data Responsibility Framework",
|
|
1267
|
+
targetType: "CFItem",
|
|
1268
|
+
targetUrl: "https://aster-ridge.example/frameworks/data-responsibility/items/4.2"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
type: ["Alignment"],
|
|
1272
|
+
targetCode: "ARIDF-6.1",
|
|
1273
|
+
targetName: "Design accountable data governance practices",
|
|
1274
|
+
targetDescription: "Design governance practices that document data provenance, consent, oversight, and recourse.",
|
|
1275
|
+
targetFramework: "Aster Ridge Data Responsibility Framework",
|
|
1276
|
+
targetType: "CFItem",
|
|
1277
|
+
targetUrl: "https://aster-ridge.example/frameworks/data-responsibility/items/6.1"
|
|
1278
|
+
}
|
|
1279
|
+
],
|
|
1280
|
+
resultDescription: [
|
|
1281
|
+
{
|
|
1282
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418103",
|
|
1283
|
+
type: ["ResultDescription"],
|
|
1284
|
+
name: "Final Letter Grade",
|
|
1285
|
+
resultType: "LetterGrade",
|
|
1286
|
+
allowedValue: ["A", "A-", "B+", "B", "B-", "C+", "C", "D", "F"],
|
|
1287
|
+
requiredValue: "C"
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418104",
|
|
1291
|
+
type: ["ResultDescription"],
|
|
1292
|
+
name: "Final Percentage",
|
|
1293
|
+
resultType: "Percent",
|
|
1294
|
+
valueMin: "0",
|
|
1295
|
+
valueMax: "100",
|
|
1296
|
+
requiredValue: "70"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418105",
|
|
1300
|
+
type: ["ResultDescription"],
|
|
1301
|
+
name: "Course Completion Status",
|
|
1302
|
+
resultType: "Status",
|
|
1303
|
+
allowedValue: [
|
|
1304
|
+
"Completed",
|
|
1305
|
+
"Enrolled",
|
|
1306
|
+
"Failed",
|
|
1307
|
+
"InProgress",
|
|
1308
|
+
"OnHold",
|
|
1309
|
+
"Withdrew"
|
|
1310
|
+
]
|
|
1311
|
+
}
|
|
1312
|
+
],
|
|
1313
|
+
tag: [
|
|
1314
|
+
"data-ethics",
|
|
1315
|
+
"responsible-ai",
|
|
1316
|
+
"algorithmic-accountability",
|
|
1317
|
+
"data-governance"
|
|
1318
|
+
]
|
|
1319
|
+
},
|
|
1320
|
+
result: [
|
|
1321
|
+
{
|
|
1322
|
+
type: ["Result"],
|
|
1323
|
+
resultDescription: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418103",
|
|
1324
|
+
value: "A-"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
type: ["Result"],
|
|
1328
|
+
resultDescription: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418104",
|
|
1329
|
+
value: "92"
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
type: ["Result"],
|
|
1333
|
+
resultDescription: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418105",
|
|
1334
|
+
status: "Completed"
|
|
1335
|
+
}
|
|
1336
|
+
]
|
|
1337
|
+
},
|
|
1338
|
+
evidence: [
|
|
1339
|
+
{
|
|
1340
|
+
id: "https://aster-ridge.example/records/ari-1087/DAI-318",
|
|
1341
|
+
type: ["Evidence"],
|
|
1342
|
+
name: "Official Course Completion Record",
|
|
1343
|
+
description: "Registrar record confirming the learner earned four credits with a final grade of A-.",
|
|
1344
|
+
narrative: "Course requirements were completed during the Spring 2026 academic term."
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
id: "https://aster-ridge.example/showcase/ari-1087/impact-assessment",
|
|
1348
|
+
type: ["Evidence"],
|
|
1349
|
+
name: "Algorithmic Impact Assessment",
|
|
1350
|
+
description: "Final project evaluating fairness, transparency, and governance controls for a fictional automated decision system."
|
|
1351
|
+
}
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1165
1356
|
// src/fixtures/obv3/k12-diploma.ts
|
|
1166
1357
|
var obv3K12Diploma = {
|
|
1167
1358
|
id: "obv3/k12-diploma",
|
|
@@ -1799,7 +1990,7 @@ var clrUniversityTranscript = {
|
|
|
1799
1990
|
};
|
|
1800
1991
|
|
|
1801
1992
|
// src/fixtures/boost/basic.ts
|
|
1802
|
-
import { UnsignedAchievementCredentialValidator as
|
|
1993
|
+
import { UnsignedAchievementCredentialValidator as UnsignedAchievementCredentialValidator7 } from "@learncard/types";
|
|
1803
1994
|
var boostBasic = {
|
|
1804
1995
|
id: "boost/basic",
|
|
1805
1996
|
name: "Basic LearnCard Boost",
|
|
@@ -1810,7 +2001,7 @@ var boostBasic = {
|
|
|
1810
2001
|
source: "synthetic",
|
|
1811
2002
|
signed: false,
|
|
1812
2003
|
validity: "valid",
|
|
1813
|
-
validator:
|
|
2004
|
+
validator: UnsignedAchievementCredentialValidator7,
|
|
1814
2005
|
tags: ["learncard", "boost"],
|
|
1815
2006
|
credential: {
|
|
1816
2007
|
"@context": [
|
|
@@ -1846,7 +2037,7 @@ var boostBasic = {
|
|
|
1846
2037
|
};
|
|
1847
2038
|
|
|
1848
2039
|
// src/fixtures/boost/boost-id.ts
|
|
1849
|
-
import { UnsignedAchievementCredentialValidator as
|
|
2040
|
+
import { UnsignedAchievementCredentialValidator as UnsignedAchievementCredentialValidator8 } from "@learncard/types";
|
|
1850
2041
|
var boostId = {
|
|
1851
2042
|
id: "boost/boost-id",
|
|
1852
2043
|
name: "LearnCard Boost ID",
|
|
@@ -1857,7 +2048,7 @@ var boostId = {
|
|
|
1857
2048
|
source: "synthetic",
|
|
1858
2049
|
signed: false,
|
|
1859
2050
|
validity: "valid",
|
|
1860
|
-
validator:
|
|
2051
|
+
validator: UnsignedAchievementCredentialValidator8,
|
|
1861
2052
|
tags: ["learncard", "boost", "id"],
|
|
1862
2053
|
credential: {
|
|
1863
2054
|
"@context": [
|
|
@@ -1902,7 +2093,7 @@ var boostId = {
|
|
|
1902
2093
|
};
|
|
1903
2094
|
|
|
1904
2095
|
// src/fixtures/boost/with-skills.ts
|
|
1905
|
-
import { UnsignedAchievementCredentialValidator as
|
|
2096
|
+
import { UnsignedAchievementCredentialValidator as UnsignedAchievementCredentialValidator9 } from "@learncard/types";
|
|
1906
2097
|
var boostWithSkills = {
|
|
1907
2098
|
id: "boost/with-skills",
|
|
1908
2099
|
name: "LearnCard Boost with Skills",
|
|
@@ -1913,7 +2104,7 @@ var boostWithSkills = {
|
|
|
1913
2104
|
source: "synthetic",
|
|
1914
2105
|
signed: false,
|
|
1915
2106
|
validity: "valid",
|
|
1916
|
-
validator:
|
|
2107
|
+
validator: UnsignedAchievementCredentialValidator9,
|
|
1917
2108
|
tags: ["learncard", "boost", "skills"],
|
|
1918
2109
|
credential: {
|
|
1919
2110
|
"@context": [
|
|
@@ -14066,6 +14257,7 @@ var ALL_FIXTURES = [
|
|
|
14066
14257
|
obv3ProfessionalCert,
|
|
14067
14258
|
obv3MicroCredential,
|
|
14068
14259
|
obv3CourseCompletion,
|
|
14260
|
+
obv3StandaloneFullCourse,
|
|
14069
14261
|
obv3K12Diploma,
|
|
14070
14262
|
obv3EndorsementCredential,
|
|
14071
14263
|
// CLR v2
|
|
@@ -14353,6 +14545,7 @@ export {
|
|
|
14353
14545
|
obv3OneedtechFull,
|
|
14354
14546
|
obv3PlugfestJff2,
|
|
14355
14547
|
obv3ProfessionalCert,
|
|
14548
|
+
obv3StandaloneFullCourse,
|
|
14356
14549
|
obv3WithAlignment,
|
|
14357
14550
|
obv3WithEndorsement,
|
|
14358
14551
|
prepareFixture,
|