Documentation ¶
Index ¶
- Variables
- type API
- func (api *API) AddAccountWatch(ctx context.Context, address string, name string, color string, emoji string) error
- func (api *API) AddAccountWithMnemonic(ctx context.Context, mnemonic string, password string, name string, ...) error
- func (api *API) AddAccountWithMnemonicAndPath(ctx context.Context, mnemonic string, password string, name string, ...) error
- func (api *API) AddAccountWithMnemonicAndPathPasswordVerified(ctx context.Context, mnemonic string, password string, name string, ...) error
- func (api *API) AddAccountWithMnemonicPasswordVerified(ctx context.Context, mnemonic string, password string, name string, ...) error
- func (api *API) AddAccountWithPrivateKey(ctx context.Context, privateKey string, password string, name string, ...) error
- func (api *API) AddAccountWithPrivateKeyPasswordVerified(ctx context.Context, privateKey string, password string, name string, ...) error
- func (api *API) AddMigratedKeyPairOrAddAccountsIfKeyPairIsAdded(ctx context.Context, kcUID string, kpName string, keyUID string, ...) error
- func (api *API) DeleteAccount(ctx context.Context, address types.Address, password string) error
- func (api *API) DeleteKeycard(ctx context.Context, kcUID string) error
- func (api *API) DeleteKeypair(ctx context.Context, keyUID string) error
- func (api *API) GenerateAccount(ctx context.Context, password string, name string, color string, emoji string) error
- func (api *API) GenerateAccountPasswordVerified(ctx context.Context, password string, name string, color string, emoji string) error
- func (api *API) GenerateAccountWithDerivedPath(ctx context.Context, password string, name string, color string, emoji string, ...) error
- func (api *API) GenerateAccountWithDerivedPathPasswordVerified(ctx context.Context, password string, name string, color string, emoji string, ...) error
- func (api *API) GetAccounts(ctx context.Context) ([]*accounts.Account, error)
- func (api *API) GetAllKnownKeycards(ctx context.Context) ([]*keypairs.KeyPair, error)
- func (api *API) GetAllMigratedKeyPairs(ctx context.Context) ([]*keypairs.KeyPair, error)
- func (api *API) GetMigratedKeyPairByKeyUID(ctx context.Context, keyUID string) ([]*keypairs.KeyPair, error)
- func (api *API) KeycardLocked(ctx context.Context, kcUID string) error
- func (api *API) KeycardUnlocked(ctx context.Context, kcUID string) error
- func (api *API) RemoveMigratedAccountsForKeycard(ctx context.Context, kcUID string, accountAddresses []string) error
- func (api *API) SaveAccounts(ctx context.Context, accounts []*accounts.Account) error
- func (api *API) SetKeycardName(ctx context.Context, kcUID string, kpName string) error
- func (api *API) UpdateKeycardUID(ctx context.Context, oldKcUID string, newKcUID string) error
- func (api *API) VerifyPassword(password string) bool
- type DerivedAddress
- type MultiAccountsAPI
- func (api *MultiAccountsAPI) DeleteIdentityImage(keyUID string) error
- func (api *MultiAccountsAPI) GetIdentityImage(keyUID, name string) (*images.IdentityImage, error)
- func (api *MultiAccountsAPI) GetIdentityImages(keyUID string) ([]*images.IdentityImage, error)
- func (api *MultiAccountsAPI) StoreIdentityImage(keyUID, filepath string, aX, aY, bX, bY int) ([]images.IdentityImage, error)
- func (api *MultiAccountsAPI) StoreIdentityImageFromURL(keyUID, url string) ([]images.IdentityImage, error)
- func (api *MultiAccountsAPI) UpdateAccount(account multiaccounts.Account) error
- type Service
- func (s *Service) APIs() []rpc.API
- func (s *Service) GetAccountsByKeyUID(keyUID string) ([]*accounts.Account, error)
- func (s *Service) GetMessenger() *protocol.Messenger
- func (s *Service) GetSettings() (settings.Settings, error)
- func (s *Service) Init(messenger *protocol.Messenger)
- func (s *Service) Protocols() []p2p.Protocol
- func (s *Service) Start() error
- func (s *Service) Stop() error
- type SettingsAPI
- func (api *SettingsAPI) DeleteExemptions(id string) error
- func (api *SettingsAPI) GetSettings(ctx context.Context) (settings.Settings, error)
- func (api *SettingsAPI) GetSocialLinks() (identity.SocialLinks, error)
- func (api *SettingsAPI) NodeConfig(ctx context.Context) (*params.NodeConfig, error)
- func (api *SettingsAPI) NotificationsGetAllMessages() (string, error)
- func (api *SettingsAPI) NotificationsGetAllowNotifications() (bool, error)
- func (api *SettingsAPI) NotificationsGetContactRequests() (string, error)
- func (api *SettingsAPI) NotificationsGetExGlobalMentions(id string) (string, error)
- func (api *SettingsAPI) NotificationsGetExMuteAllMessages(id string) (bool, error)
- func (api *SettingsAPI) NotificationsGetExOtherMessages(id string) (string, error)
- func (api *SettingsAPI) NotificationsGetExPersonalMentions(id string) (string, error)
- func (api *SettingsAPI) NotificationsGetGlobalMentions() (string, error)
- func (api *SettingsAPI) NotificationsGetGroupChats() (string, error)
- func (api *SettingsAPI) NotificationsGetIdentityVerificationRequests() (string, error)
- func (api *SettingsAPI) NotificationsGetMessagePreview() (int, error)
- func (api *SettingsAPI) NotificationsGetOneToOneChats() (string, error)
- func (api *SettingsAPI) NotificationsGetPersonalMentions() (string, error)
- func (api *SettingsAPI) NotificationsGetSoundEnabled() (bool, error)
- func (api *SettingsAPI) NotificationsGetVolume() (int, error)
- func (api *SettingsAPI) NotificationsSetAllMessages(value string) error
- func (api *SettingsAPI) NotificationsSetAllowNotifications(value bool) error
- func (api *SettingsAPI) NotificationsSetContactRequests(value string) error
- func (api *SettingsAPI) NotificationsSetExemptions(id string, muteAllMessages bool, personalMentions string, ...) error
- func (api *SettingsAPI) NotificationsSetGlobalMentions(value string) error
- func (api *SettingsAPI) NotificationsSetGroupChats(value string) error
- func (api *SettingsAPI) NotificationsSetIdentityVerificationRequests(value string) error
- func (api *SettingsAPI) NotificationsSetMessagePreview(value int) error
- func (api *SettingsAPI) NotificationsSetOneToOneChats(value string) error
- func (api *SettingsAPI) NotificationsSetPersonalMentions(value string) error
- func (api *SettingsAPI) NotificationsSetSoundEnabled(value bool) error
- func (api *SettingsAPI) NotificationsSetVolume(value int) error
- func (api *SettingsAPI) SaveNodeConfig(ctx context.Context, n *params.NodeConfig) error
- func (api *SettingsAPI) SaveSetting(ctx context.Context, typ string, val interface{}) error
- func (api *SettingsAPI) SetBio(bio string) error
- func (api *SettingsAPI) SetSocialLinks(socialLinks identity.SocialLinks) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUpdatingWrongAccount raised if caller tries to update any other account except one used for login. ErrUpdatingWrongAccount = errors.New("failed to update wrong account. Please login with that account first") )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API is class with methods available over RPC.
func NewAccountsAPI ¶
func (*API) AddAccountWatch ¶ added in v0.93.3
func (*API) AddAccountWithMnemonic ¶ added in v0.93.3
func (*API) AddAccountWithMnemonicAndPath ¶ added in v0.98.3
func (*API) AddAccountWithMnemonicAndPathPasswordVerified ¶ added in v0.114.1
func (*API) AddAccountWithMnemonicPasswordVerified ¶ added in v0.114.1
func (*API) AddAccountWithPrivateKey ¶ added in v0.93.3
func (*API) AddAccountWithPrivateKeyPasswordVerified ¶ added in v0.114.1
func (api *API) AddAccountWithPrivateKeyPasswordVerified( ctx context.Context, privateKey string, password string, name string, color string, emoji string, ) error
AddAccountWithPrivateKeyPasswordVerified adds an accounts.Account created from the given private key assuming that client has already authenticated logged in use, this function doesn't verify a password.
func (*API) AddMigratedKeyPairOrAddAccountsIfKeyPairIsAdded ¶ added in v0.133.2
func (*API) DeleteAccount ¶ added in v0.38.1
func (*API) DeleteKeycard ¶ added in v0.109.1
func (*API) DeleteKeypair ¶ added in v0.125.4
func (*API) GenerateAccount ¶ added in v0.93.3
func (*API) GenerateAccountPasswordVerified ¶ added in v0.114.1
func (*API) GenerateAccountWithDerivedPath ¶ added in v0.98.3
func (*API) GenerateAccountWithDerivedPathPasswordVerified ¶ added in v0.114.1
func (*API) GetAccounts ¶
func (*API) GetAllKnownKeycards ¶ added in v0.117.1
func (*API) GetAllMigratedKeyPairs ¶ added in v0.109.1
func (*API) GetMigratedKeyPairByKeyUID ¶ added in v0.109.1
func (*API) KeycardLocked ¶ added in v0.109.1
func (*API) KeycardUnlocked ¶ added in v0.109.1
func (*API) RemoveMigratedAccountsForKeycard ¶ added in v0.125.0
func (*API) SaveAccounts ¶
func (*API) SetKeycardName ¶ added in v0.109.1
func (*API) UpdateKeycardUID ¶ added in v0.110.2
func (*API) VerifyPassword ¶ added in v0.107.1
type DerivedAddress ¶ added in v0.98.3
type MultiAccountsAPI ¶
type MultiAccountsAPI struct {
// contains filtered or unexported fields
}
MultiAccountsAPI is class with methods available over RPC.
func NewMultiAccountsAPI ¶
func NewMultiAccountsAPI(db *multiaccounts.Database, mediaServer *server.MediaServer) *MultiAccountsAPI
func (*MultiAccountsAPI) DeleteIdentityImage ¶ added in v0.65.0
func (api *MultiAccountsAPI) DeleteIdentityImage(keyUID string) error
DeleteIdentityImage deletes an IdentityImage from the db with the given name
func (*MultiAccountsAPI) GetIdentityImage ¶ added in v0.65.0
func (api *MultiAccountsAPI) GetIdentityImage(keyUID, name string) (*images.IdentityImage, error)
GetIdentityImage returns a json object representing the image with the given name
func (*MultiAccountsAPI) GetIdentityImages ¶ added in v0.65.0
func (api *MultiAccountsAPI) GetIdentityImages(keyUID string) ([]*images.IdentityImage, error)
GetIdentityImages returns an array of json marshalled IdentityImages assigned to the user's identity
func (*MultiAccountsAPI) StoreIdentityImage ¶ added in v0.65.0
func (api *MultiAccountsAPI) StoreIdentityImage(keyUID, filepath string, aX, aY, bX, bY int) ([]images.IdentityImage, error)
StoreIdentityImage takes the filepath of an image, crops it as per the rect coords and finally resizes the image. The resulting image(s) will be stored in the DB along with other user account information. aX and aY represent the pixel coordinates of the upper left corner of the image's cropping area bX and bY represent the pixel coordinates of the lower right corner of the image's cropping area
func (*MultiAccountsAPI) StoreIdentityImageFromURL ¶ added in v0.87.2
func (api *MultiAccountsAPI) StoreIdentityImageFromURL(keyUID, url string) ([]images.IdentityImage, error)
func (*MultiAccountsAPI) UpdateAccount ¶
func (api *MultiAccountsAPI) UpdateAccount(account multiaccounts.Account) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a browsers service.
func NewService ¶
func NewService(db *accounts.Database, mdb *multiaccounts.Database, manager *account.GethManager, config *params.NodeConfig, feed *event.Feed, mediaServer *server.MediaServer) *Service
NewService initializes service instance.
func (*Service) GetAccountsByKeyUID ¶ added in v0.118.0
func (*Service) GetMessenger ¶ added in v0.122.1
func (*Service) GetSettings ¶ added in v0.118.0
type SettingsAPI ¶
type SettingsAPI struct {
// contains filtered or unexported fields
}
SettingsAPI is class with methods available over RPC.
func NewSettingsAPI ¶
func NewSettingsAPI(messenger **protocol.Messenger, db *accounts.Database, config *params.NodeConfig) *SettingsAPI
func (*SettingsAPI) DeleteExemptions ¶ added in v0.100.0
func (api *SettingsAPI) DeleteExemptions(id string) error
func (*SettingsAPI) GetSettings ¶ added in v0.38.4
func (*SettingsAPI) GetSocialLinks ¶ added in v0.105.1
func (api *SettingsAPI) GetSocialLinks() (identity.SocialLinks, error)
func (*SettingsAPI) NodeConfig ¶ added in v0.93.2
func (api *SettingsAPI) NodeConfig(ctx context.Context) (*params.NodeConfig, error)
NodeConfig returns the currently used node configuration
func (*SettingsAPI) NotificationsGetAllMessages ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetAllMessages() (string, error)
func (*SettingsAPI) NotificationsGetAllowNotifications ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetAllowNotifications() (bool, error)
Notifications Settings
func (*SettingsAPI) NotificationsGetContactRequests ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetContactRequests() (string, error)
func (*SettingsAPI) NotificationsGetExGlobalMentions ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetExGlobalMentions(id string) (string, error)
func (*SettingsAPI) NotificationsGetExMuteAllMessages ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetExMuteAllMessages(id string) (bool, error)
Notifications Settings - Exemption settings
func (*SettingsAPI) NotificationsGetExOtherMessages ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetExOtherMessages(id string) (string, error)
func (*SettingsAPI) NotificationsGetExPersonalMentions ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetExPersonalMentions(id string) (string, error)
func (*SettingsAPI) NotificationsGetGlobalMentions ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetGlobalMentions() (string, error)
func (*SettingsAPI) NotificationsGetGroupChats ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetGroupChats() (string, error)
func (*SettingsAPI) NotificationsGetIdentityVerificationRequests ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetIdentityVerificationRequests() (string, error)
func (*SettingsAPI) NotificationsGetMessagePreview ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetMessagePreview() (int, error)
func (*SettingsAPI) NotificationsGetOneToOneChats ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetOneToOneChats() (string, error)
func (*SettingsAPI) NotificationsGetPersonalMentions ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetPersonalMentions() (string, error)
func (*SettingsAPI) NotificationsGetSoundEnabled ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetSoundEnabled() (bool, error)
func (*SettingsAPI) NotificationsGetVolume ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsGetVolume() (int, error)
func (*SettingsAPI) NotificationsSetAllMessages ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetAllMessages(value string) error
func (*SettingsAPI) NotificationsSetAllowNotifications ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetAllowNotifications(value bool) error
func (*SettingsAPI) NotificationsSetContactRequests ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetContactRequests(value string) error
func (*SettingsAPI) NotificationsSetExemptions ¶ added in v0.100.0
func (*SettingsAPI) NotificationsSetGlobalMentions ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetGlobalMentions(value string) error
func (*SettingsAPI) NotificationsSetGroupChats ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetGroupChats(value string) error
func (*SettingsAPI) NotificationsSetIdentityVerificationRequests ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetIdentityVerificationRequests(value string) error
func (*SettingsAPI) NotificationsSetMessagePreview ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetMessagePreview(value int) error
func (*SettingsAPI) NotificationsSetOneToOneChats ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetOneToOneChats(value string) error
func (*SettingsAPI) NotificationsSetPersonalMentions ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetPersonalMentions(value string) error
func (*SettingsAPI) NotificationsSetSoundEnabled ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetSoundEnabled(value bool) error
func (*SettingsAPI) NotificationsSetVolume ¶ added in v0.100.0
func (api *SettingsAPI) NotificationsSetVolume(value int) error
func (*SettingsAPI) SaveNodeConfig ¶
func (api *SettingsAPI) SaveNodeConfig(ctx context.Context, n *params.NodeConfig) error
Saves the nodeconfig in the database. The node must be restarted for the changes to be applied
func (*SettingsAPI) SaveSetting ¶ added in v0.38.4
func (api *SettingsAPI) SaveSetting(ctx context.Context, typ string, val interface{}) error
func (*SettingsAPI) SetBio ¶ added in v0.105.1
func (api *SettingsAPI) SetBio(bio string) error
func (*SettingsAPI) SetSocialLinks ¶ added in v0.105.1
func (api *SettingsAPI) SetSocialLinks(socialLinks identity.SocialLinks) error