我只能找到geth的说明,但无法找到使用eth ( cpp-ethereum的一部分)进行操作的任何方法。
发布于 2017-06-26 04:35:00
我会回答自己的问题。简而言之,答案是ethkey工具,它是cpp-ethereum附带的。
作为演示,我将在www.myetherwallet.com上创建一些eth钱包,将其导入cpp,然后显示其私钥。
上创建一些虚拟的eth钱包
我用私钥创建了eth地址0x698042d6233042632711C86452A53a8E9637F585:a2fc86c38a1a7fb6c0eaea9696d6434cd977dbef46fba3183ac99ad42d2f62ef。
https://www.myetherwallet.com/#view-wallet-info

cpp-ethereum./ethkey importbare a2fc86c38a1a7fb6c0eaea9696d6434cd977dbef46fba3183ac99ad42d2f62ef你会被问到密码。给我一些。
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不是将私钥导入为1c15859c-c3eb-0328-36bc-1ac17792d986。这意味着创建了文件~/.web3/keys/1c15859c-c3eb-0328-36bc-1ac17792d986.json。
使用ethkey,显示私钥:
./ethkey --show-me-the-secret inspectbare 1c15859c-c3eb-0328-36bc-1ac17792d986结果是:
Enter passphrase for key 1c15859c-c3eb-0328-36bc-1ac17792d986:
Key 1c15859c-c3eb-0328-36bc-1ac17792d986:
ICAP: XE17CBNICXRZJEY6DAJHNL1J8VTUM39OL1H
Raw hex: 698042d6233042632711c86452a53a8e9637f585
Secret: a2fc86c38a1a7fb6c0eaea9696d6434cd977dbef46fba3183ac99ad42d2f62ef其中Secret是我们的私钥,而Raw hex是我们的address。
https://ethereum.stackexchange.com/questions/18447
复制相似问题