utils

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BitcoinBlockTime = float64(10)

Block times in minutes

View Source
const LitecoinBlockTime = float64(2.5)

Variables

This section is empty.

Functions

func ApplyLitecoinParams

func ApplyLitecoinParams(litecoinParams litecoinCfg.Params) *bitcoinCfg.Params

func BlocksToHours

func BlocksToHours(blockDelta uint32, blockTime float64) string

func CalculateInvoiceExpiry

func CalculateInvoiceExpiry(blockDelta uint32, blockTime float64) int64

func ConnectBoltzLnd added in v1.1.0

func ConnectBoltzLnd(lnd *lnd.LND, boltz *boltz.Boltz, symbol string) (string, error)

func ExpandDefaultPath added in v1.2.1

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

func FileExists added in v1.2.0

func FileExists(path string) bool

func FormatJson added in v1.2.0

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

func FormatMilliSat

func FormatMilliSat(milliSat int64) string

TODO: test this on real network

func GetBlockTime

func GetBlockTime(symbol string) float64

func GetDefaultDataDir added in v1.2.1

func GetDefaultDataDir() (string, error)

func GetSmallestUnitName added in v1.2.1

func GetSmallestUnitName(symbol string) string

func GetSwapMemo

func GetSwapMemo(symbol string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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