{"_id":"@danielsmilo/web3coresubscriptionsdaniel","_rev":"1-5d9fb91e0f2a1d57e55c8991b54d175e","name":"@danielsmilo/web3coresubscriptionsdaniel","dist-tags":{"latest":"1.0.0-beta.42"},"versions":{"1.0.0-beta.42":{"name":"@danielsmilo/web3coresubscriptionsdaniel","namespace":"ethereum","version":"1.0.0-beta.42","description":"Manages web3 subscriptions. This is an internal package.","repository":{"type":"git","url":"https://github.com/ethereum/web3.js/tree/master/packages/web3-core-subscriptions"},"license":"LGPL-3.0","main":"src/index.js","dependencies":{"eventemitter3":"1.1.1","underscore":"1.8.3","@danielsmilo/web3corehelpersdaniel":"1.0.0-beta.42"},"_id":"@danielsmilo/web3coresubscriptionsdaniel@1.0.0-beta.42","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"danielsmilo","email":"daniel@smilo.io"},"dist":{"integrity":"sha512-6yPggrodyoRm1hCoQ4jUkEFKj1smplCtrLm3/b6i3Z7JVENB8YJsU/FxgKtzucyRcJeEcZ/whNG8qDwFSuIHNQ==","shasum":"6b4225536b255340302f2aec6ad4061321084612","tarball":"https://registry.npmjs.org/@danielsmilo/web3coresubscriptionsdaniel/-/web3coresubscriptionsdaniel-1.0.0-beta.42.tgz","fileCount":7,"unpackedSize":41527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb7haCRA9TVsSAnZWagAA7wIP/1j7Z4nVS6aEoT2K5+RC\nwoGjz9fMl4BFl2BHbjH6my2DTN4YUtqj5f79HPvC7eoDt7IfD/adbLnkFPgQ\n8l6ZLEZ2PhN8TYWxs6aGAtzIFmyM/yloIFFyO84F69udw7YX0qG6Nf87rUrf\nssIdY7QLPA20QHnglYcbuflJIi+ncBb6kFZHYjbGlA4FfK6X+WMwPJRGAxj7\nhca2CvpSK8DEEWvk3XRayy4G3wu9bSj5gt7hoZdZvaE1wKMcqeccSWsb1sFY\nwcSvsSaox0FupbUullZZGhgdGvFJ/bkmQW9IT33XCO/8yOcjKvfmBbjlECo/\nYt+TMvsOk7pk/19/aVpFx6h9WAdfFAjeLBiBNR6xps1FK0W6ZtkJsHSXRTwC\nQZ27B7gDk0oijf13Vc0dEhd1brfdZAF/plL8GxK5FhZ5CDbNMJAunjs9AzGP\npPlUCTCsBdspeeGmo2xXuzwT3GWPFllZapkdg+sqcdr40H1Qk3K4QQIkXFim\noapMvigVkIth1pkojjR8yT12GG5Arz9OpbEjgXOXxvl6RFnjOJCQ5AnbBUWs\nY2M1NlF85mAl3Wy/pqJcbnNSaZbOi9v2rqRdyXOdKo47UsdTEdUU8gp9Zr1f\nivdSnPXLEqKaKxOFN6+ICb1tk8YLFUPP8FUSSYi6FzGzX2fD76wZl5hZd4TZ\noj9v\r\n=SWjb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvR4049bR2bBXXSJXdODTtTUw7TyaxQUvQH98FiSyvywIhAILttzb38kChK8aBqurYTqJcCcsn55IKNU9D3UWbmcat"}]},"maintainers":[{"name":"danielsmilo","email":"daniel@smilo.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web3coresubscriptionsdaniel_1.0.0-beta.42_1550825561679_0.5394902096994527"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-22T08:52:41.499Z","1.0.0-beta.42":"2019-02-22T08:52:41.815Z","modified":"2022-04-05T02:41:29.402Z"},"maintainers":[{"name":"danielsmilo","email":"daniel@smilo.io"}],"description":"Manages web3 subscriptions. This is an internal package.","repository":{"type":"git","url":"https://github.com/ethereum/web3.js/tree/master/packages/web3-core-subscriptions"},"license":"LGPL-3.0","readme":"# web3-core-subscriptions\n\nThis is a sub package of [web3.js][repo]\n\nThe subscriptions package used within some [web3.js][repo] packages.\nPlease read the [documentation][docs] for more.\n\n## Installation\n\n### Node.js\n\n```bash\nnpm install web3-core-subscriptions\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-core-subscriptions.js` in your html file.\nThis will expose the `Web3Subscriptions` object on the window object.\n\n\n## Usage\n\n```js\n// in node.js\nvar Web3Subscriptions = require('web3-core-subscriptions');\n\nvar sub = new Web3Subscriptions({\n    name: 'subscribe',\n    type: 'eth',\n    subscriptions: {\n        'newBlockHeaders': {\n            subscriptionName: 'newHeads',\n            params: 0,\n            outputFormatter: formatters.outputBlockFormatter\n        },\n        'pendingTransactions': {\n            params: 0,\n            outputFormatter: formatters.outputTransactionFormatter\n        }\n    }\n});\nsub.attachToObject(myCoolLib);\n\nmyCoolLib.subscribe('newBlockHeaders', function(){ ... });\n```\n\n\n[docs]: http://web3js.readthedocs.io/en/1.0/\n[repo]: https://github.com/ethereum/web3.js\n\n\n","readmeFilename":"README.md"}