provider - enable subscription support (newHeads, logs)

feature/default_network_editable
kumavis 6 years ago
parent c500ef4a58
commit 354f8c0d7d
  1. 10
      app/scripts/controllers/network/createInfuraClient.js
  2. 20
      app/scripts/metamask-controller.js
  3. 355
      package-lock.json
  4. 10
      package.json

@ -1,5 +1,6 @@
const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware') const mergeMiddleware = require('json-rpc-engine/src/mergeMiddleware')
const createBlockReEmitMiddleware = require('eth-json-rpc-middleware/block-reemit') const createBlockReRefMiddleware = require('eth-json-rpc-middleware/block-ref')
const createRetryOnEmptyMiddleware = require('eth-json-rpc-middleware/retryOnEmpty')
const createBlockCacheMiddleware = require('eth-json-rpc-middleware/block-cache') const createBlockCacheMiddleware = require('eth-json-rpc-middleware/block-cache')
const createInflightMiddleware = require('eth-json-rpc-middleware/inflight-cache') const createInflightMiddleware = require('eth-json-rpc-middleware/inflight-cache')
const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector') const createBlockTrackerInspectorMiddleware = require('eth-json-rpc-middleware/block-tracker-inspector')
@ -11,13 +12,14 @@ module.exports = createInfuraClient
function createInfuraClient ({ network }) { function createInfuraClient ({ network }) {
const infuraMiddleware = createInfuraMiddleware({ network }) const infuraMiddleware = createInfuraMiddleware({ network })
const blockProvider = providerFromMiddleware(infuraMiddleware) const infuraProvider = providerFromMiddleware(infuraMiddleware)
const blockTracker = new BlockTracker({ provider: blockProvider }) const blockTracker = new BlockTracker({ provider: infuraProvider })
const networkMiddleware = mergeMiddleware([ const networkMiddleware = mergeMiddleware([
createBlockCacheMiddleware({ blockTracker }), createBlockCacheMiddleware({ blockTracker }),
createInflightMiddleware(), createInflightMiddleware(),
createBlockReEmitMiddleware({ blockTracker, provider: blockProvider }), createBlockReRefMiddleware({ blockTracker, provider: infuraProvider }),
createRetryOnEmptyMiddleware({ blockTracker, provider: infuraProvider }),
createBlockTrackerInspectorMiddleware({ blockTracker }), createBlockTrackerInspectorMiddleware({ blockTracker }),
infuraMiddleware, infuraMiddleware,
]) ])

@ -15,6 +15,7 @@ const RpcEngine = require('json-rpc-engine')
const debounce = require('debounce') const debounce = require('debounce')
const createEngineStream = require('json-rpc-middleware-stream/engineStream') const createEngineStream = require('json-rpc-middleware-stream/engineStream')
const createFilterMiddleware = require('eth-json-rpc-filters') const createFilterMiddleware = require('eth-json-rpc-filters')
const createSubscriptionManager = require('eth-json-rpc-filters/subscriptionManager')
const createOriginMiddleware = require('./lib/createOriginMiddleware') const createOriginMiddleware = require('./lib/createOriginMiddleware')
const createLoggerMiddleware = require('./lib/createLoggerMiddleware') const createLoggerMiddleware = require('./lib/createLoggerMiddleware')
const createProviderMiddleware = require('./lib/createProviderMiddleware') const createProviderMiddleware = require('./lib/createProviderMiddleware')
@ -1246,24 +1247,33 @@ module.exports = class MetamaskController extends EventEmitter {
setupProviderConnection (outStream, origin) { setupProviderConnection (outStream, origin) {
// setup json rpc engine stack // setup json rpc engine stack
const engine = new RpcEngine() const engine = new RpcEngine()
const provider = this.provider
const blockTracker = this.blockTracker
// create filter polyfill middleware // create filter polyfill middleware
const filterMiddleware = createFilterMiddleware({ const filterMiddleware = createFilterMiddleware({ provider, blockTracker })
provider: this.provider, // create subscription polyfill middleware
blockTracker: this.blockTracker, const subscriptionManager = createSubscriptionManager({ provider, blockTracker })
}) subscriptionManager.events.on('notification', (message) => engine.emit('notification', message))
// metadata
engine.push(createOriginMiddleware({ origin })) engine.push(createOriginMiddleware({ origin }))
engine.push(createLoggerMiddleware({ origin })) engine.push(createLoggerMiddleware({ origin }))
// filter and subscription polyfills
engine.push(filterMiddleware) engine.push(filterMiddleware)
engine.push(subscriptionManager.middleware)
// watch asset
engine.push(this.preferencesController.requestWatchAsset.bind(this.preferencesController)) engine.push(this.preferencesController.requestWatchAsset.bind(this.preferencesController))
// sign typed data middleware
engine.push(this.createTypedDataMiddleware('eth_signTypedData', 'V1').bind(this)) engine.push(this.createTypedDataMiddleware('eth_signTypedData', 'V1').bind(this))
engine.push(this.createTypedDataMiddleware('eth_signTypedData_v1', 'V1').bind(this)) engine.push(this.createTypedDataMiddleware('eth_signTypedData_v1', 'V1').bind(this))
engine.push(this.createTypedDataMiddleware('eth_signTypedData_v3', 'V3', true).bind(this)) engine.push(this.createTypedDataMiddleware('eth_signTypedData_v3', 'V3', true).bind(this))
engine.push(createProviderMiddleware({ provider: this.provider })) // forward to metamask primary provider
engine.push(createProviderMiddleware({ provider }))
// setup connection // setup connection
const providerStream = createEngineStream({ engine }) const providerStream = createEngineStream({ engine })
pump( pump(
outStream, outStream,
providerStream, providerStream,

355
package-lock.json generated

@ -5469,8 +5469,7 @@
"btoa": { "btoa": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
"integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
"dev": true
}, },
"buffer": { "buffer": {
"version": "5.1.0", "version": "5.1.0",
@ -9605,7 +9604,7 @@
}, },
"eth-json-rpc-middleware": { "eth-json-rpc-middleware": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "http://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz", "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz",
"integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==", "integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==",
"requires": { "requires": {
"async": "^2.5.0", "async": "^2.5.0",
@ -9644,12 +9643,12 @@
}, },
"node-fetch": { "node-fetch": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz",
"integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U=" "integrity": "sha1-q4hOjn5X44qUR1POxwb3iNF2i7U="
}, },
"whatwg-fetch": { "whatwg-fetch": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
"integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
} }
} }
@ -9731,46 +9730,60 @@
} }
}, },
"eth-json-rpc-filters": { "eth-json-rpc-filters": {
"version": "2.1.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-2.1.1.tgz", "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-3.0.1.tgz",
"integrity": "sha512-FSFcCMJ1lRS8az1LhIK5Klima8Hyfv4keKSdW2MA3zwiN/wX1NKb/sQSEFO3nstPUqR2Aa02lVokp85UnnrBlA==", "integrity": "sha512-F/UbtD47UnZDFILYP5GJLklYQ7witEI9TdCLgw0r4iag8ZLzz5h4Q+9odg2ASVZKkm8E50mrb7PaYCK0thVxfw==",
"requires": { "requires": {
"await-semaphore": "^0.1.1", "await-semaphore": "^0.1.3",
"eth-json-rpc-middleware": "^1.6.0", "eth-json-rpc-middleware": "^2.6.0",
"ethjs-query": "^0.3.6", "ethjs-query": "^0.3.8",
"json-rpc-engine": "^3.4.0", "json-rpc-engine": "^3.8.0",
"lodash.flatmap": "^4.5.0" "lodash.flatmap": "^4.5.0",
"safe-event-emitter": "^1.0.1"
}, },
"dependencies": { "dependencies": {
"babelify": {
"version": "7.3.0",
"resolved": "http://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz",
"integrity": "sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=",
"requires": {
"babel-core": "^6.0.14",
"object-assign": "^4.0.0"
}
},
"eth-json-rpc-middleware": { "eth-json-rpc-middleware": {
"version": "1.6.0", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz", "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-2.6.0.tgz",
"integrity": "sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==", "integrity": "sha512-IziwA0IXzxCVgruvb0KzhypAdRNM6QBC6LOlXQrzr8ddo3in+PGzl9tMV79TGFoRoRfsysnjbvOKwMnQJADkIw==",
"requires": { "requires": {
"async": "^2.5.0", "async": "^2.5.0",
"btoa": "^1.2.1",
"clone": "^2.1.1",
"eth-query": "^2.1.2", "eth-query": "^2.1.2",
"eth-sig-util": "^1.4.2",
"eth-tx-summary": "^3.1.2", "eth-tx-summary": "^3.1.2",
"ethereumjs-block": "^1.6.0", "ethereumjs-block": "^1.6.0",
"ethereumjs-tx": "^1.3.3", "ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.2", "ethereumjs-util": "^5.1.2",
"ethereumjs-vm": "^2.1.0", "ethereumjs-vm": "^2.1.0",
"fetch-ponyfill": "^4.0.0", "fetch-ponyfill": "^4.0.0",
"json-rpc-engine": "^3.6.0", "json-rpc-engine": "^3.6.3",
"json-rpc-error": "^2.0.0", "json-rpc-error": "^2.0.0",
"json-stable-stringify": "^1.0.1", "json-stable-stringify": "^1.0.1",
"pify": "^3.0.0",
"promise-to-callback": "^1.0.0", "promise-to-callback": "^1.0.0",
"safe-event-emitter": "^1.0.1",
"tape": "^4.6.3" "tape": "^4.6.3"
} }
}, },
"eth-sig-util": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz",
"integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=",
"requires": {
"ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7",
"ethereumjs-util": "^5.1.1"
}
},
"ethereumjs-abi": {
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7",
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
"requires": {
"bn.js": "^4.10.0",
"ethereumjs-util": "^5.0.0"
}
},
"ethereumjs-util": { "ethereumjs-util": {
"version": "5.2.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
@ -9803,19 +9816,6 @@
"requires": { "requires": {
"promise-to-callback": "^1.0.0" "promise-to-callback": "^1.0.0"
} }
},
"json-rpc-engine": {
"version": "3.7.3",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz",
"integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==",
"requires": {
"async": "^2.0.1",
"babel-preset-env": "^1.3.2",
"babelify": "^7.3.0",
"clone": "^2.1.1",
"json-rpc-error": "^2.0.0",
"promise-to-callback": "^1.0.0"
}
} }
} }
}, },
@ -9889,9 +9889,9 @@
} }
}, },
"eth-json-rpc-middleware": { "eth-json-rpc-middleware": {
"version": "2.5.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-2.5.0.tgz", "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-3.0.0.tgz",
"integrity": "sha512-SVBP7U23JMd8HBp6uxh4BPbvrbtOsRI+otMCLCTtvH95MlvzuRDJZl5BQNIXZi7CNTEXjQZVcGAKLizlnc7zMQ==", "integrity": "sha512-t8ajxmUodXP7WAMXKrB8jCU05BE/iSXxLeiXCmC++FWAUXhnBV3+Li1ca0q4w+swmQYsSXZnViLw5w5+I/9IpA==",
"dev": true, "dev": true,
"requires": { "requires": {
"async": "^2.5.0", "async": "^2.5.0",
@ -9910,6 +9910,7 @@
"json-stable-stringify": "^1.0.1", "json-stable-stringify": "^1.0.1",
"pify": "^3.0.0", "pify": "^3.0.0",
"promise-to-callback": "^1.0.0", "promise-to-callback": "^1.0.0",
"safe-event-emitter": "^1.0.1",
"tape": "^4.6.3" "tape": "^4.6.3"
}, },
"dependencies": { "dependencies": {
@ -18024,15 +18025,16 @@
"dev": true "dev": true
}, },
"json-rpc-engine": { "json-rpc-engine": {
"version": "3.7.4", "version": "3.8.0",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.4.tgz", "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz",
"integrity": "sha512-urQunMR6LYIPhGs6ppLGqdwSVkllaVa70Em9uGYgEi5iqG3/oKYZM0B9C9EaRfih30k+tztDn2GG9eHbuaMmwg==", "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==",
"requires": { "requires": {
"async": "^2.0.1", "async": "^2.0.1",
"babel-preset-env": "^1.3.2", "babel-preset-env": "^1.7.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"json-rpc-error": "^2.0.0", "json-rpc-error": "^2.0.0",
"promise-to-callback": "^1.0.0" "promise-to-callback": "^1.0.0",
"safe-event-emitter": "^1.0.1"
}, },
"dependencies": { "dependencies": {
"babelify": { "babelify": {
@ -18055,15 +18057,16 @@
} }
}, },
"json-rpc-middleware-stream": { "json-rpc-middleware-stream": {
"version": "1.0.1", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-1.0.1.tgz", "resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-2.1.0.tgz",
"integrity": "sha512-IR6cOO6B21NdLpiYblueB3O+g3UAYLIZd6ZgZfddVPl0z6vSECcpuiYnV5MmIMJY3D0fLYpJqOxYaEmLYQqTtA==", "integrity": "sha512-JxX+kbS9sDMHvnADFLlV/QtkgeIYVF/2R8UuxXaiZc7ntVEgi/lkzMGbGkDwdRg36rHnUIvCZk6zR/5Y3bAq1w==",
"requires": { "requires": {
"end-of-stream": "^1.4.0", "end-of-stream": "^1.4.0",
"eth-block-tracker": "^2.1.2", "eth-block-tracker": "^2.1.2",
"ethjs-query": "^0.2.9", "ethjs-query": "^0.2.9",
"json-rpc-engine": "^3.0.1", "json-rpc-engine": "^3.8.0",
"readable-stream": "^2.3.3" "readable-stream": "^2.3.3",
"safe-event-emitter": "^1.0.1"
}, },
"dependencies": { "dependencies": {
"async-eventemitter": { "async-eventemitter": {
@ -18082,11 +18085,6 @@
"object-assign": "^4.0.0" "object-assign": "^4.0.0"
} }
}, },
"bn.js": {
"version": "4.11.6",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
},
"eth-block-tracker": { "eth-block-tracker": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz", "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz",
@ -18127,6 +18125,22 @@
"is-hex-prefixed": "1.0.0", "is-hex-prefixed": "1.0.0",
"number-to-bn": "1.7.0", "number-to-bn": "1.7.0",
"strip-hex-prefix": "1.0.0" "strip-hex-prefix": "1.0.0"
},
"dependencies": {
"bn.js": {
"version": "4.11.6",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
},
"ethjs-util": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
"integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
"requires": {
"is-hex-prefixed": "1.0.0",
"strip-hex-prefix": "1.0.0"
}
}
} }
}, },
"ethjs-query": { "ethjs-query": {
@ -18143,26 +18157,17 @@
"resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz", "resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz",
"integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0=" "integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0="
}, },
"ethjs-util": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
"integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
"requires": {
"is-hex-prefixed": "1.0.0",
"strip-hex-prefix": "1.0.0"
}
},
"json-rpc-engine": { "json-rpc-engine": {
"version": "3.7.3", "version": "3.8.0",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz", "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz",
"integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==", "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==",
"requires": { "requires": {
"async": "^2.0.1", "async": "^2.0.1",
"babel-preset-env": "^1.3.2", "babel-preset-env": "^1.7.0",
"babelify": "^7.3.0", "babelify": "^7.3.0",
"clone": "^2.1.1",
"json-rpc-error": "^2.0.0", "json-rpc-error": "^2.0.0",
"promise-to-callback": "^1.0.0" "promise-to-callback": "^1.0.0",
"safe-event-emitter": "^1.0.1"
} }
}, },
"pify": { "pify": {
@ -20828,6 +20833,13 @@
"pump": "^1.0.2" "pump": "^1.0.2"
}, },
"dependencies": { "dependencies": {
"async-eventemitter": {
"version": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
"from": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
"requires": {
"async": "^2.4.0"
}
},
"babelify": { "babelify": {
"version": "7.3.0", "version": "7.3.0",
"resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz", "resolved": "https://registry.npmjs.org/babelify/-/babelify-7.3.0.tgz",
@ -20837,6 +20849,78 @@
"object-assign": "^4.0.0" "object-assign": "^4.0.0"
} }
}, },
"eth-block-tracker": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz",
"integrity": "sha512-NamWuMBIl8kmkJFVj8WzGatySTzQPQag4Xr677yFxdVtIxACFbL/dQowk0MzEqIKk93U1TwY3MjVU6mOcwZnKA==",
"requires": {
"async-eventemitter": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
"eth-query": "^2.1.0",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.3",
"ethjs-util": "^0.1.3",
"json-rpc-engine": "^3.6.0",
"pify": "^2.3.0",
"tape": "^4.6.3"
}
},
"ethereumjs-util": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
"requires": {
"bn.js": "^4.11.0",
"create-hash": "^1.1.2",
"ethjs-util": "^0.1.3",
"keccak": "^1.0.2",
"rlp": "^2.0.0",
"safe-buffer": "^5.1.1",
"secp256k1": "^3.0.1"
}
},
"ethjs-format": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/ethjs-format/-/ethjs-format-0.2.2.tgz",
"integrity": "sha1-1zs6YFwuElcHn3B3/VRI6ZjOD80=",
"requires": {
"bn.js": "4.11.6",
"ethjs-schema": "0.1.5",
"ethjs-util": "0.1.3",
"is-hex-prefixed": "1.0.0",
"number-to-bn": "1.7.0",
"strip-hex-prefix": "1.0.0"
},
"dependencies": {
"bn.js": {
"version": "4.11.6",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
},
"ethjs-util": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
"integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
"requires": {
"is-hex-prefixed": "1.0.0",
"strip-hex-prefix": "1.0.0"
}
}
}
},
"ethjs-query": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/ethjs-query/-/ethjs-query-0.2.9.tgz",
"integrity": "sha1-om5rTzhpnpLzSyGE51x4lDKcQvE=",
"requires": {
"ethjs-format": "0.2.2",
"ethjs-rpc": "0.1.5"
}
},
"ethjs-schema": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz",
"integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0="
},
"json-rpc-engine": { "json-rpc-engine": {
"version": "3.7.3", "version": "3.7.3",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz", "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz",
@ -20850,6 +20934,18 @@
"promise-to-callback": "^1.0.0" "promise-to-callback": "^1.0.0"
} }
}, },
"json-rpc-middleware-stream": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-1.0.1.tgz",
"integrity": "sha512-IR6cOO6B21NdLpiYblueB3O+g3UAYLIZd6ZgZfddVPl0z6vSECcpuiYnV5MmIMJY3D0fLYpJqOxYaEmLYQqTtA==",
"requires": {
"end-of-stream": "^1.4.0",
"eth-block-tracker": "^2.1.2",
"ethjs-query": "^0.2.9",
"json-rpc-engine": "^3.0.1",
"readable-stream": "^2.3.3"
}
},
"obs-store": { "obs-store": {
"version": "2.4.1", "version": "2.4.1",
"resolved": "https://registry.npmjs.org/obs-store/-/obs-store-2.4.1.tgz", "resolved": "https://registry.npmjs.org/obs-store/-/obs-store-2.4.1.tgz",
@ -20862,6 +20958,11 @@
"xtend": "^4.0.1" "xtend": "^4.0.1"
} }
}, },
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"pump": { "pump": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz",
@ -20874,22 +20975,120 @@
} }
}, },
"metamask-inpage-provider": { "metamask-inpage-provider": {
"version": "1.1.1", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/metamask-inpage-provider/-/metamask-inpage-provider-1.1.1.tgz", "resolved": "https://registry.npmjs.org/metamask-inpage-provider/-/metamask-inpage-provider-1.2.0.tgz",
"integrity": "sha512-I7P8mny3e03dwzt0SFsXOmoj1eEz5GpUGiBIAJ4fyXUpx92JkII5ekq/MNkf5muktoJod9cWjDF03//+/DCD2A==", "integrity": "sha512-NH27h4ckuKvgraTz+MGwvQXFu4zkAxSAUc74rIzt+4Q94km9gePDZOM81xiA0AA0IExzv3844PWSWaYI1fagog==",
"requires": { "requires": {
"json-rpc-engine": "^3.7.4", "json-rpc-engine": "^3.7.4",
"json-rpc-middleware-stream": "^1.0.1", "json-rpc-middleware-stream": "^2.0.0",
"loglevel": "^1.6.1", "loglevel": "^1.6.1",
"obj-multiplex": "^1.0.0", "obj-multiplex": "^1.0.0",
"obs-store": "^3.0.0", "obs-store": "^3.0.0",
"pump": "^3.0.0" "pump": "^3.0.0",
"safe-event-emitter": "^1.0.1"
}, },
"dependencies": { "dependencies": {
"async-eventemitter": {
"version": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
"from": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
"requires": {
"async": "^2.4.0"
}
},
"eth-block-tracker": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-2.3.1.tgz",
"integrity": "sha512-NamWuMBIl8kmkJFVj8WzGatySTzQPQag4Xr677yFxdVtIxACFbL/dQowk0MzEqIKk93U1TwY3MjVU6mOcwZnKA==",
"requires": {
"async-eventemitter": "github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c",
"eth-query": "^2.1.0",
"ethereumjs-tx": "^1.3.3",
"ethereumjs-util": "^5.1.3",
"ethjs-util": "^0.1.3",
"json-rpc-engine": "^3.6.0",
"pify": "^2.3.0",
"tape": "^4.6.3"
}
},
"ethereumjs-util": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
"integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
"requires": {
"bn.js": "^4.11.0",
"create-hash": "^1.1.2",
"ethjs-util": "^0.1.3",
"keccak": "^1.0.2",
"rlp": "^2.0.0",
"safe-buffer": "^5.1.1",
"secp256k1": "^3.0.1"
}
},
"ethjs-format": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/ethjs-format/-/ethjs-format-0.2.2.tgz",
"integrity": "sha1-1zs6YFwuElcHn3B3/VRI6ZjOD80=",
"requires": {
"bn.js": "4.11.6",
"ethjs-schema": "0.1.5",
"ethjs-util": "0.1.3",
"is-hex-prefixed": "1.0.0",
"number-to-bn": "1.7.0",
"strip-hex-prefix": "1.0.0"
},
"dependencies": {
"bn.js": {
"version": "4.11.6",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz",
"integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU="
},
"ethjs-util": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.3.tgz",
"integrity": "sha1-39XqSkANxeQhqInK9H4IGtp4u1U=",
"requires": {
"is-hex-prefixed": "1.0.0",
"strip-hex-prefix": "1.0.0"
}
}
}
},
"ethjs-query": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/ethjs-query/-/ethjs-query-0.2.9.tgz",
"integrity": "sha1-om5rTzhpnpLzSyGE51x4lDKcQvE=",
"requires": {
"ethjs-format": "0.2.2",
"ethjs-rpc": "0.1.5"
}
},
"ethjs-schema": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/ethjs-schema/-/ethjs-schema-0.1.5.tgz",
"integrity": "sha1-WXQOOzl3vNu5sRvDBoIB6Kzquw0="
},
"json-rpc-middleware-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/json-rpc-middleware-stream/-/json-rpc-middleware-stream-2.0.0.tgz",
"integrity": "sha512-cDM0UQrNK6LTs5GgGb7xMfL6UGhKHHVjZRkKAUYyRsb0vjGUAC4AmkAc1Wngg0PQf/IyCsrrFi6WAxsNv5hTKQ==",
"requires": {
"end-of-stream": "^1.4.0",
"eth-block-tracker": "^2.1.2",
"ethjs-query": "^0.2.9",
"json-rpc-engine": "^3.0.1",
"readable-stream": "^2.3.3",
"safe-event-emitter": "^1.0.1"
}
},
"loglevel": { "loglevel": {
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
"integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po=" "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po="
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
} }
} }
}, },

