types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvoiceNotFound is returned when a targeted invoice can't be
	// found.
	ErrInvoiceNotFound = fmt.Errorf("unable to locate invoice")

	ErrHtlcNotFound = fmt.Errorf("unable to locate htlc")
)

Functions

This section is empty.

Types

type CircuitKey

type CircuitKey struct {
	// ChanID is the short chanid indicating the HTLC's origin.
	//
	// NOTE: It is fine for this value to be blank, as this indicates a
	// locally-sourced payment.
	ChanID uint64

	// HtlcID is the unique htlc index predominately assigned by links,
	// though can also be assigned by switch in the case of locally-sourced
	// payments.
	HtlcID uint64
}

CircuitKey is used by a channel to uniquely identify the HTLCs it receives from the switch, and is used to purge our in-memory state of HTLCs that have already been processed by a link. Two list of CircuitKeys are included in each CommitDiff to allow a link to determine which in-memory htlcs directed the opening and closing of circuits in the switch's circuit map.

func (CircuitKey) String

func (k CircuitKey) String() string

String returns a string representation of the CircuitKey.

type HtlcKey

type HtlcKey struct {
	Node   common.PubKey
	ChanID uint64
	HtlcID uint64
}

func (HtlcKey) String

func (k HtlcKey) String() string

String returns a string representation of the HtlcKey.

type InvoiceCreationData

type InvoiceCreationData struct {
	// PaymentPreimage is the preimage which is to be revealed in the
	// occasion that an HTLC paying to the hash of this preimage is
	// extended. Set to nil if the preimage isn't known yet.
	PaymentPreimage lntypes.Preimage

	// Value is the expected amount of milli-satoshis to be paid to an HTLC
	// which can be satisfied by the above preimage.
	Value lnwire.MilliSatoshi

	// PaymentAddr is a randomly generated value include in the MPP record
	// by the sender to prevent probing of the receiver.
	PaymentAddr [32]byte
}

Jump to

Keyboard shortcuts

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