utils

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateFeeEstimate

func CalculateFeeEstimate(fees *boltzrpc.SwapFees, amount uint64) uint64

func CheckVersion

func CheckVersion(name string, version string, minVersion string) error

func ExpandDefaultPath

func ExpandDefaultPath(dataDir string, currentValue string, defaultFileName string) string

func ExpandHomeDir

func ExpandHomeDir(path string) string

func FileExists

func FileExists(path string) bool

func FormatJson

func FormatJson(resp interface{}) (string, error)

func FormatMilliSat

func FormatMilliSat(milliSat int64) string

TODO: test this on real network

func GetDefaultDataDir

func GetDefaultDataDir() (string, error)

func GetSwapMemo

func GetSwapMemo(from string) string

func Satoshis

func Satoshis[V constraints.Integer](sat V) string

func StripQuotes

func StripQuotes(text []byte) string

Types

type ChannelForwarder

type ChannelForwarder[T any] struct {
	// contains filtered or unexported fields
}

func ForwardChannel

func ForwardChannel[T any](orig chan T, buffer int, saveValues bool) *ChannelForwarder[T]

func (*ChannelForwarder[T]) Close

func (c *ChannelForwarder[T]) Close()

func (*ChannelForwarder[T]) Get

func (c *ChannelForwarder[T]) Get() <-chan T

func (*ChannelForwarder[T]) Remove

func (c *ChannelForwarder[T]) Remove(recv <-chan T)

func (*ChannelForwarder[T]) Send

func (c *ChannelForwarder[T]) Send(val T)

Jump to

Keyboard shortcuts

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