{"name":"web3-providers-ws","version":"1.8.2-rc.0","license":"LGPL-3.0","_id":"web3-providers-ws@1.8.2-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":"3f0a830c3bba586f48e6d225594041466f94d7a0","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.8.2-rc.0.tgz","fileCount":12,"integrity":"sha512-f7Z+PVdx9W8JQNCn1lhcCGxddsqCDjZR4/eJJJG2EJmQResq14bQKhU5aINb0x2jMPnQPVStWdoB/gqppoj9IA==","signatures":[{"sig":"MEQCIFPorUrqSXoW1pWltQBYdlZcytYEEeHhjwJQVv4+w+1/AiBsPRd3eT1Y3oMlIFhX68OosUKsoA1T5gY9YP5pMSDuZg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32327,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvq6AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2oQ//SU7vUyw+gGe6AzVkKjgvUzHtLLC1wYp7ow+X0gkikuzS8Qqw\r\nqhU+YKBhzgZYiffECwfYP7mOW+zIxzLawm3RMnQfGqLU4vjzyRQIvIJFF9au\r\nY7exy3IQqgxomcClPK9A8cWZFo04aJggs/fYZe++iO8PCwmAh8S+j/TuuY4J\r\neR64Ssq93ckpX8ohFq8yU3wh6tw4Tefq5D5HCylAVklE/9ARo1ide7YaYNqt\r\nA8FHekR4dKng42YBsf9ULUPhIDWbfmfa4tczkeuvqeGLitHWWnF1ouAhNxkH\r\nn8DjVXDQVBe+ifqbjnjrtFZ6+2O7KESO7td0NCpJpM92nlTfgF2FscEuTwf0\r\ngoFYDtpiZEHNaExi3AUoH3awpt2PUpLXJnBW/onePPDPDc1wFy6sDN1eASs2\r\nM/J//lM5B1lXqpiknsCon5cNuI/tnGg5HYxGM8/M3Ewkw1ST1cW4oTieprcl\r\nwGuwYqI6W690GWeqb33iAYxRpWtQXsuqk4WzJmCgZ2DbzjsR6TmNElBawY0b\r\nvVbdJbMrPJuIx8Mr+qkD16EeO3TWi/lPOi5IW0mXtPlXNVMaNlaOYIyBOVnY\r\nBi8owKhF5jqp8k1gTluVj0tbH1jVSYrOhO2PlNssUN8gE/l5JzRJssE7uS/M\r\nlCr8byYtYtTOP/iTvk8hxcPULRVDUDEYxsw=\r\n=pX7E\r\n-----END PGP SIGNATURE-----\r\n","size":6102,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.8.2-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\nYou can install the package either using [NPM](https://www.npmjs.com/package/web3-providers-ws) or using [Yarn](https://yarnpkg.com/package/web3-providers-ws)\n\n### Using NPM\n\n```bash\nnpm install web3-providers-ws\n```\n\n### Using Yarn\n\n```bash\nyarn add 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","engines":{"node":">=8.0.0"},"gitHead":"ad2c90f68cf7170fb25c74704a97be629e72f71a","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/6.1.0/node@v14.20.0+x64 (linux)","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.2-rc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"4.1"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_1.8.2-rc.0_1673440896341_0.9335183340111541","host":"s3://npm-registry-packages"},"publish_time":1673440896496,"_cnpm_publish_time":1673440896496,"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"}}