@learncard/credential-library 1.0.15 → 1.0.16
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 +4 -4
- package/src/fixtures/index.ts +3 -0
- package/src/fixtures/obv3/standalone-full-course.ts +207 -0
|
@@ -60,6 +60,7 @@ __export(index_exports, {
|
|
|
60
60
|
obv3OneedtechFull: () => obv3OneedtechFull,
|
|
61
61
|
obv3PlugfestJff2: () => obv3PlugfestJff2,
|
|
62
62
|
obv3ProfessionalCert: () => obv3ProfessionalCert,
|
|
63
|
+
obv3StandaloneFullCourse: () => obv3StandaloneFullCourse,
|
|
63
64
|
obv3WithAlignment: () => obv3WithAlignment,
|
|
64
65
|
obv3WithEndorsement: () => obv3WithEndorsement,
|
|
65
66
|
prepareFixture: () => prepareFixture,
|
|
@@ -1243,6 +1244,197 @@ var obv3CourseCompletion = {
|
|
|
1243
1244
|
}
|
|
1244
1245
|
};
|
|
1245
1246
|
|
|
1247
|
+
// src/fixtures/obv3/standalone-full-course.ts
|
|
1248
|
+
var import_types12 = require("@learncard/types");
|
|
1249
|
+
var obv3StandaloneFullCourse = {
|
|
1250
|
+
id: "obv3/standalone-full-course",
|
|
1251
|
+
name: "Applied Data Ethics and Responsible AI Course Completion",
|
|
1252
|
+
description: "A standalone Open Badges v3 course credential with the academic metadata commonly present on a course nested inside a Comprehensive Learner Record.",
|
|
1253
|
+
spec: "obv3",
|
|
1254
|
+
profile: "course",
|
|
1255
|
+
features: ["image", "evidence", "alignment", "results", "source"],
|
|
1256
|
+
source: "synthetic",
|
|
1257
|
+
signed: false,
|
|
1258
|
+
validity: "valid",
|
|
1259
|
+
validator: import_types12.UnsignedAchievementCredentialValidator,
|
|
1260
|
+
tags: ["course", "standalone", "higher-education", "responsible-ai", "full-metadata"],
|
|
1261
|
+
credential: {
|
|
1262
|
+
"@context": [
|
|
1263
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
1264
|
+
"https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"
|
|
1265
|
+
],
|
|
1266
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418101",
|
|
1267
|
+
type: ["VerifiableCredential", "AchievementCredential"],
|
|
1268
|
+
name: "Applied Data Ethics and Responsible AI",
|
|
1269
|
+
description: "Recognizes successful completion of a four-credit undergraduate course in ethical data practice and responsible artificial intelligence.",
|
|
1270
|
+
image: {
|
|
1271
|
+
id: "https://aster-ridge.example/credentials/images/data-ethics-course.png",
|
|
1272
|
+
type: "Image",
|
|
1273
|
+
caption: "Applied Data Ethics and Responsible AI course credential"
|
|
1274
|
+
},
|
|
1275
|
+
issuer: {
|
|
1276
|
+
id: "did:web:aster-ridge.example",
|
|
1277
|
+
type: ["Profile"],
|
|
1278
|
+
name: "Aster Ridge Institute",
|
|
1279
|
+
url: "https://aster-ridge.example",
|
|
1280
|
+
description: "A fictional higher education institution focused on technology and public impact.",
|
|
1281
|
+
email: "registrar@aster-ridge.example",
|
|
1282
|
+
image: {
|
|
1283
|
+
id: "https://aster-ridge.example/brand/institute-mark.png",
|
|
1284
|
+
type: "Image",
|
|
1285
|
+
caption: "Aster Ridge Institute mark"
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
validFrom: "2026-05-22T16:00:00Z",
|
|
1289
|
+
credentialSubject: {
|
|
1290
|
+
id: "did:example:learner-ari-1087",
|
|
1291
|
+
type: ["AchievementSubject"],
|
|
1292
|
+
activityStartDate: "2026-01-12T08:00:00Z",
|
|
1293
|
+
activityEndDate: "2026-05-18T23:59:59Z",
|
|
1294
|
+
creditsEarned: 4,
|
|
1295
|
+
term: "Spring 2026",
|
|
1296
|
+
narrative: "The learner completed the course requirements, including a team audit of an automated decision system.",
|
|
1297
|
+
source: {
|
|
1298
|
+
id: "https://aster-ridge.example/offices/registrar",
|
|
1299
|
+
type: ["Profile"],
|
|
1300
|
+
name: "Aster Ridge Institute Registrar",
|
|
1301
|
+
url: "https://aster-ridge.example/offices/registrar"
|
|
1302
|
+
},
|
|
1303
|
+
achievement: {
|
|
1304
|
+
id: "https://aster-ridge.example/catalog/courses/DAI-318",
|
|
1305
|
+
type: ["Achievement"],
|
|
1306
|
+
achievementType: "Course",
|
|
1307
|
+
name: "Applied Data Ethics and Responsible AI",
|
|
1308
|
+
description: "An interdisciplinary course covering data governance, algorithmic accountability, bias assessment, privacy, transparency, and responsible deployment of artificial intelligence systems.",
|
|
1309
|
+
humanCode: "DAI-318",
|
|
1310
|
+
fieldOfStudy: "Data Science",
|
|
1311
|
+
creditsAvailable: 4,
|
|
1312
|
+
inLanguage: "en-US",
|
|
1313
|
+
version: "2026.1",
|
|
1314
|
+
criteria: {
|
|
1315
|
+
id: "https://aster-ridge.example/catalog/courses/DAI-318/criteria",
|
|
1316
|
+
narrative: "Complete all seminars and labs, earn at least 70 percent overall, and pass the final algorithmic impact assessment project."
|
|
1317
|
+
},
|
|
1318
|
+
image: {
|
|
1319
|
+
id: "https://aster-ridge.example/credentials/images/data-ethics-course.png",
|
|
1320
|
+
type: "Image",
|
|
1321
|
+
caption: "Applied Data Ethics and Responsible AI course credential"
|
|
1322
|
+
},
|
|
1323
|
+
creator: {
|
|
1324
|
+
id: "https://aster-ridge.example/schools/computing-and-society",
|
|
1325
|
+
type: ["Profile"],
|
|
1326
|
+
name: "School of Computing and Society",
|
|
1327
|
+
url: "https://aster-ridge.example/schools/computing-and-society",
|
|
1328
|
+
description: "The academic unit responsible for the course curriculum and assessment.",
|
|
1329
|
+
parentOrg: {
|
|
1330
|
+
id: "did:web:aster-ridge.example",
|
|
1331
|
+
type: ["Profile"],
|
|
1332
|
+
name: "Aster Ridge Institute"
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
otherIdentifier: [
|
|
1336
|
+
{
|
|
1337
|
+
type: "IdentifierEntry",
|
|
1338
|
+
identifier: "ARI-DAI-318-2026-SP",
|
|
1339
|
+
identifierType: "identifier"
|
|
1340
|
+
}
|
|
1341
|
+
],
|
|
1342
|
+
alignment: [
|
|
1343
|
+
{
|
|
1344
|
+
type: ["Alignment"],
|
|
1345
|
+
targetCode: "ARIDF-4.2",
|
|
1346
|
+
targetName: "Evaluate algorithmic bias and disparate impact",
|
|
1347
|
+
targetDescription: "Evaluate automated systems for bias, disparate impact, and limitations in representative data.",
|
|
1348
|
+
targetFramework: "Aster Ridge Data Responsibility Framework",
|
|
1349
|
+
targetType: "CFItem",
|
|
1350
|
+
targetUrl: "https://aster-ridge.example/frameworks/data-responsibility/items/4.2"
|
|
1351
|
+
},
|
|
1352
|
+
{
|
|
1353
|
+
type: ["Alignment"],
|
|
1354
|
+
targetCode: "ARIDF-6.1",
|
|
1355
|
+
targetName: "Design accountable data governance practices",
|
|
1356
|
+
targetDescription: "Design governance practices that document data provenance, consent, oversight, and recourse.",
|
|
1357
|
+
targetFramework: "Aster Ridge Data Responsibility Framework",
|
|
1358
|
+
targetType: "CFItem",
|
|
1359
|
+
targetUrl: "https://aster-ridge.example/frameworks/data-responsibility/items/6.1"
|
|
1360
|
+
}
|
|
1361
|
+
],
|
|
1362
|
+
resultDescription: [
|
|
1363
|
+
{
|
|
1364
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418103",
|
|
1365
|
+
type: ["ResultDescription"],
|
|
1366
|
+
name: "Final Letter Grade",
|
|
1367
|
+
resultType: "LetterGrade",
|
|
1368
|
+
allowedValue: ["A", "A-", "B+", "B", "B-", "C+", "C", "D", "F"],
|
|
1369
|
+
requiredValue: "C"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418104",
|
|
1373
|
+
type: ["ResultDescription"],
|
|
1374
|
+
name: "Final Percentage",
|
|
1375
|
+
resultType: "Percent",
|
|
1376
|
+
valueMin: "0",
|
|
1377
|
+
valueMax: "100",
|
|
1378
|
+
requiredValue: "70"
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
id: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418105",
|
|
1382
|
+
type: ["ResultDescription"],
|
|
1383
|
+
name: "Course Completion Status",
|
|
1384
|
+
resultType: "Status",
|
|
1385
|
+
allowedValue: [
|
|
1386
|
+
"Completed",
|
|
1387
|
+
"Enrolled",
|
|
1388
|
+
"Failed",
|
|
1389
|
+
"InProgress",
|
|
1390
|
+
"OnHold",
|
|
1391
|
+
"Withdrew"
|
|
1392
|
+
]
|
|
1393
|
+
}
|
|
1394
|
+
],
|
|
1395
|
+
tag: [
|
|
1396
|
+
"data-ethics",
|
|
1397
|
+
"responsible-ai",
|
|
1398
|
+
"algorithmic-accountability",
|
|
1399
|
+
"data-governance"
|
|
1400
|
+
]
|
|
1401
|
+
},
|
|
1402
|
+
result: [
|
|
1403
|
+
{
|
|
1404
|
+
type: ["Result"],
|
|
1405
|
+
resultDescription: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418103",
|
|
1406
|
+
value: "A-"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
type: ["Result"],
|
|
1410
|
+
resultDescription: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418104",
|
|
1411
|
+
value: "92"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
type: ["Result"],
|
|
1415
|
+
resultDescription: "urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418105",
|
|
1416
|
+
status: "Completed"
|
|
1417
|
+
}
|
|
1418
|
+
]
|
|
1419
|
+
},
|
|
1420
|
+
evidence: [
|
|
1421
|
+
{
|
|
1422
|
+
id: "https://aster-ridge.example/records/ari-1087/DAI-318",
|
|
1423
|
+
type: ["Evidence"],
|
|
1424
|
+
name: "Official Course Completion Record",
|
|
1425
|
+
description: "Registrar record confirming the learner earned four credits with a final grade of A-.",
|
|
1426
|
+
narrative: "Course requirements were completed during the Spring 2026 academic term."
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
id: "https://aster-ridge.example/showcase/ari-1087/impact-assessment",
|
|
1430
|
+
type: ["Evidence"],
|
|
1431
|
+
name: "Algorithmic Impact Assessment",
|
|
1432
|
+
description: "Final project evaluating fairness, transparency, and governance controls for a fictional automated decision system."
|
|
1433
|
+
}
|
|
1434
|
+
]
|
|
1435
|
+
}
|
|
1436
|
+
};
|
|
1437
|
+
|
|
1246
1438
|
// src/fixtures/obv3/k12-diploma.ts
|
|
1247
1439
|
var obv3K12Diploma = {
|
|
1248
1440
|
id: "obv3/k12-diploma",
|
|
@@ -1384,7 +1576,7 @@ var obv3EndorsementCredential = {
|
|
|
1384
1576
|
};
|
|
1385
1577
|
|
|
1386
1578
|
// src/fixtures/clr/minimal.ts
|
|
1387
|
-
var
|
|
1579
|
+
var import_types13 = require("@learncard/types");
|
|
1388
1580
|
var clrMinimal = {
|
|
1389
1581
|
id: "clr/minimal",
|
|
1390
1582
|
name: "Minimal CLR v2 Credential",
|
|
@@ -1395,7 +1587,7 @@ var clrMinimal = {
|
|
|
1395
1587
|
source: "spec-example",
|
|
1396
1588
|
signed: false,
|
|
1397
1589
|
validity: "valid",
|
|
1398
|
-
validator:
|
|
1590
|
+
validator: import_types13.UnsignedClrCredentialValidator,
|
|
1399
1591
|
credential: {
|
|
1400
1592
|
"@context": [
|
|
1401
1593
|
"https://www.w3.org/ns/credentials/v2",
|
|
@@ -1434,7 +1626,7 @@ var clrMinimal = {
|
|
|
1434
1626
|
};
|
|
1435
1627
|
|
|
1436
1628
|
// src/fixtures/clr/multi-achievement.ts
|
|
1437
|
-
var
|
|
1629
|
+
var import_types14 = require("@learncard/types");
|
|
1438
1630
|
var clrMultiAchievement = {
|
|
1439
1631
|
id: "clr/multi-achievement",
|
|
1440
1632
|
name: "CLR v2 with Multiple Achievements and Associations",
|
|
@@ -1445,7 +1637,7 @@ var clrMultiAchievement = {
|
|
|
1445
1637
|
source: "synthetic",
|
|
1446
1638
|
signed: false,
|
|
1447
1639
|
validity: "valid",
|
|
1448
|
-
validator:
|
|
1640
|
+
validator: import_types14.UnsignedClrCredentialValidator,
|
|
1449
1641
|
tags: ["comprehensive"],
|
|
1450
1642
|
credential: {
|
|
1451
1643
|
"@context": [
|
|
@@ -1880,7 +2072,7 @@ var clrUniversityTranscript = {
|
|
|
1880
2072
|
};
|
|
1881
2073
|
|
|
1882
2074
|
// src/fixtures/boost/basic.ts
|
|
1883
|
-
var
|
|
2075
|
+
var import_types15 = require("@learncard/types");
|
|
1884
2076
|
var boostBasic = {
|
|
1885
2077
|
id: "boost/basic",
|
|
1886
2078
|
name: "Basic LearnCard Boost",
|
|
@@ -1891,7 +2083,7 @@ var boostBasic = {
|
|
|
1891
2083
|
source: "synthetic",
|
|
1892
2084
|
signed: false,
|
|
1893
2085
|
validity: "valid",
|
|
1894
|
-
validator:
|
|
2086
|
+
validator: import_types15.UnsignedAchievementCredentialValidator,
|
|
1895
2087
|
tags: ["learncard", "boost"],
|
|
1896
2088
|
credential: {
|
|
1897
2089
|
"@context": [
|
|
@@ -1927,7 +2119,7 @@ var boostBasic = {
|
|
|
1927
2119
|
};
|
|
1928
2120
|
|
|
1929
2121
|
// src/fixtures/boost/boost-id.ts
|
|
1930
|
-
var
|
|
2122
|
+
var import_types16 = require("@learncard/types");
|
|
1931
2123
|
var boostId = {
|
|
1932
2124
|
id: "boost/boost-id",
|
|
1933
2125
|
name: "LearnCard Boost ID",
|
|
@@ -1938,7 +2130,7 @@ var boostId = {
|
|
|
1938
2130
|
source: "synthetic",
|
|
1939
2131
|
signed: false,
|
|
1940
2132
|
validity: "valid",
|
|
1941
|
-
validator:
|
|
2133
|
+
validator: import_types16.UnsignedAchievementCredentialValidator,
|
|
1942
2134
|
tags: ["learncard", "boost", "id"],
|
|
1943
2135
|
credential: {
|
|
1944
2136
|
"@context": [
|
|
@@ -1983,7 +2175,7 @@ var boostId = {
|
|
|
1983
2175
|
};
|
|
1984
2176
|
|
|
1985
2177
|
// src/fixtures/boost/with-skills.ts
|
|
1986
|
-
var
|
|
2178
|
+
var import_types17 = require("@learncard/types");
|
|
1987
2179
|
var boostWithSkills = {
|
|
1988
2180
|
id: "boost/with-skills",
|
|
1989
2181
|
name: "LearnCard Boost with Skills",
|
|
@@ -1994,7 +2186,7 @@ var boostWithSkills = {
|
|
|
1994
2186
|
source: "synthetic",
|
|
1995
2187
|
signed: false,
|
|
1996
2188
|
validity: "valid",
|
|
1997
|
-
validator:
|
|
2189
|
+
validator: import_types17.UnsignedAchievementCredentialValidator,
|
|
1998
2190
|
tags: ["learncard", "boost", "skills"],
|
|
1999
2191
|
credential: {
|
|
2000
2192
|
"@context": [
|
|
@@ -2204,7 +2396,7 @@ var boostDelegate = {
|
|
|
2204
2396
|
};
|
|
2205
2397
|
|
|
2206
2398
|
// src/fixtures/invalid/missing-context.ts
|
|
2207
|
-
var
|
|
2399
|
+
var import_types18 = require("@learncard/types");
|
|
2208
2400
|
var invalidMissingContext = {
|
|
2209
2401
|
id: "invalid/missing-context",
|
|
2210
2402
|
name: "Missing @context",
|
|
@@ -2215,7 +2407,7 @@ var invalidMissingContext = {
|
|
|
2215
2407
|
source: "synthetic",
|
|
2216
2408
|
signed: false,
|
|
2217
2409
|
validity: "invalid",
|
|
2218
|
-
validator:
|
|
2410
|
+
validator: import_types18.UnsignedVCValidator,
|
|
2219
2411
|
tags: ["negative-test"],
|
|
2220
2412
|
credential: {
|
|
2221
2413
|
// Intentionally missing '@context'
|
|
@@ -2228,7 +2420,7 @@ var invalidMissingContext = {
|
|
|
2228
2420
|
};
|
|
2229
2421
|
|
|
2230
2422
|
// src/fixtures/invalid/empty-type.ts
|
|
2231
|
-
var
|
|
2423
|
+
var import_types19 = require("@learncard/types");
|
|
2232
2424
|
var invalidEmptyType = {
|
|
2233
2425
|
id: "invalid/empty-type",
|
|
2234
2426
|
name: "Empty type Array",
|
|
@@ -2239,7 +2431,7 @@ var invalidEmptyType = {
|
|
|
2239
2431
|
source: "synthetic",
|
|
2240
2432
|
signed: false,
|
|
2241
2433
|
validity: "invalid",
|
|
2242
|
-
validator:
|
|
2434
|
+
validator: import_types19.UnsignedVCValidator,
|
|
2243
2435
|
tags: ["negative-test"],
|
|
2244
2436
|
credential: {
|
|
2245
2437
|
"@context": ["https://www.w3.org/ns/credentials/v2"],
|
|
@@ -2252,7 +2444,7 @@ var invalidEmptyType = {
|
|
|
2252
2444
|
};
|
|
2253
2445
|
|
|
2254
2446
|
// src/fixtures/invalid/missing-issuer.ts
|
|
2255
|
-
var
|
|
2447
|
+
var import_types20 = require("@learncard/types");
|
|
2256
2448
|
var invalidMissingIssuer = {
|
|
2257
2449
|
id: "invalid/missing-issuer",
|
|
2258
2450
|
name: "Missing Issuer",
|
|
@@ -2263,7 +2455,7 @@ var invalidMissingIssuer = {
|
|
|
2263
2455
|
source: "synthetic",
|
|
2264
2456
|
signed: false,
|
|
2265
2457
|
validity: "invalid",
|
|
2266
|
-
validator:
|
|
2458
|
+
validator: import_types20.UnsignedVCValidator,
|
|
2267
2459
|
tags: ["negative-test"],
|
|
2268
2460
|
credential: {
|
|
2269
2461
|
"@context": ["https://www.w3.org/ns/credentials/v2"],
|
|
@@ -14147,6 +14339,7 @@ var ALL_FIXTURES = [
|
|
|
14147
14339
|
obv3ProfessionalCert,
|
|
14148
14340
|
obv3MicroCredential,
|
|
14149
14341
|
obv3CourseCompletion,
|
|
14342
|
+
obv3StandaloneFullCourse,
|
|
14150
14343
|
obv3K12Diploma,
|
|
14151
14344
|
obv3EndorsementCredential,
|
|
14152
14345
|
// CLR v2
|