web3-providers-ws
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "web3-providers-ws", | ||
"version": "1.2.1", | ||
"description": "Module to handle web3 RPC connections over WebSockets.", | ||
"repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws", | ||
"license": "LGPL-3.0", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"main": "src/index.js", | ||
"dependencies": { | ||
"underscore": "1.9.1", | ||
"web3-core-helpers": "1.2.1", | ||
"websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" | ||
} | ||
"name": "web3-providers-ws", | ||
"version": "1.2.2", | ||
"description": "Module to handle web3 RPC connections over WebSockets.", | ||
"repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws", | ||
"license": "LGPL-3.0", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"scripts": { | ||
"dtslint": "dtslint types --onlyTestTsNext" | ||
}, | ||
"types": "types/index.d.ts", | ||
"main": "src/index.js", | ||
"dependencies": { | ||
"underscore": "1.9.1", | ||
"web3-core-helpers": "1.2.2", | ||
"websocket": "github:web3-js/WebSocket-Node#polyfill/globalThis" | ||
}, | ||
"devDependencies": { | ||
"definitelytyped-header-parser": "^1.0.1", | ||
"dtslint": "0.4.2" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # web3-providers-ws | ||
This is a websocket provider for [web3.js][repo]. | ||
This is a websocket provider for [web3.js][repo]. | ||
Please read the [documentation][docs] for more. | ||
@@ -28,3 +28,2 @@ | ||
## Usage | ||
@@ -36,8 +35,14 @@ | ||
var options = { timeout: 30000, headers: {authorization: 'Basic username:password'} } // set a custom timeout at 30 seconds, and credentials (you can also add the credentials to the URL: ws://username:password@localhost:8546) | ||
var options = { | ||
timeout: 30000, | ||
headers: { authorization: 'Basic username:password' } | ||
}; // set a custom timeout at 30 seconds, and credentials (you can also add the credentials to the URL: ws://username:password@localhost:8546) | ||
var ws = new Web3WsProvider('ws://localhost:8546', options); | ||
``` | ||
## Types | ||
All the typescript typings are placed in the types folder. | ||
[docs]: http://web3js.readthedocs.io/en/1.0/ | ||
[repo]: https://github.com/ethereum/web3.js |
@@ -407,2 +407,12 @@ /* | ||
/** | ||
* Returns the desired boolean. | ||
* | ||
* @method supportsSubscriptions | ||
* @returns {boolean} | ||
*/ | ||
WebsocketProvider.prototype.supportsSubscriptions = function () { | ||
return true; | ||
}; | ||
module.exports = WebsocketProvider; |
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
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
17561
7
457
46
23
47
231
2
+ Added@noble/hashes@1.5.0(transitive)
+ Addedethereum-bloom-filters@1.2.0(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedweb3-core-helpers@1.2.2(transitive)
+ Addedweb3-eth-iban@1.2.2(transitive)
+ Addedweb3-utils@1.2.2(transitive)
- Removedrandomhex@0.1.5(transitive)
- Removedweb3-core-helpers@1.2.1(transitive)
- Removedweb3-eth-iban@1.2.1(transitive)
- Removedweb3-utils@1.2.1(transitive)
Updatedweb3-core-helpers@1.2.2