api

package
v0.0.0-...-aafbcf9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HardenedKeyStart is the index at which a hardended key starts.
	// Each extended key has 2^31 normal child keys, and 2^31 hardned child keys.
	// Each of these child keys has an index.
	// The range for normal child keys is [0, 2^31 - 1]
	// The range for hardened child keys is [2^31, 2^32 - 1].
	HardenedKeyStart = 0x80000000 // 2^31 -- 16进制
)

Variables

This section is empty.

Functions

func ConvertPrvKeyToPubKey

func ConvertPrvKeyToPubKey(key string) (string, error)

将分层确定性私钥转化为公钥

func Decrypt

func Decrypt(publicKey, masterKey, cypherText string) (string, error)

使用子公钥和根私钥解密

func Encrypt

func Encrypt(publicKey, msg string) (string, error)

使用子公钥加密

func GenerateChildKey

func GenerateChildKey(key string, i uint32) (string, error)

通过分层确定性私钥/公钥(如根私钥)推导出子私钥/公钥

func GenerateMasterKeyByMnemonic

func GenerateMasterKeyByMnemonic(mnemonic string, language int) (string, error)

通过助记词恢复出分层确定性根密钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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