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

Outdated documentation on eth_sign #239

Closed
joelamouche opened this issue Apr 21, 2021 · 5 comments
Closed

Outdated documentation on eth_sign #239

joelamouche opened this issue Apr 21, 2021 · 5 comments
Labels
question Further information is requested

Comments

@joelamouche
Copy link

https://docs.metamask.io/guide/signing-data.html#signing-data-with-metamask

The current documentation says that eth_sign is exposed, allowing DApps to sign arbitrary code.
If I'm not mistaken, that isn't true since ethereum/go-ethereum#2940 : now eth_sign prepends the signed data with a string like personnal_sign does.

This is important for me because I need this eth_sign function as it was before in order to sign transactions for Moonbeam, an EVM-compatible parachain based on substrate (polkadot)

@BboyAkers
Copy link
Collaborator

So There are different version of Eth Signing. Try Pulling this PR down and check the code out. Hopefully this helps.
danfinlay/js-eth-personal-sign-examples#20

@BboyAkers BboyAkers added the question Further information is requested label Apr 23, 2021
@danfinlay
Copy link
Contributor

This is not actually true. Unfortunately, while geth decided to make that change, MetaMask was already supporting applications in production that depended on this method, so we addressed the security with an increasingly salient warning. https://docs.metamask.io/guide/signing-data.html#a-brief-history

@joelamouche
Copy link
Author

@danfinlay Thank you for the clarification.
However, there is something else that I would like you to clarify:

  • Are all signature functions in the extension coming from https://github.com/MetaMask/eth-sig-util ?
  • If that's true, where can I find the eth_sign signature function in that package?

Thanks in advance

@joelamouche
Copy link
Author

@danfinlay I was wondering if you could point me to the implementation of eth_sign please

@joelamouche
Copy link
Author

Also this documentation says the message is prefixed as well : https://eth.wiki/json-rpc/API#eth_sign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants