/leapapi

Antilope Leap HTTP API and hyperion API written in go.

Primary LanguageGoMIT LicenseMIT

Antelope Leap HTTP Api

Leap HTTP API and hyperion API written in go.

Install package

go get -u github.com/eosswedenorg-go/leapapi@latest

Types

API 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.
}

Functions

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.

Author

Henrik Hautakoski - Sw/eden - henrik@eossweden.org