@learncard/didkit-plugin 1.4.22 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/didkit/didkit_wasm.d.ts +47 -198
- package/dist/didkit/didkit_wasm.js +552 -411
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +47 -40
- package/dist/didkit-plugin.cjs.development.js +525 -390
- package/dist/didkit-plugin.cjs.development.js.map +2 -2
- package/dist/didkit-plugin.cjs.production.min.js +2 -2
- package/dist/didkit-plugin.cjs.production.min.js.map +3 -3
- package/dist/didkit-plugin.esm.js +525 -390
- package/dist/didkit-plugin.esm.js.map +2 -2
- package/dist/didkit_wasm.d.ts +47 -198
- package/dist/didkit_wasm.js +552 -411
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +47 -40
- package/dist/plugin.d.ts.map +1 -1
- package/dist/types.d.ts +11 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/didkit_wasm_bg.wasm
CHANGED
Binary file
|
@@ -1,44 +1,51 @@
|
|
1
1
|
/* tslint:disable */
|
2
2
|
/* eslint-disable */
|
3
3
|
export const memory: WebAssembly.Memory;
|
4
|
-
export
|
5
|
-
export
|
6
|
-
export
|
7
|
-
export
|
8
|
-
export
|
9
|
-
export
|
10
|
-
export
|
11
|
-
export
|
12
|
-
export
|
13
|
-
export
|
14
|
-
export
|
15
|
-
export
|
16
|
-
export
|
17
|
-
export
|
18
|
-
export
|
19
|
-
export
|
20
|
-
export
|
21
|
-
export
|
22
|
-
export
|
23
|
-
export
|
24
|
-
export
|
25
|
-
export
|
26
|
-
export
|
27
|
-
export
|
28
|
-
export
|
29
|
-
export
|
30
|
-
export
|
31
|
-
export
|
32
|
-
export
|
33
|
-
export
|
34
|
-
export
|
35
|
-
export
|
36
|
-
export
|
37
|
-
export
|
38
|
-
export
|
4
|
+
export const getVersion: () => [number, number];
|
5
|
+
export const clearCache: () => any;
|
6
|
+
export const didResolver: (a: number, b: number, c: number, d: number) => any;
|
7
|
+
export const resolveDID: (a: number, b: number, c: number, d: number) => any;
|
8
|
+
export const generateEd25519Key: () => [number, number, number, number];
|
9
|
+
export const generateEd25519KeyFromBytes: (a: number, b: number) => [number, number, number, number];
|
10
|
+
export const generateSecp256k1Key: () => [number, number, number, number];
|
11
|
+
export const generateSecp256k1KeyFromBytes: (a: number, b: number) => [number, number, number, number];
|
12
|
+
export const createJwe: (a: number, b: number, c: number, d: number) => any;
|
13
|
+
export const decryptJwe: (a: number, b: number, c: number, d: number) => any;
|
14
|
+
export const createDagJwe: (a: any, b: number, c: number) => any;
|
15
|
+
export const decryptDagJwe: (a: number, b: number, c: number, d: number) => any;
|
16
|
+
export const keyToDID: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
17
|
+
export const keyToVerificationMethod: (a: number, b: number, c: number, d: number) => any;
|
18
|
+
export const didToVerificationMethod: (a: number, b: number) => any;
|
19
|
+
export const issueCredential: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
20
|
+
export const prepareIssueCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
21
|
+
export const completeIssueCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
22
|
+
export const verifyCredential: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
23
|
+
export const issuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
24
|
+
export const prepareIssuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
25
|
+
export const completeIssuePresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
26
|
+
export const verifyPresentation: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
27
|
+
export const DIDAuth: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
28
|
+
export const JWKFromTezos: (a: number, b: number) => any;
|
29
|
+
export const delegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
30
|
+
export const prepareDelegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
31
|
+
export const completeDelegateCapability: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
32
|
+
export const verifyDelegation: (a: number, b: number) => any;
|
33
|
+
export const invokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
34
|
+
export const prepareInvokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
35
|
+
export const completeInvokeCapability: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
36
|
+
export const verifyInvocationSignature: (a: number, b: number) => any;
|
37
|
+
export const verifyInvocation: (a: number, b: number, c: number, d: number) => any;
|
38
|
+
export const contextLoader: (a: number, b: number) => any;
|
39
|
+
export const didkit_error_message: () => number;
|
40
|
+
export const didkit_error_code: () => number;
|
41
|
+
export const __wbindgen_exn_store: (a: number) => void;
|
42
|
+
export const __externref_table_alloc: () => number;
|
39
43
|
export const __wbindgen_export_2: WebAssembly.Table;
|
40
|
-
export
|
41
|
-
export
|
42
|
-
export
|
43
|
-
export
|
44
|
-
export
|
44
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
45
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
46
|
+
export const __wbindgen_export_5: WebAssembly.Table;
|
47
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
48
|
+
export const __externref_table_dealloc: (a: number) => void;
|
49
|
+
export const closure4125_externref_shim: (a: number, b: number, c: any) => void;
|
50
|
+
export const closure4526_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
51
|
+
export const __wbindgen_start: () => void;
|
package/dist/plugin.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAa,EACT,SAAS,
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAa,EACT,SAAS,EAkBZ,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAa,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,eAAe,WAChB,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,oCAEvC,OAAO,CAAC,YAAY,CAwItB,CAAC"}
|
package/dist/types.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { JWE, JWKWithPrivateKey, UnsignedVC, UnsignedVP, VC, VP, VerificationCheck, DidDocument } from '@learncard/types';
|
2
2
|
import type { DIDResolutionResult } from 'dids';
|
3
3
|
import { Plugin } from '@learncard/core';
|
4
4
|
/** @group DIDKit Plugin */
|
@@ -23,18 +23,22 @@ export type InputMetadata = {
|
|
23
23
|
};
|
24
24
|
/** @group DIDKit Plugin */
|
25
25
|
export type DidkitPluginMethods = {
|
26
|
-
generateEd25519KeyFromBytes: (bytes: Uint8Array) =>
|
27
|
-
generateSecp256k1KeyFromBytes: (bytes: Uint8Array) =>
|
28
|
-
keyToDid: (type: DidMethod, keypair:
|
29
|
-
keyToVerificationMethod: (type: string, keypair:
|
26
|
+
generateEd25519KeyFromBytes: (bytes: Uint8Array) => JWKWithPrivateKey;
|
27
|
+
generateSecp256k1KeyFromBytes: (bytes: Uint8Array) => JWKWithPrivateKey;
|
28
|
+
keyToDid: (type: DidMethod, keypair: JWKWithPrivateKey) => string;
|
29
|
+
keyToVerificationMethod: (type: string, keypair: JWKWithPrivateKey) => Promise<string>;
|
30
30
|
didToVerificationMethod: (did: string) => Promise<string>;
|
31
|
-
issueCredential: (credential: UnsignedVC, options: ProofOptions, keypair:
|
31
|
+
issueCredential: (credential: UnsignedVC, options: ProofOptions, keypair: JWKWithPrivateKey) => Promise<VC>;
|
32
32
|
verifyCredential: (credential: VC, options?: ProofOptions) => Promise<VerificationCheck>;
|
33
|
-
issuePresentation: (presentation: UnsignedVP, options: ProofOptions, keypair:
|
33
|
+
issuePresentation: (presentation: UnsignedVP, options: ProofOptions, keypair: JWKWithPrivateKey) => Promise<VP>;
|
34
34
|
verifyPresentation: (presentation: VP | string, options?: ProofOptions) => Promise<VerificationCheck>;
|
35
35
|
contextLoader: (url: string) => Promise<Record<string, any>>;
|
36
36
|
resolveDid: (did: string, inputMetadata?: InputMetadata) => Promise<DidDocument>;
|
37
37
|
didResolver: (did: string, inputMetadata?: InputMetadata) => Promise<DIDResolutionResult>;
|
38
|
+
createJwe: (cleartext: string, recipients: string[]) => Promise<JWE>;
|
39
|
+
decryptJwe: (jwe: JWE, jwks: JWKWithPrivateKey[]) => Promise<string>;
|
40
|
+
createDagJwe: <T>(cleartext: T, recipients: string[]) => Promise<JWE>;
|
41
|
+
decryptDagJwe: <T>(jwe: JWE, jwks: JWKWithPrivateKey[]) => Promise<T>;
|
38
42
|
clearDidWebCache: () => Promise<void>;
|
39
43
|
};
|
40
44
|
/** @group DIDKit Plugin */
|
package/dist/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,GAAG,EACH,UAAU,EACV,UAAU,EACV,EAAE,EACF,EAAE,EACF,iBAAiB,EACjB,WAAW,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,2BAA2B;AAC3B,MAAM,MAAM,SAAS,GACf,KAAK,GACL,IAAI,GACJ,MAAM,GACN,OAAS,IAAI,GACb,OAAO,GACP,KAAK,GACL,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,EAAE,GACV,cAAc,MAAM,EAAE,GACtB,cAAc,MAAM,EAAE,CAAC;AAE7B,2BAA2B;AAC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2BAA2B;AAC3B,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@learncard/didkit-plugin",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.5.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/didkit-plugin.esm.js",
|
@@ -31,8 +31,8 @@
|
|
31
31
|
},
|
32
32
|
"types": "./dist/index.d.ts",
|
33
33
|
"dependencies": {
|
34
|
-
"@learncard/core": "9.3.
|
35
|
-
"@learncard/types": "5.6.
|
34
|
+
"@learncard/core": "9.3.15",
|
35
|
+
"@learncard/types": "5.6.4"
|
36
36
|
},
|
37
37
|
"scripts": {
|
38
38
|
"build": "node ./scripts/build.mjs && shx cp ./scripts/mixedEntypoint.js ./dist/index.js && tsc --p tsconfig.json",
|