Documentation ¶
Index ¶
- Constants
- func RegisterLnurlPayRouter(router *mux.Router, rootURL *url.URL, store persist.Store, ...)
- type LnurlPayRouter
- func (l *LnurlPayRouter) HandleInvoice(w http.ResponseWriter, r *http.Request)
- func (l *LnurlPayRouter) HandleLnurlPay(w http.ResponseWriter, r *http.Request)
- func (s *LnurlPayRouter) Register(w http.ResponseWriter, r *http.Request)
- func (s *LnurlPayRouter) Unregister(w http.ResponseWriter, r *http.Request)
- type LnurlPayStatus
- type LnurlPayWebhookPayload
- type RegisterLnurlPayRequest
- type RegisterLnurlPayResponse
- type UnregisterLnurlPayRequest
Constants ¶
View Source
const ( // https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1 // https://stackoverflow.com/a/201378 USERNAME_VALIDATION_REGEX = "" /* 168-byte string literal not displayed */ // https://www.rfc-editor.org/errata/eid1690 MAX_USERNAME_LENGTH = 64 )
Variables ¶
This section is empty.
Functions ¶
func RegisterLnurlPayRouter ¶
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 ¶
func NewLnurlPayErrorResponse ¶
func NewLnurlPayErrorResponse(reason string) LnurlPayStatus
func NewLnurlPayOkResponse ¶
func NewLnurlPayOkResponse(reason string) LnurlPayStatus
type LnurlPayWebhookPayload ¶
type RegisterLnurlPayRequest ¶
type RegisterLnurlPayRequest struct { Username *string `json:"username"` Time int64 `json:"time"` WebhookUrl string `json:"webhook_url"` Signature string `json:"signature"` }
func (*RegisterLnurlPayRequest) Verify ¶
func (w *RegisterLnurlPayRequest) Verify(pubkey string) error
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
Click to show internal directories.
Click to hide internal directories.