lnd

package
v0.0.0-...-b9ea7cb Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatChannelID

func FormatChannelID(channelId uint64) string

func GetNodeName

func GetNodeName(lnd LightningClient, remotePubkey string) string

Types

type LND

type LND struct {
	Host        string `long:"lnd.host" description:"gRPC host of the LND node"`
	Port        int    `long:"lnd.port" description:"gRPC port of the LND node"`
	Macaroon    string `long:"lnd.macaroon" description:"Path to a macaroon file of the LND node"`
	Certificate string `long:"lnd.certificate" description:"Path to a certificate file of the LND node"`
	// contains filtered or unexported fields
}

func (*LND) ClosedChannels

func (lnd *LND) ClosedChannels() (*lnrpc.ClosedChannelsResponse, error)

func (*LND) Connect

func (lnd *LND) Connect() error

func (*LND) ForceCloseChannel

func (lnd *LND) ForceCloseChannel(channelPoint string) (lnrpc.Lightning_CloseChannelClient, error)

func (*LND) GetChannelInfo

func (lnd *LND) GetChannelInfo(chanId uint64) (*lnrpc.ChannelEdge, error)

func (*LND) GetInfo

func (lnd *LND) GetInfo() (*lnrpc.GetInfoResponse, error)

func (*LND) GetNodeInfo

func (lnd *LND) GetNodeInfo(pubkey string) (*lnrpc.NodeInfo, error)

func (*LND) ListChannels

func (lnd *LND) ListChannels() (*lnrpc.ListChannelsResponse, error)

func (*LND) ListInactiveChannels

func (lnd *LND) ListInactiveChannels() (*lnrpc.ListChannelsResponse, error)

func (*LND) SubscribeChannelEvents

func (lnd *LND) SubscribeChannelEvents(events chan<- *lnrpc.ChannelEventUpdate, errChan chan<- error)

func (*LND) SubscribeHtlcEvents

func (lnd *LND) SubscribeHtlcEvents(events chan<- *routerrpc.HtlcEvent, errChan chan<- error)

func (*LND) SubscribeInvoices

func (lnd *LND) SubscribeInvoices(events chan<- *lnrpc.Invoice, errChan chan<- error)

type LightningClient

type LightningClient interface {
	GetInfo() (*lnrpc.GetInfoResponse, error)
	GetNodeInfo(pubkey string) (*lnrpc.NodeInfo, error)
	ListChannels() (*lnrpc.ListChannelsResponse, error)
	ClosedChannels() (*lnrpc.ClosedChannelsResponse, error)
	GetChannelInfo(chanId uint64) (*lnrpc.ChannelEdge, error)
	ListInactiveChannels() (*lnrpc.ListChannelsResponse, error)
	ForceCloseChannel(channelPoint string) (lnrpc.Lightning_CloseChannelClient, error)

	SubscribeInvoices(events chan<- *lnrpc.Invoice, errChan chan<- error)
	SubscribeHtlcEvents(events chan<- *routerrpc.HtlcEvent, errChan chan<- error)
	SubscribeChannelEvents(events chan<- *lnrpc.ChannelEventUpdate, errChan chan<- error)
}

Jump to

Keyboard shortcuts

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