bip39

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FundRaiser is the sentence length used during the cosmos fundraiser (12 words).
	FundRaiser ValidSentenceLen = 12
	// Size of the checksum employed for the fundraiser
	FundRaiserChecksumSize = 4
	// FreshKey is the sentence length used for newly created keys (24 words).
	FreshKey ValidSentenceLen = 24
	// Size of the checksum employed for new keys
	FreshKeyChecksumSize = 8
)

Variables

This section is empty.

Functions

func MnemonicToSeed

func MnemonicToSeed(mne string) (seed []byte)

MnemonicToSeed creates a BIP 39 seed from the passed mnemonic (with an empty BIP 39 password). This method does not validate the mnemonics checksum.

func MnemonicToSeedWithErrChecking

func MnemonicToSeedWithErrChecking(mne string) (seed []byte, err error)

MnemonicToSeedWithErrChecking returns the same seed as MnemonicToSeed. It creates a BIP 39 seed from the passed mnemonic (with an empty BIP 39 password).

Different from MnemonicToSeed it validates the checksum. For details on the checksum see the BIP 39 spec.

func NewMnemonic

func NewMnemonic(len ValidSentenceLen) (words []string, err error)

NewMnemonic will return a string consisting of the mnemonic words for the given sentence length.

Types

type ValidSentenceLen

type ValidSentenceLen uint8

ValidSentenceLen defines the mnemonic sentence lengths supported by this BIP 39 library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL