forked from toorop/go-bitcoind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.go
57 lines (40 loc) · 1.53 KB
/
info.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
package bitcoind
// Info response for getblockchaininfo
type Info struct {
Chain string `json:"chain"`
Blocks uint32 `json:"blocks"`
Headers uint32 `json:"headers"`
BestBlockHash string `json:"bestblockhash"`
Difficulty float64 `json:"difficulty"`
MedianTime uint64 `json:"mediantime"`
VerificationProgress float64 `json:"verificationprogress"`
InitialBlockDownload bool `json:"initialblockdownload"`
ChainWork string `json:"chainwork"`
SizeOnDisk uint64 `json:"size_on_disk"`
Pruned bool `json:"pruned"`
SoftForks []*SoftForks `json:"softforks"`
}
// WalletInfo - wallet state info
// https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/getwalletinfo/
type WalletInfo struct {
WalletName string `json:"walletname"`
WalletVersion float64 `json:"walletversion"`
Balance float64 `json:"balance"`
UnconfirmedBalance float64 `json:"unconfirmed_balance"`
ImmatureBalance float64 `json:"immature_balance"`
TxCount int64 `json:"txcount"`
KeyPoolOldest int64 `json:"keypoololdest"`
KeyPoolSize int64 `json:"keypoolsize"`
KeyPoolSizeHdInternal int64 `json:"keypoolsize_hd_internal"`
UnlockedUntil *int64 `json:"unlocked_until"`
PaytxFee float64 `json:"paytxfee"`
HdMasterKeyID *string `json:"hdmasterkeyid"`
}
type SoftForks struct{
ID string `json:"id"`
Version uint32 `json:"version"`
Reject *Reject `json:"reject"`
}
type Reject struct{
Status bool `json:"status"`
}