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

Add mention of the "Ethereum Signed Message" prefix to the eth.personal.sign documentation #2293

Closed
montyly opened this issue Feb 2, 2019 · 2 comments · Fixed by #2295
Closed
Labels
Documentation Relates to project wiki or documentation

Comments

@montyly
Copy link

montyly commented Feb 2, 2019

Hi, thank you for maintaining web3js!
The following is an issue related to the documentation that might mislead users.

Expected behavior

The documentation of eth.personal.sign should detail the hash schema used.

Actual behavior

The current documentation does not indicate that the message to be signed is prefixed with:

"\x19Ethereum Signed Message:\n" + message.length

This might lead to the incorrect usage of the library.

Note that the documentation of eth.accounts.sign does mention the prefix:

image

Steps to reproduce the behavior

Error Logs

Versions

https://github.com/ethereum/web3.js/tree/7ff00822966aef2bd0588a5b39ff2f3eba6acfd1

axelgalicia added a commit to axelgalicia/web3.js that referenced this issue Feb 2, 2019
@axelgalicia
Copy link

Hello @montyly , please let me know if this pull request fulfills the expected outcome of your requirement. I will be happy to update it in case there is a missing part.

Thanks

@nivida nivida added the Documentation Relates to project wiki or documentation label Feb 3, 2019
@montyly
Copy link
Author

montyly commented Feb 4, 2019

#2295 fixes the issue, thank you!

nivida added a commit to axelgalicia/web3.js that referenced this issue Feb 4, 2019
nivida added a commit that referenced this issue Feb 4, 2019
[GH-2293]-Adding clarification of how data needs to be prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Relates to project wiki or documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants