{"name":"web3-providers-ws","version":"1.5.0-rc.0","license":"LGPL-3.0","_id":"web3-providers-ws@1.5.0-rc.0","maintainers":[{"name":"ralxz","email":"ryan@ryanio.com"},{"name":"gregthegreek","email":"gregorymarkou@gmail.com"},{"name":"spacesailor","email":"signup@wyatt.email"}],"dist":{"shasum":"7ddb36b53c11be34c1bb3d89a755e15579286a1b","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.5.0-rc.0.tgz","fileCount":12,"integrity":"sha512-1AhRMBGuhhxo8TyTVZA/1XrxlLP1vj1UMDEMAg2DdhHM98mu1qe/2DOZLdOvaAduBLLS7d5avW7VjrGc1nyl6A==","signatures":[{"sig":"MEQCIBb+fOjVqLSyR1tOo60ekjDbZtQmtuXPMhpajo+ARScZAiAW75l4SO2WQuTz9xueQkPW/OS+Pj2Px6/XDmNSTN/0eQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32519,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+IjtCRA9TVsSAnZWagAAm6EP/3gQB/3Ey0MGNM62uTEF\ngT1piCgt7IpnV4G6F1vS9TADIuQ39UCR2Uc1ZD26QKFqVUME/yfiKLNQNCOw\nxWFBEh2KT2MV/EoXheH5dV6olnqLbFx4yaivfoPuyG6ZJMY4JtjB9+msY1p6\n1sw7vhg5VnThUSQRzi4AreMbswWa+Y3X3zJhdBu/yRp5Pl4doNcB5muzZUyz\nrxz34Ok3eBlTfnRuCqWaUFtCmJ6W4FAl4smZCa83PyHfdooQxTlA3r+REIAT\n51BpQOy/A6bXGzYADomJUbOCuEXvT3kH/GqylQK7lch/kmM0iXfSCGOFMQeO\n/QjJ2RkPuQhv1ZzUadPrjrWGf5LGsF1QXMHal17h4XrJeEWyqPENThUcP2mO\n8X3HcI8CWzDQuoj8Va7KvJMf9J4iTSPRQvxppDyBE3xL3O74edgyY8xZn2im\nkhVbSHxKyzQ+v9O2hhsK8hf4AbLTYAocJm/BgghosQN1CNdn2vMe0CF0NTge\nPwBU2CViV5dCCY6Szfe/tommE1WxgWFP+wEz/DI4XUUYAI5uE14zFyES294U\nlGrhN+027iCEQRGr2PDGRrG6n/d5XWzZuX360+lm1GyNXgdQehr0Ofar+eyg\nWEkYSiee7WcsIIx8kmRSW/IorFBmO3t2rSbvPeCJkaXQW9TYE5DL1JRmwlsD\nqXmS\r\n=YYQ1\r\n-----END PGP SIGNATURE-----\r\n","size":6112,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.5.0-rc.0.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":"fb3af4b93edfcb5928c40f0ac490c463608cf033","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","eventemitter3":"4.0.4","web3-core-helpers":"1.5.0-rc.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"^3.9.5"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_1.5.0-rc.0_1626900717575_0.46580346608781564","host":"s3://npm-registry-packages"},"publish_time":1626900717807,"_cnpm_publish_time":1626900717807,"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"}}