web3-providers-ws
Advanced tools
Comparing version 1.2.9 to 1.2.10-rc.0
{ | ||
"name": "web3-providers-ws", | ||
"version": "1.2.9", | ||
"version": "1.2.10-rc.0", | ||
"description": "Module to handle web3 RPC connections over WebSockets.", | ||
@@ -11,3 +11,3 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws", | ||
"scripts": { | ||
"dtslint": "dtslint --localTs node_modules/typescript/lib types" | ||
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types" | ||
}, | ||
@@ -17,5 +17,5 @@ "types": "types/index.d.ts", | ||
"dependencies": { | ||
"eventemitter3": "^4.0.0", | ||
"eventemitter3": "4.0.4", | ||
"underscore": "1.9.1", | ||
"web3-core-helpers": "1.2.9", | ||
"web3-core-helpers": "1.2.10-rc.0", | ||
"websocket": "^1.0.31" | ||
@@ -25,5 +25,5 @@ }, | ||
"dtslint": "^3.4.1", | ||
"typescript": "latest" | ||
"typescript": "^3.9.5" | ||
}, | ||
"gitHead": "0e7ee3325437f73f4bace6c2df06aefafd72c716" | ||
"gitHead": "ef81e78b2eed69dd386e0d2cb9bd22d8af998c34" | ||
} |
@@ -5,6 +5,4 @@ # web3-providers-ws | ||
This is a sub-package of [web3.js][repo]. | ||
This is a websocket provider sub-package for [web3.js][repo]. | ||
This is a websocket provider for [web3.js][repo]. | ||
Please read the [documentation][docs] for more. | ||
@@ -20,20 +18,8 @@ | ||
### In the Browser | ||
Build running the following in the [web3.js][repo] repository: | ||
```bash | ||
npm run-script build-all | ||
``` | ||
Then include `dist/web3-providers-ws.js` in your html file. | ||
This will expose the `Web3WsProvider` object on the window object. | ||
## Usage | ||
```js | ||
// in node.js | ||
var Web3WsProvider = require('web3-providers-ws'); | ||
const Web3WsProvider = require('web3-providers-ws'); | ||
var options = { | ||
const options = { | ||
timeout: 30000, // ms | ||
@@ -65,3 +51,3 @@ | ||
var ws = new Web3WsProvider('ws://localhost:8546', options); | ||
const ws = new Web3WsProvider('ws://localhost:8546', options); | ||
``` | ||
@@ -68,0 +54,0 @@ |
@@ -133,3 +133,5 @@ /* | ||
if (_this.responseQueue.has(id)) { | ||
_this.responseQueue.get(id).callback(false, result); | ||
if(_this.responseQueue.get(id).callback !== undefined) { | ||
_this.responseQueue.get(id).callback(false, result); | ||
} | ||
_this.responseQueue.delete(id); | ||
@@ -136,0 +138,0 @@ } |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
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
487
19645
1
2
66
+ Addedeth-lib@0.2.8(transitive)
+ Addedeventemitter3@4.0.4(transitive)
+ Addedweb3-core-helpers@1.2.10-rc.0(transitive)
+ Addedweb3-eth-iban@1.2.10-rc.0(transitive)
+ Addedweb3-utils@1.2.10-rc.0(transitive)
- Removedbn.js@4.11.8(transitive)
- Removedeth-lib@0.2.7(transitive)
- Removedeventemitter3@4.0.7(transitive)
- Removedweb3-core-helpers@1.2.9(transitive)
- Removedweb3-eth-iban@1.2.9(transitive)
- Removedweb3-utils@1.2.9(transitive)
Updatedeventemitter3@4.0.4