NUT-17: proof_state command should be specified outside of the methods #284
Labels
No labels
breaking change
bug
documentation
enhancement
needs discussion
needs implementation
new nut
ready
wallet-only
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo-admin/nuts#284
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, the NUT-17 info config will look something like:
where
proof_stateis defined in the methods and would be repeated for each method.Instead, NUT-17 should be able to specify generic commands that are not method specific and only list them once.
I imaging something like this:
It maybe better to do this as a non breaking change. One way would be that if proof_state is specified in any of the payment method it is supported for all.
what if we start to add other "global commands"?
Another idea I had was keep proof_state in bolt11 for backwards compat and then also start defining these methods outside the methods (although not sure what this would look like so that the json schema can stay compatible)
I just stumbled upon the same thing. Personally I don't think we need the method field at all, as it's explicitly defined in the command name. So a mint would define a set of commands per unit.
Good point, we still need to consider units though. A mint may support sockets for bolt11 sat but not usd because of different backends
So something like this? I think CDK and nutshell actually emit WS events based on their internal lifecycle (citation needed, @thesimplekid), rather than a notification from the backend, so it should be backend agnostic. But of course that might not stay that way forever.