@learncard/did-web-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 +43 -0
- package/dist/did-web-plugin.cjs.development.js +96198 -0
- package/dist/did-web-plugin.cjs.development.js.map +7 -0
- package/dist/did-web-plugin.cjs.production.min.js +952 -0
- package/dist/did-web-plugin.cjs.production.min.js.map +7 -0
- package/dist/did-web-plugin.esm.js +96198 -0
- package/dist/did-web-plugin.esm.js.map +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/learnCard.d.ts +6 -0
- package/dist/plugin.d.ts +7 -0
- package/dist/test/index.test.d.ts +1 -0
- package/dist/types.d.ts +13 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
import { LearnCardFromSeed, AddPlugin } from '@learncard/core';
|
2
|
+
import { DidWebPlugin } from './types';
|
3
|
+
export type DidWebLearnCard = AddPlugin<LearnCardFromSeed['returnValue'], DidWebPlugin>;
|
4
|
+
export declare const initDidWebLearnCard: (_config: LearnCardFromSeed['args'] & {
|
5
|
+
didWeb: string;
|
6
|
+
}) => Promise<DidWebLearnCard>;
|
package/dist/plugin.d.ts
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
import { LearnCard } from '@learncard/core';
|
2
|
+
import { DidWebPluginDependentMethods, DidWebPlugin } from './types';
|
3
|
+
export * from './types';
|
4
|
+
/**
|
5
|
+
* @group Plugins
|
6
|
+
*/
|
7
|
+
export declare const getDidWebPlugin: (learnCard: LearnCard<any, 'id', DidWebPluginDependentMethods>, didWeb: string) => Promise<DidWebPlugin>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/types.d.ts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { DID } from 'dids';
|
2
|
+
import { UnsignedVC, VC, VP } from '@learncard/types';
|
3
|
+
import { Plugin, ProofOptions } from '@learncard/core';
|
4
|
+
/** @group DID Web Plugin */
|
5
|
+
export type DidWebPluginDependentMethods = {
|
6
|
+
getDIDObject: () => DID;
|
7
|
+
getDidAuthVp: (options?: ProofOptions) => Promise<VP | string>;
|
8
|
+
issueCredential: (credential: UnsignedVC, signingOptions?: Partial<ProofOptions>) => Promise<VC>;
|
9
|
+
};
|
10
|
+
/** @group DID Web Plugin */
|
11
|
+
export type DidWebPluginMethods = {};
|
12
|
+
/** @group DID Web Plugin */
|
13
|
+
export type DidWebPlugin = Plugin<'DID Web', 'id', DidWebPluginMethods, 'id', DidWebPluginDependentMethods>;
|
package/package.json
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"name": "@learncard/did-web-plugin",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "./dist/index.js",
|
6
|
+
"module": "./dist/did-web-plugin.esm.js",
|
7
|
+
"files": [
|
8
|
+
"dist"
|
9
|
+
],
|
10
|
+
"author": "Learning Economy Foundation (www.learningeconomy.io)",
|
11
|
+
"license": "MIT",
|
12
|
+
"homepage": "https://github.com/WeLibraryOS/LearnCard#readme",
|
13
|
+
"repository": {
|
14
|
+
"type": "git",
|
15
|
+
"url": "git+https://github.com/WeLibraryOS/LearnCard.git"
|
16
|
+
},
|
17
|
+
"bugs": {
|
18
|
+
"url": "https://github.com/WeLibraryOS/LearnCard/issues"
|
19
|
+
},
|
20
|
+
"devDependencies": {
|
21
|
+
"@types/jest": "^29.2.2",
|
22
|
+
"@types/node": "^17.0.31",
|
23
|
+
"aqu": "0.4.3",
|
24
|
+
"dids": "^3.2.0",
|
25
|
+
"esbuild": "^0.14.38",
|
26
|
+
"esbuild-jest": "^0.5.0",
|
27
|
+
"esbuild-plugin-copy": "^1.3.0",
|
28
|
+
"jest": "^29.3.0",
|
29
|
+
"shx": "^0.3.4",
|
30
|
+
"ts-jest": "^29.0.3",
|
31
|
+
"@learncard/types": "5.2.3"
|
32
|
+
},
|
33
|
+
"types": "./dist/index.d.ts",
|
34
|
+
"dependencies": {
|
35
|
+
"@learncard/core": "8.5.3"
|
36
|
+
},
|
37
|
+
"scripts": {
|
38
|
+
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|
39
|
+
"test": "jest",
|
40
|
+
"test:watch": "jest --watch",
|
41
|
+
"test:coverage": "jest --silent --ci --coverage --coverageReporters=\"text\" --coverageReporters=\"text-summary\""
|
42
|
+
}
|
43
|
+
}
|