mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
* 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
37 lines
872 B
Go
37 lines
872 B
Go
package service
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
|
|
"github.com/getAlby/hub/alby"
|
|
"github.com/getAlby/hub/config"
|
|
"github.com/getAlby/hub/events"
|
|
"github.com/getAlby/hub/lnclient"
|
|
"github.com/getAlby/hub/service/keys"
|
|
"github.com/getAlby/hub/swaps"
|
|
"github.com/getAlby/hub/transactions"
|
|
)
|
|
|
|
type RelayStatus struct {
|
|
Url string
|
|
Online bool
|
|
}
|
|
|
|
type Service interface {
|
|
StartApp(encryptionKey string) error
|
|
StopApp()
|
|
Shutdown()
|
|
|
|
// TODO: remove getters (currently used by http / wails services)
|
|
GetAlbySvc() alby.AlbyService
|
|
GetAlbyOAuthSvc() alby.AlbyOAuthService
|
|
GetEventPublisher() events.EventPublisher
|
|
GetLNClient() lnclient.LNClient
|
|
GetTransactionsService() transactions.TransactionsService
|
|
GetSwapsService() swaps.SwapsService
|
|
GetDB() *gorm.DB
|
|
GetConfig() config.Config
|
|
GetKeys() keys.Keys
|
|
GetRelayStatuses() []RelayStatus
|
|
GetStartupState() string
|
|
}
|