forked from toorop/go-bitcoind
-
Notifications
You must be signed in to change notification settings - Fork 2
/
block.go
61 lines (58 loc) · 2.69 KB
/
block.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
package navcoind
type Block struct {
Hash string `json:"hash"`
Confirmations uint64 `json:"confirmations"`
StrippedSize uint64 `json:"strippedsize"`
Size uint64 `json:"size"`
Weight uint64 `json:"weight"`
Height uint64 `json:"height"`
Version uint32 `json:"version"`
VersionHex string `json:"versionHex"`
MerkleRoot string `json:"merkleroot"`
Tx []string `json:"tx"`
TxCount uint `json:"tx_count"`
ProposalCount uint `json:"proposal_count"`
PaymentRequestCount uint `json:"payment_request_count"`
ProposalVotesCount uint `json:"proposal_votes_count"`
PaymentRequestVotesCount uint `json:"payment_request_votes_count"`
PaymentRequestPayoutsCount uint `json:"payment_request_payouts_count"`
Time int64 `json:"time"`
MedianTime int64 `json:"mediantime"`
Nonce uint64 `json:"nonce"`
Bits string `json:"bits"`
Difficulty float64 `json:"difficulty"`
ChainWork string `json:"chainwork,omitempty"`
PreviousBlockHash string `json:"previousblockhash"`
NextBlockHash string `json:"nextblockhash"`
}
type BlockHeader struct {
Hash string `json:"hash"`
Confirmations uint64 `json:"confirmations"`
Height uint64 `json:"height"`
Version uint32 `json:"version"`
VersionHex string `json:"versionHex"`
MerkleRoot string `json:"merkleroot"`
Time int64 `json:"time"`
MedianTime int64 `json:"mediantime"`
Mint float64 `json:"mint"`
Nonce uint64 `json:"nonce"`
Bits string `json:"bits"`
Difficulty float64 `json:"difficulty"`
ChainWork string `json:"chainwork"`
NcfSupply string `json:"ncfsupply"`
NcfLocked string `json:"ncflocked"`
Flags string `json:"flags"`
ProofHash string `json:"proofhash"`
EntropyBit int64 `json:"entropybit"`
Modifier string `json:"modifier"`
CfundVotes []DaoVote `json:"cfund_votes"`
CfundRequestVotes []DaoVote `json:"cfund_request_votes"`
DaoSupport []string `json:"dao_support"`
DaoVotes []DaoVote `json:"dao_votes"`
PreviousBlockHash string `json:"previousblockhash"`
NextBlockHash string `json:"nextblockhash"`
}
type DaoVote struct {
Hash string `json:"hash"`
Vote int `json:"vote"`
}