Skip to content

base/go-bip39

 
 

Repository files navigation

go-bip39

A golang implementation of the BIP0039 spec for mnemonic seeds

Example

package main

import (
  "github.com/base/go-bip39"
  "fmt"
)

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

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

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

A BIP0039 implementation in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.8%
  • Makefile 0.2%