Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds version support to Message.verifyMessage #101

Merged
merged 2 commits into from
Mar 28, 2014
Merged

Adds version support to Message.verifyMessage #101

merged 2 commits into from
Mar 28, 2014

Conversation

dcousens
Copy link
Contributor

As I mentioned in #98, at this time you cannot verify a message that is not on the main bitcoin network.

This is due to the address that is being derived from the recovered public key is by default an address with the Bitcoin version.

This pull request resolves this issue by making less assumptions about the address input parameter, letting it be a String, Address or even byte array (that is, consistent with the new Address constructor); and then derives the address from the version of the input address instead of defaulting.

@weilu
Copy link
Contributor

weilu commented Mar 28, 2014

Nice! This also resolves #49 I believe. I'll confirm with some more test cases.

weilu added a commit that referenced this pull request Mar 28, 2014
Adds version support to Message.verifyMessage
@weilu weilu merged commit 3dfeecb into bitcoinjs:master Mar 28, 2014
@dcousens dcousens deleted the messagevers branch March 28, 2014 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants