/
wallet.go
140 lines (131 loc) · 4.86 KB
/
wallet.go
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
package models
type ListUnspent struct {
Txid string `json:"txid"`
Vout int `json:"vout"`
Address string `json:"address"`
Account string `json:"account"`
ScriptPubKey string `json:"scriptPubKey"`
Amount float64 `json:"amount"`
Confirmations int `json:"confirmations"`
Spendable bool `json:"spendable"`
}
type SignRawTransaction struct {
Hex string `json:"hex"`
Complete bool `json:"complete"`
}
type RawTxArray struct {
Txid string `json:"txid"`
Vout int `json:"vout"`
}
type GetTransaction struct {
Txid string `json:"txid"`
Version int `json:"version"`
Time int `json:"time"`
Locktime int `json:"locktime"`
Vin []struct {
Coinbase string `json:"coinbase"`
Sequence int `json:"sequence"`
} `json:"vin"`
Vout []struct {
Value float64 `json:"value"`
N int `json:"n"`
ScriptPubKey struct {
Asm string `json:"asm"`
Hex string `json:"hex"`
ReqSigs int `json:"reqSigs"`
Type string `json:"type"`
Addresses []string `json:"addresses"`
} `json:"scriptPubKey"`
} `json:"vout"`
Amount float64 `json:"amount"`
Confirmations int `json:"confirmations"`
Bcconfirmations int `json:"bcconfirmations"`
Generated bool `json:"generated"`
Blockhash string `json:"blockhash"`
Blockindex int `json:"blockindex"`
Blocktime int `json:"blocktime"`
Walletconflicts []interface{} `json:"walletconflicts"`
Timereceived int `json:"timereceived"`
Details []struct {
Account string `json:"account"`
Address string `json:"address"`
Category string `json:"category"`
Amount float64 `json:"amount"`
} `json:"details"`
}
type ListTransactions []struct {
Account string `json:"account"`
Address string `json:"address"`
Category string `json:"category"`
Amount float64 `json:"amount"`
Confirmations int `json:"confirmations"`
Bcconfirmations int `json:"bcconfirmations"`
Blockhash string `json:"blockhash,omitempty"`
Blockindex int `json:"blockindex,omitempty"`
Blocktime int `json:"blocktime,omitempty"`
Txid string `json:"txid"`
Walletconflicts []interface{} `json:"walletconflicts"`
Time int `json:"time"`
Timereceived int `json:"timereceived"`
}
type ListStakeRewards []struct {
Account string `json:"account"`
Address string `json:"address"`
Category string `json:"category"`
Amount float64 `json:"amount"`
Confirmations int `json:"confirmations"`
Bcconfirmations int `json:"bcconfirmations"`
Blockhash string `json:"blockhash"`
Txid string `json:"txid"`
Time int `json:"time"`
Timereceived int `json:"timereceived"`
}
type DaemonStatus struct {
Block bool `json:"block"`
BlockStake bool `json:"blockStake"`
WalletStake bool `json:"stakingActive"`
BlockCount int `json:"blockCount"`
MasternodeCount int `json:"masternodeCount"`
Difficulty float64 `json:"difficulty"`
HashRate string `json:"hashRate"`
CoinSupply float64 `json:"coinSupply"`
Version string `json:"version"`
}
type StakingInfo struct {
Enabled bool `json:"enabled"`
Staking bool `json:"staking"`
Errors string `json:"errors"`
Currentblocksize int `json:"currentblocksize"`
Currentblocktx int `json:"currentblocktx"`
Pooledtx int `json:"pooledtx"`
Difficulty float64 `json:"difficulty"`
SearchInterval int `json:"search-interval"`
Weight int64 `json:"weight"`
Netstakeweight int64 `json:"netstakeweight"`
Expectedtime int `json:"expectedtime"`
Stakethreshold int `json:"stakethreshold"`
}
type GetInfo struct {
Version string `json:"version"`
Protocolversion int `json:"protocolversion"`
Walletversion int `json:"walletversion"`
Balance float64 `json:"balance"`
Newmint float64 `json:"newmint"`
Stake float64 `json:"stake"`
Blocks int `json:"blocks"`
Timeoffset int `json:"timeoffset"`
Moneysupply float64 `json:"moneysupply"`
Connections int `json:"connections"`
Proxy string `json:"proxy"`
IP string `json:"ip"`
Difficulty struct {
ProofOfWork float64 `json:"proof-of-work"`
ProofOfStake float64 `json:"proof-of-stake"`
} `json:"difficulty"`
Testnet bool `json:"testnet"`
Keypoololdest int `json:"keypoololdest"`
Keypoolsize int `json:"keypoolsize"`
Paytxfee float64 `json:"paytxfee"`
Mininput float64 `json:"mininput"`
Errors string `json:"errors"`
}