web3-utils
Advanced tools
Comparing version 1.5.3 to 1.6.0-rc.0
@@ -25,3 +25,3 @@ /* | ||
var utf8 = require('utf8'); | ||
var Hash = require("eth-lib/lib/hash"); | ||
var ethereumjsUtil = require('ethereumjs-util'); | ||
var ethereumBloomFilters = require('ethereum-bloom-filters'); | ||
@@ -432,5 +432,9 @@ /** | ||
if (isHexStrict(value) && /^0x/i.test((value).toString())) { | ||
value = hexToBytes(value); | ||
value = ethereumjsUtil.toBuffer(value); | ||
} | ||
var returnValue = Hash.keccak256(value); // jshint ignore:line | ||
else if (typeof value === 'string') { | ||
// Assume value is an arbitrary string | ||
value = Buffer.from(value, 'utf-8'); | ||
} | ||
var returnValue = ethereumjsUtil.bufferToHex(ethereumjsUtil.keccak256(value)); | ||
if (returnValue === SHA3_NULL_S) { | ||
@@ -444,3 +448,3 @@ return null; | ||
// expose the under the hood keccak256 | ||
sha3._Hash = Hash; | ||
sha3._Hash = ethereumjsUtil.keccak256; | ||
/** | ||
@@ -447,0 +451,0 @@ * @method sha3Raw |
{ | ||
"name": "web3-utils", | ||
"version": "1.5.3", | ||
"version": "1.6.0-rc.0", | ||
"description": "Collection of utility functions used in web3.js.", | ||
@@ -18,4 +18,4 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-utils", | ||
"bn.js": "^4.11.9", | ||
"eth-lib": "0.2.8", | ||
"ethereum-bloom-filters": "^1.0.6", | ||
"ethereumjs-util": "^7.1.0", | ||
"ethjs-unit": "0.1.6", | ||
@@ -30,3 +30,3 @@ "number-to-bn": "1.7.0", | ||
}, | ||
"gitHead": "c82db7a27f593f450208f5acf66b392861f163fa" | ||
"gitHead": "5bc08f8c33f7353c576b21494bacf2413a77f278" | ||
} |
@@ -26,7 +26,5 @@ /* | ||
var utf8 = require('utf8'); | ||
var Hash = require("eth-lib/lib/hash"); | ||
var ethereumjsUtil = require('ethereumjs-util'); | ||
var ethereumBloomFilters = require('ethereum-bloom-filters'); | ||
/** | ||
@@ -494,6 +492,9 @@ * Returns true if object is BN, otherwise false | ||
if (isHexStrict(value) && /^0x/i.test((value).toString())) { | ||
value = hexToBytes(value); | ||
value = ethereumjsUtil.toBuffer(value); | ||
} else if (typeof value === 'string') { | ||
// Assume value is an arbitrary string | ||
value = Buffer.from(value, 'utf-8'); | ||
} | ||
var returnValue = Hash.keccak256(value); // jshint ignore:line | ||
var returnValue = ethereumjsUtil.bufferToHex(ethereumjsUtil.keccak256(value)); | ||
@@ -507,3 +508,3 @@ if(returnValue === SHA3_NULL_S) { | ||
// expose the under the hood keccak256 | ||
sha3._Hash = Hash; | ||
sha3._Hash = ethereumjsUtil.keccak256; | ||
@@ -510,0 +511,0 @@ /** |
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./lib" | ||
"outDir": "./lib", | ||
"esModuleInterop": true | ||
}, | ||
@@ -9,2 +10,2 @@ "include": [ | ||
] | ||
} | ||
} |
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 v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
164383
4811
2
+ Addedethereumjs-util@^7.1.0
+ Added@types/bn.js@5.1.6(transitive)
+ Added@types/node@22.9.0(transitive)
+ Added@types/pbkdf2@3.1.2(transitive)
+ Added@types/secp256k1@4.0.6(transitive)
+ Addedbase-x@3.0.10(transitive)
+ Addedblakejs@1.2.1(transitive)
+ Addedbn.js@5.2.1(transitive)
+ Addedbrowserify-aes@1.2.0(transitive)
+ Addedbs58@4.0.1(transitive)
+ Addedbs58check@2.1.2(transitive)
+ Addedbuffer-xor@1.0.3(transitive)
+ Addedcipher-base@1.0.4(transitive)
+ Addedcreate-hash@1.2.0(transitive)
+ Addedcreate-hmac@1.1.7(transitive)
+ Addedethereum-cryptography@0.1.3(transitive)
+ Addedethereumjs-util@7.1.5(transitive)
+ Addedevp_bytestokey@1.0.3(transitive)
+ Addedhash-base@3.1.0(transitive)
+ Addedkeccak@3.0.4(transitive)
+ Addedmd5.js@1.3.5(transitive)
+ Addednode-addon-api@2.0.25.1.0(transitive)
+ Addednode-gyp-build@4.8.3(transitive)
+ Addedpbkdf2@3.1.2(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedripemd160@2.0.2(transitive)
+ Addedrlp@2.2.7(transitive)
+ Addedscrypt-js@3.0.1(transitive)
+ Addedsecp256k1@4.0.4(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedsha.js@2.4.11(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedeth-lib@0.2.8
- Removedbuffer-to-arraybuffer@0.0.5(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddecompress-response@3.3.0(transitive)
- Removeddom-walk@0.1.2(transitive)
- Removedeth-lib@0.2.8(transitive)
- Removedglobal@4.4.0(transitive)
- Removedis-function@1.0.2(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removedmin-document@2.19.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedparse-headers@2.0.5(transitive)
- Removedprocess@0.11.10(transitive)
- Removedquery-string@5.1.1(transitive)
- Removedsimple-concat@1.0.1(transitive)
- Removedsimple-get@2.8.2(transitive)
- Removedstrict-uri-encode@1.1.0(transitive)
- Removedtimed-out@4.0.1(transitive)
- Removedurl-set-query@1.0.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedxhr@2.6.0(transitive)
- Removedxhr-request@1.1.0(transitive)
- Removedxhr-request-promise@0.1.3(transitive)
- Removedxtend@4.0.2(transitive)