@learncard/credential-library 1.0.2

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.
Files changed (93) hide show
  1. package/README.md +260 -0
  2. package/dist/__tests__/issuance.test.d.ts +2 -0
  3. package/dist/__tests__/issuance.test.d.ts.map +1 -0
  4. package/dist/__tests__/registry.test.d.ts +2 -0
  5. package/dist/__tests__/registry.test.d.ts.map +1 -0
  6. package/dist/credential-library.cjs.development.js +11095 -0
  7. package/dist/credential-library.cjs.development.js.map +7 -0
  8. package/dist/credential-library.cjs.production.min.js +2 -0
  9. package/dist/credential-library.cjs.production.min.js.map +7 -0
  10. package/dist/credential-library.esm.js +11074 -0
  11. package/dist/credential-library.esm.js.map +7 -0
  12. package/dist/fixtures/boost/basic.d.ts +3 -0
  13. package/dist/fixtures/boost/basic.d.ts.map +1 -0
  14. package/dist/fixtures/boost/boost-id.d.ts +3 -0
  15. package/dist/fixtures/boost/boost-id.d.ts.map +1 -0
  16. package/dist/fixtures/boost/community-award.d.ts +3 -0
  17. package/dist/fixtures/boost/community-award.d.ts.map +1 -0
  18. package/dist/fixtures/boost/delegate.d.ts +3 -0
  19. package/dist/fixtures/boost/delegate.d.ts.map +1 -0
  20. package/dist/fixtures/boost/with-skills.d.ts +3 -0
  21. package/dist/fixtures/boost/with-skills.d.ts.map +1 -0
  22. package/dist/fixtures/clr/great-plains-full.d.ts +3 -0
  23. package/dist/fixtures/clr/great-plains-full.d.ts.map +1 -0
  24. package/dist/fixtures/clr/minimal.d.ts +3 -0
  25. package/dist/fixtures/clr/minimal.d.ts.map +1 -0
  26. package/dist/fixtures/clr/multi-achievement.d.ts +3 -0
  27. package/dist/fixtures/clr/multi-achievement.d.ts.map +1 -0
  28. package/dist/fixtures/clr/nd-student-transcript.d.ts +3 -0
  29. package/dist/fixtures/clr/nd-student-transcript.d.ts.map +1 -0
  30. package/dist/fixtures/clr/university-transcript.d.ts +3 -0
  31. package/dist/fixtures/clr/university-transcript.d.ts.map +1 -0
  32. package/dist/fixtures/index.d.ts +39 -0
  33. package/dist/fixtures/index.d.ts.map +1 -0
  34. package/dist/fixtures/invalid/empty-type.d.ts +3 -0
  35. package/dist/fixtures/invalid/empty-type.d.ts.map +1 -0
  36. package/dist/fixtures/invalid/missing-context.d.ts +3 -0
  37. package/dist/fixtures/invalid/missing-context.d.ts.map +1 -0
  38. package/dist/fixtures/invalid/missing-issuer.d.ts +3 -0
  39. package/dist/fixtures/invalid/missing-issuer.d.ts.map +1 -0
  40. package/dist/fixtures/obv3/1edtech-full.d.ts +3 -0
  41. package/dist/fixtures/obv3/1edtech-full.d.ts.map +1 -0
  42. package/dist/fixtures/obv3/course-completion.d.ts +3 -0
  43. package/dist/fixtures/obv3/course-completion.d.ts.map +1 -0
  44. package/dist/fixtures/obv3/endorsement.d.ts +3 -0
  45. package/dist/fixtures/obv3/endorsement.d.ts.map +1 -0
  46. package/dist/fixtures/obv3/full-badge.d.ts +3 -0
  47. package/dist/fixtures/obv3/full-badge.d.ts.map +1 -0
  48. package/dist/fixtures/obv3/k12-diploma.d.ts +3 -0
  49. package/dist/fixtures/obv3/k12-diploma.d.ts.map +1 -0
  50. package/dist/fixtures/obv3/micro-credential.d.ts +3 -0
  51. package/dist/fixtures/obv3/micro-credential.d.ts.map +1 -0
  52. package/dist/fixtures/obv3/minimal-badge.d.ts +3 -0
  53. package/dist/fixtures/obv3/minimal-badge.d.ts.map +1 -0
  54. package/dist/fixtures/obv3/plugfest-jff2.d.ts +3 -0
  55. package/dist/fixtures/obv3/plugfest-jff2.d.ts.map +1 -0
  56. package/dist/fixtures/obv3/professional-cert.d.ts +3 -0
  57. package/dist/fixtures/obv3/professional-cert.d.ts.map +1 -0
  58. package/dist/fixtures/obv3/with-alignment.d.ts +3 -0
  59. package/dist/fixtures/obv3/with-alignment.d.ts.map +1 -0
  60. package/dist/fixtures/obv3/with-endorsement.d.ts +3 -0
  61. package/dist/fixtures/obv3/with-endorsement.d.ts.map +1 -0
  62. package/dist/fixtures/vc-v1/alumni-credential.d.ts +3 -0
  63. package/dist/fixtures/vc-v1/alumni-credential.d.ts.map +1 -0
  64. package/dist/fixtures/vc-v1/basic.d.ts +3 -0
  65. package/dist/fixtures/vc-v1/basic.d.ts.map +1 -0
  66. package/dist/fixtures/vc-v1/with-status.d.ts +3 -0
  67. package/dist/fixtures/vc-v1/with-status.d.ts.map +1 -0
  68. package/dist/fixtures/vc-v2/basic.d.ts +3 -0
  69. package/dist/fixtures/vc-v2/basic.d.ts.map +1 -0
  70. package/dist/fixtures/vc-v2/digital-id.d.ts +3 -0
  71. package/dist/fixtures/vc-v2/digital-id.d.ts.map +1 -0
  72. package/dist/fixtures/vc-v2/education-degree.d.ts +3 -0
  73. package/dist/fixtures/vc-v2/education-degree.d.ts.map +1 -0
  74. package/dist/fixtures/vc-v2/employment-credential.d.ts +3 -0
  75. package/dist/fixtures/vc-v2/employment-credential.d.ts.map +1 -0
  76. package/dist/fixtures/vc-v2/license-credential.d.ts +3 -0
  77. package/dist/fixtures/vc-v2/license-credential.d.ts.map +1 -0
  78. package/dist/fixtures/vc-v2/membership-credential.d.ts +3 -0
  79. package/dist/fixtures/vc-v2/membership-credential.d.ts.map +1 -0
  80. package/dist/fixtures/vc-v2/multiple-subjects.d.ts +3 -0
  81. package/dist/fixtures/vc-v2/multiple-subjects.d.ts.map +1 -0
  82. package/dist/fixtures/vc-v2/with-evidence.d.ts +3 -0
  83. package/dist/fixtures/vc-v2/with-evidence.d.ts.map +1 -0
  84. package/dist/index.d.ts +8 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +7 -0
  87. package/dist/prepare.d.ts +49 -0
  88. package/dist/prepare.d.ts.map +1 -0
  89. package/dist/registry.d.ts +23 -0
  90. package/dist/registry.d.ts.map +1 -0
  91. package/dist/types.d.ts +58 -0
  92. package/dist/types.d.ts.map +1 -0
  93. package/package.json +40 -0
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const boostBasic: CredentialFixture;
3
+ //# sourceMappingURL=basic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/basic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,iBA6CxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const boostId: CredentialFixture;
3
+ //# sourceMappingURL=boost-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boost-id.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/boost-id.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,OAAO,EAAE,iBAsDrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const boostCommunityAward: CredentialFixture;
3
+ //# sourceMappingURL=community-award.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"community-award.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/community-award.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBA6FjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const boostDelegate: CredentialFixture;
3
+ //# sourceMappingURL=delegate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,iBAyD3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const boostWithSkills: CredentialFixture;
3
+ //# sourceMappingURL=with-skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-skills.d.ts","sourceRoot":"","sources":["../../../src/fixtures/boost/with-skills.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,eAAe,EAAE,iBA2E7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const clrGreatPlainsFull: CredentialFixture;
3
+ //# sourceMappingURL=great-plains-full.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"great-plains-full.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/great-plains-full.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,kBAAkB,EAAE,iBA8pPhC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const clrMinimal: CredentialFixture;
3
+ //# sourceMappingURL=minimal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minimal.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/minimal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,iBAgDxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const clrMultiAchievement: CredentialFixture;
3
+ //# sourceMappingURL=multi-achievement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multi-achievement.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/multi-achievement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBAwHjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const clrNdStudentTranscript: CredentialFixture;
3
+ //# sourceMappingURL=nd-student-transcript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nd-student-transcript.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/nd-student-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,sBAAsB,EAAE,iBAwZpC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const clrUniversityTranscript: CredentialFixture;
3
+ //# sourceMappingURL=university-transcript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"university-transcript.d.ts","sourceRoot":"","sources":["../../../src/fixtures/clr/university-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,uBAAuB,EAAE,iBAqUrC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { CredentialFixture } from '../types';
2
+ import { vcV1Basic } from './vc-v1/basic';
3
+ import { vcV1WithStatus } from './vc-v1/with-status';
4
+ import { vcV2Basic } from './vc-v2/basic';
5
+ import { vcV2WithEvidence } from './vc-v2/with-evidence';
6
+ import { vcV2MultipleSubjects } from './vc-v2/multiple-subjects';
7
+ import { obv3MinimalBadge } from './obv3/minimal-badge';
8
+ import { obv3FullBadge } from './obv3/full-badge';
9
+ import { obv3WithAlignment } from './obv3/with-alignment';
10
+ import { obv3WithEndorsement } from './obv3/with-endorsement';
11
+ import { obv3PlugfestJff2 } from './obv3/plugfest-jff2';
12
+ import { obv3OneedtechFull } from './obv3/1edtech-full';
13
+ import { obv3ProfessionalCert } from './obv3/professional-cert';
14
+ import { obv3MicroCredential } from './obv3/micro-credential';
15
+ import { obv3CourseCompletion } from './obv3/course-completion';
16
+ import { obv3K12Diploma } from './obv3/k12-diploma';
17
+ import { obv3EndorsementCredential } from './obv3/endorsement';
18
+ import { clrMinimal } from './clr/minimal';
19
+ import { clrMultiAchievement } from './clr/multi-achievement';
20
+ import { clrUniversityTranscript } from './clr/university-transcript';
21
+ import { boostBasic } from './boost/basic';
22
+ import { boostId } from './boost/boost-id';
23
+ import { boostWithSkills } from './boost/with-skills';
24
+ import { boostCommunityAward } from './boost/community-award';
25
+ import { boostDelegate } from './boost/delegate';
26
+ import { invalidMissingContext } from './invalid/missing-context';
27
+ import { invalidEmptyType } from './invalid/empty-type';
28
+ import { invalidMissingIssuer } from './invalid/missing-issuer';
29
+ import { clrNdStudentTranscript } from './clr/nd-student-transcript';
30
+ import { vcV1AlumniCredential } from './vc-v1/alumni-credential';
31
+ import { vcV2EmploymentCredential } from './vc-v2/employment-credential';
32
+ import { vcV2EducationDegree } from './vc-v2/education-degree';
33
+ import { vcV2DigitalId } from './vc-v2/digital-id';
34
+ import { vcV2MembershipCredential } from './vc-v2/membership-credential';
35
+ import { vcV2LicenseCredential } from './vc-v2/license-credential';
36
+ import { clrGreatPlainsFull } from './clr/great-plains-full';
37
+ export declare const ALL_FIXTURES: CredentialFixture[];
38
+ export { vcV1Basic, vcV1WithStatus, vcV2Basic, vcV2WithEvidence, vcV2MultipleSubjects, obv3MinimalBadge, obv3FullBadge, obv3WithAlignment, obv3WithEndorsement, obv3PlugfestJff2, clrMinimal, clrMultiAchievement, boostBasic, boostId, boostWithSkills, invalidMissingContext, invalidEmptyType, invalidMissingIssuer, clrNdStudentTranscript, obv3OneedtechFull, obv3ProfessionalCert, obv3MicroCredential, obv3CourseCompletion, obv3K12Diploma, obv3EndorsementCredential, clrUniversityTranscript, boostCommunityAward, boostDelegate, vcV1AlumniCredential, vcV2EmploymentCredential, vcV2EducationDegree, vcV2DigitalId, vcV2MembershipCredential, vcV2LicenseCredential, clrGreatPlainsFull, };
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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BAAqB,EACrB,kBAAkB,GACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const invalidEmptyType: CredentialFixture;
3
+ //# sourceMappingURL=empty-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-type.d.ts","sourceRoot":"","sources":["../../../src/fixtures/invalid/empty-type.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,aAAa,CAAC;AAExE,eAAO,MAAM,gBAAgB,EAAE,iBAsB9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const invalidMissingContext: CredentialFixture;
3
+ //# sourceMappingURL=missing-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"missing-context.d.ts","sourceRoot":"","sources":["../../../src/fixtures/invalid/missing-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,aAAa,CAAC;AAExE,eAAO,MAAM,qBAAqB,EAAE,iBAsBnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const invalidMissingIssuer: CredentialFixture;
3
+ //# sourceMappingURL=missing-issuer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"missing-issuer.d.ts","sourceRoot":"","sources":["../../../src/fixtures/invalid/missing-issuer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,aAAa,CAAC;AAExE,eAAO,MAAM,oBAAoB,EAAE,iBAsBlC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3OneedtechFull: CredentialFixture;
3
+ //# sourceMappingURL=1edtech-full.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1edtech-full.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/1edtech-full.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,iBAAiB,EAAE,iBA0O/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3CourseCompletion: CredentialFixture;
3
+ //# sourceMappingURL=course-completion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"course-completion.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/course-completion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,iBA+ElC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3EndorsementCredential: CredentialFixture;
3
+ //# sourceMappingURL=endorsement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endorsement.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/endorsement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,yBAAyB,EAAE,iBAuDvC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3FullBadge: CredentialFixture;
3
+ //# sourceMappingURL=full-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"full-badge.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/full-badge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,iBAoH3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3K12Diploma: CredentialFixture;
3
+ //# sourceMappingURL=k12-diploma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"k12-diploma.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/k12-diploma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,iBAyF5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3MicroCredential: CredentialFixture;
3
+ //# sourceMappingURL=micro-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"micro-credential.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/micro-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBAuKjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3MinimalBadge: CredentialFixture;
3
+ //# sourceMappingURL=minimal-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minimal-badge.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/minimal-badge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,iBAmC9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3PlugfestJff2: CredentialFixture;
3
+ //# sourceMappingURL=plugfest-jff2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugfest-jff2.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/plugfest-jff2.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,iBAoD9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3ProfessionalCert: CredentialFixture;
3
+ //# sourceMappingURL=professional-cert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"professional-cert.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/professional-cert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,iBAmGlC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3WithAlignment: CredentialFixture;
3
+ //# sourceMappingURL=with-alignment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-alignment.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/with-alignment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,iBAAiB,EAAE,iBAyD/B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const obv3WithEndorsement: CredentialFixture;
3
+ //# sourceMappingURL=with-endorsement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-endorsement.d.ts","sourceRoot":"","sources":["../../../src/fixtures/obv3/with-endorsement.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBAyDjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV1AlumniCredential: CredentialFixture;
3
+ //# sourceMappingURL=alumni-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alumni-credential.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v1/alumni-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,iBAkClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV1Basic: CredentialFixture;
3
+ //# sourceMappingURL=basic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v1/basic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,SAAS,EAAE,iBAsBvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV1WithStatus: CredentialFixture;
3
+ //# sourceMappingURL=with-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-status.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v1/with-status.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,cAAc,EAAE,iBAuC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2Basic: CredentialFixture;
3
+ //# sourceMappingURL=basic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/basic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,SAAS,EAAE,iBAsBvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2DigitalId: CredentialFixture;
3
+ //# sourceMappingURL=digital-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digital-id.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/digital-id.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,iBA2E3B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2EducationDegree: CredentialFixture;
3
+ //# sourceMappingURL=education-degree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"education-degree.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/education-degree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,mBAAmB,EAAE,iBA0EjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2EmploymentCredential: CredentialFixture;
3
+ //# sourceMappingURL=employment-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"employment-credential.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/employment-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,wBAAwB,EAAE,iBA6DtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2LicenseCredential: CredentialFixture;
3
+ //# sourceMappingURL=license-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"license-credential.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/license-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,qBAAqB,EAAE,iBA4EnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2MembershipCredential: CredentialFixture;
3
+ //# sourceMappingURL=membership-credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"membership-credential.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/membership-credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,wBAAwB,EAAE,iBA2DtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2MultipleSubjects: CredentialFixture;
3
+ //# sourceMappingURL=multiple-subjects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiple-subjects.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/multiple-subjects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,oBAAoB,EAAE,iBAkClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { CredentialFixture } from '../../types';
2
+ export declare const vcV2WithEvidence: CredentialFixture;
3
+ //# sourceMappingURL=with-evidence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-evidence.d.ts","sourceRoot":"","sources":["../../../src/fixtures/vc-v2/with-evidence.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,iBA6C9B,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type { CredentialSpec, CredentialProfile, CredentialFeature, FixtureSource, FixtureValidity, CredentialFixture, FixtureFilter, InvalidCredential, } from './types';
2
+ export { CREDENTIAL_SPECS, CREDENTIAL_PROFILES, CREDENTIAL_FEATURES, FIXTURE_SOURCES, FIXTURE_VALIDITIES, } from './types';
3
+ export { registerFixture, registerFixtures, resetRegistry, getAllFixtures, getFixture, findFixture, getFixtures, getUnsignedFixtures, getSignedFixtures, getValidFixtures, getInvalidFixtures, getStats, } from './registry';
4
+ export type { RegistryStats } from './registry';
5
+ export { prepareFixture, prepareFixtureById } from './prepare';
6
+ export type { PrepareOptions } from './prepare';
7
+ export * from './fixtures';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACR,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,iBAAiB,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,GACrB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACH,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,GACX,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/D,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,cAAc,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === 'production') {
4
+ module.exports = require('./credential-library.cjs.production.min.js');
5
+ } else {
6
+ module.exports = require('./credential-library.cjs.development.js');
7
+ }
@@ -0,0 +1,49 @@
1
+ import type { UnsignedVC } from '@learncard/types';
2
+ import type { CredentialFixture } from './types';
3
+ export interface PrepareOptions {
4
+ /** Issuer DID — e.g. from wallet.id.did() */
5
+ issuerDid: string;
6
+ /** Recipient DID — who the credential is being issued to */
7
+ subjectDid?: string;
8
+ /** Override validFrom date (defaults to now) */
9
+ validFrom?: string;
10
+ /** Override validUntil / expirationDate */
11
+ validUntil?: string;
12
+ /** Generate fresh UUIDs for id fields (defaults to true) */
13
+ freshIds?: boolean;
14
+ }
15
+ /**
16
+ * Takes a fixture's credential and returns a fresh unsigned VC with real DIDs,
17
+ * current timestamps, and fresh UUIDs — ready to pass to
18
+ * `wallet.invoke.issueCredential()`.
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { getFixture, prepareFixture } from '@learncard/credential-library';
23
+ *
24
+ * const fixture = getFixture('obv3/full-badge');
25
+ * const unsigned = prepareFixture(fixture, {
26
+ * issuerDid: wallet.id.did(),
27
+ * subjectDid: recipientDid,
28
+ * });
29
+ * const signed = await wallet.invoke.issueCredential(unsigned);
30
+ * await wallet.store.LearnCloud.uploadEncrypted(signed);
31
+ * ```
32
+ */
33
+ export declare const prepareFixture: (fixture: CredentialFixture, options: PrepareOptions) => UnsignedVC;
34
+ /**
35
+ * Shorthand that combines getFixture + prepareFixture.
36
+ *
37
+ * @example
38
+ * ```typescript
39
+ * import { prepareFixtureById } from '@learncard/credential-library';
40
+ *
41
+ * const unsigned = prepareFixtureById('boost/basic', {
42
+ * issuerDid: wallet.id.did(),
43
+ * subjectDid: recipientDid,
44
+ * });
45
+ * const signed = await wallet.invoke.issueCredential(unsigned);
46
+ * ```
47
+ */
48
+ export declare const prepareFixtureById: (fixtureId: string, options: PrepareOptions) => UnsignedVC;
49
+ //# sourceMappingURL=prepare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../src/prepare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOjD,MAAM,WAAW,cAAc;IAC3B,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAElB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAyED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,YACd,iBAAiB,WACjB,cAAc,KACxB,UA8CF,CAAC;AAMF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,kBAAkB,cAChB,MAAM,WACR,cAAc,KACxB,UAA4D,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { UnsignedVC, VC } from '@learncard/types';
2
+ import type { CredentialFixture, FixtureFilter } from './types';
3
+ export declare const registerFixture: <T extends UnsignedVC | VC>(fixture: CredentialFixture<T>) => void;
4
+ export declare const registerFixtures: (batch: CredentialFixture[]) => void;
5
+ export declare const resetRegistry: () => void;
6
+ export declare const getAllFixtures: () => readonly CredentialFixture[];
7
+ export declare const getFixture: (id: string) => CredentialFixture;
8
+ export declare const findFixture: (id: string) => CredentialFixture | undefined;
9
+ export declare const getFixtures: (filter: FixtureFilter) => CredentialFixture[];
10
+ export declare const getUnsignedFixtures: (filter?: FixtureFilter) => CredentialFixture<UnsignedVC>[];
11
+ export declare const getSignedFixtures: (filter?: FixtureFilter) => CredentialFixture<VC>[];
12
+ export declare const getValidFixtures: (filter?: FixtureFilter) => CredentialFixture[];
13
+ export declare const getInvalidFixtures: (filter?: FixtureFilter) => CredentialFixture[];
14
+ export interface RegistryStats {
15
+ total: number;
16
+ bySpec: Record<string, number>;
17
+ byProfile: Record<string, number>;
18
+ byValidity: Record<string, number>;
19
+ signed: number;
20
+ unsigned: number;
21
+ }
22
+ export declare const getStats: () => RegistryStats;
23
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAqChE,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,UAAU,GAAG,EAAE,WAAW,iBAAiB,CAAC,CAAC,CAAC,KAAG,IAO1F,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,iBAAiB,EAAE,KAAG,IAI7D,CAAC;AAMF,eAAO,MAAM,aAAa,QAAO,IAIhC,CAAC;AA8DF,eAAO,MAAM,cAAc,QAAO,SAAS,iBAAiB,EAI3D,CAAC;AAEF,eAAO,MAAM,UAAU,OAAQ,MAAM,KAAG,iBAYvC,CAAC;AAEF,eAAO,MAAM,WAAW,OAAQ,MAAM,KAAG,iBAAiB,GAAG,SAI5D,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,aAAa,KAAG,iBAAiB,EAIpE,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACnB,aAAa,KACvB,iBAAiB,CAAC,UAAU,CAAC,EACgD,CAAC;AAEjF,eAAO,MAAM,iBAAiB,YAAa,aAAa,KAAG,iBAAiB,CAAC,EAAE,CAAC,EACT,CAAC;AAExE,eAAO,MAAM,gBAAgB,YAAa,aAAa,KAAG,iBAAiB,EAC1B,CAAC;AAElD,eAAO,MAAM,kBAAkB,YAAa,aAAa,KAAG,iBAAiB,EACZ,CAAC;AAMlE,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,QAAO,aAyB3B,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { z } from 'zod';
2
+ import type { UnsignedVC, VC } from '@learncard/types';
3
+ export declare const CREDENTIAL_SPECS: readonly ["vc-v1", "vc-v2", "obv3", "clr-v2", "europass", "custom"];
4
+ export type CredentialSpec = (typeof CREDENTIAL_SPECS)[number];
5
+ export declare const CREDENTIAL_PROFILES: readonly ["badge", "diploma", "certificate", "id", "membership", "license", "micro-credential", "course", "degree", "boost", "boost-id", "delegate", "endorsement", "learner-record", "generic"];
6
+ export type CredentialProfile = (typeof CREDENTIAL_PROFILES)[number];
7
+ export declare const CREDENTIAL_FEATURES: readonly ["evidence", "alignment", "endorsement", "expiration", "status", "multiple-subjects", "multiple-proofs", "refresh-service", "terms-of-use", "credential-schema", "image", "results", "source", "skills", "display", "attachments", "associations", "nested-credentials"];
8
+ export type CredentialFeature = (typeof CREDENTIAL_FEATURES)[number];
9
+ export declare const FIXTURE_SOURCES: readonly ["spec-example", "plugfest", "real-world", "synthetic"];
10
+ export type FixtureSource = (typeof FIXTURE_SOURCES)[number];
11
+ export declare const FIXTURE_VALIDITIES: readonly ["valid", "invalid", "tampered"];
12
+ export type FixtureValidity = (typeof FIXTURE_VALIDITIES)[number];
13
+ export type InvalidCredential = Record<string, unknown>;
14
+ export interface CredentialFixture<T extends UnsignedVC | VC = UnsignedVC> {
15
+ /** Unique fixture ID, e.g. 'obv3/minimal-badge' */
16
+ id: string;
17
+ /** Human-readable name */
18
+ name: string;
19
+ /** What this fixture tests or demonstrates */
20
+ description: string;
21
+ /** Which spec it conforms to */
22
+ spec: CredentialSpec;
23
+ /** What kind of credential this represents */
24
+ profile: CredentialProfile;
25
+ /** Which optional VC features this fixture exercises */
26
+ features: CredentialFeature[];
27
+ /** Where this credential came from */
28
+ source: FixtureSource;
29
+ /** Whether this is a signed (VC with proof) or unsigned credential */
30
+ signed: boolean;
31
+ /** Whether this fixture is intentionally valid, invalid, or tampered */
32
+ validity: FixtureValidity;
33
+ /** The actual credential JSON */
34
+ credential: T;
35
+ /** Zod validator this credential should pass (if valid) or fail (if invalid) */
36
+ validator?: z.ZodType;
37
+ /** Additional free-form tags for ad-hoc filtering */
38
+ tags?: string[];
39
+ }
40
+ export interface FixtureFilter {
41
+ /** Match any of the given specs */
42
+ spec?: CredentialSpec | CredentialSpec[];
43
+ /** Match any of the given profiles */
44
+ profile?: CredentialProfile | CredentialProfile[];
45
+ /** Must have ALL of these features */
46
+ features?: CredentialFeature[];
47
+ /** Must have ANY of these features */
48
+ featuresAny?: CredentialFeature[];
49
+ /** Filter by signed status */
50
+ signed?: boolean;
51
+ /** Filter by validity */
52
+ validity?: FixtureValidity | FixtureValidity[];
53
+ /** Match any of the given sources */
54
+ source?: FixtureSource | FixtureSource[];
55
+ /** Must have ALL of these tags */
56
+ tags?: string[];
57
+ }
58
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAMvD,eAAO,MAAM,gBAAgB,qEAOnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAM/D,eAAO,MAAM,mBAAmB,kMAgBtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMrE,eAAO,MAAM,mBAAmB,mRAmBtB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMrE,eAAO,MAAM,eAAe,kEAKlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAM7D,eAAO,MAAM,kBAAkB,2CAA4C,CAAC;AAE5E,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAGlE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,E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;CACnB"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@learncard/credential-library",
3
+ "version": "1.0.2",
4
+ "description": "Comprehensive library of Verifiable Credential fixtures for testing, development, and regression prevention across the VC ecosystem",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/credential-library.esm.js",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "author": "Learning Economy Foundation (www.learningeconomy.io)",
11
+ "license": "MIT",
12
+ "homepage": "https://github.com/learningeconomy/LearnCard/tree/main/packages/credential-library/README.md",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/learningeconomy/LearnCard"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/learningeconomy/LearnCard/issues"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^17.0.38",
22
+ "esbuild": "^0.27.1",
23
+ "shx": "^0.3.4",
24
+ "typescript": "5.6.2",
25
+ "vitest": "^1.6.0",
26
+ "@learncard/didkit-plugin": "1.8.6",
27
+ "@learncard/init": "2.3.14"
28
+ },
29
+ "dependencies": {
30
+ "zod": "^3.23.8",
31
+ "@learncard/types": "5.13.6"
32
+ },
33
+ "types": "./dist/index.d.ts",
34
+ "sideEffects": false,
35
+ "scripts": {
36
+ "build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest"
39
+ }
40
+ }