Socket
Socket
Sign inDemoInstall

web3-core-subscriptions

Package Overview
Dependencies
Maintainers
3
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-core-subscriptions - npm Package Compare versions

Comparing version 2.0.0-alpha.1 to 3.0.0-rc.0

lib/index.js

33

package.json
{
"name": "web3-core-subscriptions",
"namespace": "ethereum",
"version": "2.0.0-alpha.1",
"version": "3.0.0-rc.0",
"description": "Manages web3 subscriptions. This is an internal package.",
"repository": "https://github.com/ethereum/web3.js/tree/1.0/packages/web3-core-subscriptions",
"repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-core-subscriptions",
"license": "LGPL-3.0",

@@ -11,26 +10,18 @@ "engines": {

},
"main": "dist/web3-core-subscriptions.cjs.js",
"module": "dist/web3-core-subscriptions.esm.js",
"browser": "dist/web3-core-subscriptions.umd.js",
"types": "types/index.d.ts",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"test": "jest",
"test:watch": "jest --watchAll"
"compile": "tsc -b tsconfig.json",
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types"
},
"main": "lib/index.js",
"dependencies": {
"@babel/runtime": "^7.3.1",
"eventemitter3": "^4.0.0",
"lodash": "^4.17.11"
"eventemitter3": "4.0.4",
"underscore": "1.9.1",
"web3-core-helpers": "3.0.0-rc.0"
},
"devDependencies": {
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2",
"web3-core-helpers": "2.0.0-alpha.1",
"web3-utils": "2.0.0-alpha.1"
"dtslint": "^3.4.1",
"typescript": "^3.9.5"
},
"files": [
"dist"
],
"gitHead": "cb266cc298150f4eb1c8cdac4f41551dd8819a81"
"gitHead": "4c88fbc94d1348dfa412ebdefa1d34e50f509977"
}
# web3-core-subscriptions
This is a sub module of [web3.js][repo].
The subscriptions module is used within some [web3.js][repo] modules.
[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]tus][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]
If you would like to know all supported subscriptions please have a look in the ```src/subscriptions``` folder.
This is a sub-package of [web3.js][repo]
This subscriptions package is used within some [web3.js][repo] packages.
Please read the [documentation][docs] for more.
## Installation

@@ -16,9 +19,35 @@

## Types
## Usage
All the typescript typings are placed in the types folder.
```js
const Web3Subscriptions = require('web3-core-subscriptions');
const sub = new Web3Subscriptions({
name: 'subscribe',
type: 'eth',
subscriptions: {
'newBlockHeaders': {
subscriptionName: 'newHeads',
params: 0,
outputFormatter: formatters.outputBlockFormatter
},
'pendingTransactions': {
params: 0,
outputFormatter: formatters.outputTransactionFormatter
}
}
});
sub.attachToObject(myCoolLib);
myCoolLib.subscribe('newBlockHeaders', function(){ ... });
```
[docs]: http://web3js.readthedocs.io/en/1.0/
[repo]: https://github.com/ethereum/web3.js
[npm-image]: https://img.shields.io/npm/v/web3-core-subscriptions.svg
[npm-url]: https://npmjs.org/package/web3-core-subscriptions
[deps-image]: https://david-dm.org/ethereum/web3.js/1.x/status.svg?path=packages/web3-core-subscriptions
[deps-url]: https://david-dm.org/ethereum/web3.js/1.x?path=packages/web3-core-subscriptions
[deps-dev-image]: https://david-dm.org/ethereum/web3.js/1.x/dev-status.svg?path=packages/web3-core-subscriptions
[deps-dev-url]: https://david-dm.org/ethereum/web3.js/1.x?type=dev&path=packages/web3-core-subscriptions
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc