create-web3-provider
Advanced tools
Comparing version 1.3.2 to 1.4.0
{ | ||
"name": "create-web3-provider", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "Easily create a web3 provider from scratch.", | ||
@@ -16,7 +16,7 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"ethereumjs-util": "^5.2.0", | ||
"lodash": "^4.17.10", | ||
"web3-providers-http": "^1.0.0-beta.35", | ||
"web3-providers-ipc": "^1.0.0-beta.35", | ||
"web3-providers-ws": "^1.0.0-beta.35" | ||
"ethereumjs-util": "^6.0.0", | ||
"lodash": "^4.17.11", | ||
"web3-providers-http": "^1.0.0-beta.37", | ||
"web3-providers-ipc": "^1.0.0-beta.37", | ||
"web3-providers-ws": "^1.0.0-beta.37" | ||
}, | ||
@@ -32,3 +32,4 @@ "keywords": [ | ||
"zero-conf" | ||
] | ||
], | ||
"devDependencies": {} | ||
} |
@@ -62,16 +62,10 @@ 'use strict' | ||
network = network || 'main'; | ||
infuraKey = infuraKey || createInfuraKey(); | ||
infuraKey = infuraKey || 'b9618835284c4f5984bf6fe7332c2b2e'; | ||
if (network == 'main') | ||
network = 'mainnet'; | ||
if (websocket) | ||
return `wss://${network}.infura.io/ws/${infuraKey}`; | ||
return `https://${network}.infura.io/${infuraKey}`; | ||
return `wss://${network}.infura.io/ws/v3/${infuraKey}`; | ||
return `https://${network}.infura.io/v3/${infuraKey}`; | ||
} | ||
function createInfuraKey() { | ||
const symbols = | ||
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; | ||
return _.times(20, () => symbols[_.random(0, symbols.length-1)]).join(''); | ||
} | ||
module.exports = createProvider; |
Sorry, the diff of this file is not supported yet
65842
64
+ Added@types/bn.js@4.11.6(transitive)
+ Addedethereumjs-util@6.2.1(transitive)
- Removedethereumjs-util@5.2.1(transitive)
Updatedethereumjs-util@^6.0.0
Updatedlodash@^4.17.11