Skip to content

Commit

Permalink
fix init api
Browse files Browse the repository at this point in the history
  • Loading branch information
matiu committed Jan 26, 2018
1 parent 7223a38 commit cc517c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bitauth-browserify.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var elliptic = require('elliptic');
var ecdsa = new elliptic.ec(elliptic.curves.secp256k1);
var EC = require('elliptic').ec;
var ecdsa = new EC('secp256k1');

var BitAuth = require('./bitauth-common');

Expand All @@ -19,7 +19,7 @@ BitAuth._getPublicKeyFromPrivateKey = function(privkey) {
} else {
privKeyString = privkey;
}
var keys = ecdsa.keyPair(privkey, 'hex');
var keys = ecdsa.keyFromPrivate(privKeyString, 'hex')

// compressed public key
var pubKey = keys.getPublic();
Expand Down

0 comments on commit cc517c9

Please sign in to comment.