-
Notifications
You must be signed in to change notification settings - Fork 65
abstract NUT-17 subscription kinds #280
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
base: main
Are you sure you want to change the base?
Conversation
|
we can add bolt12 since #259 is now merged |
8a23d12 to
6345a5c
Compare
done |
thesimplekid
left a comment
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.
Once open question I had on nut17 and don't think this address is how to handle the info endpoint. Currently the proof state is inside a specific method but a proof isn't tied to a method. Does proof state need to be included in each method?
"nuts": {
"17": {
"supported": [
{
"method": "bolt11",
"unit": "sat",
"commands": [
"bolt11_mint_quote",
"bolt11_melt_quote",
"proof_state"
]
},
]
}
}
I was thinking that too when doing this. It should be specified outside the methods. Should we do that in this PR? Will require implementations to change so we should probably keep it in just the bolt11 method for compatibility. |
thesimplekid
left a comment
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.
Lets do that separate since this requires no impl changes.
closes #279
I made NUT-17 general so that it can easily be extended with new subscription kinds. For now I just defined the
proof_statekind in NUT-07 andbolt11_mint_quote/bolt11_melt_quotein NUT-23. We will want the ability to add new kinds for things like new payment methods (ie. bolt12).For the examples I decided to just leave the concrete examples showing bolt11 of proof states instead of trying to make a general example. The other thing I considered was removing examples from NUT-17 and include the specific examples in the corresponding NUTs, but that makes those NUTs unnecessarily long.