Documentation
¶
Index ¶
- func GetAddressFromKeyStoreFile(keyStoreFile string) (gethcommon.Address, error)
- func ReadKey(keyStoreFile string, password string) (*ecdsa.PrivateKey, error)
- func WriteKey(path string, privateKey *ecdsa.PrivateKey, password string) error
- func WriteKeyFromHex(path, privateKeyHex, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAddressFromKeyStoreFile ¶
func GetAddressFromKeyStoreFile(keyStoreFile string) (gethcommon.Address, error)
GetAddressFromKeyStoreFile We are using Web3 format defined by https://ethereum.org/en/developers/docs/data-structures-and-encoding/web3-secret-storage/
func WriteKey ¶
func WriteKey(path string, privateKey *ecdsa.PrivateKey, password string) error
WriteKey writes the private key to the given path The key is encrypted using the given password This function will create the directory if it doesn't exist If there's an existing file at the given path, it will be overwritten
func WriteKeyFromHex ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.