aion-web3-eth-accounts
Advanced tools
Comparing version 1.1.6 to 1.2.5-beta.2
{ | ||
"name": "aion-web3-eth-accounts", | ||
"namespace": "aion", | ||
"version": "1.1.6", | ||
"version": "1.2.5-beta.2", | ||
"description": "Web3 module to generate Ethereum accounts and sign data and transactions.", | ||
@@ -10,8 +10,8 @@ "repository": "https://github.com/aionnetwork/aion_web3/tree/master/packages/web3-eth-accounts", | ||
"dependencies": { | ||
"aion-lib": "1.1.6", | ||
"aion-lib": "1.2.5-beta.2", | ||
"aion-rlp": "^0.0.1", | ||
"aion-web3-core": "1.1.6", | ||
"aion-web3-core-helpers": "1.1.6", | ||
"aion-web3-core-method": "1.1.6", | ||
"aion-web3-utils": "1.1.6", | ||
"aion-web3-core": "1.2.5-beta.2", | ||
"aion-web3-core-helpers": "1.2.5-beta.2", | ||
"aion-web3-core-method": "1.2.5-beta.2", | ||
"aion-web3-utils": "1.2.5-beta.2", | ||
"any-promise": "1.3.0", | ||
@@ -21,3 +21,3 @@ "underscore": "1.8.3", | ||
}, | ||
"gitHead": "6cdda35e1124fb489ee6809dcd068c85ed1dfa01" | ||
"gitHead": "713ab735d0b43801b38aee7561f504564058a105" | ||
} |
@@ -36,2 +36,3 @@ /* | ||
var formatters = require('aion-web3-core-helpers').formatters; | ||
var errors = require('aion-web3-core-helpers').errors; | ||
var aionLib = require('aion-lib'); | ||
@@ -117,3 +118,3 @@ var blake2b256 = aionLib.crypto.blake2b256; | ||
} else { | ||
throw new Error('Address '+ address +' is not a valid address to get the "transactionCount".'); | ||
throw errors.InvalidParamForMethod('transactionCount', 'Address', address); | ||
} | ||
@@ -181,3 +182,3 @@ }, function () { return 'latest'; }] | ||
if (!tx) { | ||
error = new Error('No transaction object given!'); | ||
error = errors.InvalidObject('transaction'); | ||
@@ -191,3 +192,3 @@ callback(error); | ||
if (!tx.gas && !tx.gasLimit) { | ||
error = new Error('"gas" is missing'); | ||
error = errors.MissingParam('gas'); | ||
} | ||
@@ -200,3 +201,3 @@ | ||
tx.timestamp < 0) { | ||
error = new Error('Gas, gasPrice, nonce, type, or timestamp is lower than 0'); | ||
error = errors.LessThanZeroError('Gas, gasPrice, nonce, type, or timestamp'); | ||
} | ||
@@ -238,3 +239,3 @@ | ||
if (nacl.sign.detached.verify(hash, signature, account.publicKey) === false) { | ||
throw new Error('Could not verify signature.'); | ||
throw errors.InvalidSignature(true); | ||
} | ||
@@ -278,3 +279,3 @@ | ||
if (isNot(args[0]) || isNot(args[1])) { | ||
throw new Error('One of the values "type", "gasPrice", or "nonce" couldn\'t be fetched: '+ JSON.stringify(args)); | ||
throw errors.FailureToFetch('"type", "gasPrice", or "nonce"', JSON.stringify(args)) | ||
} | ||
@@ -333,3 +334,3 @@ return signed(_.extend(tx, {gasPrice: args[0], nonce: args[1]})); | ||
if(!_.isString(password)) { | ||
throw new Error('No password given.'); | ||
throw errors.InvalidParam('password'); | ||
} | ||
@@ -340,3 +341,3 @@ | ||
if (json.version !== 3) { | ||
throw new Error('Not a valid V3 wallet'); | ||
throw errors.InvalidObjVersion('v3', 'Wallet'); | ||
} | ||
@@ -355,3 +356,3 @@ | ||
if (kdfparams.prf !== 'hmac-sha256') { | ||
throw new Error('Unsupported parameters to PBKDF2'); | ||
throw errors.InvalidParamForMethod('PBKDF2'); | ||
} | ||
@@ -361,3 +362,3 @@ | ||
} else { | ||
throw new Error('Unsupported key derivation scheme'); | ||
throw errors.UnsupportedParam('key derivation scheme'); | ||
} | ||
@@ -369,3 +370,3 @@ | ||
if (mac !== json.crypto.mac) { | ||
throw new Error('Key derivation failed - possibly wrong password'); | ||
throw errors.FailedKeyDerivation(); | ||
} | ||
@@ -405,3 +406,3 @@ | ||
} else { | ||
throw new Error('Unsupported kdf'); | ||
throw errors.UnsupportedParam('kdf'); | ||
} | ||
@@ -411,3 +412,3 @@ | ||
if (!cipher) { | ||
throw new Error('Unsupported cipher'); | ||
throw errors.UnsupportedParam('cipher'); | ||
} | ||
@@ -558,3 +559,3 @@ | ||
} else { | ||
throw new Error('Couldn\'t decrypt accounts. Password wrong?'); | ||
throw errors.FailedAccountDecryption(); | ||
} | ||
@@ -561,0 +562,0 @@ }); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
468
53472
2
+ Addedaion-lib@1.2.5-beta.2(transitive)
+ Addedaion-web3-core@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-helpers@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-method@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-promievent@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-requestmanager@1.2.5-beta.2(transitive)
+ Addedaion-web3-core-subscriptions@1.2.5-beta.2(transitive)
+ Addedaion-web3-providers-http@1.2.5-beta.2(transitive)
+ Addedaion-web3-providers-ipc@1.2.5-beta.2(transitive)
+ Addedaion-web3-providers-ws@1.2.5-beta.2(transitive)
+ Addedaion-web3-utils@1.2.5-beta.2(transitive)
- Removedaion-lib@1.1.6(transitive)
- Removedaion-web3-core@1.1.6(transitive)
- Removedaion-web3-core-helpers@1.1.6(transitive)
- Removedaion-web3-core-method@1.1.6(transitive)
- Removedaion-web3-core-promievent@1.1.6(transitive)
- Removedaion-web3-core-requestmanager@1.1.6(transitive)
- Removedaion-web3-core-subscriptions@1.1.6(transitive)
- Removedaion-web3-providers-http@1.1.6(transitive)
- Removedaion-web3-providers-ipc@1.1.6(transitive)
- Removedaion-web3-providers-ws@1.1.6(transitive)
- Removedaion-web3-utils@1.1.6(transitive)
Updatedaion-lib@1.2.5-beta.2
Updatedaion-web3-core@1.2.5-beta.2
Updatedaion-web3-utils@1.2.5-beta.2