@learncard/vc-templates-plugin 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/templates.d.ts.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/vc-templates-plugin.cjs.development.js +44 -10
- package/dist/vc-templates-plugin.cjs.development.js.map +2 -2
- package/dist/vc-templates-plugin.cjs.production.min.js +1 -1
- package/dist/vc-templates-plugin.cjs.production.min.js.map +2 -2
- package/dist/vc-templates-plugin.esm.js +44 -10
- package/dist/vc-templates-plugin.esm.js.map +2 -2
- package/package.json +3 -3
package/dist/templates.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiC,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,iCAAiC;AACjC,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,UAAU;
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiC,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,iCAAiC;AACjC,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,UAAU;CAsX1F,CAAC"}
|
package/dist/types.d.ts
CHANGED
@@ -7,6 +7,11 @@ export type BoostAttachment = {
|
|
7
7
|
title?: string;
|
8
8
|
url?: string;
|
9
9
|
};
|
10
|
+
export type BoostSkills = {
|
11
|
+
category: string;
|
12
|
+
skill: string;
|
13
|
+
subskills: string[];
|
14
|
+
};
|
10
15
|
/** @group VC Templates Plugin */
|
11
16
|
export type BoostDisplay = {
|
12
17
|
backgroundImage?: string;
|
@@ -47,6 +52,7 @@ export type BoostTemplate = {
|
|
47
52
|
achievementNarrative?: string;
|
48
53
|
achievementImage?: string;
|
49
54
|
attachments?: BoostAttachment[];
|
55
|
+
skills?: BoostSkills[];
|
50
56
|
display?: BoostDisplay;
|
51
57
|
boostID?: BoostID;
|
52
58
|
address?: AddressSpec;
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,iCAAiC;AACjC,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,aAAa,CAAC,EAAE,MAAM,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AM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChE,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,iCAAiC;AACjC,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC,WAAW,CAAC,KAAK,UAAU,CAAC;AAE9F,iCAAiC;AACjC,MAAM,MAAM,gCAAgC,GAAG;IAAE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,CAAA;CAAE,CAAC;AAE3F,iCAAiC;AACjC,MAAM,MAAM,uBAAuB,GAAG;IAClC,aAAa,EAAE,qBAAqB,CAAC;IACrC,eAAe,EAAE,CAAC,UAAU,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CACrF,CAAC;AAEF,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACjC,cAAc,EACd,GAAG,EACH,uBAAuB,EACvB,IAAI,EACJ,gCAAgC,CACnC,CAAC"}
|
@@ -124,7 +124,8 @@ var VC_TEMPLATES = {
|
|
124
124
|
achievementNarrative = "Earned by being awesome.",
|
125
125
|
achievementImage = "",
|
126
126
|
attachments,
|
127
|
-
display
|
127
|
+
display,
|
128
|
+
skills
|
128
129
|
} = {}) => ({
|
129
130
|
"@context": [
|
130
131
|
"https://www.w3.org/2018/credentials/v1",
|
@@ -153,10 +154,6 @@ var VC_TEMPLATES = {
|
|
153
154
|
}
|
154
155
|
}
|
155
156
|
},
|
156
|
-
image: {
|
157
|
-
"@id": "lcn:boostImage",
|
158
|
-
"@type": "xsd:string"
|
159
|
-
},
|
160
157
|
attachments: {
|
161
158
|
"@id": "lcn:boostAttachments",
|
162
159
|
"@container": "@set",
|
@@ -177,6 +174,25 @@ var VC_TEMPLATES = {
|
|
177
174
|
},
|
178
175
|
address: {
|
179
176
|
"@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"
|
177
|
+
},
|
178
|
+
skills: {
|
179
|
+
"@id": "lcn:boostSkills",
|
180
|
+
"@container": "@set",
|
181
|
+
"@context": {
|
182
|
+
category: {
|
183
|
+
"@id": "lcn:boostSkillCategory",
|
184
|
+
"@type": "xsd:string"
|
185
|
+
},
|
186
|
+
skill: {
|
187
|
+
"@id": "lcn:boostSkill",
|
188
|
+
"@type": "xsd:string"
|
189
|
+
},
|
190
|
+
subskills: {
|
191
|
+
"@id": "lcn:boostSubskills",
|
192
|
+
"@container": "@set",
|
193
|
+
"@type": "xsd:string"
|
194
|
+
}
|
195
|
+
}
|
180
196
|
}
|
181
197
|
}
|
182
198
|
}
|
@@ -204,7 +220,8 @@ var VC_TEMPLATES = {
|
|
204
220
|
},
|
205
221
|
display,
|
206
222
|
image: boostImage,
|
207
|
-
attachments
|
223
|
+
attachments,
|
224
|
+
skills
|
208
225
|
}),
|
209
226
|
boostID: ({
|
210
227
|
did = "did:example:d23dd687a7dc6787646f2eb98d0",
|
@@ -222,6 +239,7 @@ var VC_TEMPLATES = {
|
|
222
239
|
achievementImage = "",
|
223
240
|
address,
|
224
241
|
attachments,
|
242
|
+
skills,
|
225
243
|
display,
|
226
244
|
boostID
|
227
245
|
} = {}) => ({
|
@@ -252,10 +270,6 @@ var VC_TEMPLATES = {
|
|
252
270
|
}
|
253
271
|
}
|
254
272
|
},
|
255
|
-
image: {
|
256
|
-
"@id": "lcn:boostImage",
|
257
|
-
"@type": "xsd:string"
|
258
|
-
},
|
259
273
|
attachments: {
|
260
274
|
"@id": "lcn:boostAttachments",
|
261
275
|
"@container": "@set",
|
@@ -274,6 +288,25 @@ var VC_TEMPLATES = {
|
|
274
288
|
}
|
275
289
|
}
|
276
290
|
},
|
291
|
+
skills: {
|
292
|
+
"@id": "lcn:boostSkills",
|
293
|
+
"@container": "@set",
|
294
|
+
"@context": {
|
295
|
+
category: {
|
296
|
+
"@id": "lcn:boostSkillCategory",
|
297
|
+
"@type": "xsd:string"
|
298
|
+
},
|
299
|
+
skill: {
|
300
|
+
"@id": "lcn:boostSkill",
|
301
|
+
"@type": "xsd:string"
|
302
|
+
},
|
303
|
+
subskills: {
|
304
|
+
"@id": "lcn:boostSubskills",
|
305
|
+
"@container": "@set",
|
306
|
+
"@type": "xsd:string"
|
307
|
+
}
|
308
|
+
}
|
309
|
+
},
|
277
310
|
address: {
|
278
311
|
"@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"
|
279
312
|
}
|
@@ -354,6 +387,7 @@ var VC_TEMPLATES = {
|
|
354
387
|
display,
|
355
388
|
image: boostImage,
|
356
389
|
attachments,
|
390
|
+
skills,
|
357
391
|
boostID
|
358
392
|
})
|
359
393
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/index.ts", "../src/templates.ts", "../src/vc-templates.ts"],
|
4
|
-
"sourcesContent": ["export { getVCTemplatesPlugin } from './vc-templates';\nexport * from './types';\n", "import { UnsignedVC, UnsignedAchievementCredential } from '@learncard/types';\n\nimport { VcTemplates } from './types';\n\n/** @group VC Templates Plugin */\nexport const VC_TEMPLATES: { [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC } =\n{\n basic: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n id: 'http://example.org/credentials/3731',\n type: ['VerifiableCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n }),\n achievement: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n name = 'Teamwork Badge',\n achievementName = 'Teamwork',\n description = 'This badge recognizes the development of the capacity to collaborate within a group environment.',\n criteriaNarrative = 'Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}): UnsignedAchievementCredential => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n ],\n id: 'http://example.com/credentials/3527',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n issuer: did,\n issuanceDate,\n name,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: 'https://example.com/achievements/21st-century-skills/teamwork',\n type: ['Achievement'],\n criteria: { narrative: criteriaNarrative },\n description,\n name: achievementName,\n },\n },\n }),\n jff2: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json',\n 'https://w3id.org/security/suites/ed25519-2020/v1',\n ],\n id: 'urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n issuer: {\n type: ['Profile'],\n id: did,\n name: 'Jobs for the Future (JFF)',\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',\n type: 'Image',\n },\n },\n issuanceDate: issuanceDate,\n credentialSubject: {\n type: ['AchievementSubject'],\n id: subject,\n achievement: {\n id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922',\n type: ['Achievement'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n description:\n '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.',\n criteria: {\n narrative:\n '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.',\n },\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',\n type: 'Image',\n },\n },\n },\n }),\n boost: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n attachments,\n display,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n image: {\n '@id': 'lcn:boostImage',\n '@type': 'xsd:string',\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n display,\n image: boostImage,\n attachments,\n }),\n boostID: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n address,\n attachments,\n display,\n boostID,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n image: {\n '@id': 'lcn:boostImage',\n '@type': 'xsd:string',\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostID: {\n '@id': 'lcn:boostID',\n '@context': {\n boostID: {\n '@id': 'lcn:boostIDField',\n '@context': {\n fontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n accentColor: {\n '@id': 'lcn:boostIDAccentColor',\n '@type': 'xsd:string',\n },\n backgroundImage: {\n '@id': 'lcn:boostIDBackgroundImage',\n '@type': 'xsd:string',\n },\n dimBackgroundImage: {\n '@id': 'lcn:boostIDDimBackgroundImage',\n '@type': 'xsd:boolean',\n },\n issuerThumbnail: {\n '@id': 'lcn:boostIDIssuerThumbnail',\n '@type': 'xsd:string',\n },\n showIssuerThumbnail: {\n '@id': 'lcn:boostIDShowIssuerThumbnail',\n '@type': 'xsd:boolean',\n },\n IDIssuerName: {\n '@id': 'lcn:boostIDIssuerName',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential', 'BoostID'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n ...(address\n ? {\n address: {\n type: ['Address'],\n ...address,\n ...(address.geo\n ? { geo: { type: ['GeoCoordinates'], ...address.geo } }\n : {}),\n },\n }\n : {}),\n display,\n image: boostImage,\n attachments,\n boostID,\n }),\n};\n", "import { VC_TEMPLATES } from './templates';\n\nimport { VCTemplatePlugin } from './types';\n\n/**\n * @group Plugins\n */\nexport const getVCTemplatesPlugin = (): VCTemplatePlugin => {\n return {\n name: 'VC Templates',\n displayName: 'VC Templates',\n description: 'Allows for the easy creation of VCs and VPs based on predefined templates',\n methods: {\n newCredential: (_learnCard, args = { type: 'basic' }) => {\n const did = args.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n const defaults = {\n did,\n subject: 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate: '2020-08-19T21:41:50Z',\n };\n\n const { type = 'basic', ...functionArgs } = args;\n\n if (!(type in VC_TEMPLATES)) throw new Error('Invalid Test VC Type!');\n\n return VC_TEMPLATES[type]({ ...defaults, ...functionArgs });\n },\n newPresentation: async (_learnCard, credential, args = {}) => {\n const did = args?.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n return {\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential: credential,\n };\n },\n },\n };\n};\n"],
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,
|
4
|
+
"sourcesContent": ["export { getVCTemplatesPlugin } from './vc-templates';\nexport * from './types';\n", "import { UnsignedVC, UnsignedAchievementCredential } from '@learncard/types';\n\nimport { VcTemplates } from './types';\n\n/** @group VC Templates Plugin */\nexport const VC_TEMPLATES: { [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC } =\n {\n basic: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n id: 'http://example.org/credentials/3731',\n type: ['VerifiableCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n }),\n achievement: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n name = 'Teamwork Badge',\n achievementName = 'Teamwork',\n description = 'This badge recognizes the development of the capacity to collaborate within a group environment.',\n criteriaNarrative = 'Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}): UnsignedAchievementCredential => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n ],\n id: 'http://example.com/credentials/3527',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n issuer: did,\n issuanceDate,\n name,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: 'https://example.com/achievements/21st-century-skills/teamwork',\n type: ['Achievement'],\n criteria: { narrative: criteriaNarrative },\n description,\n name: achievementName,\n },\n },\n }),\n jff2: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json',\n 'https://w3id.org/security/suites/ed25519-2020/v1',\n ],\n id: 'urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n issuer: {\n type: ['Profile'],\n id: did,\n name: 'Jobs for the Future (JFF)',\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',\n type: 'Image',\n },\n },\n issuanceDate: issuanceDate,\n credentialSubject: {\n type: ['AchievementSubject'],\n id: subject,\n achievement: {\n id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922',\n type: ['Achievement'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n description:\n '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.',\n criteria: {\n narrative:\n '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.',\n },\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',\n type: 'Image',\n },\n },\n },\n }),\n boost: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n attachments,\n display,\n skills,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n skills: {\n '@id': 'lcn:boostSkills',\n '@container': '@set',\n '@context': {\n category: {\n '@id': 'lcn:boostSkillCategory',\n '@type': 'xsd:string',\n },\n skill: {\n '@id': 'lcn:boostSkill',\n '@type': 'xsd:string',\n },\n subskills: {\n '@id': 'lcn:boostSubskills',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n display,\n image: boostImage,\n attachments,\n skills,\n }),\n boostID: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n address,\n attachments,\n skills,\n display,\n boostID,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n skills: {\n '@id': 'lcn:boostSkills',\n '@container': '@set',\n '@context': {\n category: {\n '@id': 'lcn:boostSkillCategory',\n '@type': 'xsd:string',\n },\n skill: {\n '@id': 'lcn:boostSkill',\n '@type': 'xsd:string',\n },\n subskills: {\n '@id': 'lcn:boostSubskills',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostID: {\n '@id': 'lcn:boostID',\n '@context': {\n boostID: {\n '@id': 'lcn:boostIDField',\n '@context': {\n fontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n accentColor: {\n '@id': 'lcn:boostIDAccentColor',\n '@type': 'xsd:string',\n },\n backgroundImage: {\n '@id': 'lcn:boostIDBackgroundImage',\n '@type': 'xsd:string',\n },\n dimBackgroundImage: {\n '@id': 'lcn:boostIDDimBackgroundImage',\n '@type': 'xsd:boolean',\n },\n issuerThumbnail: {\n '@id': 'lcn:boostIDIssuerThumbnail',\n '@type': 'xsd:string',\n },\n showIssuerThumbnail: {\n '@id': 'lcn:boostIDShowIssuerThumbnail',\n '@type': 'xsd:boolean',\n },\n IDIssuerName: {\n '@id': 'lcn:boostIDIssuerName',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential', 'BoostID'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n ...(address\n ? {\n address: {\n type: ['Address'],\n ...address,\n ...(address.geo\n ? { geo: { type: ['GeoCoordinates'], ...address.geo } }\n : {}),\n },\n }\n : {}),\n display,\n image: boostImage,\n attachments,\n skills,\n boostID,\n }),\n };\n", "import { VC_TEMPLATES } from './templates';\n\nimport { VCTemplatePlugin } from './types';\n\n/**\n * @group Plugins\n */\nexport const getVCTemplatesPlugin = (): VCTemplatePlugin => {\n return {\n name: 'VC Templates',\n displayName: 'VC Templates',\n description: 'Allows for the easy creation of VCs and VPs based on predefined templates',\n methods: {\n newCredential: (_learnCard, args = { type: 'basic' }) => {\n const did = args.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n const defaults = {\n did,\n subject: 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate: '2020-08-19T21:41:50Z',\n };\n\n const { type = 'basic', ...functionArgs } = args;\n\n if (!(type in VC_TEMPLATES)) throw new Error('Invalid Test VC Type!');\n\n return VC_TEMPLATES[type]({ ...defaults, ...functionArgs });\n },\n newPresentation: async (_learnCard, credential, args = {}) => {\n const did = args?.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n return {\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential: credential,\n };\n },\n },\n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AM,QAAQ,IAAI,EAAE,IACpD,CAAC;AAAA,MACX;AAAA,IACJ,IACA,CAAC;AAAA,IACP;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;;;ACpXG,IAAM,uBAAuB,6BAAwB;AACxD,SAAO;AAAA,IACH,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,SAAS;AAAA,MACL,eAAe,CAAC,YAAY,OAAO,EAAE,MAAM,QAAQ,MAAM;AACrD,cAAM,MAAM,KAAK,OAAO,WAAW,GAAG,IAAI;AAE1C,YAAI,CAAC;AAAK,gBAAM,IAAI,MAAM,2BAA2B;AAErD,cAAM,WAAW;AAAA,UACb;AAAA,UACA,SAAS;AAAA,UACT,cAAc;AAAA,QAClB;AAEA,cAAM,EAAE,OAAO,YAAY,iBAAiB;AAE5C,YAAI,CAAE,SAAQ;AAAe,gBAAM,IAAI,MAAM,uBAAuB;AAEpE,eAAO,aAAa,MAAM,KAAK,aAAa,aAAa,CAAC;AAAA,MAC9D;AAAA,MACA,iBAAiB,OAAO,YAAY,YAAY,OAAO,CAAC,MAAM;AAC1D,cAAM,MAAM,MAAM,OAAO,WAAW,GAAG,IAAI;AAE3C,YAAI,CAAC;AAAK,gBAAM,IAAI,MAAM,2BAA2B;AAErD,eAAO;AAAA,UACH,YAAY,CAAC,wCAAwC;AAAA,UACrD,MAAM,CAAC,wBAAwB;AAAA,UAC/B,QAAQ;AAAA,UACR,sBAAsB;AAAA,QAC1B;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ,GArCoC;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var r=Object.defineProperty;var
|
1
|
+
var r=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var x=(t,e)=>r(t,"name",{value:e,configurable:!0});var k=(t,e)=>{for(var i in e)r(t,i,{get:e[i],enumerable:!0})},A=(t,e,i,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of I(e))!T.call(t,s)&&s!==i&&r(t,s,{get:()=>e[s],enumerable:!(d=C(e,s))||d.enumerable});return t};var B=t=>A(r({},"__esModule",{value:!0}),t);var S={};k(S,{getVCTemplatesPlugin:()=>w});module.exports=B(S);var h={basic:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i="2020-08-19T21:41:50Z"}={})=>({"@context":["https://www.w3.org/2018/credentials/v1"],id:"http://example.org/credentials/3731",type:["VerifiableCredential"],issuer:t,issuanceDate:i,credentialSubject:{id:e}}),achievement:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",name:i="Teamwork Badge",achievementName:d="Teamwork",description:s="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:n="Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.",issuanceDate:a="2020-08-19T21:41:50Z"}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json"],id:"http://example.com/credentials/3527",type:["VerifiableCredential","OpenBadgeCredential"],issuer:t,issuanceDate:a,name:i,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:"https://example.com/achievements/21st-century-skills/teamwork",type:["Achievement"],criteria:{narrative:n},description:s,name:d}}}),jff2:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i="2020-08-19T21:41:50Z"}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json","https://w3id.org/security/suites/ed25519-2020/v1"],id:"urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58",type:["VerifiableCredential","OpenBadgeCredential"],name:"JFF x vc-edu PlugFest 2 Interoperability",issuer:{type:["Profile"],id:t,name:"Jobs for the Future (JFF)",image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png",type:"Image"}},issuanceDate:i,credentialSubject:{type:["AchievementSubject"],id:e,achievement:{id:"urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922",type:["Achievement"],name:"JFF x vc-edu PlugFest 2 Interoperability",description:"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.",criteria:{narrative:"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."},image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png",type:"Image"}}}}),boost:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i="2020-08-19T21:41:50Z",expirationDate:d,boostName:s="Example Boost",boostId:n="urn:uuid:boost:example:555",boostImage:a,achievementId:l="urn:uuid:123",achievementType:c="Influencer",achievementName:p="Awesome Badge",achievementDescription:m="Awesome People Earn Awesome Badge",achievementNarrative:b="Earned by being awesome.",achievementImage:g="",attachments:o,display:u,skills:y}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json",{type:"@type",xsd:"https://www.w3.org/2001/XMLSchema#",lcn:"https://docs.learncard.com/definitions#",BoostCredential:{"@id":"lcn:boostCredential","@context":{boostId:{"@id":"lcn:boostId","@type":"xsd:string"},display:{"@id":"lcn:boostDisplay","@context":{backgroundImage:{"@id":"lcn:boostBackgroundImage","@type":"xsd:string"},backgroundColor:{"@id":"lcn:boostBackgroundColor","@type":"xsd:string"}}},attachments:{"@id":"lcn:boostAttachments","@container":"@set","@context":{type:{"@id":"lcn:boostAttachmentType","@type":"xsd:string"},title:{"@id":"lcn:boostAttachmentTitle","@type":"xsd:string"},url:{"@id":"lcn:boostAttachmentUrl","@type":"xsd:string"}}},address:{"@id":"https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"},skills:{"@id":"lcn:boostSkills","@container":"@set","@context":{category:{"@id":"lcn:boostSkillCategory","@type":"xsd:string"},skill:{"@id":"lcn:boostSkill","@type":"xsd:string"},subskills:{"@id":"lcn:boostSubskills","@container":"@set","@type":"xsd:string"}}}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],issuer:t,issuanceDate:i,name:s,expirationDate:d,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:l,type:["Achievement"],achievementType:c,name:p,description:m,image:g,criteria:{narrative:b}}},display:u,image:a,attachments:o,skills:y}),boostID:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i="2020-08-19T21:41:50Z",expirationDate:d,boostName:s="Example Boost",boostId:n="urn:uuid:boost:example:555",boostImage:a,achievementId:l="urn:uuid:123",achievementType:c="Influencer",achievementName:p="Awesome Badge",achievementDescription:m="Awesome People Earn Awesome Badge",achievementNarrative:b="Earned by being awesome.",achievementImage:g="",address:o,attachments:u,skills:y,display:f,boostID:v}={})=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json",{type:"@type",xsd:"https://www.w3.org/2001/XMLSchema#",lcn:"https://docs.learncard.com/definitions#",BoostCredential:{"@id":"lcn:boostCredential","@context":{boostId:{"@id":"lcn:boostId","@type":"xsd:string"},display:{"@id":"lcn:boostDisplay","@context":{backgroundImage:{"@id":"lcn:boostBackgroundImage","@type":"xsd:string"},backgroundColor:{"@id":"lcn:boostBackgroundColor","@type":"xsd:string"}}},attachments:{"@id":"lcn:boostAttachments","@container":"@set","@context":{type:{"@id":"lcn:boostAttachmentType","@type":"xsd:string"},title:{"@id":"lcn:boostAttachmentTitle","@type":"xsd:string"},url:{"@id":"lcn:boostAttachmentUrl","@type":"xsd:string"}}},skills:{"@id":"lcn:boostSkills","@container":"@set","@context":{category:{"@id":"lcn:boostSkillCategory","@type":"xsd:string"},skill:{"@id":"lcn:boostSkill","@type":"xsd:string"},subskills:{"@id":"lcn:boostSubskills","@container":"@set","@type":"xsd:string"}}},address:{"@id":"https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"}}}},{type:"@type",xsd:"https://www.w3.org/2001/XMLSchema#",lcn:"https://docs.learncard.com/definitions#",BoostID:{"@id":"lcn:boostID","@context":{boostID:{"@id":"lcn:boostIDField","@context":{fontColor:{"@id":"lcn:boostIDFontColor","@type":"xsd:string"},accentColor:{"@id":"lcn:boostIDAccentColor","@type":"xsd:string"},backgroundImage:{"@id":"lcn:boostIDBackgroundImage","@type":"xsd:string"},dimBackgroundImage:{"@id":"lcn:boostIDDimBackgroundImage","@type":"xsd:boolean"},issuerThumbnail:{"@id":"lcn:boostIDIssuerThumbnail","@type":"xsd:string"},showIssuerThumbnail:{"@id":"lcn:boostIDShowIssuerThumbnail","@type":"xsd:boolean"},IDIssuerName:{"@id":"lcn:boostIDIssuerName","@type":"xsd:string"}}}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],issuer:t,issuanceDate:i,name:s,expirationDate:d,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:l,type:["Achievement"],achievementType:c,name:p,description:m,image:g,criteria:{narrative:b}}},...o?{address:{type:["Address"],...o,...o.geo?{geo:{type:["GeoCoordinates"],...o.geo}}:{}}}:{},display:f,image:a,attachments:u,skills:y,boostID:v})};var w=x(()=>({name:"VC Templates",displayName:"VC Templates",description:"Allows for the easy creation of VCs and VPs based on predefined templates",methods:{newCredential:(t,e={type:"basic"})=>{let i=e.did||t.id.did();if(!i)throw new Error("Could not get issuer did!");let d={did:i,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:"2020-08-19T21:41:50Z"},{type:s="basic",...n}=e;if(!(s in h))throw new Error("Invalid Test VC Type!");return h[s]({...d,...n})},newPresentation:async(t,e,i={})=>{let d=i?.did||t.id.did();if(!d)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],holder:d,verifiableCredential:e}}}}),"getVCTemplatesPlugin");
|
2
2
|
//# sourceMappingURL=vc-templates-plugin.cjs.production.min.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/index.ts", "../src/templates.ts", "../src/vc-templates.ts"],
|
4
|
-
"sourcesContent": ["export { getVCTemplatesPlugin } from './vc-templates';\nexport * from './types';\n", "import { UnsignedVC, UnsignedAchievementCredential } from '@learncard/types';\n\nimport { VcTemplates } from './types';\n\n/** @group VC Templates Plugin */\nexport const VC_TEMPLATES: { [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC } =\n{\n basic: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n id: 'http://example.org/credentials/3731',\n type: ['VerifiableCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n }),\n achievement: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n name = 'Teamwork Badge',\n achievementName = 'Teamwork',\n description = 'This badge recognizes the development of the capacity to collaborate within a group environment.',\n criteriaNarrative = 'Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}): UnsignedAchievementCredential => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n ],\n id: 'http://example.com/credentials/3527',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n issuer: did,\n issuanceDate,\n name,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: 'https://example.com/achievements/21st-century-skills/teamwork',\n type: ['Achievement'],\n criteria: { narrative: criteriaNarrative },\n description,\n name: achievementName,\n },\n },\n }),\n jff2: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json',\n 'https://w3id.org/security/suites/ed25519-2020/v1',\n ],\n id: 'urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n issuer: {\n type: ['Profile'],\n id: did,\n name: 'Jobs for the Future (JFF)',\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',\n type: 'Image',\n },\n },\n issuanceDate: issuanceDate,\n credentialSubject: {\n type: ['AchievementSubject'],\n id: subject,\n achievement: {\n id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922',\n type: ['Achievement'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n description:\n '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.',\n criteria: {\n narrative:\n '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.',\n },\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',\n type: 'Image',\n },\n },\n },\n }),\n boost: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n attachments,\n display,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n image: {\n '@id': 'lcn:boostImage',\n '@type': 'xsd:string',\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n display,\n image: boostImage,\n attachments,\n }),\n boostID: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n address,\n attachments,\n display,\n boostID,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n image: {\n '@id': 'lcn:boostImage',\n '@type': 'xsd:string',\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostID: {\n '@id': 'lcn:boostID',\n '@context': {\n boostID: {\n '@id': 'lcn:boostIDField',\n '@context': {\n fontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n accentColor: {\n '@id': 'lcn:boostIDAccentColor',\n '@type': 'xsd:string',\n },\n backgroundImage: {\n '@id': 'lcn:boostIDBackgroundImage',\n '@type': 'xsd:string',\n },\n dimBackgroundImage: {\n '@id': 'lcn:boostIDDimBackgroundImage',\n '@type': 'xsd:boolean',\n },\n issuerThumbnail: {\n '@id': 'lcn:boostIDIssuerThumbnail',\n '@type': 'xsd:string',\n },\n showIssuerThumbnail: {\n '@id': 'lcn:boostIDShowIssuerThumbnail',\n '@type': 'xsd:boolean',\n },\n IDIssuerName: {\n '@id': 'lcn:boostIDIssuerName',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential', 'BoostID'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n ...(address\n ? {\n address: {\n type: ['Address'],\n ...address,\n ...(address.geo\n ? { geo: { type: ['GeoCoordinates'], ...address.geo } }\n : {}),\n },\n }\n : {}),\n display,\n image: boostImage,\n attachments,\n boostID,\n }),\n};\n", "import { VC_TEMPLATES } from './templates';\n\nimport { VCTemplatePlugin } from './types';\n\n/**\n * @group Plugins\n */\nexport const getVCTemplatesPlugin = (): VCTemplatePlugin => {\n return {\n name: 'VC Templates',\n displayName: 'VC Templates',\n description: 'Allows for the easy creation of VCs and VPs based on predefined templates',\n methods: {\n newCredential: (_learnCard, args = { type: 'basic' }) => {\n const did = args.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n const defaults = {\n did,\n subject: 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate: '2020-08-19T21:41:50Z',\n };\n\n const { type = 'basic', ...functionArgs } = args;\n\n if (!(type in VC_TEMPLATES)) throw new Error('Invalid Test VC Type!');\n\n return VC_TEMPLATES[type]({ ...defaults, ...functionArgs });\n },\n newPresentation: async (_learnCard, credential, args = {}) => {\n const did = args?.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n return {\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential: credential,\n };\n },\n },\n };\n};\n"],
|
5
|
-
"mappings": "+cAAA,+DCKO,GAAM,
|
4
|
+
"sourcesContent": ["export { getVCTemplatesPlugin } from './vc-templates';\nexport * from './types';\n", "import { UnsignedVC, UnsignedAchievementCredential } from '@learncard/types';\n\nimport { VcTemplates } from './types';\n\n/** @group VC Templates Plugin */\nexport const VC_TEMPLATES: { [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC } =\n {\n basic: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n id: 'http://example.org/credentials/3731',\n type: ['VerifiableCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n }),\n achievement: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n name = 'Teamwork Badge',\n achievementName = 'Teamwork',\n description = 'This badge recognizes the development of the capacity to collaborate within a group environment.',\n criteriaNarrative = 'Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}): UnsignedAchievementCredential => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n ],\n id: 'http://example.com/credentials/3527',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n issuer: did,\n issuanceDate,\n name,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: 'https://example.com/achievements/21st-century-skills/teamwork',\n type: ['Achievement'],\n criteria: { narrative: criteriaNarrative },\n description,\n name: achievementName,\n },\n },\n }),\n jff2: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json',\n 'https://w3id.org/security/suites/ed25519-2020/v1',\n ],\n id: 'urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n issuer: {\n type: ['Profile'],\n id: did,\n name: 'Jobs for the Future (JFF)',\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',\n type: 'Image',\n },\n },\n issuanceDate: issuanceDate,\n credentialSubject: {\n type: ['AchievementSubject'],\n id: subject,\n achievement: {\n id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922',\n type: ['Achievement'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n description:\n '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.',\n criteria: {\n narrative:\n '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.',\n },\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',\n type: 'Image',\n },\n },\n },\n }),\n boost: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n attachments,\n display,\n skills,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n skills: {\n '@id': 'lcn:boostSkills',\n '@container': '@set',\n '@context': {\n category: {\n '@id': 'lcn:boostSkillCategory',\n '@type': 'xsd:string',\n },\n skill: {\n '@id': 'lcn:boostSkill',\n '@type': 'xsd:string',\n },\n subskills: {\n '@id': 'lcn:boostSubskills',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n display,\n image: boostImage,\n attachments,\n skills,\n }),\n boostID: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n address,\n attachments,\n skills,\n display,\n boostID,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n skills: {\n '@id': 'lcn:boostSkills',\n '@container': '@set',\n '@context': {\n category: {\n '@id': 'lcn:boostSkillCategory',\n '@type': 'xsd:string',\n },\n skill: {\n '@id': 'lcn:boostSkill',\n '@type': 'xsd:string',\n },\n subskills: {\n '@id': 'lcn:boostSubskills',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostID: {\n '@id': 'lcn:boostID',\n '@context': {\n boostID: {\n '@id': 'lcn:boostIDField',\n '@context': {\n fontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n accentColor: {\n '@id': 'lcn:boostIDAccentColor',\n '@type': 'xsd:string',\n },\n backgroundImage: {\n '@id': 'lcn:boostIDBackgroundImage',\n '@type': 'xsd:string',\n },\n dimBackgroundImage: {\n '@id': 'lcn:boostIDDimBackgroundImage',\n '@type': 'xsd:boolean',\n },\n issuerThumbnail: {\n '@id': 'lcn:boostIDIssuerThumbnail',\n '@type': 'xsd:string',\n },\n showIssuerThumbnail: {\n '@id': 'lcn:boostIDShowIssuerThumbnail',\n '@type': 'xsd:boolean',\n },\n IDIssuerName: {\n '@id': 'lcn:boostIDIssuerName',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential', 'BoostID'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n ...(address\n ? {\n address: {\n type: ['Address'],\n ...address,\n ...(address.geo\n ? { geo: { type: ['GeoCoordinates'], ...address.geo } }\n : {}),\n },\n }\n : {}),\n display,\n image: boostImage,\n attachments,\n skills,\n boostID,\n }),\n };\n", "import { VC_TEMPLATES } from './templates';\n\nimport { VCTemplatePlugin } from './types';\n\n/**\n * @group Plugins\n */\nexport const getVCTemplatesPlugin = (): VCTemplatePlugin => {\n return {\n name: 'VC Templates',\n displayName: 'VC Templates',\n description: 'Allows for the easy creation of VCs and VPs based on predefined templates',\n methods: {\n newCredential: (_learnCard, args = { type: 'basic' }) => {\n const did = args.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n const defaults = {\n did,\n subject: 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate: '2020-08-19T21:41:50Z',\n };\n\n const { type = 'basic', ...functionArgs } = args;\n\n if (!(type in VC_TEMPLATES)) throw new Error('Invalid Test VC Type!');\n\n return VC_TEMPLATES[type]({ ...defaults, ...functionArgs });\n },\n newPresentation: async (_learnCard, credential, args = {}) => {\n const did = args?.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n return {\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential: credential,\n };\n },\n },\n };\n};\n"],
|
5
|
+
"mappings": "+cAAA,+DCKO,GAAM,GACT,CACI,MAAO,CAAC,CACJ,MAAM,0CACN,UAAU,0CACV,eAAe,wBACf,CAAC,IAAO,EACR,WAAY,CAAC,wCAAwC,EACrD,GAAI,sCACJ,KAAM,CAAC,sBAAsB,EAC7B,OAAQ,EACR,eACA,kBAAmB,CAAE,GAAI,CAAQ,CACrC,GACA,YAAa,CAAC,CACV,MAAM,0CACN,UAAU,0CACV,OAAO,iBACP,kBAAkB,WAClB,cAAc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D,CAAC,CACX,CACJ,EACA,CAAC,EACP,UACA,MAAO,EACP,cACA,SACA,SACJ,EACJ,ECpXG,GAAM,GAAuB,MACzB,EACH,KAAM,eACN,YAAa,eACb,YAAa,4EACb,QAAS,CACL,cAAe,CAAC,EAAY,EAAO,CAAE,KAAM,OAAQ,IAAM,CACrD,GAAM,GAAM,EAAK,KAAO,EAAW,GAAG,IAAI,EAE1C,GAAI,CAAC,EAAK,KAAM,IAAI,OAAM,2BAA2B,EAErD,GAAM,GAAW,CACb,MACA,QAAS,0CACT,aAAc,sBAClB,EAEM,CAAE,OAAO,WAAY,GAAiB,EAE5C,GAAI,CAAE,KAAQ,IAAe,KAAM,IAAI,OAAM,uBAAuB,EAEpE,MAAO,GAAa,GAAM,IAAK,KAAa,CAAa,CAAC,CAC9D,EACA,gBAAiB,MAAO,EAAY,EAAY,EAAO,CAAC,IAAM,CAC1D,GAAM,GAAM,GAAM,KAAO,EAAW,GAAG,IAAI,EAE3C,GAAI,CAAC,EAAK,KAAM,IAAI,OAAM,2BAA2B,EAErD,MAAO,CACH,WAAY,CAAC,wCAAwC,EACrD,KAAM,CAAC,wBAAwB,EAC/B,OAAQ,EACR,qBAAsB,CAC1B,CACJ,CACJ,CACJ,GApCgC",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -101,7 +101,8 @@ var VC_TEMPLATES = {
|
|
101
101
|
achievementNarrative = "Earned by being awesome.",
|
102
102
|
achievementImage = "",
|
103
103
|
attachments,
|
104
|
-
display
|
104
|
+
display,
|
105
|
+
skills
|
105
106
|
} = {}) => ({
|
106
107
|
"@context": [
|
107
108
|
"https://www.w3.org/2018/credentials/v1",
|
@@ -130,10 +131,6 @@ var VC_TEMPLATES = {
|
|
130
131
|
}
|
131
132
|
}
|
132
133
|
},
|
133
|
-
image: {
|
134
|
-
"@id": "lcn:boostImage",
|
135
|
-
"@type": "xsd:string"
|
136
|
-
},
|
137
134
|
attachments: {
|
138
135
|
"@id": "lcn:boostAttachments",
|
139
136
|
"@container": "@set",
|
@@ -154,6 +151,25 @@ var VC_TEMPLATES = {
|
|
154
151
|
},
|
155
152
|
address: {
|
156
153
|
"@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"
|
154
|
+
},
|
155
|
+
skills: {
|
156
|
+
"@id": "lcn:boostSkills",
|
157
|
+
"@container": "@set",
|
158
|
+
"@context": {
|
159
|
+
category: {
|
160
|
+
"@id": "lcn:boostSkillCategory",
|
161
|
+
"@type": "xsd:string"
|
162
|
+
},
|
163
|
+
skill: {
|
164
|
+
"@id": "lcn:boostSkill",
|
165
|
+
"@type": "xsd:string"
|
166
|
+
},
|
167
|
+
subskills: {
|
168
|
+
"@id": "lcn:boostSubskills",
|
169
|
+
"@container": "@set",
|
170
|
+
"@type": "xsd:string"
|
171
|
+
}
|
172
|
+
}
|
157
173
|
}
|
158
174
|
}
|
159
175
|
}
|
@@ -181,7 +197,8 @@ var VC_TEMPLATES = {
|
|
181
197
|
},
|
182
198
|
display,
|
183
199
|
image: boostImage,
|
184
|
-
attachments
|
200
|
+
attachments,
|
201
|
+
skills
|
185
202
|
}),
|
186
203
|
boostID: ({
|
187
204
|
did = "did:example:d23dd687a7dc6787646f2eb98d0",
|
@@ -199,6 +216,7 @@ var VC_TEMPLATES = {
|
|
199
216
|
achievementImage = "",
|
200
217
|
address,
|
201
218
|
attachments,
|
219
|
+
skills,
|
202
220
|
display,
|
203
221
|
boostID
|
204
222
|
} = {}) => ({
|
@@ -229,10 +247,6 @@ var VC_TEMPLATES = {
|
|
229
247
|
}
|
230
248
|
}
|
231
249
|
},
|
232
|
-
image: {
|
233
|
-
"@id": "lcn:boostImage",
|
234
|
-
"@type": "xsd:string"
|
235
|
-
},
|
236
250
|
attachments: {
|
237
251
|
"@id": "lcn:boostAttachments",
|
238
252
|
"@container": "@set",
|
@@ -251,6 +265,25 @@ var VC_TEMPLATES = {
|
|
251
265
|
}
|
252
266
|
}
|
253
267
|
},
|
268
|
+
skills: {
|
269
|
+
"@id": "lcn:boostSkills",
|
270
|
+
"@container": "@set",
|
271
|
+
"@context": {
|
272
|
+
category: {
|
273
|
+
"@id": "lcn:boostSkillCategory",
|
274
|
+
"@type": "xsd:string"
|
275
|
+
},
|
276
|
+
skill: {
|
277
|
+
"@id": "lcn:boostSkill",
|
278
|
+
"@type": "xsd:string"
|
279
|
+
},
|
280
|
+
subskills: {
|
281
|
+
"@id": "lcn:boostSubskills",
|
282
|
+
"@container": "@set",
|
283
|
+
"@type": "xsd:string"
|
284
|
+
}
|
285
|
+
}
|
286
|
+
},
|
254
287
|
address: {
|
255
288
|
"@id": "https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address"
|
256
289
|
}
|
@@ -331,6 +364,7 @@ var VC_TEMPLATES = {
|
|
331
364
|
display,
|
332
365
|
image: boostImage,
|
333
366
|
attachments,
|
367
|
+
skills,
|
334
368
|
boostID
|
335
369
|
})
|
336
370
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../src/templates.ts", "../src/vc-templates.ts"],
|
4
|
-
"sourcesContent": ["import { UnsignedVC, UnsignedAchievementCredential } from '@learncard/types';\n\nimport { VcTemplates } from './types';\n\n/** @group VC Templates Plugin */\nexport const VC_TEMPLATES: { [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC } =\n{\n basic: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n id: 'http://example.org/credentials/3731',\n type: ['VerifiableCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n }),\n achievement: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n name = 'Teamwork Badge',\n achievementName = 'Teamwork',\n description = 'This badge recognizes the development of the capacity to collaborate within a group environment.',\n criteriaNarrative = 'Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}): UnsignedAchievementCredential => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n ],\n id: 'http://example.com/credentials/3527',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n issuer: did,\n issuanceDate,\n name,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: 'https://example.com/achievements/21st-century-skills/teamwork',\n type: ['Achievement'],\n criteria: { narrative: criteriaNarrative },\n description,\n name: achievementName,\n },\n },\n }),\n jff2: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json',\n 'https://w3id.org/security/suites/ed25519-2020/v1',\n ],\n id: 'urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n issuer: {\n type: ['Profile'],\n id: did,\n name: 'Jobs for the Future (JFF)',\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',\n type: 'Image',\n },\n },\n issuanceDate: issuanceDate,\n credentialSubject: {\n type: ['AchievementSubject'],\n id: subject,\n achievement: {\n id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922',\n type: ['Achievement'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n description:\n '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.',\n criteria: {\n narrative:\n '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.',\n },\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',\n type: 'Image',\n },\n },\n },\n }),\n boost: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n attachments,\n display,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n image: {\n '@id': 'lcn:boostImage',\n '@type': 'xsd:string',\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n display,\n image: boostImage,\n attachments,\n }),\n boostID: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n address,\n attachments,\n display,\n boostID,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n image: {\n '@id': 'lcn:boostImage',\n '@type': 'xsd:string',\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostID: {\n '@id': 'lcn:boostID',\n '@context': {\n boostID: {\n '@id': 'lcn:boostIDField',\n '@context': {\n fontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n accentColor: {\n '@id': 'lcn:boostIDAccentColor',\n '@type': 'xsd:string',\n },\n backgroundImage: {\n '@id': 'lcn:boostIDBackgroundImage',\n '@type': 'xsd:string',\n },\n dimBackgroundImage: {\n '@id': 'lcn:boostIDDimBackgroundImage',\n '@type': 'xsd:boolean',\n },\n issuerThumbnail: {\n '@id': 'lcn:boostIDIssuerThumbnail',\n '@type': 'xsd:string',\n },\n showIssuerThumbnail: {\n '@id': 'lcn:boostIDShowIssuerThumbnail',\n '@type': 'xsd:boolean',\n },\n IDIssuerName: {\n '@id': 'lcn:boostIDIssuerName',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential', 'BoostID'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n ...(address\n ? {\n address: {\n type: ['Address'],\n ...address,\n ...(address.geo\n ? { geo: { type: ['GeoCoordinates'], ...address.geo } }\n : {}),\n },\n }\n : {}),\n display,\n image: boostImage,\n attachments,\n boostID,\n }),\n};\n", "import { VC_TEMPLATES } from './templates';\n\nimport { VCTemplatePlugin } from './types';\n\n/**\n * @group Plugins\n */\nexport const getVCTemplatesPlugin = (): VCTemplatePlugin => {\n return {\n name: 'VC Templates',\n displayName: 'VC Templates',\n description: 'Allows for the easy creation of VCs and VPs based on predefined templates',\n methods: {\n newCredential: (_learnCard, args = { type: 'basic' }) => {\n const did = args.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n const defaults = {\n did,\n subject: 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate: '2020-08-19T21:41:50Z',\n };\n\n const { type = 'basic', ...functionArgs } = args;\n\n if (!(type in VC_TEMPLATES)) throw new Error('Invalid Test VC Type!');\n\n return VC_TEMPLATES[type]({ ...defaults, ...functionArgs });\n },\n newPresentation: async (_learnCard, credential, args = {}) => {\n const did = args?.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n return {\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential: credential,\n };\n },\n },\n };\n};\n"],
|
5
|
-
"mappings": ";;;;AAKO,IAAM,
|
4
|
+
"sourcesContent": ["import { UnsignedVC, UnsignedAchievementCredential } from '@learncard/types';\n\nimport { VcTemplates } from './types';\n\n/** @group VC Templates Plugin */\nexport const VC_TEMPLATES: { [Key in keyof VcTemplates]: (args: VcTemplates[Key]) => UnsignedVC } =\n {\n basic: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n id: 'http://example.org/credentials/3731',\n type: ['VerifiableCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n }),\n achievement: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n name = 'Teamwork Badge',\n achievementName = 'Teamwork',\n description = 'This badge recognizes the development of the capacity to collaborate within a group environment.',\n criteriaNarrative = 'Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}): UnsignedAchievementCredential => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n ],\n id: 'http://example.com/credentials/3527',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n issuer: did,\n issuanceDate,\n name,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: 'https://example.com/achievements/21st-century-skills/teamwork',\n type: ['Achievement'],\n criteria: { narrative: criteriaNarrative },\n description,\n name: achievementName,\n },\n },\n }),\n jff2: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context.json',\n 'https://w3id.org/security/suites/ed25519-2020/v1',\n ],\n id: 'urn:uuid:a63a60be-f4af-491c-87fc-2c8fd3007a58',\n type: ['VerifiableCredential', 'OpenBadgeCredential'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n issuer: {\n type: ['Profile'],\n id: did,\n name: 'Jobs for the Future (JFF)',\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png',\n type: 'Image',\n },\n },\n issuanceDate: issuanceDate,\n credentialSubject: {\n type: ['AchievementSubject'],\n id: subject,\n achievement: {\n id: 'urn:uuid:bd6d9316-f7ae-4073-a1e5-2f7f5bd22922',\n type: ['Achievement'],\n name: 'JFF x vc-edu PlugFest 2 Interoperability',\n description:\n '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.',\n criteria: {\n narrative:\n '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.',\n },\n image: {\n id: 'https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png',\n type: 'Image',\n },\n },\n },\n }),\n boost: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n attachments,\n display,\n skills,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n skills: {\n '@id': 'lcn:boostSkills',\n '@container': '@set',\n '@context': {\n category: {\n '@id': 'lcn:boostSkillCategory',\n '@type': 'xsd:string',\n },\n skill: {\n '@id': 'lcn:boostSkill',\n '@type': 'xsd:string',\n },\n subskills: {\n '@id': 'lcn:boostSubskills',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n display,\n image: boostImage,\n attachments,\n skills,\n }),\n boostID: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = '2020-08-19T21:41:50Z',\n expirationDate,\n boostName = 'Example Boost',\n boostId = 'urn:uuid:boost:example:555',\n boostImage,\n achievementId = 'urn:uuid:123',\n achievementType = 'Influencer',\n achievementName = 'Awesome Badge',\n achievementDescription = 'Awesome People Earn Awesome Badge',\n achievementNarrative = 'Earned by being awesome.',\n achievementImage = '',\n address,\n attachments,\n skills,\n display,\n boostID,\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n 'https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.2.json',\n {\n // id: '@id',\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostCredential: {\n '@id': 'lcn:boostCredential',\n '@context': {\n boostId: {\n '@id': 'lcn:boostId',\n '@type': 'xsd:string',\n },\n display: {\n '@id': 'lcn:boostDisplay',\n '@context': {\n backgroundImage: {\n '@id': 'lcn:boostBackgroundImage',\n '@type': 'xsd:string',\n },\n backgroundColor: {\n '@id': 'lcn:boostBackgroundColor',\n '@type': 'xsd:string',\n },\n },\n },\n attachments: {\n '@id': 'lcn:boostAttachments',\n '@container': '@set',\n '@context': {\n type: {\n '@id': 'lcn:boostAttachmentType',\n '@type': 'xsd:string',\n },\n title: {\n '@id': 'lcn:boostAttachmentTitle',\n '@type': 'xsd:string',\n },\n url: {\n '@id': 'lcn:boostAttachmentUrl',\n '@type': 'xsd:string',\n },\n },\n },\n skills: {\n '@id': 'lcn:boostSkills',\n '@container': '@set',\n '@context': {\n category: {\n '@id': 'lcn:boostSkillCategory',\n '@type': 'xsd:string',\n },\n skill: {\n '@id': 'lcn:boostSkill',\n '@type': 'xsd:string',\n },\n subskills: {\n '@id': 'lcn:boostSubskills',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n address: {\n '@id': 'https://purl.imsglobal.org/spec/vc/ob/vocab.html#Address',\n },\n },\n },\n },\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n BoostID: {\n '@id': 'lcn:boostID',\n '@context': {\n boostID: {\n '@id': 'lcn:boostIDField',\n '@context': {\n fontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n accentColor: {\n '@id': 'lcn:boostIDAccentColor',\n '@type': 'xsd:string',\n },\n backgroundImage: {\n '@id': 'lcn:boostIDBackgroundImage',\n '@type': 'xsd:string',\n },\n dimBackgroundImage: {\n '@id': 'lcn:boostIDDimBackgroundImage',\n '@type': 'xsd:boolean',\n },\n issuerThumbnail: {\n '@id': 'lcn:boostIDIssuerThumbnail',\n '@type': 'xsd:string',\n },\n showIssuerThumbnail: {\n '@id': 'lcn:boostIDShowIssuerThumbnail',\n '@type': 'xsd:boolean',\n },\n IDIssuerName: {\n '@id': 'lcn:boostIDIssuerName',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'OpenBadgeCredential', 'BoostCredential', 'BoostID'],\n issuer: did,\n issuanceDate,\n name: boostName,\n expirationDate,\n credentialSubject: {\n id: subject,\n type: ['AchievementSubject'],\n achievement: {\n id: achievementId,\n type: ['Achievement'],\n achievementType: achievementType,\n name: achievementName,\n description: achievementDescription,\n image: achievementImage,\n criteria: {\n narrative: achievementNarrative,\n },\n },\n },\n ...(address\n ? {\n address: {\n type: ['Address'],\n ...address,\n ...(address.geo\n ? { geo: { type: ['GeoCoordinates'], ...address.geo } }\n : {}),\n },\n }\n : {}),\n display,\n image: boostImage,\n attachments,\n skills,\n boostID,\n }),\n };\n", "import { VC_TEMPLATES } from './templates';\n\nimport { VCTemplatePlugin } from './types';\n\n/**\n * @group Plugins\n */\nexport const getVCTemplatesPlugin = (): VCTemplatePlugin => {\n return {\n name: 'VC Templates',\n displayName: 'VC Templates',\n description: 'Allows for the easy creation of VCs and VPs based on predefined templates',\n methods: {\n newCredential: (_learnCard, args = { type: 'basic' }) => {\n const did = args.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n const defaults = {\n did,\n subject: 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate: '2020-08-19T21:41:50Z',\n };\n\n const { type = 'basic', ...functionArgs } = args;\n\n if (!(type in VC_TEMPLATES)) throw new Error('Invalid Test VC Type!');\n\n return VC_TEMPLATES[type]({ ...defaults, ...functionArgs });\n },\n newPresentation: async (_learnCard, credential, args = {}) => {\n const did = args?.did || _learnCard.id.did();\n\n if (!did) throw new Error('Could not get issuer did!');\n\n return {\n '@context': ['https://www.w3.org/2018/credentials/v1'],\n type: ['VerifiablePresentation'],\n holder: did,\n verifiableCredential: credential,\n };\n },\n },\n };\n};\n"],
|
5
|
+
"mappings": ";;;;AAKO,IAAM,eACT;AAAA,EACI,OAAO,CAAC;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;A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B;AACxD,SAAO;AAAA,IACH,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,SAAS;AAAA,MACL,eAAe,CAAC,YAAY,OAAO,EAAE,MAAM,QAAQ,MAAM;AACrD,cAAM,MAAM,KAAK,OAAO,WAAW,GAAG,IAAI;AAE1C,YAAI,CAAC;AAAK,gBAAM,IAAI,MAAM,2BAA2B;AAErD,cAAM,WAAW;AAAA,UACb;AAAA,UACA,SAAS;AAAA,UACT,cAAc;AAAA,QAClB;AAEA,cAAM,EAAE,OAAO,YAAY,iBAAiB;AAE5C,YAAI,CAAE,SAAQ;AAAe,gBAAM,IAAI,MAAM,uBAAuB;AAEpE,eAAO,aAAa,MAAM,KAAK,aAAa,aAAa,CAAC;AAAA,MAC9D;AAAA,MACA,iBAAiB,OAAO,YAAY,YAAY,OAAO,CAAC,MAAM;AAC1D,cAAM,MAAM,MAAM,OAAO,WAAW,GAAG,IAAI;AAE3C,YAAI,CAAC;AAAK,gBAAM,IAAI,MAAM,2BAA2B;AAErD,eAAO;AAAA,UACH,YAAY,CAAC,wCAAwC;AAAA,UACrD,MAAM,CAAC,wBAAwB;AAAA,UAC/B,QAAQ;AAAA,UACR,sBAAsB;AAAA,QAC1B;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ,GArCoC;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@learncard/vc-templates-plugin",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.12",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/vc-templates-plugin.esm.js",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
},
|
31
31
|
"types": "./dist/index.d.ts",
|
32
32
|
"dependencies": {
|
33
|
-
"@learncard/
|
34
|
-
"@learncard/
|
33
|
+
"@learncard/core": "9.1.4",
|
34
|
+
"@learncard/types": "5.4.1"
|
35
35
|
},
|
36
36
|
"scripts": {
|
37
37
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|