Created
January 9, 2018 15:46
-
-
Save bt4R9/35da0817e00cd2d2ecc82f2aa3229daf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(async () => { | |
const account = await web3.eth.accounts.create(); | |
console.log('new account', account); | |
const keystore = account.encrypt(account.privateKey, '123'); | |
console.log('keystore for account', keystore); | |
const account2 = await web3.eth.accounts.decrypt(keystore, '123'); | |
console.log(account2); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment