fix: Pubkey(point) and Privkey(bn)
This commit is contained in:
parent
caf6c87419
commit
073ee0a0e4
@ -6,7 +6,7 @@ var Random = require('./random');
|
|||||||
|
|
||||||
var Privkey = function Privkey(bn) {
|
var Privkey = function Privkey(bn) {
|
||||||
if (!(this instanceof Privkey))
|
if (!(this instanceof Privkey))
|
||||||
return new Privkey(obj);
|
return new Privkey(bn);
|
||||||
if (bn instanceof BN)
|
if (bn instanceof BN)
|
||||||
this.bn = bn;
|
this.bn = bn;
|
||||||
else if (bn) {
|
else if (bn) {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ var privkey = require('./privkey');
|
|||||||
|
|
||||||
var Pubkey = function Pubkey(point) {
|
var Pubkey = function Pubkey(point) {
|
||||||
if (!(this instanceof Pubkey))
|
if (!(this instanceof Pubkey))
|
||||||
return new Pubkey(obj);
|
return new Pubkey(point);
|
||||||
if (point instanceof Point)
|
if (point instanceof Point)
|
||||||
this.point = point;
|
this.point = point;
|
||||||
else if (point) {
|
else if (point) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user