Documentation ¶
Index ¶
- Constants
- func Inc(i *int) int
- func InitKeymap(p KeymapPrimitive, app *App)
- func IsControlKey(evt *tcell.EventKey) bool
- func StyledAccountType(t serv.AccountType) string
- func StyledNetworkName(n serv.Network) string
- func StyledTxnDirection(base *common.Address, txn common.Transaction) string
- type Account
- func (a *Account) Draw(screen tcell.Screen)
- func (a *Account) HasFocus() bool
- func (a *Account) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (a *Account) KeyMaps() util.KeyMaps
- func (a *Account) SetAccount(account *serv.Account)
- func (a *Account) SetRect(x int, y int, width int, height int)
- func (a *Account) ShowImportABIDialog()
- func (a *Account) ShowMethodCallDialog()
- type AccountInfo
- type App
- type CallData
- type ChainInfo
- type Help
- type Home
- type ImportABIDialog
- func (d *ImportABIDialog) Clear()
- func (d *ImportABIDialog) Display(display bool)
- func (d *ImportABIDialog) Draw(screen tcell.Screen)
- func (d *ImportABIDialog) Hide()
- func (d *ImportABIDialog) IsDisplay() bool
- func (d *ImportABIDialog) KeyMaps() util.KeyMaps
- func (d *ImportABIDialog) SetCentral(x int, y int, width int, height int)
- func (d *ImportABIDialog) Show()
- type KeymapPrimitive
- type MethodCallDialog
- func (d *MethodCallDialog) Clear()
- func (d *MethodCallDialog) Display(display bool)
- func (d *MethodCallDialog) Draw(screen tcell.Screen)
- func (d *MethodCallDialog) Focus(delegate func(p tview.Primitive))
- func (d *MethodCallDialog) Hide()
- func (d *MethodCallDialog) IsDisplay() bool
- func (d *MethodCallDialog) SetCentral(x int, y int, width int, height int)
- func (d *MethodCallDialog) SetContract(contract *service.Contract)
- func (d *MethodCallDialog) Show()
- type Notification
- func (n *Notification) Display(display bool)
- func (n *Notification) Draw(screen tcell.Screen)
- func (n *Notification) Hide()
- func (n *Notification) IsDisplay() bool
- func (n *Notification) KeyMaps() util.KeyMaps
- func (n *Notification) SetCentral(x int, y int, width int, height int)
- func (n *Notification) SetContent(title string, text string)
- func (n *Notification) Show()
- type QueryDialog
- func (d *QueryDialog) Clear()
- func (d *QueryDialog) Display(display bool)
- func (d *QueryDialog) Draw(screen tcell.Screen)
- func (d *QueryDialog) Finished()
- func (d *QueryDialog) Hide()
- func (d *QueryDialog) IsDisplay() bool
- func (d *QueryDialog) Loading()
- func (d *QueryDialog) SetCentral(x int, y int, width int, height int)
- func (d *QueryDialog) Show()
- type Root
- func (r *Root) Draw(screen tcell.Screen)
- func (r *Root) HasFocus() bool
- func (r *Root) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (r *Root) KeyMaps() util.KeyMaps
- func (r *Root) NotifyError(errmsg string)
- func (r *Root) NotifyInfo(message string)
- func (r *Root) SetRect(x int, y int, width int, height int)
- func (r *Root) ShowAccountPage(account *service.Account)
- func (r *Root) ShowHomePage()
- func (r *Root) ShowNotification(title string, text string)
- func (r *Root) ShowQueryDialog()
- func (r *Root) ShowSignInDialog()
- func (r *Root) ShowTransactionPage(transaction common.Transaction)
- func (r *Root) ShowTransferDialog()
- func (r *Root) SignIn(signer *service.Signer)
- type SenderFormItem
- func (s *SenderFormItem) Focus(delegate func(p tview.Primitive))
- func (s *SenderFormItem) GetFieldHeight() int
- func (s *SenderFormItem) GetFieldWidth() int
- func (s *SenderFormItem) GetLabel() string
- func (s *SenderFormItem) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
- func (s *SenderFormItem) SetFormAttributes(labelWidth int, labelColor tcell.Color, bgColor tcell.Color, ...) tview.FormItem
- func (s *SenderFormItem) SetSender(account *service.Signer)
- type SignInDialog
- func (d *SignInDialog) Clear()
- func (d *SignInDialog) Display(display bool)
- func (d *SignInDialog) Draw(screen tcell.Screen)
- func (d *SignInDialog) Finished()
- func (d *SignInDialog) Hide()
- func (d *SignInDialog) IsDisplay() bool
- func (d *SignInDialog) Loading()
- func (d *SignInDialog) SetCentral(x int, y int, width int, height int)
- func (d *SignInDialog) Show()
- type Signer
- type TransactionDetail
- type TransactionList
- func (t *TransactionList) Clear()
- func (t *TransactionList) Draw(screen tcell.Screen)
- func (t *TransactionList) FilterAndPrependTransactions(txns common.Transactions)
- func (t *TransactionList) HasFocus() bool
- func (t *TransactionList) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (t *TransactionList) KeyMaps() util.KeyMaps
- func (t *TransactionList) LoadAsync(loader func() (common.Transactions, error))
- func (t *TransactionList) PrependTransactions(txns common.Transactions)
- func (t *TransactionList) SetBaseAccount(account *common.Address)
- func (t *TransactionList) SetRect(x, y, width, height int)
- func (t *TransactionList) SetTransactions(txns common.Transactions)
- func (t *TransactionList) ViewReceiver()
- func (t *TransactionList) ViewSender()
- type TransferDialog
- func (d *TransferDialog) ClearAndRefresh()
- func (d *TransferDialog) Display(display bool)
- func (d *TransferDialog) Draw(screen tcell.Screen)
- func (d *TransferDialog) Hide()
- func (d *TransferDialog) IsDisplay() bool
- func (d *TransferDialog) KeyMaps() util.KeyMaps
- func (d *TransferDialog) SetCentral(x int, y int, width int, height int)
- func (d *TransferDialog) SetSender(account *service.Signer)
- func (d *TransferDialog) Show()
- type TxnPreviewDialog
- func (d *TxnPreviewDialog) Display(display bool)
- func (d *TxnPreviewDialog) Draw(screen tcell.Screen)
- func (d *TxnPreviewDialog) Hide()
- func (d *TxnPreviewDialog) IsDisplay() bool
- func (d *TxnPreviewDialog) KeyMaps() util.KeyMaps
- func (d *TxnPreviewDialog) SetCentral(x int, y int, width int, height int)
- func (d *TxnPreviewDialog) Show()
Constants ¶
const (
// TransactionListLimit is the length limit of transaction list
TransactionListLimit = 1000
)
Variables ¶
This section is empty.
Functions ¶
func InitKeymap ¶
func InitKeymap(p KeymapPrimitive, app *App)
func IsControlKey ¶
func IsControlKey(evt *tcell.EventKey) bool
IsControlKey returns true if the key is a control key.
func StyledAccountType ¶
func StyledAccountType(t serv.AccountType) string
func StyledNetworkName ¶
func StyledTxnDirection ¶
func StyledTxnDirection(base *common.Address, txn common.Transaction) string
Types ¶
type Account ¶
func NewAccount ¶
func (*Account) InputHandler ¶
InputHandler implements tview.Primitive
func (*Account) SetAccount ¶
func (*Account) ShowImportABIDialog ¶
func (a *Account) ShowImportABIDialog()
func (*Account) ShowMethodCallDialog ¶
func (a *Account) ShowMethodCallDialog()
type AccountInfo ¶
type App ¶
type App struct { *tview.Application // contains filtered or unexported fields }
type CallData ¶ added in v0.2.0
func NewCalldata ¶ added in v0.2.0
func (*CallData) Draw ¶ added in v0.2.0
func (c *CallData) Draw(screen tcell.Screen)
Draw implements tview.Primitive
type ChainInfo ¶
func NewChainInfo ¶
func (*ChainInfo) SetEthPrice ¶
func (*ChainInfo) SetGasPrice ¶
func (*ChainInfo) SetNetwork ¶
type ImportABIDialog ¶
func NewImportABIDialog ¶
func NewImportABIDialog(app *App) *ImportABIDialog
func (*ImportABIDialog) Clear ¶
func (d *ImportABIDialog) Clear()
func (*ImportABIDialog) Display ¶
func (d *ImportABIDialog) Display(display bool)
func (*ImportABIDialog) Draw ¶
func (d *ImportABIDialog) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*ImportABIDialog) Hide ¶
func (d *ImportABIDialog) Hide()
func (*ImportABIDialog) IsDisplay ¶
func (d *ImportABIDialog) IsDisplay() bool
func (*ImportABIDialog) KeyMaps ¶
func (d *ImportABIDialog) KeyMaps() util.KeyMaps
KeyMaps implements KeymapPrimitive
func (*ImportABIDialog) SetCentral ¶
func (d *ImportABIDialog) SetCentral(x int, y int, width int, height int)
func (*ImportABIDialog) Show ¶
func (d *ImportABIDialog) Show()
type KeymapPrimitive ¶
type MethodCallDialog ¶
func NewMethodCallDialog ¶
func NewMethodCallDialog(app *App) *MethodCallDialog
func (*MethodCallDialog) Clear ¶
func (d *MethodCallDialog) Clear()
func (*MethodCallDialog) Display ¶
func (d *MethodCallDialog) Display(display bool)
func (*MethodCallDialog) Draw ¶
func (d *MethodCallDialog) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*MethodCallDialog) Focus ¶
func (d *MethodCallDialog) Focus(delegate func(p tview.Primitive))
Focus implements tview.Focus
func (*MethodCallDialog) Hide ¶
func (d *MethodCallDialog) Hide()
func (*MethodCallDialog) IsDisplay ¶
func (d *MethodCallDialog) IsDisplay() bool
func (*MethodCallDialog) SetCentral ¶
func (d *MethodCallDialog) SetCentral(x int, y int, width int, height int)
func (*MethodCallDialog) SetContract ¶
func (d *MethodCallDialog) SetContract(contract *service.Contract)
func (*MethodCallDialog) Show ¶
func (d *MethodCallDialog) Show()
type Notification ¶
func NewNotification ¶
func NewNotification(app *App) *Notification
func (*Notification) Display ¶
func (n *Notification) Display(display bool)
func (*Notification) Draw ¶
func (n *Notification) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*Notification) Hide ¶
func (n *Notification) Hide()
func (*Notification) IsDisplay ¶
func (n *Notification) IsDisplay() bool
func (*Notification) KeyMaps ¶
func (n *Notification) KeyMaps() util.KeyMaps
KeyMaps implements KeymapPrimitive
func (*Notification) SetCentral ¶
func (n *Notification) SetCentral(x int, y int, width int, height int)
func (*Notification) SetContent ¶
func (n *Notification) SetContent(title string, text string)
func (*Notification) Show ¶
func (n *Notification) Show()
type QueryDialog ¶
type QueryDialog struct { *tview.InputField // contains filtered or unexported fields }
func NewQueryDialog ¶
func NewQueryDialog(app *App) *QueryDialog
func (*QueryDialog) Clear ¶
func (d *QueryDialog) Clear()
func (*QueryDialog) Display ¶
func (d *QueryDialog) Display(display bool)
func (*QueryDialog) Draw ¶
func (d *QueryDialog) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*QueryDialog) Finished ¶
func (d *QueryDialog) Finished()
Finished will stop and hide spinner, as well as close current dialog
func (*QueryDialog) Hide ¶
func (d *QueryDialog) Hide()
func (*QueryDialog) IsDisplay ¶
func (d *QueryDialog) IsDisplay() bool
func (*QueryDialog) Loading ¶
func (d *QueryDialog) Loading()
Loading will set the location of spinner and show it
func (*QueryDialog) SetCentral ¶
func (d *QueryDialog) SetCentral(x int, y int, width int, height int)
func (*QueryDialog) Show ¶
func (d *QueryDialog) Show()
type Root ¶
func (*Root) InputHandler ¶
InputHandler implements tview.Primitive
func (*Root) NotifyError ¶
func (*Root) NotifyInfo ¶
func (*Root) ShowAccountPage ¶
func (*Root) ShowHomePage ¶
func (r *Root) ShowHomePage()
func (*Root) ShowNotification ¶
func (*Root) ShowQueryDialog ¶
func (r *Root) ShowQueryDialog()
func (*Root) ShowSignInDialog ¶
func (r *Root) ShowSignInDialog()
func (*Root) ShowTransactionPage ¶
func (r *Root) ShowTransactionPage(transaction common.Transaction)
func (*Root) ShowTransferDialog ¶
func (r *Root) ShowTransferDialog()
type SenderFormItem ¶
func NewSenderFormItem ¶
func NewSenderFormItem(app *App) *SenderFormItem
func (*SenderFormItem) Focus ¶
func (s *SenderFormItem) Focus(delegate func(p tview.Primitive))
Focus implements tview.Primitive
func (*SenderFormItem) GetFieldHeight ¶
func (s *SenderFormItem) GetFieldHeight() int
GetFieldHeight implements tview.FormItem
func (*SenderFormItem) GetFieldWidth ¶
func (s *SenderFormItem) GetFieldWidth() int
GetFieldWidth implements tview.FormItem
func (*SenderFormItem) GetLabel ¶
func (s *SenderFormItem) GetLabel() string
GetLabel implements tview.FormItem
func (*SenderFormItem) SetFinishedFunc ¶
func (s *SenderFormItem) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
SetFinishedFunc implements tview.FormItem
func (*SenderFormItem) SetFormAttributes ¶
func (s *SenderFormItem) SetFormAttributes(labelWidth int, labelColor tcell.Color, bgColor tcell.Color, fieldTextColor tcell.Color, fieldBgColor tcell.Color) tview.FormItem
SetFormAttributes implements tview.FormItem
func (*SenderFormItem) SetSender ¶
func (s *SenderFormItem) SetSender(account *service.Signer)
type SignInDialog ¶
type SignInDialog struct { *tview.InputField // contains filtered or unexported fields }
func NewSignInDialog ¶
func NewSignInDialog(app *App) *SignInDialog
func (*SignInDialog) Clear ¶
func (d *SignInDialog) Clear()
func (*SignInDialog) Display ¶
func (d *SignInDialog) Display(display bool)
func (*SignInDialog) Draw ¶
func (d *SignInDialog) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*SignInDialog) Finished ¶
func (d *SignInDialog) Finished()
Finished will stop and hide spinner, as well as close current dialog
func (*SignInDialog) Hide ¶
func (d *SignInDialog) Hide()
func (*SignInDialog) IsDisplay ¶
func (d *SignInDialog) IsDisplay() bool
func (*SignInDialog) Loading ¶
func (d *SignInDialog) Loading()
Loading will set the location of spinner and show it
func (*SignInDialog) SetCentral ¶
func (d *SignInDialog) SetCentral(x int, y int, width int, height int)
func (*SignInDialog) Show ¶
func (d *SignInDialog) Show()
type Signer ¶
func (*Signer) HasSignedIn ¶
type TransactionDetail ¶
func NewTransactionDetail ¶
func NewTransactionDetail(app *App) *TransactionDetail
func (*TransactionDetail) KeyMaps ¶
func (t *TransactionDetail) KeyMaps() util.KeyMaps
func (*TransactionDetail) SetTransaction ¶
func (t *TransactionDetail) SetTransaction(transaction common.Transaction)
func (*TransactionDetail) ViewReceiver ¶ added in v0.2.0
func (t *TransactionDetail) ViewReceiver()
func (*TransactionDetail) ViewSender ¶ added in v0.2.0
func (t *TransactionDetail) ViewSender()
type TransactionList ¶
func NewTransactionList ¶
func NewTransactionList(app *App, showInOut bool) *TransactionList
func (*TransactionList) Clear ¶
func (t *TransactionList) Clear()
func (*TransactionList) Draw ¶
func (t *TransactionList) Draw(screen tcell.Screen)
Draw implements tview.Draw
func (*TransactionList) FilterAndPrependTransactions ¶
func (t *TransactionList) FilterAndPrependTransactions(txns common.Transactions)
FilterAndPrependTransactions is like PrependTransactions, but filters out transactions that are not related to the base account
func (*TransactionList) HasFocus ¶ added in v0.2.0
func (t *TransactionList) HasFocus() bool
HasFocus implements tview.Primitive
func (*TransactionList) InputHandler ¶ added in v0.2.0
func (t *TransactionList) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler implements tview.Primitive
func (*TransactionList) KeyMaps ¶ added in v0.2.0
func (t *TransactionList) KeyMaps() util.KeyMaps
func (*TransactionList) LoadAsync ¶
func (t *TransactionList) LoadAsync(loader func() (common.Transactions, error))
LoadAsync loads transactions asynchronously
func (*TransactionList) PrependTransactions ¶
func (t *TransactionList) PrependTransactions(txns common.Transactions)
PrependTransactions prepends transactions to existing transactions
func (*TransactionList) SetBaseAccount ¶
func (t *TransactionList) SetBaseAccount(account *common.Address)
SetBaseAccount sets the base account to determine whether a transaction is inflow or outflow
func (*TransactionList) SetRect ¶
func (t *TransactionList) SetRect(x, y, width, height int)
SetRect implements tview.SetRect
func (*TransactionList) SetTransactions ¶
func (t *TransactionList) SetTransactions(txns common.Transactions)
SetTransactions sets a transaction list
func (*TransactionList) ViewReceiver ¶ added in v0.2.0
func (t *TransactionList) ViewReceiver()
ViewReceiver jumps to the receiver's account page
func (*TransactionList) ViewSender ¶ added in v0.2.0
func (t *TransactionList) ViewSender()
ViewSender jumps to the sender's account page
type TransferDialog ¶
func NewTransferDialog ¶
func NewTransferDialog(app *App) *TransferDialog
func (*TransferDialog) ClearAndRefresh ¶
func (d *TransferDialog) ClearAndRefresh()
func (*TransferDialog) Display ¶
func (d *TransferDialog) Display(display bool)
func (*TransferDialog) Draw ¶
func (d *TransferDialog) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*TransferDialog) Hide ¶
func (d *TransferDialog) Hide()
func (*TransferDialog) IsDisplay ¶
func (d *TransferDialog) IsDisplay() bool
func (*TransferDialog) KeyMaps ¶
func (d *TransferDialog) KeyMaps() util.KeyMaps
KeyMaps implements KeymapPrimitive
func (*TransferDialog) SetCentral ¶
func (d *TransferDialog) SetCentral(x int, y int, width int, height int)
func (*TransferDialog) SetSender ¶
func (d *TransferDialog) SetSender(account *service.Signer)
func (*TransferDialog) Show ¶
func (d *TransferDialog) Show()
type TxnPreviewDialog ¶ added in v0.2.0
type TxnPreviewDialog struct { *TransactionDetail // contains filtered or unexported fields }
func NewTxnPreviewDialog ¶ added in v0.2.0
func NewTxnPreviewDialog(app *App) *TxnPreviewDialog
func (*TxnPreviewDialog) Display ¶ added in v0.2.0
func (d *TxnPreviewDialog) Display(display bool)
func (*TxnPreviewDialog) Draw ¶ added in v0.2.0
func (d *TxnPreviewDialog) Draw(screen tcell.Screen)
Draw implements tview.Primitive
func (*TxnPreviewDialog) Hide ¶ added in v0.2.0
func (d *TxnPreviewDialog) Hide()
func (*TxnPreviewDialog) IsDisplay ¶ added in v0.2.0
func (d *TxnPreviewDialog) IsDisplay() bool
func (*TxnPreviewDialog) KeyMaps ¶ added in v0.2.0
func (d *TxnPreviewDialog) KeyMaps() util.KeyMaps
KeyMaps implements KeymapPrimitive
func (*TxnPreviewDialog) SetCentral ¶ added in v0.2.0
func (d *TxnPreviewDialog) SetCentral(x int, y int, width int, height int)
func (*TxnPreviewDialog) Show ¶ added in v0.2.0
func (d *TxnPreviewDialog) Show()