Skip to content

Commit

Permalink
Merge pull request #19 from bitpay/bugs/uncompressed
Browse files Browse the repository at this point in the history
Support Uncompressed Pubkeys
  • Loading branch information
matiu committed Jun 2, 2015
2 parents 44e8ee9 + 8d8b370 commit e8da2ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "https://github.com/bitpay/bitcore-message.git"
},
"dependencies": {
"bitcore": "^0.12.0"
"bitcore": "^0.12.7"
},
"devDependencies": {
"bitcore-build": "bitpay/bitcore-build",
Expand Down
8 changes: 8 additions & 0 deletions test/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ describe('Message', function() {
verified.should.equal(false);
});

it('will verify with an uncompressed pubkey', function() {
var privateKey = new bitcore.PrivateKey('5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss');
var message = new Message('This is an example of a signed message.');
var signature = message.sign(privateKey);
var verified = message.verify(privateKey.toAddress(), signature);
verified.should.equal(true);
});

it('can chain methods', function() {
var verified = Message(text).verify(address, signatureString);
verified.should.equal(true);
Expand Down

0 comments on commit e8da2ba

Please sign in to comment.