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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.