Merge branch 'nbd-wtf:master' into master

This commit is contained in:
2024-03-05 12:51:26 +00:00
committed by GitHub
4 changed files with 1402 additions and 160 deletions

4
go.mod
View File

@@ -4,8 +4,8 @@ go 1.16
require ( require (
github.com/cockroachdb/pebble v0.0.0-20210812144839-61318a019370 github.com/cockroachdb/pebble v0.0.0-20210812144839-61318a019370
github.com/fiatjaf/go-lnurl v1.4.0 github.com/fiatjaf/go-lnurl v1.13.1
github.com/fiatjaf/makeinvoice v1.5.3 github.com/fiatjaf/makeinvoice v1.5.5
github.com/gorilla/mux v1.8.0 github.com/gorilla/mux v1.8.0
github.com/kelseyhightower/envconfig v1.4.0 github.com/kelseyhightower/envconfig v1.4.0
github.com/lib/pq v1.10.3 github.com/lib/pq v1.10.3

1551
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -63,7 +63,7 @@ func handleLNURL(w http.ResponseWriter, r *http.Request) {
maxSendable = 1000000000 maxSendable = 1000000000
} }
json.NewEncoder(w).Encode(lnurl.LNURLPayResponse1{ json.NewEncoder(w).Encode(lnurl.LNURLPayParams{
LNURLResponse: lnurl.LNURLResponse{Status: "OK"}, LNURLResponse: lnurl.LNURLResponse{Status: "OK"},
Callback: fmt.Sprintf("https://%s/.well-known/lnurlp/%s", domain, username), Callback: fmt.Sprintf("https://%s/.well-known/lnurlp/%s", domain, username),
MinSendable: minSendable, MinSendable: minSendable,
@@ -87,10 +87,10 @@ func handleLNURL(w http.ResponseWriter, r *http.Request) {
return return
} }
json.NewEncoder(w).Encode(lnurl.LNURLPayResponse2{ json.NewEncoder(w).Encode(lnurl.LNURLPayValues{
LNURLResponse: lnurl.LNURLResponse{Status: "OK"}, LNURLResponse: lnurl.LNURLResponse{Status: "OK"},
PR: bolt11, PR: bolt11,
Routes: make([][]lnurl.RouteInfo, 0), Routes: make([]interface{}, 0),
Disposable: lnurl.FALSE, Disposable: lnurl.FALSE,
SuccessAction: lnurl.Action("Payment received!", ""), SuccessAction: lnurl.Action("Payment received!", ""),
}) })

View File

@@ -38,6 +38,7 @@ func makeInvoice(
backend = makeinvoice.LNDParams{ backend = makeinvoice.LNDParams{
Host: params.Host, Host: params.Host,
Macaroon: params.Key, Macaroon: params.Key,
Private: true,
} }
case "lnbits": case "lnbits":
backend = makeinvoice.LNBitsParams{ backend = makeinvoice.LNBitsParams{