ethereum-keystore
Ethereum keystore generator and reader
Demo
https://lab.miguelmota.com/ethereum-keystore
Install
npm install ethereum-keystore
Getting started
Generate random keystore, encrypted with passphrase:
const generateKeystore = const keystore = await console
Generate keystore from private key, encrypted with passphrase:
const generateKeystore = const keystore = await console
Generate keystore with custom parameters:
const generateKeystore = const keystore = await console
Recover private key from encrypted keystore:
const recoverKeystore = const keystoreJson = const privateKey = await console
CLI
Install:
npm install -g ethereum-keystore
Help
$ ethereum-keystore --help Usage $ ethereum-keystore [input] [options] Options --generate, -g Generate keystore --recover, -r Recover keystore --private-key, -k Private key --passphrase, -p Passphrase --outfile, -o Output file
Generate random keystore, encrypted with passphrase:
$ ethereum-keystore -g -p mysecret{"address":"281fe82d16e0ba4036a49074af87b313cc5844c5", ... }
Output keystore to file:
$ ethereum-keystore -g -p mysecret -o keystore.json
Generate keystore from private key, encrypted with passphrase:
$ ethereum-keystore -g -k 4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d -p mysecret
Recover private key from encrypted keystore file:
$ ethereum-keystore -r keystore.json -p mysecret4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d
Recover private key from piped encrypted keystore:
$ cat keystore | ethereum-keystore -r -p mysecret4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d
Test
npm test