@zilliqa-js/account
Advanced tools
Comparing version 0.2.8 to 0.2.9
@@ -221,3 +221,3 @@ "use strict"; | ||
this.status = 3 /* Rejected */; | ||
throw new Error("The transaction is still not confirmed after " + maxAttempts + " attemps."); | ||
throw new Error("The transaction is still not confirmed after " + maxAttempts + " attempts."); | ||
} | ||
@@ -224,0 +224,0 @@ }); |
@@ -42,3 +42,3 @@ "use strict"; | ||
var _a; | ||
var privateKey = zcrypto.generatePrivateKey(); | ||
var privateKey = zcrypto.schnorr.generatePrivateKey(); | ||
var newAccount = new account_1.Account(privateKey); | ||
@@ -45,0 +45,0 @@ this.accounts = tslib_1.__assign({}, this.accounts, (_a = {}, _a[newAccount.address] = newAccount, _a)); |
{ | ||
"name": "@zilliqa-js/account", | ||
"version": "0.2.8", | ||
"version": "0.2.9", | ||
"description": "Used for signing transactions.", | ||
@@ -23,6 +23,6 @@ "main": "dist/index.js", | ||
"@types/hdkey": "^0.7.0", | ||
"@zilliqa-js/core": "0.2.7", | ||
"@zilliqa-js/crypto": "0.2.8", | ||
"@zilliqa-js/proto": "0.2.6", | ||
"@zilliqa-js/util": "0.2.6", | ||
"@zilliqa-js/core": "0.2.9", | ||
"@zilliqa-js/crypto": "0.2.9", | ||
"@zilliqa-js/proto": "0.2.9", | ||
"@zilliqa-js/util": "0.2.9", | ||
"bip39": "^2.5.0", | ||
@@ -34,3 +34,3 @@ "hdkey": "^1.1.0" | ||
}, | ||
"gitHead": "28297481f44eea7fe07cd0f3508c74c4076f83b0" | ||
"gitHead": "ac69aa983e10732a00f3a8da0f17eb3774aa1127" | ||
} |
@@ -223,3 +223,3 @@ import { Provider, RPCResponse, Signable } from '@zilliqa-js/core'; | ||
throw new Error( | ||
`The transaction is still not confirmed after ${maxAttempts} attemps.`, | ||
`The transaction is still not confirmed after ${maxAttempts} attempts.`, | ||
); | ||
@@ -226,0 +226,0 @@ } |
@@ -45,3 +45,3 @@ import bip39 from 'bip39'; | ||
create(): string { | ||
const privateKey = zcrypto.generatePrivateKey(); | ||
const privateKey = zcrypto.schnorr.generatePrivateKey(); | ||
const newAccount = new Account(privateKey); | ||
@@ -48,0 +48,0 @@ |
@@ -12,3 +12,3 @@ import fs from 'fs'; | ||
it('should be able to encode itself as a keystore file', async () => { | ||
const privateKey = zcrypto.generatePrivateKey(); | ||
const privateKey = zcrypto.schnorr.generatePrivateKey(); | ||
const account = new Account(privateKey); | ||
@@ -22,3 +22,3 @@ const keystore = await account.toFile('stronk_password'); | ||
it('should fail if given the wrong passphrase', async () => { | ||
const privateKey = zcrypto.generatePrivateKey(); | ||
const privateKey = zcrypto.schnorr.generatePrivateKey(); | ||
const account = new Account(privateKey); | ||
@@ -56,3 +56,3 @@ const keystore = await account.toFile('stronk_password'); | ||
it('should be able to sign a transaction', () => { | ||
const privateKey = zcrypto.generatePrivateKey(); | ||
const privateKey = zcrypto.schnorr.generatePrivateKey(); | ||
const account = new Account(privateKey); | ||
@@ -59,0 +59,0 @@ |
import { HTTPProvider } from '@zilliqa-js/core'; | ||
import { | ||
getPubKeyFromPrivateKey, | ||
generatePrivateKey, | ||
schnorr, | ||
} from '@zilliqa-js/crypto'; | ||
import { getPubKeyFromPrivateKey, schnorr } from '@zilliqa-js/crypto'; | ||
import { BN, Long } from '@zilliqa-js/util'; | ||
@@ -26,3 +22,3 @@ | ||
for (let i = 0; i < 10; i++) { | ||
accounts.push(new Account(generatePrivateKey())); | ||
accounts.push(new Account(schnorr.generatePrivateKey())); | ||
} | ||
@@ -139,3 +135,3 @@ | ||
it('should throw an error if asked to sign with no accounts available', () => { | ||
const pubKey = getPubKeyFromPrivateKey(generatePrivateKey()); | ||
const pubKey = getPubKeyFromPrivateKey(schnorr.generatePrivateKey()); | ||
const [wallet] = createWallet(0); | ||
@@ -142,0 +138,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
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
5958165
74866
+ Added@zilliqa-js/core@0.2.9(transitive)
+ Added@zilliqa-js/crypto@0.2.9(transitive)
+ Added@zilliqa-js/proto@0.2.9(transitive)
+ Added@zilliqa-js/util@0.2.9(transitive)
- Removed@zilliqa-js/core@0.2.7(transitive)
- Removed@zilliqa-js/crypto@0.2.8(transitive)
- Removed@zilliqa-js/proto@0.2.6(transitive)
- Removed@zilliqa-js/util@0.2.6(transitive)
Updated@zilliqa-js/core@0.2.9
Updated@zilliqa-js/crypto@0.2.9
Updated@zilliqa-js/proto@0.2.9
Updated@zilliqa-js/util@0.2.9