{"name":"web3-providers-ws","version":"1.8.1-rc.0","license":"LGPL-3.0","_id":"web3-providers-ws@1.8.1-rc.0","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":"9c6b7faf3d8245c8a2b8e7993d72f1ba331c3a33","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.8.1-rc.0.tgz","fileCount":12,"integrity":"sha512-runzmGqfYf6INulmmXncIjYSqS+8t6z8Bibt1hNXNN6BNGo8ipUxHo/HLHxmwH+sNS5gJtN0QahI+ZDOjc9MRA==","signatures":[{"sig":"MEUCICqqToZt8vnikannHSyXKkYF4N6PI0Gx8aAk28aGRJfTAiEAhfRKdfxtMz72pJCpV5OJ8QTzoRj4f32AgDHkJxJVpUw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32115,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW9p+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoG3A//T3dfgPStiIWbLOyeN/2PeMFnpITuEn/E0JsujpdaJTQaXqds\r\n/Q7Zu0cMijsJxBI0tJRtU4Uoz/Vr+iP/Sfx/6ST2Aps9D7dZ16wLbB604gZ0\r\nBYgX5ZzyHRMSYD6YRJr/E9O5Q+bG4ZrzJmNOi1o8LGrKgoRgQSrVlxF89Bdi\r\n78SmVq9+F6YaW/aOm03e53jakYPMpauOnGW66sGvd2ADQKm5envMHUKcvWyc\r\n+xW24meSED0kg283gs9/uIx14jBe0n4meJxJJK4B+Iou4Kp4AHhHNBsP4jbz\r\nf87UBjNR79hJHmVnQJoYOvYA1mkIUN05PY5T18B8FosbbAP+DilCK/t3xXVG\r\nxyqLQWFxUM0W66RuxgTfMicD00HMm7TqRVv5AeINxA2lANaDy6mT4IPgMRGw\r\nhlyuQ9Bq+pEUxgu+hiqGc1SOxlrJ9++3sFlfEv4EhDzst/+M79aryDUgjXOe\r\nfur8Q/edxO/UeANnwBWXn+UsyAIPflFC3q2HvfSzmmwgOFuqwuqvQgbV6i0t\r\nHotgACOKEuMCLoLWE28AnGSvryO5WVcRIit1QtAhNVWratNX0UMonku27swd\r\nHbRTlN6z3e8BYNmXvwVXmVVlGzoIIwNVgU3Ud3Nm5mm0Rjf21Pt2YE0IN0Zl\r\nD3Zo9Uh83P8eZM5ToTSVXrkJlFtv513IebU=\r\n=yrXP\r\n-----END PGP SIGNATURE-----\r\n","size":6039,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.8.1-rc.0.tgz"},"main":"lib/index.js","types":"types/index.d.ts","readme":"# web3-providers-ws\n\n[![NPM Package][npm-image]][npm-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\n","engines":{"node":">=8.0.0"},"gitHead":"751d85b0538c21159dd157cd9eb8336c3258281b","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.20.0+x64 (darwin)","description":"Module to handle web3 RPC connections over WebSockets.","directories":{},"_nodeVersion":"14.20.0","dependencies":{"websocket":"^1.0.32","eventemitter3":"4.0.4","web3-core-helpers":"1.8.1-rc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"^3.9.5"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_1.8.1-rc.0_1666964093938_0.5000368045389105","host":"s3://npm-registry-packages"},"publish_time":1666964094108,"_cnpm_publish_time":1666964094108,"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"}}