util

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUint64

func BytesToUint64(v []byte) (uint64, error)

func CheckRequiredFlag

func CheckRequiredFlag(cmd *cobra.Command, names ...string)

func CopyFile

func CopyFile(src, dst string) error

func Ecrecover

func Ecrecover(hash, v, r, s []byte) ([]byte, error)

Ecrecover returns the uncompressed public key that created the given signature.

func EcrecoverAddress

func EcrecoverAddress(hash, v, r, s []byte) (common.Address, error)

func ExternalIP

func ExternalIP() (string, error)

https://stackoverflow.com/questions/23558425/how-do-i-get-the-local-ip-address-in-go TODO there must be a better way to get external IP

func PrvKeyToCryptoKey

func PrvKeyToCryptoKey(prv *ecdsa.PrivateKey) crypto.PrivKey

func SetEnvToViper

func SetEnvToViper(vp *viper.Viper, key string) []string

func TxHash

func TxHash(b []byte) []byte

func Uint64ToBytes

func Uint64ToBytes(u uint64) []byte

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL