forked from secretnamebasis/simple-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructs.go
More file actions
191 lines (182 loc) · 3.28 KB
/
structs.go
File metadata and controls
191 lines (182 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
package main
import (
"image"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/widget"
"github.com/deroproject/derohe/blockchain"
derodrpc "github.com/deroproject/derohe/cmd/derod/rpc"
"github.com/deroproject/derohe/rpc"
"github.com/deroproject/derohe/walletapi"
"github.com/deroproject/derohe/walletapi/rpcserver"
"github.com/deroproject/derohe/walletapi/xswd"
)
// leveraging go's strong types is extremely helpful
type (
components struct {
wallet *walletapi.Wallet_Disk
ws_server *xswd.XSWD
rpc_server *rpcserver.RPCServer
simulator_server *derodrpc.RPCServer
node nodes
caches caches
application fyne.App
preferences fyne.Preferences
selections selections
tables tables
dialogues dialogues
activities activities
toggles toggles
sliders sliders
checks checks
lists lists
entries entries
containers containers
hyperlinks hyperlinks
labels labels
buttons buttons
window fyne.Window
encryption fyne.Window
contracts fyne.Window
explorer fyne.Window
loggedIn bool
name string
receiver string
size fyne.Size
}
nodes struct {
pool rpc.GetTxPool_Result
info rpc.GetInfo_Result
simulator_chain *blockchain.Blockchain
simulator_wallets []*walletapi.Wallet_Disk
simulator_rpcservers []*rpcserver.RPCServer
transactions map[string]rpc.GetTransaction_Result
blocks map[uint64]rpc.GetBlock_Result
list []struct {
ip string
name string
}
current string
}
assets []asset
asset struct {
name string
hash string
image image.Image
}
caches struct {
assets assets
}
dialogues struct {
login *dialog.ConfirmDialog
}
checks struct {
replyback *widget.Check
}
sliders struct {
notifications,
network *widget.Slider
}
toggles struct {
rpc_server *widget.RadioGroup
ws_server *widget.RadioGroup
simulator *widget.RadioGroup
}
containers struct {
topbar,
home,
tools,
configs,
bottombar,
// supplemental
dashboard,
send,
register,
toolbox *fyne.Container
}
hyperlinks struct {
home,
tools,
configs,
login, logout,
// supplemental
lockscreen,
unlock,
generate,
restore,
create,
address,
save *widget.Hyperlink
}
buttons struct {
register,
open_wallet,
open_file,
transactions,
assets,
keys,
send,
simulator,
simulation,
connections,
ws_server,
rpc_server,
update_password,
contracts,
encryption,
token_add,
balance_rescan,
notifications,
asset_scan,
explorer *widget.Button
}
tables struct {
connections *widget.Table
}
selections struct {
assets *widget.Select
}
lists struct {
transactions,
asset_list *widget.List
}
activities struct {
registration *widget.Activity
}
entries struct {
wallet,
file,
node,
username, password,
pass,
seed,
counterparty,
recipient,
amount,
dst,
comment,
port,
secret,
public *widget.Entry
}
labels struct {
height,
connection,
current_node,
rpc_server,
ws_server,
balance,
counter,
notice,
mainnet,
testnet,
simulator,
loggedin,
address,
seed,
secret,
public *widget.Label
}
)
type wallet_entries []rpc.Entry
type list []string