{"name":"web3-providers-ws","version":"1.2.8-rc.1","license":"LGPL-3.0","_id":"web3-providers-ws@1.2.8-rc.1","maintainers":[{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},{"name":"ralxz","email":"ryan@ryanio.com"}],"dist":{"shasum":"78fc38f8e4e4389f2924586bd63053ae4b692166","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.2.8-rc.1.tgz","fileCount":9,"integrity":"sha512-WIaLNNhE/eFjx0CoeH9XL8FH61dIwsIcIehaw4j+ksFsA1oo5AOB3nGLvcnPqd67SQ4UMcHx5kXp0sFUXH8gIA==","signatures":[{"sig":"MEQCIE2FYclX4MuYWkONKjsitYjzDad2MwFbsS/7aX7IrISqAiBhD5JmnMa/DRbEXXTV55v1LARpp7CNOzBdQ0MoUr8n1w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewuZpCRA9TVsSAnZWagAAZyUQAKNdmj0T2Ani9msrkJTk\n0dqbgFe85R8LaKm3a60iLmBIHJgB0fNqRWzdY4ffV4woJC34glOHgzieI1XE\nZD5wpXCJ8GT+0+Mvm//+I/Ye11o0SXBEwMo0/QzsCyTcZZ/pjdPJxuuu8GvL\nVBLxI3ZprZ2NguO4vMe5e4RYWfaVvrmQKftmCH7pnhN3H8sokaUZGNXx/tRc\npLEpoghqkJsMlCEweZAtoLf8ULgRYscwDBIDD9o72Rsi2PmFnhYRQSpLD1MY\nleXY+dhsGcv1Z0TsTVPCF1LiIWx77bQHXJ5YWVtIvX3ZDKK2vVcN6DOoRUyz\n9gQC9b3R+GXVgqVxiILk5ldlof+0s1y2AE85R4neWSrvuGi2uCeNTM78/gV3\njoZWTIrVQ/qaTQcYEkSoPjSxHTU0AGxyCupEh3b/roy8AlK45ZhTalA002uK\n9BOIYe+nCKhH52ydNVFe7BypWArpI9VH2SM6zjpT6WKMUWxRVdb9C1X41h4X\n2V7WYIZgJGjmkroWGgr3ojZ/Y26Zjb9KNsogrp4rCKCb9R6VKSoJ36dfSDIR\nJqWwXygG9C/SZZkuVVqySkBoVm3uN4S+OSTdWL5Jk+dIhDiJRQVUVDWfBT/s\nNac1Z6oIt6AeV7Sl9JBiQRTZyuvS09IPx3MZJOQj0CCb5b8tw6Ijgimxp6xB\nAbq6\r\n=Ayj8\r\n-----END PGP SIGNATURE-----\r\n","size":5614,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.2.8-rc.1.tgz"},"main":"src/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 sub-package of [web3.js][repo].\n\nThis is a websocket provider 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### In the Browser\n\nBuild running the following in the [web3.js][repo] repository:\n\n```bash\nnpm run-script build-all\n```\n\nThen include `dist/web3-providers-ws.js` in your html file.\nThis will expose the `Web3WsProvider` object on the window object.\n\n## Usage\n\n```js\n// in node.js\nvar Web3WsProvider = require('web3-providers-ws');\n\nvar 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    // Useful if requests are large\n    clientConfig: {\n      maxReceivedFrameSize: 100000000,   // bytes - default: 1MiB\n      maxReceivedMessageSize: 100000000, // bytes - default: 8MiB\n    },\n\n    // Enable auto reconnection\n    reconnect: {\n        auto: true,\n        delay: 5000, // ms\n        maxAttempts: 5,\n        onTimeout: false\n    }\n};\n\nvar ws = new Web3WsProvider('ws://localhost:8546', options);\n\n(Additional client config options can be found [here][1])\n\n[1]: https://github.com/web3-js/WebSocket-Node/blob/polyfill/globalThis/docs/WebSocketClient.md\n```\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":"62890027ca41f9e272ba3ed83c4d83fd2a7aeced","scripts":{"dtslint":"dtslint --localTs node_modules/typescript/lib types"},"_npmUser":{"name":"ralxz","email":"ryan@ryanio.com"},"repository":{"url":"https://github.com/ethereum/web3.js/tree/1.x/packages/web3-providers-ws","type":"git"},"_npmVersion":"lerna/3.20.2/node@v10.16.2+x64 (darwin)","description":"Module to handle web3 RPC connections over WebSockets.","directories":{},"_nodeVersion":"10.16.2","dependencies":{"underscore":"1.9.1","eventemitter3":"^4.0.0","web3-core-helpers":"1.2.8-rc.1","@web3-js/websocket":"^1.0.29"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"latest"},"_npmOperationalInternal":{"tmp":"tmp/web3-providers-ws_1.2.8-rc.1_1589831272685_0.2696741928111752","host":"s3://npm-registry-packages"},"publish_time":1589831272819,"_cnpm_publish_time":1589831272819,"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"}}