web3-core-subscriptions
Advanced tools
Comparing version 2.0.0-alpha.1 to 3.0.0-rc.0
{ | ||
"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 | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
32451
2
12
830
53
1
+ Addedunderscore@1.9.1
+ Addedweb3-core-helpers@3.0.0-rc.0
+ Added@noble/hashes@1.5.0(transitive)
+ Addedbn.js@4.11.64.12.0(transitive)
+ Addedbrorand@1.1.0(transitive)
+ Addedbuffer-to-arraybuffer@0.0.5(transitive)
+ Addeddecode-uri-component@0.2.2(transitive)
+ Addeddecompress-response@3.3.0(transitive)
+ Addeddom-walk@0.1.2(transitive)
+ Addedelliptic@6.5.7(transitive)
+ Addedeth-lib@0.2.8(transitive)
+ Addedethereum-bloom-filters@1.2.0(transitive)
+ Addedethjs-unit@0.1.6(transitive)
+ Addedeventemitter3@4.0.4(transitive)
+ Addedglobal@4.4.0(transitive)
+ Addedhash.js@1.1.7(transitive)
+ Addedhmac-drbg@1.0.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-function@1.0.2(transitive)
+ Addedis-hex-prefixed@1.0.0(transitive)
+ Addedmimic-response@1.0.1(transitive)
+ Addedmin-document@2.19.0(transitive)
+ Addedminimalistic-assert@1.0.1(transitive)
+ Addedminimalistic-crypto-utils@1.0.1(transitive)
+ Addednumber-to-bn@1.7.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedparse-headers@2.0.5(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedquery-string@5.1.1(transitive)
+ Addedrandombytes@2.1.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@2.8.2(transitive)
+ Addedstrict-uri-encode@1.1.0(transitive)
+ Addedstrip-hex-prefix@1.0.0(transitive)
+ Addedtimed-out@4.0.1(transitive)
+ Addedunderscore@1.9.1(transitive)
+ Addedurl-set-query@1.0.0(transitive)
+ Addedutf8@3.0.0(transitive)
+ Addedweb3-core-helpers@3.0.0-rc.0(transitive)
+ Addedweb3-eth-iban@3.0.0-rc.0(transitive)
+ Addedweb3-utils@3.0.0-rc.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxhr@2.6.0(transitive)
+ Addedxhr-request@1.1.0(transitive)
+ Addedxhr-request-promise@0.1.3(transitive)
+ Addedxtend@4.0.2(transitive)
- Removed@babel/runtime@^7.3.1
- Removedlodash@^4.17.11
- Removed@babel/runtime@7.25.6(transitive)
- Removedeventemitter3@4.0.7(transitive)
- Removedlodash@4.17.21(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
Updatedeventemitter3@4.0.4