sdk taking shape.

This commit is contained in:
fiatjaf
2023-10-30 19:23:58 -03:00
parent 234d825e43
commit c506cc0f8b
8 changed files with 133 additions and 18 deletions

View File

@ -13,18 +13,13 @@ type Relay struct {
Outbox bool
}
func FetchRelaysForPubkey(ctx context.Context, pool *nostr.SimplePool, pubkey string, extraRelays ...string) []Relay {
func FetchOutboxRelaysForPubkey(ctx context.Context, pool *nostr.SimplePool, pubkey string, n int) {
}
func FetchRelaysForPubkey(ctx context.Context, pool *nostr.SimplePool, pubkey string, relays ...string) []Relay {
ctx, cancel := context.WithCancel(ctx)
defer cancel()
relays := append(extraRelays,
"wss://nostr-pub.wellorder.net",
"wss://relay.damus.io",
"wss://nos.lol",
"wss://nostr.mom",
"wss://relay.nostr.bg",
)
ch := pool.SubManyEose(ctx, relays, nostr.Filters{
{
Kinds: []int{