v1.24.0 Latest Latest

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 5 Imported by: 22




This section is empty.


This section is empty.


func FromKey

func FromKey(key []byte) (string, error)

FromKey converts a 32-byte key into a 25 word mnemonic. The generated mnemonic includes a checksum. Each word in the mnemonic represents 11 bits of data, and the last 11 bits are reserved for the checksum.

func FromMasterDerivationKey

func FromMasterDerivationKey(mdk types.MasterDerivationKey) (string, error)

FromMasterDerivationKey is a helper that converts an MDK to a human-readable mnemonic

func FromPrivateKey

func FromPrivateKey(sk ed25519.PrivateKey) (string, error)

FromPrivateKey is a helper that converts an ed25519 private key to a human-readable mnemonic

func ToKey

func ToKey(mnemonic string) ([]byte, error)

ToKey converts a mnemonic generated using this library into the source key used to create it. It returns an error if the passed mnemonic has an incorrect checksum, if the number of words is unexpected, or if one of the passed words is not found in the words list.

func ToMasterDerivationKey

func ToMasterDerivationKey(mnemonic string) (mdk types.MasterDerivationKey, err error)

ToMasterDerivationKey is a helper that converts a mnemonic directly to a master derivation key

func ToPrivateKey

func ToPrivateKey(mnemonic string) (sk ed25519.PrivateKey, err error)

ToPrivateKey is a helper that converts a mnemonic directly to an ed25519 private key


This section is empty.

Jump to

Keyboard shortcuts

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