@learncard/vc-templates-plugin 1.0.26 → 1.0.28
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 +25 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/vc-templates-plugin.cjs.development.js +158 -1
- 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 +3 -3
- package/dist/vc-templates-plugin.esm.js +158 -1
- 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;CA4kB9F,CAAC"}
|
package/dist/types.d.ts
CHANGED
@@ -16,6 +16,24 @@ export type BoostSkills = {
|
|
16
16
|
export type BoostDisplay = {
|
17
17
|
backgroundImage?: string;
|
18
18
|
backgroundColor?: string;
|
19
|
+
fadeBackgroundImage?: boolean;
|
20
|
+
repeatBackgroundImage?: boolean;
|
21
|
+
emoji: BoostEmoji;
|
22
|
+
};
|
23
|
+
export type BoostFamilyTitleOption = {
|
24
|
+
plural: string;
|
25
|
+
singular: string;
|
26
|
+
};
|
27
|
+
export type BoostFamilyTitles = {
|
28
|
+
guardians: BoostFamilyTitleOption[];
|
29
|
+
dependents: BoostFamilyTitleOption[];
|
30
|
+
};
|
31
|
+
export type BoostEmoji = {
|
32
|
+
activeSkinTone: string;
|
33
|
+
unified: string;
|
34
|
+
unifiedWithoutSkinTone: string;
|
35
|
+
names: string[];
|
36
|
+
imageUrl: string;
|
19
37
|
};
|
20
38
|
export type BoostID = {
|
21
39
|
fontColor?: string;
|
@@ -25,8 +43,6 @@ export type BoostID = {
|
|
25
43
|
issuerThumbnail?: string;
|
26
44
|
showIssuerThumbnail?: boolean;
|
27
45
|
IDIssuerName?: string;
|
28
|
-
fadeBackgroundImage?: boolean;
|
29
|
-
repeatBackgroundImage?: boolean;
|
30
46
|
idThumbnail?: string;
|
31
47
|
accentFontColor?: string;
|
32
48
|
idBackgroundColor?: string;
|
@@ -61,6 +77,7 @@ export type BoostTemplate = {
|
|
61
77
|
attachments?: BoostAttachment[];
|
62
78
|
skills?: BoostSkills[];
|
63
79
|
display?: BoostDisplay;
|
80
|
+
familyTitles?: BoostFamilyTitles;
|
64
81
|
boostID?: BoostID;
|
65
82
|
address?: AddressSpec;
|
66
83
|
groupID?: string;
|
@@ -88,6 +105,12 @@ export type VcTemplates = {
|
|
88
105
|
};
|
89
106
|
boost: BoostTemplate;
|
90
107
|
boostID: BoostTemplate;
|
108
|
+
delegate: {
|
109
|
+
did?: string;
|
110
|
+
subject?: string;
|
111
|
+
issuanceDate?: string;
|
112
|
+
access?: ('read' | 'write')[];
|
113
|
+
};
|
91
114
|
};
|
92
115
|
/** @group VC Templates Plugin */
|
93
116
|
export type NewCredentialFunction = (args?: DiscriminatedUnionize<VcTemplates>) => UnsignedVC;
|
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,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;
|
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,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,iCAAiC;AACjC,M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iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CACjC,cAAc,EACd,GAAG,EACH,uBAAuB,EACvB,IAAI,EACJ,gCAAgC,CACnC,CAAC"}
|
@@ -126,6 +126,7 @@ var VC_TEMPLATES = {
|
|
126
126
|
achievementImage = "",
|
127
127
|
attachments,
|
128
128
|
display,
|
129
|
+
familyTitles,
|
129
130
|
skills,
|
130
131
|
groupID = ""
|
131
132
|
} = {}) => ({
|
@@ -165,6 +166,65 @@ var VC_TEMPLATES = {
|
|
165
166
|
repeatBackgroundImage: {
|
166
167
|
"@id": "lcn:boostRepeatBackgroundImage",
|
167
168
|
"@type": "xsd:boolean"
|
169
|
+
},
|
170
|
+
emoji: {
|
171
|
+
"@id": "lcn:boostEmoji",
|
172
|
+
"@context": {
|
173
|
+
activeSkinTone: {
|
174
|
+
"@id": "lcn:boostEmojiActiveSkinTone",
|
175
|
+
"@type": "xsd:string"
|
176
|
+
},
|
177
|
+
unified: {
|
178
|
+
"@id": "lcn:boostEmojiUnified",
|
179
|
+
"@type": "xsd:string"
|
180
|
+
},
|
181
|
+
unifiedWithoutSkinTone: {
|
182
|
+
"@id": "lcn:boostEmojiUnifiedWithoutSkinTone",
|
183
|
+
"@type": "xsd:string"
|
184
|
+
},
|
185
|
+
names: {
|
186
|
+
"@id": "lcn:boostEmojiNames",
|
187
|
+
"@container": "@set",
|
188
|
+
"@type": "xsd:string"
|
189
|
+
},
|
190
|
+
imageUrl: {
|
191
|
+
"@id": "lcn:boostEmojiImageUrl",
|
192
|
+
"@type": "xsd:string"
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
197
|
+
},
|
198
|
+
familyTitles: {
|
199
|
+
"@id": "lcn:familyTitles",
|
200
|
+
"@context": {
|
201
|
+
guardians: {
|
202
|
+
"@id": "lcn:guardians",
|
203
|
+
"@container": "@set",
|
204
|
+
"@context": {
|
205
|
+
plural: {
|
206
|
+
"@id": "lcn:plural",
|
207
|
+
"@type": "xsd:string"
|
208
|
+
},
|
209
|
+
singular: {
|
210
|
+
"@id": "lcn:singular",
|
211
|
+
"@type": "xsd:string"
|
212
|
+
}
|
213
|
+
}
|
214
|
+
},
|
215
|
+
dependents: {
|
216
|
+
"@id": "lcn:dependents",
|
217
|
+
"@container": "@set",
|
218
|
+
"@context": {
|
219
|
+
plural: {
|
220
|
+
"@id": "lcn:plural",
|
221
|
+
"@type": "xsd:string"
|
222
|
+
},
|
223
|
+
singular: {
|
224
|
+
"@id": "lcn:singular",
|
225
|
+
"@type": "xsd:string"
|
226
|
+
}
|
227
|
+
}
|
168
228
|
}
|
169
229
|
}
|
170
230
|
},
|
@@ -237,6 +297,7 @@ var VC_TEMPLATES = {
|
|
237
297
|
}
|
238
298
|
},
|
239
299
|
display,
|
300
|
+
familyTitles,
|
240
301
|
image: boostImage,
|
241
302
|
attachments,
|
242
303
|
skills,
|
@@ -260,6 +321,7 @@ var VC_TEMPLATES = {
|
|
260
321
|
attachments,
|
261
322
|
skills,
|
262
323
|
display,
|
324
|
+
familyTitles,
|
263
325
|
boostID,
|
264
326
|
groupID = ""
|
265
327
|
} = {}) => ({
|
@@ -299,6 +361,65 @@ var VC_TEMPLATES = {
|
|
299
361
|
repeatBackgroundImage: {
|
300
362
|
"@id": "lcn:boostRepeatBackgroundImage",
|
301
363
|
"@type": "xsd:boolean"
|
364
|
+
},
|
365
|
+
emoji: {
|
366
|
+
"@id": "lcn:boostEmoji",
|
367
|
+
"@context": {
|
368
|
+
activeSkinTone: {
|
369
|
+
"@id": "lcn:boostEmojiActiveSkinTone",
|
370
|
+
"@type": "xsd:string"
|
371
|
+
},
|
372
|
+
unified: {
|
373
|
+
"@id": "lcn:boostEmojiUnified",
|
374
|
+
"@type": "xsd:string"
|
375
|
+
},
|
376
|
+
unifiedWithoutSkinTone: {
|
377
|
+
"@id": "lcn:boostEmojiUnifiedWithoutSkinTone",
|
378
|
+
"@type": "xsd:string"
|
379
|
+
},
|
380
|
+
names: {
|
381
|
+
"@id": "lcn:boostEmojiNames",
|
382
|
+
"@container": "@set",
|
383
|
+
"@type": "xsd:string"
|
384
|
+
},
|
385
|
+
imageUrl: {
|
386
|
+
"@id": "lcn:boostEmojiImageUrl",
|
387
|
+
"@type": "xsd:string"
|
388
|
+
}
|
389
|
+
}
|
390
|
+
}
|
391
|
+
}
|
392
|
+
},
|
393
|
+
familyTitles: {
|
394
|
+
"@id": "lcn:familyTitles",
|
395
|
+
"@context": {
|
396
|
+
guardians: {
|
397
|
+
"@id": "lcn:guardians",
|
398
|
+
"@container": "@set",
|
399
|
+
"@context": {
|
400
|
+
plural: {
|
401
|
+
"@id": "lcn:plural",
|
402
|
+
"@type": "xsd:string"
|
403
|
+
},
|
404
|
+
singular: {
|
405
|
+
"@id": "lcn:singular",
|
406
|
+
"@type": "xsd:string"
|
407
|
+
}
|
408
|
+
}
|
409
|
+
},
|
410
|
+
dependents: {
|
411
|
+
"@id": "lcn:dependents",
|
412
|
+
"@container": "@set",
|
413
|
+
"@context": {
|
414
|
+
plural: {
|
415
|
+
"@id": "lcn:plural",
|
416
|
+
"@type": "xsd:string"
|
417
|
+
},
|
418
|
+
singular: {
|
419
|
+
"@id": "lcn:singular",
|
420
|
+
"@type": "xsd:string"
|
421
|
+
}
|
422
|
+
}
|
302
423
|
}
|
303
424
|
}
|
304
425
|
},
|
@@ -441,11 +562,47 @@ var VC_TEMPLATES = {
|
|
441
562
|
}
|
442
563
|
} : {},
|
443
564
|
display,
|
565
|
+
familyTitles,
|
444
566
|
image: boostImage,
|
445
567
|
attachments,
|
446
568
|
skills,
|
447
569
|
boostID,
|
448
570
|
groupID
|
571
|
+
}),
|
572
|
+
delegate: ({
|
573
|
+
did = "did:example:d23dd687a7dc6787646f2eb98d0",
|
574
|
+
subject = "did:example:d23dd687a7dc6787646f2eb98d0",
|
575
|
+
issuanceDate = new Date().toISOString(),
|
576
|
+
access = ["read"]
|
577
|
+
} = {}) => ({
|
578
|
+
"@context": [
|
579
|
+
"https://www.w3.org/2018/credentials/v1",
|
580
|
+
{
|
581
|
+
type: "@type",
|
582
|
+
xsd: "https://www.w3.org/2001/XMLSchema#",
|
583
|
+
lcn: "https://docs.learncard.com/definitions#",
|
584
|
+
DelegateCredential: {
|
585
|
+
"@id": "lcn:delegateCredential",
|
586
|
+
"@context": {
|
587
|
+
permissions: {
|
588
|
+
"@id": "lcn:delegateAccess",
|
589
|
+
"@context": {
|
590
|
+
statementAccess: {
|
591
|
+
"@id": "lcn:delegateAccess",
|
592
|
+
"@container": "@set",
|
593
|
+
"@type": "xsd:string"
|
594
|
+
}
|
595
|
+
}
|
596
|
+
}
|
597
|
+
}
|
598
|
+
}
|
599
|
+
}
|
600
|
+
],
|
601
|
+
type: ["VerifiableCredential", "DelegateCredential"],
|
602
|
+
issuer: did,
|
603
|
+
issuanceDate,
|
604
|
+
credentialSubject: { id: subject },
|
605
|
+
permissions: { statementAccess: access }
|
449
606
|
})
|
450
607
|
};
|
451
608
|
|
@@ -463,7 +620,7 @@ var getVCTemplatesPlugin = /* @__PURE__ */ __name(() => {
|
|
463
620
|
const defaults = {
|
464
621
|
did,
|
465
622
|
subject: "did:example:d23dd687a7dc6787646f2eb98d0",
|
466
|
-
issuanceDate:
|
623
|
+
issuanceDate: new Date().toISOString()
|
467
624
|
};
|
468
625
|
const { type = "basic", ...functionArgs } = args;
|
469
626
|
if (!(type in VC_TEMPLATES))
|
@@ -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 skills,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 groupID,\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 groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 idThumbnail: {\n '@id': 'lcn:boostIDThumbnail',\n '@type': 'xsd:string',\n },\n accentFontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n idBackgroundColor: {\n '@id': 'lcn:boostIDBackgroundColor',\n '@type': 'xsd:string',\n },\n repeatIdBackgroundImage: {\n '@id': 'lcn:boostIDRepeatIdBackgroundImage',\n '@type': 'xsd:boolean',\n },\n idDescription: {\n '@id': 'lcn:boostIDDescription',\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 groupID,\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 familyTitles,\n skills,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\n },\n emoji: {\n '@id': 'lcn:boostEmoji',\n '@context': {\n activeSkinTone: {\n '@id': 'lcn:boostEmojiActiveSkinTone',\n '@type': 'xsd:string',\n },\n unified: {\n '@id': 'lcn:boostEmojiUnified',\n '@type': 'xsd:string',\n },\n unifiedWithoutSkinTone: {\n '@id': 'lcn:boostEmojiUnifiedWithoutSkinTone',\n '@type': 'xsd:string',\n },\n names: {\n '@id': 'lcn:boostEmojiNames',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n imageUrl: {\n '@id': 'lcn:boostEmojiImageUrl',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n familyTitles: {\n '@id': 'lcn:familyTitles',\n '@context': {\n guardians: {\n '@id': 'lcn:guardians',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\n },\n dependents: {\n '@id': 'lcn:dependents',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 familyTitles,\n image: boostImage,\n attachments,\n skills,\n groupID,\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 familyTitles,\n boostID,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\n },\n emoji: {\n '@id': 'lcn:boostEmoji',\n '@context': {\n activeSkinTone: {\n '@id': 'lcn:boostEmojiActiveSkinTone',\n '@type': 'xsd:string',\n },\n unified: {\n '@id': 'lcn:boostEmojiUnified',\n '@type': 'xsd:string',\n },\n unifiedWithoutSkinTone: {\n '@id': 'lcn:boostEmojiUnifiedWithoutSkinTone',\n '@type': 'xsd:string',\n },\n names: {\n '@id': 'lcn:boostEmojiNames',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n imageUrl: {\n '@id': 'lcn:boostEmojiImageUrl',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n familyTitles: {\n '@id': 'lcn:familyTitles',\n '@context': {\n guardians: {\n '@id': 'lcn:guardians',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\n },\n dependents: {\n '@id': 'lcn:dependents',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 idThumbnail: {\n '@id': 'lcn:boostIDThumbnail',\n '@type': 'xsd:string',\n },\n accentFontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n idBackgroundColor: {\n '@id': 'lcn:boostIDBackgroundColor',\n '@type': 'xsd:string',\n },\n repeatIdBackgroundImage: {\n '@id': 'lcn:boostIDRepeatIdBackgroundImage',\n '@type': 'xsd:boolean',\n },\n idDescription: {\n '@id': 'lcn:boostIDDescription',\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 familyTitles,\n image: boostImage,\n attachments,\n skills,\n boostID,\n groupID,\n }),\n delegate: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = new Date().toISOString(),\n access = ['read'],\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n DelegateCredential: {\n '@id': 'lcn:delegateCredential',\n '@context': {\n permissions: {\n '@id': 'lcn:delegateAccess',\n '@context': {\n statementAccess: {\n '@id': 'lcn:delegateAccess',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'DelegateCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n permissions: { statementAccess: access },\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: new Date().toISOString(),\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,eACb;AAAA,EACI,OAAO,CAAC;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACnB,IAAI,CAAC,OAAO;AAAA,IACR,YAAY,CAAC,wCAAwC;AAAA,IACrD,IAAI;AAAA,IACJ,MAAM,CAAC,sBAAsB;AAAA,IAC7B,QAAQ;AAAA,IACR;AAAA,IACA,mBAAmB,EAAE,IAAI,QAAQ;AAAA,EACrC;AAAA,EACA,aAAa,CAAC;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,kBAAkB;AAAA,IAClB,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,eAAe;AAAA,EACnB,IAAI,CAAC,OAAsC;AAAA,IACvC,YAAY;AAAA,MACR;AAAA,MACA;AAAA,IACJ;A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a,MAAM,EAAE,GAAG,UAAU,GAAG,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
|
-
"use strict";var r=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var w=(t,e)=>r(t,"name",{value:e,configurable:!0});var B=(t,e)=>{for(var i in e)r(t,i,{get:e[i],enumerable:!0})},D=(t,e,i,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of k(e))!T.call(t,o)&&o!==i&&r(t,o,{get:()=>e[o],enumerable:!(d=v(e,o))||d.enumerable});return t};var A=t=>D(r({},"__esModule",{value:!0}),t);var S={};B(S,{getVCTemplatesPlugin:()=>f});module.exports=A(S);var x={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:o="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:o,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:o="Example Boost",boostId:n="urn:uuid:boost:example:555",boostImage:a,achievementId:l="urn:uuid:123",achievementType:c="Influencer",achievementName:p="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:m="Earned by being awesome.",achievementImage:b="",attachments:s,display:u,skills:y,groupID:h=""}={})=>({"@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"},displayType:{"@id":"lcn:boostDisplayType","@type":"xsd:string"},fadeBackgroundImage:{"@id":"lcn:boostFadeBackgroundImage","@type":"xsd:boolean"},repeatBackgroundImage:{"@id":"lcn:boostRepeatBackgroundImage","@type":"xsd:boolean"}}},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"}}},groupID:{"@id":"lcn:groupID","@type":"xsd:string"}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],issuer:t,issuanceDate:i,name:o,expirationDate:d,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:l,type:["Achievement"],achievementType:c,name:p,description:g,image:b,criteria:{narrative:m}}},display:u,image:a,attachments:s,skills:y,groupID:h}),boostID:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i="2020-08-19T21:41:50Z",expirationDate:d,boostName:o="Example Boost",boostId:n="urn:uuid:boost:example:555",boostImage:a,achievementId:l="urn:uuid:123",achievementType:c="Influencer",achievementName:p="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:m="Earned by being awesome.",achievementImage:b="",address:s,attachments:u,skills:y,display:h,boostID:I,groupID:C=""}={})=>({"@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"},displayType:{"@id":"lcn:boostDisplayType","@type":"xsd:string"},fadeBackgroundImage:{"@id":"lcn:boostFadeBackgroundImage","@type":"xsd:boolean"},repeatBackgroundImage:{"@id":"lcn:boostRepeatBackgroundImage","@type":"xsd:boolean"}}},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"}}},groupID:{"@id":"lcn:groupID","@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"},idThumbnail:{"@id":"lcn:boostIDThumbnail","@type":"xsd:string"},accentFontColor:{"@id":"lcn:boostIDFontColor","@type":"xsd:string"},idBackgroundColor:{"@id":"lcn:boostIDBackgroundColor","@type":"xsd:string"},repeatIdBackgroundImage:{"@id":"lcn:boostIDRepeatIdBackgroundImage","@type":"xsd:boolean"},idDescription:{"@id":"lcn:boostIDDescription","@type":"xsd:string"}}}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],issuer:t,issuanceDate:i,name:o,expirationDate:d,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:l,type:["Achievement"],achievementType:c,name:p,description:g,image:b,criteria:{narrative:m}}},...s?{address:{type:["Address"],...s,...s.geo?{geo:{type:["GeoCoordinates"],...s.geo}}:{}}}:{},display:h,image:a,attachments:u,skills:y,boostID:I,groupID:C})};var f=w(()=>({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:o="basic",...n}=e;if(!(o in x))throw new Error("Invalid Test VC Type!");return x[o]({...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");
|
1
|
+
"use strict";var r=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var f=(t,e)=>r(t,"name",{value:e,configurable:!0});var A=(t,e)=>{for(var i in e)r(t,i,{get:e[i],enumerable:!0})},B=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of k(e))!S.call(t,s)&&s!==i&&r(t,s,{get:()=>e[s],enumerable:!(n=T(e,s))||n.enumerable});return t};var D=t=>B(r({},"__esModule",{value:!0}),t);var j={};A(j,{getVCTemplatesPlugin:()=>I});module.exports=D(j);var w={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:n="Teamwork",description:s="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:o="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:o},description:s,name:n}}}),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:n,boostName:s="Example Boost",boostId:o="urn:uuid:boost:example:555",boostImage:a,achievementId:l="urn:uuid:123",achievementType:c="Influencer",achievementName:p="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:m="Earned by being awesome.",achievementImage:b="",attachments:d,display:u,familyTitles:y,skills:x,groupID:h=""}={})=>({"@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"},displayType:{"@id":"lcn:boostDisplayType","@type":"xsd:string"},fadeBackgroundImage:{"@id":"lcn:boostFadeBackgroundImage","@type":"xsd:boolean"},repeatBackgroundImage:{"@id":"lcn:boostRepeatBackgroundImage","@type":"xsd:boolean"},emoji:{"@id":"lcn:boostEmoji","@context":{activeSkinTone:{"@id":"lcn:boostEmojiActiveSkinTone","@type":"xsd:string"},unified:{"@id":"lcn:boostEmojiUnified","@type":"xsd:string"},unifiedWithoutSkinTone:{"@id":"lcn:boostEmojiUnifiedWithoutSkinTone","@type":"xsd:string"},names:{"@id":"lcn:boostEmojiNames","@container":"@set","@type":"xsd:string"},imageUrl:{"@id":"lcn:boostEmojiImageUrl","@type":"xsd:string"}}}}},familyTitles:{"@id":"lcn:familyTitles","@context":{guardians:{"@id":"lcn:guardians","@container":"@set","@context":{plural:{"@id":"lcn:plural","@type":"xsd:string"},singular:{"@id":"lcn:singular","@type":"xsd:string"}}},dependents:{"@id":"lcn:dependents","@container":"@set","@context":{plural:{"@id":"lcn:plural","@type":"xsd:string"},singular:{"@id":"lcn:singular","@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"}}},groupID:{"@id":"lcn:groupID","@type":"xsd:string"}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],issuer:t,issuanceDate:i,name:s,expirationDate:n,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:l,type:["Achievement"],achievementType:c,name:p,description:g,image:b,criteria:{narrative:m}}},display:u,familyTitles:y,image:a,attachments:d,skills:x,groupID:h}),boostID:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i="2020-08-19T21:41:50Z",expirationDate:n,boostName:s="Example Boost",boostId:o="urn:uuid:boost:example:555",boostImage:a,achievementId:l="urn:uuid:123",achievementType:c="Influencer",achievementName:p="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:m="Earned by being awesome.",achievementImage:b="",address:d,attachments:u,skills:y,display:x,familyTitles:h,boostID:v,groupID:C=""}={})=>({"@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"},displayType:{"@id":"lcn:boostDisplayType","@type":"xsd:string"},fadeBackgroundImage:{"@id":"lcn:boostFadeBackgroundImage","@type":"xsd:boolean"},repeatBackgroundImage:{"@id":"lcn:boostRepeatBackgroundImage","@type":"xsd:boolean"},emoji:{"@id":"lcn:boostEmoji","@context":{activeSkinTone:{"@id":"lcn:boostEmojiActiveSkinTone","@type":"xsd:string"},unified:{"@id":"lcn:boostEmojiUnified","@type":"xsd:string"},unifiedWithoutSkinTone:{"@id":"lcn:boostEmojiUnifiedWithoutSkinTone","@type":"xsd:string"},names:{"@id":"lcn:boostEmojiNames","@container":"@set","@type":"xsd:string"},imageUrl:{"@id":"lcn:boostEmojiImageUrl","@type":"xsd:string"}}}}},familyTitles:{"@id":"lcn:familyTitles","@context":{guardians:{"@id":"lcn:guardians","@container":"@set","@context":{plural:{"@id":"lcn:plural","@type":"xsd:string"},singular:{"@id":"lcn:singular","@type":"xsd:string"}}},dependents:{"@id":"lcn:dependents","@container":"@set","@context":{plural:{"@id":"lcn:plural","@type":"xsd:string"},singular:{"@id":"lcn:singular","@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"}}},groupID:{"@id":"lcn:groupID","@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"},idThumbnail:{"@id":"lcn:boostIDThumbnail","@type":"xsd:string"},accentFontColor:{"@id":"lcn:boostIDFontColor","@type":"xsd:string"},idBackgroundColor:{"@id":"lcn:boostIDBackgroundColor","@type":"xsd:string"},repeatIdBackgroundImage:{"@id":"lcn:boostIDRepeatIdBackgroundImage","@type":"xsd:boolean"},idDescription:{"@id":"lcn:boostIDDescription","@type":"xsd:string"}}}}}}],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],issuer:t,issuanceDate:i,name:s,expirationDate:n,credentialSubject:{id:e,type:["AchievementSubject"],achievement:{id:l,type:["Achievement"],achievementType:c,name:p,description:g,image:b,criteria:{narrative:m}}},...d?{address:{type:["Address"],...d,...d.geo?{geo:{type:["GeoCoordinates"],...d.geo}}:{}}}:{},display:x,familyTitles:h,image:a,attachments:u,skills:y,boostID:v,groupID:C}),delegate:({did:t="did:example:d23dd687a7dc6787646f2eb98d0",subject:e="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:i=new Date().toISOString(),access:n=["read"]}={})=>({"@context":["https://www.w3.org/2018/credentials/v1",{type:"@type",xsd:"https://www.w3.org/2001/XMLSchema#",lcn:"https://docs.learncard.com/definitions#",DelegateCredential:{"@id":"lcn:delegateCredential","@context":{permissions:{"@id":"lcn:delegateAccess","@context":{statementAccess:{"@id":"lcn:delegateAccess","@container":"@set","@type":"xsd:string"}}}}}}],type:["VerifiableCredential","DelegateCredential"],issuer:t,issuanceDate:i,credentialSubject:{id:e},permissions:{statementAccess:n}})};var I=f(()=>({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 n={did:i,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:new Date().toISOString()},{type:s="basic",...o}=e;if(!(s in w))throw new Error("Invalid Test VC Type!");return w[s]({...n,...o})},newPresentation:async(t,e,i={})=>{let n=i?.did||t.id.did();if(!n)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiablePresentation"],holder:n,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 skills,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 groupID,\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 groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 idThumbnail: {\n '@id': 'lcn:boostIDThumbnail',\n '@type': 'xsd:string',\n },\n accentFontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n idBackgroundColor: {\n '@id': 'lcn:boostIDBackgroundColor',\n '@type': 'xsd:string',\n },\n repeatIdBackgroundImage: {\n '@id': 'lcn:boostIDRepeatIdBackgroundImage',\n '@type': 'xsd:boolean',\n },\n idDescription: {\n '@id': 'lcn:boostIDDescription',\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 groupID,\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": "4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GCKO,IAAMI,
|
6
|
-
"names": ["src_exports", "__export", "getVCTemplatesPlugin", "__toCommonJS", "VC_TEMPLATES", "did", "subject", "issuanceDate", "name", "achievementName", "description", "criteriaNarrative", "expirationDate", "boostName", "boostId", "boostImage", "achievementId", "achievementType", "achievementDescription", "achievementNarrative", "achievementImage", "attachments", "display", "skills", "groupID", "address", "boostID", "getVCTemplatesPlugin", "__name", "_learnCard", "args", "did", "defaults", "type", "functionArgs", "VC_TEMPLATES", "credential"]
|
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 familyTitles,\n skills,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\n },\n emoji: {\n '@id': 'lcn:boostEmoji',\n '@context': {\n activeSkinTone: {\n '@id': 'lcn:boostEmojiActiveSkinTone',\n '@type': 'xsd:string',\n },\n unified: {\n '@id': 'lcn:boostEmojiUnified',\n '@type': 'xsd:string',\n },\n unifiedWithoutSkinTone: {\n '@id': 'lcn:boostEmojiUnifiedWithoutSkinTone',\n '@type': 'xsd:string',\n },\n names: {\n '@id': 'lcn:boostEmojiNames',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n imageUrl: {\n '@id': 'lcn:boostEmojiImageUrl',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n familyTitles: {\n '@id': 'lcn:familyTitles',\n '@context': {\n guardians: {\n '@id': 'lcn:guardians',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\n },\n dependents: {\n '@id': 'lcn:dependents',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 familyTitles,\n image: boostImage,\n attachments,\n skills,\n groupID,\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 familyTitles,\n boostID,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\n },\n emoji: {\n '@id': 'lcn:boostEmoji',\n '@context': {\n activeSkinTone: {\n '@id': 'lcn:boostEmojiActiveSkinTone',\n '@type': 'xsd:string',\n },\n unified: {\n '@id': 'lcn:boostEmojiUnified',\n '@type': 'xsd:string',\n },\n unifiedWithoutSkinTone: {\n '@id': 'lcn:boostEmojiUnifiedWithoutSkinTone',\n '@type': 'xsd:string',\n },\n names: {\n '@id': 'lcn:boostEmojiNames',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n imageUrl: {\n '@id': 'lcn:boostEmojiImageUrl',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n familyTitles: {\n '@id': 'lcn:familyTitles',\n '@context': {\n guardians: {\n '@id': 'lcn:guardians',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\n },\n dependents: {\n '@id': 'lcn:dependents',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 idThumbnail: {\n '@id': 'lcn:boostIDThumbnail',\n '@type': 'xsd:string',\n },\n accentFontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n idBackgroundColor: {\n '@id': 'lcn:boostIDBackgroundColor',\n '@type': 'xsd:string',\n },\n repeatIdBackgroundImage: {\n '@id': 'lcn:boostIDRepeatIdBackgroundImage',\n '@type': 'xsd:boolean',\n },\n idDescription: {\n '@id': 'lcn:boostIDDescription',\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 familyTitles,\n image: boostImage,\n attachments,\n skills,\n boostID,\n groupID,\n }),\n delegate: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = new Date().toISOString(),\n access = ['read'],\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n DelegateCredential: {\n '@id': 'lcn:delegateCredential',\n '@context': {\n permissions: {\n '@id': 'lcn:delegateAccess',\n '@context': {\n statementAccess: {\n '@id': 'lcn:delegateAccess',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'DelegateCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n permissions: { statementAccess: access },\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: new Date().toISOString(),\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": "4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GCKO,IAAMI,EACb,CACI,MAAO,CAAC,CACJ,IAAAC,EAAM,0CACN,QAAAC,EAAU,0CACV,aAAAC,EAAe,sBACnB,EAAI,CAAC,KAAO,CACR,WAAY,CAAC,wCAAwC,EACrD,GAAI,sCACJ,KAAM,CAAC,sBAAsB,EAC7B,OAAQF,EACR,aAAAE,EACA,kBAAmB,CAAE,GAAID,CAAQ,CACrC,GACA,YAAa,CAAC,CACV,IAAAD,EAAM,0CACN,QAAAC,EAAU,0CACV,KAAAE,EAAO,iBACP,gBAAAC,EAAkB,WAClB,YAAAC,EAAc,mGACd,kBAAAC,EAAoB,kHACpB,aAAAJ,EAAe,sBACnB,EAAI,CAAC,KAAsC,CACvC,WAAY,CACR,yCACA,4DACJ,EACA,GAAI,sCACJ,KAAM,CAAC,uBAAwB,qBAAqB,EACpD,OAAQF,EACR,aAAAE,EACA,KAAAC,EACA,kBAAmB,CACf,GAAIF,EACJ,KAAM,CAAC,oBAAoB,EAC3B,YAAa,CACT,GAAI,gEACJ,KAAM,CAAC,aAAa,EACpB,SAAU,CAAE,UAAWK,CAAkB,EACzC,YAAAD,EACA,K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ACJ,EACA,aAAc,CACV,MAAO,mBACP,WAAY,CACR,UAAW,CACP,MAAO,gBACP,aAAc,OACd,WAAY,CACR,OAAQ,CACJ,MAAO,aACP,QAAS,YACb,EACA,SAAU,CACN,MAAO,eACP,QAAS,YACb,CACJ,CACJ,EACA,WAAY,CACR,MAAO,iBACP,aAAc,OACd,WAAY,CACR,OAAQ,CACJ,MAAO,aACP,QAAS,YACb,EACA,SAAU,CACN,MAAO,eACP,QAAS,YACb,CACJ,CACJ,CACJ,CACJ,EACA,YAAa,CACT,MAAO,uBACP,aAAc,OACd,WAAY,CACR,KAAM,CACF,MAAO,0BACP,QAAS,YACb,EACA,MAAO,CACH,MAAO,2BACP,QAAS,YACb,EACA,IAAK,CACD,MAAO,yBACP,QAAS,YACb,CACJ,CACJ,EACA,OAAQ,CACJ,MAAO,kBACP,aAAc,OACd,WAAY,CACR,SAAU,CACN,MAAO,yBACP,QAAS,YACb,EACA,MAAO,CACH,MAAO,iBACP,QAAS,YACb,EACA,UAAW,CACP,MAAO,qBACP,aAAc,OACd,QAAS,YACb,CACJ,CACJ,EACA,QAAS,CACL,MAAO,cACP,QAAS,YACb,EACA,QAAS,CACL,MAAO,0DACX,CACJ,CACJ,CACJ,EACA,CACI,KAAM,QACN,IAAK,qCACL,IAAK,0CACL,QAAS,CACL,MAAO,cACP,WAAY,CACR,QAAS,CACL,MAAO,mBACP,WAAY,CACR,UAAW,CACP,MAAO,uBACP,QAAS,YACb,EACA,YAAa,CACT,MAAO,yBACP,QAAS,YACb,EACA,gBAAiB,CACb,MAAO,6BACP,QAAS,YACb,EACA,mBAAoB,CAChB,MAAO,gCACP,QAAS,aACb,EACA,gBAAiB,CACb,MAAO,6BACP,QAAS,YACb,EACA,oBAAqB,CACjB,MAAO,iCACP,QAAS,aACb,EACA,aAAc,CACV,MAAO,wBACP,QAAS,YACb,EACA,YAAa,CACT,MAAO,uBACP,QAAS,YACb,EACA,gBAAiB,CACb,MAAO,uBACP,QAAS,YACb,EACA,kB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EACJ,EC1kBO,IAAMC,EAAuBC,EAAA,KACzB,CACH,KAAM,eACN,YAAa,eACb,YAAa,4EACb,QAAS,CACL,cAAe,CAACC,EAAYC,EAAO,CAAE,KAAM,OAAQ,IAAM,CACrD,IAAMC,EAAMD,EAAK,KAAOD,EAAW,GAAG,IAAI,EAE1C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,2BAA2B,EAErD,IAAMC,EAAW,CACb,IAAAD,EACA,QAAS,0CACT,aAAc,IAAI,KAAK,EAAE,YAAY,CACzC,EAEM,CAAE,KAAAE,EAAO,WAAYC,CAAa,EAAIJ,EAE5C,GAAI,EAAEG,KAAQE,GAAe,MAAM,IAAI,MAAM,uBAAuB,EAEpE,OAAOA,EAAaF,GAAM,CAAE,GAAGD,EAAU,GAAGE,CAAa,CAAC,CAC9D,EACA,gBAAiB,MAAOL,EAAYO,EAAYN,EAAO,CAAC,IAAM,CAC1D,IAAMC,EAAMD,GAAM,KAAOD,EAAW,GAAG,IAAI,EAE3C,GAAI,CAACE,EAAK,MAAM,IAAI,MAAM,2BAA2B,EAErD,MAAO,CACH,WAAY,CAAC,wCAAwC,EACrD,KAAM,CAAC,wBAAwB,EAC/B,OAAQA,EACR,qBAAsBK,CAC1B,CACJ,CACJ,CACJ,GApCgC",
|
6
|
+
"names": ["src_exports", "__export", "getVCTemplatesPlugin", "__toCommonJS", "VC_TEMPLATES", "did", "subject", "issuanceDate", "name", "achievementName", "description", "criteriaNarrative", "expirationDate", "boostName", "boostId", "boostImage", "achievementId", "achievementType", "achievementDescription", "achievementNarrative", "achievementImage", "attachments", "display", "familyTitles", "skills", "groupID", "address", "boostID", "access", "getVCTemplatesPlugin", "__name", "_learnCard", "args", "did", "defaults", "type", "functionArgs", "VC_TEMPLATES", "credential"]
|
7
7
|
}
|
@@ -102,6 +102,7 @@ var VC_TEMPLATES = {
|
|
102
102
|
achievementImage = "",
|
103
103
|
attachments,
|
104
104
|
display,
|
105
|
+
familyTitles,
|
105
106
|
skills,
|
106
107
|
groupID = ""
|
107
108
|
} = {}) => ({
|
@@ -141,6 +142,65 @@ var VC_TEMPLATES = {
|
|
141
142
|
repeatBackgroundImage: {
|
142
143
|
"@id": "lcn:boostRepeatBackgroundImage",
|
143
144
|
"@type": "xsd:boolean"
|
145
|
+
},
|
146
|
+
emoji: {
|
147
|
+
"@id": "lcn:boostEmoji",
|
148
|
+
"@context": {
|
149
|
+
activeSkinTone: {
|
150
|
+
"@id": "lcn:boostEmojiActiveSkinTone",
|
151
|
+
"@type": "xsd:string"
|
152
|
+
},
|
153
|
+
unified: {
|
154
|
+
"@id": "lcn:boostEmojiUnified",
|
155
|
+
"@type": "xsd:string"
|
156
|
+
},
|
157
|
+
unifiedWithoutSkinTone: {
|
158
|
+
"@id": "lcn:boostEmojiUnifiedWithoutSkinTone",
|
159
|
+
"@type": "xsd:string"
|
160
|
+
},
|
161
|
+
names: {
|
162
|
+
"@id": "lcn:boostEmojiNames",
|
163
|
+
"@container": "@set",
|
164
|
+
"@type": "xsd:string"
|
165
|
+
},
|
166
|
+
imageUrl: {
|
167
|
+
"@id": "lcn:boostEmojiImageUrl",
|
168
|
+
"@type": "xsd:string"
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
},
|
174
|
+
familyTitles: {
|
175
|
+
"@id": "lcn:familyTitles",
|
176
|
+
"@context": {
|
177
|
+
guardians: {
|
178
|
+
"@id": "lcn:guardians",
|
179
|
+
"@container": "@set",
|
180
|
+
"@context": {
|
181
|
+
plural: {
|
182
|
+
"@id": "lcn:plural",
|
183
|
+
"@type": "xsd:string"
|
184
|
+
},
|
185
|
+
singular: {
|
186
|
+
"@id": "lcn:singular",
|
187
|
+
"@type": "xsd:string"
|
188
|
+
}
|
189
|
+
}
|
190
|
+
},
|
191
|
+
dependents: {
|
192
|
+
"@id": "lcn:dependents",
|
193
|
+
"@container": "@set",
|
194
|
+
"@context": {
|
195
|
+
plural: {
|
196
|
+
"@id": "lcn:plural",
|
197
|
+
"@type": "xsd:string"
|
198
|
+
},
|
199
|
+
singular: {
|
200
|
+
"@id": "lcn:singular",
|
201
|
+
"@type": "xsd:string"
|
202
|
+
}
|
203
|
+
}
|
144
204
|
}
|
145
205
|
}
|
146
206
|
},
|
@@ -213,6 +273,7 @@ var VC_TEMPLATES = {
|
|
213
273
|
}
|
214
274
|
},
|
215
275
|
display,
|
276
|
+
familyTitles,
|
216
277
|
image: boostImage,
|
217
278
|
attachments,
|
218
279
|
skills,
|
@@ -236,6 +297,7 @@ var VC_TEMPLATES = {
|
|
236
297
|
attachments,
|
237
298
|
skills,
|
238
299
|
display,
|
300
|
+
familyTitles,
|
239
301
|
boostID,
|
240
302
|
groupID = ""
|
241
303
|
} = {}) => ({
|
@@ -275,6 +337,65 @@ var VC_TEMPLATES = {
|
|
275
337
|
repeatBackgroundImage: {
|
276
338
|
"@id": "lcn:boostRepeatBackgroundImage",
|
277
339
|
"@type": "xsd:boolean"
|
340
|
+
},
|
341
|
+
emoji: {
|
342
|
+
"@id": "lcn:boostEmoji",
|
343
|
+
"@context": {
|
344
|
+
activeSkinTone: {
|
345
|
+
"@id": "lcn:boostEmojiActiveSkinTone",
|
346
|
+
"@type": "xsd:string"
|
347
|
+
},
|
348
|
+
unified: {
|
349
|
+
"@id": "lcn:boostEmojiUnified",
|
350
|
+
"@type": "xsd:string"
|
351
|
+
},
|
352
|
+
unifiedWithoutSkinTone: {
|
353
|
+
"@id": "lcn:boostEmojiUnifiedWithoutSkinTone",
|
354
|
+
"@type": "xsd:string"
|
355
|
+
},
|
356
|
+
names: {
|
357
|
+
"@id": "lcn:boostEmojiNames",
|
358
|
+
"@container": "@set",
|
359
|
+
"@type": "xsd:string"
|
360
|
+
},
|
361
|
+
imageUrl: {
|
362
|
+
"@id": "lcn:boostEmojiImageUrl",
|
363
|
+
"@type": "xsd:string"
|
364
|
+
}
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}
|
368
|
+
},
|
369
|
+
familyTitles: {
|
370
|
+
"@id": "lcn:familyTitles",
|
371
|
+
"@context": {
|
372
|
+
guardians: {
|
373
|
+
"@id": "lcn:guardians",
|
374
|
+
"@container": "@set",
|
375
|
+
"@context": {
|
376
|
+
plural: {
|
377
|
+
"@id": "lcn:plural",
|
378
|
+
"@type": "xsd:string"
|
379
|
+
},
|
380
|
+
singular: {
|
381
|
+
"@id": "lcn:singular",
|
382
|
+
"@type": "xsd:string"
|
383
|
+
}
|
384
|
+
}
|
385
|
+
},
|
386
|
+
dependents: {
|
387
|
+
"@id": "lcn:dependents",
|
388
|
+
"@container": "@set",
|
389
|
+
"@context": {
|
390
|
+
plural: {
|
391
|
+
"@id": "lcn:plural",
|
392
|
+
"@type": "xsd:string"
|
393
|
+
},
|
394
|
+
singular: {
|
395
|
+
"@id": "lcn:singular",
|
396
|
+
"@type": "xsd:string"
|
397
|
+
}
|
398
|
+
}
|
278
399
|
}
|
279
400
|
}
|
280
401
|
},
|
@@ -417,11 +538,47 @@ var VC_TEMPLATES = {
|
|
417
538
|
}
|
418
539
|
} : {},
|
419
540
|
display,
|
541
|
+
familyTitles,
|
420
542
|
image: boostImage,
|
421
543
|
attachments,
|
422
544
|
skills,
|
423
545
|
boostID,
|
424
546
|
groupID
|
547
|
+
}),
|
548
|
+
delegate: ({
|
549
|
+
did = "did:example:d23dd687a7dc6787646f2eb98d0",
|
550
|
+
subject = "did:example:d23dd687a7dc6787646f2eb98d0",
|
551
|
+
issuanceDate = new Date().toISOString(),
|
552
|
+
access = ["read"]
|
553
|
+
} = {}) => ({
|
554
|
+
"@context": [
|
555
|
+
"https://www.w3.org/2018/credentials/v1",
|
556
|
+
{
|
557
|
+
type: "@type",
|
558
|
+
xsd: "https://www.w3.org/2001/XMLSchema#",
|
559
|
+
lcn: "https://docs.learncard.com/definitions#",
|
560
|
+
DelegateCredential: {
|
561
|
+
"@id": "lcn:delegateCredential",
|
562
|
+
"@context": {
|
563
|
+
permissions: {
|
564
|
+
"@id": "lcn:delegateAccess",
|
565
|
+
"@context": {
|
566
|
+
statementAccess: {
|
567
|
+
"@id": "lcn:delegateAccess",
|
568
|
+
"@container": "@set",
|
569
|
+
"@type": "xsd:string"
|
570
|
+
}
|
571
|
+
}
|
572
|
+
}
|
573
|
+
}
|
574
|
+
}
|
575
|
+
}
|
576
|
+
],
|
577
|
+
type: ["VerifiableCredential", "DelegateCredential"],
|
578
|
+
issuer: did,
|
579
|
+
issuanceDate,
|
580
|
+
credentialSubject: { id: subject },
|
581
|
+
permissions: { statementAccess: access }
|
425
582
|
})
|
426
583
|
};
|
427
584
|
|
@@ -439,7 +596,7 @@ var getVCTemplatesPlugin = /* @__PURE__ */ __name(() => {
|
|
439
596
|
const defaults = {
|
440
597
|
did,
|
441
598
|
subject: "did:example:d23dd687a7dc6787646f2eb98d0",
|
442
|
-
issuanceDate:
|
599
|
+
issuanceDate: new Date().toISOString()
|
443
600
|
};
|
444
601
|
const { type = "basic", ...functionArgs } = args;
|
445
602
|
if (!(type in VC_TEMPLATES))
|
@@ -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 skills,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 groupID,\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 groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 idThumbnail: {\n '@id': 'lcn:boostIDThumbnail',\n '@type': 'xsd:string',\n },\n accentFontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n idBackgroundColor: {\n '@id': 'lcn:boostIDBackgroundColor',\n '@type': 'xsd:string',\n },\n repeatIdBackgroundImage: {\n '@id': 'lcn:boostIDRepeatIdBackgroundImage',\n '@type': 'xsd:boolean',\n },\n idDescription: {\n '@id': 'lcn:boostIDDescription',\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 groupID,\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 familyTitles,\n skills,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\n },\n emoji: {\n '@id': 'lcn:boostEmoji',\n '@context': {\n activeSkinTone: {\n '@id': 'lcn:boostEmojiActiveSkinTone',\n '@type': 'xsd:string',\n },\n unified: {\n '@id': 'lcn:boostEmojiUnified',\n '@type': 'xsd:string',\n },\n unifiedWithoutSkinTone: {\n '@id': 'lcn:boostEmojiUnifiedWithoutSkinTone',\n '@type': 'xsd:string',\n },\n names: {\n '@id': 'lcn:boostEmojiNames',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n imageUrl: {\n '@id': 'lcn:boostEmojiImageUrl',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n familyTitles: {\n '@id': 'lcn:familyTitles',\n '@context': {\n guardians: {\n '@id': 'lcn:guardians',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\n },\n dependents: {\n '@id': 'lcn:dependents',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 familyTitles,\n image: boostImage,\n attachments,\n skills,\n groupID,\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 familyTitles,\n boostID,\n groupID = '',\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 displayType: {\n '@id': 'lcn:boostDisplayType',\n '@type': 'xsd:string',\n },\n fadeBackgroundImage: {\n '@id': 'lcn:boostFadeBackgroundImage',\n '@type': 'xsd:boolean',\n },\n repeatBackgroundImage: {\n '@id': 'lcn:boostRepeatBackgroundImage',\n '@type': 'xsd:boolean',\n },\n emoji: {\n '@id': 'lcn:boostEmoji',\n '@context': {\n activeSkinTone: {\n '@id': 'lcn:boostEmojiActiveSkinTone',\n '@type': 'xsd:string',\n },\n unified: {\n '@id': 'lcn:boostEmojiUnified',\n '@type': 'xsd:string',\n },\n unifiedWithoutSkinTone: {\n '@id': 'lcn:boostEmojiUnifiedWithoutSkinTone',\n '@type': 'xsd:string',\n },\n names: {\n '@id': 'lcn:boostEmojiNames',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n imageUrl: {\n '@id': 'lcn:boostEmojiImageUrl',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n familyTitles: {\n '@id': 'lcn:familyTitles',\n '@context': {\n guardians: {\n '@id': 'lcn:guardians',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\n },\n dependents: {\n '@id': 'lcn:dependents',\n '@container': '@set',\n '@context': {\n plural: {\n '@id': 'lcn:plural',\n '@type': 'xsd:string',\n },\n singular: {\n '@id': 'lcn:singular',\n '@type': 'xsd:string',\n },\n },\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 groupID: {\n '@id': 'lcn:groupID',\n '@type': 'xsd:string',\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 idThumbnail: {\n '@id': 'lcn:boostIDThumbnail',\n '@type': 'xsd:string',\n },\n accentFontColor: {\n '@id': 'lcn:boostIDFontColor',\n '@type': 'xsd:string',\n },\n idBackgroundColor: {\n '@id': 'lcn:boostIDBackgroundColor',\n '@type': 'xsd:string',\n },\n repeatIdBackgroundImage: {\n '@id': 'lcn:boostIDRepeatIdBackgroundImage',\n '@type': 'xsd:boolean',\n },\n idDescription: {\n '@id': 'lcn:boostIDDescription',\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 familyTitles,\n image: boostImage,\n attachments,\n skills,\n boostID,\n groupID,\n }),\n delegate: ({\n did = 'did:example:d23dd687a7dc6787646f2eb98d0',\n subject = 'did:example:d23dd687a7dc6787646f2eb98d0',\n issuanceDate = new Date().toISOString(),\n access = ['read'],\n } = {}) => ({\n '@context': [\n 'https://www.w3.org/2018/credentials/v1',\n\n {\n type: '@type',\n xsd: 'https://www.w3.org/2001/XMLSchema#',\n lcn: 'https://docs.learncard.com/definitions#',\n DelegateCredential: {\n '@id': 'lcn:delegateCredential',\n '@context': {\n permissions: {\n '@id': 'lcn:delegateAccess',\n '@context': {\n statementAccess: {\n '@id': 'lcn:delegateAccess',\n '@container': '@set',\n '@type': 'xsd:string',\n },\n },\n },\n },\n },\n },\n ],\n type: ['VerifiableCredential', 'DelegateCredential'],\n issuer: did,\n issuanceDate,\n credentialSubject: { id: subject },\n permissions: { statementAccess: access },\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: new Date().toISOString(),\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,eACb;AAAA,EACI,OAAO,CAAC;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACnB,IAAI,CAAC,OAAO;AAAA,IACR,YAAY,CAAC,wCAAwC;AAAA,IACrD,IAAI;AAAA,IACJ,MAAM,CAAC,sBAAsB;AAAA,IAC7B,QAAQ;AAAA,IACR;AAAA,IACA,mBAAmB,EAAE,IAAI,QAAQ;AAAA,EACrC;AAAA,EACA,aAAa,CAAC;AAAA,IACV,MAAM;AAAA,IACN,UAAU;AAAA,IACV,OAAO;AAAA,IACP,kBAAkB;AAAA,IAClB,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,eAAe;AAAA,EACnB,IAAI,CAAC,OAAsC;AAAA,IACvC,YAAY;AAAA,MACR;AAAA,MACA;AAAA,IACJ;AAAA,IACA,IAAI;AAAA,IACJ,MAAM,CAAC,wBAAwB,qBAAqB;AAAA,IACpD,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,mBAAmB;AAAA,MACf,IAAI;AAAA,MACJ,MAAM,CAAC,oBAAoB;AAAA,MAC3B,aAAa;AAAA,QACT,IAAI;AAAA,QACJ,MAAM,CAAC,aAAa;AAAA,QACpB,UAAU,EAAE,WAAW,kBAAkB;AAAA,QACzC;AAAA,QACA,MAAM;AAAA,MACV;AAAA,IACJ;AAAA,EACJ;AAAA,EACA,MAAM,CAAC;AAAA,IACH,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACnB,IAAI,CAAC,OAAO;AAAA,IACR,Y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+1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@learncard/vc-templates-plugin",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.28",
|
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/types": "5.5.7",
|
34
|
+
"@learncard/core": "9.3.7"
|
35
35
|
},
|
36
36
|
"scripts": {
|
37
37
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|