@learncard/credential-library 1.0.14 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"community-award.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/community-award.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBA6FjC,CAAC"}
1
+ {"version":3,"file":"community-award.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/community-award.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBA+FjC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,iBAyD3B,CAAC"}
1
+ {"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,iBA0D3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"westbridge-full.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/westbridge-full.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,iBAAiB,EAAE,iBAy9E/B,CAAC"}
1
+ {"version":3,"file":"westbridge-full.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/westbridge-full.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,iBAAiB,EAAE,iBAk+E/B,CAAC"}
@@ -14,6 +14,7 @@ import { obv3OneedtechFull } from './obv3/1edtech-full';
14
14
  import { obv3ProfessionalCert } from './obv3/professional-cert';
15
15
  import { obv3MicroCredential } from './obv3/micro-credential';
16
16
  import { obv3CourseCompletion } from './obv3/course-completion';
17
+ import { obv3StandaloneFullCourse } from './obv3/standalone-full-course';
17
18
  import { obv3K12Diploma } from './obv3/k12-diploma';
18
19
  import { obv3EndorsementCredential } from './obv3/endorsement';
19
20
  import { clrMinimal } from './clr/minimal';
@@ -38,5 +39,5 @@ import { clrGreatPlainsFull } from './clr/great-plains-full';
38
39
  import { clrWestbridgeFull } from './clr/westbridge-full';
39
40
  import { clrCompetencyAligned } from './clr/competency-aligned';
40
41
  export declare const ALL_FIXTURES: CredentialFixture[];
41
- export { vcV1Basic, vcV1WithStatus, vcV2Basic, vcV2WithEvidence, vcV2MultipleSubjects, vcV2RenderMethodExample, obv3MinimalBadge, obv3FullBadge, obv3WithAlignment, obv3WithEndorsement, obv3PlugfestJff2, clrMinimal, clrMultiAchievement, boostBasic, boostId, boostWithSkills, invalidMissingContext, invalidEmptyType, invalidMissingIssuer, clrNdStudentTranscript, obv3OneedtechFull, obv3ProfessionalCert, obv3MicroCredential, obv3CourseCompletion, obv3K12Diploma, obv3EndorsementCredential, clrUniversityTranscript, boostCommunityAward, boostDelegate, vcV1AlumniCredential, vcV2EmploymentCredential, vcV2EducationDegree, vcV2DigitalId, vcV2MembershipCredential, vcV2LicenseCredential, clrGreatPlainsFull, clrWestbridgeFull, clrCompetencyAligned, };
42
+ export { vcV1Basic, vcV1WithStatus, vcV2Basic, vcV2WithEvidence, vcV2MultipleSubjects, vcV2RenderMethodExample, obv3MinimalBadge, obv3FullBadge, obv3WithAlignment, obv3WithEndorsement, obv3PlugfestJff2, clrMinimal, clrMultiAchievement, boostBasic, boostId, boostWithSkills, invalidMissingContext, invalidEmptyType, invalidMissingIssuer, clrNdStudentTranscript, obv3OneedtechFull, obv3ProfessionalCert, obv3MicroCredential, obv3CourseCompletion, obv3StandaloneFullCourse, obv3K12Diploma, obv3EndorsementCredential, clrUniversityTranscript, boostCommunityAward, boostDelegate, vcV1AlumniCredential, vcV2EmploymentCredential, vcV2EducationDegree, vcV2DigitalId, vcV2MembershipCredential, vcV2LicenseCredential, clrGreatPlainsFull, clrWestbridgeFull, clrCompetencyAligned, };
42
43
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAGhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CA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EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAMhE,eAAO,MAAM,YAAY,EAAE,iBAAiB,EAuD3C,CAAC;AAGF,OAAO,EACH,SAAS,EACT,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,GACvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"endorsement.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/endorsement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,yBAAyB,EAAE,iBAuDvC,CAAC"}
1
+ {"version":3,"file":"endorsement.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/endorsement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,yBAAyB,EAAE,iBAwDvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"professional-cert.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/professional-cert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,iBAmGlC,CAAC"}
1
+ {"version":3,"file":"professional-cert.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/professional-cert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,iBAsGlC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3StandaloneFullCourse: CredentialFixture;
3
+ //# sourceMappingURL=standalone-full-course.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standalone-full-course.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/standalone-full-course.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,wBAAwB,EAAE,iBA0MtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@learncard/credential-library",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Comprehensive library of Verifiable Credential fixtures for testing, development, and regression prevention across the VC ecosystem",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/credential-library.esm.js",
@@ -24,16 +24,16 @@
24
24
  "url": "https://github.com/learningeconomy/LearnCard/issues"
25
25
  },
26
26
  "devDependencies": {
27
- "@learncard/didkit-plugin": "1.9.8",
28
- "@learncard/init": "2.4.9",
27
+ "@learncard/didkit-plugin": "1.9.10",
28
+ "@learncard/init": "2.4.11",
29
29
  "@types/node": "^17.0.38",
30
30
  "esbuild": "^0.27.1",
31
31
  "shx": "^0.3.4",
32
32
  "typescript": "5.6.2",
33
- "vitest": "^1.6.0"
33
+ "vitest": "^3.2.6"
34
34
  },
35
35
  "dependencies": {
36
- "@learncard/types": "5.18.0",
36
+ "@learncard/types": "5.18.1",
37
37
  "zod": "4.1.13"
38
38
  },
39
39
  "types": "./dist/index.d.ts",
@@ -4,7 +4,7 @@ import { describe, it, expect, beforeAll } from 'vitest';
4
4
 
5
5
  import { initLearnCard } from '@learncard/init';
6
6
 
7
- import { getAllFixtures, prepareFixture } from '../index';
7
+ import { getAllFixtures, getFixture, prepareFixture } from '../index';
8
8
 
9
9
  import type { CredentialFixture } from '../types';
10
10
 
@@ -34,18 +34,36 @@ describe('Credential issuance', () => {
34
34
  getAllFixtures().filter(f => f.validity === 'valid');
35
35
 
36
36
  describe('issueCredential succeeds for all valid fixtures', () => {
37
- it.each(
38
- validFixtures().map(f => [f.id, f] as const)
39
- )('%s', async (_id, fixture) => {
40
- const prepared = prepareFixture(fixture, {
41
- issuerDid,
42
- subjectDid: 'did:example:test-subject-123',
43
- });
44
-
45
- const signed = await wallet.invoke.issueCredential(prepared);
46
-
47
- expect(signed).toBeDefined();
48
- expect((signed as Record<string, unknown>).proof).toBeDefined();
49
- }, 15_000);
37
+ it.each(validFixtures().map(f => [f.id, f] as const))(
38
+ '%s',
39
+ async (_id, fixture) => {
40
+ const prepared = prepareFixture(fixture, {
41
+ issuerDid,
42
+ subjectDid: 'did:example:test-subject-123',
43
+ });
44
+
45
+ const signed = await wallet.invoke.issueCredential(prepared);
46
+
47
+ expect(signed).toBeDefined();
48
+ expect((signed as Record<string, unknown>).proof).toBeDefined();
49
+ },
50
+ 15_000
51
+ );
50
52
  });
53
+
54
+ it('issues the full CLR fixture without remote contexts', async () => {
55
+ const offlineWallet = await initLearnCard({
56
+ seed: 'b'.repeat(64),
57
+ didkit,
58
+ allowRemoteContexts: false,
59
+ });
60
+ const fixture = getFixture('clr/westbridge-full');
61
+ const prepared = prepareFixture(fixture, {
62
+ issuerDid: offlineWallet.id.did(),
63
+ subjectDid: 'did:example:test-subject-123',
64
+ });
65
+ const signed = await offlineWallet.invoke.issueCredential(prepared);
66
+
67
+ expect(signed.proof).toBeDefined();
68
+ }, 30_000);
51
69
  });
@@ -17,6 +17,7 @@ export const boostCommunityAward: CredentialFixture = {
17
17
  '@context': [
18
18
  'https://www.w3.org/ns/credentials/v2',
19
19
  'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
20
+ 'https://ctx.learncard.com/boosts/1.0.3.json',
20
21
  ],
21
22
  id: 'urn:uuid:d8c4f2a1-3b67-4e89-a1d0-5f9e7c2b8a43',
22
23
  type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],
@@ -53,7 +54,8 @@ export const boostCommunityAward: CredentialFixture = {
53
54
  type: ['Profile'],
54
55
  name: 'LearnCard Community Hub',
55
56
  url: 'https://network.learncard.com/organizations/community-hub',
56
- description: 'The LearnCard Community Hub connects learners, educators, and community leaders.',
57
+ description:
58
+ 'The LearnCard Community Hub connects learners, educators, and community leaders.',
57
59
  },
58
60
  tag: [
59
61
  'leadership',
@@ -17,6 +17,7 @@ export const boostDelegate: CredentialFixture = {
17
17
  '@context': [
18
18
  'https://www.w3.org/ns/credentials/v2',
19
19
  'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
20
+ 'https://ctx.learncard.com/boosts/1.0.3.json',
20
21
  ],
21
22
  id: 'urn:uuid:e7b3d1f4-9a26-4c58-b0d3-8f1e2c7a9b56',
22
23
  type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],
@@ -26,7 +26,9 @@ export const clrWestbridgeFull: CredentialFixture = {
26
26
  '@context': [
27
27
  'https://www.w3.org/ns/credentials/v2',
28
28
  'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
29
- 'https://purl.imsglobal.org/spec/clr/v2p0/context-2.0.1.json',
29
+ 'https://purl.imsglobal.org/spec/clr/v2p0/context.json',
30
+ 'https://purl.imsglobal.org/spec/ob/v3p0/extensions.json',
31
+ { IssuerPolicy: 'https://westbridge.edu/credentials#IssuerPolicy' },
30
32
  ],
31
33
  id: 'urn:uuid:wb-clr-2025-jordan-reyes-001',
32
34
  type: ['VerifiableCredential', 'ClrCredential'],
@@ -100,6 +102,13 @@ export const clrWestbridgeFull: CredentialFixture = {
100
102
  },
101
103
  ],
102
104
  credentialSubject: {
105
+ // CLR v2's ClrSubject scoped context omits the Open Badges identifier term.
106
+ '@context': {
107
+ identifier: {
108
+ '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#identifier',
109
+ '@container': '@set',
110
+ },
111
+ },
103
112
  id: 'did:example:wb-student-2025-001',
104
113
  type: ['ClrSubject'],
105
114
  identifier: [
@@ -20,6 +20,7 @@ import { obv3OneedtechFull } from './obv3/1edtech-full';
20
20
  import { obv3ProfessionalCert } from './obv3/professional-cert';
21
21
  import { obv3MicroCredential } from './obv3/micro-credential';
22
22
  import { obv3CourseCompletion } from './obv3/course-completion';
23
+ import { obv3StandaloneFullCourse } from './obv3/standalone-full-course';
23
24
  import { obv3K12Diploma } from './obv3/k12-diploma';
24
25
  import { obv3EndorsementCredential } from './obv3/endorsement';
25
26
 
@@ -81,6 +82,7 @@ export const ALL_FIXTURES: CredentialFixture[] = [
81
82
  obv3ProfessionalCert,
82
83
  obv3MicroCredential,
83
84
  obv3CourseCompletion,
85
+ obv3StandaloneFullCourse,
84
86
  obv3K12Diploma,
85
87
  obv3EndorsementCredential,
86
88
 
@@ -142,6 +144,7 @@ export {
142
144
  obv3ProfessionalCert,
143
145
  obv3MicroCredential,
144
146
  obv3CourseCompletion,
147
+ obv3StandaloneFullCourse,
145
148
  obv3K12Diploma,
146
149
  obv3EndorsementCredential,
147
150
  clrUniversityTranscript,
@@ -17,6 +17,7 @@ export const obv3EndorsementCredential: CredentialFixture = {
17
17
  '@context': [
18
18
  'https://www.w3.org/ns/credentials/v2',
19
19
  'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
20
+ 'https://purl.imsglobal.org/spec/ob/v3p0/extensions.json',
20
21
  ],
21
22
  id: 'urn:uuid:a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d',
22
23
  type: ['VerifiableCredential', 'EndorsementCredential'],
@@ -17,6 +17,7 @@ export const obv3ProfessionalCert: CredentialFixture = {
17
17
  '@context': [
18
18
  'https://www.w3.org/ns/credentials/v2',
19
19
  'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
20
+ 'https://purl.imsglobal.org/spec/ob/v3p0/extensions.json',
20
21
  ],
21
22
  id: 'urn:uuid:b34ca6cd-29d7-4b2f-9e99-4902fd84c5a1',
22
23
  type: ['VerifiableCredential', 'OpenBadgeCredential'],
@@ -60,7 +61,8 @@ export const obv3ProfessionalCert: CredentialFixture = {
60
61
  {
61
62
  type: ['Alignment'],
62
63
  targetName: 'Cloud Solutions Architect',
63
- targetUrl: 'https://credentialengineregistry.org/resources/ce-cloud-arch-001',
64
+ targetUrl:
65
+ 'https://credentialengineregistry.org/resources/ce-cloud-arch-001',
64
66
  targetDescription:
65
67
  'Design and implement cloud infrastructure solutions that meet business requirements.',
66
68
  targetFramework: 'Credential Engine Cloud Computing Competency Framework',
@@ -69,7 +71,8 @@ export const obv3ProfessionalCert: CredentialFixture = {
69
71
  {
70
72
  type: ['Alignment'],
71
73
  targetName: 'Information Technology – Cloud Computing',
72
- targetUrl: 'https://nces.ed.gov/ipeds/cipcode/cipdetail.aspx?y=56&cipid=91456',
74
+ targetUrl:
75
+ 'https://nces.ed.gov/ipeds/cipcode/cipdetail.aspx?y=56&cipid=91456',
73
76
  targetDescription: 'CIP Code 11.0902 – Cloud Computing',
74
77
  targetFramework: 'Classification of Instructional Programs (CIP)',
75
78
  targetType: 'CFItem',
@@ -0,0 +1,207 @@
1
+ import { UnsignedAchievementCredentialValidator } from '@learncard/types';
2
+
3
+ import type { CredentialFixture } from '../../types';
4
+
5
+ export const obv3StandaloneFullCourse: CredentialFixture = {
6
+ id: 'obv3/standalone-full-course',
7
+ name: 'Applied Data Ethics and Responsible AI Course Completion',
8
+ description:
9
+ 'A standalone Open Badges v3 course credential with the academic metadata commonly present on a course nested inside a Comprehensive Learner Record.',
10
+ spec: 'obv3',
11
+ profile: 'course',
12
+ features: ['image', 'evidence', 'alignment', 'results', 'source'],
13
+ source: 'synthetic',
14
+ signed: false,
15
+ validity: 'valid',
16
+ validator: UnsignedAchievementCredentialValidator,
17
+ tags: ['course', 'standalone', 'higher-education', 'responsible-ai', 'full-metadata'],
18
+
19
+ credential: {
20
+ '@context': [
21
+ 'https://www.w3.org/ns/credentials/v2',
22
+ 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
23
+ ],
24
+ id: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418101',
25
+ type: ['VerifiableCredential', 'AchievementCredential'],
26
+ name: 'Applied Data Ethics and Responsible AI',
27
+ description:
28
+ 'Recognizes successful completion of a four-credit undergraduate course in ethical data practice and responsible artificial intelligence.',
29
+ image: {
30
+ id: 'https://aster-ridge.example/credentials/images/data-ethics-course.png',
31
+ type: 'Image',
32
+ caption: 'Applied Data Ethics and Responsible AI course credential',
33
+ },
34
+ issuer: {
35
+ id: 'did:web:aster-ridge.example',
36
+ type: ['Profile'],
37
+ name: 'Aster Ridge Institute',
38
+ url: 'https://aster-ridge.example',
39
+ description:
40
+ 'A fictional higher education institution focused on technology and public impact.',
41
+ email: 'registrar@aster-ridge.example',
42
+ image: {
43
+ id: 'https://aster-ridge.example/brand/institute-mark.png',
44
+ type: 'Image',
45
+ caption: 'Aster Ridge Institute mark',
46
+ },
47
+ },
48
+ validFrom: '2026-05-22T16:00:00Z',
49
+ credentialSubject: {
50
+ id: 'did:example:learner-ari-1087',
51
+ type: ['AchievementSubject'],
52
+ activityStartDate: '2026-01-12T08:00:00Z',
53
+ activityEndDate: '2026-05-18T23:59:59Z',
54
+ creditsEarned: 4,
55
+ term: 'Spring 2026',
56
+ narrative:
57
+ 'The learner completed the course requirements, including a team audit of an automated decision system.',
58
+ source: {
59
+ id: 'https://aster-ridge.example/offices/registrar',
60
+ type: ['Profile'],
61
+ name: 'Aster Ridge Institute Registrar',
62
+ url: 'https://aster-ridge.example/offices/registrar',
63
+ },
64
+ achievement: {
65
+ id: 'https://aster-ridge.example/catalog/courses/DAI-318',
66
+ type: ['Achievement'],
67
+ achievementType: 'Course',
68
+ name: 'Applied Data Ethics and Responsible AI',
69
+ description:
70
+ 'An interdisciplinary course covering data governance, algorithmic accountability, bias assessment, privacy, transparency, and responsible deployment of artificial intelligence systems.',
71
+ humanCode: 'DAI-318',
72
+ fieldOfStudy: 'Data Science',
73
+ creditsAvailable: 4,
74
+ inLanguage: 'en-US',
75
+ version: '2026.1',
76
+ criteria: {
77
+ id: 'https://aster-ridge.example/catalog/courses/DAI-318/criteria',
78
+ narrative:
79
+ 'Complete all seminars and labs, earn at least 70 percent overall, and pass the final algorithmic impact assessment project.',
80
+ },
81
+ image: {
82
+ id: 'https://aster-ridge.example/credentials/images/data-ethics-course.png',
83
+ type: 'Image',
84
+ caption: 'Applied Data Ethics and Responsible AI course credential',
85
+ },
86
+ creator: {
87
+ id: 'https://aster-ridge.example/schools/computing-and-society',
88
+ type: ['Profile'],
89
+ name: 'School of Computing and Society',
90
+ url: 'https://aster-ridge.example/schools/computing-and-society',
91
+ description:
92
+ 'The academic unit responsible for the course curriculum and assessment.',
93
+ parentOrg: {
94
+ id: 'did:web:aster-ridge.example',
95
+ type: ['Profile'],
96
+ name: 'Aster Ridge Institute',
97
+ },
98
+ },
99
+ otherIdentifier: [
100
+ {
101
+ type: 'IdentifierEntry',
102
+ identifier: 'ARI-DAI-318-2026-SP',
103
+ identifierType: 'identifier',
104
+ },
105
+ ],
106
+ alignment: [
107
+ {
108
+ type: ['Alignment'],
109
+ targetCode: 'ARIDF-4.2',
110
+ targetName: 'Evaluate algorithmic bias and disparate impact',
111
+ targetDescription:
112
+ 'Evaluate automated systems for bias, disparate impact, and limitations in representative data.',
113
+ targetFramework: 'Aster Ridge Data Responsibility Framework',
114
+ targetType: 'CFItem',
115
+ targetUrl:
116
+ 'https://aster-ridge.example/frameworks/data-responsibility/items/4.2',
117
+ },
118
+ {
119
+ type: ['Alignment'],
120
+ targetCode: 'ARIDF-6.1',
121
+ targetName: 'Design accountable data governance practices',
122
+ targetDescription:
123
+ 'Design governance practices that document data provenance, consent, oversight, and recourse.',
124
+ targetFramework: 'Aster Ridge Data Responsibility Framework',
125
+ targetType: 'CFItem',
126
+ targetUrl:
127
+ 'https://aster-ridge.example/frameworks/data-responsibility/items/6.1',
128
+ },
129
+ ],
130
+ resultDescription: [
131
+ {
132
+ id: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418103',
133
+ type: ['ResultDescription'],
134
+ name: 'Final Letter Grade',
135
+ resultType: 'LetterGrade',
136
+ allowedValue: ['A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'D', 'F'],
137
+ requiredValue: 'C',
138
+ },
139
+ {
140
+ id: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418104',
141
+ type: ['ResultDescription'],
142
+ name: 'Final Percentage',
143
+ resultType: 'Percent',
144
+ valueMin: '0',
145
+ valueMax: '100',
146
+ requiredValue: '70',
147
+ },
148
+ {
149
+ id: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418105',
150
+ type: ['ResultDescription'],
151
+ name: 'Course Completion Status',
152
+ resultType: 'Status',
153
+ allowedValue: [
154
+ 'Completed',
155
+ 'Enrolled',
156
+ 'Failed',
157
+ 'InProgress',
158
+ 'OnHold',
159
+ 'Withdrew',
160
+ ],
161
+ },
162
+ ],
163
+ tag: [
164
+ 'data-ethics',
165
+ 'responsible-ai',
166
+ 'algorithmic-accountability',
167
+ 'data-governance',
168
+ ],
169
+ },
170
+ result: [
171
+ {
172
+ type: ['Result'],
173
+ resultDescription: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418103',
174
+ value: 'A-',
175
+ },
176
+ {
177
+ type: ['Result'],
178
+ resultDescription: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418104',
179
+ value: '92',
180
+ },
181
+ {
182
+ type: ['Result'],
183
+ resultDescription: 'urn:uuid:7f1a9b36-91d2-4bd5-a7af-3d8d8e418105',
184
+ status: 'Completed',
185
+ },
186
+ ],
187
+ },
188
+ evidence: [
189
+ {
190
+ id: 'https://aster-ridge.example/records/ari-1087/DAI-318',
191
+ type: ['Evidence'],
192
+ name: 'Official Course Completion Record',
193
+ description:
194
+ 'Registrar record confirming the learner earned four credits with a final grade of A-.',
195
+ narrative:
196
+ 'Course requirements were completed during the Spring 2026 academic term.',
197
+ },
198
+ {
199
+ id: 'https://aster-ridge.example/showcase/ari-1087/impact-assessment',
200
+ type: ['Evidence'],
201
+ name: 'Algorithmic Impact Assessment',
202
+ description:
203
+ 'Final project evaluating fairness, transparency, and governance controls for a fictional automated decision system.',
204
+ },
205
+ ],
206
+ },
207
+ };