@digitalbazaar/ed25519-signature-2018 2.1.0 → 4.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/README.md +7 -1
- package/lib/Ed25519Signature2018.js +3 -10
- package/lib/index.js +3 -4
- package/package.json +35 -42
- package/CHANGELOG.md +0 -29
- package/lib/main.js +0 -7
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2022 Digital Bazaar, Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import * as base58btc from 'base58-universal';
|
|
5
5
|
import jsonld from 'jsonld';
|
|
@@ -134,21 +134,14 @@ export class Ed25519Signature2018 extends JwsLinkedDataSignature {
|
|
|
134
134
|
* recommended to use one that provides static known documents, instead of
|
|
135
135
|
* fetching from the web) for returning contexts, controller documents,
|
|
136
136
|
* keys, and other relevant URLs needed for the proof.
|
|
137
|
-
* @param {Function} [options.expansionMap] - A custom expansion map that is
|
|
138
|
-
* passed to the JSON-LD processor; by default a function that will throw
|
|
139
|
-
* an error when unmapped properties are detected in the input, use `false`
|
|
140
|
-
* to turn this off and allow unmapped properties to be dropped or use a
|
|
141
|
-
* custom function.
|
|
142
137
|
*
|
|
143
138
|
* @returns {Promise<boolean>} Whether a match for the proof was found.
|
|
144
139
|
*/
|
|
145
|
-
async matchProof({proof, document, purpose, documentLoader
|
|
140
|
+
async matchProof({proof, document, purpose, documentLoader}) {
|
|
146
141
|
if(!_includesCompatibleContext({document})) {
|
|
147
142
|
return false;
|
|
148
143
|
}
|
|
149
|
-
return super.matchProof({
|
|
150
|
-
proof, document, purpose, documentLoader, expansionMap
|
|
151
|
-
});
|
|
144
|
+
return super.matchProof({proof, document, purpose, documentLoader});
|
|
152
145
|
}
|
|
153
146
|
}
|
|
154
147
|
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2020-2021 Digital Bazaar, Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import suiteContext from 'ed25519-signature-2018-context';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
module.exports = require('./main.js');
|
|
6
|
+
export {Ed25519Signature2018} from './Ed25519Signature2018.js';
|
|
7
|
+
export {suiteContext};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalbazaar/ed25519-signature-2018",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Ed25519Signature2018 Linked Data Proof suite for use with jsonld-signatures.",
|
|
5
5
|
"homepage": "https://github.com/digitalbazaar/ed25519-signature-2018",
|
|
6
6
|
"author": {
|
|
@@ -17,70 +17,63 @@
|
|
|
17
17
|
"email": "support@digitalbazaar.com"
|
|
18
18
|
},
|
|
19
19
|
"license": "BSD-3-Clause",
|
|
20
|
-
"
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": "./lib/index.js",
|
|
21
22
|
"files": [
|
|
22
|
-
"lib
|
|
23
|
+
"lib/**/*.js"
|
|
23
24
|
],
|
|
24
|
-
"module": "lib/main.js",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@digitalbazaar/ed25519-verification-key-2018": "^
|
|
27
|
-
"@digitalbazaar/ed25519-verification-key-2020": "^
|
|
28
|
-
"@digitalbazaar/jws-linked-data-signature": "^
|
|
29
|
-
"base58-universal": "^
|
|
30
|
-
"ed25519-signature-2018-context": "^1.0
|
|
26
|
+
"@digitalbazaar/ed25519-verification-key-2018": "^4.0.0",
|
|
27
|
+
"@digitalbazaar/ed25519-verification-key-2020": "^4.0.0",
|
|
28
|
+
"@digitalbazaar/jws-linked-data-signature": "^3.0.0",
|
|
29
|
+
"base58-universal": "^2.0.0",
|
|
30
|
+
"ed25519-signature-2018-context": "^1.1.0",
|
|
31
31
|
"ed25519-signature-2020-context": "^1.1.0",
|
|
32
|
-
"
|
|
33
|
-
"jsonld": "^5.2.0"
|
|
32
|
+
"jsonld": "^8.1.0"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"
|
|
35
|
+
"c8": "^7.11.3",
|
|
36
|
+
"chai": "^4.3.6",
|
|
37
37
|
"credentials-context": "^2.0.0",
|
|
38
|
-
"cross-env": "^7.0.
|
|
39
|
-
"did-context": "^3.
|
|
40
|
-
"eslint": "^
|
|
41
|
-
"eslint-config-digitalbazaar": "^
|
|
42
|
-
"eslint-plugin-jsdoc": "^
|
|
43
|
-
"
|
|
44
|
-
"
|
|
38
|
+
"cross-env": "^7.0.3",
|
|
39
|
+
"did-context": "^3.1.1",
|
|
40
|
+
"eslint": "^8.17.0",
|
|
41
|
+
"eslint-config-digitalbazaar": "^3.0.0",
|
|
42
|
+
"eslint-plugin-jsdoc": "^39.3.2",
|
|
43
|
+
"eslint-plugin-unicorn": "^42.0.0",
|
|
44
|
+
"jsonld-signatures": "^11.0.0",
|
|
45
|
+
"karma": "^6.3.20",
|
|
45
46
|
"karma-chai": "^0.1.0",
|
|
46
|
-
"karma-chrome-launcher": "^3.1.
|
|
47
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
47
48
|
"karma-mocha": "^2.0.1",
|
|
48
49
|
"karma-mocha-reporter": "^2.2.5",
|
|
49
|
-
"karma-sourcemap-loader": "^0.3.
|
|
50
|
+
"karma-sourcemap-loader": "^0.3.8",
|
|
50
51
|
"karma-webpack": "^5.0.0",
|
|
51
|
-
"mocha": "^
|
|
52
|
+
"mocha": "^10.0.0",
|
|
52
53
|
"mocha-lcov-reporter": "^1.3.0",
|
|
53
|
-
"
|
|
54
|
-
"webpack": "^5.31.2"
|
|
54
|
+
"webpack": "^5.73.0"
|
|
55
55
|
},
|
|
56
|
-
"
|
|
57
|
-
"exclude": [
|
|
58
|
-
"test"
|
|
59
|
-
],
|
|
56
|
+
"c8": {
|
|
60
57
|
"reporter": [
|
|
61
|
-
"
|
|
62
|
-
"text-summary"
|
|
58
|
+
"lcov",
|
|
59
|
+
"text-summary",
|
|
60
|
+
"text"
|
|
63
61
|
]
|
|
64
62
|
},
|
|
65
|
-
"browser": {
|
|
66
|
-
"buffer": false,
|
|
67
|
-
"crypto": false,
|
|
68
|
-
"util": false
|
|
69
|
-
},
|
|
70
63
|
"engines": {
|
|
71
|
-
"node": ">=
|
|
64
|
+
"node": ">=14"
|
|
72
65
|
},
|
|
73
66
|
"keywords": [
|
|
74
67
|
"Decentralized",
|
|
75
68
|
"Linked Data"
|
|
76
69
|
],
|
|
77
70
|
"scripts": {
|
|
78
|
-
"test": "npm run
|
|
79
|
-
"test-karma": "karma start test/karma.conf.
|
|
80
|
-
"test-node": "cross-env NODE_ENV=test mocha
|
|
81
|
-
"coverage": "cross-env NODE_ENV=test
|
|
82
|
-
"coverage-ci": "cross-env NODE_ENV=test
|
|
83
|
-
"coverage-report": "
|
|
71
|
+
"test": "npm run test-node",
|
|
72
|
+
"test-karma": "karma start test/karma.conf.cjs",
|
|
73
|
+
"test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -R ${REPORTER:-spec} test/*.spec.js",
|
|
74
|
+
"coverage": "cross-env NODE_ENV=test c8 npm run test-node",
|
|
75
|
+
"coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node",
|
|
76
|
+
"coverage-report": "c8 report",
|
|
84
77
|
"lint": "eslint ."
|
|
85
78
|
}
|
|
86
79
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# @digitalbazaar/ed25519-signature-2018 Changelog
|
|
2
|
-
|
|
3
|
-
## 2.1.0 - 2022-02-15
|
|
4
|
-
|
|
5
|
-
### Added
|
|
6
|
-
- Add compatability for 2020 keys.
|
|
7
|
-
|
|
8
|
-
## 2.0.1 - 2021-04-15
|
|
9
|
-
|
|
10
|
-
### Fixed
|
|
11
|
-
- Make `ed25519-signature-2018-context` a regular dependency.
|
|
12
|
-
|
|
13
|
-
## 2.0.0 - 2021-04-12
|
|
14
|
-
|
|
15
|
-
### Changed
|
|
16
|
-
- **BREAKING**: Update to `jsonld-signatures` v9 dependency (which removes the
|
|
17
|
-
`verificationMethod` param from suite constructor. It is now strictly
|
|
18
|
-
initialized from `key.id` or `signer.id`. Also increases validation on either
|
|
19
|
-
key or signer/verifier parameters.)
|
|
20
|
-
- Enable this suite to enforce compatible contexts on `sign()`.
|
|
21
|
-
|
|
22
|
-
### Fixed
|
|
23
|
-
- Add missing `signer` and `verifier` parameters to the `LinkedDataSignature`
|
|
24
|
-
constructor. This issue caused `this.signer` in subclasses to be `undefined`.
|
|
25
|
-
|
|
26
|
-
## 1.0.0 - 2021-03-18
|
|
27
|
-
|
|
28
|
-
### Added
|
|
29
|
-
- Initial files extracted from https://github.com/digitalbazaar/jsonld-signatures.
|