Let ECKeys be constructed from ECKeys
This commit is contained in:
parent
117ecd1e29
commit
7684c3f705
2 changed files with 5 additions and 3 deletions
6
bitcoinjs-min.js
vendored
6
bitcoinjs-min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -21,6 +21,8 @@ var ECKey = function (input) {
|
||||||
// Generate new key
|
// Generate new key
|
||||||
var n = ecparams.getN();
|
var n = ecparams.getN();
|
||||||
this.priv = ecdsa.getBigRandom(n);
|
this.priv = ecdsa.getBigRandom(n);
|
||||||
|
} else if (input instanceof ECKey) {
|
||||||
|
this.priv = input.priv;
|
||||||
} else if (input instanceof BigInteger) {
|
} else if (input instanceof BigInteger) {
|
||||||
// Input is a private key value
|
// Input is a private key value
|
||||||
this.priv = input;
|
this.priv = input;
|
||||||
|
|
Loading…
Reference in a new issue