backend

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReleasesAPI = "https://api.github.com/repos/vegaprotocol/vegawallet-desktop/releases"
	ReleasesURL = "https://github.com/vegaprotocol/vegawallet-desktop/releases"
)

Variables

View Source
var (
	ErrServiceAlreadyRunning   = errors.New("the service is already running")
	ErrServiceNotRunning       = errors.New("the service is not running")
	ErrConsoleAlreadyRunning   = errors.New("the console proxy is already running")
	ErrConsoleNotRunning       = errors.New("the console proxy is not running")
	ErrTokenDAppAlreadyRunning = errors.New("the token dApp proxy is already running")
	ErrTokenDAppNotRunning     = errors.New("the token dApp proxy is not running")
)
View Source
var (
	// Hash specifies the git commit used to build the application.
	// See VERSION_HASH in Makefile for details.
	Hash = defaultVersionHash

	// Version specifies the version used to build the application.
	// See VERSION in Makefile for details.
	Version = defaultVersion
)

Functions

func CheckCreateWalletRequest added in v0.1.0

func CheckCreateWalletRequest(req *wallet.CreateWalletRequest) error

func CheckImportWalletRequest added in v0.1.0

func CheckImportWalletRequest(req *wallet.ImportWalletRequest) error

func CheckSignMessageRequest added in v0.1.0

func CheckSignMessageRequest(req *wallet.SignMessageRequest) error

Types

type CheckVersionResponse added in v0.1.0

type CheckVersionResponse struct {
	Version    string `json:"version"`
	ReleaseURL string `json:"releaseUrl"`
}

type GetServiceStateResponse added in v0.1.0

type GetServiceStateResponse struct {
	URL     string `json:"url"`
	Running bool   `json:"running"`
}

type GetVersionResponse

type GetVersionResponse struct {
	Version string `json:"version"`
	GitHash string `json:"gitHash"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(log logger.Logger) *Handler

func (*Handler) AnnotateKey added in v0.1.0

func (h *Handler) AnnotateKey(req *wallet.AnnotateKeyRequest) error

func (*Handler) CheckVersion added in v0.1.0

func (h *Handler) CheckVersion() (*CheckVersionResponse, error)

func (*Handler) CreateWallet added in v0.1.0

func (*Handler) DOMReady

func (h *Handler) DOMReady(ctx context.Context)

DOMReady is called after the front-end dom has been loaded

func (*Handler) DescribeKey added in v0.1.0

func (*Handler) GenerateKey added in v0.1.0

func (*Handler) GetConsoleState added in v0.1.0

func (h *Handler) GetConsoleState() GetServiceStateResponse

func (*Handler) GetNetworkConfig added in v0.1.0

func (h *Handler) GetNetworkConfig(name string) (*network.Network, error)

func (*Handler) GetServiceState added in v0.1.0

func (h *Handler) GetServiceState() GetServiceStateResponse

func (*Handler) GetTokenDAppState added in v0.1.0

func (h *Handler) GetTokenDAppState() GetServiceStateResponse

func (*Handler) GetVersion

func (h *Handler) GetVersion() *GetVersionResponse

func (*Handler) ImportNetwork added in v0.1.0

func (*Handler) ImportWallet added in v0.1.0

func (*Handler) InitialiseApp

func (h *Handler) InitialiseApp(cfg *config.Config) error

func (*Handler) IsAppInitialised

func (h *Handler) IsAppInitialised() (bool, error)

func (*Handler) IsolateKey added in v0.1.0

func (*Handler) ListKeys added in v0.1.0

func (*Handler) ListNetworks added in v0.1.0

func (h *Handler) ListNetworks() (*network.ListNetworksResponse, error)

func (*Handler) ListWallets added in v0.1.0

func (h *Handler) ListWallets() (*wallet.ListWalletsResponse, error)

func (*Handler) SaveNetworkConfig added in v0.1.0

func (h *Handler) SaveNetworkConfig(cfg *network.Network) (bool, error)

func (*Handler) Shutdown

func (h *Handler) Shutdown(_ context.Context)

Shutdown is called at application termination

func (*Handler) SignMessage added in v0.1.0

func (*Handler) StartConsole added in v0.1.0

func (h *Handler) StartConsole(req *StartServiceRequest) (bool, error)

func (*Handler) StartService

func (h *Handler) StartService(req *StartServiceRequest) (bool, error)

func (*Handler) StartTokenDApp added in v0.1.0

func (h *Handler) StartTokenDApp(req *StartServiceRequest) (bool, error)

func (*Handler) Startup

func (h *Handler) Startup(ctx context.Context)

Startup is called at application Startup

func (*Handler) StopConsole added in v0.1.0

func (h *Handler) StopConsole() (bool, error)

func (*Handler) StopService

func (h *Handler) StopService() (bool, error)

func (*Handler) StopTokenDApp added in v0.1.0

func (h *Handler) StopTokenDApp() (bool, error)

func (*Handler) TaintKey added in v0.1.0

func (h *Handler) TaintKey(req *wallet.TaintKeyRequest) error

func (*Handler) UntaintKey added in v0.1.0

func (h *Handler) UntaintKey(req *wallet.UntaintKeyRequest) error

type ImportWalletResponse added in v0.1.0

type ImportWalletResponse struct {
	WalletPath string
}

type StartServiceRequest

type StartServiceRequest struct {
	Network string `json:"network"`
}

func (StartServiceRequest) Check

func (r StartServiceRequest) Check() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL