Documentation ¶
Index ¶
- Variables
- type API
- func (api *API) AddAccount(ctx context.Context, password string, account *accounts.Account) error
- func (api *API) AddKeypair(ctx context.Context, password string, keypair *accounts.Keypair) error
- func (api *API) AddressWasShown(address types.Address) 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, keycardUID string) error
- func (api *API) DeleteKeycardAccounts(ctx context.Context, keycardUID string, accountAddresses []types.Address) error
- func (api *API) DeleteKeypair(ctx context.Context, keyUID 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) GetKeycardByKeycardUID(ctx context.Context, keycardUID string) (*accounts.Keycard, error)
- func (api *API) GetKeycardsWithSameKeyUID(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) GetTokenPreferences(ctx context.Context) ([]walletsettings.TokenPreferences, error)
- func (api *API) GetWatchOnlyAccounts(ctx context.Context) ([]*accounts.Account, error)
- func (api *API) HasPairedDevices(ctx context.Context) bool
- 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, keycardUID string) error
- func (api *API) KeycardUnlocked(ctx context.Context, keycardUID string) error
- func (api *API) MakePartiallyOperableAccoutsFullyOperable(ctx context.Context, password string) (addresses []types.Address, err error)
- func (api *API) MakePrivateKeyKeypairFullyOperable(ctx context.Context, privateKey string, password string) error
- func (api *API) MakeSeedPhraseKeypairFullyOperable(ctx context.Context, mnemonic string, password string) error
- func (api *API) MigrateNonProfileKeycardKeypairToApp(ctx context.Context, mnemonic string, password string) error
- func (api *API) MoveWalletAccount(ctx context.Context, fromPosition int64, toPosition int64) 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) SaveOrUpdateKeycard(ctx context.Context, keycard *accounts.Keycard, accountsComingFromKeycard bool) error
- func (api *API) SetKeycardName(ctx context.Context, keycardUID string, kpName string) error
- func (api *API) UpdateKeycardUID(ctx context.Context, oldKeycardUID string, newKeycardUID string) error
- func (api *API) UpdateKeypairName(ctx context.Context, keyUID string, name string) error
- func (api *API) UpdateTokenPreferences(ctx context.Context, preferences []walletsettings.TokenPreferences) 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) AccountsAPI() *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
- func (s *Service) VerifyPassword(password string) bool
- type SettingsAPI
- func (api *SettingsAPI) AddOrReplaceSocialLinks(links identity.SocialLinks) error
- 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) MnemonicWasShown() 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
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) AddKeypair ¶ added in v0.152.2
func (*API) AddressWasShown ¶ added in v0.171.26
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) DeleteKeycardAccounts ¶ added in v0.161.6
func (*API) DeleteKeypair ¶ added in v0.125.4
func (*API) GetAccountByAddress ¶ added in v0.152.2
func (*API) GetAccounts ¶
func (*API) GetAllKnownKeycards ¶ added in v0.117.1
func (*API) GetKeycardByKeycardUID ¶ added in v0.161.6
func (*API) GetKeycardsWithSameKeyUID ¶ added in v0.161.6
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) GetTokenPreferences ¶ added in v0.171.27
func (api *API) GetTokenPreferences(ctx context.Context) ([]walletsettings.TokenPreferences, error)
func (*API) GetWatchOnlyAccounts ¶ added in v0.152.2
func (*API) HasPairedDevices ¶ added in v0.163.4
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) MakePartiallyOperableAccoutsFullyOperable ¶ added in v0.166.1
func (*API) MakePrivateKeyKeypairFullyOperable ¶ added in v0.163.4
func (api *API) MakePrivateKeyKeypairFullyOperable(ctx context.Context, privateKey string, password string) error
Creates all keystore files for a keypair and mark it in db as fully operable.
func (*API) MakeSeedPhraseKeypairFullyOperable ¶ added in v0.163.4
func (api *API) MakeSeedPhraseKeypairFullyOperable(ctx context.Context, mnemonic string, password string) error
Creates all keystore files for a keypair and mark it in db as fully operable.
func (*API) MigrateNonProfileKeycardKeypairToApp ¶ added in v0.166.3
func (*API) MoveWalletAccount ¶ added in v0.162.9
func (*API) SaveAccount ¶ added in v0.147.0
func (*API) SaveKeypair ¶ added in v0.152.2
Setting `Keypair` without `Accounts` will update keypair only, `Keycards` won't be saved/updated this way.
func (*API) SaveOrUpdateKeycard ¶ added in v0.161.6
func (api *API) SaveOrUpdateKeycard(ctx context.Context, keycard *accounts.Keycard, accountsComingFromKeycard bool) error
If keypair is migrated from keycard to app, then `accountsComingFromKeycard` should be set to true, otherwise false. If keycard is new `Position` will be determined and set by the backend and `KeycardLocked` will be set to false. If keycard is already added, `Position` and `KeycardLocked` will be unchanged.
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) UpdateTokenPreferences ¶ added in v0.171.27
func (api *API) UpdateTokenPreferences(ctx context.Context, preferences []walletsettings.TokenPreferences) error
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) AccountsAPI ¶ added in v0.171.5
func (*Service) GetKeypairByKeyUID ¶ added in v0.152.2
func (*Service) GetMessenger ¶ added in v0.122.1
func (*Service) GetSettings ¶ added in v0.118.0
func (*Service) VerifyPassword ¶ added in v0.163.14
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) AddOrReplaceSocialLinks ¶ added in v0.156.1
func (api *SettingsAPI) AddOrReplaceSocialLinks(links identity.SocialLinks) error
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) MnemonicWasShown ¶ added in v0.171.26
func (api *SettingsAPI) MnemonicWasShown() 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