Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ethr-did-resolver

Package Overview
Dependencies
Maintainers
6
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethr-did-resolver - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

dist/ethr-did-resolver.ejs

53

package.json
{
"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')
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc