Socket
Socket
Sign inDemoInstall

aion-web3-providers-ws

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aion-web3-providers-ws - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

6

package.json
{
"name": "aion-web3-providers-ws",
"namespace": "aion",
"version": "1.0.3",
"version": "1.1.0",
"description": "Module to handle web3 RPC connections over WebSockets.",

@@ -10,7 +10,7 @@ "repository": "https://github.com/aionnetwork/aion_web3/tree/master/packages/web3-providers-ws",

"dependencies": {
"aion-web3-core-helpers": "1.0.3",
"aion-web3-core-helpers": "1.1.0",
"underscore": "1.8.3",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible"
},
"gitHead": "d36131a6d8b1db7eeaaa545dafa1b5c74d4d2e68"
"gitHead": "b9adc81c487ef3be6e4a1cac9827b6224b61a95e"
}

@@ -1,40 +0,9 @@

# web3-providers-ws
# aion-web3-providers-ws
This is a sub package of [web3.js][repo]
This is a sub package of [aion_web3][repo].
This is a websocket provider for [web3.js][repo].
Please read the [documentation][docs] for more.
Please read the [documentation](https://docs.aion.network/docs/web3) for more information.
## Installation
**Note: Aion kernel does not currently support WebSockets. This package is not intended for general usage.**
### Node.js
```bash
npm install web3-providers-ws
```
### 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');
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);
```
[docs]: http://web3js.readthedocs.io/en/1.0/
[repo]: https://github.com/ethereum/web3.js
[repo]: https://github.com/aionnetwork/aion_web3
/*
This file is part of web3.js.
web3.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3.js. If not, see <http://www.gnu.org/licenses/>.
* Copyright (c) 2017-2018 Aion foundation.
*
* This file is part of the aion network project.
*
* The aion network project is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or any later version.
*
* The aion network project is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the aion network project source files.
* If not, see <https://www.gnu.org/licenses/>.
*
* Contributors:
* Aion foundation.
* Fabian Vogelsteller <fabian@frozeman.de>
*/
/** @file WebsocketProvider.js
* @authors:
* Fabian Vogelsteller <fabian@ethereum.org>
* @date 2017
*/
"use strict";
"use strict";

@@ -25,0 +27,0 @@ var _ = require('underscore');

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