util

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HashLength is the expected length of the hash
	HashLength = 32
	// AddressLength is the expected length of the address
	AddressLength = 20
)

Lengths of hashes and addresses in bytes.

Variables

This section is empty.

Functions

func HexDecodeString

func HexDecodeString(s string) ([]byte, error)

func HexEncodeToString

func HexEncodeToString(b []byte) string

HexEncode encodes bytes to a hex string. Contrary to hex.EncodeToString, this function prefixes the hex string with "0x"

func IsHexAddress

func IsHexAddress(s string) bool

func IsValidAddress

func IsValidAddress(address string) bool

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