@arcblock/vc 1.26.3 → 1.27.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/lib/index.d.ts +10 -9
- package/package.json +5 -5
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Generate by [js2dts@0.3.3](https://github.com/whxaxes/js2dts#readme)
|
|
2
2
|
|
|
3
|
+
import * as jsonStableStringify from 'json-stable-stringify';
|
|
3
4
|
/**
|
|
4
5
|
* Create a valid verifiable credential
|
|
5
6
|
*
|
|
@@ -11,9 +12,9 @@
|
|
|
11
12
|
* @param {Date} params.expirationDate
|
|
12
13
|
* @param {String} params.endpoint - Status endpoint url
|
|
13
14
|
* @param {String} params.endpointScope - Endpoint scope, either be public or private
|
|
14
|
-
* @returns {object}
|
|
15
|
+
* @returns {Promise<object>}
|
|
15
16
|
*/
|
|
16
|
-
declare function create(T100: _Lib.T101): any
|
|
17
|
+
declare function create(T100: _Lib.T101): Promise<any>;
|
|
17
18
|
/**
|
|
18
19
|
* Verify that the verifiable credential is valid
|
|
19
20
|
* - It is signed by a whitelist of issuers
|
|
@@ -25,9 +26,9 @@ declare function create(T100: _Lib.T101): any;
|
|
|
25
26
|
* @param {string} ownerDid - vc holder/owner did
|
|
26
27
|
* @param {Array} trustedIssuers - list of issuer did
|
|
27
28
|
* @throws {Error}
|
|
28
|
-
* @returns {boolean}
|
|
29
|
+
* @returns {Promise<boolean>}
|
|
29
30
|
*/
|
|
30
|
-
declare function verify(T102: any): boolean
|
|
31
|
+
declare function verify(T102: any): Promise<boolean>;
|
|
31
32
|
/**
|
|
32
33
|
* Verify that the Presentation is valid
|
|
33
34
|
* - It is signed by VC's owner
|
|
@@ -39,11 +40,11 @@ declare function verify(T102: any): boolean;
|
|
|
39
40
|
* @param {Array} trustedIssuers - list of issuer did
|
|
40
41
|
* @param {String} challenge - Random byte you want
|
|
41
42
|
* @throws {Error}
|
|
42
|
-
* @returns {boolean}
|
|
43
|
+
* @returns {Promise<boolean>}
|
|
43
44
|
*/
|
|
44
|
-
declare function verifyPresentation(T103: any): boolean
|
|
45
|
-
declare function createCredentialList(T105: _Lib.T106): _Lib.T107[]
|
|
46
|
-
declare function verifyCredentialList(T108: _Lib.T109): any[]
|
|
45
|
+
declare function verifyPresentation(T103: any): Promise<boolean>;
|
|
46
|
+
declare function createCredentialList(T105: _Lib.T106): Promise<_Lib.T107[]>;
|
|
47
|
+
declare function verifyCredentialList(T108: _Lib.T109): Promise<any[]>;
|
|
47
48
|
declare const _Lib: _Lib.T110;
|
|
48
49
|
declare namespace _Lib {
|
|
49
50
|
export interface T101 {
|
|
@@ -74,7 +75,7 @@ declare namespace _Lib {
|
|
|
74
75
|
create: typeof create;
|
|
75
76
|
verify: typeof verify;
|
|
76
77
|
verifyPresentation: typeof verifyPresentation;
|
|
77
|
-
stableStringify:
|
|
78
|
+
stableStringify: typeof jsonStableStringify.default;
|
|
78
79
|
proofTypes: _Lib.T104;
|
|
79
80
|
createCredentialList: typeof createCredentialList;
|
|
80
81
|
verifyCredentialList: typeof verifyCredentialList;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/vc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Javascript lib to work with ArcBlock Verifiable Credentials",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arcblock",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"is-absolute-url": "^3.0.3",
|
|
41
41
|
"json-stable-stringify": "^1.0.1",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
43
|
-
"@arcblock/did": "1.
|
|
44
|
-
"@ocap/mcrypto": "1.
|
|
45
|
-
"@ocap/util": "1.
|
|
46
|
-
"@ocap/wallet": "1.
|
|
43
|
+
"@arcblock/did": "1.27.0",
|
|
44
|
+
"@ocap/mcrypto": "1.27.0",
|
|
45
|
+
"@ocap/util": "1.27.0",
|
|
46
|
+
"@ocap/wallet": "1.27.0"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"lint": "eslint tests lib",
|