arnaucube
arnaucube/eth-kzg-ceremony-altPublic Self-hosted repository
eth-kzg-ceremony-alt/client/msg.go
client/msg.goRaw
 1package client
 2
 3import "fmt"
 4
 5type errorMsg struct {
 6	Message string `json:"message"`
 7}
 8
 9type MsgStatus struct {
10	LobbySize        uint64 `json:"lobby_size"`
11	NumContributions uint64 `json:"num_contributions"`
12	SequencerAddress string `json:"sequencer_address"`
13}
14
15func (m *MsgStatus) String() string {
16	return fmt.Sprintf("Sequencer status:\n  Lobby size: %d\n  NumContributions: %d\n  SequencerAddress: %s\n",
17		m.LobbySize, m.NumContributions, m.SequencerAddress)
18}
19
20type MsgRequestLink struct {
21	EthAuthURL    string `json:"eth_auth_url"`
22	GithubAuthURL string `json:"github_auth_url"`
23}
24
25type IDToken struct {
26	Exp      uint64 `json:"exp"`
27	Nickname string `json:"nickname"`
28	Provider string `json:"provider"`
29	Sub      string `json:"sub"`
30}
31
32type MsgAuthCallback struct {
33	IDToken   IDToken `json:"id_token"`
34	SessionID string  `json:"session_id"`
35}
36
37type MsgContributeReceipt struct {
38	Receipt   string `json:"receipt"`
39	Signature string `json:"signature"`
40}
41
42func (m MsgContributeReceipt) String() string {
43	return fmt.Sprintf("Contribute Receipt:\n  Receipt: %s\n  Signature: %s\n",
44		m.Receipt, m.Signature)
45}