lightning

package
v0.0.0-...-1e2dbb7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Wrap lightning network node implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Edge
	ChannelID uint64
	Local     btcutil.Amount
	Remote    btcutil.Amount
	Fee       int64
}

Detailed information of a channel between nodes.

type Edge

type Edge struct {
	Capacity btcutil.Amount
	Node1    string
	Node2    string
}

Edge between nodes in the lightning network.

type Graph

type Graph struct {
	Nodes []Node
	Edges []Edge
}

Nodes and edges of the lightning network.

type Info

type Info struct {
	Pubkey string
}

Info of a node.

type LndClient

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

Lightning client backed by LND node.

func New

func New(lnd lnder) LndClient

New client.

func (LndClient) DescribeGraph

func (lc LndClient) DescribeGraph(ctx context.Context) (*Graph, error)

func (LndClient) GetInfo

func (lc LndClient) GetInfo(ctx context.Context) (*Info, error)

func (LndClient) ListChannels

func (lc LndClient) ListChannels(ctx context.Context) ([]Channel, error)

func (LndClient) SetFees

func (lc LndClient) SetFees(ctx context.Context, channelID uint64, fee int) error

type Node

type Node struct {
	PubKey  string
	Alias   string
	Updated time.Time
}

Node in the lightning network.

Jump to

Keyboard shortcuts

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