Created
April 19, 2018 02:05
-
-
Save backus/908f4ea72cadcd67f970737128973701 to your computer and use it in GitHub Desktop.
Example #2 for "How to make a user friendly Ethereum dApp"
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 user = web3.eth.accounts[0]; | |
const sigInput = [ | |
{ type: "string", name: "Action", value: "Create Account" }, | |
{ type: "address", name: "Address", value: user } | |
]; | |
web3.currentProvider.sendAsync( | |
{ method: "eth_signTypedData", params: [sigInput, user], from: user }, | |
handleSignature | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment