lnurl

package
v0.0.0-...-56940a3 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lnurl

type Lnurl struct {
	Lud16 string
	Lnurl string
}

func NewLnurl

func NewLnurl(lud16 string) (*Lnurl, error)

func (*Lnurl) GetInvoice

func (l *Lnurl) GetInvoice(amount_sats int64) (string, error)

type LnurlCallbackResponse

type LnurlCallbackResponse struct {
	Status        string `json:"status"`
	SuccessAction struct {
		Tag     string `json:"tag"`
		Message string `json:"message"`
	} `json:"successAction"`
	Verify string `json:"verify"`
	Routes []struct {
		Pubkey string `json:"pubkey"`
		Alias  string `json:"alias"`
	} `json:"routes"`
	Pr     string `json:"pr"`
	Reason string `json:"reason"`
}

{"status":"OK","successAction":{"tag":"message","message":"Thanks, sats received!"},"verify":"https://getalby.com/lnurlp/moti/verify/v5bzeXMWXzFRPKoSJTqYe6ZX","routes":[],"pr":"lnbc10n1pjlqd2spp5ejf08qxta88prqvm9q7j4e6g2jzt0ux00spqnh39t7wwdp0z69cqhp5cezvxddw0lgesz3xpr67q7v8tux7uv5h5vdwukrlgg3m22ce6dcscqzzsxqyz5vqsp5ujym2lynsdhda5znuk8h0wm7kky930ty9pxl6aktfffgue4x5upq9qyyssqgtk0wr34n2jnmnv4d3lqlmdvrqz3ekme5s2r3vhr5kqh4rxj6rl3vg4t3ppygvl9ymg28f5pg9etv6zysuvy3jcagetcvfryjhv04jspul97hy"}

type LnurlResponse

type LnurlResponse struct {
	Status      string `json:"status"`
	Tag         string `json:"tag"`
	Comment     int    `json:"commentAllowed"`
	Callback    string `json:"callback"`
	Metadata    string `json:"metadata"`
	MinSendable int64  `json:"minSendable"`
	MaxSendable int64  `json:"maxSendable"`
	PayerData   struct {
		Name struct {
			Mandatory bool `json:"mandatory"`
		} `json:"name"`
		Email struct {
			Mandatory bool `json:"mandatory"`
		} `json:"email"`
		Pubkey struct {
			Mandatory bool `json:"mandatory"`
		} `json:"pubkey"`
	} `json:"payerData"`
	NostrPubkey string `json:"nostrPubkey"`
	AllowsNostr bool   `json:"allowsNostr"`
}

{"status":"OK","tag":"payRequest","commentAllowed":255,"callback":"https://getalby.com/lnurlp/moti/callback","metadata":"[[\"text/identifier\",\"moti@getalby.com\"],[\"text/plain\",\"Sats for moti\"]]","minSendable":1000,"maxSendable":500000000,"payerData":{"name":{"mandatory":false},"email":{"mandatory":false},"pubkey":{"mandatory":false}},"nostrPubkey":"79f00d3f5a19ec806189fcab03c1be4ff81d18ee4f653c88fac41fe03570f432","allowsNostr":true}%

Jump to

Keyboard shortcuts

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