Closed rolznz closed 5 days ago
@bumi @im-adithya reviewing this again today, I am not really happy with it and there is a big mess with a mixup in the meanings of request methods and permissions because we delayed the rename.
I think I need to fix all this as part of this PR
Original issue: https://github.com/getAlby/hub/issues/139
Fixes https://github.com/getAlby/hub/issues/139 Fixes https://github.com/getAlby/hub/issues/90
This PR allows individual LNClients to set what capabilities and notification types they support. On the frontend when creating a new app, you'll only be shown capabilities that your LNClient supports.
TODOs
review and merge https://github.com/getAlby/js-sdk/pull/227TERMS
Permission a scope for an app, including budgeting and expiry info. It is the name of a table Scope
pay_invoice
covers all payment methods.make_invoice
covers only making invoices.notifications
covers all notification types. Request Methodpay_invoice
,pay_keysend
Notification Typepayment_sent
orpayment_received
REFACTORING
In our DB we save a
scope
as arequest_method
which has turned into a giant mess throughout the codebase. This PR attempts to fix this by doing the minimal change to rename the column toscope
and any necessary variables in the code.This PR does not reduce the number of scopes as there were previous ideas about, and we will probably not do this in the future - only simplify the frontend.