mnemonic

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mnemonic provides functions to generate mnemonic phrases.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrWordsNumberInvalid is returned when trying to generate mnemonic with invalid words number.
	ErrWordsNumberInvalid = errors.New("mnemonic words number must be [12, 24] and a multiple of 3")

	ErrInvalidMnemonic = errors.New("invalid mnemonic")
)

Functions

func FromEntropy

func FromEntropy(entropy string) (string, error)

FromEntropy will return a mnemonic string for the given hex-encoded entropy.

func Generate

func Generate(wordsNum int) (string, error)

Generate will return a mnemonic string constains [wordsNum] words using random entropy.

func GetBip32ExtendedKey

func GetBip32ExtendedKey(mne, pwd, path string) (key *bip32.Key, err error)

GetBip32ExtendedKey derives bip32.Key with specify mnemonic and path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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