Switched to new keyring methods

This commit is contained in:
obscuren
2014-05-14 13:55:08 +02:00
parent e8147cf7c6
commit f18ec51cb3
11 changed files with 106 additions and 71 deletions

View File

@ -89,8 +89,19 @@ func main() {
}
if ExportKey {
key := ethutil.Config.Db.GetKeys()[0]
fmt.Printf("%x\n", key.PrivateKey)
keyPair := ethutil.GetKeyRing().Get(0)
fmt.Printf(`
Generating new address and keypair.
Please keep your keys somewhere save.
++++++++++++++++ KeyRing +++++++++++++++++++
addr: %x
prvk: %x
pubk: %x
++++++++++++++++++++++++++++++++++++++++++++
save these words so you can restore your account later: %s
`, keyPair.Address(), keyPair.PrivateKey, keyPair.PublicKey)
os.Exit(0)
}