{"_id":"3f-web3-providers-ws","_rev":"1-7e4069cadb51622fd33dfacb22b2d4f2","name":"3f-web3-providers-ws","dist-tags":{"latest":"2.0.0"},"versions":{"1.7.5":{"name":"3f-web3-providers-ws","version":"1.7.5","description":"Module to handle web3 RPC connections over WebSockets.","repository":{"type":"git","url":"git+https://github.com/FinanceFutureFactory/3f-web3.js.git#main"},"license":"LGPL-3.0","engines":{"node":">=8.0.0"},"scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types"},"types":"types/index.d.ts","main":"lib/index.js","dependencies":{"eventemitter3":"4.0.4","3f-web3-core-helpers":"1.7.5","websocket":"^1.0.32"},"devDependencies":{"dtslint":"^3.4.1","typescript":"^3.9.5"},"gitHead":"73f460994ebada0401128a426a25ef2a76d700c2","bugs":{"url":"https://github.com/FinanceFutureFactory/3f-web3.js/issues"},"homepage":"https://github.com/FinanceFutureFactory/3f-web3.js/tree/main#readme","_id":"3f-web3-providers-ws@1.7.5","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-Wukyrr9Du6+uOP4tHvriYKoQ4qHoyRjbFF9KOByDQplkLe3HaQDJeNZBEFZZVRHIJP3RsrbYx+1+V4DAYHYCNQ==","shasum":"e752b1888ce284b5a1d698323edeab3cd4fc16fc","tarball":"https://registry.npmjs.org/3f-web3-providers-ws/-/3f-web3-providers-ws-1.7.5.tgz","fileCount":11,"unpackedSize":33028,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvDStSlOxqyGF9/WOYgHC7aEgBNi9KCWgJDhL+PT4VOAiAq/xNnR3zAVN+cRSVgCDw1bPg0/Uedgw7ajZP9JBmLjA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLSkaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryAg/+Jmv94Zb4XKes3DvJ+IaAjUCqPEuyE+VnsgcfslqaVzeJDVFG\r\nGbBmrQfm0uWW232wDSVXMz8glfXXJdssvRuCtwKO+xeNqj2plQavoKpWHXr8\r\ng+q0z5l+DpAGa7RRTL9f4iQFSitd24mGyXtcit6BHqvQz6ZlOHFqxHP5rQvG\r\nRKQck8dc94DS8P06dohEhfEvndb56jJ3Dw4oOk3Hi9EasXgNT9PVl6NSJYBZ\r\ngeA0MgLHDBVFGndPPD/lICoqpp1OqsDvM6ANw+RMEZK7zbMd6Sx2kinsMLVe\r\n3FvshIv5jkd+nY7hAWfv5+QIJR1Vg2cB2ny2mfXl2E/KGOYCXKovIhjJmO38\r\nBYSbCGaIGJ26fsMdRXEu5HxJlVvji00K3UIl3h5DNLGq0yTK2sACh6OJ+jje\r\nw7JiHsTxJpHJ5p0EJh6JeKgUoGecz6xFj7jvhjf7HW9KNbNxINvNHSAC/jnh\r\neha62LhJpT72wtGvpKaJ/rPctlc7P87H9hhnbGf0IChEtlSlsDQiKSGrRbWE\r\nWdJoJqcKtSBqWm8U5F3Oy9dBZ4QhT6l4ZnGc1HAeDpOQTE6RfpfLbM1E8bW9\r\nlSOyyON63FXRsZla5McFoJsKXQ7NuhfoFAOq+zatg9n0DSZYiojaJuJjfkAH\r\n5BsdGDFkC2RKZBn7eS+Ule8n7FcecIwbTSA=\r\n=rV3e\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dnice","email":"peng.bo.nice@gmail.com"},"directories":{},"maintainers":[{"name":"dnice","email":"peng.bo.nice@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/3f-web3-providers-ws_1.7.5_1663904025904_0.6022662137815333"},"_hasShrinkwrap":false},"2.0.0":{"name":"3f-web3-providers-ws","version":"2.0.0","description":"Module to handle web3 RPC connections over WebSockets.","repository":{"type":"git","url":"git+https://github.com/FinanceFutureFactory/3f-web3.js.git#main"},"license":"LGPL-3.0","engines":{"node":">=8.0.0"},"scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types"},"types":"types/index.d.ts","main":"lib/index.js","dependencies":{"eventemitter3":"4.0.4","3f-web3-core-helpers":"2.0.0","websocket":"^1.0.32"},"devDependencies":{"dtslint":"^3.4.1","typescript":"4.8.3"},"gitHead":"083877b1eac309b648279d9a597cfd8055b1c680","bugs":{"url":"https://github.com/FinanceFutureFactory/3f-web3.js/issues"},"homepage":"https://github.com/FinanceFutureFactory/3f-web3.js/tree/main#readme","_id":"3f-web3-providers-ws@2.0.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-JBzhM7WZZgnD4ukHDli/fKU8vHRDGEVXG9cg3AbgQxGH3RavMwUVAJr6X5wZvpjP7hk9Nlquvv9FLdRpJ/gXig==","shasum":"934fbc16873df903f3b0ad8b8d311a079088bdc9","tarball":"https://registry.npmjs.org/3f-web3-providers-ws/-/3f-web3-providers-ws-2.0.0.tgz","fileCount":11,"unpackedSize":33027,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC5xNJ0thJljTZ/5FE4q4Rj6irCanMZdxKdHLhnSM6qMAiEAkw9yBOqjrhIBbiVQE4dpNCDB4+RVA8KUpQ+0nanljrg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMrp1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbVg/+KjkO9Sj4vv9i9otV0z/XpgdhvcLeqAwQH6sWBJ1fDURW5ARM\r\nSxqSud20mhj01C3jpDb5bAVBZNn6f2bCDHV5CF0P5WzxIXuSZDsALguirGqb\r\ngMxl0pJi9oFQam8W2gTw1z9e2soisoNcRDMmB4US3y+Sq6BGM/oCAKM3gMe9\r\n8EGhf2i331W/dxwl0njRawI70BhPzSfwjRWPQNzrYvOTeu6xkzHHEbno+NPm\r\nzcKwN2cZISLqKKb01nMdbCugybdZZ2WCJUU2UYyDCVTwzDvavHeHVRncYPUv\r\nnbgBrmgWCDO75DXl1nnba0Fuu9lflySF/zUHrmwG6eULQgru/QZBMxLME4zH\r\nUhLDWiBiE78UB5KlabXyPJI31kSJ/FZwVzOf6VJigyn8K4OwJwT++OdmpYTL\r\nh0NPGg9IV1tG+BdnbbXWM1X6GGs2ure7x7SJCWiI5V9uChKE37D+CXqnewFG\r\nIbbRgjdSBD2JuAdwaMrcehbupzEQtDgVRpFAG0tbaUiA/mS4WLsUYbHgUaSd\r\nwf9mBjcZtmFr8wM3h5QAsuHZm0U4Zt6nwaukZP2vG9WOO5iYqH7frCUsv4c2\r\ngbJ0VGdFa8Hy6ByCxaulcS8dWOYImeEsI4dmi2VX17M9iWtpzOYPWWHQN3cr\r\nh3c9XYf21Co2fg/jkA1gVPgmqXFR7O50//M=\r\n=k/HE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dnice","email":"peng.bo.nice@gmail.com"},"directories":{},"maintainers":[{"name":"dnice","email":"peng.bo.nice@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/3f-web3-providers-ws_2.0.0_1664268917137_0.6001324174252498"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-23T03:33:45.903Z","1.7.5":"2022-09-23T03:33:46.073Z","modified":"2022-09-27T08:55:17.476Z","2.0.0":"2022-09-27T08:55:17.405Z"},"maintainers":[{"name":"dnice","email":"peng.bo.nice@gmail.com"}],"description":"Module to handle web3 RPC connections over WebSockets.","homepage":"https://github.com/FinanceFutureFactory/3f-web3.js/tree/main#readme","repository":{"type":"git","url":"git+https://github.com/FinanceFutureFactory/3f-web3.js.git#main"},"bugs":{"url":"https://github.com/FinanceFutureFactory/3f-web3.js/issues"},"license":"LGPL-3.0","readme":"# 3f-web3-providers-ws\r\n\r\n[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]\r\n\r\nThis is a websocket provider sub-package for [web3.js][repo].  \r\n\r\nPlease read the [documentation][docs] for more.\r\n\r\n## Installation\r\n\r\n### Node.js\r\n\r\n```bash\r\nnpm install 3f-web3-providers-ws\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nconst Web3WsProvider = require('3f-web3-providers-ws');\r\n\r\nconst options = {\r\n    timeout: 30000, // ms\r\n\r\n    // Useful for credentialed urls, e.g: ws://username:password@localhost:8546\r\n    headers: {\r\n      authorization: 'Basic username:password'\r\n    },\r\n\r\n    clientConfig: {\r\n      // Useful if requests are large\r\n      maxReceivedFrameSize: 100000000,   // bytes - default: 1MiB\r\n      maxReceivedMessageSize: 100000000, // bytes - default: 8MiB\r\n\r\n      // Useful to keep a connection alive\r\n      keepalive: true,\r\n      keepaliveInterval: 60000 // ms\r\n    },\r\n\r\n    // Enable auto reconnection\r\n    reconnect: {\r\n        auto: true,\r\n        delay: 5000, // ms\r\n        maxAttempts: 5,\r\n        onTimeout: false\r\n    }\r\n};\r\n\r\nconst ws = new Web3WsProvider('ws://localhost:8546', options);\r\n```\r\n\r\nAdditional client config options can be found [here](https://github.com/theturtle32/WebSocket-Node/blob/v1.0.31/docs/WebSocketClient.md#client-config-options).\r\n\r\n## Types\r\n\r\nAll the TypeScript typings are placed in the `types` folder.\r\n\r\n[docs]: http://web3js.readthedocs.io/en/1.0/\r\n[repo]: https://github.com/FinanceFutureFactory/3f-web3.js\r\n[npm-image]: https://img.shields.io/npm/v/web3-providers-ws.svg\r\n[npm-url]: https://npmjs.org/package/web3-providers-ws\r\n[deps-image]: https://david-dm.org/ethereum/web3.js/1.x/status.svg?path=packages/web3-providers-ws\r\n[deps-url]: https://david-dm.org/ethereum/web3.js/1.x?path=packages/web3-providers-ws\r\n[deps-dev-image]: https://david-dm.org/ethereum/web3.js/1.x/dev-status.svg?path=packages/web3-providers-ws\r\n[deps-dev-url]: https://david-dm.org/ethereum/web3.js/1.x?type=dev&path=packages/web3-providers-ws\r\n","readmeFilename":"README.md"}