mnemonic

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: LGPL-3.0 Imports: 7 Imported by: 13

Documentation

Overview

Package mnemonic provides BIP39 mnemonic phrase generation and validation.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidMnemonic = errors.New("invalid mnemonic given")

ErrInvalidMnemonic is returned when a mnemonic phrase is not valid BIP39.

Functions

func FromSeedAndPassphrase added in v0.26.0

func FromSeedAndPassphrase(mnemonic, passphrase string, index int) (*btcec.PrivateKey, *btcec.PublicKey)

FromSeedAndPassphrase derives a key pair from a BIP39 mnemonic and passphrase at the given TRON HD path index (44'/195'/0'/0/{index}).

func Generate

func Generate(entropyBits ...int) (string, error)

Generate returns a new random BIP39 mnemonic phrase. An optional entropy size in bits can be provided (128, 160, 192, 224, 256). Default: 256 (24 words).

Types

This section is empty.

Jump to

Keyboard shortcuts

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