update nostr sdk

This commit is contained in:
2026-05-17 14:38:07 +07:00
parent 6d60726f27
commit d2a17e54c4
19 changed files with 630 additions and 612 deletions

View File

@@ -193,15 +193,19 @@ impl RelayAuth {
fn auth(&self, req: &Arc<AuthRequest>, cx: &App) -> Task<Result<(), Error>> {
let nostr = NostrRegistry::global(cx);
let client = nostr.read(cx).client();
let signer = nostr.read(cx).signer();
let req = req.clone();
// Get all pending events for the relay
let pending_events = self.get_pending_events(req.url(), cx);
cx.background_spawn(async move {
let signer = signer.get().await;
// Construct event
let builder = EventBuilder::auth(req.challenge(), req.url().clone());
let event = client.sign_event_builder(builder).await?;
let event = EventBuilder::auth(req.challenge(), req.url().clone())
.sign_async(&signer)
.await?;
// Get the event ID
let id = event.id;