client

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateServerSignature

func ValidateServerSignature(resp *http.Response, body []byte, serverPubkey []byte) error

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)

func (*Client) VspInfo

func (c *Client) VspInfo(ctx context.Context) (*types.VspInfoResponse, error)

Jump to

Keyboard shortcuts

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