eosswedenorg-go / leapapi

Antilope Leap HTTP API and hyperion API written in go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Antilope Leap HTTP API and hyperion API written in go.

License:MIT License


Languages

Language:Go 100.0%