{"name":"web3-providers-ws","version":"3.0.0-rc.5","license":"LGPL-3.0","_id":"web3-providers-ws@3.0.0-rc.5","maintainers":[{"name":"ralxz","email":"ryan@ryanio.com"},{"name":"spacesailor","email":"signup@wyatt.email"},{"name":"gregthegreek","email":"gregorymarkou@gmail.com"}],"dist":{"shasum":"240454bffbe2cd86440cacee95db4e25e26c57ed","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-3.0.0-rc.5.tgz","fileCount":12,"integrity":"sha512-UICrkvEuse5os9kuKBwrCrbw7zO316U5JgC1JPYpYURqe+fCHNwD8l/iiFZW6cEN4y7zcFEr+DE6+7SX0DiJ4g==","signatures":[{"sig":"MEUCIGhRXjVn9eWOp07nJh9mPjHQRflJskkTf+dNQZ5KWLQ1AiEAwxbSjdc4/ZExQ2FldVzF7MD3u7Wg6Jy3TDuGp9SlLvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg34KqCRA9TVsSAnZWagAANKYP/1ZhNUZq0R2BzE4B51FC\nESzC0R9hcV7Nmq9H2m3mDU11u7yF2UAElUD/lvehb6DH7EnvwoihvHsfB6iS\n+yZmDJSVEPVZHVff/xY/PKE6ff47gx444/WO4e2zu8OXmfpouymL/y28t1fq\nUDb3bgqPma7lGenOPgN6sapvkbqn0B2F1cK+OGroxPg7eTA9sm6MMrj5DkOE\niUkvQVWDkiiwxlcUPxaEO+m/1AL9i27Kpw+PCFPAKMztIqD8Xr4nEkgSNgzS\n+KjVDQgPVAyvHoVWCJXMMTvlGeDzNazIIgRmpAer7O1C5TZ5qykgdKMJKhU2\nVTshe6df5dDyWmBJgQiBqmQwFs0oWmjbSq5qfbVEbwvnMd33UoTTw/sCRGQ6\n8r7oacaqFLbJvtcU1qJcRoQoOj30svFgW7G3CwLlRplGXqRvLXyg6aMCDJIb\nIf9xtdqsZQUuWnNnspfJvMZNhPGbfxGCo1PMv/pU47hpMcYoA3g+MH6wPi0m\nwzMaJQC+l3SJFyCpJIPA/IvKyYu9UXUw0OSLBbUB60izjxzvtdoMYDqQE3jd\nWw7nLDm0NSQhuRiw4hf710ntc70lR1dsedLXbk78HhGLSdxQuPk8TtKZzxnc\nTPnCnhs+BcH4TiVRiSWBjX6jxmKNcSL7rw4RT37aRhCQgcj+FJeXZybRiyE0\n5r+F\r\n=YGAg\r\n-----END PGP SIGNATURE-----\r\n","size":6126,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-3.0.0-rc.5.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":"1c2edcc99b5931d544df979540cb1a379233d991","scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types"},"_npmUser":{"name":"spacesailor","email":"signup@wyatt.email"},"repository":{"url":"https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws","type":"git"},"_npmVersion":"lerna/3.22.1/node@v14.16.0+x64 (linux)","description":"Module to handle web3 RPC connections over WebSockets.","directories":{},"_nodeVersion":"14.16.0","dependencies":{"websocket":"^1.0.32","underscore":"1.12.1","eventemitter3":"4.0.4","web3-core-helpers":"3.0.0-rc.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"^3.9.5"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_3.0.0-rc.5_1625260713559_0.19576265508321167","host":"s3://npm-registry-packages"},"publish_time":1625260713714,"_cnpm_publish_time":1625260713714,"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"}}