{"bugs":{"url":"https://github.com/ethereum/web3.js/issues"},"dist":{"shasum":"604ac922cbcefb5238e27092542fd8b39c6e6186","tarball":"https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3-dev.0.tgz","fileCount":12,"integrity":"sha512-3f6SPKROHkIc94P0UtMN24Wy3gvWx6a6a3t2i+S5gJBHXnr1WKcLf5Xnu2Vxt5bGQFw0lF28dviksT0tCxMN9Q==","signatures":[{"sig":"MEUCIQD9HH1rjzDSP0iq0QytcUPy23plKrCDQ82DTSMSu9NUGgIgQZrAc/ie3+whLyqzTp5bW7iSpE0zZtMBAYxtvZ0QmOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32372},"main":"lib/index.js","name":"web3-core-subscriptions","types":"types/index.d.ts","readme":"# web3-core-subscriptions\n\n[![NPM Package][npm-image]][npm-url]\n\nThis is a sub-package of [web3.js][repo]\n\nThis subscriptions package is used within some [web3.js][repo] packages.\n\nPlease read the [documentation][docs] for more.\n\n## Installation\n\nYou can install the package either using [NPM](https://www.npmjs.com/package/web3-core-subscriptions) or using [Yarn](https://yarnpkg.com/package/web3-core-subscriptions)\n\n### Using NPM\n\n```bash\nnpm install web3-core-subscriptions\n```\n\n### Using Yarn\n\n```bash\nyarn add web3-core-subscriptions\n```\n\n## Usage\n\n```js\nconst Web3Subscriptions = require('web3-core-subscriptions');\n\nconst 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[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-core-subscriptions.svg\n[npm-url]: https://npmjs.org/package/web3-core-subscriptions\n","engines":{"node":">=8.0.0"},"gitHead":"e4b251cf704191989faf2d4ca4c7bdcd99d27428","license":"LGPL-3.0","scripts":{"compile":"tsc -b tsconfig.json","dtslint":"dtslint --localTs ../../node_modules/typescript/lib types"},"_npmUser":{"name":"jdevcs","email":"junaid@chainsafe.io"},"homepage":"https://github.com/ethereum/web3.js/tree/1.x#readme","repository":{"url":"git+https://github.com/ethereum/web3.js.git#1.x","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.16.0+x64 (darwin)","description":"Manages web3 subscriptions. This is an internal package.","directories":{},"maintainers":[{"name":"luu-alex","email":"alex.luu@mail.utoronto.ca"},{"name":"mpetrunic","email":"marin.petrunic@gmail.com"},{"name":"jdevcs","email":"junaid@chainsafe.io"},{"name":"gregthegreek","email":"gregorymarkou@gmail.com"}],"_nodeVersion":"18.16.0","dependencies":{"eventemitter3":"4.0.4","web3-core-helpers":"1.10.3-dev.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"dtslint":"^3.4.1","typescript":"4.9.5"},"_npmOperationalInternal":{"tmp":"tmp/web3-core-subscriptions_1.10.3-dev.0_1697474951148_0.8332011299552515","host":"s3://npm-registry-packages"},"_id":"web3-core-subscriptions@1.10.3-dev.0","version":"1.10.3-dev.0"}