-
Notifications
You must be signed in to change notification settings - Fork 4
/
blocks.go
53 lines (49 loc) · 1.82 KB
/
blocks.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
package data
import (
"time"
"github.com/shopspring/decimal"
)
// Block -
type Block struct {
Cycle int64 `json:"cycle"`
Level uint64 `json:"level"`
Hash string `json:"hash"`
Timestamp time.Time `json:"timestamp"`
Proto int64 `json:"proto"`
Priority int64 `json:"priority"`
Validations int64 `json:"validations"`
BlockRound uint64 `json:"blockRound"`
PayloadRound uint64 `josn:"payloadRound"`
Deposit int64 `json:"deposit"`
Reward int64 `json:"reward"`
Fees int64 `json:"fees"`
Bonus int64 `json:"bonus"`
LbEscapeEma int64 `json:"lbEscapeEma"`
NonceRevealed bool `json:"nonceRevealed"`
LbEscapeVote bool `json:"lbEscapeVote"`
LbToggleEma uint64 `json:"lbToggleEma"`
Baker Address `json:"baker"`
}
// Head -
type Head struct {
Chain string `json:"chain"`
ChainID string `json:"chainId"`
Cycle int64 `json:"cycle"`
Level uint64 `json:"level"`
Hash string `json:"hash"`
Protocol string `json:"protocol"`
Timestamp time.Time `json:"timestamp"`
VotingEpoch int64 `json:"votingEpoch"`
VotingPeriod int64 `json:"votingPeriod"`
KnownLevel uint64 `json:"knownLevel"`
LastSync time.Time `json:"lastSync"`
Synced bool `json:"synced"`
QuoteLevel uint64 `json:"quoteLevel"`
QuoteBtc decimal.Decimal `json:"quoteBtc"`
QuoteEur decimal.Decimal `json:"quoteEur"`
QuoteUsd decimal.Decimal `json:"quoteUsd"`
QuoteCny decimal.Decimal `json:"quoteCny"`
QuoteJpy decimal.Decimal `json:"quoteJpy"`
QuoteKrw decimal.Decimal `json:"quoteKrw"`
QuoteEth decimal.Decimal `json:"quoteEth"`
}