@harmony-js/account
Advanced tools
Comparing version 0.1.36 to 0.1.41-alpha.1
@@ -31,5 +31,5 @@ import { EncryptOptions } from '@harmony-js/crypto'; | ||
*/ | ||
readonly checksumAddress: string; | ||
readonly bech32Address: string; | ||
readonly bech32TestNetAddress: string; | ||
get checksumAddress(): string; | ||
get bech32Address(): string; | ||
get bech32TestNetAddress(): string; | ||
/** | ||
@@ -39,3 +39,3 @@ * @function getShardsCount getShards number with this Account | ||
*/ | ||
readonly getShardsCount: number; | ||
get getShardsCount(): number; | ||
constructor(key?: string, messenger?: Messenger); | ||
@@ -42,0 +42,0 @@ toFile(password: string, options?: EncryptOptions): Promise<string>; |
@@ -107,6 +107,6 @@ "use strict"; | ||
_a.trys.push([0, 2, , 3]); | ||
if (!password) { | ||
if (typeof password !== 'string') { | ||
throw new Error('you must provide password'); | ||
} | ||
file = JSON.parse(keyStore); | ||
file = JSON.parse(keyStore.toLowerCase()); | ||
return [4 /*yield*/, crypto_1.decrypt(file, password)]; | ||
@@ -113,0 +113,0 @@ case 1: |
@@ -41,6 +41,7 @@ /** | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -79,5 +80,5 @@ }); | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -88,2 +89,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
@@ -215,6 +217,6 @@ | ||
_a.trys.push([0, 2, , 3]); | ||
if (!password) { | ||
if (typeof password !== 'string') { | ||
throw new Error('you must provide password'); | ||
} | ||
file = JSON.parse(keyStore); | ||
file = JSON.parse(keyStore.toLowerCase()); | ||
return [4 /*yield*/, crypto.decrypt(file, password)]; | ||
@@ -221,0 +223,0 @@ case 1: |
@@ -37,6 +37,7 @@ /** | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -75,5 +76,5 @@ }); | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -84,2 +85,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
@@ -211,6 +213,6 @@ | ||
_a.trys.push([0, 2, , 3]); | ||
if (!password) { | ||
if (typeof password !== 'string') { | ||
throw new Error('you must provide password'); | ||
} | ||
file = JSON.parse(keyStore); | ||
file = JSON.parse(keyStore.toLowerCase()); | ||
return [4 /*yield*/, decrypt(file, password)]; | ||
@@ -217,0 +219,0 @@ case 1: |
@@ -38,6 +38,7 @@ /** | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -76,5 +77,5 @@ }); | ||
function __values(o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -85,2 +86,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
@@ -212,6 +214,6 @@ | ||
_a.trys.push([0, 2, , 3]); | ||
if (!password) { | ||
if (typeof password !== 'string') { | ||
throw new Error('you must provide password'); | ||
} | ||
file = JSON.parse(keyStore); | ||
file = JSON.parse(keyStore.toLowerCase()); | ||
return [4 /*yield*/, crypto.decrypt(file, password)]; | ||
@@ -218,0 +220,0 @@ case 1: |
@@ -19,4 +19,4 @@ import { EncryptOptions } from '@harmony-js/crypto'; | ||
*/ | ||
readonly accounts: string[]; | ||
readonly signer: Account | undefined; | ||
get accounts(): string[]; | ||
get signer(): Account | undefined; | ||
constructor(messenger?: Messenger); | ||
@@ -23,0 +23,0 @@ /** |
{ | ||
"name": "@harmony-js/account", | ||
"version": "0.1.36", | ||
"version": "0.1.41-alpha.1+3c7e080", | ||
"description": "account and wallet for harmony", | ||
@@ -21,10 +21,10 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@harmony-js/core": "0.1.36", | ||
"@harmony-js/crypto": "0.1.35", | ||
"@harmony-js/network": "0.1.35", | ||
"@harmony-js/staking": "0.1.36", | ||
"@harmony-js/transaction": "0.1.35", | ||
"@harmony-js/utils": "0.1.35" | ||
"@harmony-js/core": "^0.1.41-alpha.1+3c7e080", | ||
"@harmony-js/crypto": "^0.1.41-alpha.1+3c7e080", | ||
"@harmony-js/network": "^0.1.41-alpha.1+3c7e080", | ||
"@harmony-js/staking": "^0.1.41-alpha.1+3c7e080", | ||
"@harmony-js/transaction": "^0.1.41-alpha.1+3c7e080", | ||
"@harmony-js/utils": "^0.1.41-alpha.1+3c7e080" | ||
}, | ||
"gitHead": "9e05298fe7fd60996d81392f921f24a211c1ae0d" | ||
"gitHead": "3c7e080a7dad4f2636f307347132a992a2f76cca" | ||
} |
@@ -107,6 +107,6 @@ import { | ||
try { | ||
if (!password) { | ||
if (typeof password !== 'string') { | ||
throw new Error('you must provide password'); | ||
} | ||
const file: Keystore = JSON.parse(keyStore); | ||
const file: Keystore = JSON.parse(keyStore.toLowerCase()); | ||
const decyptedPrivateKey = await decrypt(file, password); | ||
@@ -113,0 +113,0 @@ if (isPrivateKey(decyptedPrivateKey)) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
644910
42
5572
2
+ Added@harmony-js/account@0.1.58(transitive)
+ Added@harmony-js/contract@0.1.58(transitive)
+ Added@harmony-js/core@0.1.58(transitive)
+ Added@harmony-js/crypto@0.1.58(transitive)
+ Added@harmony-js/network@0.1.58(transitive)
+ Added@harmony-js/staking@0.1.58(transitive)
+ Added@harmony-js/transaction@0.1.58(transitive)
+ Added@harmony-js/utils@0.1.58(transitive)
+ Addedscrypt@6.0.3(transitive)
+ Addedscrypt.js@0.3.0(transitive)
+ Addedscryptsy@1.2.1(transitive)
- Removed@harmony-js/contract@0.1.36(transitive)
- Removed@harmony-js/core@0.1.36(transitive)
- Removed@harmony-js/crypto@0.1.35(transitive)
- Removed@harmony-js/network@0.1.35(transitive)
- Removed@harmony-js/staking@0.1.36(transitive)
- Removed@harmony-js/transaction@0.1.35(transitive)
- Removed@harmony-js/utils@0.1.35(transitive)