-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
104 lines (96 loc) · 3.31 KB
/
structs.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
package insight
type blockHash struct {
BlockHash string `json:"blockHash"`
}
type blockJson struct {
Pages int `json:"pagesTotal"`
Transactions []*transaction `json:"txs"`
}
type transaction struct {
Txid string `json:"txid"`
Version int `json:"version"`
Locktime int `json:"locktime"`
Vin []struct {
Txid string `json:"txid"`
Vout int `json:"vout"`
Sequence int64 `json:"sequence"`
N int `json:"n"`
ScriptSig struct {
Hex string `json:"hex"`
Asm string `json:"asm"`
} `json:"scriptSig"`
Addr string `json:"addr"`
ValueSat int `json:"valueSat"`
Value float64 `json:"value"`
DoubleSpentTxID interface{} `json:"doubleSpentTxID"`
} `json:"vin"`
Vout []*insightVout `json:"vout"`
Blockhash string `json:"blockhash"`
Blockheight int `json:"blockheight"`
Confirmations int `json:"confirmations"`
Time int `json:"time"`
Blocktime int `json:"blocktime"`
ValueOut float64 `json:"valueOut"`
Size int `json:"size"`
ValueIn float64 `json:"valueIn"`
Fees float64 `json:"fees"`
}
type insightVout struct {
Value string `json:"value"`
N int `json:"n"`
ScriptPubKey *insightScriptPubKey `json:"scriptPubKey"`
SpentTxID interface{} `json:"spentTxId"`
SpentIndex interface{} `json:"spentIndex"`
SpentHeight interface{} `json:"spentHeight"`
}
type insightScriptPubKey struct {
Hex string `json:"hex"`
Asm string `json:"asm"`
Addresses []string `json:"addresses"`
Type string `json:"type"`
}
type btcSync struct {
Status string `json:"status"`
BlockChainHeight int `json:"blockChainHeight"`
SyncPercentage int `json:"syncPercentage"`
Height int `json:"height"`
Error interface{} `json:"error"`
Type string `json:"type"`
}
type blockTransactions struct {
PagesTotal int `json:"pagesTotal"`
BlockTxs []*blockTx `json:"txs"`
}
type blockTx struct {
Txid string `json:"txid"`
Version int `json:"version"`
Locktime int `json:"locktime"`
Vin []struct {
Coinbase string `json:"coinbase"`
Sequence int `json:"sequence"`
N int `json:"n"`
} `json:"vin"`
Vout []struct {
Value string `json:"value"`
N int `json:"n"`
ScriptPubKey struct {
Hex string `json:"hex"`
Asm string `json:"asm"`
Addresses []string `json:"addresses"`
Type string `json:"type"`
} `json:"scriptPubKey"`
SpentTxID interface{} `json:"spentTxId"`
SpentIndex interface{} `json:"spentIndex"`
SpentHeight interface{} `json:"spentHeight"`
} `json:"vout"`
Blockhash string `json:"blockhash"`
Blockheight int `json:"blockheight"`
Confirmations int `json:"confirmations"`
Time int `json:"time"`
Blocktime int `json:"blocktime"`
IsCoinBase bool `json:"isCoinBase,omitempty"`
ValueOut float64 `json:"valueOut"`
Size int `json:"size"`
ValueIn float64 `json:"valueIn,omitempty"`
Fees interface{} `json:"fees,omitempty"`
}