@learncard/learn-cloud-plugin 1.0.0
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/LICENSE +21 -0
- package/README.md +140 -0
- package/dist/helpers.d.ts +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/learn-cloud-plugin.cjs.development.js +15033 -0
- package/dist/learn-cloud-plugin.cjs.development.js.map +7 -0
- package/dist/learn-cloud-plugin.cjs.production.min.js +32 -0
- package/dist/learn-cloud-plugin.cjs.production.min.js.map +7 -0
- package/dist/learn-cloud-plugin.esm.js +15023 -0
- package/dist/learn-cloud-plugin.esm.js.map +7 -0
- package/dist/plugin.d.ts +7 -0
- package/dist/test/index.test.d.ts +1 -0
- package/dist/test/mocks/sample-vcs.d.ts +2 -0
- package/dist/types.d.ts +17 -0
- package/package.json +51 -0
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LearnCard } from '@learncard/core';
|
|
2
|
+
import { LearnCloudPluginDependentMethods, LearnCloudPlugin } from './types';
|
|
3
|
+
export * from './types';
|
|
4
|
+
/**
|
|
5
|
+
* @group Plugins
|
|
6
|
+
*/
|
|
7
|
+
export declare const getLearnCloudPlugin: (initialLearnCard: LearnCard<any, 'id', LearnCloudPluginDependentMethods>, url: string, unencryptedFields?: string[]) => Promise<LearnCloudPlugin>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DID } from 'dids';
|
|
2
|
+
import { UnsignedVC, VC, VP } from '@learncard/types';
|
|
3
|
+
import { LearnCard, Plugin } from '@learncard/core';
|
|
4
|
+
import { ProofOptions } from '@learncard/didkit-plugin';
|
|
5
|
+
/** @group LearnCloud Plugin */
|
|
6
|
+
export type LearnCloudPluginDependentMethods = {
|
|
7
|
+
getDIDObject: () => DID;
|
|
8
|
+
getDidAuthVp: (options?: ProofOptions) => Promise<VP | string>;
|
|
9
|
+
issueCredential: (credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<VC>;
|
|
10
|
+
crypto: () => Crypto;
|
|
11
|
+
};
|
|
12
|
+
/** @group LearnCloud Plugin */
|
|
13
|
+
export type LearnCloudPluginMethods = Record<never, never>;
|
|
14
|
+
/** @group LearnCloud Plugin */
|
|
15
|
+
export type LearnCloudPlugin = Plugin<'LearnCloud', 'index' | 'read' | 'store', LearnCloudPluginMethods, 'id', LearnCloudPluginDependentMethods>;
|
|
16
|
+
/** @group LearnCloud Plugin */
|
|
17
|
+
export type LearnCloudDependentLearnCard = LearnCard<any, 'id', LearnCloudPluginDependentMethods>;
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@learncard/learn-cloud-plugin",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/learn-cloud-plugin.esm.js",
|
|
7
|
+
"private": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"author": "Learning Economy Foundation (www.learningeconomy.io)",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"homepage": "https://github.com/WeLibraryOS/LearnCard#readme",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/WeLibraryOS/LearnCard.git"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/WeLibraryOS/LearnCard/issues"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/jest": "^29.2.2",
|
|
23
|
+
"@types/lodash": "^4.14.191",
|
|
24
|
+
"@types/node": "^17.0.31",
|
|
25
|
+
"aqu": "0.4.3",
|
|
26
|
+
"dids": "^3.2.0",
|
|
27
|
+
"esbuild": "^0.14.38",
|
|
28
|
+
"esbuild-jest": "^0.5.0",
|
|
29
|
+
"esbuild-plugin-copy": "^1.3.0",
|
|
30
|
+
"jest": "^29.3.0",
|
|
31
|
+
"shx": "^0.3.4",
|
|
32
|
+
"ts-jest": "^29.0.3",
|
|
33
|
+
"@learncard/types": "5.3.0"
|
|
34
|
+
},
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"json-stringify-deterministic": "^1.0.8",
|
|
38
|
+
"lodash": "^4.17.21",
|
|
39
|
+
"pbkdf2-hmac": "^1.2.1",
|
|
40
|
+
"@learncard/core": "9.0.0",
|
|
41
|
+
"@learncard/didkit-plugin": "1.0.0",
|
|
42
|
+
"@learncard/helpers": "^1.0.4",
|
|
43
|
+
"@learncard/learn-cloud-client": "1.0.0"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|
|
47
|
+
"test": "jest --passWithNoTests",
|
|
48
|
+
"test:watch": "jest --watch",
|
|
49
|
+
"test:coverage": "jest --silent --ci --coverage --coverageReporters=\"text\" --coverageReporters=\"text-summary\""
|
|
50
|
+
}
|
|
51
|
+
}
|