- use the following platforms:
- language: type script
- build: vite
- nostr: rx-nostr https://github.com/penpenpng/rx-nostr
- UI: React
- UI translation: react-i18next https://github.com/i18next/react-i18next
- read app user's pubkey by browser extension of NIP-07
- https://github.com/nostr-protocol/nips/blob/master/07.md
- fetch relay list:
- from bootstrap relays
- by rx-nostr backword strategy
- by the filter kinds:[10002,3], limit:2, authors[pubkey you need]
- with 5sec eose timeout
- retry with adding the new rules:
- with 30 sec eose timeout
- go to the next step after getting the first kind:10002 event
- basically use only kind:10002 relay list.
- if there is no kind:10002 event, use kind:3 relay list for fall back.
- if there is no relay list event, use fallback relays.
- use a relay list with the newest created_at timestamp
- remove relays only with "read" tag
- after reading NIP-07:
- read kind:0, limit:1, authors:[pubkey]
- use the event with the newest created_at
- read them:
- profile icon:content.picture
- name:content.name
- display_name:content.display_name
- fetch follow list:
- from relay list + bootstrap relays
- by rx-nostr backword strategy
- by the filter kinds:[3], limit:1, authors:[pubkey]
- with 5 sec eose timeout
- retry with adding the new rules:
- with 30 sec eose timeout
- go to the next step after getting the first kind:10002 event
- use a follow list with the newest created_at timestamp
- subscribe kind:1 notes:
- from relay list
- by rx-nostr backword strategy
- by the filter kinds:[1], authors:follow list pubkeys, limit:0
- if there are over 1000 followings, use multiple subscriptions with 1000 authors each
- fetch kind:0 profiles:
- from relay list
- by rx-nostr backword strategy
- by the filter kinds:[0], authors:[200 following pubkeys each], limit:200
- wss://directory.yabu.me
- wss://purplepag.es
- wss://relay.nostr.band
- wss://indexer.coracle.social
- if browser locale is "ja":
- wss://yabu.me
- wss://nostr.compile-error.net
- wss://r.kojira.io
- wss://relay-jp.nostr.wirednet.jp
- wss://nrelay-jp.c-stellar.net
- wss://nostream.ocha.one
- wss://snowflare.cc
- else:
- wss://relay.damus.io
- wss://nostr-pub.wellorder.net
- wss://offchain.pub
- wss://relay.snort.social
- the aboves are the part of main project.
- ask what is the main project to me.