lnd

package
v2.3.5-0...-2fac4e2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 or the macaroon encoded in hex"`
	Certificate string `long:"lnd.certificate" description:"Path to a certificate file of the LND node"`
	DataDir     string `long:"lnd.datadir" description:"Path to the data directory of the LND node"`
	Insecure    bool   `long:"lnd.insecure" description:"Connect to lnd without TLS"`
	// contains filtered or unexported fields
}

func (*LND) AddHoldInvoice

func (lnd *LND) AddHoldInvoice(preimageHash []byte, value int64, expiry int64, memo string) (*invoicesrpc.AddHoldInvoiceResp, error)

func (*LND) CancelInvoice

func (lnd *LND) CancelInvoice(preimageHash []byte) (*invoicesrpc.CancelInvoiceResp, error)

func (*LND) CheckInvoicePaid

func (lnd *LND) CheckInvoicePaid(paymentHash []byte) (bool, error)

func (*LND) CheckPaymentFee

func (lnd *LND) CheckPaymentFee(paymentHash []byte) (uint64, error)

func (*LND) Connect

func (lnd *LND) Connect() error

func (*LND) ConnectPeer

func (lnd *LND) ConnectPeer(uri string) error

func (*LND) CreateInvoice

func (lnd *LND) CreateInvoice(value uint64, preimage []byte, expiry int64, memo string) (*lightning.AddInvoiceResponse, error)

func (*LND) Disconnect

func (lnd *LND) Disconnect() error

func (*LND) GetBalance

func (lnd *LND) GetBalance() (*onchain.Balance, error)

func (*LND) GetBlockHeight

func (lnd *LND) GetBlockHeight() (uint32, error)

func (*LND) GetChannelInfo

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

func (*LND) GetInfo

func (lnd *LND) GetInfo() (*lightning.LightningInfo, error)

func (*LND) GetTransactions

func (lnd *LND) GetTransactions(limit, offset uint64) ([]*onchain.WalletTransaction, error)

func (*LND) GetWalletInfo

func (lnd *LND) GetWalletInfo() onchain.WalletInfo

func (*LND) ListChannels

func (lnd *LND) ListChannels() ([]*lightning.LightningChannel, error)

func (*LND) LookupInvoice

func (lnd *LND) LookupInvoice(preimageHash []byte) (*lnrpc.Invoice, error)

func (*LND) Name

func (lnd *LND) Name() string

func (*LND) NewAddress

func (lnd *LND) NewAddress() (string, error)

func (*LND) PayInvoice

func (lnd *LND) PayInvoice(ctx context.Context, invoice string, feeLimit uint, timeoutSeconds uint, chanIds []lightning.ChanId) (*lightning.PayInvoiceResponse, error)

func (*LND) PaymentStatus

func (lnd *LND) PaymentStatus(paymentHash []byte) (*lightning.PaymentStatus, error)

func (*LND) PendingChannels

func (lnd *LND) PendingChannels() (*lnrpc.PendingChannelsResponse, error)

func (*LND) Ready

func (lnd *LND) Ready() bool

func (*LND) SendToAddress

func (lnd *LND) SendToAddress(address string, amount uint64, satPerVbyte float64, sendAll bool) (string, error)

func (*LND) SettleInvoice

func (lnd *LND) SettleInvoice(preimage []byte) (*invoicesrpc.SettleInvoiceResp, error)

func (*LND) SetupWallet

func (lnd *LND) SetupWallet(info onchain.WalletInfo)

func (*LND) SubscribeSingleInvoice

func (lnd *LND) SubscribeSingleInvoice(preimageHash []byte, channel chan *lnrpc.Invoice, errChannel 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)
}

Jump to

Keyboard shortcuts

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