@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,121 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const obv3FullBadge: CredentialFixture = {
|
|
6
|
+
id: 'obv3/full-badge',
|
|
7
|
+
name: 'Full-Featured OBv3 Badge',
|
|
8
|
+
description:
|
|
9
|
+
'Open Badges v3 credential exercising most optional fields: image, evidence, alignment, results, rich issuer profile, expiration',
|
|
10
|
+
spec: 'obv3',
|
|
11
|
+
profile: 'badge',
|
|
12
|
+
features: ['image', 'evidence', 'alignment', 'results', 'expiration'],
|
|
13
|
+
source: 'synthetic',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'valid',
|
|
16
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
17
|
+
tags: ['comprehensive'],
|
|
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:b2c3d4e5-0002-4000-8000-000000000001',
|
|
25
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
26
|
+
name: 'Advanced Web Development',
|
|
27
|
+
description: 'Demonstrates mastery of modern web development frameworks and tooling.',
|
|
28
|
+
image: {
|
|
29
|
+
id: 'https://example.com/badges/webdev.png',
|
|
30
|
+
type: 'Image',
|
|
31
|
+
caption: 'Advanced Web Development Badge',
|
|
32
|
+
},
|
|
33
|
+
issuer: {
|
|
34
|
+
id: 'did:example:issuer123',
|
|
35
|
+
type: ['Profile'],
|
|
36
|
+
name: 'Tech Academy',
|
|
37
|
+
url: 'https://techacademy.example.com',
|
|
38
|
+
image: {
|
|
39
|
+
id: 'https://techacademy.example.com/logo.png',
|
|
40
|
+
type: 'Image',
|
|
41
|
+
},
|
|
42
|
+
email: 'badges@techacademy.example.com',
|
|
43
|
+
},
|
|
44
|
+
validFrom: '2024-03-01T00:00:00Z',
|
|
45
|
+
validUntil: '2027-03-01T00:00:00Z',
|
|
46
|
+
credentialSubject: {
|
|
47
|
+
id: 'did:example:student789',
|
|
48
|
+
type: ['AchievementSubject'],
|
|
49
|
+
activityStartDate: '2024-01-15T00:00:00Z',
|
|
50
|
+
activityEndDate: '2024-02-28T00:00:00Z',
|
|
51
|
+
creditsEarned: 3,
|
|
52
|
+
achievement: {
|
|
53
|
+
id: 'urn:uuid:b2c3d4e5-0002-4000-8000-000000000002',
|
|
54
|
+
type: ['Achievement'],
|
|
55
|
+
achievementType: 'Certificate',
|
|
56
|
+
name: 'Advanced Web Development',
|
|
57
|
+
description:
|
|
58
|
+
'Covers React, TypeScript, Node.js, and modern deployment pipelines.',
|
|
59
|
+
humanCode: 'WEB-401',
|
|
60
|
+
fieldOfStudy: 'Computer Science',
|
|
61
|
+
creditsAvailable: 3,
|
|
62
|
+
criteria: {
|
|
63
|
+
id: 'https://techacademy.example.com/criteria/web401',
|
|
64
|
+
narrative:
|
|
65
|
+
'Complete all 12 modules, pass the final project with 80%+, and submit a capstone portfolio.',
|
|
66
|
+
},
|
|
67
|
+
image: {
|
|
68
|
+
id: 'https://example.com/badges/webdev.png',
|
|
69
|
+
type: 'Image',
|
|
70
|
+
},
|
|
71
|
+
alignment: [
|
|
72
|
+
{
|
|
73
|
+
type: ['Alignment'],
|
|
74
|
+
targetName: 'Web Application Development',
|
|
75
|
+
targetUrl: 'https://credentialfinder.org/competency/12345',
|
|
76
|
+
targetType: 'ceasn:Competency',
|
|
77
|
+
targetFramework: 'NICE Cybersecurity Workforce Framework',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
resultDescription: [
|
|
81
|
+
{
|
|
82
|
+
id: 'urn:uuid:b2c3d4e5-0002-4000-8000-000000000003',
|
|
83
|
+
type: ['ResultDescription'],
|
|
84
|
+
name: 'Final Project Score',
|
|
85
|
+
resultType: 'Percent',
|
|
86
|
+
valueMin: '0',
|
|
87
|
+
valueMax: '100',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: 'urn:uuid:b2c3d4e5-0002-4000-8000-000000000004',
|
|
91
|
+
type: ['ResultDescription'],
|
|
92
|
+
name: 'Completion Status',
|
|
93
|
+
resultType: 'Status',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
tag: ['web-development', 'react', 'typescript', 'nodejs'],
|
|
97
|
+
},
|
|
98
|
+
result: [
|
|
99
|
+
{
|
|
100
|
+
type: ['Result'],
|
|
101
|
+
resultDescription: 'urn:uuid:b2c3d4e5-0002-4000-8000-000000000003',
|
|
102
|
+
value: '92',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: ['Result'],
|
|
106
|
+
resultDescription: 'urn:uuid:b2c3d4e5-0002-4000-8000-000000000004',
|
|
107
|
+
status: 'Completed',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
evidence: [
|
|
112
|
+
{
|
|
113
|
+
type: ['Evidence'],
|
|
114
|
+
id: 'https://techacademy.example.com/evidence/student789/capstone',
|
|
115
|
+
name: 'Capstone Portfolio',
|
|
116
|
+
description: 'Student capstone portfolio demonstrating applied web development skills.',
|
|
117
|
+
narrative: 'Reviewed and approved by course instructor on 2024-02-28.',
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const obv3K12Diploma: CredentialFixture = {
|
|
4
|
+
id: 'obv3/k12-diploma',
|
|
5
|
+
name: 'High School Diploma',
|
|
6
|
+
description:
|
|
7
|
+
'An OBv3 high school diploma credential modeled after K-12 digital credential initiatives, with alignment to state standards.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'diploma',
|
|
10
|
+
features: ['alignment', 'image'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['k12', 'diploma', 'high-school', '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:c2e9f4a7-1d83-4b56-a0e2-7f3c8d9b1e64',
|
|
22
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
name: 'Lincoln High School Diploma',
|
|
24
|
+
description:
|
|
25
|
+
'Conferred upon successful completion of all requirements for graduation from Lincoln High School, Class of 2025.',
|
|
26
|
+
image: {
|
|
27
|
+
id: 'https://lincoln-hs-example.edu/badges/diploma-2025.png',
|
|
28
|
+
type: 'Image',
|
|
29
|
+
caption: 'Lincoln High School Class of 2025 Diploma',
|
|
30
|
+
},
|
|
31
|
+
credentialSubject: {
|
|
32
|
+
id: 'did:example:student-lhs-2025-0342',
|
|
33
|
+
type: ['AchievementSubject'],
|
|
34
|
+
achievement: {
|
|
35
|
+
id: 'https://lincoln-hs-example.edu/achievements/diploma-2025',
|
|
36
|
+
type: ['Achievement'],
|
|
37
|
+
achievementType: 'Diploma',
|
|
38
|
+
name: 'High School Diploma',
|
|
39
|
+
description:
|
|
40
|
+
'Awarded upon completion of all state-required credits (24 credits minimum), including 4 years of English, 3 years of Mathematics through Algebra II, 3 years of Science, 3 years of Social Studies, 2 years of World Language, and required electives.',
|
|
41
|
+
criteria: {
|
|
42
|
+
id: 'https://lincoln-hs-example.edu/achievements/diploma-2025/criteria',
|
|
43
|
+
narrative:
|
|
44
|
+
'Complete minimum 24 credits across required subject areas, maintain cumulative GPA of 2.0 or higher, complete 40 hours of community service, and pass all state-mandated assessments.',
|
|
45
|
+
},
|
|
46
|
+
image: {
|
|
47
|
+
id: 'https://lincoln-hs-example.edu/badges/diploma-seal.png',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Lincoln High School diploma seal',
|
|
50
|
+
},
|
|
51
|
+
creator: {
|
|
52
|
+
id: 'https://lincoln-hs-example.edu/issuers/1',
|
|
53
|
+
type: ['Profile'],
|
|
54
|
+
name: 'Lincoln High School',
|
|
55
|
+
url: 'https://lincoln-hs-example.edu',
|
|
56
|
+
description: 'A public high school in Springfield serving grades 9-12.',
|
|
57
|
+
address: {
|
|
58
|
+
type: ['Address'],
|
|
59
|
+
addressCountry: 'USA',
|
|
60
|
+
addressRegion: 'IL',
|
|
61
|
+
addressLocality: 'Springfield',
|
|
62
|
+
streetAddress: '1000 Lincoln Blvd',
|
|
63
|
+
postalCode: '62701',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
alignment: [
|
|
67
|
+
{
|
|
68
|
+
type: ['Alignment'],
|
|
69
|
+
targetName: 'Illinois High School Graduation Requirements',
|
|
70
|
+
targetUrl: 'https://isbe.net-example.gov/graduation-requirements',
|
|
71
|
+
targetDescription:
|
|
72
|
+
'State of Illinois minimum requirements for high school graduation, including required courses, assessments, and credit hours.',
|
|
73
|
+
targetFramework: 'Illinois State Board of Education Standards',
|
|
74
|
+
targetType: 'CFItem',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
issuer: {
|
|
80
|
+
id: 'did:web:lincoln-hs-example.edu',
|
|
81
|
+
type: ['Profile'],
|
|
82
|
+
name: 'Lincoln High School',
|
|
83
|
+
url: 'https://lincoln-hs-example.edu',
|
|
84
|
+
image: {
|
|
85
|
+
id: 'https://lincoln-hs-example.edu/logo.png',
|
|
86
|
+
type: 'Image',
|
|
87
|
+
caption: 'Lincoln High School logo',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
validFrom: '2025-06-07T14:00:00Z',
|
|
91
|
+
},
|
|
92
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const obv3MicroCredential: CredentialFixture = {
|
|
4
|
+
id: 'obv3/micro-credential',
|
|
5
|
+
name: 'Data Science Fundamentals Micro-credential',
|
|
6
|
+
description:
|
|
7
|
+
'A stackable micro-credential for completing a data science fundamentals course, with results and skills alignment. Modeled after real university continuing education programs.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'micro-credential',
|
|
10
|
+
features: ['alignment', 'results', 'image', 'skills'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['micro-credential', 'data-science', 'education', 'stackable', 'continuing-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:91c82a75-7b2d-4e38-a5d3-78f0c2e9a16b',
|
|
22
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
name: 'Data Science Fundamentals',
|
|
24
|
+
description:
|
|
25
|
+
'Awarded for successful completion of the Data Science Fundamentals micro-credential program, demonstrating competency in statistical analysis, data visualization, and introductory machine learning.',
|
|
26
|
+
image: {
|
|
27
|
+
id: 'https://university-example.edu/badges/data-science-fundamentals.png',
|
|
28
|
+
type: 'Image',
|
|
29
|
+
caption: 'Data Science Fundamentals micro-credential badge',
|
|
30
|
+
},
|
|
31
|
+
credentialSubject: {
|
|
32
|
+
id: 'did:example:learner-ds-001',
|
|
33
|
+
type: ['AchievementSubject'],
|
|
34
|
+
achievement: {
|
|
35
|
+
id: 'https://university-example.edu/achievements/data-science-fundamentals',
|
|
36
|
+
type: ['Achievement'],
|
|
37
|
+
achievementType: 'MicroCredential',
|
|
38
|
+
name: 'Data Science Fundamentals',
|
|
39
|
+
description:
|
|
40
|
+
'A 120-hour micro-credential covering statistical analysis, data visualization with Python, SQL for data analysis, and introductory machine learning concepts. Part of the Data Science Professional Certificate pathway.',
|
|
41
|
+
criteria: {
|
|
42
|
+
id: 'https://university-example.edu/achievements/data-science-fundamentals/criteria',
|
|
43
|
+
narrative:
|
|
44
|
+
'Complete all four course modules (Statistics, Data Visualization, SQL, Intro ML) with a passing grade of 70% or higher on each module assessment, and submit a capstone data analysis project.',
|
|
45
|
+
},
|
|
46
|
+
image: {
|
|
47
|
+
id: 'https://university-example.edu/badges/data-science-fundamentals.png',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Data Science Fundamentals badge',
|
|
50
|
+
},
|
|
51
|
+
creator: {
|
|
52
|
+
id: 'https://university-example.edu/issuers/continuing-ed',
|
|
53
|
+
type: ['Profile'],
|
|
54
|
+
name: 'State University Continuing Education',
|
|
55
|
+
url: 'https://university-example.edu/continuing-ed',
|
|
56
|
+
description:
|
|
57
|
+
'The continuing education division of State University offers professional development and micro-credential programs.',
|
|
58
|
+
},
|
|
59
|
+
alignment: [
|
|
60
|
+
{
|
|
61
|
+
type: ['Alignment'],
|
|
62
|
+
targetName: 'Data Science Practices',
|
|
63
|
+
targetUrl: 'https://credentialengineregistry.org/resources/ce-ds-practices-001',
|
|
64
|
+
targetDescription:
|
|
65
|
+
'Apply data science techniques to collect, clean, analyze, and visualize data for decision-making.',
|
|
66
|
+
targetFramework: 'Credential Engine Data Science Competency Framework',
|
|
67
|
+
targetType: 'CTDL',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: ['Alignment'],
|
|
71
|
+
targetName: 'Data Science',
|
|
72
|
+
targetUrl: 'https://nces.ed.gov/ipeds/cipcode/cipdetail.aspx?y=56&cipid=91995',
|
|
73
|
+
targetDescription: 'CIP Code 30.7001 – Data Science',
|
|
74
|
+
targetFramework: 'Classification of Instructional Programs (CIP)',
|
|
75
|
+
targetType: 'CFItem',
|
|
76
|
+
targetCode: '30.7001',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
resultDescription: [
|
|
80
|
+
{
|
|
81
|
+
id: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000001',
|
|
82
|
+
type: ['ResultDescription'],
|
|
83
|
+
name: 'Statistics Module',
|
|
84
|
+
resultType: 'LetterGrade',
|
|
85
|
+
allowedValue: ['A', 'B', 'C', 'D', 'F'],
|
|
86
|
+
requiredValue: 'C',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000002',
|
|
90
|
+
type: ['ResultDescription'],
|
|
91
|
+
name: 'Data Visualization Module',
|
|
92
|
+
resultType: 'LetterGrade',
|
|
93
|
+
allowedValue: ['A', 'B', 'C', 'D', 'F'],
|
|
94
|
+
requiredValue: 'C',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000003',
|
|
98
|
+
type: ['ResultDescription'],
|
|
99
|
+
name: 'SQL Module',
|
|
100
|
+
resultType: 'LetterGrade',
|
|
101
|
+
allowedValue: ['A', 'B', 'C', 'D', 'F'],
|
|
102
|
+
requiredValue: 'C',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000004',
|
|
106
|
+
type: ['ResultDescription'],
|
|
107
|
+
name: 'Intro ML Module',
|
|
108
|
+
resultType: 'LetterGrade',
|
|
109
|
+
allowedValue: ['A', 'B', 'C', 'D', 'F'],
|
|
110
|
+
requiredValue: 'C',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000005',
|
|
114
|
+
type: ['ResultDescription'],
|
|
115
|
+
name: 'Capstone Project',
|
|
116
|
+
resultType: 'Status',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
tag: [
|
|
120
|
+
'data-science',
|
|
121
|
+
'statistics',
|
|
122
|
+
'python',
|
|
123
|
+
'sql',
|
|
124
|
+
'machine-learning',
|
|
125
|
+
'data-visualization',
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
result: [
|
|
129
|
+
{
|
|
130
|
+
type: ['Result'],
|
|
131
|
+
resultDescription: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000001',
|
|
132
|
+
value: 'A',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: ['Result'],
|
|
136
|
+
resultDescription: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000002',
|
|
137
|
+
value: 'B',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: ['Result'],
|
|
141
|
+
resultDescription: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000003',
|
|
142
|
+
value: 'A',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: ['Result'],
|
|
146
|
+
resultDescription: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000004',
|
|
147
|
+
value: 'B',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: ['Result'],
|
|
151
|
+
resultDescription: 'urn:uuid:c4e7d3a0-0001-4000-8000-000000000005',
|
|
152
|
+
status: 'Completed',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
issuer: {
|
|
157
|
+
id: 'did:web:university-example.edu',
|
|
158
|
+
type: ['Profile'],
|
|
159
|
+
name: 'State University',
|
|
160
|
+
url: 'https://university-example.edu',
|
|
161
|
+
description: 'A public research university offering undergraduate, graduate, and continuing education programs.',
|
|
162
|
+
image: {
|
|
163
|
+
id: 'https://university-example.edu/logo.png',
|
|
164
|
+
type: 'Image',
|
|
165
|
+
caption: 'State University logo',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
validFrom: '2024-12-15T00:00:00Z',
|
|
169
|
+
},
|
|
170
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const obv3MinimalBadge: CredentialFixture = {
|
|
6
|
+
id: 'obv3/minimal-badge',
|
|
7
|
+
name: 'Minimal OBv3 Badge',
|
|
8
|
+
description:
|
|
9
|
+
'Open Badges v3 achievement credential with only required fields per the 1EdTech spec',
|
|
10
|
+
spec: 'obv3',
|
|
11
|
+
profile: 'badge',
|
|
12
|
+
features: [],
|
|
13
|
+
source: 'spec-example',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'valid',
|
|
16
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
17
|
+
|
|
18
|
+
credential: {
|
|
19
|
+
'@context': [
|
|
20
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
21
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
22
|
+
],
|
|
23
|
+
id: 'urn:uuid:a1b2c3d4-0001-4000-8000-000000000001',
|
|
24
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
25
|
+
issuer: { id: 'did:example:issuer123' },
|
|
26
|
+
validFrom: '2024-01-01T00:00:00Z',
|
|
27
|
+
name: 'Minimal Badge',
|
|
28
|
+
credentialSubject: {
|
|
29
|
+
id: 'did:example:subject456',
|
|
30
|
+
type: ['AchievementSubject'],
|
|
31
|
+
achievement: {
|
|
32
|
+
id: 'urn:uuid:a1b2c3d4-0001-4000-8000-000000000002',
|
|
33
|
+
type: ['Achievement'],
|
|
34
|
+
name: 'Participation',
|
|
35
|
+
description: 'Awarded for attending the event.',
|
|
36
|
+
criteria: { narrative: 'Must attend the event.' },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const obv3PlugfestJff2: CredentialFixture = {
|
|
6
|
+
id: 'obv3/plugfest-jff2',
|
|
7
|
+
name: 'JFF x vc-edu PlugFest 2 Interoperability Badge',
|
|
8
|
+
description:
|
|
9
|
+
'Real-world OBv3 credential from the JFF PlugFest 2 interoperability event, demonstrating cross-wallet compatibility',
|
|
10
|
+
spec: 'obv3',
|
|
11
|
+
profile: 'badge',
|
|
12
|
+
features: ['image'],
|
|
13
|
+
source: 'plugfest',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'valid',
|
|
16
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
17
|
+
tags: ['jff', 'interop', 'plugfest'],
|
|
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:d4e5f6a7-0004-4000-8000-000000000001',
|
|
25
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
26
|
+
name: 'JFF x vc-edu PlugFest 2 Interoperability',
|
|
27
|
+
issuer: {
|
|
28
|
+
type: ['Profile'],
|
|
29
|
+
id: 'did:example:jff',
|
|
30
|
+
name: 'Jobs for the Future (JFF)',
|
|
31
|
+
image: {
|
|
32
|
+
id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',
|
|
33
|
+
type: 'Image',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
validFrom: '2023-01-01T00:00:00Z',
|
|
37
|
+
credentialSubject: {
|
|
38
|
+
type: ['AchievementSubject'],
|
|
39
|
+
id: 'did:example:subject456',
|
|
40
|
+
achievement: {
|
|
41
|
+
id: 'urn:uuid:d4e5f6a7-0004-4000-8000-000000000002',
|
|
42
|
+
type: ['Achievement'],
|
|
43
|
+
name: 'JFF x vc-edu PlugFest 2 Interoperability',
|
|
44
|
+
description:
|
|
45
|
+
'This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.',
|
|
46
|
+
criteria: {
|
|
47
|
+
narrative:
|
|
48
|
+
'Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers.',
|
|
49
|
+
},
|
|
50
|
+
image: {
|
|
51
|
+
id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',
|
|
52
|
+
type: 'Image',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const obv3ProfessionalCert: CredentialFixture = {
|
|
4
|
+
id: 'obv3/professional-cert',
|
|
5
|
+
name: 'AWS Solutions Architect Professional Certification',
|
|
6
|
+
description:
|
|
7
|
+
'A professional cloud certification credential modeled after real-world IT certifications, with expiration, alignment to industry frameworks, and credential schema.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'certificate',
|
|
10
|
+
features: ['expiration', 'alignment', 'image', 'credential-schema'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['professional', 'certification', 'cloud', 'aws', 'it'],
|
|
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:b34ca6cd-29d7-4b2f-9e99-4902fd84c5a1',
|
|
22
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
name: 'AWS Certified Solutions Architect – Professional',
|
|
24
|
+
description:
|
|
25
|
+
'Validates advanced technical skills and experience in designing distributed applications and systems on the AWS platform.',
|
|
26
|
+
image: {
|
|
27
|
+
id: 'https://example-training.com/badges/aws-sa-pro.png',
|
|
28
|
+
type: 'Image',
|
|
29
|
+
caption: 'AWS Solutions Architect Professional badge',
|
|
30
|
+
},
|
|
31
|
+
credentialSubject: {
|
|
32
|
+
id: 'did:example:holder-aws-cert-001',
|
|
33
|
+
type: ['AchievementSubject'],
|
|
34
|
+
achievement: {
|
|
35
|
+
id: 'https://example-training.com/achievements/aws-sa-pro',
|
|
36
|
+
type: ['Achievement'],
|
|
37
|
+
achievementType: 'Certification',
|
|
38
|
+
name: 'AWS Certified Solutions Architect – Professional',
|
|
39
|
+
description:
|
|
40
|
+
'The AWS Certified Solutions Architect – Professional exam validates advanced technical skills and experience in designing distributed applications and systems on the AWS platform. Earning this certification demonstrates the ability to design and deploy dynamically scalable, highly available, fault-tolerant, and reliable applications.',
|
|
41
|
+
criteria: {
|
|
42
|
+
id: 'https://example-training.com/achievements/aws-sa-pro/criteria',
|
|
43
|
+
narrative:
|
|
44
|
+
'Pass the AWS Certified Solutions Architect – Professional exam (SAP-C02) with a score of 750/1000 or higher. Prerequisite: AWS Certified Solutions Architect – Associate or 2+ years hands-on experience.',
|
|
45
|
+
},
|
|
46
|
+
image: {
|
|
47
|
+
id: 'https://example-training.com/badges/aws-sa-pro.png',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'AWS Solutions Architect Professional badge',
|
|
50
|
+
},
|
|
51
|
+
creator: {
|
|
52
|
+
id: 'https://example-training.com/issuers/1',
|
|
53
|
+
type: ['Profile'],
|
|
54
|
+
name: 'Example Cloud Training & Certification',
|
|
55
|
+
url: 'https://example-training.com',
|
|
56
|
+
description:
|
|
57
|
+
'Global leader in cloud computing training and professional certifications.',
|
|
58
|
+
},
|
|
59
|
+
alignment: [
|
|
60
|
+
{
|
|
61
|
+
type: ['Alignment'],
|
|
62
|
+
targetName: 'Cloud Solutions Architect',
|
|
63
|
+
targetUrl: 'https://credentialengineregistry.org/resources/ce-cloud-arch-001',
|
|
64
|
+
targetDescription:
|
|
65
|
+
'Design and implement cloud infrastructure solutions that meet business requirements.',
|
|
66
|
+
targetFramework: 'Credential Engine Cloud Computing Competency Framework',
|
|
67
|
+
targetType: 'CTDL',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: ['Alignment'],
|
|
71
|
+
targetName: 'Information Technology – Cloud Computing',
|
|
72
|
+
targetUrl: 'https://nces.ed.gov/ipeds/cipcode/cipdetail.aspx?y=56&cipid=91456',
|
|
73
|
+
targetDescription: 'CIP Code 11.0902 – Cloud Computing',
|
|
74
|
+
targetFramework: 'Classification of Instructional Programs (CIP)',
|
|
75
|
+
targetType: 'CFItem',
|
|
76
|
+
targetCode: '11.0902',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
tag: ['cloud', 'aws', 'architecture', 'infrastructure', 'professional'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
issuer: {
|
|
83
|
+
id: 'did:web:example-training.com',
|
|
84
|
+
type: ['Profile'],
|
|
85
|
+
name: 'Example Cloud Training & Certification',
|
|
86
|
+
url: 'https://example-training.com',
|
|
87
|
+
image: {
|
|
88
|
+
id: 'https://example-training.com/logo.png',
|
|
89
|
+
type: 'Image',
|
|
90
|
+
caption: 'Example Cloud Training logo',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
validFrom: '2024-03-15T00:00:00Z',
|
|
94
|
+
validUntil: '2027-03-15T00:00:00Z',
|
|
95
|
+
credentialSchema: [
|
|
96
|
+
{
|
|
97
|
+
id: 'https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json',
|
|
98
|
+
type: '1EdTechJsonSchemaValidator2019',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const obv3WithAlignment: CredentialFixture = {
|
|
6
|
+
id: 'obv3/with-alignment',
|
|
7
|
+
name: 'OBv3 Badge with Competency Alignments',
|
|
8
|
+
description:
|
|
9
|
+
'Open Badges v3 credential with alignment to external competency frameworks (CTDL, CASE)',
|
|
10
|
+
spec: 'obv3',
|
|
11
|
+
profile: 'badge',
|
|
12
|
+
features: ['alignment'],
|
|
13
|
+
source: 'synthetic',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'valid',
|
|
16
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
17
|
+
|
|
18
|
+
credential: {
|
|
19
|
+
'@context': [
|
|
20
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
21
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
22
|
+
],
|
|
23
|
+
id: 'urn:uuid:e5f6a7b8-0005-4000-8000-000000000001',
|
|
24
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
25
|
+
name: 'Data Science Fundamentals',
|
|
26
|
+
issuer: { id: 'did:example:datauniversity' },
|
|
27
|
+
validFrom: '2024-06-01T00:00:00Z',
|
|
28
|
+
credentialSubject: {
|
|
29
|
+
id: 'did:example:learner101',
|
|
30
|
+
type: ['AchievementSubject'],
|
|
31
|
+
achievement: {
|
|
32
|
+
id: 'urn:uuid:e5f6a7b8-0005-4000-8000-000000000002',
|
|
33
|
+
type: ['Achievement'],
|
|
34
|
+
achievementType: 'Course',
|
|
35
|
+
name: 'Data Science Fundamentals',
|
|
36
|
+
description:
|
|
37
|
+
'Introductory course covering statistics, machine learning basics, and data visualization.',
|
|
38
|
+
criteria: {
|
|
39
|
+
narrative: 'Complete all assignments and pass the final exam with 70%+.',
|
|
40
|
+
},
|
|
41
|
+
alignment: [
|
|
42
|
+
{
|
|
43
|
+
type: ['Alignment'],
|
|
44
|
+
targetName: 'Data Analysis',
|
|
45
|
+
targetUrl: 'https://credentialfinder.org/competency/data-analysis',
|
|
46
|
+
targetType: 'ceasn:Competency',
|
|
47
|
+
targetFramework: 'O*NET',
|
|
48
|
+
targetDescription:
|
|
49
|
+
'Ability to collect, organize, interpret, and present data.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: ['Alignment'],
|
|
53
|
+
targetName: 'Statistical Methods',
|
|
54
|
+
targetUrl: 'https://casenetwork.example.com/cfitems/stat-methods',
|
|
55
|
+
targetType: 'CFItem',
|
|
56
|
+
targetFramework: 'CASE Mathematics Framework',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|