utils

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeInvoice added in v0.1.14

func DecodeInvoice(invoice string) (uint64, []byte, *decodepay.Bolt11, error)

func GetArkAddress

func GetArkAddress(bip21 string) string

func GetBtcAddress

func GetBtcAddress(bip21 string) string

func GetInvoice added in v0.1.14

func GetInvoice(bip21 string) string

func GetNewPrivateKey

func GetNewPrivateKey() string

func IsBip21

func IsBip21(text string) bool

func IsValidArkAddress

func IsValidArkAddress(address string) bool

func IsValidArkNote

func IsValidArkNote(text string) bool

func IsValidBtcAddress

func IsValidBtcAddress(address string) bool

func IsValidInvoice added in v0.1.14

func IsValidInvoice(invoice string) bool

func IsValidLnUrl added in v0.1.7

func IsValidLnUrl(str string) bool

func IsValidMnemonic

func IsValidMnemonic(mnemonic string) error

func IsValidPassword

func IsValidPassword(password string) error

func IsValidPrivateKey

func IsValidPrivateKey(privateKey string) error

func IsValidURL

func IsValidURL(str string) bool

func NsecToSeed

func NsecToSeed(nsec string) (string, error)

func PrivateKeyFromMnemonic

func PrivateKeyFromMnemonic(mnemonic string) (string, error)

func Retry added in v0.3.0

func Retry(
	ctx context.Context, interval time.Duration, fn func(ctx context.Context) (bool, error),
) error

func SatsFromBip21 added in v0.1.14

func SatsFromBip21(bip21 string) int

func SatsFromInvoice added in v0.1.14

func SatsFromInvoice(invoice string) int

func SatsFromNote

func SatsFromNote(text string) int

func SeedToNsec

func SeedToNsec(seed string) (string, error)

func ValidateURL added in v0.3.0

func ValidateURL(s string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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