crypto

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CosmosHDPath   string = "m/44'/118'/0'/0/0"
	HardenedOffset int    = 0x80000000
	InitHRP        string = "init"
)

Variables

View Source
var EnglishWordList = strings.Split(strings.TrimSpace(englishWordList), "\n")

EnglishWordList Language-specific wordlists

View Source
var ReverseWordMap = map[string]int{}
View Source
var WordList = EnglishWordList

WordList is the wordlist to use

Functions

func GenerateMnemonic

func GenerateMnemonic() (string, error)

GenerateMnemonic generates new fresh mnemonic

func IsMnemonicValid

func IsMnemonicValid(mnemonic string) bool

IsMnemonicValid attempts to verify that the provided mnemonic is valid. Validity is determined by both the number of words being appropriate, and that all the words in the mnemonic are present in the word list.

func MnemonicToBech32Address

func MnemonicToBech32Address(hrp, mnemonic string) (string, error)

MnemonicToBech32Address converts a mnemonic to a Cosmos SDK Bech32 address.

func PubKeyToBech32Address added in v0.3.1

func PubKeyToBech32Address(pubKeyHex string) (string, error)

PubKeyToBech32Address converts a hex string public key to a Cosmos SDK Bech32 address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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