client

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GetAddressRankingDocument = `query GetAddressRanking ($hours: Int) {
	response: addressRanking(hours: $hours) {
		address
		count
	}
}
`
View Source
const GetBridgeAmountStatisticDocument = `` /* 283-byte string literal not displayed */
View Source
const GetBridgeTransactionsDocument = `` /* 657-byte string literal not displayed */
View Source
const GetCountByChainIDDocument = `` /* 223-byte string literal not displayed */
View Source
const GetCountByTokenAddressDocument = `` /* 248-byte string literal not displayed */
View Source
const GetHistoricalStatisticsDocument = `` /* 225-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *client.Client
}

func NewClient

func NewClient(cli *http.Client, baseURL string, options ...client.HTTPRequestOption) *Client

func (*Client) GetAddressRanking

func (c *Client) GetAddressRanking(ctx context.Context, hours *int, httpRequestOptions ...client.HTTPRequestOption) (*GetAddressRanking, error)

func (*Client) GetBridgeAmountStatistic

func (c *Client) GetBridgeAmountStatistic(ctx context.Context, typeArg model.StatisticType, duration *model.Duration, chainID *int, address *string, tokenAddress *string, httpRequestOptions ...client.HTTPRequestOption) (*GetBridgeAmountStatistic, error)

func (*Client) GetBridgeTransactions

func (c *Client) GetBridgeTransactions(ctx context.Context, chainID *int, address *string, txHash *string, kappa *string, includePending *bool, page *int, tokenAddress *string, httpRequestOptions ...client.HTTPRequestOption) (*GetBridgeTransactions, error)

func (*Client) GetCountByChainID

func (c *Client) GetCountByChainID(ctx context.Context, chainID *int, address *string, direction *model.Direction, hours *int, httpRequestOptions ...client.HTTPRequestOption) (*GetCountByChainID, error)

func (*Client) GetCountByTokenAddress

func (c *Client) GetCountByTokenAddress(ctx context.Context, chainID *int, address *string, direction *model.Direction, hours *int, httpRequestOptions ...client.HTTPRequestOption) (*GetCountByTokenAddress, error)

func (*Client) GetHistoricalStatistics

func (c *Client) GetHistoricalStatistics(ctx context.Context, chainID *int, typeArg *model.HistoricalResultType, days *int, httpRequestOptions ...client.HTTPRequestOption) (*GetHistoricalStatistics, error)

type GetAddressRanking

type GetAddressRanking struct {
	Response []*struct {
		Address *string "json:\"address\" graphql:\"address\""
		Count   *int    "json:\"count\" graphql:\"count\""
	} "json:\"response\" graphql:\"response\""
}

type GetBridgeAmountStatistic

type GetBridgeAmountStatistic struct {
	Response *struct {
		Value *string "json:\"value\" graphql:\"value\""
	} "json:\"response\" graphql:\"response\""
}

type GetBridgeTransactions

type GetBridgeTransactions struct {
	Response []*struct {
		FromInfo *struct {
			ChainID        *int     "json:\"chainId\" graphql:\"chainId\""
			Address        *string  "json:\"address\" graphql:\"address\""
			TxnHash        *string  "json:\"txnHash\" graphql:\"txnHash\""
			Value          *string  "json:\"value\" graphql:\"value\""
			FormattedValue *float64 "json:\"formattedValue\" graphql:\"formattedValue\""
			USDValue       *float64 "json:\"USDValue\" graphql:\"USDValue\""
			TokenAddress   *string  "json:\"tokenAddress\" graphql:\"tokenAddress\""
			TokenSymbol    *string  "json:\"tokenSymbol\" graphql:\"tokenSymbol\""
			BlockNumber    *int     "json:\"blockNumber\" graphql:\"blockNumber\""
			Time           *int     "json:\"time\" graphql:\"time\""
		} "json:\"fromInfo\" graphql:\"fromInfo\""
		ToInfo *struct {
			ChainID        *int     "json:\"chainId\" graphql:\"chainId\""
			Address        *string  "json:\"address\" graphql:\"address\""
			TxnHash        *string  "json:\"txnHash\" graphql:\"txnHash\""
			Value          *string  "json:\"value\" graphql:\"value\""
			FormattedValue *float64 "json:\"formattedValue\" graphql:\"formattedValue\""
			USDValue       *float64 "json:\"USDValue\" graphql:\"USDValue\""
			TokenAddress   *string  "json:\"tokenAddress\" graphql:\"tokenAddress\""
			TokenSymbol    *string  "json:\"tokenSymbol\" graphql:\"tokenSymbol\""
			BlockNumber    *int     "json:\"blockNumber\" graphql:\"blockNumber\""
			Time           *int     "json:\"time\" graphql:\"time\""
		} "json:\"toInfo\" graphql:\"toInfo\""
		Kappa       *string "json:\"kappa\" graphql:\"kappa\""
		Pending     *bool   "json:\"pending\" graphql:\"pending\""
		SwapSuccess *bool   "json:\"swapSuccess\" graphql:\"swapSuccess\""
	} "json:\"response\" graphql:\"response\""
}

type GetCountByChainID

type GetCountByChainID struct {
	Response []*struct {
		Count   *int "json:\"count\" graphql:\"count\""
		ChainID *int "json:\"chainId\" graphql:\"chainId\""
	} "json:\"response\" graphql:\"response\""
}

type GetCountByTokenAddress

type GetCountByTokenAddress struct {
	Response []*struct {
		ChainID      *int    "json:\"chainId\" graphql:\"chainId\""
		TokenAddress *string "json:\"tokenAddress\" graphql:\"tokenAddress\""
		Count        *int    "json:\"count\" graphql:\"count\""
	} "json:\"response\" graphql:\"response\""
}

type GetHistoricalStatistics

type GetHistoricalStatistics struct {
	Response *struct {
		Total       *float64 "json:\"total\" graphql:\"total\""
		DateResults []*struct {
			Date  *string  "json:\"date\" graphql:\"date\""
			Total *float64 "json:\"total\" graphql:\"total\""
		} "json:\"dateResults\" graphql:\"dateResults\""
		Type *model.HistoricalResultType "json:\"type\" graphql:\"type\""
	} "json:\"response\" graphql:\"response\""
}

type Query

type Query struct {
	BridgeTransactions    []*model.BridgeTransaction      "json:\"bridgeTransactions\" graphql:\"bridgeTransactions\""
	BridgeAmountStatistic *model.ValueResult              "json:\"bridgeAmountStatistic\" graphql:\"bridgeAmountStatistic\""
	CountByChainID        []*model.TransactionCountResult "json:\"countByChainId\" graphql:\"countByChainId\""
	CountByTokenAddress   []*model.TokenCountResult       "json:\"countByTokenAddress\" graphql:\"countByTokenAddress\""
	AddressRanking        []*model.AddressRanking         "json:\"addressRanking\" graphql:\"addressRanking\""
	HistoricalStatistics  *model.HistoricalResult         "json:\"historicalStatistics\" graphql:\"historicalStatistics\""
}

Jump to

Keyboard shortcuts

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