{"name":"web3-providers-ws","version":"1.7.4-rc.1","license":"LGPL-3.0","_id":"web3-providers-ws@1.7.4-rc.1","maintainers":[{"name":"nazarhussain86","email":"nazarhussain@gmail.com"},{"name":"jdevcs","email":"junaid@chainsafe.io"},{"name":"gregthegreek","email":"gregorymarkou@gmail.com"},{"name":"spacesailor","email":"signup@wyatt.email"}],"homepage":"https://github.com/ethereum/web3.js/tree/1.x#readme","bugs":{"url":"https://github.com/ethereum/web3.js/issues"},"dist":{"shasum":"4bbeea1d917de461b42446112442b937f5991763","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.7.4-rc.1.tgz","fileCount":12,"integrity":"sha512-qtxi4AUG8i40vPkhFXJb+zQasy/gVHH3D6aNXeKd9dDqwx23UmWm+9KyzmGrgOiN3qBnH1Z88WQ5tCMTHW8M/w==","signatures":[{"sig":"MEYCIQCO46Ea2e28G2uK4gdgBteKPwoJXMHDSV9B2pw12zvQBgIhAKWEWy7kLQSZg/zUDyMGp2A5QyBkmVEv6WaDDfdEk2Ji","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32607,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioMErACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3ag/7B6m5DIKPz/1+JX7aGc30EnBvWv1JNTrmlcC9IzksqSD6eTEv\r\nz1CevAFU8j4Z7L1+NJsKEelTQ24VF3M103Q+hJbNVQGshltC18bOxhD6Hh1E\r\nI4ElbIjukdwjJxiUXSlyFxpbKm+Yq1WjNzKw/PQGCHHwqoOQiRPdiU+uc/I8\r\npPDI3ANWj4buH5bXh+wp4gTj8soLz2/pQ8aRvJdr9VzMzPQUSqBEpE12vS+w\r\nD0PtQkm/5FQb/ysyg+MKJPjmcumpEJe5i6usaa02UXUFdrWeimw03YW7MZe5\r\n+zeM+R3nQ67nXIW60AaQfh6OL1WMXWTx9Fnr9LY+/Xdo+YBARql3+DPjlYPP\r\nGsRT+f30q3Zgxd+xxNyW91rQi+hZ8M4Dcaz+b0x6ERxn4YFDRkkwv4JltWN8\r\n0MAQpGTZArzCuZTSiIaom6aP8R1JVyKJZ/Vi/SrCAMFlheYvI9/apZ9MFAXO\r\ns/dTqIpL4MgVLbL4tcBp1SvyIgKf0XJjI5lbG0JboTP7zofTPijcUOA8QPj2\r\nQaC1AZI1WDgMa2z5IGCsZrxy9d7pcWBE1eD/dbGW8tpyqqiuWkCkpJDgNbbc\r\nlfrv1LOEB4EkGpIVxDPDJOsV0VPC7gf16GzfYEVorAEJvqTZ0+Pb9Rhp267I\r\nRI6W/ToBuzpWKuhJYkacS3EwYwRtFNGnZJw=\r\n=oCBq\r\n-----END PGP SIGNATURE-----\r\n","size":6132,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.7.4-rc.1.tgz"},"main":"lib/index.js","types":"types/index.d.ts","readme":"# web3-providers-ws\n\n[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]\n\nThis is a websocket provider sub-package for [web3.js][repo].  \n\nPlease read the [documentation][docs] for more.\n\n## Installation\n\n### Node.js\n\n```bash\nnpm install web3-providers-ws\n```\n\n## Usage\n\n```js\nconst Web3WsProvider = require('web3-providers-ws');\n\nconst options = {\n    timeout: 30000, // ms\n\n    // Useful for credentialed urls, e.g: ws://username:password@localhost:8546\n    headers: {\n      authorization: 'Basic username:password'\n    },\n\n    clientConfig: {\n      // Useful if requests are large\n      maxReceivedFrameSize: 100000000,   // bytes - default: 1MiB\n      maxReceivedMessageSize: 100000000, // bytes - default: 8MiB\n\n      // Useful to keep a connection alive\n      keepalive: true,\n      keepaliveInterval: 60000 // ms\n    },\n\n    // Enable auto reconnection\n    reconnect: {\n        auto: true,\n        delay: 5000, // ms\n        maxAttempts: 5,\n        onTimeout: false\n    }\n};\n\nconst ws = new Web3WsProvider('ws://localhost:8546', options);\n```\n\nAdditional client config options can be found [here](https://github.com/theturtle32/WebSocket-Node/blob/v1.0.31/docs/WebSocketClient.md#client-config-options).\n\n## Types\n\nAll the TypeScript typings are placed in the `types` folder.\n\n[docs]: http://web3js.readthedocs.io/en/1.0/\n[repo]: https://github.com/ethereum/web3.js\n[npm-image]: https://img.shields.io/npm/v/web3-providers-ws.svg\n[npm-url]: https://npmjs.org/package/web3-providers-ws\n[deps-image]: https://david-dm.org/ethereum/web3.js/1.x/status.svg?path=packages/web3-providers-ws\n[deps-url]: https://david-dm.org/ethereum/web3.js/1.x?path=packages/web3-providers-ws\n[deps-dev-image]: https://david-dm.org/ethereum/web3.js/1.x/dev-status.svg?path=packages/web3-providers-ws\n[deps-dev-url]: https://david-dm.org/ethereum/web3.js/1.x?type=dev&path=packages/web3-providers-ws\n","engines":{"node":">=8.0.0"},"gitHead":"a286ab3a0a7866b88c206fd3d6f17033209f52a8","scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types"},"_npmUser":{"name":"jdevcs","email":"junaid@chainsafe.io"},"repository":{"url":"git+https://github.com/ethereum/web3.js.git#1.x","type":"git"},"_npmVersion":"lerna/4.0.0/node@v14.17.2+x64 (linux)","description":"Module to handle web3 RPC connections over WebSockets.","directories":{},"_nodeVersion":"14.17.2","dependencies":{"websocket":"^1.0.32","eventemitter3":"4.0.4","web3-core-helpers":"1.7.4-rc.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"^3.9.5"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_1.7.4-rc.1_1654702379091_0.6875915061718185","host":"s3://npm-registry-packages"},"publish_time":1654702379286,"_cnpm_publish_time":1654702379286,"dist-tags":{"dev":"4.0.9-dev.bf16917.0","latest":"4.0.8","legacy":"1.10.4","legacy-dev":"1.10.4-dev.0","rc":"4.0.4-rc.0","rc-legacy":"1.10.1-rc.0"}}