config

package
v2.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DataDir string `short:"d" long:"datadir" description:"Data directory of boltz-client"`

	ConfigFile string `short:"c" long:"configfile" description:"Path to configuration file"`

	LogFile    string `short:"l" long:"logfile" description:"Path to the log file"`
	LogLevel   string `long:"loglevel" description:"Log level (fatal, error, warn, info, debug, silly)"`
	LogMaxSize int    `long:"logmaxsize" description:"Maximum size of the log file in megabytes before it gets rotated"`
	LogMaxAge  int    `long:"logmaxage" description:"Maximum age of old log files in days before they get deleted"`

	Log logger.Options `json:"-"`

	Network string `long:"network" description:"Network to use (mainnet, testnet, regtest)"`

	Boltz *boltzOptions `group:"Boltz Options"`
	LND   *lnd.LND      `group:"LND Options"`
	Cln   *cln.Cln      `group:"Cln Options"`

	Node string `long:"node" description:"Lightning node to use (cln or lnd)"`

	Standalone bool `long:"standalone" description:"Run boltz-client without a lightning node"`

	Lightning lightning.LightningNode `json:"-"`

	RPC      *RpcOptions        `group:"RPC options"`
	Database *database.Database `group:"Database options"`

	MempoolApi       string `long:"mempool" description:"mempool.space API to use for fee estimations; set to empty string to disable"`
	MempoolLiquidApi string `long:"mempool-liquid" description:"mempool.space liquid API to use for fee estimations; set to empty string to disable"`

	ElectrumUrl       string `long:"electrum" description:"electrum rpc to use for fee estimations; set to empty string to disable"`
	ElectrumSSL       bool   `long:"electrum-ssl" description:"whether the electrum server uses ssl"`
	ElectrumLiquidUrl string `long:"electrum-liquid" description:"electrum rpc to use for fee estimations; set to empty string to disable"`
	ElectrumLiquidSSL bool   `long:"electrum-liquid-ssl" description:"whether the electrum server uses ssl"`

	Proxy string `long:"proxy" description:"Proxy URL to use for all Boltz API requests"`

	ReferralId string

	MaxZeroConfAmount        *uint64 `long:"max-zeroconf-amount" description:"Maximum amount of sats to accept 0-conf"`
	AutoConsolidateThreshold *uint64 `long:"auto-consolidate-threshold" description:"Number of UTXOs that trigger auto consolidation. Set to 0 to disable"`

	Help *helpOptions `group:"Help Options"`
}

func LoadConfig

func LoadConfig(dataDir string) (*Config, error)

func (*Config) Electrum

func (c *Config) Electrum() onchain.ElectrumConfig

type RpcOptions

type RpcOptions struct {
	Host string `long:"rpc.host" description:"gRPC host to which Boltz should listen"`
	Port int    `long:"rpc.port" short:"p" description:"gRPC port to which Boltz should listen"`

	RestHost     string `long:"rpc.rest.host" description:"REST host to which Boltz should listen"`
	RestPort     int    `long:"rpc.rest.port" description:"REST port to which Boltz should listen"`
	RestDisabled bool   `long:"rpc.rest.disable" description:"Disables the REST API proxy"`

	TlsCertPath string `long:"rpc.tlscert" description:"Path to the TLS certificate of boltz-client"`
	TlsKeyPath  string `long:"rpc.tlskey" description:"Path to the TLS private key of boltz-client"`
	NoTls       bool   `long:"rpc.no-tls" description:"Disables TLS"`

	NoMacaroons          bool   `long:"rpc.no-macaroons" description:"Disables Macaroon authentication"`
	AdminMacaroonPath    string `long:"rpc.adminmacaroonpath" description:"Path to the admin Macaroon"`
	ReadonlyMacaroonPath string `long:"rpc.readonlymacaroonpath" description:"Path to the readonly macaroon"`
}

Jump to

Keyboard shortcuts

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