@learncard/simple-signing-plugin 1.0.3

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.
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ import { VP, LCNProfile } from '@learncard/types';
3
+ import { Plugin } from '@learncard/core';
4
+ import { ProofOptions } from '@learncard/didkit-plugin';
5
+ export declare const SigningAuthorityValidator: z.ZodObject<{
6
+ _id: z.ZodOptional<z.ZodString>;
7
+ ownerDid: z.ZodString;
8
+ name: z.ZodString;
9
+ did: z.ZodOptional<z.ZodString>;
10
+ endpoint: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ _id?: string | undefined;
13
+ did?: string | undefined;
14
+ endpoint?: string | undefined;
15
+ ownerDid: string;
16
+ name: string;
17
+ }, {
18
+ _id?: string | undefined;
19
+ did?: string | undefined;
20
+ endpoint?: string | undefined;
21
+ ownerDid: string;
22
+ name: string;
23
+ }>;
24
+ export type SigningAuthorityType = z.infer<typeof SigningAuthorityValidator>;
25
+ export type SigningAuthorityAuthorization = {
26
+ type: string;
27
+ boostUri: string;
28
+ };
29
+ export type SimpleSigningPluginDependentMethods = {
30
+ getDidAuthVp: (options?: ProofOptions) => Promise<VP | string>;
31
+ getProfile: () => Promise<LCNProfile | undefined>;
32
+ };
33
+ export type SimpleSigningPluginMethods = {
34
+ createSigningAuthority: (name: string) => Promise<SigningAuthorityType | false>;
35
+ getSigningAuthorities: () => Promise<SigningAuthorityType[] | false>;
36
+ authorizeSigningAuthority: (name: string, authorization: SigningAuthorityAuthorization) => Promise<boolean>;
37
+ };
38
+ export type SimpleSigningPlugin = Plugin<'Simple Signing Authority', never, SimpleSigningPluginMethods, 'id', SimpleSigningPluginDependentMethods>;
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAMpC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE7E,MAAM,MAAM,6BAA6B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAC9C,YAAY,EAAE,CAAC,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;IAC/D,UAAU,EAAE,MAAM,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACrC,sBAAsB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,GAAG,KAAK,CAAC,CAAC;IAChF,qBAAqB,EAAE,MAAM,OAAO,CAAC,oBAAoB,EAAE,GAAG,KAAK,CAAC,CAAC;IACrE,yBAAyB,EAAE,CACvB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,6BAA6B,KAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CACpC,0BAA0B,EAC1B,KAAK,EACL,0BAA0B,EAC1B,IAAI,EACJ,mCAAmC,CACtC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@learncard/simple-signing-plugin",
3
+ "version": "1.0.3",
4
+ "description": "",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/simple-signing-plugin.esm.js",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "author": "WeLibrary, LLC (www.welibrary.io)",
11
+ "license": "MIT",
12
+ "homepage": "https://github.com/WeLibraryOS/learncardapp#readme",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/WeLibraryOS/learncardapp.git"
16
+ },
17
+ "bugs": {
18
+ "url": "https://github.com/WeLibraryOS/learncardapp/issues"
19
+ },
20
+ "devDependencies": {
21
+ "@types/jest": "^29.2.2",
22
+ "@types/node": "^17.0.31",
23
+ "aqu": "0.4.3",
24
+ "esbuild": "^0.14.38",
25
+ "esbuild-jest": "^0.5.0",
26
+ "esbuild-plugin-copy": "^1.3.0",
27
+ "jest": "^29.3.0",
28
+ "rimraf": "^3.0.2",
29
+ "shx": "^0.3.4",
30
+ "ts-jest": "^29.0.3"
31
+ },
32
+ "types": "./dist/index.d.ts",
33
+ "dependencies": {
34
+ "isomorphic-webcrypto": "^2.3.8",
35
+ "zod": "^3.21.4",
36
+ "@learncard/simple-signing-client": "1.0.3"
37
+ },
38
+ "scripts": {
39
+ "build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
40
+ "test": "jest --passWithNoTests",
41
+ "test:watch": "jest --watch",
42
+ "test:coverage": "jest --silent --ci --coverage --coverageReporters=\"text\" --coverageReporters=\"text-summary\""
43
+ }
44
+ }