lnurl

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PayRequestTag  = "payRequest"
	Endpoint       = ".well-known/lnurlp"
	MinSendable    = 1000 // mSat
	MaxSendable    = 1_000_000_000
	CommentAllowed = 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Invoice added in v0.4.1

type Invoice struct {
	*telegram.Invoice
	Comment   string       `json:"comment"`
	User      *lnbits.User `json:"user"`
	CreatedAt time.Time    `json:"created_at"`
	Paid      bool         `json:"paid"`
	PaidAt    time.Time    `json:"paid_at"`
	From      string       `json:"from"`
}

func (Invoice) Key added in v0.4.1

func (lnurlInvoice Invoice) Key() string

type Lnurl added in v0.5.1

type Lnurl struct {
	WebhookServer string
	// contains filtered or unexported fields
}

func New added in v0.5.1

func New(bot *telegram.TipBot) Lnurl

func (Lnurl) DescriptionHash added in v0.5.1

func (w Lnurl) DescriptionHash(metadata lnurl.Metadata, payerData string) (string, error)

DescriptionHash is the SHA256 hash of the metadata

func (Lnurl) Handle added in v0.5.1

func (w Lnurl) Handle(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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