@ -115,7 +115,7 @@
"eth-contract-metadata": "github:MetaMask/eth-contract-metadata#master", "eth-contract-metadata": "github:MetaMask/eth-contract-metadata#master",
"eth-ens-namehash": "^2.0.8", "eth-ens-namehash": "^2.0.8",
"eth-hd-keyring": "^1.2.2", "eth-hd-keyring": "^1.2.2",
"eth-json-rpc-filters": "^2.1.1", "eth-json-rpc-filters": "^3.0.1",
"eth-json-rpc-infura": "^3.0.0", "eth-json-rpc-infura": "^3.0.0",
"eth-keyring-controller": "^3.1.4", "eth-keyring-controller": "^3.1.4",
"eth-ledger-bridge-keyring": "^0.1.0", "eth-ledger-bridge-keyring": "^0.1.0",
@ -155,8 +155,8 @@
"iframe-stream": "^3.0.0", "iframe-stream": "^3.0.0",
"inject-css": "^0.1.1", "inject-css": "^0.1.1",
"jazzicon": "^1.2.0", "jazzicon": "^1.2.0",
"json-rpc-engine": "^3.7.4", "json-rpc-engine": "^3.8.0",
"json-rpc-middleware-stream": "^1.0.1", "json-rpc-middleware-stream": "^2.1.0",
"jsonschema": "^1.2.4", "jsonschema": "^1.2.4",
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"lodash.memoize": "^4.1.2", "lodash.memoize": "^4.1.2",
@ -164,7 +164,7 @@
"lodash.uniqby": "^4.7.0", "lodash.uniqby": "^4.7.0",
"loglevel": "^1.4.1", "loglevel": "^1.4.1",
"metamascara": "^2.0.0", "metamascara": "^2.0.0",
"metamask-inpage-provider": "^1.1.1", "metamask-inpage-provider": "^1.2.0",
"metamask-logo": "^2.1.4", "metamask-logo": "^2.1.4",
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"multihashes": "^0.4.12", "multihashes": "^0.4.12",
@ -260,7 +260,7 @@
"eslint-plugin-json": "^1.2.0", "eslint-plugin-json": "^1.2.0",
"eslint-plugin-mocha": "^5.0.0", "eslint-plugin-mocha": "^5.0.0",
"eslint-plugin-react": "^7.4.0", "eslint-plugin-react": "^7.4.0",
"eth-json-rpc-middleware": "^2.5.0", "eth-json-rpc-middleware": "^3.0.0",
"eth-keyring-controller": "^3.3.1", "eth-keyring-controller": "^3.3.1",
"file-loader": "^1.1.11", "file-loader": "^1.1.11",
"fs-extra": "^6.0.1", "fs-extra": "^6.0.1",

Loading…
Cancel
Save