utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: GPL-3.0 Imports: 4 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPrefix

func AddPrefix(value string) string

Add a 0x prefix to a hex string if not present

func DecodeHex

func DecodeHex(value string) ([]byte, error)

Convert a hex-encoded string to a byte array, removing the 0x prefix if present

func EncodeHexWithPrefix

func EncodeHexWithPrefix(value []byte) string

Encode bytes to a hex string with a 0x prefix

func GenerateRandomPassword

func GenerateRandomPassword() (string, error)

Generates a random password

func IsWalletReady

func IsWalletReady(status wallet.WalletStatus) bool

Check if the node wallet is ready for transacting

func RemovePrefix

func RemovePrefix(value string) string

Remove a 0x prefix from a hex string if present

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