I can only find instructions for
geth, but cannot find anything about doing it using
eth which is part of
I will answer my own question. In short, the answer is
ethkey tool that comes with
As a demonstration, I will create some eth wallet on www.myetherwallet.com, import it into cpp-ethereum, and then display its private key.
1. Create some dummy eth wallet on www.myetherwallet.com
I created eth address
0x698042d6233042632711C86452A53a8E9637F585 with private key:
2. Import it into
./ethkey importbare a2fc86c38a1a7fb6c0eaea9696d6434cd977dbef46fba3183ac99ad42d2f62ef
You will be asked for password. Give some.
Enter a passphrase with which to secure account 698042d6…: Please confirm the passphrase by entering it again: Successfully imported a2fc86c38a1a7fb6c0eaea9696d6434cd977dbef46fba3183ac99ad42d2f62ef as 1c15859c-c3eb-0328-36bc-1ac17792d986
Not that the private key was imported as
1c15859c-c3eb-0328-36bc-1ac17792d986. This means that file
~/.web3/keys/1c15859c-c3eb-0328-36bc-1ac17792d986.json was created.
3. Display private key
ethkey, show the private key:
./ethkey --show-me-the-secret inspectbare 1c15859c-c3eb-0328-36bc-1ac17792d986
The result is:
Enter passphrase for key 1c15859c-c3eb-0328-36bc-1ac17792d986: Key 1c15859c-c3eb-0328-36bc-1ac17792d986: ICAP: XE17CBNICXRZJEY6DAJHNL1J8VTUM39OL1H Raw hex: 698042d6233042632711c86452a53a8e9637f585 Secret: a2fc86c38a1a7fb6c0eaea9696d6434cd977dbef46fba3183ac99ad42d2f62ef
Secret is our private key, while
Raw hex is our