Leap HTTP API and hyperion API written in go.
go get -u github.com/eosswedenorg-go/leapapi@latestAPI Request parameters struct
type ReqParams struct {
Url string
Host string
}chain info struct
type Info struct {
ServerVersion string
HeadBlockNum int64
HeadBlockTime time.Time
}Hyperion health struct (not all fields).
type Health struct {
VersionHash string
Health []Service
}Service struct from Hyperion health
type Service struct {
Name string
Status string
Data map[string]interface{}
Time int64 // unix timestamp.
}func GetInfo(params ReqParams) (Info, error)Call v1/chain/get_info and return the results.
func GetHealth(params ReqParams) (Health, error)Call v2/health (hyperion) and return the results.
Henrik Hautakoski - Sw/eden - henrik@eossweden.org