peerswaplnd

package
v0.2.97 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOGLEVEL_INFO = LogLevel(iota + 1)
	LOGLEVEL_DEBUG
)

Variables

View Source
var (
	DefaultPeerswapHost   = "localhost:42069"
	DefaultRestHost       = "localhost:42070"
	DefaultLndHost        = "localhost:10009"
	DefaultTlsCertPath    = filepath.Join(defaultLndDir, "tls.cert")
	DefaultMacaroonPath   = filepath.Join(defaultLndDir, "data", "chain", "bitcoin", DefaultNetwork, "admin.macaroon")
	DefaultNetwork        = "signet"
	DefaultConfigFile     = filepath.Join(DefaultDatadir, "peerswap.conf")
	DefaultDatadir        = btcutil.AppDataDir("peerswap", false)
	DefaultLiquidwallet   = "swap"
	DefaultBitcoinEnabled = true
	DefaultLogLevel       = LOGLEVEL_DEBUG
	DefaultPolicyFile     = filepath.Join(DefaultDatadir, "policy.conf")
)

Functions

This section is empty.

Types

type LndConfig

type LndConfig struct {
	LndHost      string `long:"host" description:"host:port for lnd connection"`
	TlsCertPath  string `long:"tlscertpath" description:"path to the lnd TLS cert."`
	MacaroonPath string `long:"macaroonpath" description:"path to the macaroon (admin.macaroon or custom baked one)"`
}

type LogLevel

type LogLevel uint8

type OnchainConfig

type OnchainConfig struct {
	RpcUser           string `long:"rpcuser" description:"rpc user"`
	RpcPassword       string `long:"rpcpass" description:"password for rpc user"`
	RpcPasswordFile   string `long:"rpcpasswordfile" description:"file that cointains password for rpc user"`
	RpcCookieFilePath string `long:"rpccookiefilepath" description:"path to rpc cookie file"`
	RpcHost           string `long:"rpchost" description:"host to connect to"`
	RpcPort           uint   `long:"rpcport" description:"port to connect to"`
	RpcWallet         string `long:"rpcwallet" description:"wallet to use for swaps (elements only)"`
}

func (*OnchainConfig) Validate

func (o *OnchainConfig) Validate() error

type PeerSwapConfig

type PeerSwapConfig struct {
	Host       string   `long:"host" description:"host to listen on for grpc connections"`
	RestHost   string   `long:"resthost" description:"host to listen for rest connection"`
	ConfigFile string   `long:"configfile" description:"path to configfile"`
	PolicyFile string   `long:"policyfile" description:"path to policyfile"`
	DataDir    string   `long:"datadir" description:"peerswap datadir"`
	LogLevel   LogLevel `long:"loglevel" description:"loglevel (1=Info, 2=Debug)"`

	LndConfig      *LndConfig     `group:"Lnd Grpc config" namespace:"lnd"`
	ElementsConfig *OnchainConfig `group:"Elements Rpc Config" namespace:"elementsd"`

	LiquidEnabled  bool
	BitcoinEnabled bool `long:"bitcoinswaps" description:"enable bitcoin peerswaps"`
}

func DefaultConfig

func DefaultConfig() *PeerSwapConfig

func (*PeerSwapConfig) String

func (p *PeerSwapConfig) String() string

func (*PeerSwapConfig) Validate

func (p *PeerSwapConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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