aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ethereum.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-14 19:55:08 +0800
committerobscuren <geffobscura@gmail.com>2014-05-14 19:55:08 +0800
commitf18ec51cb3959cc662bfc7b84314cd1d3b1541b5 (patch)
tree1c3d99407624dc791db0cb6c135bd2bd1dfc56cf /ethereal/ethereum.go
parente8147cf7c6f508910698e6743ad347c78010ffe3 (diff)
downloaddexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.tar
dexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.tar.gz
dexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.tar.bz2
dexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.tar.lz
dexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.tar.xz
dexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.tar.zst
dexon-f18ec51cb3959cc662bfc7b84314cd1d3b1541b5.zip
Switched to new keyring methods
Diffstat (limited to 'ethereal/ethereum.go')
-rw-r--r--ethereal/ethereum.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go
index 32c16f64f..63f907571 100644
--- a/ethereal/ethereum.go
+++ b/ethereal/ethereum.go
@@ -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)
}