AFK-AlignedFamKernel/afk_monorepo

Fetch events with subscription and check relay

开放

#371 创建于 2024年12月15日

 (34 条评论) (0 个反应) (0 位负责人)TypeScript (59 个派生)auto 404
frontendgood first issuehelp wantedmobile

仓库指标

星标
 (19 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Description

We when fetchEvent with ndk.fetchEvents, if a relay are not unreachable, it's throw an error and return an empty array. Create a robust subscription/fetch that's return datas of the reachable relay Nostr, check the nostr-dev-kit

Do this hooks in: packages/afk_nostr_sdk.

Try different more robust implementations that's not throw an error if one of the relay have an issue:

  • ndk.subscribe(), check if relay

  • a hooks that's check if relay is ok before fetch

  • Try to add this Relay with error in the relay.ts:

    'wss://relay.nostr.band', 'wss://purplepag.es', 'wss://relay.snort.social', 'wss://nos.lol'

  • Create a robust hooks with ndk.subscribe, that fetchEvent and not throw error if relay is unreachable

  • Create a store data with zutsand for Notes subscription, so we can render it like a webhook in the UI

Few relays to test, check if one is not working also try with RELAYS undefined or incorrect:

贡献者指南