Documentation
¶
Index ¶
- func AddressToString(address common.Address) string
- func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
- func GetAccountFromPrivateKey(privateKey *ecdsa.PrivateKey) (accounts.Account, error)
- func GetAddressFromPublicKey(publicKey *ecdsa.PublicKey) (common.Address, error)
- func GetPublicKeyFromPrivateKey(privateKey *ecdsa.PrivateKey) (*ecdsa.PublicKey, error)
- func HexToAddress(hexString string) (common.Address, error)
- func HexToPrivateKey(hexString string) (*ecdsa.PrivateKey, error)
- func PrivateKeyToString(privateKey *ecdsa.PrivateKey) string
- func PublicKeyToString(publicKey *ecdsa.PublicKey) string
- func RandomHex(length int) (string, error)
- func SplitAddress(address common.Address) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressToString ¶
AddressToString converts an address to a string
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
GeneratePrivateKey generates a new private key
func GetAccountFromPrivateKey ¶
func GetAccountFromPrivateKey(privateKey *ecdsa.PrivateKey) (accounts.Account, error)
GetAccountFromPrivateKey gets an account from a private key
func GetAddressFromPublicKey ¶
GetAddressFromPublicKey gets an address from a public key
func GetPublicKeyFromPrivateKey ¶
func GetPublicKeyFromPrivateKey(privateKey *ecdsa.PrivateKey) (*ecdsa.PublicKey, error)
GetPublicKeyFromPrivateKey gets a public key from a private key
func HexToAddress ¶
HexToAddress converts a hex string to an address
func HexToPrivateKey ¶
func HexToPrivateKey(hexString string) (*ecdsa.PrivateKey, error)
HexToPrivateKey converts a hex string to a private key
func PrivateKeyToString ¶
func PrivateKeyToString(privateKey *ecdsa.PrivateKey) string
PrivateKeyToString converts a private key to a string
func PublicKeyToString ¶
PublicKeyToString converts a public key to a string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.