mirror of
https://github.com/bumi/lntip
synced 2025-06-16 09:45:35 +00:00
Merge pull request #23 from bumi/feature/nicer-lnurlp-urls
Nicer LNURLp URLs
This commit is contained in:
commit
0fd121d130
6
lnme.go
6
lnme.go
@ -144,7 +144,7 @@ func main() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if !cfg.Bool("disable-ln-address") {
|
if !cfg.Bool("disable-ln-address") {
|
||||||
e.GET("/.well-known/lnurlp/:name", func(c echo.Context) error {
|
lnurlHandler := func(c echo.Context) error {
|
||||||
name := c.Param("name")
|
name := c.Param("name")
|
||||||
lightningAddress := name + "@" + c.Request().Host
|
lightningAddress := name + "@" + c.Request().Host
|
||||||
lnurlMetadata := "[[\"text/identifier\", \"" + lightningAddress + "\"], [\"text/plain\", \"Sats for " + lightningAddress + "\"]]"
|
lnurlMetadata := "[[\"text/identifier\", \"" + lightningAddress + "\"], [\"text/plain\", \"Sats for " + lightningAddress + "\"]]"
|
||||||
@ -183,7 +183,9 @@ func main() {
|
|||||||
}
|
}
|
||||||
return c.JSON(http.StatusOK, lnurlPayResponse2)
|
return c.JSON(http.StatusOK, lnurlPayResponse2)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
e.GET("/.well-known/lnurlp/:name", lnurlHandler)
|
||||||
|
e.GET("/lnurlp/:name", lnurlHandler)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debug test endpoint
|
// Debug test endpoint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user