{"_id":"@alayanetwork/web3-core-subscriptions","_rev":"1-c06cc5de2ae3490647e6f87ff0380dc6","name":"@alayanetwork/web3-core-subscriptions","dist-tags":{"latest":"0.13.2"},"versions":{"0.13.2":{"name":"@alayanetwork/web3-core-subscriptions","version":"0.13.2","description":"Manages web3 subscriptions. This is an internal package.","repository":{"type":"git","url":"https://github.com/PlatONnetwork/client-sdk-js/tree/alaya-dev/packages/web3-core-subscriptions"},"license":"LGPL-3.0","engines":{"node":">=8.0.0"},"types":"types/index.d.ts","scripts":{"dtslint":"dtslint types --onlyTestTsNext"},"main":"src/index.js","dependencies":{"eventemitter3":"3.1.2","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-core-subscriptions@0.13.2","_nodeVersion":"14.12.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-iBi4nLIh0eWh2ChA3ZqMXUbgxzizLr8TFup7/6VeDNGGc/E4xMZb86wgzYjxj4YysHKop1pLyEDCF5ZByxGShA==","shasum":"940f929969c7de52d3ad7608e5e146457c8f5c81","tarball":"https://registry.npmjs.org/@alayanetwork/web3-core-subscriptions/-/web3-core-subscriptions-0.13.2.tgz","fileCount":8,"unpackedSize":18542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjpNvCRA9TVsSAnZWagAAx6IP/1dmPI42oOLbMKc4uCyM\n8g7GgrfQtgOd08c8h8wwUHjvvDYfmQVnAsWh9OQQIuSU1m2nL9CNuh+1FQ4f\nBmSkg4XDibVn1QvU3ts8RIuuWOUu3/zWFLFEzmnKKRZXmNEIsLe+8H1FljD7\n0psR5TB46c9wMqpd7hqSwxa8Vd9nP9d/MBryAqtgUo6qtypLe/Yb43tKxcDf\nTv7hFhQAbco1YSBO/Rh+qp2Fl/xXFvyhIDrePK28nkJt7W86XlUET0GqVUSD\nxzXDDdonbRpPw5D1FJ782D5lQ4rOxO8WRpjeZfUUWlH/ZRFROt9Y+VSIrNoZ\n4SAoW51skWPyCJbya6gajel3kVl0vfscIiSGCGXWCRlU3xMrQpXc6uVYlyFT\nr+ob+DAtRq+lhdp2H1aB2s9ZUicrDJERYZTioQlfUzAEPA5mHS3K5Gqkepm5\nEgbNfguM0Tn0fKLSzihyn3crXtKXcgMLtGWdL22xqPlENch9bygo7VrNooTY\nL9GNAD5yDfeesGG9owgpLueqz1BZWuR/M3VGGij7hAUqJG4QysfMon+RgG64\nJbfREl5XS6l9SsHQwMuD1q/AVKVweN+eqZ0Dbfqt3jboxptnop7YKvEYa8Z/\npddQhN3rjzMpB7alvEbhF0pXd40wA6K0FHaCzoUloFF6/eTm9KF9YGimtrUD\nFh1p\r\n=BrtU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzP6OYFjFT09MTblLu36hGw/Jo701YKztH6RXkAiOpIwIga9PMQnVaOoKZh0tk/8/b56UOLlaBQ8L9k9p5NKQlCUM="}]},"maintainers":[{"name":"alayanetwork","email":"npm@latticex.foundation"}],"_npmUser":{"name":"alayanetwork","email":"npm@latticex.foundation"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web3-core-subscriptions_0.13.2_1603179374813_0.07079842229210787"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-20T07:36:14.769Z","0.13.2":"2020-10-20T07:36:15.089Z","modified":"2022-04-04T12:34:00.910Z"},"maintainers":[{"name":"alayanetwork","email":"npm@latticex.foundation"}],"description":"Manages web3 subscriptions. This is an internal package.","repository":{"type":"git","url":"https://github.com/PlatONnetwork/client-sdk-js/tree/alaya-dev/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"}