-
Notifications
You must be signed in to change notification settings - Fork 46
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
Sign and verify personal message via Metamask #17
Comments
Thank you! If you’re referring to manually signing the message, the package already has the functionality to do that. Please look for the About the warning message, I'm pretty sure It's from the wallet part, and it would be impossible to suppress that from the package. I hope you understand the risk of manually signing the message as well. This is a simple example of how to implement that. final sig = await provider!.getSigner().signMessage('hehe');
final acc = EthUtils.verifyMessage('hehe', sig);
print(acc); |
Thank you very much for your prompt response. I am referring to the 'personal.sign' spec (ethereum/go-ethereum#2940), an example of which is here: https://medium.com/hackernoon/writing-for-blockchain-wallet-signature-request-messages-6ede721160d5 where this web3 code snippet:
Seems to result in a warning-free Metamask notification - which makes sense because it is prefixed with some text that makes it impossible to sign transactions with the same signature. The purpose of personal sign is to avoid open ended signatures. Reference below from Metamask docs: https://docs.metamask.io/guide/signing-data.html#a-brief-history
This would be very useful as it would allow users to verify their wallet with a site, with minimal security risk, and no need for smart contract interaction (which costs money). Thanks very much. |
Yes, If you want to sign a transaction, use |
First of all thanks v much for this library!
Is your feature request related to a problem? Please describe.
Feature request to help verifying that a user owns a certain wallet
Describe the solution you'd like
I would like to know if its possible to sign a Metamask personal message which can then be verified server side in order to link off chain user accounts with Wallets. Ideally i would like it to make a signature which does not trigger the Metamask 'card blanche' warning below.
The text was updated successfully, but these errors were encountered: