client

package
v0.0.150 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const GetAddressDataDocument = `` /* 274-byte string literal not displayed */
View Source
const GetAddressRankingDocument = `query GetAddressRanking ($hours: Int) {
	response: addressRanking(hours: $hours) {
		address
		count
	}
}
`
View Source
const GetAmountStatisticDocument = `` /* 345-byte string literal not displayed */
View Source
const GetBridgeTransactionsDocument = `` /* 1161-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 GetDailyStatisticsByChainDocument = `` /* 452-byte string literal not displayed */
View Source
const GetDestinationBridgeTxDocument = `` /* 422-byte string literal not displayed */
View Source
const GetLeaderboardDocument = `` /* 244-byte string literal not displayed */
View Source
const GetMessageBusTransactionsDocument = `` /* 1231-byte string literal not displayed */
View Source
const GetOriginBridgeTxDocument = `` /* 341-byte string literal not displayed */
View Source
const GetRankedChainIDsByVolumeDocument = `` /* 136-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) GetAddressData added in v0.0.107

func (c *Client) GetAddressData(ctx context.Context, address string, httpRequestOptions ...client.HTTPRequestOption) (*GetAddressData, error)

func (*Client) GetAddressRanking

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

func (*Client) GetAmountStatistic added in v0.0.81

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

func (*Client) GetBridgeTransactions

func (c *Client) GetBridgeTransactions(ctx context.Context, chainIDTo []*int, chainIDFrom []*int, addressTo *string, addressFrom *string, maxAmount *int, minAmount *int, maxAmountUsd *int, minAmountUsd *int, startTime *int, endTime *int, txHash *string, kappa *string, pending *bool, page *int, tokenAddressFrom []*string, tokenAddressTo []*string, useMv *bool, 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) GetDailyStatisticsByChain added in v0.0.81

func (c *Client) GetDailyStatisticsByChain(ctx context.Context, chainID *int, typeArg *model.DailyStatisticType, duration *model.Duration, platform *model.Platform, useMv *bool, httpRequestOptions ...client.HTTPRequestOption) (*GetDailyStatisticsByChain, error)

func (*Client) GetDestinationBridgeTx added in v0.0.149

func (c *Client) GetDestinationBridgeTx(ctx context.Context, chainID *int, kappa *string, address *string, timestamp *int, httpRequestOptions ...client.HTTPRequestOption) (*GetDestinationBridgeTx, error)

func (*Client) GetLeaderboard added in v0.0.107

func (c *Client) GetLeaderboard(ctx context.Context, duration *model.Duration, chainID *int, useMv *bool, page *int, httpRequestOptions ...client.HTTPRequestOption) (*GetLeaderboard, error)

func (*Client) GetMessageBusTransactions added in v0.0.81

func (c *Client) GetMessageBusTransactions(ctx context.Context, chainID []*int, contractAddress *string, startTime *int, endTime *int, txHash *string, messageID *string, pending *bool, reverted *bool, page *int, httpRequestOptions ...client.HTTPRequestOption) (*GetMessageBusTransactions, error)

func (*Client) GetOriginBridgeTx added in v0.0.149

func (c *Client) GetOriginBridgeTx(ctx context.Context, chainID *int, txnHash *string, httpRequestOptions ...client.HTTPRequestOption) (*GetOriginBridgeTx, error)

func (*Client) GetRankedChainIDsByVolume added in v0.0.81

func (c *Client) GetRankedChainIDsByVolume(ctx context.Context, duration *model.Duration, httpRequestOptions ...client.HTTPRequestOption) (*GetRankedChainIDsByVolume, error)

type GetAddressData added in v0.0.107

type GetAddressData struct {
	Response *struct {
		BridgeVolume *float64 "json:\"bridgeVolume\" graphql:\"bridgeVolume\""
		BridgeFees   *float64 "json:\"bridgeFees\" graphql:\"bridgeFees\""
		BridgeTxs    *int     "json:\"bridgeTxs\" graphql:\"bridgeTxs\""
		SwapVolume   *float64 "json:\"swapVolume\" graphql:\"swapVolume\""
		SwapFees     *float64 "json:\"swapFees\" graphql:\"swapFees\""
		SwapTxs      *int     "json:\"swapTxs\" graphql:\"swapTxs\""
		Rank         *int     "json:\"rank\" graphql:\"rank\""
		EarliestTx   *int     "json:\"earliestTx\" graphql:\"earliestTx\""
		ChainRanking []*struct {
			ChainID   *int     "json:\"chainID\" graphql:\"chainID\""
			VolumeUsd *float64 "json:\"volumeUsd\" graphql:\"volumeUsd\""
			Rank      *int     "json:\"rank\" graphql:\"rank\""
		} "json:\"chainRanking\" graphql:\"chainRanking\""
		DailyData []*struct {
			Date  *string "json:\"date\" graphql:\"date\""
			Count *int    "json:\"count\" graphql:\"count\""
		} "json:\"dailyData\" graphql:\"dailyData\""
	} "json:\"response\" graphql:\"response\""
}

type GetAddressRanking

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

type GetAmountStatistic added in v0.0.81

type GetAmountStatistic 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\""
			DestinationChainID *int     "json:\"destinationChainID\" graphql:\"destinationChainID\""
			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\""
			FormattedTime      *string  "json:\"formattedTime\" graphql:\"formattedTime\""
		} "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\""
			FormattedTime  *string  "json:\"formattedTime\" graphql:\"formattedTime\""
		} "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 GetDailyStatisticsByChain added in v0.0.81

type GetDailyStatisticsByChain struct {
	Response []*struct {
		Date      *string  "json:\"date\" graphql:\"date\""
		Ethereum  *float64 "json:\"ethereum\" graphql:\"ethereum\""
		Optimism  *float64 "json:\"optimism\" graphql:\"optimism\""
		Cronos    *float64 "json:\"cronos\" graphql:\"cronos\""
		Bsc       *float64 "json:\"bsc\" graphql:\"bsc\""
		Polygon   *float64 "json:\"polygon\" graphql:\"polygon\""
		Fantom    *float64 "json:\"fantom\" graphql:\"fantom\""
		Boba      *float64 "json:\"boba\" graphql:\"boba\""
		Metis     *float64 "json:\"metis\" graphql:\"metis\""
		Moonbeam  *float64 "json:\"moonbeam\" graphql:\"moonbeam\""
		Moonriver *float64 "json:\"moonriver\" graphql:\"moonriver\""
		Klaytn    *float64 "json:\"klaytn\" graphql:\"klaytn\""
		Arbitrum  *float64 "json:\"arbitrum\" graphql:\"arbitrum\""
		Avalanche *float64 "json:\"avalanche\" graphql:\"avalanche\""
		Dfk       *float64 "json:\"dfk\" graphql:\"dfk\""
		Aurora    *float64 "json:\"aurora\" graphql:\"aurora\""
		Harmony   *float64 "json:\"harmony\" graphql:\"harmony\""
		Canto     *float64 "json:\"canto\" graphql:\"canto\""
		Dogechain *float64 "json:\"dogechain\" graphql:\"dogechain\""
		Total     *float64 "json:\"total\" graphql:\"total\""
	} "json:\"response\" graphql:\"response\""
}

type GetDestinationBridgeTx added in v0.0.149

type GetDestinationBridgeTx struct {
	Response *struct {
		BridgeTx *struct {
			ChainID            *int     "json:\"chainID\" graphql:\"chainID\""
			DestinationChainID *int     "json:\"destinationChainID\" graphql:\"destinationChainID\""
			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\""
			FormattedTime      *string  "json:\"formattedTime\" graphql:\"formattedTime\""
		} "json:\"bridgeTx\" graphql:\"bridgeTx\""
		Pending *bool               "json:\"pending\" graphql:\"pending\""
		Type    *model.BridgeTxType "json:\"type\" graphql:\"type\""
		Kappa   *string             "json:\"kappa\" graphql:\"kappa\""
	} "json:\"response\" graphql:\"response\""
}

type GetLeaderboard added in v0.0.107

type GetLeaderboard struct {
	Response []*struct {
		Address      *string  "json:\"address\" graphql:\"address\""
		VolumeUsd    *float64 "json:\"volumeUSD\" graphql:\"volumeUSD\""
		Fees         *float64 "json:\"fees\" graphql:\"fees\""
		Txs          *int     "json:\"txs\" graphql:\"txs\""
		Rank         *int     "json:\"rank\" graphql:\"rank\""
		AvgVolumeUsd *float64 "json:\"avgVolumeUSD\" graphql:\"avgVolumeUSD\""
	} "json:\"response\" graphql:\"response\""
}

type GetMessageBusTransactions added in v0.0.81

type GetMessageBusTransactions struct {
	Response []*struct {
		FromInfo *struct {
			ChainID              *int    "json:\"chainID\" graphql:\"chainID\""
			ChainName            *string "json:\"chainName\" graphql:\"chainName\""
			DestinationChainID   *int    "json:\"destinationChainID\" graphql:\"destinationChainID\""
			DestinationChainName *string "json:\"destinationChainName\" graphql:\"destinationChainName\""
			ContractAddress      *string "json:\"contractAddress\" graphql:\"contractAddress\""
			TxnHash              *string "json:\"txnHash\" graphql:\"txnHash\""
			Message              *string "json:\"message\" graphql:\"message\""
			MessageType          *struct {
				TearType struct {
					Recipient string "json:\"recipient\" graphql:\"recipient\""
					Amount    string "json:\"amount\" graphql:\"amount\""
				} "graphql:\"... on TearType\""
				HeroType struct {
					Recipient string "json:\"recipient\" graphql:\"recipient\""
					HeroID    string "json:\"heroID\" graphql:\"heroID\""
				} "graphql:\"... on HeroType\""
				PetType struct {
					Recipient string "json:\"recipient\" graphql:\"recipient\""
					PetID     string "json:\"petID\" graphql:\"petID\""
					Name      string "json:\"name\" graphql:\"name\""
				} "graphql:\"... on PetType\""
				UnknownType struct {
					Known bool "json:\"known\" graphql:\"known\""
				} "graphql:\"... on UnknownType\""
			} "json:\"messageType\" graphql:\"messageType\""
			BlockNumber   *int    "json:\"blockNumber\" graphql:\"blockNumber\""
			Time          *int    "json:\"time\" graphql:\"time\""
			FormattedTime *string "json:\"formattedTime\" graphql:\"formattedTime\""
		} "json:\"fromInfo\" graphql:\"fromInfo\""
		ToInfo *struct {
			ChainID         *int    "json:\"chainID\" graphql:\"chainID\""
			ChainName       *string "json:\"chainName\" graphql:\"chainName\""
			ContractAddress *string "json:\"contractAddress\" graphql:\"contractAddress\""
			TxnHash         *string "json:\"txnHash\" graphql:\"txnHash\""
			Message         *string "json:\"message\" graphql:\"message\""
			MessageType     *struct {
				TearType struct {
					Recipient string "json:\"recipient\" graphql:\"recipient\""
					Amount    string "json:\"amount\" graphql:\"amount\""
				} "graphql:\"... on TearType\""
				HeroType struct {
					Recipient string "json:\"recipient\" graphql:\"recipient\""
					HeroID    string "json:\"heroID\" graphql:\"heroID\""
				} "graphql:\"... on HeroType\""
				PetType struct {
					Recipient string "json:\"recipient\" graphql:\"recipient\""
					PetID     string "json:\"petID\" graphql:\"petID\""
					Name      string "json:\"name\" graphql:\"name\""
				} "graphql:\"... on PetType\""
				UnknownType struct {
					Known bool "json:\"known\" graphql:\"known\""
				} "graphql:\"... on UnknownType\""
			} "json:\"messageType\" graphql:\"messageType\""
			BlockNumber    *int    "json:\"blockNumber\" graphql:\"blockNumber\""
			Time           *int    "json:\"time\" graphql:\"time\""
			FormattedTime  *string "json:\"formattedTime\" graphql:\"formattedTime\""
			RevertedReason *string "json:\"revertedReason\" graphql:\"revertedReason\""
		} "json:\"toInfo\" graphql:\"toInfo\""
		MessageID *string "json:\"messageID\" graphql:\"messageID\""
		Pending   *bool   "json:\"pending\" graphql:\"pending\""
	} "json:\"response\" graphql:\"response\""
}

type GetOriginBridgeTx added in v0.0.149

type GetOriginBridgeTx struct {
	Response *struct {
		BridgeTx *struct {
			ChainID            *int     "json:\"chainID\" graphql:\"chainID\""
			DestinationChainID *int     "json:\"destinationChainID\" graphql:\"destinationChainID\""
			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\""
			FormattedTime      *string  "json:\"formattedTime\" graphql:\"formattedTime\""
		} "json:\"bridgeTx\" graphql:\"bridgeTx\""
		Pending *bool               "json:\"pending\" graphql:\"pending\""
		Type    *model.BridgeTxType "json:\"type\" graphql:\"type\""
		Kappa   *string             "json:\"kappa\" graphql:\"kappa\""
	} "json:\"response\" graphql:\"response\""
}

type GetRankedChainIDsByVolume added in v0.0.81

type GetRankedChainIDsByVolume struct {
	Response []*struct {
		ChainID *int     "json:\"chainID\" graphql:\"chainID\""
		Total   *float64 "json:\"total\" graphql:\"total\""
	} "json:\"response\" graphql:\"response\""
}

type Query

type Query struct {
	BridgeTransactions     []*model.BridgeTransaction      "json:\"bridgeTransactions\" graphql:\"bridgeTransactions\""
	MessageBusTransactions []*model.MessageBusTransaction  "json:\"messageBusTransactions\" graphql:\"messageBusTransactions\""
	CountByChainID         []*model.TransactionCountResult "json:\"countByChainId\" graphql:\"countByChainId\""
	CountByTokenAddress    []*model.TokenCountResult       "json:\"countByTokenAddress\" graphql:\"countByTokenAddress\""
	AddressRanking         []*model.AddressRanking         "json:\"addressRanking\" graphql:\"addressRanking\""
	AmountStatistic        *model.ValueResult              "json:\"amountStatistic\" graphql:\"amountStatistic\""
	DailyStatisticsByChain []*model.DateResultByChain      "json:\"dailyStatisticsByChain\" graphql:\"dailyStatisticsByChain\""
	RankedChainIDsByVolume []*model.VolumeByChainID        "json:\"rankedChainIDsByVolume\" graphql:\"rankedChainIDsByVolume\""
	AddressData            *model.AddressData              "json:\"addressData\" graphql:\"addressData\""
	Leaderboard            []*model.Leaderboard            "json:\"leaderboard\" graphql:\"leaderboard\""
	GetOriginBridgeTx      *model.BridgeWatcherTx          "json:\"getOriginBridgeTx\" graphql:\"getOriginBridgeTx\""
	GetDestinationBridgeTx *model.BridgeWatcherTx          "json:\"getDestinationBridgeTx\" graphql:\"getDestinationBridgeTx\""
}

Jump to

Keyboard shortcuts

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