This repository has been archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
53 lines (46 loc) · 1.78 KB
/
types.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 main
import "encoding/json"
type WebSocketResponse struct {
Type string `json:"type"`
Filter Filter `json:"filter"`
Data json.RawMessage `json:"data"`
}
type Filter struct {
From int `json:"from"`
To int `json:"to"`
Role string `json:"role"`
PublicKey string `json:"publicKey"`
}
type Data struct {
Signature string `json:"Signature"`
Signers []int `json:"Signers"`
Message Message `json:"Message"`
FullData FullData `json:"FullData"`
}
type Message struct {
MsgType int `json:"MsgType"`
Height int `json:"Height"`
Round int `json:"Round"`
Identifier string `json:"Identifier"`
Root []int `json:"Root"`
DataRound int `json:"DataRound"`
RoundChangeJustification []string `json:"RoundChangeJustification"`
PrepareJustification []string `json:"PrepareJustification"`
}
type FullData struct {
Duty Duty `json:"Duty"`
Version string `json:"Version"`
PreConsensusJustifications []string `json:"PreConsensusJustifications"`
DataSSZ string `json:"DataSSZ"`
}
type Duty struct {
Type int `json:"Type"`
PubKey string `json:"PubKey"`
Slot string `json:"Slot"`
ValidatorIndex string `json:"ValidatorIndex"`
CommitteeIndex int `json:"CommitteeIndex"`
CommitteeLength int `json:"CommitteeLength"`
CommitteesAtSlot int `json:"CommitteesAtSlot"`
ValidatorCommitteeIndex int `json:"ValidatorCommitteeIndex"`
ValidatorSyncCommitteeIndices []int `json:"ValidatorSyncCommitteeIndices"`
}