cln

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPaymentNotInitiated = errors.New("payment not initialized")
)

Functions

This section is empty.

Types

type Cln

type Cln struct {
	Host    string `long:"cln.host" description:"gRPC host of the CLN daemon"`
	Port    int    `long:"cln.port" description:"gRPC port of the CLN daemon"`
	DataDir string `long:"cln.datadir" description:"Path to the data directory of CLN"`

	RootCert   string `long:"cln.rootcert" description:"Path to the root cert of the CLN gRPC"`
	PrivateKey string `long:"cln.privatekey" description:"Path to the client key of the CLN gRPC"`
	CertChain  string `long:"cln.certchain" description:"Path to the client cert of the CLN gRPC"`
	ServerName string `long:"cln.servername" description:"Server name used in the certificate"`

	Client protos.NodeClient
	// contains filtered or unexported fields
}

func (*Cln) CheckInvoicePaid

func (c *Cln) CheckInvoicePaid(paymentHash []byte) (bool, error)

func (*Cln) Connect

func (c *Cln) Connect() error

func (*Cln) ConnectPeer

func (c *Cln) ConnectPeer(uri string) error

func (*Cln) CreateInvoice

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

func (*Cln) Disconnect

func (c *Cln) Disconnect() error

func (*Cln) GetBalance

func (c *Cln) GetBalance() (*onchain.Balance, error)

func (*Cln) GetBlockHeight

func (c *Cln) GetBlockHeight() (uint32, error)

func (*Cln) GetInfo

func (c *Cln) GetInfo() (*lightning.LightningInfo, error)

func (*Cln) GetTransactions

func (c *Cln) GetTransactions(limit, offset uint64) ([]*onchain.WalletTransaction, error)

func (*Cln) GetWalletInfo

func (c *Cln) GetWalletInfo() onchain.WalletInfo

func (*Cln) ListChannels

func (c *Cln) ListChannels() ([]*lightning.LightningChannel, error)

func (*Cln) Name

func (c *Cln) Name() string

func (*Cln) NewAddress

func (c *Cln) NewAddress() (string, error)

func (*Cln) NodeType

func (c *Cln) NodeType() lightning.LightningNodeType

func (*Cln) PayInvoice

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

func (*Cln) PaymentStatus

func (c *Cln) PaymentStatus(paymentHash []byte) (*lightning.PaymentStatus, error)

func (*Cln) Ready

func (c *Cln) Ready() bool

func (*Cln) SanityCheck

func (c *Cln) SanityCheck() (string, error)

func (*Cln) SendToAddress

func (c *Cln) SendToAddress(address string, amount uint64, satPerVbyte float64, sendAll bool) (string, error)

func (*Cln) SetupWallet

func (c *Cln) SetupWallet(info onchain.WalletInfo)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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