frame

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticateReqBody

type AuthenticateReqBody struct {
	Address   string `json:"address"`
	Signature string `json:"signature"`
}

type AuthenticateRespBody

type AuthenticateRespBody struct {
	Token    string `json:"token"`
	UserInfo struct {
		Address          string  `json:"address"`
		TestnetXP        int     `json:"testnetXP"`
		HasClaimedPoints bool    `json:"hasClaimedPoints"`
		PointsClaimed    string  `json:"pointsClaimed"`
		TradesMade       int     `json:"tradesMade"`
		VolumeTraded     string  `json:"volumeTraded"`
		RoyaltiesPaid    string  `json:"royaltiesPaid"`
		TopPercent       float64 `json:"topPercent"`
		Rank             int     `json:"rank"`
		TotalAllocation  int     `json:"totalAllocation"`
	} `json:"userInfo"`
}

type ClaimRespBody

type ClaimRespBody struct {
	Message string `json:"message"`
}

type Client

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

func New

func New() *Client

func (*Client) Authenticate

func (c *Client) Authenticate(reqBody *AuthenticateReqBody) (*AuthenticateRespBody, error)

func (*Client) Claim

func (c *Client) Claim(bearerToken string) (*ClaimRespBody, error)

func (*Client) User

func (c *Client) User(bearerToken string) (*UserRespBody, error)

type UserRespBody

type UserRespBody struct {
	Address          string  `json:"address"`
	TestnetXP        int     `json:"testnetXP"`
	HasClaimedPoints bool    `json:"hasClaimedPoints"`
	PointsClaimed    string  `json:"pointsClaimed"`
	TradesMade       int     `json:"tradesMade"`
	VolumeTraded     string  `json:"volumeTraded"`
	RoyaltiesPaid    string  `json:"royaltiesPaid"`
	TopPercent       float64 `json:"topPercent"`
	Rank             int     `json:"rank"`
	TotalAllocation  int     `json:"totalAllocation"`
}

Jump to

Keyboard shortcuts

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