@learncard/credential-library 2.0.4 → 2.1.0
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 +30 -1
- package/SOURCES.md +63 -0
- package/dist/bundles/index.d.ts +5 -0
- package/dist/bundles/index.d.ts.map +1 -0
- package/dist/bundles/student.d.ts +3 -0
- package/dist/bundles/student.d.ts.map +1 -0
- package/dist/bundles/types.d.ts +24 -0
- package/dist/bundles/types.d.ts.map +1 -0
- package/dist/credential-library.cjs.development.js +12244 -713
- package/dist/credential-library.cjs.development.js.map +4 -4
- package/dist/credential-library.cjs.production.min.js +11 -1
- package/dist/credential-library.cjs.production.min.js.map +4 -4
- package/dist/credential-library.esm.js +12242 -709
- package/dist/credential-library.esm.js.map +4 -4
- package/dist/fixtures/clr/achievement-id-associations.d.ts +3 -0
- package/dist/fixtures/clr/achievement-id-associations.d.ts.map +1 -0
- package/dist/fixtures/clr/employment-record.d.ts +8 -0
- package/dist/fixtures/clr/employment-record.d.ts.map +1 -0
- package/dist/fixtures/clr/licensing-regulatory-record.d.ts +8 -0
- package/dist/fixtures/clr/licensing-regulatory-record.d.ts.map +1 -0
- package/dist/fixtures/clr/military-training-record.d.ts +8 -0
- package/dist/fixtures/clr/military-training-record.d.ts.map +1 -0
- package/dist/fixtures/clr/mixed-career-record.d.ts +8 -0
- package/dist/fixtures/clr/mixed-career-record.d.ts.map +1 -0
- package/dist/fixtures/clr/mixed-role-portfolio.d.ts +3 -0
- package/dist/fixtures/clr/mixed-role-portfolio.d.ts.map +1 -0
- package/dist/fixtures/clr/professional-organization-record.d.ts +8 -0
- package/dist/fixtures/clr/professional-organization-record.d.ts.map +1 -0
- package/dist/fixtures/clr/student-official-academic-transcript.d.ts +3 -0
- package/dist/fixtures/clr/student-official-academic-transcript.d.ts.map +1 -0
- package/dist/fixtures/clr/training-provider-record.d.ts +8 -0
- package/dist/fixtures/clr/training-provider-record.d.ts.map +1 -0
- package/dist/fixtures/custom/course-enrollment.d.ts +3 -0
- package/dist/fixtures/custom/course-enrollment.d.ts.map +1 -0
- package/dist/fixtures/custom/exam-accommodation.d.ts +3 -0
- package/dist/fixtures/custom/exam-accommodation.d.ts.map +1 -0
- package/dist/fixtures/index.d.ts +25 -1
- package/dist/fixtures/index.d.ts.map +1 -1
- package/dist/fixtures/obv3/food-allergen-facilitator.d.ts +3 -0
- package/dist/fixtures/obv3/food-allergen-facilitator.d.ts.map +1 -0
- package/dist/fixtures/obv3/food-allergen-practice-fr.d.ts +3 -0
- package/dist/fixtures/obv3/food-allergen-practice-fr.d.ts.map +1 -0
- package/dist/fixtures/obv3/food-allergen-practice.d.ts +3 -0
- package/dist/fixtures/obv3/food-allergen-practice.d.ts.map +1 -0
- package/dist/fixtures/obv3/phishing-transfer.d.ts +3 -0
- package/dist/fixtures/obv3/phishing-transfer.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-apprenticeship.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-apprenticeship.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-badge-override.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-badge-override.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-certification.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-certification.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-expired.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-expired.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-journeyman.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-journeyman.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-license.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-license.d.ts.map +1 -0
- package/dist/fixtures/obv3/qualification-master.d.ts +3 -0
- package/dist/fixtures/obv3/qualification-master.d.ts.map +1 -0
- package/dist/fixtures/obv3/student-additional-credentials.d.ts +3 -0
- package/dist/fixtures/obv3/student-additional-credentials.d.ts.map +1 -0
- package/dist/fixtures/obv3/student-sample-badges.d.ts +586 -0
- package/dist/fixtures/obv3/student-sample-badges.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/prepare.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/__tests__/bundles.test.ts +234 -0
- package/src/__tests__/clr-non-academic.test.ts +220 -0
- package/src/__tests__/curated-examples.test.ts +248 -0
- package/src/__tests__/issuance.test.ts +35 -0
- package/src/__tests__/registry.test.ts +31 -0
- package/src/bundles/index.ts +19 -0
- package/src/bundles/student.ts +251 -0
- package/src/bundles/types.ts +25 -0
- package/src/fixtures/clr/README.md +142 -0
- package/src/fixtures/clr/achievement-id-associations.ts +342 -0
- package/src/fixtures/clr/employment-record.ts +487 -0
- package/src/fixtures/clr/licensing-regulatory-record.ts +388 -0
- package/src/fixtures/clr/military-training-record.ts +468 -0
- package/src/fixtures/clr/mixed-career-record.ts +814 -0
- package/src/fixtures/clr/mixed-role-portfolio.ts +490 -0
- package/src/fixtures/clr/professional-organization-record.ts +403 -0
- package/src/fixtures/clr/student-official-academic-transcript.ts +3202 -0
- package/src/fixtures/clr/training-provider-record.ts +510 -0
- package/src/fixtures/custom/course-enrollment.ts +56 -0
- package/src/fixtures/custom/exam-accommodation.ts +56 -0
- package/src/fixtures/index.ts +87 -0
- package/src/fixtures/obv3/food-allergen-facilitator.ts +108 -0
- package/src/fixtures/obv3/food-allergen-practice-fr.ts +107 -0
- package/src/fixtures/obv3/food-allergen-practice.ts +105 -0
- package/src/fixtures/obv3/phishing-transfer.ts +163 -0
- package/src/fixtures/obv3/qualification-apprenticeship.ts +58 -0
- package/src/fixtures/obv3/qualification-badge-override.ts +64 -0
- package/src/fixtures/obv3/qualification-certification.ts +59 -0
- package/src/fixtures/obv3/qualification-expired.ts +59 -0
- package/src/fixtures/obv3/qualification-journeyman.ts +58 -0
- package/src/fixtures/obv3/qualification-license.ts +58 -0
- package/src/fixtures/obv3/qualification-master.ts +58 -0
- package/src/fixtures/obv3/student-additional-credentials.ts +3912 -0
- package/src/fixtures/obv3/student-sample-badges.ts +424 -0
- package/src/index.ts +2 -0
- package/src/prepare.ts +55 -11
- package/dist/__tests__/docs-json.test.d.ts +0 -2
- package/dist/__tests__/docs-json.test.d.ts.map +0 -1
- package/dist/__tests__/issuance.test.d.ts +0 -2
- package/dist/__tests__/issuance.test.d.ts.map +0 -1
- package/dist/__tests__/registry.test.d.ts +0 -2
- package/dist/__tests__/registry.test.d.ts.map +0 -1
- package/dist/__tests__/sd-jwt-vc.test.d.ts +0 -2
- package/dist/__tests__/sd-jwt-vc.test.d.ts.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationApprenticeship: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-apprenticeship',
|
|
6
|
+
'name': 'Electrical Apprenticeship Certificate',
|
|
7
|
+
'description': 'LC-2111 ApprenticeshipCertificate classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'apprenticeship'],
|
|
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:21110000-0000-4000-8000-000000000003',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Electrical Apprenticeship Certificate',
|
|
24
|
+
'description': 'Recognizes completion of supervised electrical training.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F6E0.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Apprenticeship tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/apprenticeship',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'ApprenticeshipCertificate',
|
|
44
|
+
'name': 'Electrical Apprenticeship Certificate',
|
|
45
|
+
'description': 'Recognizes completion of supervised electrical training.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F6E0.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Apprenticeship tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationBadgeOverride: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-badge-override',
|
|
6
|
+
'name': 'Safety Certification — Badge Layout',
|
|
7
|
+
'description': 'LC-2111 Certification classification and explicit display override test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'display', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'badge-override'],
|
|
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
|
+
'https://ctx.learncard.com/boosts/1.0.3.json',
|
|
21
|
+
],
|
|
22
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000007',
|
|
23
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],
|
|
24
|
+
'name': 'Safety Certification — Badge Layout',
|
|
25
|
+
'description':
|
|
26
|
+
'A qualification with an explicit badge layout instead of the default certificate.',
|
|
27
|
+
'image': {
|
|
28
|
+
id: 'https://openmoji.org/data/color/svg/1F6E1.svg',
|
|
29
|
+
type: 'Image',
|
|
30
|
+
caption: 'Safety certification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
31
|
+
},
|
|
32
|
+
'issuer': {
|
|
33
|
+
'id': 'did:example:qualification-issuer',
|
|
34
|
+
'type': ['Profile'],
|
|
35
|
+
'name': 'Example Professional Training Academy',
|
|
36
|
+
},
|
|
37
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
38
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
39
|
+
'credentialSubject': {
|
|
40
|
+
'id': 'did:example:qualification-holder',
|
|
41
|
+
'type': ['AchievementSubject'],
|
|
42
|
+
'achievement': {
|
|
43
|
+
'id': 'https://example.org/qualifications/badge-override',
|
|
44
|
+
'type': ['Achievement'],
|
|
45
|
+
'achievementType': 'Certification',
|
|
46
|
+
'name': 'Safety Certification — Badge Layout',
|
|
47
|
+
'description':
|
|
48
|
+
'A qualification with an explicit badge layout instead of the default certificate.',
|
|
49
|
+
'image': {
|
|
50
|
+
id: 'https://openmoji.org/data/color/svg/1F6E1.svg',
|
|
51
|
+
type: 'Image',
|
|
52
|
+
caption: 'Safety certification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
53
|
+
},
|
|
54
|
+
'criteria': {
|
|
55
|
+
'narrative':
|
|
56
|
+
'Complete the required training and pass the practical assessment.',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
'display': {
|
|
61
|
+
'displayType': 'badge',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationCertification: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-certification',
|
|
6
|
+
'name': 'Project Management Certification',
|
|
7
|
+
'description': 'LC-2111 Certification classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'certification'],
|
|
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:21110000-0000-4000-8000-000000000002',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Project Management Certification',
|
|
24
|
+
'description': 'Demonstrates competency in planning, delivering, and evaluating projects.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F4CB.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Project management illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/certification',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'Certification',
|
|
44
|
+
'name': 'Project Management Certification',
|
|
45
|
+
'description':
|
|
46
|
+
'Demonstrates competency in planning, delivering, and evaluating projects.',
|
|
47
|
+
'image': {
|
|
48
|
+
id: 'https://openmoji.org/data/color/svg/1F4CB.svg',
|
|
49
|
+
type: 'Image',
|
|
50
|
+
caption: 'Project management illustration — OpenMoji (CC BY-SA 4.0)',
|
|
51
|
+
},
|
|
52
|
+
'criteria': {
|
|
53
|
+
'narrative':
|
|
54
|
+
'Complete the required training and pass the practical assessment.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationExpired: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-expired',
|
|
6
|
+
'name': 'Expired Safety Certification',
|
|
7
|
+
'description':
|
|
8
|
+
'LC-2111 expiration test. Enable Keep fixture dates in the viewer to retain the past expiration.',
|
|
9
|
+
'spec': 'obv3',
|
|
10
|
+
'profile': 'certificate',
|
|
11
|
+
'features': ['expiration', 'image'],
|
|
12
|
+
'source': 'synthetic',
|
|
13
|
+
'signed': false,
|
|
14
|
+
'validity': 'valid',
|
|
15
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
16
|
+
'tags': ['qualifications', 'lc-2111', 'expired'],
|
|
17
|
+
'credential': {
|
|
18
|
+
'@context': [
|
|
19
|
+
'https://www.w3.org/ns/credentials/v2',
|
|
20
|
+
'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json',
|
|
21
|
+
],
|
|
22
|
+
'id': 'urn:uuid:21110000-0000-4000-8000-000000000006',
|
|
23
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
24
|
+
'name': 'Expired Safety Certification',
|
|
25
|
+
'description': 'An expired qualification that must remain visible and selectable.',
|
|
26
|
+
'image': {
|
|
27
|
+
id: 'https://openmoji.org/data/color/svg/26A0.svg',
|
|
28
|
+
type: 'Image',
|
|
29
|
+
caption: 'Safety warning illustration — OpenMoji (CC BY-SA 4.0)',
|
|
30
|
+
},
|
|
31
|
+
'issuer': {
|
|
32
|
+
'id': 'did:example:qualification-issuer',
|
|
33
|
+
'type': ['Profile'],
|
|
34
|
+
'name': 'Example Professional Training Academy',
|
|
35
|
+
},
|
|
36
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
37
|
+
'validUntil': '2024-01-01T00:00:00Z',
|
|
38
|
+
'credentialSubject': {
|
|
39
|
+
'id': 'did:example:qualification-holder',
|
|
40
|
+
'type': ['AchievementSubject'],
|
|
41
|
+
'achievement': {
|
|
42
|
+
'id': 'https://example.org/qualifications/expired',
|
|
43
|
+
'type': ['Achievement'],
|
|
44
|
+
'achievementType': 'Certification',
|
|
45
|
+
'name': 'Expired Safety Certification',
|
|
46
|
+
'description': 'An expired qualification that must remain visible and selectable.',
|
|
47
|
+
'image': {
|
|
48
|
+
id: 'https://openmoji.org/data/color/svg/26A0.svg',
|
|
49
|
+
type: 'Image',
|
|
50
|
+
caption: 'Safety warning illustration — OpenMoji (CC BY-SA 4.0)',
|
|
51
|
+
},
|
|
52
|
+
'criteria': {
|
|
53
|
+
'narrative':
|
|
54
|
+
'Complete the safety course; renewal is required after expiration.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationJourneyman: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-journeyman',
|
|
6
|
+
'name': 'Journeyman Electrician Certificate',
|
|
7
|
+
'description': 'LC-2111 JourneymanCertificate classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'journeyman'],
|
|
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:21110000-0000-4000-8000-000000000004',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Journeyman Electrician Certificate',
|
|
24
|
+
'description': 'Recognizes qualification to work independently as an electrician.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F527.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Journeyman tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/journeyman',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'JourneymanCertificate',
|
|
44
|
+
'name': 'Journeyman Electrician Certificate',
|
|
45
|
+
'description': 'Recognizes qualification to work independently as an electrician.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F527.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Journeyman tools illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationLicense: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-license',
|
|
6
|
+
'name': 'Professional Electrical License',
|
|
7
|
+
'description': 'LC-2111 License classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'license',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'license'],
|
|
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:21110000-0000-4000-8000-000000000001',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Professional Electrical License',
|
|
24
|
+
'description': 'Authorizes supervised electrical installation and maintenance.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F50C.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Electrical license illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/license',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'License',
|
|
44
|
+
'name': 'Professional Electrical License',
|
|
45
|
+
'description': 'Authorizes supervised electrical installation and maintenance.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F50C.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Electrical license illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
import type { CredentialFixture } from '../../types';
|
|
3
|
+
|
|
4
|
+
export const obv3QualificationMaster: CredentialFixture = {
|
|
5
|
+
'id': 'obv3/qualification-master',
|
|
6
|
+
'name': 'Master Electrician Certificate',
|
|
7
|
+
'description': 'LC-2111 MasterCertificate classification and default certificate test.',
|
|
8
|
+
'spec': 'obv3',
|
|
9
|
+
'profile': 'certificate',
|
|
10
|
+
'features': ['expiration', 'image'],
|
|
11
|
+
'source': 'synthetic',
|
|
12
|
+
'signed': false,
|
|
13
|
+
'validity': 'valid',
|
|
14
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
15
|
+
'tags': ['qualifications', 'lc-2111', 'master'],
|
|
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:21110000-0000-4000-8000-000000000005',
|
|
22
|
+
'type': ['VerifiableCredential', 'OpenBadgeCredential'],
|
|
23
|
+
'name': 'Master Electrician Certificate',
|
|
24
|
+
'description': 'Recognizes advanced electrical design and supervisory competence.',
|
|
25
|
+
'image': {
|
|
26
|
+
id: 'https://openmoji.org/data/color/svg/1F3C6.svg',
|
|
27
|
+
type: 'Image',
|
|
28
|
+
caption: 'Master qualification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
29
|
+
},
|
|
30
|
+
'issuer': {
|
|
31
|
+
'id': 'did:example:qualification-issuer',
|
|
32
|
+
'type': ['Profile'],
|
|
33
|
+
'name': 'Example Professional Training Academy',
|
|
34
|
+
},
|
|
35
|
+
'validFrom': '2023-01-01T00:00:00Z',
|
|
36
|
+
'validUntil': '2037-01-01T00:00:00Z',
|
|
37
|
+
'credentialSubject': {
|
|
38
|
+
'id': 'did:example:qualification-holder',
|
|
39
|
+
'type': ['AchievementSubject'],
|
|
40
|
+
'achievement': {
|
|
41
|
+
'id': 'https://example.org/qualifications/master',
|
|
42
|
+
'type': ['Achievement'],
|
|
43
|
+
'achievementType': 'MasterCertificate',
|
|
44
|
+
'name': 'Master Electrician Certificate',
|
|
45
|
+
'description': 'Recognizes advanced electrical design and supervisory competence.',
|
|
46
|
+
'image': {
|
|
47
|
+
id: 'https://openmoji.org/data/color/svg/1F3C6.svg',
|
|
48
|
+
type: 'Image',
|
|
49
|
+
caption: 'Master qualification illustration — OpenMoji (CC BY-SA 4.0)',
|
|
50
|
+
},
|
|
51
|
+
'criteria': {
|
|
52
|
+
'narrative':
|
|
53
|
+
'Complete the required training and pass the practical assessment.',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|