Documentation ¶
Index ¶
- func ValidateServerSignature(resp *http.Response, body []byte, serverPubkey []byte) error
- type Client
- func (c *Client) FeeAddress(ctx context.Context, req types.FeeAddressRequest, ...) (*types.FeeAddressResponse, error)
- func (c *Client) PayFee(ctx context.Context, req types.PayFeeRequest, commitmentAddr stdaddr.Address) (*types.PayFeeResponse, error)
- func (c *Client) SetVoteChoices(ctx context.Context, req types.SetVoteChoicesRequest, ...) (*types.SetVoteChoicesResponse, error)
- func (c *Client) TicketStatus(ctx context.Context, req types.TicketStatusRequest, ...) (*types.TicketStatusResponse, error)
- func (c *Client) VspInfo(ctx context.Context) (*types.VspInfoResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { http.Client URL string PubKey []byte // Sign is a function which must be provided to an instance of Client so // that it can sign request bodies using the PrivKey of the specified // address. Sign func(context.Context, string, stdaddr.Address) ([]byte, error) Log slog.Logger }
func (*Client) FeeAddress ¶
func (c *Client) FeeAddress(ctx context.Context, req types.FeeAddressRequest, commitmentAddr stdaddr.Address) (*types.FeeAddressResponse, error)
func (*Client) PayFee ¶
func (c *Client) PayFee(ctx context.Context, req types.PayFeeRequest, commitmentAddr stdaddr.Address) (*types.PayFeeResponse, error)
func (*Client) SetVoteChoices ¶
func (c *Client) SetVoteChoices(ctx context.Context, req types.SetVoteChoicesRequest, commitmentAddr stdaddr.Address) (*types.SetVoteChoicesResponse, error)
func (*Client) TicketStatus ¶
func (c *Client) TicketStatus(ctx context.Context, req types.TicketStatusRequest, commitmentAddr stdaddr.Address) (*types.TicketStatusResponse, error)
Click to show internal directories.
Click to hide internal directories.