bip39

package
v0.0.0-...-ff9824d Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package bip39 implements the non-generation portions of BIP-39 "Mnemonic code for generating deterministic keys".

Index

Constants

This section is empty.

Variables

View Source
var ErrAmbiguous = fmt.Errorf("bip39: ambiguous mnemonic word")

ErrAmbiguous is the error returned when a mnemonic word is ambiguous.

Functions

func ExpandWord

func ExpandWord(prefix string) (string, error)

ExpandWord expands a potentially abreviated mnemonic word to the full word.

func GetEntropyBits

func GetEntropyBits(l int) (int, error)

GetEntropyBits returns the amount of entropy in a given number of words, in bits.

func MnemonicToSeed

func MnemonicToSeed(passphrase, mnemonic []byte) []byte

MnemonicToSeed converts from a mnemonic to a seed. Note that the mnemonic should be validated and fixed-up with ValidateAndExpandMnemonic prior to being converted to a seed.

func ValidateAndExpandMnemonic

func ValidateAndExpandMnemonic(raw []byte) ([]byte, error)

ValidateAndExpandMnemonic expands abbreviated 4-character prefixes to their full words, validates the mnemonic for correctness, and returns the full mnemonic suitable for seed derivation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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