getAlby / bitcoin-connect

Connecting lightning wallets to your webapp has never been easier. Enable WebLN in all browsers with a single button
https://bitcoin-connect.com
MIT License
79 stars 26 forks source link

Support Tauri #198

Open tvolk131 opened 5 months ago

tvolk131 commented 5 months ago

I'm on the Resolvr team and we're building a desktop-based Nostr app using Tauri (which is similar to Electron but with a Rust backend). We'd love to integrate Bitcoin Connect, but Tauri uses WebView with a stripped down window object that's missing some key properties that Bitcoin Connect uses, such as window.open() and window.opener. I don't know what all would be involved in getting Bitcoin Connect working with Tauri, but if it's possible it would allow for extremely easy integration of Bitcoin & Lightning into desktop apps.

rolznz commented 5 months ago

Hi @tvolk131

Thanks for raising this!

I believe Bitcoin Connect uses these in an upstream dependency (Alby JS SDK) to launch the new NWC connection popup for Alby/Umbrel/etc.

Does the actual compilation fail due to this issue? or just when using NWC to connect with Alby?

If Tauri cannot launch windows, do you have any suggestions on how users would create a new app connection? users could always copy-paste the NWC url into the generic NWC connection option, but hopefully there is a better way.