Keystore Options
Options when Using your Keystore
Use a custom keystore location
To use a custom keystore location, use the -path flag:
hop keystore generate --path /my/path/keystore.jsonhop-node keystore generate --path ~/my/path/keystore.jsonThe default location is ~/.hop/keystore.json
Use an existing private key
You may generate an encrypted keystore using an existing private key by using the --private-key flag:
hop keystore generate --private-key=0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1dhop-node keystore generate --private-key=0x4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1dNote that you will no be prompted with the mnemonic in this case.
Decrypt keystore
Use the keystore decrypt command to decrypt an encrypted keystore:
hop keystore decrypthop-node keystore decryptIt will prompt you for the passphrase required to decrypt it:
keystore passphrase: ********It will display the private key if the passphrase is correct:
4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1dRe-encrypt keystore with a new passphrase
Use the keystore reencrypt command to re-encrypt an encrypted keystore with a new passphrase:
hop keystore reencrypthop-node keystore reencryptView keystore address
Use the keystore address command to print the keystore public address:
hop keystore addresshop-node keystore addressExample output:
0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1Last updated