-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New plugin: lnurlp #307
New plugin: lnurlp #307
Conversation
For context: we tested this code here https://twitter.com/orionwl/status/1452217218876465156 This currently needs the top commit from the following branch, which adds a See also discussion in ElementsProject/lightning#4705. |
Add an optional description_hash parameter to the invoice command. This can be specified instead of the description, to create an invoice that only commits to a 256 bit hash (generally SHA256) of the description. This is used in the lnurlp protocol. See lightningd/plugins#307 for example usage. Closes ElementsProject#4705. Changelog-Added: JSON-RPC: `invoice` now accepts `description_hash` parameter.
Would it be possible to make rate-limiting optional? This would allow implementing rate-limiting in the hosting stack (e.g., in the reverse proxy server).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe merge lnurlp-ratelimit-rate
and lnurlp-ratelimit-switch
into option lnurlp-rate-limit
which accepts extra value disable
.
lnurlp/README.md
Outdated
|
||
Default is "2 per minute". | ||
|
||
To disable the use of the rate limiter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To disable the use of the rate limiter: | |
To disable rate limiting: |
lnurlp/lnurlp.py
Outdated
@@ -116,7 +116,7 @@ def init(options, configuration, plugin): | |||
plugin.add_option( | |||
"lnurlp-ratelimit", | |||
"2 per minute", | |||
"Change flask's ratelimiter, default is 2 per minute" | |||
"Change flask's rate limiter, default is 2 per minute, `disable` to disable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Change flask's rate limiter, default is 2 per minute, `disable` to disable" | |
"Set flask's rate limiter, default is `2 per minute`, `disable` to disable" |
Fixup. |
5773a7a
to
a5c6127
Compare
@Mergifyio rebase |
✅ Branch has been successfully rebased |
@Mergifyio rebase |
A simple http server to retrieve pay requests (bolt11s at the moment) to be used in lnurls Based on the request-invoice plugin: it made sense to create a new plugin because having only one endpoint makes things more simple and secure This one needs description_hash, while the request-invoice endpoint doesn't which would complicate things Co-authored-by: W. J. van der Laan <laanwj@protonmail.com> Co-authored-by: Erik Arvstedt <erik.arvstedt@gmail.com>
✅ Branch has been successfully rebased |
As ElementsProject/lightning#5121 was merged instead of ElementsProject/lightning#4892, this would need to be changed to use the |
Needs rebase |
I propose we add this plugin instead https://github.com/elsirion/clnurl |
This is going nowhere :-) .. perhaps elsirion's plugin will |
@Kvaciral if you want to add some tests, the CI will check everything from now on. But I'll start moving forward on clnurl since you recommended it :) |
A simple http server to retrieve pay requests (bolt11s at the moment) to be used in lnurls
Based on the request-invoice plugin: it made sense to create a new plugin because having only one endpoint makes things more simple and secure
This one needs description_hash, while the request-invoice endpoint doesn't which would complicate things
Co-authored-by: W. J. van der Laan