utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: ISC Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroBytes = encode.ClearBytes

ZeroBytes use for clearing a password or seed byte slice.

Functions

func BreakBalance

func BreakBalance(p *message.Printer, balance string) (b1, b2 string)

breakBalance takes the balance string and returns it in two slices

func ComputePasswordStrength

func ComputePasswordStrength(pb *cryptomaterial.ProgressBarStyle, th *cryptomaterial.Theme, editors ...*widget.Editor)

func CryptoToUSD

func CryptoToUSD(exchangeRate, coin float64) float64

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func EditorsNotEmpty

func EditorsNotEmpty(editors ...*widget.Editor) bool

func FormatAsUSDString added in v1.1.0

func FormatAsUSDString(p *message.Printer, usdAmt float64) string

func FormatDateOrTime

func FormatDateOrTime(timestamp int64) string

func GetAbsolutePath

func GetAbsolutePath() (string, error)

func HandleSubmitEvent

func HandleSubmitEvent(editors ...*widget.Editor) bool

func RadiusLayout added in v1.1.0

func RadiusLayout(gtx layout.Context, radius int, w layout.Widget) layout.Dimensions

func SplitSingleString

func SplitSingleString(text string, index int) string

func SplitXPUB

func SplitXPUB(text string, index1, index2 int) string

func StringNotEmpty

func StringNotEmpty(texts ...string) bool

func USDToDCR

func USDToDCR(exchangeRate, usd float64) float64

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info.

func ValidateHost

func ValidateHost(host string) bool

func ValidateLengthName

func ValidateLengthName(name string) bool

the length of name should be 20 characters

Types

This section is empty.

Jump to

Keyboard shortcuts

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