@digitalbazaar/did-method-key
Advanced tools
Comparing version 2.0.0 to 3.0.0
/*! | ||
* Copyright (c) 2021 Digital Bazaar, Inc. All rights reserved. | ||
*/ | ||
'use strict'; | ||
// translate `main.js` to CommonJS | ||
require = require('esm')(module); | ||
module.exports = require('./main.js'); | ||
import {DidKeyDriver} from './DidKeyDriver.js'; | ||
/** | ||
* Helper method to match the `.driver()` API of other `did-io` plugins. | ||
* | ||
* @param {object} options - Options hashmap. | ||
* @param {object} [options.verificationSuite=Ed25519VerificationKey2020] - | ||
* Key suite for the signature verification key suite to use. | ||
* | ||
* @returns {DidKeyDriver} Returns an instance of a did:key resolver driver. | ||
*/ | ||
function driver({verificationSuite} = {}) { | ||
return new DidKeyDriver({verificationSuite}); | ||
} | ||
export {driver, DidKeyDriver}; |
{ | ||
"name": "@digitalbazaar/did-method-key", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "A did:key method resolver.", | ||
"homepage": "http://github.com/digitalbazaar/did-method-key-js", | ||
"homepage": "https://github.com/digitalbazaar/did-method-key", | ||
"author": { | ||
@@ -13,29 +13,33 @@ "name": "Digital Bazaar, Inc.", | ||
"type": "git", | ||
"url": "https://github.com/digitalbazaar/did-method-key-js" | ||
"url": "https://github.com/digitalbazaar/did-method-key" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/digitalbazaar/did-method-key-js/issues", | ||
"url": "https://github.com/digitalbazaar/did-method-key/issues", | ||
"email": "support@digitalbazaar.com" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"main": "lib/index.js", | ||
"module": "lib/main.js", | ||
"type": "module", | ||
"exports": "./lib/index.js", | ||
"files": [ | ||
"lib/**/*.js" | ||
], | ||
"dependencies": { | ||
"@digitalbazaar/did-io": "^1.0.0", | ||
"@digitalbazaar/ed25519-verification-key-2020": "^3.0.0", | ||
"@digitalbazaar/x25519-key-agreement-key-2019": "^5.1.1", | ||
"@digitalbazaar/x25519-key-agreement-key-2020": "^2.0.0", | ||
"esm": "^3.2.25" | ||
"@digitalbazaar/did-io": "^2.0.0", | ||
"@digitalbazaar/ed25519-verification-key-2020": "^4.0.0", | ||
"@digitalbazaar/x25519-key-agreement-key-2019": "^6.0.0", | ||
"@digitalbazaar/x25519-key-agreement-key-2020": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@digitalbazaar/ed25519-verification-key-2018": "^3.1.1", | ||
"chai": "^4.3.4", | ||
"@digitalbazaar/ed25519-verification-key-2018": "^4.0.0", | ||
"c8": "^7.11.3", | ||
"chai": "^4.3.6", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^7.22.0", | ||
"eslint-config-digitalbazaar": "^2.6.1", | ||
"eslint-plugin-jsdoc": "^32.3.0", | ||
"karma": "^6.3.1", | ||
"karma-babel-preprocessor": "^8.0.1", | ||
"eslint": "^8.16.0", | ||
"eslint-config-digitalbazaar": "^3.0.0", | ||
"eslint-plugin-jsdoc": "^39.3.2", | ||
"eslint-plugin-unicorn": "^42.0.0", | ||
"karma": "^6.3.20", | ||
"karma-babel-preprocessor": "^8.0.2", | ||
"karma-chai": "^0.1.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-chrome-launcher": "^3.1.1", | ||
"karma-mocha": "^2.0.1", | ||
@@ -45,25 +49,15 @@ "karma-mocha-reporter": "^2.2.5", | ||
"karma-webpack": "^5.0.0", | ||
"mocha": "^8.3.2", | ||
"mocha": "^10.0.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"nyc": "^15.1.0", | ||
"webpack": "^5.28.0", | ||
"webpack-bundle-analyzer": "^4.4.0", | ||
"webpack-cli": "^4.5.0" | ||
"webpack": "^5.73.0" | ||
}, | ||
"nyc": { | ||
"exclude": [ | ||
"tests" | ||
], | ||
"c8": { | ||
"reporter": [ | ||
"html", | ||
"text-summary" | ||
"lcov", | ||
"text-summary", | ||
"text" | ||
] | ||
}, | ||
"browser": { | ||
"buffer": false, | ||
"crypto": false, | ||
"util": false | ||
}, | ||
"engines": { | ||
"node": ">=12" | ||
"node": ">=14" | ||
}, | ||
@@ -76,10 +70,10 @@ "keywords": [ | ||
"scripts": { | ||
"test": "npm run lint && npm run test-node && npm run test-karma", | ||
"test-node": "cross-env NODE_ENV=test mocha -r esm --preserve-symlinks -t 10000 test/*.spec.js", | ||
"test-karma": "karma start karma.conf.js", | ||
"coverage": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text-summary npm run test-node", | ||
"coverage-ci": "cross-env NODE_ENV=test nyc --reporter=text-lcov npm run test-node > coverage.lcov", | ||
"coverage-report": "nyc report", | ||
"test": "npm run test-node", | ||
"test-node": "cross-env NODE_ENV=test mocha --preserve-symlinks -t 10000 test/*.spec.js", | ||
"test-karma": "karma start karma.conf.cjs", | ||
"coverage": "cross-env NODE_ENV=test c8 npm run test-node", | ||
"coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node", | ||
"coverage-report": "c8 report", | ||
"lint": "eslint ." | ||
} | ||
} |
# did:key method driver _(@digitalbazaar/did-method-key)_ | ||
[![Node.js CI](https://github.com/digitalbazaar/did-method-key-js/workflows/Node.js%20CI/badge.svg)](https://github.com/digitalbazaar/did-method-key-js/actions?query=workflow%3A%22Node.js+CI%22) | ||
[![Coverage status](https://img.shields.io/codecov/c/github/digitalbazaar/did-method-key-js)](https://codecov.io/gh/digitalbazaar/did-method-key-js) | ||
[![NPM Version](https://img.shields.io/npm/v/digitalbazaar/did-method-key)](https://www.npmjs.com/package/@digitalbazaar/did-method-key) | ||
[![Node.js CI](https://github.com/digitalbazaar/did-method-key/workflows/Node.js%20CI/badge.svg)](https://github.com/digitalbazaar/did-method-key/actions?query=workflow%3A%22Node.js+CI%22) | ||
[![Coverage status](https://img.shields.io/codecov/c/github/digitalbazaar/did-method-key)](https://codecov.io/gh/digitalbazaar/did-method-key) | ||
[![NPM Version](https://img.shields.io/npm/v/@digitalbazaar/did-method-key)](https://www.npmjs.com/package/@digitalbazaar/did-method-key) | ||
@@ -96,3 +96,3 @@ > A [DID](https://w3c.github.io/did-core) (Decentralized Identifier) method driver for the `did-io` library and for standalone use | ||
Requires Node.js 12+ | ||
Requires Node.js 14+ | ||
@@ -108,4 +108,4 @@ To install from `npm`: | ||
``` | ||
git clone https://github.com/digitalbazaar/did-method-key-js.git | ||
cd did-method-key-js | ||
git clone https://github.com/digitalbazaar/did-method-key.git | ||
cd did-method-key | ||
npm install | ||
@@ -121,3 +121,4 @@ ``` | ||
```js | ||
const didKeyDriver = require('@digitalbazaar/did-method-key').driver(); | ||
import {driver} from '@digitalbazaar/did-method-key'; | ||
const didKeyDriver = driver(); | ||
@@ -124,0 +125,0 @@ // generate did:key using Ed25519 key type by default |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4
19
310
Yes
27246
5
272
2
+ Added@digitalbazaar/did-io@2.0.0(transitive)
+ Added@digitalbazaar/ed25519-verification-key-2020@4.2.0(transitive)
+ Added@digitalbazaar/lru-memoize@3.0.2(transitive)
+ Added@digitalbazaar/x25519-key-agreement-key-2019@6.0.0(transitive)
+ Added@digitalbazaar/x25519-key-agreement-key-2020@3.0.1(transitive)
+ Addedbase58-universal@2.0.0(transitive)
+ Addedbase64url-universal@2.0.0(transitive)
+ Addedcrypto-ld@7.0.0(transitive)
- Removedesm@^3.2.25
- Removed@digitalbazaar/did-io@1.1.0(transitive)
- Removed@digitalbazaar/ed25519-verification-key-2020@3.3.0(transitive)
- Removed@digitalbazaar/lru-memoize@2.2.0(transitive)
- Removed@digitalbazaar/x25519-key-agreement-key-2019@5.2.0(transitive)
- Removed@digitalbazaar/x25519-key-agreement-key-2020@2.1.0(transitive)
- Removedbase58-universal@1.0.0(transitive)
- Removedbase64url-universal@1.1.0(transitive)
- Removedcrypto-ld@5.1.0(transitive)
- Removedesm@3.2.25(transitive)
Updated@digitalbazaar/did-io@^2.0.0