{"name":"web3-providers-ws","version":"1.3.4-rc.1","license":"LGPL-3.0","_id":"web3-providers-ws@1.3.4-rc.1","maintainers":[{"name":"ralxz","email":"ryan@ryanio.com"},{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},{"name":"gregthegreek","email":"gregorymarkou@gmail.com"}],"dist":{"shasum":"7f8315cb22b9c2a7c437b319612e6c574ff132ff","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.3.4-rc.1.tgz","fileCount":12,"integrity":"sha512-ueg6K1E3/UObIgIGQW4Qh9DV0j3QUjEI+gBDkOYKow6OXHgJuVHjk7I1H5fqPdNKr4ixBpPEID1GuLSywP5sdQ==","signatures":[{"sig":"MEQCIAgnHFMhuYKX/F9Mba+fFtApaqN3u3L6FXosm7/eJFfSAiAF8+k3tr6BLFa2bm0AfEOA18ZknXmsQL19nOdn3kkqfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgD6FGCRA9TVsSAnZWagAAGdkP/1BVKn/IL/y+QbE8uijD\nHv/rRDOv090JTBEduKJAHJCBhpuwhhIFHfUwH1EkMrcfbixfw7vPG9XRFCbP\nWvbYO22i0iLhxzvu1SJEwaY6H16x0Q/yt5bQ9BL03ZHfcuZjp/6QK+ZaYXOC\n5qrdEMjyq0IwNqQiO4TDagZdVY94yhA9mhOhLByXwUWcL688VTw4CEHkpGI0\nHjBXmAO95bYDIac9t1AHURs59Zx0eZQ0nRJ7nj1iLEjB8N2T8I+6q1QYFjFM\noR7B1qBpES1hGKSbzYdRM4bFRVYuaq1nJ6Wa0cYrMxZJRlPTfpK2HBToAWJU\nCHwrd4QLDs9CWLeADFCNVkc/Ny/ua/WZECL48z5uCTnSC8A7PsUIrxpZdy0/\nmcfe1Fuzawni7TyPvr8YxTg+6Z+zZV4XFs+94tcNYx2qEXGgVB+bNejaVjcE\nt2Z0pG2mWeQVmeAKG3m53Ir33Hkb7xjvxqe43MPZVKIcBYWmSSAXP3bczV99\nZciLBY9kdx9cpFboavEe3YpPZFyiC9l7YeDL0MISQEzDhmRfN1U4h0k0+Ksh\n/xJYV5GJfzIjHVkNboCB/t1vQhtEn2VKAN45SRVulg8B02gA7VMA2ICUvDu/\n8WTnZXeNOW4pDKbMMeF55bIMGE9D4N2+8hZBTvo/aVv6is1lKn5KAF7xiHzA\nwYEW\r\n=IBhA\r\n-----END PGP SIGNATURE-----\r\n","size":6126,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.3.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":"0b86ab71171173a1d293aa80b3f3aefcc20ca259","scripts":{"tsc":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types"},"_npmUser":{"name":"gregthegreek","email":"gregorymarkou@gmail.com"},"repository":{"url":"https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (linux)","description":"Module to handle web3 RPC connections over WebSockets.","directories":{},"_nodeVersion":"12.16.1","dependencies":{"websocket":"^1.0.32","underscore":"1.9.1","eventemitter3":"4.0.4","web3-core-helpers":"1.3.4-rc.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"^3.9.5"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_1.3.4-rc.1_1611637061752_0.8048512910051917","host":"s3://npm-registry-packages"},"publish_time":1611637061920,"_cnpm_publish_time":1611637061920,"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"}}