util

package
v0.0.0-...-84f0667 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RecoverablePanicGroup = panicGroup{
	// contains filtered or unexported fields
}
View Source
var UnrecoverablePanicGroup = panicGroup{
	// contains filtered or unexported fields
}

Functions

func CallStack

func CallStack(recoverRes any, topLevelFunctionName string, lastCallstackMethod string, unwindStackLines int) (callStack []string)

CallStack returns an array of strings representing the current call stack. The method is tuned for the purpose of panic handler, and used as a helper in contructing the list of entries we want to write to the log / stderr / telemetry.

func IsValidSig

func IsValidSig(sig string, address string) bool

func KeyGenIfNeeded

func KeyGenIfNeeded(logger *log.Entry)

func NID

func NID() string

func NewBigIntFromString

func NewBigIntFromString(s string) *big.Int

func StringArrayContains

func StringArrayContains(slice []string, item string) bool

func StringArrayFilter

func StringArrayFilter(slice []string, predicate func(string) bool) []string

func TaskID

func TaskID() string

func WalletAddress

func WalletAddress() (string, *ecdsa.PrivateKey)

Types

type SignedDate

type SignedDate struct {
	Address string
	Sig     string
}

func SignCurrentDate

func SignCurrentDate(createdAt time.Time) SignedDate

Jump to

Keyboard shortcuts

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