@learncard/credential-library 1.0.10 → 1.0.11
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/README.md +104 -98
- package/package.json +49 -39
- package/src/__tests__/issuance.test.ts +51 -0
- package/src/__tests__/registry.test.ts +457 -0
- package/src/fixtures/boost/basic.ts +50 -0
- package/src/fixtures/boost/boost-id.ts +59 -0
- package/src/fixtures/boost/community-award.ts +96 -0
- package/src/fixtures/boost/delegate.ts +60 -0
- package/src/fixtures/boost/with-skills.ts +80 -0
- package/src/fixtures/clr/competency-aligned.ts +737 -0
- package/src/fixtures/clr/great-plains-full.ts +7841 -0
- package/src/fixtures/clr/minimal.ts +53 -0
- package/src/fixtures/clr/multi-achievement.ts +125 -0
- package/src/fixtures/clr/nd-student-transcript.ts +411 -0
- package/src/fixtures/clr/university-transcript.ts +328 -0
- package/src/fixtures/clr/westbridge-full.ts +2524 -0
- package/src/fixtures/index.ts +159 -0
- package/src/fixtures/invalid/empty-type.ts +27 -0
- package/src/fixtures/invalid/missing-context.ts +27 -0
- package/src/fixtures/invalid/missing-issuer.ts +27 -0
- package/src/fixtures/obv3/1edtech-full.ts +237 -0
- package/src/fixtures/obv3/course-completion.ts +82 -0
- package/src/fixtures/obv3/endorsement.ts +58 -0
- package/src/fixtures/obv3/full-badge.ts +121 -0
- package/src/fixtures/obv3/k12-diploma.ts +92 -0
- package/src/fixtures/obv3/micro-credential.ts +170 -0
- package/src/fixtures/obv3/minimal-badge.ts +40 -0
- package/src/fixtures/obv3/plugfest-jff2.ts +57 -0
- package/src/fixtures/obv3/professional-cert.ts +102 -0
- package/src/fixtures/obv3/with-alignment.ts +62 -0
- package/src/fixtures/obv3/with-endorsement.ts +62 -0
- package/src/fixtures/render-method/render-method-example.ts +45 -0
- package/src/fixtures/vc-v1/alumni-credential.ts +37 -0
- package/src/fixtures/vc-v1/basic.ts +27 -0
- package/src/fixtures/vc-v1/with-status.ts +44 -0
- package/src/fixtures/vc-v2/basic.ts +27 -0
- package/src/fixtures/vc-v2/digital-id.ts +78 -0
- package/src/fixtures/vc-v2/education-degree.ts +77 -0
- package/src/fixtures/vc-v2/employment-credential.ts +64 -0
- package/src/fixtures/vc-v2/license-credential.ts +79 -0
- package/src/fixtures/vc-v2/membership-credential.ts +62 -0
- package/src/fixtures/vc-v2/multiple-subjects.ts +39 -0
- package/src/fixtures/vc-v2/with-evidence.ts +50 -0
- package/src/index.ts +45 -0
- package/src/prepare.ts +212 -0
- package/src/registry.ts +209 -0
- package/src/types.ts +164 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../types';
|
|
2
|
+
|
|
3
|
+
// VC v1
|
|
4
|
+
import { vcV1Basic } from './vc-v1/basic';
|
|
5
|
+
import { vcV1WithStatus } from './vc-v1/with-status';
|
|
6
|
+
|
|
7
|
+
// VC v2
|
|
8
|
+
import { vcV2Basic } from './vc-v2/basic';
|
|
9
|
+
import { vcV2WithEvidence } from './vc-v2/with-evidence';
|
|
10
|
+
import { vcV2MultipleSubjects } from './vc-v2/multiple-subjects';
|
|
11
|
+
import { vcV2RenderMethodExample } from './render-method/render-method-example';
|
|
12
|
+
|
|
13
|
+
// OBv3
|
|
14
|
+
import { obv3MinimalBadge } from './obv3/minimal-badge';
|
|
15
|
+
import { obv3FullBadge } from './obv3/full-badge';
|
|
16
|
+
import { obv3WithAlignment } from './obv3/with-alignment';
|
|
17
|
+
import { obv3WithEndorsement } from './obv3/with-endorsement';
|
|
18
|
+
import { obv3PlugfestJff2 } from './obv3/plugfest-jff2';
|
|
19
|
+
import { obv3OneedtechFull } from './obv3/1edtech-full';
|
|
20
|
+
import { obv3ProfessionalCert } from './obv3/professional-cert';
|
|
21
|
+
import { obv3MicroCredential } from './obv3/micro-credential';
|
|
22
|
+
import { obv3CourseCompletion } from './obv3/course-completion';
|
|
23
|
+
import { obv3K12Diploma } from './obv3/k12-diploma';
|
|
24
|
+
import { obv3EndorsementCredential } from './obv3/endorsement';
|
|
25
|
+
|
|
26
|
+
// CLR v2
|
|
27
|
+
import { clrMinimal } from './clr/minimal';
|
|
28
|
+
import { clrMultiAchievement } from './clr/multi-achievement';
|
|
29
|
+
import { clrUniversityTranscript } from './clr/university-transcript';
|
|
30
|
+
|
|
31
|
+
// LearnCard Boosts
|
|
32
|
+
import { boostBasic } from './boost/basic';
|
|
33
|
+
import { boostId } from './boost/boost-id';
|
|
34
|
+
import { boostWithSkills } from './boost/with-skills';
|
|
35
|
+
import { boostCommunityAward } from './boost/community-award';
|
|
36
|
+
import { boostDelegate } from './boost/delegate';
|
|
37
|
+
|
|
38
|
+
// Invalid / negative test fixtures
|
|
39
|
+
import { invalidMissingContext } from './invalid/missing-context';
|
|
40
|
+
import { invalidEmptyType } from './invalid/empty-type';
|
|
41
|
+
import { invalidMissingIssuer } from './invalid/missing-issuer';
|
|
42
|
+
|
|
43
|
+
import { clrNdStudentTranscript } from './clr/nd-student-transcript';
|
|
44
|
+
|
|
45
|
+
// VC v1 (additional)
|
|
46
|
+
import { vcV1AlumniCredential } from './vc-v1/alumni-credential';
|
|
47
|
+
|
|
48
|
+
// VC v2 (additional)
|
|
49
|
+
import { vcV2EmploymentCredential } from './vc-v2/employment-credential';
|
|
50
|
+
import { vcV2EducationDegree } from './vc-v2/education-degree';
|
|
51
|
+
import { vcV2DigitalId } from './vc-v2/digital-id';
|
|
52
|
+
import { vcV2MembershipCredential } from './vc-v2/membership-credential';
|
|
53
|
+
import { vcV2LicenseCredential } from './vc-v2/license-credential';
|
|
54
|
+
|
|
55
|
+
import { clrGreatPlainsFull } from './clr/great-plains-full';
|
|
56
|
+
import { clrWestbridgeFull } from './clr/westbridge-full';
|
|
57
|
+
import { clrCompetencyAligned } from './clr/competency-aligned';
|
|
58
|
+
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
// All fixtures — collected for auto-registration
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
|
|
63
|
+
export const ALL_FIXTURES: CredentialFixture[] = [
|
|
64
|
+
// VC v1
|
|
65
|
+
vcV1Basic,
|
|
66
|
+
vcV1WithStatus,
|
|
67
|
+
|
|
68
|
+
// VC v2
|
|
69
|
+
vcV2Basic,
|
|
70
|
+
vcV2WithEvidence,
|
|
71
|
+
vcV2MultipleSubjects,
|
|
72
|
+
vcV2RenderMethodExample,
|
|
73
|
+
|
|
74
|
+
// OBv3
|
|
75
|
+
obv3MinimalBadge,
|
|
76
|
+
obv3FullBadge,
|
|
77
|
+
obv3WithAlignment,
|
|
78
|
+
obv3WithEndorsement,
|
|
79
|
+
obv3PlugfestJff2,
|
|
80
|
+
obv3OneedtechFull,
|
|
81
|
+
obv3ProfessionalCert,
|
|
82
|
+
obv3MicroCredential,
|
|
83
|
+
obv3CourseCompletion,
|
|
84
|
+
obv3K12Diploma,
|
|
85
|
+
obv3EndorsementCredential,
|
|
86
|
+
|
|
87
|
+
// CLR v2
|
|
88
|
+
clrMinimal,
|
|
89
|
+
clrMultiAchievement,
|
|
90
|
+
clrUniversityTranscript,
|
|
91
|
+
|
|
92
|
+
// Boosts
|
|
93
|
+
boostBasic,
|
|
94
|
+
boostId,
|
|
95
|
+
boostWithSkills,
|
|
96
|
+
boostCommunityAward,
|
|
97
|
+
boostDelegate,
|
|
98
|
+
|
|
99
|
+
// Invalid
|
|
100
|
+
invalidMissingContext,
|
|
101
|
+
invalidEmptyType,
|
|
102
|
+
invalidMissingIssuer,
|
|
103
|
+
clrNdStudentTranscript,
|
|
104
|
+
|
|
105
|
+
// VC v1 (additional)
|
|
106
|
+
vcV1AlumniCredential,
|
|
107
|
+
|
|
108
|
+
// VC v2 (additional)
|
|
109
|
+
vcV2EmploymentCredential,
|
|
110
|
+
vcV2EducationDegree,
|
|
111
|
+
vcV2DigitalId,
|
|
112
|
+
vcV2MembershipCredential,
|
|
113
|
+
vcV2LicenseCredential,
|
|
114
|
+
clrGreatPlainsFull,
|
|
115
|
+
clrWestbridgeFull,
|
|
116
|
+
clrCompetencyAligned,
|
|
117
|
+
];
|
|
118
|
+
|
|
119
|
+
// Re-export individual fixtures for direct import
|
|
120
|
+
export {
|
|
121
|
+
vcV1Basic,
|
|
122
|
+
vcV1WithStatus,
|
|
123
|
+
vcV2Basic,
|
|
124
|
+
vcV2WithEvidence,
|
|
125
|
+
vcV2MultipleSubjects,
|
|
126
|
+
vcV2RenderMethodExample,
|
|
127
|
+
obv3MinimalBadge,
|
|
128
|
+
obv3FullBadge,
|
|
129
|
+
obv3WithAlignment,
|
|
130
|
+
obv3WithEndorsement,
|
|
131
|
+
obv3PlugfestJff2,
|
|
132
|
+
clrMinimal,
|
|
133
|
+
clrMultiAchievement,
|
|
134
|
+
boostBasic,
|
|
135
|
+
boostId,
|
|
136
|
+
boostWithSkills,
|
|
137
|
+
invalidMissingContext,
|
|
138
|
+
invalidEmptyType,
|
|
139
|
+
invalidMissingIssuer,
|
|
140
|
+
clrNdStudentTranscript,
|
|
141
|
+
obv3OneedtechFull,
|
|
142
|
+
obv3ProfessionalCert,
|
|
143
|
+
obv3MicroCredential,
|
|
144
|
+
obv3CourseCompletion,
|
|
145
|
+
obv3K12Diploma,
|
|
146
|
+
obv3EndorsementCredential,
|
|
147
|
+
clrUniversityTranscript,
|
|
148
|
+
boostCommunityAward,
|
|
149
|
+
boostDelegate,
|
|
150
|
+
vcV1AlumniCredential,
|
|
151
|
+
vcV2EmploymentCredential,
|
|
152
|
+
vcV2EducationDegree,
|
|
153
|
+
vcV2DigitalId,
|
|
154
|
+
vcV2MembershipCredential,
|
|
155
|
+
vcV2LicenseCredential,
|
|
156
|
+
clrGreatPlainsFull,
|
|
157
|
+
clrWestbridgeFull,
|
|
158
|
+
clrCompetencyAligned,
|
|
159
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UnsignedVCValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture, InvalidCredential } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const invalidEmptyType: CredentialFixture = {
|
|
6
|
+
id: 'invalid/empty-type',
|
|
7
|
+
name: 'Empty type Array',
|
|
8
|
+
description:
|
|
9
|
+
'Credential with an empty type array — should fail validation since type must be a non-empty array containing at least "VerifiableCredential"',
|
|
10
|
+
spec: 'vc-v2',
|
|
11
|
+
profile: 'generic',
|
|
12
|
+
features: [],
|
|
13
|
+
source: 'synthetic',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'invalid',
|
|
16
|
+
validator: UnsignedVCValidator,
|
|
17
|
+
tags: ['negative-test'],
|
|
18
|
+
|
|
19
|
+
credential: {
|
|
20
|
+
'@context': ['https://www.w3.org/ns/credentials/v2'],
|
|
21
|
+
id: 'urn:uuid:invalid-0002',
|
|
22
|
+
type: [],
|
|
23
|
+
issuer: 'did:example:issuer123',
|
|
24
|
+
validFrom: '2024-01-01T00:00:00Z',
|
|
25
|
+
credentialSubject: { id: 'did:example:subject456' },
|
|
26
|
+
} as InvalidCredential as any,
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UnsignedVCValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture, InvalidCredential } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const invalidMissingContext: CredentialFixture = {
|
|
6
|
+
id: 'invalid/missing-context',
|
|
7
|
+
name: 'Missing @context',
|
|
8
|
+
description:
|
|
9
|
+
'Credential with no @context array — should fail validation since @context is required by the VC Data Model',
|
|
10
|
+
spec: 'vc-v2',
|
|
11
|
+
profile: 'generic',
|
|
12
|
+
features: [],
|
|
13
|
+
source: 'synthetic',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'invalid',
|
|
16
|
+
validator: UnsignedVCValidator,
|
|
17
|
+
tags: ['negative-test'],
|
|
18
|
+
|
|
19
|
+
credential: {
|
|
20
|
+
// Intentionally missing '@context'
|
|
21
|
+
id: 'urn:uuid:invalid-0001',
|
|
22
|
+
type: ['VerifiableCredential'],
|
|
23
|
+
issuer: 'did:example:issuer123',
|
|
24
|
+
validFrom: '2024-01-01T00:00:00Z',
|
|
25
|
+
credentialSubject: { id: 'did:example:subject456' },
|
|
26
|
+
} as InvalidCredential as any,
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UnsignedVCValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture, InvalidCredential } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const invalidMissingIssuer: CredentialFixture = {
|
|
6
|
+
id: 'invalid/missing-issuer',
|
|
7
|
+
name: 'Missing Issuer',
|
|
8
|
+
description:
|
|
9
|
+
'Credential with no issuer field — should fail validation since issuer is required by the VC Data Model',
|
|
10
|
+
spec: 'vc-v2',
|
|
11
|
+
profile: 'generic',
|
|
12
|
+
features: [],
|
|
13
|
+
source: 'synthetic',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'invalid',
|
|
16
|
+
validator: UnsignedVCValidator,
|
|
17
|
+
tags: ['negative-test'],
|
|
18
|
+
|
|
19
|
+
credential: {
|
|
20
|
+
'@context': ['https://www.w3.org/ns/credentials/v2'],
|
|
21
|
+
id: 'urn:uuid:invalid-0003',
|
|
22
|
+
type: ['VerifiableCredential'],
|
|
23
|
+
// Intentionally missing 'issuer'
|
|
24
|
+
validFrom: '2024-01-01T00:00:00Z',
|
|
25
|
+
credentialSubject: { id: 'did:example:subject456' },
|
|
26
|
+
} as InvalidCredential as any,
|
|
27
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const obv3OneedtechFull: CredentialFixture = {
|
|
4
|
+
id: 'obv3/1edtech-full',
|
|
5
|
+
name: '1EdTech Complete OpenBadgeCredential',
|
|
6
|
+
description:
|
|
7
|
+
'The comprehensive OBv3 example from the 1EdTech specification, exercising nearly every optional field including endorsements, alignment, evidence, results, credential schema, status, and refresh service.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'badge',
|
|
10
|
+
features: [
|
|
11
|
+
'alignment',
|
|
12
|
+
'endorsement',
|
|
13
|
+
'expiration',
|
|
14
|
+
'status',
|
|
15
|
+
'image',
|
|
16
|
+
'results',
|
|
17
|
+
'source',
|
|
18
|
+
'credential-schema',
|
|
19
|
+
'refresh-service',
|
|
20
|
+
],
|
|
21
|
+
source: 'spec-example',
|
|
22
|
+
signed: false,
|
|
23
|
+
validity: 'valid',
|
|
24
|
+
tags: ['1edtech', 'obv3', 'spec-example', 'comprehensive'],
|
|
25
|
+
|
|
26
|
+
credential: {
|
|
27
|
+
'@context': [
|
|
28
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
29
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
30
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/extensions.json',
|
|
31
|
+
],
|
|
32
|
+
id: 'http://1edtech.edu/credentials/3732',
|
|
33
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
34
|
+
name: '1EdTech University Degree for Example Student',
|
|
35
|
+
description: '1EdTech University Degree Description',
|
|
36
|
+
image: {
|
|
37
|
+
id: 'https://1edtech.edu/credentials/3732/image',
|
|
38
|
+
type: 'Image',
|
|
39
|
+
caption: '1EdTech University Degree for Example Student',
|
|
40
|
+
},
|
|
41
|
+
credentialSubject: {
|
|
42
|
+
id: 'did:example:ebfeb1f712ebc6f1c276e12ec21',
|
|
43
|
+
type: ['AchievementSubject'],
|
|
44
|
+
activityEndDate: '2010-01-02T00:00:00Z',
|
|
45
|
+
activityStartDate: '2010-01-01T00:00:00Z',
|
|
46
|
+
creditsEarned: 42.0,
|
|
47
|
+
licenseNumber: 'A-9320041',
|
|
48
|
+
role: 'Major Domo',
|
|
49
|
+
source: {
|
|
50
|
+
id: 'https://school.edu/issuers/201234',
|
|
51
|
+
type: ['Profile'],
|
|
52
|
+
name: '1EdTech College of Arts',
|
|
53
|
+
},
|
|
54
|
+
term: 'Fall',
|
|
55
|
+
identifier: [
|
|
56
|
+
{
|
|
57
|
+
type: 'IdentityObject',
|
|
58
|
+
identityHash: 'student@1edtech.edu',
|
|
59
|
+
identityType: 'emailAddress',
|
|
60
|
+
hashed: false,
|
|
61
|
+
salt: 'not-used',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
achievement: {
|
|
65
|
+
id: 'https://1edtech.edu/achievements/degree',
|
|
66
|
+
type: ['Achievement'],
|
|
67
|
+
alignment: [
|
|
68
|
+
{
|
|
69
|
+
type: ['Alignment'],
|
|
70
|
+
targetCode: 'degree',
|
|
71
|
+
targetDescription: '1EdTech University Degree programs.',
|
|
72
|
+
targetName: '1EdTech University Degree',
|
|
73
|
+
targetFramework: '1EdTech University Program and Course Catalog',
|
|
74
|
+
targetType: 'CFItem',
|
|
75
|
+
targetUrl: 'https://1edtech.edu/catalog/degree',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: ['Alignment'],
|
|
79
|
+
targetCode: 'degree',
|
|
80
|
+
targetDescription: '1EdTech University Degree programs.',
|
|
81
|
+
targetName: '1EdTech University Degree',
|
|
82
|
+
targetFramework: '1EdTech University Program and Course Catalog',
|
|
83
|
+
targetType: 'CTDL',
|
|
84
|
+
targetUrl: 'https://credentialengineregistry.org/resources/ce-98cb027b-95ef-4494-908d-6f7790ec6b6b',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
achievementType: 'Degree',
|
|
88
|
+
creator: {
|
|
89
|
+
id: 'https://1edtech.edu/issuers/565049',
|
|
90
|
+
type: ['Profile'],
|
|
91
|
+
name: '1EdTech University',
|
|
92
|
+
url: 'https://1edtech.edu',
|
|
93
|
+
phone: '1-222-333-4444',
|
|
94
|
+
description: '1EdTech University provides online degree programs.',
|
|
95
|
+
image: {
|
|
96
|
+
id: 'https://1edtech.edu/logo.png',
|
|
97
|
+
type: 'Image',
|
|
98
|
+
caption: '1EdTech University logo',
|
|
99
|
+
},
|
|
100
|
+
email: 'registrar@1edtech.edu',
|
|
101
|
+
address: {
|
|
102
|
+
type: ['Address'],
|
|
103
|
+
addressCountry: 'USA',
|
|
104
|
+
addressCountryCode: 'US',
|
|
105
|
+
addressRegion: 'TX',
|
|
106
|
+
addressLocality: 'Austin',
|
|
107
|
+
streetAddress: '123 First St',
|
|
108
|
+
postOfficeBoxNumber: '1',
|
|
109
|
+
postalCode: '12345',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
criteria: {
|
|
113
|
+
id: 'https://1edtech.edu/achievements/degree',
|
|
114
|
+
narrative: 'Complete all required degree courses with a minimum GPA of 3.0.',
|
|
115
|
+
},
|
|
116
|
+
description: 'A four-year undergraduate degree from 1EdTech University.',
|
|
117
|
+
fieldOfStudy: 'Research',
|
|
118
|
+
humanCode: '1EdTech-DEGREE-001',
|
|
119
|
+
image: {
|
|
120
|
+
id: 'https://1edtech.edu/achievements/degree/image',
|
|
121
|
+
type: 'Image',
|
|
122
|
+
caption: '1EdTech University Degree',
|
|
123
|
+
},
|
|
124
|
+
name: '1EdTech University Degree',
|
|
125
|
+
otherIdentifier: [
|
|
126
|
+
{
|
|
127
|
+
type: 'IdentifierEntry',
|
|
128
|
+
identifier: '1EdTech-degree-001',
|
|
129
|
+
identifierType: 'identifier',
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
resultDescription: [
|
|
133
|
+
{
|
|
134
|
+
id: 'urn:uuid:f6ab2b98-0001-4000-8000-000000000001',
|
|
135
|
+
type: ['ResultDescription'],
|
|
136
|
+
alignment: [
|
|
137
|
+
{
|
|
138
|
+
type: ['Alignment'],
|
|
139
|
+
targetCode: 'project',
|
|
140
|
+
targetDescription: 'Project description',
|
|
141
|
+
targetName: 'Final Project Grade',
|
|
142
|
+
targetFramework: '1EdTech University Grading Policy',
|
|
143
|
+
targetType: 'CFItem',
|
|
144
|
+
targetUrl: 'https://1edtech.edu/catalog/degree/project-grade',
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
allowedValue: ['A', 'B', 'C', 'D', 'F'],
|
|
148
|
+
name: 'Final Project Grade',
|
|
149
|
+
requiredValue: 'C',
|
|
150
|
+
resultType: 'LetterGrade',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: 'urn:uuid:f6ab2b98-0001-4000-8000-000000000002',
|
|
154
|
+
type: ['ResultDescription'],
|
|
155
|
+
alignment: [
|
|
156
|
+
{
|
|
157
|
+
type: ['Alignment'],
|
|
158
|
+
targetCode: 'gpa',
|
|
159
|
+
targetDescription: 'Overall GPA',
|
|
160
|
+
targetName: 'GPA',
|
|
161
|
+
targetFramework: '1EdTech University Grading Policy',
|
|
162
|
+
targetType: 'CFItem',
|
|
163
|
+
targetUrl: 'https://1edtech.edu/catalog/degree/gpa',
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
allowedValue: ['3.0', '4.0'],
|
|
167
|
+
name: 'GPA',
|
|
168
|
+
requiredLevel: 'https://1edtech.edu/policy/gpa-minimum',
|
|
169
|
+
resultType: 'GPA',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'urn:uuid:f6ab2b98-0001-4000-8000-000000000003',
|
|
173
|
+
type: ['ResultDescription'],
|
|
174
|
+
name: 'Status',
|
|
175
|
+
resultType: 'Status',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
specialization: 'Computer Science',
|
|
179
|
+
tag: ['research', 'computer-science'],
|
|
180
|
+
},
|
|
181
|
+
result: [
|
|
182
|
+
{
|
|
183
|
+
type: ['Result'],
|
|
184
|
+
resultDescription: 'urn:uuid:f6ab2b98-0001-4000-8000-000000000001',
|
|
185
|
+
value: 'A',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: ['Result'],
|
|
189
|
+
resultDescription: 'urn:uuid:f6ab2b98-0001-4000-8000-000000000002',
|
|
190
|
+
value: '3.8',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
type: ['Result'],
|
|
194
|
+
resultDescription: 'urn:uuid:f6ab2b98-0001-4000-8000-000000000003',
|
|
195
|
+
status: 'Completed',
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
issuer: {
|
|
200
|
+
id: 'https://1edtech.edu/issuers/565049',
|
|
201
|
+
type: ['Profile'],
|
|
202
|
+
name: '1EdTech University',
|
|
203
|
+
url: 'https://1edtech.edu',
|
|
204
|
+
phone: '1-222-333-4444',
|
|
205
|
+
description: '1EdTech University provides online degree programs.',
|
|
206
|
+
image: {
|
|
207
|
+
id: 'https://1edtech.edu/logo.png',
|
|
208
|
+
type: 'Image',
|
|
209
|
+
caption: '1EdTech University logo',
|
|
210
|
+
},
|
|
211
|
+
email: 'registrar@1edtech.edu',
|
|
212
|
+
},
|
|
213
|
+
validFrom: '2010-01-01T00:00:00Z',
|
|
214
|
+
validUntil: '2030-01-01T00:00:00Z',
|
|
215
|
+
credentialSchema: [
|
|
216
|
+
{
|
|
217
|
+
id: 'https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json',
|
|
218
|
+
type: '1EdTechJsonSchemaValidator2019',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
credentialStatus: {
|
|
222
|
+
id: 'https://1edtech.edu/credentials/3732/revocations',
|
|
223
|
+
type: '1EdTechRevocationList',
|
|
224
|
+
},
|
|
225
|
+
refreshService: {
|
|
226
|
+
id: 'http://1edtech.edu/credentials/3732',
|
|
227
|
+
type: '1EdTechCredentialRefresh',
|
|
228
|
+
},
|
|
229
|
+
evidence: [
|
|
230
|
+
{
|
|
231
|
+
id: 'https://1edtech.edu/credentials/3732/evidence/1',
|
|
232
|
+
type: ['Evidence'],
|
|
233
|
+
narrative: 'Student demonstrated mastery through coursework, exams, and a capstone project.',
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const obv3CourseCompletion: CredentialFixture = {
|
|
4
|
+
id: 'obv3/course-completion',
|
|
5
|
+
name: 'Introduction to Machine Learning Course Completion',
|
|
6
|
+
description:
|
|
7
|
+
'An online course completion badge from a MOOC platform, representing a common real-world use case for OBv3 credentials in online education.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'course',
|
|
10
|
+
features: ['image', 'evidence'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['course', 'mooc', 'machine-learning', 'online-education'],
|
|
15
|
+
|
|
16
|
+
credential: {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
id: 'urn:uuid:a5f3e2c1-8d4b-47f0-b293-1e4a6f8c9d02',
|
|
22
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
name: 'Introduction to Machine Learning',
|
|
24
|
+
description:
|
|
25
|
+
'Successfully completed the Introduction to Machine Learning course, covering supervised learning, unsupervised learning, neural networks, and model evaluation.',
|
|
26
|
+
image: {
|
|
27
|
+
id: 'https://learn-platform-example.com/badges/intro-ml.png',
|
|
28
|
+
type: 'Image',
|
|
29
|
+
caption: 'Introduction to Machine Learning completion badge',
|
|
30
|
+
},
|
|
31
|
+
credentialSubject: {
|
|
32
|
+
id: 'did:example:learner-ml-042',
|
|
33
|
+
type: ['AchievementSubject'],
|
|
34
|
+
achievement: {
|
|
35
|
+
id: 'https://learn-platform-example.com/courses/intro-ml',
|
|
36
|
+
type: ['Achievement'],
|
|
37
|
+
achievementType: 'Course',
|
|
38
|
+
name: 'Introduction to Machine Learning',
|
|
39
|
+
description:
|
|
40
|
+
'A 10-week course covering the fundamentals of machine learning, including linear regression, classification, clustering, dimensionality reduction, and neural networks. Includes hands-on coding assignments in Python using scikit-learn and TensorFlow.',
|
|
41
|
+
criteria: {
|
|
42
|
+
id: 'https://learn-platform-example.com/courses/intro-ml/criteria',
|
|
43
|
+
narrative:
|
|
44
|
+
'Complete all 10 weekly modules, pass each quiz with 80% or higher, and submit 3 coding assignments with a passing grade.',
|
|
45
|
+
},
|
|
46
|
+
image: {
|
|
47
|
+
id: 'https://learn-platform-example.com/badges/intro-ml.png',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Intro to ML badge',
|
|
50
|
+
},
|
|
51
|
+
creator: {
|
|
52
|
+
id: 'https://learn-platform-example.com/issuers/platform',
|
|
53
|
+
type: ['Profile'],
|
|
54
|
+
name: 'LearnPlatform Online Education',
|
|
55
|
+
url: 'https://learn-platform-example.com',
|
|
56
|
+
description: 'An online learning platform offering courses in technology, data science, and business.',
|
|
57
|
+
},
|
|
58
|
+
tag: ['machine-learning', 'python', 'data-science', 'artificial-intelligence'],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
issuer: {
|
|
62
|
+
id: 'did:web:learn-platform-example.com',
|
|
63
|
+
type: ['Profile'],
|
|
64
|
+
name: 'LearnPlatform Online Education',
|
|
65
|
+
url: 'https://learn-platform-example.com',
|
|
66
|
+
image: {
|
|
67
|
+
id: 'https://learn-platform-example.com/logo.png',
|
|
68
|
+
type: 'Image',
|
|
69
|
+
caption: 'LearnPlatform logo',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
validFrom: '2025-01-20T00:00:00Z',
|
|
73
|
+
evidence: [
|
|
74
|
+
{
|
|
75
|
+
id: 'https://learn-platform-example.com/evidence/learner-ml-042/intro-ml',
|
|
76
|
+
type: ['Evidence'],
|
|
77
|
+
narrative:
|
|
78
|
+
'Learner completed all 10 modules, achieved an average quiz score of 94%, and submitted all 3 coding assignments with passing grades. Final project: built a sentiment analysis classifier using scikit-learn achieving 91% accuracy on test data.',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const obv3EndorsementCredential: CredentialFixture = {
|
|
4
|
+
id: 'obv3/endorsement-credential',
|
|
5
|
+
name: 'Program Accreditation Endorsement',
|
|
6
|
+
description:
|
|
7
|
+
'An OBv3 EndorsementCredential where an accrediting body endorses a university program. Represents the real-world accreditation pattern in higher education.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'endorsement',
|
|
10
|
+
features: ['endorsement', 'expiration', 'credential-schema', 'status'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['endorsement', 'accreditation', 'higher-education', 'quality-assurance'],
|
|
15
|
+
|
|
16
|
+
credential: {
|
|
17
|
+
'@context': [
|
|
18
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
19
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
20
|
+
],
|
|
21
|
+
id: 'urn:uuid:a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d',
|
|
22
|
+
type: ['VerifiableCredential', 'EndorsementCredential'],
|
|
23
|
+
name: 'ABET Accreditation – Computer Science Program',
|
|
24
|
+
description:
|
|
25
|
+
'Endorsement certifying that the Computer Science program at Pacific Coast University meets the quality standards set by the Accreditation Board for Engineering and Technology (ABET).',
|
|
26
|
+
credentialSubject: {
|
|
27
|
+
id: 'https://pcu-example.edu/programs/bs-cs',
|
|
28
|
+
type: ['EndorsementSubject'],
|
|
29
|
+
endorsementComment:
|
|
30
|
+
'The Computer Science program at Pacific Coast University has been evaluated and found to meet or exceed all criteria for accreditation. The program demonstrates strong student outcomes, qualified faculty, continuous improvement processes, and adequate institutional support.',
|
|
31
|
+
},
|
|
32
|
+
issuer: {
|
|
33
|
+
id: 'did:web:abet-example.org',
|
|
34
|
+
type: ['Profile'],
|
|
35
|
+
name: 'Accreditation Board for Engineering and Technology (ABET)',
|
|
36
|
+
url: 'https://abet-example.org',
|
|
37
|
+
description:
|
|
38
|
+
'ABET accredits college and university programs in the disciplines of applied and natural science, computing, engineering, and engineering technology.',
|
|
39
|
+
image: {
|
|
40
|
+
id: 'https://abet-example.org/logo.png',
|
|
41
|
+
type: 'Image',
|
|
42
|
+
caption: 'ABET logo',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
validFrom: '2023-10-01T00:00:00Z',
|
|
46
|
+
validUntil: '2029-10-01T00:00:00Z',
|
|
47
|
+
credentialSchema: [
|
|
48
|
+
{
|
|
49
|
+
id: 'https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_endorsementcredential_schema.json',
|
|
50
|
+
type: '1EdTechJsonSchemaValidator2019',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
credentialStatus: {
|
|
54
|
+
id: 'https://abet-example.org/credentials/status/2023/1',
|
|
55
|
+
type: '1EdTechRevocationList',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|