{"name":"web3-providers-ws","version":"1.2.8-rc.0","license":"LGPL-3.0","_id":"web3-providers-ws@1.2.8-rc.0","maintainers":[{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},{"name":"ralxz","email":"ryan@ryanio.com"}],"dist":{"shasum":"27c90f1bd764bcdb81796f502f9f546bcac598eb","tarball":"http://registry-npm.ywwl.com/web3-providers-ws/download/web3-providers-ws-1.2.8-rc.0.tgz","fileCount":9,"integrity":"sha512-Uxmr2FujxTQZCCfgu3pNdmYIFE7t1TnyCqQHRxMWOIy+jvqET6aHPBnoSa8X8QPUPFHsIkFAraAo1+j/XXX+3g==","signatures":[{"sig":"MEQCICK5coDlc0az0FPkYdOVRYrXjlcroTmovAX7V5mRpwOAAiBA0N6/7KB+QL1sIyB+q7UMabcOG+l3NUpAoIuoyiIgwA==","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\nwsFcBAEBCAAQBQJetav4CRA9TVsSAnZWagAALxoP/RqTw4Eh5Ex/CSznhIbP\nlOUtoXLrO9RUKujk6+UKyerGrJlRfzRcwy2zCDzi6hZl3Ric6AQIpjvJJ2ZN\ntjWveOz/CcOxKL5jPwD/bf6gfnzvR0TWR2JrKGOvRctyCJiHo+Fb4jytRGoM\naJPMUldMv0Kpnrcq0kmuYmH0VsFVEEMh4t9imM7e0j11qwbXRlsv5f3am0Xy\npOlnMSnukgswpMYgddgj0BlxYXtUx4qzty4s37dM841fyHmrRWYwmhR54JQM\n5skmftiHD2fdpDazrw2NcQ/NmMODLETl8joc804WOiyJjlSy1HYlKWcS2mk9\n6yvY/abUHAeoS0JCjGhQyZZm7pMINOIjvS8DYs5TywAVyU/9Uyasw5z+XO3c\nQhGUraJQSH1RnPDPpMMNQFxWanzG3rCwFaN4+8dT07ErZNMFcu0doNllzsKO\ne6o/XWqgyWT0bh1N2XsBomGPZelmgdz3cseMMQoUuvwFx6RZHKJRBAwU3+2D\nQvMsFSQL5SfrDUTmv2/xM6usMWWVvucMsxD0RVxYz2jI6YpPc04jHiz1Nzsz\nvDrzgddUdSOKuf9imtQ4c/IX+K+NeXuJjTcynSwEYW4V0K/Mv70iYQDsNihs\nfPdznwxMTv7hcjObX5KvDOl+xDHpxYPH/uCmSTgEhnMa55lA9WIGfcuZQotf\ncVb2\r\n=4lAD\r\n-----END PGP SIGNATURE-----\r\n","size":5611,"noattachment":false,"key":"/web3-providers-ws/-/web3-providers-ws-1.2.8-rc.0.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":"035d11acced0bdd43e500d4defbfdcd1b70768d7","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.0","@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.0_1588964343896_0.6698022870332214","host":"s3://npm-registry-packages"},"publish_time":1588964343999,"_cnpm_publish_time":1588964343999,"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"}}