2023-12-21 18:05:30 +00:00
|
|
|
package settings
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
"encoding/json"
|
|
|
|
|
|
|
|
"github.com/status-im/status-go/eth-node/types"
|
|
|
|
"github.com/status-im/status-go/params"
|
|
|
|
)
|
|
|
|
|
|
|
|
type DatabaseSettingsManager interface {
|
|
|
|
GetDB() *sql.DB
|
|
|
|
GetSyncQueue() chan SyncSettingField
|
|
|
|
GetChangesSubscriptions() []chan *SyncSettingField
|
|
|
|
GetNotifier() Notifier
|
|
|
|
GetSettingLastSynced(setting SettingField) (result uint64, err error)
|
|
|
|
GetSettings() (Settings, error)
|
|
|
|
GetNotificationsEnabled() (result bool, err error)
|
|
|
|
GetProfilePicturesVisibility() (result int, err error)
|
|
|
|
GetPublicKey() (string, error)
|
|
|
|
GetFleet() (string, error)
|
|
|
|
GetDappsAddress() (rst types.Address, err error)
|
|
|
|
GetPinnedMailservers() (rst map[string]string, err error)
|
|
|
|
GetDefaultSyncPeriod() (result uint32, err error)
|
|
|
|
GetMessagesFromContactsOnly() (result bool, err error)
|
|
|
|
GetProfilePicturesShowTo() (result int64, err error)
|
|
|
|
GetLatestDerivedPath() (result uint, err error)
|
|
|
|
GetCurrentStatus(status interface{}) error
|
|
|
|
GetMnemonicWasNotShown() (result bool, err error)
|
|
|
|
GetPreferredUsername() (string, error)
|
|
|
|
GetCurrency() (string, error)
|
|
|
|
GetInstalledStickerPacks() (rst *json.RawMessage, err error)
|
|
|
|
GetPendingStickerPacks() (rst *json.RawMessage, err error)
|
|
|
|
GetRecentStickers() (rst *json.RawMessage, err error)
|
|
|
|
GetWalletRootAddress() (rst types.Address, err error)
|
|
|
|
GetEIP1581Address() (rst types.Address, err error)
|
|
|
|
GetMasterAddress() (rst types.Address, err error)
|
|
|
|
GetTestNetworksEnabled() (result bool, err error)
|
2024-02-20 09:30:47 +00:00
|
|
|
GetIsGoerliEnabled() (result bool, err error)
|
2023-12-21 18:05:30 +00:00
|
|
|
GetTokenGroupByCommunity() (result bool, err error)
|
2024-01-17 13:12:49 +00:00
|
|
|
GetCollectibleGroupByCommunity() (result bool, err error)
|
|
|
|
GetCollectibleGroupByCollection() (result bool, err error)
|
2023-12-21 18:05:30 +00:00
|
|
|
GetTelemetryServerURL() (string, error)
|
|
|
|
|
|
|
|
SetSettingsNotifier(n Notifier)
|
|
|
|
SetSettingLastSynced(setting SettingField, clock uint64) error
|
|
|
|
SetLastBackup(time uint64) error
|
|
|
|
SetBackupFetched(fetched bool) error
|
|
|
|
SetPinnedMailservers(mailservers map[string]string) error
|
|
|
|
SetUseMailservers(value bool) error
|
|
|
|
SetTokenGroupByCommunity(value bool) error
|
2024-03-05 10:44:09 +00:00
|
|
|
SetPeerSyncingEnabled(value bool) error
|
2023-12-21 18:05:30 +00:00
|
|
|
|
|
|
|
CreateSettings(s Settings, n params.NodeConfig) error
|
|
|
|
SaveSetting(setting string, value interface{}) error
|
|
|
|
SaveSettingField(sf SettingField, value interface{}) error
|
|
|
|
DeleteMnemonic() error
|
|
|
|
SaveSyncSetting(setting SettingField, value interface{}, clock uint64) error
|
|
|
|
CanUseMailservers() (result bool, err error)
|
|
|
|
CanSyncOnMobileNetwork() (result bool, err error)
|
|
|
|
ShouldBroadcastUserStatus() (result bool, err error)
|
|
|
|
BackupEnabled() (result bool, err error)
|
|
|
|
AutoMessageEnabled() (result bool, err error)
|
|
|
|
LastBackup() (result uint64, err error)
|
|
|
|
BackupFetched() (result bool, err error)
|
|
|
|
ENSName() (string, error)
|
|
|
|
DeviceName() (string, error)
|
|
|
|
DisplayName() (string, error)
|
|
|
|
Bio() (string, error)
|
|
|
|
Mnemonic() (string, error)
|
|
|
|
MnemonicRemoved() (result bool, err error)
|
|
|
|
GifAPIKey() (string, error)
|
|
|
|
MutualContactEnabled() (result bool, err error)
|
|
|
|
GifRecents() (recents json.RawMessage, err error)
|
|
|
|
GifFavorites() (favorites json.RawMessage, err error)
|
|
|
|
ProfileMigrationNeeded() (result bool, err error)
|
|
|
|
URLUnfurlingMode() (result int64, err error)
|
|
|
|
SubscribeToChanges() chan *SyncSettingField
|
|
|
|
MnemonicWasShown() error
|
2024-03-05 10:44:09 +00:00
|
|
|
GetPeerSyncingEnabled() (result bool, err error)
|
2023-12-21 18:05:30 +00:00
|
|
|
}
|