util

package
v0.0.0-...-4cb4d4a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ether = math.BigPow(10, 18)
View Source
var Shannon = math.BigPow(10, 9)

Functions

func CheckPasswordHash

func CheckPasswordHash(hashVal, userPw string) bool

func CheckValidHexAddress

func CheckValidHexAddress(s string) (string, bool)

func FormatRatReward

func FormatRatReward(reward *big.Rat) string

func FormatReward

func FormatReward(reward *big.Int) string

func GetTargetHex

func GetTargetHex(diff int64) string

func HashPassword

func HashPassword(password string) ([]byte, error)

func IsValidHexAddress

func IsValidHexAddress(s string) bool

func IsValidUsername

func IsValidUsername(s string) bool

func IsZeroHash

func IsZeroHash(s string) bool

func Join

func Join(args ...interface{}) string

func MakeTimestamp

func MakeTimestamp() int64

func MakeTimestampDB

func MakeTimestampDB(dbTimestamp string) int64

func MakeTimestampDB2

func MakeTimestampDB2(dbTimestamp string) int64

func MustParseDuration

func MustParseDuration(s string) time.Duration

func String2Big

func String2Big(num string) *big.Int

func StringInSlice

func StringInSlice(a string, list []string) bool

func TargetHexToDiff

func TargetHexToDiff(targetHex string) *big.Int

func ToHex

func ToHex(n int64) string

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