@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,60 @@
|
|
|
1
|
+
import type { CredentialFixture } from '../../types';
|
|
2
|
+
|
|
3
|
+
export const boostDelegate: CredentialFixture = {
|
|
4
|
+
id: 'boost/delegate',
|
|
5
|
+
name: 'Organization Delegate Credential',
|
|
6
|
+
description:
|
|
7
|
+
'A LearnCard Boost delegate credential granting administrative permissions within an organization on the LearnCard network. Represents the delegation pattern used in network governance.',
|
|
8
|
+
spec: 'obv3',
|
|
9
|
+
profile: 'delegate',
|
|
10
|
+
features: ['expiration'],
|
|
11
|
+
source: 'synthetic',
|
|
12
|
+
signed: false,
|
|
13
|
+
validity: 'valid',
|
|
14
|
+
tags: ['boost', 'delegate', 'governance', 'admin', 'learncard'],
|
|
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:e7b3d1f4-9a26-4c58-b0d3-8f1e2c7a9b56',
|
|
22
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],
|
|
23
|
+
name: 'Organization Delegate – TechEd Foundation',
|
|
24
|
+
description:
|
|
25
|
+
'Grants the holder delegate authority to issue credentials, manage members, and configure boost templates on behalf of the TechEd Foundation.',
|
|
26
|
+
credentialSubject: {
|
|
27
|
+
id: 'did:example:delegate-techedfound-007',
|
|
28
|
+
type: ['AchievementSubject'],
|
|
29
|
+
achievement: {
|
|
30
|
+
id: 'https://network.learncard.com/organizations/teched-foundation/delegate',
|
|
31
|
+
type: ['Achievement'],
|
|
32
|
+
achievementType: 'Badge',
|
|
33
|
+
name: 'Organization Delegate',
|
|
34
|
+
description:
|
|
35
|
+
'Authorized delegate of the TechEd Foundation with permissions to issue credentials, manage organizational members, and configure credential templates.',
|
|
36
|
+
criteria: {
|
|
37
|
+
id: 'https://network.learncard.com/organizations/teched-foundation/delegate/criteria',
|
|
38
|
+
narrative:
|
|
39
|
+
'Appointed by an organization administrator. Delegate status is reviewed annually and may be revoked at any time by an administrator.',
|
|
40
|
+
},
|
|
41
|
+
creator: {
|
|
42
|
+
id: 'did:web:network.learncard.com:organizations:teched-foundation',
|
|
43
|
+
type: ['Profile'],
|
|
44
|
+
name: 'TechEd Foundation',
|
|
45
|
+
url: 'https://teched-foundation-example.org',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
issuer: {
|
|
50
|
+
id: 'did:web:network.learncard.com:organizations:teched-foundation',
|
|
51
|
+
type: ['Profile'],
|
|
52
|
+
name: 'TechEd Foundation',
|
|
53
|
+
url: 'https://teched-foundation-example.org',
|
|
54
|
+
description:
|
|
55
|
+
'A nonprofit organization dedicated to expanding access to technology education worldwide.',
|
|
56
|
+
},
|
|
57
|
+
validFrom: '2025-01-01T00:00:00Z',
|
|
58
|
+
validUntil: '2026-01-01T00:00:00Z',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { UnsignedAchievementCredentialValidator } from '@learncard/types';
|
|
2
|
+
|
|
3
|
+
import type { CredentialFixture } from '../../types';
|
|
4
|
+
|
|
5
|
+
export const boostWithSkills: CredentialFixture = {
|
|
6
|
+
id: 'boost/with-skills',
|
|
7
|
+
name: 'LearnCard Boost with Skills',
|
|
8
|
+
description:
|
|
9
|
+
'LearnCard BoostCredential with attached skills taxonomy, evidence files, and alignment',
|
|
10
|
+
spec: 'obv3',
|
|
11
|
+
profile: 'boost',
|
|
12
|
+
features: ['skills', 'evidence', 'alignment'],
|
|
13
|
+
source: 'synthetic',
|
|
14
|
+
signed: false,
|
|
15
|
+
validity: 'valid',
|
|
16
|
+
validator: UnsignedAchievementCredentialValidator,
|
|
17
|
+
tags: ['learncard', 'boost', 'skills'],
|
|
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
|
+
'https://ctx.learncard.com/boosts/1.0.3.json',
|
|
24
|
+
],
|
|
25
|
+
id: 'urn:uuid:d0e1f2a3-0010-4000-8000-000000000001',
|
|
26
|
+
type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],
|
|
27
|
+
name: 'Full-Stack Developer Certification',
|
|
28
|
+
issuer: { id: 'did:example:bootcamp' },
|
|
29
|
+
validFrom: '2024-11-01T00:00:00Z',
|
|
30
|
+
credentialSubject: {
|
|
31
|
+
id: 'did:example:graduate55',
|
|
32
|
+
type: ['AchievementSubject'],
|
|
33
|
+
achievement: {
|
|
34
|
+
id: 'urn:uuid:d0e1f2a3-0010-4000-8000-000000000002',
|
|
35
|
+
type: ['Achievement'],
|
|
36
|
+
achievementType: 'Certification',
|
|
37
|
+
name: 'Full-Stack Developer',
|
|
38
|
+
description: 'Completed 16-week intensive full-stack bootcamp.',
|
|
39
|
+
image: '',
|
|
40
|
+
criteria: {
|
|
41
|
+
narrative:
|
|
42
|
+
'Complete all coursework, capstone project, and pass technical assessments.',
|
|
43
|
+
},
|
|
44
|
+
alignment: [
|
|
45
|
+
{
|
|
46
|
+
type: ['Alignment'],
|
|
47
|
+
targetName: 'Full Stack Web Developer',
|
|
48
|
+
targetUrl: 'https://www.onetonline.org/link/summary/15-1254.00',
|
|
49
|
+
targetType: 'CTDL',
|
|
50
|
+
targetFramework: 'O*NET-SOC',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
evidence: [
|
|
56
|
+
{
|
|
57
|
+
type: ['Evidence', 'EvidenceFile'],
|
|
58
|
+
name: 'Capstone Project Repository',
|
|
59
|
+
description: 'GitHub repository for capstone full-stack application.',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
skills: [
|
|
63
|
+
{
|
|
64
|
+
category: 'Frontend',
|
|
65
|
+
skill: 'React',
|
|
66
|
+
subskills: ['Hooks', 'Context API', 'Server Components'],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
category: 'Backend',
|
|
70
|
+
skill: 'Node.js',
|
|
71
|
+
subskills: ['Express', 'REST APIs', 'Authentication'],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
category: 'Database',
|
|
75
|
+
skill: 'PostgreSQL',
|
|
76
|
+
subskills: ['Schema Design', 'Migrations', 'Query Optimization'],
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
};
|