ethr-did-resolver
Advanced tools
Comparing version 0.2.0 to 1.0.0
{ | ||
"name": "ethr-did-resolver", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "Resolve DID documents around ethereum addresses", | ||
"main": "lib/register.js", | ||
"main": "dist/ethr-did-resolver.js", | ||
"source": "src/ethr-did-resolver.js", | ||
"module": "dist/ethr-did-resolver.ejs", | ||
"repository": { | ||
@@ -22,7 +24,4 @@ "type": "git", | ||
"scripts": { | ||
"test": "jest", | ||
"build:es5": "./node_modules/.bin/babel src -d lib", | ||
"build:webpack": "./node_modules/.bin/webpack lib/register.js", | ||
"build": "yarn build:es5 && yarn test && yarn build:webpack", | ||
"prepublishOnly": "yarn build" | ||
"build": "./node_modules/.bin/microbundle", | ||
"test": "./node_modules/.bin/jest" | ||
}, | ||
@@ -32,25 +31,29 @@ "jest": { | ||
"collectCoverage": true, | ||
"testURL": "http://localhost/" | ||
"testURL": "http://localhost/", | ||
"transform": { | ||
"^.+\\.jsx?$": "babel-jest" | ||
} | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.0", | ||
"babel-jest": "^22.4.3", | ||
"babel-plugin-transform-es2015-modules-umd": "^6.24.1", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-env": "^1.6.1", | ||
"ganache-cli": "^6.1.0", | ||
"jest": "^22.4.3", | ||
"jsdom": "11.11.0", | ||
"regenerator-runtime": "^0.11.1", | ||
"standard": "^11.0.0", | ||
"truffle-contract": "^3.0.4", | ||
"webpack": "^4.5.0", | ||
"webpack-cli": "^2.0.14" | ||
"@babel/cli": "^7.5.0", | ||
"@babel/core": "^7.5.4", | ||
"@babel/preset-env": "^7.5.4", | ||
"babel-jest": "^24.8.0", | ||
"eslint-config-standard": "^13.0.1", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jest": "^22.8.0", | ||
"eslint-plugin-node": "^9.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.0", | ||
"ganache-cli": "^6.4.5", | ||
"jdom": "^3.1.0", | ||
"jest": "^24.8.0", | ||
"microbundle": "^0.11.0", | ||
"regenerator-runtime": "^0.13.2", | ||
"standard": "^13.0.2", | ||
"truffle-contract": "^3.0.7" | ||
}, | ||
"dependencies": { | ||
"babel-plugin-module-resolver": "^3.1.1", | ||
"babel-runtime": "^6.26.0", | ||
"buffer": "^5.1.0", | ||
"did-resolver": "0.0.6", | ||
"did-resolver": "1.0.0", | ||
"ethjs-abi": "^0.2.1", | ||
@@ -57,0 +60,0 @@ "ethjs-contract": "^0.1.9", |
@@ -189,11 +189,17 @@ --- | ||
```js | ||
import resolve from 'did-resolver' | ||
import registerResolver from 'ethr-did-resolver' | ||
import { Resolver } from 'did-resolver' | ||
import getResolver from 'ethr-did-resolver' | ||
registerResolver() | ||
// You can set a rpc endpoint to be used by the web3 provider | ||
// You can also set an address for your own ethr-did-registry contract | ||
const providerConfig = { rpcUrl: 'https://rinkeby.infura.io/ethr-did', registry: registry.address } | ||
resolve('did:ethr:0xf3beac30c498d9e26865f34fcaa57dbb935b0d74').then(doc => console.log) | ||
// getResolver will return an object with a key/value pair of { "ethr": resolver } where resolver is a function used by the generic did resolver. | ||
const ethrDidResolver = getResolver(providerConfig) | ||
const didResolver = Resolver(ethrDidResolver) | ||
didResolver.resolve('did:ethr:0xf3beac30c498d9e26865f34fcaa57dbb935b0d74').then(doc => console.log) | ||
// You can also use ES7 async/await syntax | ||
const doc = await resolve('did:ethr:0xf3beac30c498d9e26865f34fcaa57dbb935b0d74') | ||
const doc = await didResolver.resolve('did:ethr:0xf3beac30c498d9e26865f34fcaa57dbb935b0d74') | ||
``` |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1086939
7
14
205
17
1588
3
1
+ Addeddid-resolver@1.0.0(transitive)
- Removedbabel-plugin-module-resolver@^3.1.1
- Removedbabel-runtime@^6.26.0
- Removedbabel-plugin-module-resolver@3.2.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddid-resolver@0.0.6(transitive)
- Removedfind-babel-config@1.2.2(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedglob@7.2.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedjson5@1.0.2(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedonce@1.4.0(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpkg-up@2.0.0(transitive)
- Removedreselect@3.0.1(transitive)
- Removedresolve@1.22.10(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updateddid-resolver@1.0.0