-
Notifications
You must be signed in to change notification settings - Fork 57
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
Mint Websockets (NUT-17) #394
Conversation
88cdf9e
to
672a4fd
Compare
Hey, haven't done a very through review but it looks like a good approach so far, thank you for you work. If there is a specific part you would like me to look at let me know. |
@thesimplekid I have no idea where the events are being generated, and any other feedback is more than welcome. |
7163235
to
74b9ee4
Compare
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.
Nice work, think were just missing sending updates in a few places for the proofs some I was able to note in line. This one i couldn't note inline so will note it here, when we swap we need to send an update for the state of the proofs that are spent as part of the swap. Think line 171 of mint/swap.rs
e30f732
to
101b1c5
Compare
There are no listeners this early in the program stage[1] [1] cashubtc#394 (comment)
78a8b5d
to
3395cd1
Compare
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.
In the verify_melt
fn we need to broadcast the proof state and the quote state when they are changed to pending.
I think you have all the other state changes. What else do you feel is missing from this PR before you would like to see it merged?
Does it worth to make it opt-in or possible to disable subscriptions?
Do you mean like as a feature flag? I don't think it is and we should just have the mint always support it.
I'll make it happen.
I want to add an end-to-end test and an external web socket client with rust or typescript. If it is in Rust, it should connect to the WebSocket through TCP, even if using the same process. That's the last missing bit to have peace of mind that it works as expected. |
615bc37
to
72daa0a
Compare
…tion Added a subscription (or pubsub) manager to let subscriber be listening for events. This PR also implements a Web Socket endpoint to let external clients to subscribe to events
72daa0a
to
7d05beb
Compare
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.
Overall really nice work. Just a few small things i noticed when testing vs Nutshell
Co-authored-by: thesimplekid <tsk@thesimplekid.com>
* Added more logging * Added helper to broadcast proof status * Moved Into and From implementations to their own place
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.
Great work thanks for this.
Very early stage nonfunctional prototype to add support for any subscriptions, aiming for NUT-17 support, #203 .
TODO: