-
Notifications
You must be signed in to change notification settings - Fork 243
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
Feature request - incoming transaction notifications #778
Comments
I thought the enhancement is a good idea and developed a proof-of-concept for it: https://github.com/cryptoadvance/specter-desktop/compare/master...relativisticelectron:notification?expand=1 It uses https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API |
@moneymanolis : Do you think this web-push notification would be useful for many users? Or are most users running bitcoin-qt locally, and have therefore the notifications from bitcoin-qt? If there is demand for this feature I can also check out https://bitcoindev.network/accessing-bitcoins-zeromq-interface/ . Something like js <--> python (currently via setInterval and GET), and python <--> Bitcoin-core (zqm, currently rpc) |
That's exactly what I had in mind @relativisticelectron - looks great! |
@relativisticelectron looks cool! As for your question about bitcoin-qt, I think nobody uses this, users have usually different variations of bitcoind instances running, either locally or on a remote node. Tagging @k9ert for architectural input. Sth. that directly caught my eye from the MDN documentation: Don't we have a user group that struggles with not being able to connect via HTTPS with their (remote) node? I think Umbrel, no? |
Don't we have a user group that struggles with not being able to connect via HTTPS with their (remote) node? I think Umbrel, no? Yes, I have no idea how to deal with this. It seems https is not coming to umbrel any time soon: getumbrel/umbrel-os#251 It works on localhost though... |
Wow, this really looks cool. Somehow overlooked this issue. I think the zeromq thing should be more in focus than the frontend-implementation as otherwise, you just create unnecessary core-calls which might cause unnecessary loads on small raspis. |
@k9ert : Thanks for the hint. A zmq client (proof of concept) turned out to be super easy in python. I added zmq such that rpc calls for notifications are ONLY done if the zmq has gotten a message: https://github.com/cryptoadvance/specter-desktop/compare/master...relativisticelectron:notification?expand=1
|
Wow, this really looks promising and also easier than i thought. When i get that right, you don't clear the buffer to the server-side data-structures directly but just create the notification on the client-side (via continuous pulling and maybe later via web-push) and the then the user is encouraged to make a normal request requests the data. We probably need to also put some logic in for the case: It should profit also via not asking core that often anymore but all of that can wait for now. Not sure how complex the web-push is but maybe we can separate the two things? I'd probably hesitate to merge web-push if it's not working on firefox but who cares for cheap and open small polls?! I just had a look in the internal node implementation. Indeed, we have a Can you try to add the necessary ZMQ-stuff into the commandline? Maybe create an extra |
Thanks for the feedback!
|
Javascript NotificationsIf the permission cannot be granted (because of https missing), and is not denied I can at least show javascript notifications: @szollo : Would these Javascript notifications (in the browser window) be helpful if the Notifications_API (docs) is not available? |
That looks great @relativisticelectron!
For the use case I had in mind I'd prefer it was native to the OS (ie. macOS or Windows notifications) or browser, as more often than not I don't view the active window, especially when travelling and using one screen. That being said, it's great to have the choice - so if I wanted to have that feature I'd have to make sure I run Specter as an HTTPS service with a trusted certificate? |
Sure, that is best. Without https this Notifications_API (docs) (remotely) is just not possible. I still have to investigate if the push service (google or mozilla) works without https, but it would involve a cloud server that forwards encrypted messages.
Bottom line
I that OK for everyone @k9ert , @moneymanolis @szollo ? Should I (slowly) develop this proof-of-concept into a PR? |
- Added libzmq to build process, to enable future use cases such as cryptoadvance#778 - added --without-gui to remove configure warning that gui will not be built.
Again missed your comment even though in the meantime i'm indeed using the github-task/notification system.
I think this looks very promising. Maybe we can somehow combine that with #1695 ? On the browser-side, I'd focus for now on the Javascript Notifications and defer the notification-API to the very end. So imho the order should be:
Thank you so much, you're doing a great work! |
* changed class name * Working requirements.in * Reordered lines to see changes better * Working minimal upgrades * Added hashes * - Upgraded python to 3.10 and bitcoin to v23.0 - Added libzmq to build process, to enable future use cases such as #778 - added --without-gui to remove configure warning that gui will not be built. * Added line-break * - Updated the embit version to 0.4.13 - pushed python-bitcoind image * - Build registry.gitlab.com/c8527/specter/cirrus-jammy:20220504 - updated docker references * - added cypress-base-ubuntu-jammy * - added cypress-python * - fixed unchanged registry path * Fixed wrong path * readme change * Fixed path * Changed github-changelog * changes registrar links * Fixed bitcoin version * Set reset bitcoin version to 22 * Set bitcoin version to 22.0 * Fixed black issue via psf/black#2964 (comment) * Revert for changelog * Upgraded pytest because otherwise I get the error pytest-dev/pytest#9195 * Added temporary fix for upgraded hwi version. Should be fixed in #1693 * more verbosity for page generation * doc about python 3.10 * docs: update TOC * yet another library necessary * black * Corrected tag * Fixed wrong python version introduced in the merge commit * Use same babel version across requirements and test_requirements * Created the reuqirements.txt with python 3.8 such, that that netlify can create the python docs in python 3.8, while everything elese works also with python 3.10 * testing https://peps.python.org/pep-0508/#environment-markers * CHanged just the txt * Added comments * electron docker build successful * rename image to cypress-python:v9.7.0 * doc * docker file rename * fix pyinstaller pip error by changing requirements.in * reference jammy electron dockerfile See electron-userland/electron-builder#6922 (comment) * updated all references to dockerimages * fix release-build * fix the image-version to something else than latest. pin all the stuff! * revert to old image to avoid glibc issues Co-authored-by: Kim Neunert <[email protected]> Co-authored-by: k9ert <[email protected]>
It would be amazing to have support for desktop notifications of incoming transactions, so that the user is informed when there's new incoming bitcoin without needing to refresh the browser, or indeed even look at the web interface - this is pretty much the only feature preventing me to fully switch from Electrum at this point.
Taking a cursory look this could be achieved by using ZMQ subscriptions, however as it's not plug-and-play it would probably have to be an advanced setting, as Bitcoin Core default config doesn't enable it (though it's compiled into the official binaries afaik).
The other challenges I can think of, off the top of my head:
Thanks for the great work, Specter is awesome.
The text was updated successfully, but these errors were encountered: