web3-utils
Advanced tools
Comparing version 4.0.0-alpha.0 to 4.0.0-alpha.1
{ | ||
"name": "web3-utils", | ||
"version": "4.0.0-alpha.0", | ||
"description": "Utilities for Web3 4.x.x", | ||
"main": "lib/index.js", | ||
"repository": "https://github.com/ChainSafe/web3.js", | ||
"author": "ChainSafe Systems", | ||
"license": "LGPL-3.0", | ||
"files": [ | ||
"lib/**/*" | ||
], | ||
"scripts": { | ||
"build": "yarn clean && yarn compile", | ||
"clean": "rimraf lib && rimraf buildcache", | ||
"compile": "tsc --build", | ||
"lint": "yarn prettier --write . && eslint \"./src/**/*.ts\" --max-warnings=0", | ||
"lint:check": "yarn prettier --check . && eslint \"./src/**/*.ts\" --max-warnings=0", | ||
"test": "jest", | ||
"test:unit": "jest ./test/unit" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.22", | ||
"@typescript-eslint/eslint-plugin": "^4.22.0", | ||
"@typescript-eslint/parser": "^4.22.0", | ||
"eslint": "^7.24.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"jest": "^26.6.3", | ||
"prettier": "^2.3.0", | ||
"ts-jest": "^26.5.4", | ||
"typescript": "^4.2.4" | ||
}, | ||
"dependencies": { | ||
"ethereumjs-util": "^7.0.10" | ||
} | ||
"name": "web3-utils", | ||
"version": "4.0.0-alpha.1", | ||
"description": "Collection of utility functions used in web3.js.", | ||
"main": "dist/index.js", | ||
"repository": "https://github.com/ChainSafe/web3.js", | ||
"author": "ChainSafe Systems", | ||
"license": "LGPL-3.0", | ||
"files": [ | ||
"dist/**/*" | ||
], | ||
"scripts": { | ||
"clean": "rimraf dist", | ||
"prebuild": "rimraf dist", | ||
"build": "tsc --build", | ||
"build:check": "node -e \"require('./dist')\"", | ||
"lint": "eslint --ext .js,.ts .", | ||
"lint:fix": "eslint --fix --ext .js,.ts .", | ||
"format": "prettier --write '**/*'", | ||
"test": "jest --config=./test/unit/jest.config.js", | ||
"test:coverage": "jest --config=./test/unit/jest.config.js --coverage=true --coverage-reporters=text", | ||
"test:ci": "jest --coverage=true --coverage-reporters=json --verbose", | ||
"test:watch": "npm test -- --watch", | ||
"test:unit": "jest --config=./test/unit/jest.config.js", | ||
"test:integration": "jest --config=./test/integration/jest.config.js --runInBand --passWithNoTests" | ||
}, | ||
"devDependencies": { | ||
"@humeris/espresso-shot": "^4.0.0", | ||
"@types/jest": "^28.1.6", | ||
"@typescript-eslint/eslint-plugin": "^5.30.7", | ||
"@typescript-eslint/parser": "^5.30.7", | ||
"eslint": "^8.20.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-config-web3-base": "0.1.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"jest": "^28.1.3", | ||
"jest-extended": "^3.0.1", | ||
"js-sha3": "^0.8.0", | ||
"prettier": "^2.7.1", | ||
"ts-jest": "^28.0.7", | ||
"typescript": "^4.7.4" | ||
}, | ||
"dependencies": { | ||
"ethereum-cryptography": "^1.1.2", | ||
"web3-errors": "^0.1.0-alpha.0", | ||
"web3-types": "^0.1.0-alpha.0", | ||
"web3-validator": "^0.1.0-alpha.0" | ||
}, | ||
"gitHead": "e6e512ac51fdf20529003a984c087c00b2027ecc" | ||
} |
<p align="center"> | ||
<img src="../../assets/logo/web3js.jpg" width="200" alt="web3.js" /> | ||
<img src="assets/logo/web3js.jpg" width="500" alt="web3.js" /> | ||
</p> | ||
# web3.js - Utils | ||
# web3-utils | ||
## Installation | ||
![ES Version](https://img.shields.io/badge/ES-2020-yellow) | ||
![Node Version](https://img.shields.io/badge/node-14.x-green) | ||
[![NPM Package][npm-image]][npm-url] | ||
[![Dependency Status][deps-image]][deps-url] | ||
[![Dev Dependency Status][deps-dev-image]][deps-dev-url] | ||
This is a sub-package of [web3.js][repo]. | ||
`web3-utils` This contains useful utility functions for Dapp developers. | ||
###### Get it from the NPM Registry | ||
```bash | ||
@@ -13,11 +23,45 @@ yarn add web3-utils | ||
## Usage | ||
```js | ||
const Web3Utils = require('web3-utils'); | ||
console.log(Web3Utils); | ||
{ | ||
sha3: function(){}, | ||
soliditySha3: function(){}, | ||
isAddress: function(){}, | ||
... | ||
} | ||
``` | ||
## Getting Started | ||
- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP) | ||
![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord) | ||
## Prerequisites | ||
- :gear: [NodeJS](https://nodejs.org/) (LTS/Fermium) | ||
- :toolbox: [Yarn](https://yarnpkg.com/)/[Lerna](https://lerna.js.org/) | ||
## Package.json Scripts | ||
- `build`: Runs `yarn clean` and `yarn compile` | ||
- `clean`: Uses `rimraf` to remove `lib/` and `buildcache/` | ||
- `compile`: Uses `tsc` to build package and depedenent packages | ||
- `lint`: Uses `prettier` and `eslint` to lint package | ||
- `lint:check`: Uses prettier and `eslint` to check if package has been linted | ||
- `test`: Uses `jest` to run all tests | ||
- `test:integration`: Uses `jest` to run tests under `/test/integration` | ||
- `test:unit`: Uses `jest` to run tests under `/test/unit` | ||
| Script | Description | | ||
| ---------------- | -------------------------------------------------- | | ||
| clean | Uses `rimraf` to remove `dist/` | | ||
| build | Uses `tsc` to build package and dependent packages | | ||
| lint | Uses `eslint` to lint package | | ||
| lint:fix | Uses `eslint` to check and fix any warnings | | ||
| format | Uses `prettier` to format the code | | ||
| test | Uses `jest` to run unit tests | | ||
| test:integration | Uses `jest` to run tests under `/test/integration` | | ||
| test:unit | Uses `jest` to run tests under `/test/unit` | | ||
[docs]: http://web3js.readthedocs.io/en/4.0/ | ||
[repo]: https://github.com/ethereum/web3.js | ||
[npm-image]: https://img.shields.io/npm/v/web3-utils.svg | ||
[npm-url]: https://npmjs.org/packages/web3-utils | ||
[deps-image]: https://david-dm.org/ethereum/web3.js/4.x/status.svg?path=packages/web3-utils | ||
[deps-url]: https://david-dm.org/ethereum/web3.js/4.x?path=packages/web3-utils | ||
[deps-dev-image]: https://david-dm.org/ethereum/web3.js/4.x/dev-status.svg?path=packages/web3-utils | ||
[deps-dev-url]: https://david-dm.org/ethereum/web3.js/4.x?type=dev&path=packages/web3-utils |
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
104436
51
1210
67
4
14
4
+ Addedethereum-cryptography@^1.1.2
+ Addedweb3-errors@^0.1.0-alpha.0
+ Addedweb3-types@^0.1.0-alpha.0
+ Added@noble/hashes@1.2.0(transitive)
+ Added@noble/secp256k1@1.7.1(transitive)
+ Added@scure/base@1.1.9(transitive)
+ Added@scure/bip32@1.1.5(transitive)
+ Added@scure/bip39@1.1.1(transitive)
+ Addedajv@8.17.1(transitive)
+ Addedethereum-cryptography@1.2.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-uri@3.0.3(transitive)
+ Addedjson-schema-traverse@1.0.0(transitive)
+ Addedrequire-from-string@2.0.2(transitive)
+ Addedweb3-errors@0.1.0-alpha.0(transitive)
+ Addedweb3-types@0.1.0-alpha.0(transitive)
+ Addedweb3-validator@0.1.0-alpha.0(transitive)
- Removedethereumjs-util@^7.0.10
- Removed@types/bn.js@5.1.6(transitive)
- Removed@types/node@22.9.0(transitive)
- Removed@types/pbkdf2@3.1.2(transitive)
- Removed@types/secp256k1@4.0.6(transitive)
- Removedbase-x@3.0.10(transitive)
- Removedblakejs@1.2.1(transitive)
- Removedbn.js@4.12.15.2.1(transitive)
- Removedbrorand@1.1.0(transitive)
- Removedbrowserify-aes@1.2.0(transitive)
- Removedbs58@4.0.1(transitive)
- Removedbs58check@2.1.2(transitive)
- Removedbuffer-xor@1.0.3(transitive)
- Removedcipher-base@1.0.5(transitive)
- Removedcreate-hash@1.2.0(transitive)
- Removedcreate-hmac@1.1.7(transitive)
- Removedelliptic@6.6.1(transitive)
- Removedethereum-cryptography@0.1.3(transitive)
- Removedethereumjs-util@7.1.5(transitive)
- Removedevp_bytestokey@1.0.3(transitive)
- Removedhash-base@3.1.0(transitive)
- Removedhash.js@1.1.7(transitive)
- Removedhmac-drbg@1.0.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedkeccak@3.0.4(transitive)
- Removedmd5.js@1.3.5(transitive)
- Removedminimalistic-assert@1.0.1(transitive)
- Removedminimalistic-crypto-utils@1.0.1(transitive)
- Removednode-addon-api@2.0.25.1.0(transitive)
- Removednode-gyp-build@4.8.3(transitive)
- Removedpbkdf2@3.1.2(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedripemd160@2.0.2(transitive)
- Removedrlp@2.2.7(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedscrypt-js@3.0.1(transitive)
- Removedsecp256k1@4.0.4(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedsha.js@2.4.11(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedutil-deprecate@1.0.2(transitive)