{"_id":"@alayanetwork/web3-providers-ws","_rev":"1-0b2311827340f8e3d5a0daa715d0c59c","name":"@alayanetwork/web3-providers-ws","dist-tags":{"latest":"0.13.2"},"versions":{"0.13.2":{"name":"@alayanetwork/web3-providers-ws","version":"0.13.2","description":"Module to handle web3 RPC connections over WebSockets.","repository":{"type":"git","url":"https://github.com/PlatONnetwork/client-sdk-js/tree/alaya-dev/packages/web3-providers-ws"},"license":"LGPL-3.0","engines":{"node":">=8.0.0"},"scripts":{"dtslint":"dtslint types --onlyTestTsNext"},"types":"types/index.d.ts","main":"src/index.js","dependencies":{"@web3-js/websocket":"^1.0.29","underscore":"1.9.1","@alayanetwork/web3-core-helpers":"0.13.2"},"devDependencies":{"definitelytyped-header-parser":"^1.0.1","dtslint":"0.4.2"},"_id":"@alayanetwork/web3-providers-ws@0.13.2","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-aHx6+DVArgk8ntYUp9bNBXPNhS3dIgLIzYXHRrsmLuYTTMYeT2inoCm3FzkckzDru7uxM88CBYkeIUJcIVD5Qg==","shasum":"a19d3d9fa35a388504811213e328e544a39f08b9","tarball":"https://registry.npmjs.org/@alayanetwork/web3-providers-ws/-/web3-providers-ws-0.13.2.tgz","fileCount":7,"unpackedSize":17236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjpNLCRA9TVsSAnZWagAA9xYP/jKpN0695vQ1imucp9pS\nFIcAmEBoeS6Ob7aiVZbnUbkenFqjSrrqBEG3IXK6xc460DVtc0l6nzZerH5+\nTrVc3jGYamRgG2L7zE++/re0CAGWa25ANqVEG+CQpIMduPa8xZibDTWEGRMt\nNjqWE7pt5DTx9OUEI8qmh7ZodU2uDT8nANWKbHzfi47Sw1DvuD7NQq4v01yW\nI2OoJVXb8g9mboeCAUKbOd14VikLqEWlciAK+AuS7WWizMspMCBb9Zu3NfqN\nOVl8R47QE/baJbvflh5g/z6OESIBeZRm6vJKG9dZndnPTsRwW9SgwLKg8l1c\n05HOTVyJJNqBUqa2kJwrSgILVrwDmKydusA4etc+ebZLpYPRDQt0qJ2+VuLB\n6hHmTK84FYghvXyqPgLT88chJKaZtnOT/2eWrYHdKZE0IGOcETx5slPo0Uxh\nZ0Xx90CElA5NZPvt9IF0WVnqydZMC+W2xLP2kJw3WjX9qJ5KU9VYkqPKEzcF\niLQyf/5FbjUbCHbBYaGk1k53PGnCtXI7c0rGoEk3Oja//+cgjQ4jQ9/Qv4kP\nrsE81a6B/KBgG2l2dcHHYWIxcRyslF5ZzU6wKUnLGVSHQNYcnJg3+JLdOxDJ\nUq9N+F0f6U797vfbb/pgPtODltsegdtEV9nr/6woDeGJ0x1EFs/e6IMYO+dp\nloyo\r\n=5HvJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJN2SYwG/bheyh1JZ+3Rqb0xx0qflQe9AfpDJzUKAEygIhANR9Q08Hjks7UWGh61/zYfF0l/YUOdpg0eRh5VeFubkk"}]},"maintainers":[{"name":"alayanetwork","email":"npm@latticex.foundation"}],"_npmUser":{"name":"alayanetwork","email":"npm@latticex.foundation"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web3-providers-ws_0.13.2_1603179338760_0.8457899087334582"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-20T07:35:38.720Z","0.13.2":"2020-10-20T07:35:38.947Z","modified":"2022-04-04T12:34:02.363Z"},"maintainers":[{"name":"alayanetwork","email":"npm@latticex.foundation"}],"description":"Module to handle web3 RPC connections over WebSockets.","repository":{"type":"git","url":"https://github.com/PlatONnetwork/client-sdk-js/tree/alaya-dev/packages/web3-providers-ws"},"license":"LGPL-3.0","readme":"# web3-providers-ws\n\nThis is a sub package of [web3.js][repo]\n\nThis is a websocket provider for [web3.js][repo].  \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,\n    headers: { authorization: 'Basic username:password' }\n}; // set a custom timeout at 30 seconds, and credentials (you can also add the credentials to the URL: ws://username:password@localhost:8546)\nvar ws = new Web3WsProvider('ws://localhost:8546', options);\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","readmeFilename":"README.md"}