Add whether pubkey recovered from sig is compressed. close #61

This commit is contained in:
Andreas Brekken 2014-03-11 18:28:04 +01:00
parent f09890fed1
commit 08e75a82c9

View file

@ -59,6 +59,7 @@ Message.verifyMessage = function (address, sig, message) {
var isCompressed = !!(sig.i & 4); var isCompressed = !!(sig.i & 4);
var pubKey = ecdsa.recoverPubKey(sig.r, sig.s, hash, sig.i); var pubKey = ecdsa.recoverPubKey(sig.r, sig.s, hash, sig.i);
pubKey.compressed = isCompressed;
var expectedAddress = pubKey.getBitcoinAddress().toString(); var expectedAddress = pubKey.getBitcoinAddress().toString();