You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

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