Last active
December 2, 2019 01:38
-
-
Save miguelmota/6daf1bcb09e89ed5f5c8fed0473f4937 to your computer and use it in GitHub Desktop.
Web3 ethers.js ecrecover account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const msgBytes = ethers.utils.arrayify(msgHex) | |
const sigBytes = ethers.utils.arrayify(sigHex) | |
const msgSigner = utils.verifyMessage(msgBytes, sigBytes) | |
// equivalent of: | |
// const msgSigner = await web3.eth.accounts.recover(msgHex, sigHex) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment