Documentation ¶
Overview ¶
Package model provides the GraphQL model for the explorer service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllDirection = []Direction{ DirectionIn, DirectionOut, }
var AllDuration = []Duration{ DurationPastDay, DurationAllTime, }
var AllHistoricalResultType = []HistoricalResultType{ HistoricalResultTypeBridgevolume, HistoricalResultTypeTransactions, HistoricalResultTypeAddresses, }
Functions ¶
This section is empty.
Types ¶
type AddressRanking ¶
AddressRanking gives the amount of transactions that occurred for a specific address across all chains.
type BridgeTransaction ¶
type BridgeTransaction struct { FromInfo *PartialInfo `json:"fromInfo"` ToInfo *PartialInfo `json:"toInfo"` Kappa *string `json:"kappa"` Pending *bool `json:"pending"` SwapSuccess *bool `json:"swapSuccess"` }
BridgeTransaction represents an entire bridge transaction, including both to and from transactions. If a `from` transaction does not have a corresponding `to` transaction, `pending` will be true.
type DateResult ¶
DateResult is a given statistic for a given date.
type Direction ¶
type Direction string
func (Direction) MarshalGQL ¶
func (*Direction) UnmarshalGQL ¶
type HistoricalResult ¶
type HistoricalResult struct { Total *float64 `json:"total"` DateResults []*DateResult `json:"dateResults"` Type *HistoricalResultType `json:"type"` }
HistoricalResult is a given statistic for dates.
type HistoricalResultType ¶
type HistoricalResultType string
const ( HistoricalResultTypeBridgevolume HistoricalResultType = "BRIDGEVOLUME" HistoricalResultTypeTransactions HistoricalResultType = "TRANSACTIONS" HistoricalResultTypeAddresses HistoricalResultType = "ADDRESSES" )
func (HistoricalResultType) IsValid ¶
func (e HistoricalResultType) IsValid() bool
func (HistoricalResultType) MarshalGQL ¶
func (e HistoricalResultType) MarshalGQL(w io.Writer)
func (HistoricalResultType) String ¶
func (e HistoricalResultType) String() string
func (*HistoricalResultType) UnmarshalGQL ¶
func (e *HistoricalResultType) UnmarshalGQL(v interface{}) error
type PartialInfo ¶
type PartialInfo struct { ChainID *int `json:"chainId"` Address *string `json:"address"` TxnHash *string `json:"txnHash"` Value *string `json:"value"` FormattedValue *float64 `json:"formattedValue"` USDValue *float64 `json:"USDValue"` TokenAddress *string `json:"tokenAddress"` TokenSymbol *string `json:"tokenSymbol"` BlockNumber *int `json:"blockNumber"` Time *int `json:"time"` }
PartialInfo is a transaction that occurred on one chain.
type StatisticType ¶
type StatisticType string
const ( StatisticTypeMeanVolumeUsd StatisticType = "MEAN_VOLUME_USD" StatisticTypeMedianVolumeUsd StatisticType = "MEDIAN_VOLUME_USD" StatisticTypeTotalVolumeUsd StatisticType = "TOTAL_VOLUME_USD" StatisticTypeCountTransactions StatisticType = "COUNT_TRANSACTIONS" StatisticTypeCountAddresses StatisticType = "COUNT_ADDRESSES" )
func (StatisticType) IsValid ¶
func (e StatisticType) IsValid() bool
func (StatisticType) MarshalGQL ¶
func (e StatisticType) MarshalGQL(w io.Writer)
func (StatisticType) String ¶
func (e StatisticType) String() string
func (*StatisticType) UnmarshalGQL ¶
func (e *StatisticType) UnmarshalGQL(v interface{}) error
type TokenCountResult ¶
type TokenCountResult struct { ChainID *int `json:"chainId"` TokenAddress *string `json:"tokenAddress"` Count *int `json:"count"` }
TokenCountResult gives the amount of transactions that occurred for a specific token, separated by chain ID.
type TransactionCountResult ¶
TransactionCountResult gives the amount of transactions that occurred for a specific chain ID.
type ValueResult ¶
type ValueResult struct {
Value *string `json:"value"`
}
ValueResult is a value result of either USD or numeric value.