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

NIP42 fixes and improvements #667

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

NIP42 fixes and improvements #667

wants to merge 8 commits into from

Conversation

yukibtc
Copy link
Member

@yukibtc yukibtc commented Dec 2, 2024

  • Automatically resend event after NIP-42 authentication
  • Support NIP42 auth for auto-closing subscriptions
  • Refactor fetch_events_with_callback

Before performing atomic operation, check if `RelayMessage` is AUTH.

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
…irectly

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
The number of events sent is almost always one at a time, so these methods are not really necessary and increase only the code complexity.

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
@yukibtc yukibtc force-pushed the nip42-event branch 2 times, most recently from a1cebb4 to e146f9a Compare December 2, 2024 11:30
* Remove `Client::spawn_notification_handler`
* Add `SharedState`
* Auth relays (NIP42) directly in the `InnerRelay`

Fixes #509

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
@yukibtc yukibtc changed the title sdk: automatically resend event after NIP-42 authentication NIP42 fixes and improvements Dec 2, 2024
* Add `RelayNotification::SubscriptionAutoClosed` variant

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
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.

1 participant