clnurl

package
v0.0.0-...-450cf07 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	MakeInvoice(msats int64, description string) (string, error)
}

type ClnUrl

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

func Init

func Init(cfg *Config, backend Backend) *ClnUrl

func (*ClnUrl) GetLnurlp

func (cu *ClnUrl) GetLnurlp() (Lnurlp, error)

func (*ClnUrl) GetLnurlpBech32

func (cu *ClnUrl) GetLnurlpBech32() (string, error)

func (*ClnUrl) MakeInvoice

func (cu *ClnUrl) MakeInvoice(msats int64) (*InvoiceResponse, error)

type Config

type Config struct {
	Endpoint           string
	InvoiceDescription string
	MinSendable        int64
	MaxSendable        int64
}

type InvoiceResponse

type InvoiceResponse struct {
	Invoice string   `json:"pr"`
	Routes  []string `json:"routes"`
}

type LnurlTag

type LnurlTag string

type Lnurlp

type Lnurlp struct {
	Callback    string   `json:"callback"`
	MaxSendable int64    `json:"maxSendable"`
	MinSendable int64    `json:"minSendable"`
	Metadata    string   `json:"metadata"`
	Tag         LnurlTag `json:"tag"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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