Skip to content

decred/go-bip39

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-bip39

A golang implementation of the BIP0039 spec for mnemonic seeds

Example

package main

import (
  "fmt"

  "github.com/decred/go-bip39"
)

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")

  // Display mnemonic and keys
  fmt.Println("Mnemonic: ", mnemonic)
  fmt.Println("Seed: ", seed)
}

Credits

Wordlists are from the bip39 spec.

Test vectors are from the standard Python BIP0039 implementation from the Trezor team: https://github.com/trezor/python-mnemonic

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published