Documentation
¶
Overview ¶
Package keys provides key management utilities for TRON accounts.
Index ¶
- func AddNewKey(password string)
- func FromMnemonicSeedAndPassphrase(mnemonic, passphrase string, index int) (*btcec.PrivateKey, *btcec.PublicKey)
- func GenerateKey() (*btcec.PrivateKey, error)
- func GetPrivateKeyFromBytes(privateKeyBytes []byte) (*btcec.PrivateKey, error)
- func GetPrivateKeyFromHex(privateKeyHex string) (*btcec.PrivateKey, error)
- func ListKeys(keystoreDir string)
- type Dump
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewKey ¶
func AddNewKey(password string)
AddNewKey creates a new account in the default keystore directory.
func FromMnemonicSeedAndPassphrase ¶
func FromMnemonicSeedAndPassphrase(mnemonic, passphrase string, index int) (*btcec.PrivateKey, *btcec.PublicKey)
FromMnemonicSeedAndPassphrase derives a key pair from a BIP39 mnemonic and passphrase at the given TRON HD path index (44'/195'/0'/0/{index}).
func GenerateKey ¶ added in v0.24.1
func GenerateKey() (*btcec.PrivateKey, error)
GenerateKey generates a new random secp256k1 private key.
func GetPrivateKeyFromBytes ¶ added in v0.24.1
func GetPrivateKeyFromBytes(privateKeyBytes []byte) (*btcec.PrivateKey, error)
GetPrivateKeyFromBytes creates a private key from raw 32-byte key material.
func GetPrivateKeyFromHex ¶ added in v0.24.1
func GetPrivateKeyFromHex(privateKeyHex string) (*btcec.PrivateKey, error)
GetPrivateKeyFromHex parses a hex-encoded private key string.
Types ¶
Click to show internal directories.
Click to hide internal directories.