Documentation ¶
Index ¶
- Constants
- type Account
- type Database
- func (db *Database) AddressExists(address types.Address) (exists bool, err error)
- func (db Database) Close() error
- func (db Database) DB() *sql.DB
- func (db *Database) DeleteAccount(address types.Address) error
- func (db *Database) DeleteAccountAndPublish(address types.Address) error
- func (db *Database) DeleteSeedAndKeyAccounts() error
- func (db *Database) GetAccountByAddress(address types.Address) (rst *Account, err error)
- func (db *Database) GetAccounts() ([]*Account, error)
- func (db *Database) GetAddresses() (rst []types.Address, err error)
- func (db *Database) GetChatAddress() (rst types.Address, err error)
- func (db *Database) GetNodeConfig() (*params.NodeConfig, error)
- func (db *Database) GetWalletAddress() (rst types.Address, err error)
- func (db *Database) GetWalletAddresses() (rst []types.Address, err error)
- func (db *Database) SaveAccounts(accounts []*Account) (err error)
- func (db *Database) SaveAccountsAndPublish(accounts []*Account) (err error)
- func (db *Database) SubscribeToAccountChanges() chan []*Account
Constants ¶
View Source
const (
AccountTypeWatch = "watch"
)
View Source
const (
// NodeConfigTag tag for a node configuration.
NodeConfigTag = "node_config"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Address types.Address Wallet bool Chat bool Type string Storage string Path string PublicKey types.HexBytes Name string Emoji string Color string Hidden bool DerivedFrom string Clock uint64 Removed bool }
func (*Account) IsOwnAccount ¶ added in v0.64.6
IsOwnAccount returns true if this is an account we have the private key for NOTE: Wallet flag can't be used as it actually indicates that it's the default Wallet
func (*Account) MarshalJSON ¶ added in v0.100.0
type Database ¶
type Database struct { *settings.Database *notificationssettings.NotificationsSettings // contains filtered or unexported fields }
Database sql wrapper for operations with browser objects.
func (*Database) AddressExists ¶
AddressExists returns true if given address is stored in database.
func (*Database) DeleteAccount ¶ added in v0.38.1
func (*Database) DeleteAccountAndPublish ¶ added in v0.100.0
func (*Database) DeleteSeedAndKeyAccounts ¶ added in v0.83.0
func (*Database) GetAccountByAddress ¶ added in v0.62.16
func (*Database) GetAccounts ¶
func (*Database) GetChatAddress ¶
func (*Database) GetNodeConfig ¶ added in v0.38.4
func (db *Database) GetNodeConfig() (*params.NodeConfig, error)
func (*Database) GetWalletAddress ¶
func (*Database) GetWalletAddresses ¶ added in v0.40.0
func (*Database) SaveAccounts ¶
func (*Database) SaveAccountsAndPublish ¶ added in v0.100.0
func (*Database) SubscribeToAccountChanges ¶ added in v0.100.0
Click to show internal directories.
Click to hide internal directories.