@learncard/vc-plugin 1.5.10 → 1.5.12
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/helpers.d.ts.map +1 -1
- package/dist/issueCredential.d.ts.map +1 -1
- package/dist/issuePresentation.d.ts.map +1 -1
- package/dist/vc.d.ts.map +1 -1
- package/dist/verifyCredential.d.ts.map +1 -1
- package/dist/verifyPresentation.d.ts.map +1 -1
- package/package.json +8 -12
- package/src/issueCredential.test.ts +6 -5
package/dist/helpers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAI9C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAI9C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACrC,WAAW,mBAAmB,EAC9B,WAAW,MAAM,oBAmCpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issueCredential.d.ts","sourceRoot":"","sources":["../src/issueCredential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGpE,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"issueCredential.d.ts","sourceRoot":"","sources":["../src/issueCredential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGpE,eAAO,MAAM,eAAe,GAAI,eAAe,oBAAoB,MAE3D,WAAW,mBAAmB,EAC9B,YAAY,UAAU,EACtB,iBAAgB,OAAO,CAAC,YAAY,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuePresentation.d.ts","sourceRoot":"","sources":["../src/issuePresentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGpE,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"issuePresentation.d.ts","sourceRoot":"","sources":["../src/issuePresentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGpE,eAAO,MAAM,iBAAiB,GAAI,eAAe,oBAAoB,MAE7D,WAAW,mBAAmB,EAC9B,cAAc,UAAU,EACxB,iBAAgB,OAAO,CAAC,YAAY,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCjD,CAAC"}
|
package/dist/vc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc.d.ts","sourceRoot":"","sources":["../src/vc.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGzD;;GAEG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"vc.d.ts","sourceRoot":"","sources":["../src/vc.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGzD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,WAAW,oBAAoB,KAAG,QAoD7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyCredential.d.ts","sourceRoot":"","sources":["../src/verifyCredential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"verifyCredential.d.ts","sourceRoot":"","sources":["../src/verifyCredential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,gBAAgB,GAAI,eAAe,oBAAoB,MAE5D,YAAY,mBAAmB,EAC/B,YAAY,EAAE,EACd,WAAU,OAAO,CAAC,YAAY,CAAM;;;;;;;;;;;EAY3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyPresentation.d.ts","sourceRoot":"","sources":["../src/verifyPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"verifyPresentation.d.ts","sourceRoot":"","sources":["../src/verifyPresentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEpE,eAAO,MAAM,kBAAkB,GAAI,eAAe,oBAAoB,MAE9D,YAAY,mBAAmB,EAC/B,cAAc,EAAE,GAAG,MAAM,EACzB,UAAS,OAAO,CAAC,YAAY,CAAM;;;;;;;;;;;EAI1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@learncard/vc-plugin",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.cjs && tsc --p tsconfig.json && shx cp ./dist/index.d.ts ./dist/index.d.cts",
|
|
27
|
-
"test": "
|
|
28
|
-
"test:watch": "
|
|
29
|
-
"test:coverage": "
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest",
|
|
29
|
+
"test:coverage": "vitest run --coverage"
|
|
30
30
|
},
|
|
31
31
|
"author": "Learning Economy Foundation (www.learningeconomy.io)",
|
|
32
32
|
"license": "MIT",
|
|
@@ -39,21 +39,17 @@
|
|
|
39
39
|
"url": "https://github.com/learningeconomy/LearnCard/issues"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@types/jest": "^29.2.2",
|
|
43
42
|
"@types/node": "^17.0.31",
|
|
44
43
|
"aqu": "0.4.3",
|
|
45
44
|
"esbuild": "^0.27.1",
|
|
46
|
-
"esbuild-jest": "^0.5.0",
|
|
47
45
|
"esbuild-plugin-copy": "^1.3.0",
|
|
48
|
-
"
|
|
49
|
-
"shx": "^0.3.4",
|
|
50
|
-
"ts-jest": "^29.0.3"
|
|
46
|
+
"shx": "^0.3.4"
|
|
51
47
|
},
|
|
52
48
|
"types": "./dist/index.d.ts",
|
|
53
49
|
"dependencies": {
|
|
54
|
-
"@learncard/core": "9.4.
|
|
55
|
-
"@learncard/didkit-plugin": "^1.9.
|
|
56
|
-
"@learncard/types": "5.18.
|
|
50
|
+
"@learncard/core": "9.4.32",
|
|
51
|
+
"@learncard/didkit-plugin": "^1.9.12",
|
|
52
|
+
"@learncard/types": "5.18.3",
|
|
57
53
|
"multiformats": "^11.0.1"
|
|
58
54
|
},
|
|
59
55
|
"sideEffects": false
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
vi.mock('multiformats/bases/base58', () => ({ base58btc: {} }));
|
|
3
|
+
vi.mock('multiformats/bases/base64', () => ({ base64url: {} }));
|
|
3
4
|
|
|
4
5
|
import { issueCredential } from './issueCredential';
|
|
5
6
|
|
|
@@ -42,7 +43,7 @@ const credential: Credential = {
|
|
|
42
43
|
};
|
|
43
44
|
|
|
44
45
|
const getLearnCard = () => {
|
|
45
|
-
const issueCredentialMock =
|
|
46
|
+
const issueCredentialMock = vi.fn(
|
|
46
47
|
async (
|
|
47
48
|
unsignedCredential: Credential,
|
|
48
49
|
_options: ProofOptionsForTest,
|
|
@@ -69,8 +70,8 @@ const getLearnCard = () => {
|
|
|
69
70
|
keypair: () => keypair,
|
|
70
71
|
},
|
|
71
72
|
invoke: {
|
|
72
|
-
didToVerificationMethod:
|
|
73
|
-
resolveDid:
|
|
73
|
+
didToVerificationMethod: vi.fn(async () => 'did:example:issuer#key-1'),
|
|
74
|
+
resolveDid: vi.fn(async () => ({ verificationMethod: [] })),
|
|
74
75
|
},
|
|
75
76
|
};
|
|
76
77
|
|