walletapp

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromptResultEvent  string = "promptResult"
	PromptDataEvent    string = "promptData"
	PromptRequestEvent string = "promptRequest"
)

Variables

This section is empty.

Functions

func IsTestMode

func IsTestMode() bool

Types

type EventData

type EventData struct {
	Success     bool
	CodeMessage string
	Data        interface{}
}

type ImportFromPKey

type ImportFromPKey struct {
	PrivateKey string
	Password   string
	Nickname   string
}

type PromptCtrl

type PromptCtrl int
const (
	Cancel PromptCtrl = iota
)

type PromptRequestAction

type PromptRequestAction int
const (
	Delete PromptRequestAction = iota
	NewPassword
	Sign
	Import
	Backup
	Transfer
	TradeRolls
	Unprotect
)

type WalletApp

type WalletApp struct {
	Ctx         context.Context
	CtrlChan    chan PromptCtrl
	PromptInput chan interface{}
	Shutdown    bool
	IsListening bool
}

func NewWalletApp

func NewWalletApp() *WalletApp

func (*WalletApp) AbortAction

func (a *WalletApp) AbortAction()

AbortAction is bound to the frontend It sends a cancel message to the prompt

func (*WalletApp) BeforeClose

func (a *WalletApp) BeforeClose(ctx context.Context) bool

func (*WalletApp) Hide

func (a *WalletApp) Hide()

func (*WalletApp) ImportPrivateKey

func (a *WalletApp) ImportPrivateKey(pkey string, nickname string, password string)

func (*WalletApp) IsNicknameUnique

func (a *WalletApp) IsNicknameUnique(nickname string) bool

func (*WalletApp) IsNicknameValid

func (a *WalletApp) IsNicknameValid(nickname string) bool

func (*WalletApp) SelectAccountFile

func (a *WalletApp) SelectAccountFile() selectFileResult

func (*WalletApp) SendPromptInput

func (a *WalletApp) SendPromptInput(input string)

SendPromptInput is binded to the frontend

func (*WalletApp) Show

func (a *WalletApp) Show()

func (*WalletApp) Startup

func (a *WalletApp) Startup(ctx context.Context)

startup is called when the app starts. The context is saved so we can call the runtime methods

Jump to

Keyboard shortcuts

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