Skip to content

Commit

Permalink
Display seed using the PGP Word List.
Browse files Browse the repository at this point in the history
This fixes the behavior for dcrwallet that was lost in the latest
btcwallet sync.

Fixes #83.
  • Loading branch information
jrick committed Mar 2, 2016
1 parent 00b9840 commit a86b675
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion internal/prompt/prompt.go
Expand Up @@ -270,8 +270,22 @@ func Seed(reader *bufio.Reader) ([]byte, error) {
return nil, err
}

seedStr, err := pgpwordlist.ToStringChecksum(seed)
if err != nil {
return nil, err
}
seedStrSplit := strings.Split(seedStr, " ")

fmt.Println("Your wallet generation seed is:")
fmt.Printf("%x\n", seed)
for i := 0; i < hdkeychain.RecommendedSeedLen+1; i++ {
fmt.Printf("%v ", seedStrSplit[i])

if (i+1)%6 == 0 {
fmt.Printf("\n")
}
}

fmt.Printf("\n\nHex: %x\n", seed)
fmt.Println("IMPORTANT: Keep the seed in a safe place as you\n" +
"will NOT be able to restore your wallet without it.")
fmt.Println("Please keep in mind that anyone who has access\n" +
Expand Down

0 comments on commit a86b675

Please sign in to comment.