Skip to content
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: add Nostr Wallet Connect as a backend #565

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

gudnuf
Copy link
Contributor

@gudnuf gudnuf commented Jun 30, 2024

This PR allows you to back your mint with any lightning wallet that supports Nostr Wallet Connect.

Adds:

  • mint_nwc_url to settings
  • NWCClient to nostr module
  • nwc as lightning backend
  • NwcRequestEvent and event kinds to event.py
  • check if type is NWCRequestEvent in sign_event

@gudnuf gudnuf force-pushed the mint/nwc_lightning_backend branch 2 times, most recently from df4c69a to 289f377 Compare July 1, 2024 16:56
@gudnuf gudnuf force-pushed the mint/nwc_lightning_backend branch from 289f377 to 1535901 Compare July 1, 2024 16:58
@gudnuf
Copy link
Contributor Author

gudnuf commented Jul 6, 2024

Just realized there should be a get_info request to make sure the connected NWC supports all methods we need. Will add soon

@gudnuf gudnuf force-pushed the mint/nwc_lightning_backend branch from ef29d61 to 17ed5c9 Compare July 8, 2024 17:54
@callebtc
Copy link
Collaborator

Really nice work, especially working it into the existing Python nostr client. Thank you.

Copy link

codecov bot commented Jul 20, 2024

Codecov Report

Attention: Patch coverage is 41.69611% with 165 lines in your changes missing coverage. Please review.

Project coverage is 65.30%. Comparing base (8675745) to head (d95eb4f).

Files Patch % Lines
cashu/nostr/nwc.py 46.73% 98 Missing ⚠️
cashu/lightning/nwc.py 26.31% 56 Missing ⚠️
cashu/nostr/event.py 45.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #565      +/-   ##
==========================================
- Coverage   69.02%   65.30%   -3.72%     
==========================================
  Files          92       94       +2     
  Lines        8674     8956     +282     
==========================================
- Hits         5987     5849     -138     
- Misses       2687     3107     +420     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants