Documentation ¶
Index ¶
- Constants
- Variables
- func CustomTheme() fyne.Theme
- func DarkerTheme() *prettyfyne.PrettyTheme
- func DefaultJsonFor(endpoint string) string
- func EncryptSettings(set *FioSettings, salt []byte, password string) (encrypted []byte, err error)
- func ExGreyTheme() prettyfyne.PrettyTheme
- func ExLightTheme() prettyfyne.PrettyTheme
- func FioDomainNameHash(s string) string
- func FioLogoCanvas() fyne.CanvasObject
- func FlipEndian(orig []byte) []byte
- func GetAbiForm(action string, account *fio.Account, api *fio.API, opts *fio.TxOptions) (fyne.CanvasObject, error)
- func GetAbiViewer(w int, h int, api *fio.API) (tab *widget.Box, ok bool)
- func GetChains() []string
- func GetCurrentVotes(actor string, api *fio.API) (votes string)
- func GetLocation(i int) string
- func GetPending(refreshChan chan bool, account *fio.Account, api *fio.API) (form fyne.CanvasObject, err error)
- func GetTableBrowser(w int, h int, api *fio.API) (tab *widget.Box, ok bool)
- func GetTokens(s string) []string
- func InitServerInfo(info chan ServerInfo, reconnected chan bool) fyne.CanvasObject
- func KeyGenTab() *widget.Box
- func MkDir() (ok bool, err error)
- func MsigRequestsContent(api *fio.API, opts *fio.TxOptions, account *fio.Account) *widget.TabItem
- func NewAccountSearchTab(box chan fyne.Container, account *fio.Account)
- func NewApiRequestTab(container chan fyne.Container)
- func NewRequest(account *fio.Account, api *fio.API) fyne.CanvasObject
- func PctHeight() int
- func PromptForPassword()
- func ProposalRows(offset int, limit int, api *fio.API, opts *fio.TxOptions, account *fio.Account) *widget.Box
- func QueryTable(offset uint32, max uint32, contract string, table string, api *fio.API) (out *string, query string, more bool)
- func QueryTableAdvanced(max uint32, scope string, contract string, table string, index string, ...) (out *string, query string, more bool)
- func RWidth() int
- func RequestContent(reqContent chan fyne.CanvasObject, refresh chan bool)
- func ResetTxResult()
- func RespondRequest(req *fio.FundsReqTableResp, decrypted *fio.ObtRequestContent, ...) fyne.CanvasObject
- func SaveEncryptedSettings(password string, settings *FioSettings) (ok bool, err error)
- func SettingsWindow()
- func ShowFullRequest(b []byte, win fyne.Window)
- func ShowFullResponse(b []byte, win fyne.Window)
- func TxResultsWindow(win *txResultOpts, api *fio.API, opts *fio.TxOptions, account *fio.Account)
- func UpdateAuthContent(container chan fyne.Container, api *fio.API, opts *fio.TxOptions, ...)
- func ViewRequest(id uint64, closed chan interface{}, refresh chan bool, account *fio.Account, ...) fyne.CanvasObject
- func VoteContent(content chan fyne.CanvasObject, refresh chan bool)
- type Abi
- func (abi *Abi) AddNewRowButton(name *widget.Entry, account *fio.Account, form *widget.Form) *widget.Button
- func (abi *Abi) AppendRow(myName string, account *fio.Account, form *widget.Form)
- func (abi *Abi) DeriveJsonAbi() (abiJson []byte)
- func (abi *Abi) GeneratePayloads(key *fio.Account) error
- func (abi *Abi) PackAndSign(api *fio.API, opts *fio.TxOptions, account *fio.Account, msig bool) (json.RawMessage, *eos.PackedTransaction, error)
- func (abi *Abi) Update(index *int, abiForm AbiFormItem)
- func (abi *Abi) UpdateInput(name string, t *widget.Entry)
- func (abi *Abi) UpdateLen(name string, t *widget.Select)
- func (abi *Abi) UpdateSendAs(name string, t *widget.Select)
- func (abi *Abi) UpdateType(name string, t *widget.Select)
- func (abi *Abi) UpdateValue(index *int, value interface{}, isSlice bool, noJsonEscape bool)
- func (abi *Abi) UpdateValueWithConvert(index *int, value interface{}, isSlice bool, abiType string, noJsonEscape bool)
- func (abi *Abi) UpdateVariation(name string, t *widget.Select)
- type AbiFormItem
- type AccountInformation
- type AddressesList
- type ClickEntry
- type EnterEntry
- type EnterSelectEntry
- type FioActions
- type FioAddressStruct
- type FioCustomTheme
- func (FioCustomTheme) BackgroundColor() color.Color
- func (FioCustomTheme) ButtonColor() color.Color
- func (FioCustomTheme) DisabledButtonColor() color.Color
- func (FioCustomTheme) DisabledIconColor() color.Color
- func (FioCustomTheme) DisabledTextColor() color.Color
- func (FioCustomTheme) FocusColor() color.Color
- func (FioCustomTheme) HoverColor() color.Color
- func (FioCustomTheme) HyperlinkColor() color.Color
- func (FioCustomTheme) IconColor() color.Color
- func (FioCustomTheme) IconInlineSize() int
- func (FioCustomTheme) Padding() int
- func (FioCustomTheme) PlaceHolderColor() color.Color
- func (FioCustomTheme) PrimaryColor() color.Color
- func (FioCustomTheme) ScrollBarColor() color.Color
- func (FioCustomTheme) ScrollBarSize() int
- func (FioCustomTheme) ScrollBarSmallSize() int
- func (FioCustomTheme) ShadowColor() color.Color
- func (FioCustomTheme) TextBoldFont() fyne.Resource
- func (FioCustomTheme) TextBoldItalicFont() fyne.Resource
- func (FioCustomTheme) TextColor() color.Color
- func (FioCustomTheme) TextFont() fyne.Resource
- func (FioCustomTheme) TextItalicFont() fyne.Resource
- func (FioCustomTheme) TextMonospaceFont() fyne.Resource
- func (FioCustomTheme) TextSize() int
- type FioDomainStruct
- type FioSettings
- type ProducerInfo
- type ServerInfo
- type SupportedApis
- type TableBrowserIndex
- type TxResult
- type TxSummary
Constants ¶
View Source
const (
AppTitle = "Cryptonym"
)
Variables ¶
View Source
var ( WinSettings = getSavedWindowSettings() W = WinSettings.W H = WinSettings.H ActionW = 220 // width of action buttons on left side WidthReduce = 26 // trim down size of right window this much to account for padding App = app.NewWithID("explorer") Win = App.NewWindow(AppTitle) BalanceChan = make(chan bool) BalanceLabel = widget.NewLabel("") DefaultFioAddress = "" TableIndex = NewTableIndex() EndPoints = SupportedApis{Apis: []string{"/v1/chain/push_transaction"}} RepaintChan = make(chan bool) PasswordVisible bool SettingsLoaded = make(chan *FioSettings) Settings = DefaultSettings() TxResultBalanceChan = make(chan string) TxResultBalanceChanOpen = false Connected bool Uri = "" Api = &fio.API{} Opts = &fio.TxOptions{} Account = func() *fio.Account { a, _ := fio.NewAccountFromWif("5JBbUG5SDpLWxvBKihMeXLENinUzdNKNeozLas23Mj6ZNhz3hLS") return a }() )
View Source
var ( MsigRefreshRequests = make(chan bool) MsigLastTab = 0 MsigLoaded bool )
View Source
var (
FormState = NewAbi(0)
)
View Source
var MainnetApi = []string{
"https://fio.eosdac.io",
"https://fio.eosphere.io",
"https://fio.eosrio.io",
"https://fio.eosusa.news",
"https://api.fio.alohaeos.com",
"https://fio.genereos.io",
"https://fio.greymass.com",
"https://api.fio.eosdetroit.io",
"https://fio.zenblocks.io",
"https://api.fio.currencyhub.io",
"https://fio.cryptolions.io",
"https://fio.eosdublin.io",
"https://api.fio.greeneosio.com",
"https://api.fiosweden.org",
"https://fio.eu.eosamsterdam.net",
"https://fioapi.ledgerwise.io",
"https://fio.acherontrading.com",
}
View Source
var PrivilegedActions = map[string]bool{ "eosio::addaction": true, "eosio::addlocked": true, "eosio::burnaction": true, "eosio::canceldelay": true, "eosio::crautoproxy": true, "eosio::incram": true, "eosio::inhibitunlck": true, "eosio::init": true, "eosio::setpriv": true, "eosio::newaccount": true, "eosio::onblock": true, "eosio::onerror": true, "eosio::resetclaim": true, "eosio::remaction": true, "eosio::rmvproducer": true, "eosio::setabi": true, "eosio::setautoproxy": true, "eosio::setcode": true, "eosio::setparams": true, "eosio::unlocktokens": true, "eosio::updatepower": true, "eosio::updlbpclaim": true, "eosio::updlocked": true, "eosio::updtrevision": true, "eosio.wrap::execute": true, "fio.address::bind2eosio": true, "fio.address::decrcounter": true, "fio.token::create": true, "fio.token::issue": true, "fio.token::mintfio": true, "fio.token::retire": true, "fio.token::transfer": true, "fio.tpid::rewardspaid": true, "fio.tpid::updatebounty": true, "fio.tpid::updatetpid": true, "fio.treasury::startclock": true, "fio.treasury::bppoolupdate": true, "fio.treasury::bprewdupdate": true, "fio.treasury::fdtnrwdupdat": true, }
View Source
var ProducerActions = map[string]bool{ "fio.treasury::bpclaim": true, "fio.address::burnexpired": true, "fio.fee::bundlevote": true, "fio.fee::bytemandfee": true, "fio.fee::createfee": true, "fio.fee::mandatoryfee": true, "fio.fee::setfeemult": true, "fio.fee::setfeevote": true, "fio.fee::updatefees": true, "eosio::regproducer": true, "eosio::unregprod": true, }
View Source
var RefreshQr = make(chan bool)
View Source
var RefreshRequestsChan = make(chan bool)
View Source
var RefreshVotesChan = make(chan bool)
View Source
var (
Results = make([]TxResult, 0)
)
Functions ¶
func CustomTheme ¶
func DarkerTheme ¶
func DarkerTheme() *prettyfyne.PrettyTheme
func DefaultJsonFor ¶
func EncryptSettings ¶
func EncryptSettings(set *FioSettings, salt []byte, password string) (encrypted []byte, err error)
func ExGreyTheme ¶
func ExGreyTheme() prettyfyne.PrettyTheme
func ExLightTheme ¶
func ExLightTheme() prettyfyne.PrettyTheme
func FioDomainNameHash ¶
func FioLogoCanvas ¶
func FioLogoCanvas() fyne.CanvasObject
func FlipEndian ¶
func GetAbiForm ¶
func GetAbiForm(action string, account *fio.Account, api *fio.API, opts *fio.TxOptions) (fyne.CanvasObject, error)
GetAbiForm returns the fyne form for editing the request, it also handles state tracking via the FormState which is later used to build the transaction.
func GetCurrentVotes ¶
func GetLocation ¶
func GetPending ¶
func GetPending(refreshChan chan bool, account *fio.Account, api *fio.API) (form fyne.CanvasObject, err error)
func InitServerInfo ¶
func InitServerInfo(info chan ServerInfo, reconnected chan bool) fyne.CanvasObject
func MsigRequestsContent ¶
func NewAccountSearchTab ¶
func NewApiRequestTab ¶
func NewRequest ¶
func NewRequest(account *fio.Account, api *fio.API) fyne.CanvasObject
func PromptForPassword ¶
func PromptForPassword()
func ProposalRows ¶
func QueryTable ¶
func QueryTableAdvanced ¶
func RequestContent ¶
func RequestContent(reqContent chan fyne.CanvasObject, refresh chan bool)
func ResetTxResult ¶
func ResetTxResult()
func RespondRequest ¶
func RespondRequest(req *fio.FundsReqTableResp, decrypted *fio.ObtRequestContent, closed chan interface{}, account *fio.Account, api *fio.API) fyne.CanvasObject
func SaveEncryptedSettings ¶
func SaveEncryptedSettings(password string, settings *FioSettings) (ok bool, err error)
func SettingsWindow ¶
func SettingsWindow()
func ShowFullRequest ¶
func ShowFullResponse ¶
func TxResultsWindow ¶
func TxResultsWindow(win *txResultOpts, api *fio.API, opts *fio.TxOptions, account *fio.Account)
func UpdateAuthContent ¶
func ViewRequest ¶
func ViewRequest(id uint64, closed chan interface{}, refresh chan bool, account *fio.Account, api *fio.API) fyne.CanvasObject
func VoteContent ¶
func VoteContent(content chan fyne.CanvasObject, refresh chan bool)
Types ¶
type Abi ¶
type Abi struct { Rows []AbiFormItem Action string Contract string // contains filtered or unexported fields }
func (*Abi) AddNewRowButton ¶
func (*Abi) DeriveJsonAbi ¶
func (*Abi) GeneratePayloads ¶
TODO: rethink this, instead of calling this every request, maybe pass pointers to functions?
func (*Abi) PackAndSign ¶
func (abi *Abi) PackAndSign(api *fio.API, opts *fio.TxOptions, account *fio.Account, msig bool) (json.RawMessage, *eos.PackedTransaction, error)
func (*Abi) Update ¶
func (abi *Abi) Update(index *int, abiForm AbiFormItem)
func (*Abi) UpdateValue ¶
func (*Abi) UpdateValueWithConvert ¶
type AbiFormItem ¶
type AccountInformation ¶
type AccountInformation struct { *sync.Mutex Actor string `json:"actor"` PubKey string `json:"pub_key"` PrivKey string `json:"priv_key"` Balance int64 `json:"balance"` BundleCred int `json:"bundle_cred"` MsigOwners []string `json:"msig_owners"` MsigThresh uint32 `json:"msig_thresh"` RamUsed int64 `json:"ram_used"` FioNames []FioAddressStruct `json:"fio_names"` FioDomains []FioDomainStruct `json:"fio_domains"` PublicKeys []AddressesList `json:"public_keys"` Producer *ProducerInfo `json:"producer"` // contains filtered or unexported fields }
func AccountSearch ¶
func AccountSearch(searchFor string, value string) (as *AccountInformation, err error)
type AddressesList ¶
type ClickEntry ¶
func NewClickEntry ¶
func NewClickEntry(b *widget.Button) *ClickEntry
func (*ClickEntry) KeyDown ¶
func (e *ClickEntry) KeyDown(key *fyne.KeyEvent)
type EnterEntry ¶
func NewEnterEntry ¶
func NewEnterEntry(f func()) *EnterEntry
func (*EnterEntry) KeyDown ¶
func (e *EnterEntry) KeyDown(key *fyne.KeyEvent)
type EnterSelectEntry ¶
type EnterSelectEntry struct { widget.SelectEntry Action func() }
func NewEnterSelectEntry ¶
func NewEnterSelectEntry(entries []string, f func()) *EnterSelectEntry
func (*EnterSelectEntry) KeyDown ¶
func (e *EnterSelectEntry) KeyDown(key *fyne.KeyEvent)
type FioActions ¶
func GetAccountSummary ¶
func GetAccountSummary(api *fio.API) (*FioActions, error)
type FioAddressStruct ¶
type FioAddressStruct struct { Id int `json:"id"` Name string `json:"name"` NameHash string `json:"namehash"` Domain string `json:"domain"` DomainHash string `json:"domainhash"` Expiration int64 `json:"expiration"` OwnerAccount string `json:"owner_account"` Addresses []AddressesList `json:"addresses"` BundleCount uint64 `json:"bundleeligiblecountdown"` }
type FioCustomTheme ¶
type FioCustomTheme struct { }
FioCustomTheme is a simple demonstration of a bespoke theme loaded by a Fyne app.
func (FioCustomTheme) BackgroundColor ¶
func (FioCustomTheme) BackgroundColor() color.Color
func (FioCustomTheme) ButtonColor ¶
func (FioCustomTheme) ButtonColor() color.Color
func (FioCustomTheme) DisabledButtonColor ¶
func (FioCustomTheme) DisabledButtonColor() color.Color
func (FioCustomTheme) DisabledIconColor ¶
func (FioCustomTheme) DisabledIconColor() color.Color
func (FioCustomTheme) DisabledTextColor ¶
func (FioCustomTheme) DisabledTextColor() color.Color
func (FioCustomTheme) FocusColor ¶
func (FioCustomTheme) FocusColor() color.Color
func (FioCustomTheme) HoverColor ¶
func (FioCustomTheme) HoverColor() color.Color
func (FioCustomTheme) HyperlinkColor ¶
func (FioCustomTheme) HyperlinkColor() color.Color
func (FioCustomTheme) IconColor ¶
func (FioCustomTheme) IconColor() color.Color
func (FioCustomTheme) IconInlineSize ¶
func (FioCustomTheme) IconInlineSize() int
func (FioCustomTheme) Padding ¶
func (FioCustomTheme) Padding() int
func (FioCustomTheme) PlaceHolderColor ¶
func (FioCustomTheme) PlaceHolderColor() color.Color
func (FioCustomTheme) PrimaryColor ¶
func (FioCustomTheme) PrimaryColor() color.Color
func (FioCustomTheme) ScrollBarColor ¶
func (FioCustomTheme) ScrollBarColor() color.Color
func (FioCustomTheme) ScrollBarSize ¶
func (FioCustomTheme) ScrollBarSize() int
func (FioCustomTheme) ScrollBarSmallSize ¶
func (FioCustomTheme) ScrollBarSmallSize() int
func (FioCustomTheme) ShadowColor ¶
func (FioCustomTheme) ShadowColor() color.Color
func (FioCustomTheme) TextBoldFont ¶
func (FioCustomTheme) TextBoldFont() fyne.Resource
func (FioCustomTheme) TextBoldItalicFont ¶
func (FioCustomTheme) TextBoldItalicFont() fyne.Resource
func (FioCustomTheme) TextColor ¶
func (FioCustomTheme) TextColor() color.Color
func (FioCustomTheme) TextFont ¶
func (FioCustomTheme) TextFont() fyne.Resource
func (FioCustomTheme) TextItalicFont ¶
func (FioCustomTheme) TextItalicFont() fyne.Resource
func (FioCustomTheme) TextMonospaceFont ¶
func (FioCustomTheme) TextMonospaceFont() fyne.Resource
func (FioCustomTheme) TextSize ¶
func (FioCustomTheme) TextSize() int
type FioDomainStruct ¶
type FioDomainStruct struct { Name string `json:"name"` IsPublic uint8 `json:"is_public"` Expiration int64 `json:"expiration"` Account eos.AccountName `json:"account"` }
type FioSettings ¶
type FioSettings struct { Server string `json:"server"` Proxy string `json:"proxy"` DefaultKey string `json:"default_key"` DefaultKeyDesc string `json:"default_key_desc"` FavKey2 string `json:"fav_key_2"` FavKey2Desc string `json:"fav_key_2_desc"` FavKey3 string `json:"fav_key_3"` FavKey3Desc string `json:"fav_key_3_desc"` FavKey4 string `json:"fav_key_4"` FavKey4Desc string `json:"fav_key_4_desc"` MsigAccount string `json:"msig_account"` Tpid string `json:"tpid"` AdvancedFeatures bool `json:"advanced_features"` // future: KeosdAddress string `json:"keosd_address"` KeosdPassword string `json:"keosd_password"` }
func DecryptSettings ¶
func DecryptSettings(encrypted []byte, password string) (settings *FioSettings, err error)
func DefaultSettings ¶
func DefaultSettings() *FioSettings
func LoadEncryptedSettings ¶
func LoadEncryptedSettings(password string) (ok bool, fileLength int, settings *FioSettings, err error)
will never return a nil settings
type ProducerInfo ¶
type ProducerInfo struct { Owner string `json:"owner"` FioAddress string `json:"fio_address"` TotalVotes float64 `json:"total_votes"` ProducerPublicKey string `json:"producer_public_key"` IsActive bool `json:"is_active"` Url string `json:"url"` UnpaidBlocks int `json:"unpaid_blocks"` LastClaimTime time.Time `json:"last_claim_time"` Location int `json:"location"` }
type ServerInfo ¶
type SupportedApis ¶
type SupportedApis struct {
Apis []string `json:"apis"`
}
type TableBrowserIndex ¶
type TableBrowserIndex struct {
// contains filtered or unexported fields
}
func NewTableIndex ¶
func NewTableIndex() *TableBrowserIndex
func (*TableBrowserIndex) Add ¶
func (tb *TableBrowserIndex) Add(contract string, tables []string) (ok bool)
func (*TableBrowserIndex) Get ¶
func (tb *TableBrowserIndex) Get(contract string) (tables []string)
func (*TableBrowserIndex) IsCreated ¶
func (tb *TableBrowserIndex) IsCreated() bool
func (*TableBrowserIndex) List ¶
func (tb *TableBrowserIndex) List() []string
func (*TableBrowserIndex) SetCreated ¶
func (tb *TableBrowserIndex) SetCreated(b bool)
type TxSummary ¶
type TxSummary struct { TransactionId string `json:"transaction_id" yaml:"Transaction Id"` Processed struct { BlockNum uint32 `json:"block_num" yaml:"Block Number"` BlockTime string `json:"block_time" yaml:"Block Time"` Receipt struct { Status string `json:"status" yaml:"Status"` } `json:"receipt" yaml:"Receipt,omitempty"` } `json:"processed" yaml:"Processed,omitempty"` ErrorCode interface{} `json:"error_code" yaml:"Error,omitempty"` // is this a string, int, varies on context? TotalBytes int `json:"total_bytes,omitempty" yaml:"TX Size of All Actions,omitempty"` // this is field we calculate later }
Source Files ¶
- abi-form.go
- account-form.go
- account-info.go
- action-form.go
- action-state.go
- action-vars.go
- api-form.go
- api-get.go
- contract-explorer.go
- init.go
- key-generator.go
- log_linux.go
- msig-form.go
- msig-requests.go
- payload.go
- requests-form.go
- server-info.go
- settings-window.go
- settings.go
- table.go
- theme.go
- tx-result.go
- vanity.go
- vote.go
Click to show internal directories.
Click to hide internal directories.