ln

package
v0.0.0-...-b9b2ce8 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invoice

type Invoice struct {
	PaymentHash    string `json:"payment_hash"`
	PaymentRequest string `json:"payment_request"`
	Settled        bool   `json:"settled"`
}

thanks https://github.com/philippgille/ln-paywall/ Invoice is a Lightning Network invoice and contains the typical invoice string and the payment hash.

type LNDclient

type LNDclient struct {
	// contains filtered or unexported fields
}

func NewLNDclient

func NewLNDclient(lndOptions LNDoptions) (LNDclient, error)

func (LNDclient) AddInvoice

func (c LNDclient) AddInvoice(value int64, memo string, descriptionHash []byte, private bool) (Invoice, error)

AddInvoice generates an invoice with the given price and memo.

func (LNDclient) GetInvoice

func (c LNDclient) GetInvoice(paymentHashStr string) (Invoice, error)

GetInvoice takes an invoice ID and returns the invoice details including settlement details An error is returned if no corresponding invoice was found.

func (LNDclient) NewAddress

func (c LNDclient) NewAddress() (string, error)

NewAddress gets the next BTC onchain address.

type LNDoptions

type LNDoptions struct {
	Address      string
	CertFile     string
	CertHex      string
	MacaroonFile string
	MacaroonHex  string
	TorExePath   string // used when connecting through tor to LND
}

LNDoptions are the options for the connection to the lnd node.

Jump to

Keyboard shortcuts

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