client

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusReauth = Status(iota)
	StatusError
	StatusWait
	StatusProceed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(sequencerURL string) *Client

func (*Client) GetCurrentState

func (c *Client) GetCurrentState() (*kzgceremony.State, error)

func (*Client) GetCurrentStatus

func (c *Client) GetCurrentStatus() (*MsgStatus, error)
func (c *Client) GetRequestLink() (*MsgRequestLink, error)

func (*Client) PostAbortContribution

func (c *Client) PostAbortContribution(sessionID string) ([]byte, error)

func (*Client) PostAuthCallback

func (c *Client) PostAuthCallback() (*MsgRequestLink, error)

func (*Client) PostContribute

func (c *Client) PostContribute(sessionID string, bc *kzgceremony.BatchContribution) (*MsgContributeReceipt, error)

func (*Client) PostTryContribute

func (c *Client) PostTryContribute(sessionID string) (*kzgceremony.BatchContribution, Status, error)

type IDToken

type IDToken struct {
	Exp      uint64 `json:"exp"`
	Nickname string `json:"nickname"`
	Provider string `json:"provider"`
	Sub      string `json:"sub"`
}

type MsgAuthCallback

type MsgAuthCallback struct {
	IDToken   IDToken `json:"id_token"`
	SessionID string  `json:"session_id"`
}

type MsgContributeReceipt

type MsgContributeReceipt struct {
	Receipt   string `json:"receipt"`
	Signature string `json:"signature"`
}

func (MsgContributeReceipt) String

func (m MsgContributeReceipt) String() string
type MsgRequestLink struct {
	EthAuthURL    string `json:"eth_auth_url"`
	GithubAuthURL string `json:"github_auth_url"`
}

type MsgStatus

type MsgStatus struct {
	LobbySize        uint64 `json:"lobby_size"`
	NumContributions uint64 `json:"num_contributions"`
	SequencerAddress string `json:"sequencer_address"`
}

func (*MsgStatus) String

func (m *MsgStatus) String() string

type Status added in v0.0.3

type Status int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL