wordlist

package
v0.0.0-...-b10619e Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package wordlist defines the requirements for a word list used for the bip39 package.

Index

Constants

View Source
const (
	// IndexBits is the number of bits used to represent a word index.
	IndexBits = 11
	// Count is the number of mnemonic words per word list.
	Count = 1 << IndexBits
)

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List interface {
	// Contains returns whether the given word is contained in the wordList w.
	Contains(word string) bool

	// Word returns the mnemonic word with index i in the wordList w.
	Word(i int) string

	// Index returns the index [0,2047] of the given word in the wordList w.
	// It panics when the word is not contained in the list.
	Index(word string) int
}

List represents a collection of valid BIP-39 mnemonic words.

Jump to

Keyboard shortcuts

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