aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-12 00:50:36 +0800
committerobscuren <geffobscura@gmail.com>2014-04-12 00:50:36 +0800
commit8280dd65e63f5e8abac7ca1c41b337859a40dc49 (patch)
tree869149293af5b022aeebf076b4db811e167ecfbd /ethereum
parent3238894a3ba4767773849eabb7c0892554d32874 (diff)
parent834e43622c3b467f492fcaa07eafd9ca98edc8a3 (diff)
downloadgo-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar
go-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.gz
go-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.bz2
go-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.lz
go-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.xz
go-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.tar.zst
go-tangerine-8280dd65e63f5e8abac7ca1c41b337859a40dc49.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'ethereum')
-rw-r--r--ethereum/ethereum.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go
index c82e7dcd8..e1e803771 100644
--- a/ethereum/ethereum.go
+++ b/ethereum/ethereum.go
@@ -11,6 +11,7 @@ import (
"os"
"os/signal"
"runtime"
+ "strings"
)
const Debug = true
@@ -78,7 +79,17 @@ func main() {
}
if r == "y" {
- utils.ImportPrivateKey(ImportKey)
+ mnemonic := strings.Split(ImportKey, " ")
+ if len(mnemonic) == 24 {
+ fmt.Println("Got mnemonic key, importing.")
+ key := ethutil.MnemonicDecode(mnemonic)
+ utils.ImportPrivateKey(key)
+ } else if len(mnemonic) == 1 {
+ fmt.Println("Got hex key, importing.")
+ utils.ImportPrivateKey(ImportKey)
+ } else {
+ fmt.Println("Did not recognise format, exiting.")
+ }
os.Exit(0)
}
} else {