backends

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseLogger

func UseLogger(logger logging.Logger)

Types

type Backend

type Backend interface {
	Connect() error

	// Amount in satoshi and expiry in seconds
	GetInvoice(description string, amount int64, expiry int64) (invoice string, paymentHash []byte, err error)

	InvoiceSettled(paymentHash []byte) (settled bool, err error)

	SubscribeInvoices(publish PublishInvoiceSettled, rescan RescanPendingInvoices) error

	KeepAliveRequest() error
}

type LND

type LND struct {
	GRPCHost     string `long:"grpchost" Description:"Host of the gRPC interface of LND"`
	CertFile     string `long:"certfile" Description:"TLS certificate for the LND gRPC and REST services"`
	MacaroonFile string `long:"macaroonfile" Description:"Macaroon file for authentication. Set to an empty string for no macaroon"`
	// contains filtered or unexported fields
}

func (*LND) Connect

func (lnd *LND) Connect() error

func (*LND) GetInvoice

func (lnd *LND) GetInvoice(message string, amount int64, expiry int64) (invoice string, paymentHash []byte, err error)

func (*LND) InvoiceSettled

func (lnd *LND) InvoiceSettled(paymentHash []byte) (settled bool, err error)

func (*LND) KeepAliveRequest

func (lnd *LND) KeepAliveRequest() error

func (*LND) SubscribeInvoices

func (lnd *LND) SubscribeInvoices(publish PublishInvoiceSettled, rescan RescanPendingInvoices) error

type PublishInvoiceSettled

type PublishInvoiceSettled func(invoice string)

For callbacks when an invoice gets settled

type RescanPendingInvoices

type RescanPendingInvoices func()

For callbacks when reconnecting

Jump to

Keyboard shortcuts

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