1
0
Fork 0
This repository has been archived on 2024-07-04. You can view files and clone it, but cannot push or open issues or pull requests.
helium-blockchain-exporter/heliumapi/types.go

153 lines
4.2 KiB
Go

package heliumapi
type AccountResp struct {
Data Account `json:"data"`
}
type Account struct {
Address string `json:"address"`
Balance int `json:"balance"`
Block int `json:"block"`
DCBalance int `json:"dc_balance"`
DCNonce int `json:"dc_nonce"`
SECBalance int `json:"sec_balance"`
SECNonce int `json:"sec_nonce"`
SpeculativeNonce int `json:"speculative_nonce"`
}
type AccountHotspotsResp struct {
Data []AccountHotspot `json:"data"`
}
type AccountHotspot struct {
Lng float64 `json:"lng"`
Lat float64 `json:"lat"`
TimestampAdded string `json:"timestamp_added"`
Status struct {
Timestamp string `json:"timestamp"`
Online string `json:"online"`
ListenAddrs []string `json:"listen_addrs"`
Height int `json:"height"`
} `json:"status"`
RewardScale float64 `json:"reward_scale"`
Payer string `json:"payer"`
Owner string `json:"owner"`
Nonce int `json:"nonce"`
Name string `json:"name"`
Mode string `json:"mode"`
LocationHex string `json:"location_hex"`
Location string `json:"location"`
LastPocChallenge int `json:"last_poc_challenge"`
LastChangeBlock int `json:"last_change_block"`
Geocode struct {
ShortStreet string `json:"short_street"`
ShortState string `json:"short_state"`
ShortCountry string `json:"short_country"`
ShortCity string `json:"short_city"`
LongStreet string `json:"long_street"`
LongState string `json:"long_state"`
LongCountry string `json:"long_country"`
LongCity string `json:"long_city"`
CityID string `json:"city_id"`
} `json:"geocode"`
Gain int `json:"gain"`
Elevation int `json:"elevation"`
BlockAdded int `json:"block_added"`
Block int `json:"block"`
Address string `json:"address"`
}
type ActivityCountsResp struct {
Data ActivityCounts
}
type ActivityCounts map[string]int
type RewardTotalResp struct {
Meta struct {
MinTime string `json:"min_time"`
MaxTime string `json:"max_time"`
} `json:"meta"`
Data RewardTotal `json:"data"`
}
type RewardTotal struct {
Total float64 `json:"total"`
Sum float64 `json:"sum"`
Stddev float64 `json:"stddev"`
Min float64 `json:"min"`
Median float64 `json:"median"`
Max float64 `json:"max"`
Avg float64 `json:"avg"`
}
type CurrentOraclePriceResp struct {
Data CurrentOraclePrice `json:"data"`
}
type CurrentOraclePrice struct {
Price int `json:"price"`
Block int `json:"block"`
}
type BlockchainStatsResp struct {
Data BlockchainStats `json:"data"`
}
type BlockchainStats struct {
BlockTime struct {
LastDay struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_day"`
LastHour struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_hour"`
LastMonth struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_month"`
LastWeek struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_week"`
} `json:"block_times"`
ChallengeCount struct {
Active int `json:"active"`
LastDay int `json:"last_day"`
} `json:"challenge_counts"`
Counts struct {
Validators int `json:"validators"`
Ouis int `json:"ouis"`
HotspotsDataonly int `json:"hotspots_dataonly"`
Blocks int `json:"blocks"`
Challenges int `json:"challenges"`
Cities int `json:"cities"`
ConsensusGroups int `json:"consensus_groups"`
Countries int `json:"countries"`
Hotspots int `json:"hotspots"`
Transactions int `json:"transactions"`
} `json:"counts"`
ElectionTimes struct {
LastDay struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_day"`
LastHour struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_hour"`
LastMonth struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_month"`
LastWeek struct {
Avg float64 `json:"avg"`
Stddev float64 `json:"stddev"`
} `json:"last_week"`
} `json:"election_times"`
TokenSupply float64 `json:"token_supply"`
}