Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSecp256k1PrivKey ¶
GenSecp256k1PrivKey generates a Secp256k1 private key from mnemonic anad bip39Passphrase. If mnemonic is an empty string, this function generates a random mnemonic. The bip39Passphrase can be an empty string.
Types ¶
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
KeyStore stores an encrypted private key on disk. It implements the Web3 Secret Storage Definition: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition.
func NewKeyStore ¶
NewKeyStore creates a KeyStore using baseDir. If baseDir doesn't exists, it is created automatically.
func (*KeyStore) LoadByAddress ¶
LoadByAddress loads a key by decrypting it using passwd. If there are multiple files related to the address, it uses the recent one.
Click to show internal directories.
Click to hide internal directories.