Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/vendor/github.com/tyler-smith/go-bip39
Nick Johnson f7027dd68c accounts, core, internal, node: Add support for smartcard wallets 6 years ago
..
LICENSE accounts, core, internal, node: Add support for smartcard wallets 6 years ago
README.md accounts, core, internal, node: Add support for smartcard wallets 6 years ago
bip39.go accounts, core, internal, node: Add support for smartcard wallets 6 years ago
coverage.txt accounts, core, internal, node: Add support for smartcard wallets 6 years ago
wordlist.go accounts, core, internal, node: Add support for smartcard wallets 6 years ago

README.md

go-bip39

A golang implementation of the BIP0039 spec for mnemonic seeds

Credits

English wordlist and test vectors are from the standard Python BIP0039 implementation from the Trezor guys: https://github.com/trezor/python-mnemonic

Example

package main

import (
  "github.com/tyler-smith/go-bip39"
  "github.com/tyler-smith/go-bip32"
  "fmt"
)

func main(){
  // Generate a mnemonic for memorization or user-friendly seeds
  entropy, _ := bip39.NewEntropy(256)
  mnemonic, _ := bip39.NewMnemonic(entropy)

  // Generate a Bip32 HD wallet for the mnemonic and a user supplied password
  seed := bip39.NewSeed(mnemonic, "Secret Passphrase")

  masterKey, _ := bip32.NewMasterKey(seed)
  publicKey := masterKey.PublicKey()

  // Display mnemonic and keys
  fmt.Println("Mnemonic: ", mnemonic)
  fmt.Println("Master private key: ", masterKey)
  fmt.Println("Master public key: ", publicKey)
}