payments

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: Unlicense Imports: 3 Imported by: 0

Documentation

Overview

Package payments provides an abstraction above the implementation for handling Lightning Network payments and storing pending payments awaiting session keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PayChan added in v0.1.16

type PayChan chan *Payment

func (PayChan) Receive added in v0.1.16

func (pc PayChan) Receive() <-chan *Payment

Receive waits on receiving a Payment on a PayChan.

func (PayChan) Send added in v0.1.16

func (pc PayChan) Send(amount lnwire.MilliSatoshi,
	id nonce.ID, preimage sha256.Hash) (confirmChan chan bool)

Send a payment on the PayChan.

type Payment

type Payment struct {
	ID          nonce.ID
	Preimage    sha256.Hash
	Amount      lnwire.MilliSatoshi
	ConfirmChan chan bool
}

type PendingPayments

type PendingPayments []*Payment

func (PendingPayments) Add

func (p PendingPayments) Add(np *Payment) (pp PendingPayments)

func (PendingPayments) Delete

func (p PendingPayments) Delete(preimage sha256.Hash) (pp PendingPayments)

func (PendingPayments) Find

func (p PendingPayments) Find(id nonce.ID) (pp *Payment)

func (PendingPayments) FindPreimage

func (p PendingPayments) FindPreimage(pi sha256.Hash) (pp *Payment)

Jump to

Keyboard shortcuts

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