@cooperation/vc-storage 1.0.43 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -0
- package/dist/models/CredentialEngine.js +38 -10
- package/dist/models/ResumeVC.js +6 -7
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/CredentialEngine.d.ts +17 -2
- package/dist/types/models/ResumeVC.d.ts +2 -1
- package/dist/types/models/WASStorage.d.ts +2 -2
- package/dist/types/utils/Ed25519Signer.d.ts +25 -0
- package/dist/types/utils/context.d.ts +30 -538
- package/dist/types/utils/credential.d.ts +21 -10
- package/dist/types/utils/customDocumentLoader.d.ts +6 -0
- package/dist/types/utils/digitalbazaar.d.ts +1 -1
- package/dist/types/utils/getOrCreateAppDID.d.ts +1 -1
- package/dist/utils/Ed25519Signer.js +71 -0
- package/dist/utils/context.js +31 -538
- package/dist/utils/credential.js +65 -41
- package/dist/utils/customDocumentLoader.js +20 -0
- package/dist/utils/decodedSeed.js +1 -1
- package/dist/utils/digitalbazaar.js +25 -11
- package/dist/utils/getOrCreateAppDID.js +1 -2
- package/package.json +7 -5
|
@@ -148,6 +148,36 @@ export declare const volunteeringCredentialContext: {
|
|
|
148
148
|
evidenceDescription: string;
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
|
+
export declare const VC_V2_CONTEXT = "https://www.w3.org/ns/credentials/v2";
|
|
152
|
+
export declare const OB_V3_CONTEXT = "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json";
|
|
153
|
+
export declare const HR_V1_CONTEXT = "https://w3id.org/hr/v1";
|
|
154
|
+
export declare const ED25519_2020_CONTEXT = "https://w3id.org/security/suites/ed25519-2020/v1";
|
|
155
|
+
/** @context array for SkillClaimCredential signing (single source of truth). */
|
|
156
|
+
export declare const skillClaimCredentialContexts: string[];
|
|
157
|
+
/** JSON-LD terms for RecommendationCredential (schema.org + VC v2). */
|
|
158
|
+
export declare const recommendationCredentialContext: {
|
|
159
|
+
'@context': {
|
|
160
|
+
recipientName: string;
|
|
161
|
+
howKnow: string;
|
|
162
|
+
recommendationText: string;
|
|
163
|
+
qualifications: string;
|
|
164
|
+
explainAnswer: string;
|
|
165
|
+
portfolio: string;
|
|
166
|
+
skillsEndorsed: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/** @context array for RecommendationCredential signing (single source of truth). */
|
|
170
|
+
export declare const recommendationCredentialContexts: (string | {
|
|
171
|
+
'@context': {
|
|
172
|
+
recipientName: string;
|
|
173
|
+
howKnow: string;
|
|
174
|
+
recommendationText: string;
|
|
175
|
+
qualifications: string;
|
|
176
|
+
explainAnswer: string;
|
|
177
|
+
portfolio: string;
|
|
178
|
+
skillsEndorsed: string;
|
|
179
|
+
};
|
|
180
|
+
})[];
|
|
151
181
|
export declare const performanceReviewCredentialContext: {
|
|
152
182
|
'@context': {
|
|
153
183
|
'@vocab': string;
|
|
@@ -177,541 +207,3 @@ export declare const performanceReviewCredentialContext: {
|
|
|
177
207
|
evidenceDescription: string;
|
|
178
208
|
};
|
|
179
209
|
};
|
|
180
|
-
declare const localOBContext: {
|
|
181
|
-
'@context': {
|
|
182
|
-
'@protected': boolean;
|
|
183
|
-
id: string;
|
|
184
|
-
type: string;
|
|
185
|
-
OpenBadgeCredential: {
|
|
186
|
-
'@id': string;
|
|
187
|
-
};
|
|
188
|
-
Achievement: {
|
|
189
|
-
'@id': string;
|
|
190
|
-
'@context': {
|
|
191
|
-
'@protected': boolean;
|
|
192
|
-
id: string;
|
|
193
|
-
type: string;
|
|
194
|
-
achievementType: {
|
|
195
|
-
'@id': string;
|
|
196
|
-
};
|
|
197
|
-
alignment: {
|
|
198
|
-
'@id': string;
|
|
199
|
-
'@container': string;
|
|
200
|
-
};
|
|
201
|
-
creator: {
|
|
202
|
-
'@id': string;
|
|
203
|
-
};
|
|
204
|
-
creditsAvailable: {
|
|
205
|
-
'@id': string;
|
|
206
|
-
'@type': string;
|
|
207
|
-
};
|
|
208
|
-
criteria: {
|
|
209
|
-
'@id': string;
|
|
210
|
-
'@type': string;
|
|
211
|
-
};
|
|
212
|
-
fieldOfStudy: {
|
|
213
|
-
'@id': string;
|
|
214
|
-
};
|
|
215
|
-
humanCode: {
|
|
216
|
-
'@id': string;
|
|
217
|
-
};
|
|
218
|
-
image: {
|
|
219
|
-
'@id': string;
|
|
220
|
-
'@type': string;
|
|
221
|
-
};
|
|
222
|
-
otherIdentifier: {
|
|
223
|
-
'@id': string;
|
|
224
|
-
'@container': string;
|
|
225
|
-
};
|
|
226
|
-
related: {
|
|
227
|
-
'@id': string;
|
|
228
|
-
'@container': string;
|
|
229
|
-
};
|
|
230
|
-
resultDescription: {
|
|
231
|
-
'@id': string;
|
|
232
|
-
'@container': string;
|
|
233
|
-
};
|
|
234
|
-
specialization: {
|
|
235
|
-
'@id': string;
|
|
236
|
-
};
|
|
237
|
-
tag: {
|
|
238
|
-
'@id': string;
|
|
239
|
-
'@container': string;
|
|
240
|
-
};
|
|
241
|
-
version: {
|
|
242
|
-
'@id': string;
|
|
243
|
-
};
|
|
244
|
-
inLanguage: {
|
|
245
|
-
'@id': string;
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
};
|
|
249
|
-
AchievementCredential: {
|
|
250
|
-
'@id': string;
|
|
251
|
-
};
|
|
252
|
-
AchievementSubject: {
|
|
253
|
-
'@id': string;
|
|
254
|
-
'@context': {
|
|
255
|
-
'@protected': boolean;
|
|
256
|
-
id: string;
|
|
257
|
-
type: string;
|
|
258
|
-
achievement: {
|
|
259
|
-
'@id': string;
|
|
260
|
-
};
|
|
261
|
-
activityEndDate: {
|
|
262
|
-
'@id': string;
|
|
263
|
-
'@type': string;
|
|
264
|
-
};
|
|
265
|
-
activityStartDate: {
|
|
266
|
-
'@id': string;
|
|
267
|
-
'@type': string;
|
|
268
|
-
};
|
|
269
|
-
creditsEarned: {
|
|
270
|
-
'@id': string;
|
|
271
|
-
'@type': string;
|
|
272
|
-
};
|
|
273
|
-
identifier: {
|
|
274
|
-
'@id': string;
|
|
275
|
-
'@container': string;
|
|
276
|
-
};
|
|
277
|
-
image: {
|
|
278
|
-
'@id': string;
|
|
279
|
-
'@type': string;
|
|
280
|
-
};
|
|
281
|
-
licenseNumber: {
|
|
282
|
-
'@id': string;
|
|
283
|
-
};
|
|
284
|
-
result: {
|
|
285
|
-
'@id': string;
|
|
286
|
-
'@container': string;
|
|
287
|
-
};
|
|
288
|
-
role: {
|
|
289
|
-
'@id': string;
|
|
290
|
-
};
|
|
291
|
-
source: {
|
|
292
|
-
'@id': string;
|
|
293
|
-
'@type': string;
|
|
294
|
-
};
|
|
295
|
-
term: {
|
|
296
|
-
'@id': string;
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
Address: {
|
|
301
|
-
'@id': string;
|
|
302
|
-
'@context': {
|
|
303
|
-
'@protected': boolean;
|
|
304
|
-
id: string;
|
|
305
|
-
type: string;
|
|
306
|
-
addressCountry: {
|
|
307
|
-
'@id': string;
|
|
308
|
-
};
|
|
309
|
-
addressCountryCode: {
|
|
310
|
-
'@id': string;
|
|
311
|
-
};
|
|
312
|
-
addressLocality: {
|
|
313
|
-
'@id': string;
|
|
314
|
-
};
|
|
315
|
-
addressRegion: {
|
|
316
|
-
'@id': string;
|
|
317
|
-
};
|
|
318
|
-
geo: {
|
|
319
|
-
'@id': string;
|
|
320
|
-
};
|
|
321
|
-
postOfficeBoxNumber: {
|
|
322
|
-
'@id': string;
|
|
323
|
-
};
|
|
324
|
-
postalCode: {
|
|
325
|
-
'@id': string;
|
|
326
|
-
};
|
|
327
|
-
streetAddress: {
|
|
328
|
-
'@id': string;
|
|
329
|
-
};
|
|
330
|
-
};
|
|
331
|
-
};
|
|
332
|
-
Alignment: {
|
|
333
|
-
'@id': string;
|
|
334
|
-
'@context': {
|
|
335
|
-
'@protected': boolean;
|
|
336
|
-
id: string;
|
|
337
|
-
type: string;
|
|
338
|
-
targetCode: {
|
|
339
|
-
'@id': string;
|
|
340
|
-
};
|
|
341
|
-
targetDescription: {
|
|
342
|
-
'@id': string;
|
|
343
|
-
};
|
|
344
|
-
targetFramework: {
|
|
345
|
-
'@id': string;
|
|
346
|
-
};
|
|
347
|
-
targetName: {
|
|
348
|
-
'@id': string;
|
|
349
|
-
};
|
|
350
|
-
targetType: {
|
|
351
|
-
'@id': string;
|
|
352
|
-
};
|
|
353
|
-
targetUrl: {
|
|
354
|
-
'@id': string;
|
|
355
|
-
'@type': string;
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
};
|
|
359
|
-
Criteria: {
|
|
360
|
-
'@id': string;
|
|
361
|
-
};
|
|
362
|
-
EndorsementCredential: {
|
|
363
|
-
'@id': string;
|
|
364
|
-
};
|
|
365
|
-
EndorsementSubject: {
|
|
366
|
-
'@id': string;
|
|
367
|
-
'@context': {
|
|
368
|
-
'@protected': boolean;
|
|
369
|
-
id: string;
|
|
370
|
-
type: string;
|
|
371
|
-
endorsementComment: {
|
|
372
|
-
'@id': string;
|
|
373
|
-
};
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
Evidence: {
|
|
377
|
-
'@id': string;
|
|
378
|
-
'@context': {
|
|
379
|
-
'@protected': boolean;
|
|
380
|
-
id: string;
|
|
381
|
-
type: string;
|
|
382
|
-
audience: {
|
|
383
|
-
'@id': string;
|
|
384
|
-
};
|
|
385
|
-
genre: {
|
|
386
|
-
'@id': string;
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
};
|
|
390
|
-
GeoCoordinates: {
|
|
391
|
-
'@id': string;
|
|
392
|
-
'@context': {
|
|
393
|
-
'@protected': boolean;
|
|
394
|
-
id: string;
|
|
395
|
-
type: string;
|
|
396
|
-
latitude: {
|
|
397
|
-
'@id': string;
|
|
398
|
-
};
|
|
399
|
-
longitude: {
|
|
400
|
-
'@id': string;
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
};
|
|
404
|
-
IdentifierEntry: {
|
|
405
|
-
'@id': string;
|
|
406
|
-
'@context': {
|
|
407
|
-
'@protected': boolean;
|
|
408
|
-
id: string;
|
|
409
|
-
type: string;
|
|
410
|
-
identifier: {
|
|
411
|
-
'@id': string;
|
|
412
|
-
};
|
|
413
|
-
identifierType: {
|
|
414
|
-
'@id': string;
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
};
|
|
418
|
-
IdentityObject: {
|
|
419
|
-
'@id': string;
|
|
420
|
-
'@context': {
|
|
421
|
-
'@protected': boolean;
|
|
422
|
-
id: string;
|
|
423
|
-
type: string;
|
|
424
|
-
hashed: {
|
|
425
|
-
'@id': string;
|
|
426
|
-
'@type': string;
|
|
427
|
-
};
|
|
428
|
-
identityHash: {
|
|
429
|
-
'@id': string;
|
|
430
|
-
};
|
|
431
|
-
identityType: {
|
|
432
|
-
'@id': string;
|
|
433
|
-
};
|
|
434
|
-
salt: {
|
|
435
|
-
'@id': string;
|
|
436
|
-
};
|
|
437
|
-
};
|
|
438
|
-
};
|
|
439
|
-
Image: {
|
|
440
|
-
'@id': string;
|
|
441
|
-
'@context': {
|
|
442
|
-
'@protected': boolean;
|
|
443
|
-
id: string;
|
|
444
|
-
type: string;
|
|
445
|
-
caption: {
|
|
446
|
-
'@id': string;
|
|
447
|
-
};
|
|
448
|
-
};
|
|
449
|
-
};
|
|
450
|
-
Profile: {
|
|
451
|
-
'@id': string;
|
|
452
|
-
'@context': {
|
|
453
|
-
'@protected': boolean;
|
|
454
|
-
id: string;
|
|
455
|
-
type: string;
|
|
456
|
-
additionalName: {
|
|
457
|
-
'@id': string;
|
|
458
|
-
};
|
|
459
|
-
address: {
|
|
460
|
-
'@id': string;
|
|
461
|
-
'@type': string;
|
|
462
|
-
};
|
|
463
|
-
dateOfBirth: {
|
|
464
|
-
'@id': string;
|
|
465
|
-
'@type': string;
|
|
466
|
-
};
|
|
467
|
-
email: {
|
|
468
|
-
'@id': string;
|
|
469
|
-
};
|
|
470
|
-
familyName: {
|
|
471
|
-
'@id': string;
|
|
472
|
-
};
|
|
473
|
-
familyNamePrefix: {
|
|
474
|
-
'@id': string;
|
|
475
|
-
};
|
|
476
|
-
givenName: {
|
|
477
|
-
'@id': string;
|
|
478
|
-
};
|
|
479
|
-
honorificPrefix: {
|
|
480
|
-
'@id': string;
|
|
481
|
-
};
|
|
482
|
-
honorificSuffix: {
|
|
483
|
-
'@id': string;
|
|
484
|
-
};
|
|
485
|
-
image: {
|
|
486
|
-
'@id': string;
|
|
487
|
-
'@type': string;
|
|
488
|
-
};
|
|
489
|
-
otherIdentifier: {
|
|
490
|
-
'@id': string;
|
|
491
|
-
'@container': string;
|
|
492
|
-
};
|
|
493
|
-
parentOrg: {
|
|
494
|
-
'@id': string;
|
|
495
|
-
'@type': string;
|
|
496
|
-
};
|
|
497
|
-
patronymicName: {
|
|
498
|
-
'@id': string;
|
|
499
|
-
};
|
|
500
|
-
phone: {
|
|
501
|
-
'@id': string;
|
|
502
|
-
};
|
|
503
|
-
official: {
|
|
504
|
-
'@id': string;
|
|
505
|
-
};
|
|
506
|
-
};
|
|
507
|
-
};
|
|
508
|
-
Related: {
|
|
509
|
-
'@id': string;
|
|
510
|
-
'@context': {
|
|
511
|
-
'@protected': boolean;
|
|
512
|
-
id: string;
|
|
513
|
-
type: string;
|
|
514
|
-
version: {
|
|
515
|
-
'@id': string;
|
|
516
|
-
};
|
|
517
|
-
inLanguage: {
|
|
518
|
-
'@id': string;
|
|
519
|
-
};
|
|
520
|
-
};
|
|
521
|
-
};
|
|
522
|
-
Result: {
|
|
523
|
-
'@id': string;
|
|
524
|
-
'@context': {
|
|
525
|
-
'@protected': boolean;
|
|
526
|
-
id: string;
|
|
527
|
-
type: string;
|
|
528
|
-
achievedLevel: {
|
|
529
|
-
'@id': string;
|
|
530
|
-
'@type': string;
|
|
531
|
-
};
|
|
532
|
-
resultDescription: {
|
|
533
|
-
'@id': string;
|
|
534
|
-
'@type': string;
|
|
535
|
-
};
|
|
536
|
-
status: {
|
|
537
|
-
'@id': string;
|
|
538
|
-
};
|
|
539
|
-
value: {
|
|
540
|
-
'@id': string;
|
|
541
|
-
};
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
ResultDescription: {
|
|
545
|
-
'@id': string;
|
|
546
|
-
'@context': {
|
|
547
|
-
'@protected': boolean;
|
|
548
|
-
id: string;
|
|
549
|
-
type: string;
|
|
550
|
-
allowedValue: {
|
|
551
|
-
'@id': string;
|
|
552
|
-
'@container': string;
|
|
553
|
-
};
|
|
554
|
-
requiredLevel: {
|
|
555
|
-
'@id': string;
|
|
556
|
-
'@type': string;
|
|
557
|
-
};
|
|
558
|
-
requiredValue: {
|
|
559
|
-
'@id': string;
|
|
560
|
-
};
|
|
561
|
-
resultType: {
|
|
562
|
-
'@id': string;
|
|
563
|
-
};
|
|
564
|
-
rubricCriterionLevel: {
|
|
565
|
-
'@id': string;
|
|
566
|
-
'@container': string;
|
|
567
|
-
};
|
|
568
|
-
valueMax: {
|
|
569
|
-
'@id': string;
|
|
570
|
-
};
|
|
571
|
-
valueMin: {
|
|
572
|
-
'@id': string;
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
};
|
|
576
|
-
RubricCriterionLevel: {
|
|
577
|
-
'@id': string;
|
|
578
|
-
'@context': {
|
|
579
|
-
'@protected': boolean;
|
|
580
|
-
id: string;
|
|
581
|
-
type: string;
|
|
582
|
-
level: {
|
|
583
|
-
'@id': string;
|
|
584
|
-
};
|
|
585
|
-
points: {
|
|
586
|
-
'@id': string;
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
|
-
};
|
|
590
|
-
alignment: {
|
|
591
|
-
'@id': string;
|
|
592
|
-
'@container': string;
|
|
593
|
-
};
|
|
594
|
-
description: {
|
|
595
|
-
'@id': string;
|
|
596
|
-
};
|
|
597
|
-
endorsement: {
|
|
598
|
-
'@id': string;
|
|
599
|
-
'@container': string;
|
|
600
|
-
};
|
|
601
|
-
image: {
|
|
602
|
-
'@id': string;
|
|
603
|
-
'@type': string;
|
|
604
|
-
};
|
|
605
|
-
inLanguage: {
|
|
606
|
-
'@id': string;
|
|
607
|
-
};
|
|
608
|
-
name: {
|
|
609
|
-
'@id': string;
|
|
610
|
-
};
|
|
611
|
-
narrative: {
|
|
612
|
-
'@id': string;
|
|
613
|
-
};
|
|
614
|
-
url: {
|
|
615
|
-
'@id': string;
|
|
616
|
-
'@type': string;
|
|
617
|
-
};
|
|
618
|
-
awardedDate: {
|
|
619
|
-
'@id': string;
|
|
620
|
-
'@type': string;
|
|
621
|
-
};
|
|
622
|
-
};
|
|
623
|
-
};
|
|
624
|
-
declare const localED25519Context: {
|
|
625
|
-
'@context': {
|
|
626
|
-
id: string;
|
|
627
|
-
type: string;
|
|
628
|
-
'@protected': boolean;
|
|
629
|
-
proof: {
|
|
630
|
-
'@id': string;
|
|
631
|
-
'@type': string;
|
|
632
|
-
'@container': string;
|
|
633
|
-
};
|
|
634
|
-
Ed25519VerificationKey2020: {
|
|
635
|
-
'@id': string;
|
|
636
|
-
'@context': {
|
|
637
|
-
'@protected': boolean;
|
|
638
|
-
id: string;
|
|
639
|
-
type: string;
|
|
640
|
-
controller: {
|
|
641
|
-
'@id': string;
|
|
642
|
-
'@type': string;
|
|
643
|
-
};
|
|
644
|
-
revoked: {
|
|
645
|
-
'@id': string;
|
|
646
|
-
'@type': string;
|
|
647
|
-
};
|
|
648
|
-
publicKeyMultibase: {
|
|
649
|
-
'@id': string;
|
|
650
|
-
'@type': string;
|
|
651
|
-
};
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
Ed25519Signature2020: {
|
|
655
|
-
'@id': string;
|
|
656
|
-
'@context': {
|
|
657
|
-
'@protected': boolean;
|
|
658
|
-
id: string;
|
|
659
|
-
type: string;
|
|
660
|
-
challenge: string;
|
|
661
|
-
created: {
|
|
662
|
-
'@id': string;
|
|
663
|
-
'@type': string;
|
|
664
|
-
};
|
|
665
|
-
domain: string;
|
|
666
|
-
expires: {
|
|
667
|
-
'@id': string;
|
|
668
|
-
'@type': string;
|
|
669
|
-
};
|
|
670
|
-
nonce: string;
|
|
671
|
-
proofPurpose: {
|
|
672
|
-
'@id': string;
|
|
673
|
-
'@type': string;
|
|
674
|
-
'@context': {
|
|
675
|
-
'@protected': boolean;
|
|
676
|
-
id: string;
|
|
677
|
-
type: string;
|
|
678
|
-
assertionMethod: {
|
|
679
|
-
'@id': string;
|
|
680
|
-
'@type': string;
|
|
681
|
-
'@container': string;
|
|
682
|
-
};
|
|
683
|
-
authentication: {
|
|
684
|
-
'@id': string;
|
|
685
|
-
'@type': string;
|
|
686
|
-
'@container': string;
|
|
687
|
-
};
|
|
688
|
-
capabilityInvocation: {
|
|
689
|
-
'@id': string;
|
|
690
|
-
'@type': string;
|
|
691
|
-
'@container': string;
|
|
692
|
-
};
|
|
693
|
-
capabilityDelegation: {
|
|
694
|
-
'@id': string;
|
|
695
|
-
'@type': string;
|
|
696
|
-
'@container': string;
|
|
697
|
-
};
|
|
698
|
-
keyAgreement: {
|
|
699
|
-
'@id': string;
|
|
700
|
-
'@type': string;
|
|
701
|
-
'@container': string;
|
|
702
|
-
};
|
|
703
|
-
};
|
|
704
|
-
};
|
|
705
|
-
proofValue: {
|
|
706
|
-
'@id': string;
|
|
707
|
-
'@type': string;
|
|
708
|
-
};
|
|
709
|
-
verificationMethod: {
|
|
710
|
-
'@id': string;
|
|
711
|
-
'@type': string;
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
};
|
|
715
|
-
};
|
|
716
|
-
};
|
|
717
|
-
export { localOBContext, localED25519Context };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { KeyPair, DidDocument, FormDataI, RecommendationFormDataI, EmploymentFormDataI, VolunteeringFormDataI, PerformanceReviewFormDataI } from '../../types';
|
|
1
|
+
import { KeyPair, DidDocument, FormDataI, RecommendationFormDataI, EvidenceItem, EmploymentFormDataI, VolunteeringFormDataI, PerformanceReviewFormDataI } from '../../types';
|
|
2
|
+
import type { ISkillClaimCredential } from 'hr-context';
|
|
2
3
|
import { IVerifiableCredential } from '@digitalcredentials/ssi';
|
|
3
4
|
/**
|
|
4
5
|
* Create a DID document using the provided key pair.
|
|
@@ -21,19 +22,14 @@ export declare function generateUnsignedVC({ formData, issuerDid }: {
|
|
|
21
22
|
issuerDid: string;
|
|
22
23
|
}): IVerifiableCredential;
|
|
23
24
|
/**
|
|
24
|
-
* Generate an unsigned Recommendation Credential.
|
|
25
|
-
* Uses the
|
|
26
|
-
* @param {object} params
|
|
27
|
-
* @param {IVerifiableCredential} params.vc - The Verifiable Credential to base the recommendation on.
|
|
28
|
-
* @param {RecommendationFormDataI} params.recommendation - The recommendation form data.
|
|
29
|
-
* @param {string} params.issuerDid - The DID of the issuer.
|
|
30
|
-
* @returns {IVerifiableCredential} The created unsigned Recommendation Credential.
|
|
31
|
-
* @throws Will throw an error if the recommendation creation fails or if issuance date exceeds expiration date.
|
|
25
|
+
* Generate an unsigned Recommendation Credential (VC Data Model v2).
|
|
26
|
+
* Uses the target skill-claim VC id on credentialSubject.id.
|
|
32
27
|
*/
|
|
33
|
-
export declare function generateUnsignedRecommendation({ vcId, recommendation, issuerDid, }: {
|
|
28
|
+
export declare function generateUnsignedRecommendation({ vcId, recommendation, issuerDid, evidence, }: {
|
|
34
29
|
vcId: string;
|
|
35
30
|
recommendation: RecommendationFormDataI;
|
|
36
31
|
issuerDid: string;
|
|
32
|
+
evidence?: EvidenceItem[];
|
|
37
33
|
}): IVerifiableCredential;
|
|
38
34
|
/**
|
|
39
35
|
* Generate an unsigned Employment Credential.
|
|
@@ -56,6 +52,21 @@ export declare function generateUnsignedPerformanceReview({ formData, issuerDid
|
|
|
56
52
|
formData: PerformanceReviewFormDataI;
|
|
57
53
|
issuerDid: string;
|
|
58
54
|
}): IVerifiableCredential;
|
|
55
|
+
/**
|
|
56
|
+
* Generate an unsigned SkillClaimCredential (HR Context / VC Data Model v2).
|
|
57
|
+
*
|
|
58
|
+
* Key differences from the legacy OpenBadgeCredential:
|
|
59
|
+
* - Uses `https://www.w3.org/ns/credentials/v2` and `https://w3id.org/hr/v1` contexts
|
|
60
|
+
* - VC subtype is `SkillClaimCredential` (not `OpenBadgeCredential`)
|
|
61
|
+
* - `credentialSubject.type` is `SkillClaim` with a `person` object and `skill` array
|
|
62
|
+
* - Evidence lives at the credential root (not inside `credentialSubject`)
|
|
63
|
+
* - No `issuanceDate`/`expirationDate` set by the author
|
|
64
|
+
* - Issuer is a plain DID string (no `type` wrapper)
|
|
65
|
+
*/
|
|
66
|
+
export declare function generateUnsignedSkillClaim({ formData, issuerDid, }: {
|
|
67
|
+
formData: ISkillClaimCredential;
|
|
68
|
+
issuerDid: string;
|
|
69
|
+
}): IVerifiableCredential;
|
|
59
70
|
/**
|
|
60
71
|
* Extracts the keypair from a Verifiable Credential
|
|
61
72
|
* @param {Object} credential - The signed Verifiable Credential
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const customDocumentLoader: (url:
|
|
1
|
+
export declare const customDocumentLoader: (url: string) => Promise<any>;
|