Documentation ¶
Index ¶
- Variables
- func Bech32AddrString(p PrivateKey) (string, error)
- func EncryptArmorPrivKey(privKey cryptotypes.PrivKey, passphrase string) string
- func EncryptArmorPrivKeyWithoutPassphrase(privKey cryptotypes.PrivKey) string
- func HexAddrString(p PrivateKey) string
- func NewMnemonic() (string, error)
- func NewPrivKey(mnemonic string) (cryptotypes.PrivKey, error)
- func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey cryptotypes.PrivKey, algo string, err error)
- func UnarmorDecryptPrivKeyWithoutPassphrase(armorStr string) (privKey cryptotypes.PrivKey, algo string, err error)
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
View Source
var BcryptSecurityParameter = 12
View Source
var DefaultEncryptPassphrase = "xplaDefaultPassphrase"
Functions ¶
func Bech32AddrString ¶
func Bech32AddrString(p PrivateKey) (string, error)
Convert private key to bech32 address.
func EncryptArmorPrivKey ¶
func EncryptArmorPrivKey(privKey cryptotypes.PrivKey, passphrase string) string
Encrypt secp-256k1 private key to make armored key.
func EncryptArmorPrivKeyWithoutPassphrase ¶
func EncryptArmorPrivKeyWithoutPassphrase(privKey cryptotypes.PrivKey) string
Encrypt secp-256k1 private key to make armored key without passphrase for keyring. (for test)
func NewMnemonic ¶
Make new mnemonic words by using bip39 entropy. Mnemonic words are changed every time user run new mnemonic function.
func NewPrivKey ¶
func NewPrivKey(mnemonic string) (cryptotypes.PrivKey, error)
Make new private key. The private key generation algorithm uses eth-secp256k1 to use the evm module.
func UnarmorDecryptPrivKey ¶
func UnarmorDecryptPrivKey(armorStr string, passphrase string) (privKey cryptotypes.PrivKey, algo string, err error)
Decrypt armored private key.
func UnarmorDecryptPrivKeyWithoutPassphrase ¶
func UnarmorDecryptPrivKeyWithoutPassphrase(armorStr string) (privKey cryptotypes.PrivKey, algo string, err error)
Decrypt armored private key without passpharse for keyring. (for test)
Types ¶
type PrivateKey ¶
type PrivateKey = cryptotypes.PrivKey
type PublicKey ¶ added in v0.1.3
type PublicKey = cryptotypes.PubKey
Click to show internal directories.
Click to hide internal directories.