util

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToHex

func BytesToHex(bytes []byte) string

BytesToHex converts a byte slice to a hex string with a leading 0x

func ParseHex

func ParseHex(hexStr string) ([]byte, error)

ParseHex Convenience function to deal with 0x at the beginning of hex strings

func PrettyJson

func PrettyJson(x any) string

PrettyJson a simple pretty print for JSON examples

func Sha3256Hash

func Sha3256Hash(bytes [][]byte) (output []byte)

SHA3256Hash hashes the input bytes using SHA3-256

func StrToBigInt

func StrToBigInt(val string) (num *big.Int, err error)

StrToBigInt converts a string to a big.Int for u128 and u256 values

func StrToUint64

func StrToUint64(s string) (uint64, error)

StrToUint64 converts a string to a uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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