lnurl

package
v0.0.0-...-86f25e9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterLnurlPayRouter

func RegisterLnurlPayRouter(router *mux.Router, rootURL *url.URL, store persist.Store, channel channel.WebhookChannel)

Types

type LnurlPayRouter

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

func (*LnurlPayRouter) HandleInvoice

func (l *LnurlPayRouter) HandleInvoice(w http.ResponseWriter, r *http.Request)

HandleInvoice handles the seconds request of lnurl pay protocol.

func (*LnurlPayRouter) HandleLnurlPay

func (l *LnurlPayRouter) HandleLnurlPay(w http.ResponseWriter, r *http.Request)

HandleLnurlPay handles the initial request of lnurl pay protocol.

func (*LnurlPayRouter) Register

func (s *LnurlPayRouter) Register(w http.ResponseWriter, r *http.Request)

Register adds a registration for a given pubkey and a unique identifier. The key enables the caller to replace existing hook without deleting it.

func (*LnurlPayRouter) Unregister

func (s *LnurlPayRouter) Unregister(w http.ResponseWriter, r *http.Request)

Unregister deletes a registration for a given pubkey and a unique identifier.

type LnurlPayStatus

type LnurlPayStatus struct {
	Status string `json:"status"`
	Reason string `json:"reason"`
}

func NewLnurlPayErrorResponse

func NewLnurlPayErrorResponse(reason string) LnurlPayStatus

func NewLnurlPayOkResponse

func NewLnurlPayOkResponse(reason string) LnurlPayStatus

type LnurlPayWebhookPayload

type LnurlPayWebhookPayload struct {
	Template string                 `json:"template"`
	Data     map[string]interface{} `json:"data"`
}

type RegisterLnurlPayRequest

type RegisterLnurlPayRequest struct {
	Time       int64  `json:"time"`
	WebhookUrl string `json:"webhook_url"`
	Signature  string `json:"signature"`
}

func (*RegisterLnurlPayRequest) Verify

func (w *RegisterLnurlPayRequest) Verify(pubkey string) error

type RegisterLnurlPayResponse

type RegisterLnurlPayResponse struct {
	Lnurl string `json:"lnurl"`
}

type UnregisterLnurlPayRequest

type UnregisterLnurlPayRequest struct {
	Time       int64  `json:"time"`
	WebhookUrl string `json:"webhook_url"`
	Signature  string `json:"signature"`
}

func (*UnregisterLnurlPayRequest) Verify

func (w *UnregisterLnurlPayRequest) Verify(pubkey string) error

Jump to

Keyboard shortcuts

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