Add support for Lightning Zaps #190

Merged
raucao merged 25 commits from feature/170-nostr_zaps into master 2024-06-03 16:44:49 +00:00
Owner

Implements NIP-57, so that Lightning accounts can receive sats from people via zaps on Nostr.

refs #170

Implements [NIP-57](https://github.com/nostr-protocol/nips/blob/master/57.md), so that Lightning accounts can receive sats from people via zaps on Nostr. refs #170
raucao added the
integration
nostr
kredits-2
feature
labels 2024-05-10 11:04:40 +00:00
raucao added 17 commits 2024-05-10 11:04:41 +00:00
raucao requested review from bumi 2024-05-10 11:04:46 +00:00
raucao added 1 commit 2024-05-10 11:20:16 +00:00
Improve nostr settings, fix allowsNostr property name
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2d1ff29eca
raucao added 1 commit 2024-05-10 11:57:50 +00:00
Limit number of relays to publish zap receipts to
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
48041630ca
raucao added 1 commit 2024-05-10 12:01:30 +00:00
Merge branch 'master' into feature/170-nostr_zaps
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
f388bd0237
raucao added 1 commit 2024-05-19 14:48:30 +00:00
Allow CORS requests for lnurlp invoice
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
bc34e9c5e0
raucao added 1 commit 2024-05-19 14:55:04 +00:00
Fix argument name
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
fa5dc8ca46
raucao added 1 commit 2024-05-19 15:08:01 +00:00
Remove default nil values
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
08e783d185
raucao added 1 commit 2024-05-21 16:09:11 +00:00
Improve NostrManager::PublishEvent
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
eeb9b0a331
* Use URI hostname as relay name
* Log relay name/URL for every websocket event
* Fix variable assignment for nostr event
* Fix Sidekiq job finishing too early, by creating a new thread waiting
  for it to be closed from a callback
raucao added 1 commit 2024-05-21 16:29:17 +00:00
Log correct publish status
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 4s
231dfc8404
Author
Owner

@bumi I deployed this branch to production and then fixed a bunch of bugs and problems that made it fail. I think it's finally working now.

Unfortunately, I haven't found a single nostr client that works reliably for me, and actually retrieves all messages from a user's relays. So testing it live is still a bit of a hit-and-miss result, but we do see the logs for publishing status per relay now.

@bumi I deployed this branch to production and then fixed a bunch of bugs and problems that made it fail. I think it's finally working now. Unfortunately, I haven't found a single nostr client that works reliably for me, and actually retrieves all messages from a user's relays. So testing it live is still a bit of a hit-and-miss result, but we do see the logs for publishing status per relay now.
Owner

are the CORS changes already deployed?

are the CORS changes already deployed?
Author
Owner

Yes, the CORS changes are deployed. The latest version of this branch should be the one in production.

I just tried to zap a note, and noticed that Alby is broken for my Kosmos accounts, even though the akkounts Lightning dashboard still works (same API), and there's nothing visibly wrong with any part of the setup on our end. See my question here: https://kosmos.social/@raucao/112529763147036364

Maybe whatever the reason was for your question is also connected to that issue?

Yes, the CORS changes are deployed. The latest version of this branch should be the one in production. I just tried to zap a note, and noticed that Alby is broken for my Kosmos accounts, even though the akkounts Lightning dashboard still works (same API), and there's nothing visibly wrong with any part of the setup on our end. See my question here: https://kosmos.social/@raucao/112529763147036364 Maybe whatever the reason was for your question is also connected to that issue?
Author
Owner

I solved the extension issue by restarting the whole browser: https://kosmos.social/@raucao/112529804852769117

So now there's no issue I can see anywhere in regards to our Lightning or LNURL. Also just zapped my account from 2 different clients to make sure it works.

I solved the extension issue by restarting the whole browser: https://kosmos.social/@raucao/112529804852769117 So now there's no issue I can see anywhere in regards to our Lightning or LNURL. Also just zapped my account from 2 different clients to make sure it works.
Owner

ok, cool. on kosmos.social I still get some CORS issue.
but it looks good to me. got also some nice email notifications.

ok, cool. on kosmos.social I still get some CORS issue. but it looks good to me. got also some nice email notifications.
Author
Owner

Ah, now I see! Maybe the kosmos.social Webfinger entry doesn't have CORS headers, but the LNURL endpoints would be on accounts.kosmos.org anyway. I'll have a look at that. We could also make it possible to use the .social address as a NIP-05 address, which currently probably only works for kosmos.org, too.

got also some nice email notifications

Yeah, I have a PR coming up with more settings for Lightning notifications. It adds 3 more settings for it, so you can turn them off for zaps specifically (if you get notifications in nostr clients anyway), and also ignore txs under a certain amount threshold as well as ones without a message/comment.

Ah, now I see! Maybe the kosmos.social Webfinger entry doesn't have CORS headers, but the LNURL endpoints would be on accounts.kosmos.org anyway. I'll have a look at that. We could also make it possible to use the .social address as a NIP-05 address, which currently probably only works for kosmos.org, too. > got also some nice email notifications Yeah, I have a PR coming up with more settings for Lightning notifications. It adds 3 more settings for it, so you can turn them off for zaps specifically (if you get notifications in nostr clients anyway), and also ignore txs under a certain amount threshold as well as ones without a message/comment.
Author
Owner

@bumi The lnurl endpoints for .social should also carry Access-Control-Allow-Origin: * now.

@bumi The lnurl endpoints for .social should also carry `Access-Control-Allow-Origin: *` now.
raucao merged commit d6d09b57b8 into master 2024-06-03 16:44:49 +00:00
raucao deleted branch feature/170-nostr_zaps 2024-06-03 16:44:49 +00:00
Sign in to join this conversation.
No description provided.