alby-hub/nostr/models/models.go
Roland 377a3169c6
feat: support multiple relays (#1802)
* feat: support multiple relays (WIP)

* fix: multiple NWC url construction for multiple relays

* fix: startup

* chore: update go-nostr to fix pool relay reconnect

* fix: split nip-47 queue info publish event for each relay url

* fix: add relayUrls to dispatched nwc success events

* fix: ensure newly created app info publishing is not blocked by sleep from failed publishes

* feat: multiple relays improvements

- update app deleted and updated consumers to handle multiple relays
- handle multiple relays in healthcheck
- display relay online status in about page
- renaming and improved comments

* chore: simplify error messages

* fix: unnecessary db error log when checking if app has notification permission

* fix: tests

* chore: remove old comment

* fix: app wallet subscription context usage
2025-11-06 18:01:09 +07:00

17 lines
333 B
Go

package models
import (
"context"
"github.com/nbd-wtf/go-nostr"
)
type SimplePool interface {
PublishMany(ctx context.Context, relayUrls []string, event nostr.Event) chan nostr.PublishResult
QuerySingle(
ctx context.Context,
urls []string,
filter nostr.Filter,
opts ...nostr.SubscriptionOption,
) *nostr.RelayEvent
}