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) AddAccountWithPrivateKey(ctx context.Context, privateKey string, password string, name string, ...) error
- func (api *API) DeleteAccount(ctx context.Context, address types.Address) error
- func (api *API) GenerateAccount(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) SaveAccounts(ctx context.Context, accounts []accounts.Account) error
- 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
- type SettingsAPI
- func (api *SettingsAPI) GetSettings(ctx context.Context) (settings.Settings, error)
- func (api *SettingsAPI) NodeConfig(ctx context.Context) (*params.NodeConfig, error)
- func (api *SettingsAPI) SaveNodeConfig(ctx context.Context, n *params.NodeConfig) error
- func (api *SettingsAPI) SaveSetting(ctx context.Context, typ string, val interface{}) 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 NewAccountsAPI(manager *account.GethManager, config *params.NodeConfig, db *accounts.Database, feed *event.Feed) *API
func (*API) AddAccountWatch ¶ added in v0.93.3
func (*API) AddAccountWithMnemonic ¶ added in v0.93.3
func (*API) AddAccountWithPrivateKey ¶ added in v0.93.3
func (*API) DeleteAccount ¶ added in v0.38.1
func (*API) GenerateAccount ¶ added in v0.93.3
func (*API) GetAccounts ¶
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) *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) *Service
NewService initializes service instance.
type SettingsAPI ¶
type SettingsAPI struct {
// contains filtered or unexported fields
}
SettingsAPI is class with methods available over RPC.
func NewSettingsAPI ¶
func NewSettingsAPI(db *accounts.Database) *SettingsAPI
func (*SettingsAPI) GetSettings ¶ added in v0.38.4
func (*SettingsAPI) NodeConfig ¶ added in v0.93.2
func (api *SettingsAPI) NodeConfig(ctx context.Context) (*params.NodeConfig, error)
func (*SettingsAPI) SaveNodeConfig ¶
func (api *SettingsAPI) SaveNodeConfig(ctx context.Context, n *params.NodeConfig) error
func (*SettingsAPI) SaveSetting ¶ added in v0.38.4
func (api *SettingsAPI) SaveSetting(ctx context.Context, typ string, val interface{}) error