lightning

package
v0.0.0-...-65deff2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 0 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 {
	Bolt11          string
	PayeePubkey     string
	PaymentHash     string
	Description     *string
	DescriptionHash *string
	AmountMsat      *int64
	Timestamp       int64
	Expiry          int64
	PaymentSecret   []byte
}

type LightningInterface

type LightningInterface interface {
	NodeInfo() (*NodeState, error)
	ReceivePayment(amountSats int64, description string) (*Invoice, <-chan Payment, error)
	SendPayment(bolt11 string, amountSats *int64) (<-chan Payment, error)
}

type NodeState

type NodeState struct {
	ID                string
	BlockHeight       uint32
	LocalBalanceMsat  uint64
	RemoteBalanceMsat uint64
	OnchainBalance    int64
}

type Payment

type Payment struct {
	ID          string
	AmountMsat  int64
	FeeMsat     int64
	Pending     bool
	Settled     bool
	Timestamp   int64
	Description *string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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