util

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2019 License: Apache-2.0 Imports: 17 Imported by: 9

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 Keccak256 added in v0.2.0

func Keccak256(msg []byte) ([]byte, error)

func PrvKeyToCryptoKey

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

func SetEnvToViper

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

func Sha256 added in v0.2.0

func Sha256(msg []byte) []byte

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