Documentation ¶
Index ¶
- Variables
- type API
- func (api *API) AddAccount(ctx context.Context, password string, account *accounts.Account) error
- func (api *API) AddKeycardOrAddAccountsIfKeycardIsAdded(ctx context.Context, kcUID string, kpName string, keyUID string, ...) error
- func (api *API) AddKeypair(ctx context.Context, password string, keypair *accounts.Keypair) error
- func (api *API) DeleteAccount(ctx context.Context, address types.Address) error
- func (api *API) DeleteAllKeycardsWithKeyUID(ctx context.Context, keyUID string) error
- func (api *API) DeleteKeycard(ctx context.Context, kcUID string) error
- func (api *API) GetAccountByAddress(ctx context.Context, address types.Address) (*accounts.Account, error)
- func (api *API) GetAccounts(ctx context.Context) ([]*accounts.Account, error)
- func (api *API) GetAllKnownKeycards(ctx context.Context) ([]*accounts.Keycard, error)
- func (api *API) GetAllKnownKeycardsGroupedByKeyUID(ctx context.Context) ([]*accounts.Keycard, error)
- func (api *API) GetKeycardByKeyUID(ctx context.Context, keyUID string) ([]*accounts.Keycard, error)
- func (api *API) GetKeypairByKeyUID(ctx context.Context, keyUID string) (*accounts.Keypair, error)
- func (api *API) GetKeypairs(ctx context.Context) ([]*accounts.Keypair, error)
- func (api *API) GetRandomMnemonic(ctx context.Context) (string, error)
- func (api *API) GetWatchOnlyAccounts(ctx context.Context) ([]*accounts.Account, error)
- func (api *API) ImportMnemonic(ctx context.Context, mnemonic string, password string) error
- func (api *API) ImportPrivateKey(ctx context.Context, privateKey string, password string) 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) SaveAccount(ctx context.Context, account *accounts.Account) error
- func (api *API) SaveKeypair(ctx context.Context, keypair *accounts.Keypair) 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) UpdateKeypairName(ctx context.Context, keyUID string, name string) error
- func (api *API) VerifyKeystoreFileForAccount(address types.Address, password string) bool
- 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) GetKeypairByKeyUID(keyUID string) (*accounts.Keypair, 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) AddAccount ¶ added in v0.142.1
func (*API) AddKeycardOrAddAccountsIfKeycardIsAdded ¶ added in v0.151.1
func (api *API) AddKeycardOrAddAccountsIfKeycardIsAdded(ctx context.Context, kcUID string, kpName string, keyUID string, accountAddresses []string, accountsComingFromKeycard bool) error
If keypair is migrated from keycard to app, then `accountsComingFromKeycard` should be set to true, otherwise false.
func (*API) AddKeypair ¶ added in v0.152.2
func (*API) DeleteAccount ¶ added in v0.38.1
func (*API) DeleteAllKeycardsWithKeyUID ¶ added in v0.151.1
func (*API) DeleteKeycard ¶ added in v0.109.1
func (*API) GetAccountByAddress ¶ added in v0.152.2
func (*API) GetAccounts ¶
func (*API) GetAllKnownKeycards ¶ added in v0.117.1
func (*API) GetAllKnownKeycardsGroupedByKeyUID ¶ added in v0.151.1
func (*API) GetKeycardByKeyUID ¶ added in v0.151.1
func (*API) GetKeypairByKeyUID ¶ added in v0.152.2
func (*API) GetKeypairs ¶ added in v0.152.2
func (*API) GetRandomMnemonic ¶ added in v0.142.1
Creates a random new mnemonic.
func (*API) GetWatchOnlyAccounts ¶ added in v0.152.2
func (*API) ImportMnemonic ¶ added in v0.142.1
Imports a new mnemonic and creates local keystore file.
func (*API) ImportPrivateKey ¶ added in v0.142.1
Imports a new private key and creates local keystore file.
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) SaveAccount ¶ added in v0.147.0
func (*API) SaveKeypair ¶ added in v0.152.2
Setting `Keypair` without `Accounts` will update keypair only.
func (*API) SetKeycardName ¶ added in v0.109.1
func (*API) UpdateKeycardUID ¶ added in v0.110.2
func (*API) UpdateKeypairName ¶ added in v0.152.2
Setting `Keypair` without `Accounts` will update keypair only.
func (*API) VerifyKeystoreFileForAccount ¶ added in v0.147.0
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) GetKeypairByKeyUID ¶ added in v0.152.2
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