offers

package
v0.0.0-...-a596a23 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Subsystem = "B12-OFR"

Subsystem defines the logging code for this subsystem.

Variables

View Source
var (
	// ErrIncorrectSplit is returned when an offer string contains "+"
	// joins that are incorrectly placed - either consecutive, or starting/
	// ending the offers string
	ErrIncorrectSplit = errors.New("consecutive, prefix or suffix + invalid")

	// ErrNotInCharset is returned when a character in an offer string is
	// not part of our charset.
	ErrNotInCharset = errors.New("invalid character, not in charset")
)
View Source
var (
	// ErrInvalidOfferStr is returned when we fail to decode a bech32
	// encoded offer string.
	ErrInvalidOfferStr = errors.New("invalid offer string")

	// ErrBadHRP is returned when an offer string has the wrong bech32
	// human readable prefix.
	ErrBadHRP = fmt.Errorf("incorrect bech32 hrp, should be: %v", offerHRP)
)

Functions

func DecodeOfferStr

func DecodeOfferStr(offerStr string) (*lnwire.Offer, error)

DecodeOfferStr decodes a bech32 encoded offer string, returning our offer type with the information contained in the offer.

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

This section is empty.

Jump to

Keyboard shortcuts

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