nimbus

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainHeadResp

type ChainHeadResp struct {
	Result ChainHeadResult `json:"result"`
	Error  interface{}     `json:"error"`
}

type ChainHeadResult

type ChainHeadResult struct {
	HeadSlot           uint64 `json:"head_slot"`
	HeadBlockRoot      string `json:"head_block_root"`
	FinalizedSlot      uint64 `json:"finalized_slot"`
	FinalizedBlockRoot string `json:"finalized_block_root"`
	JustifiedSlot      uint64 `json:"justified_slot"`
	JustifiedBlockRoot string `json:"justified_block_root"`
}

type JsonReq

type JsonReq struct {
	// example: {"method": "getNetworkPeers", "id": 123, "params": []}
	Method string        `json:"method"`
	Id     int           `json:"id"`
	Params []interface{} `json:"params"`
}

type NetworkPeersResp

type NetworkPeersResp struct {
	Result []string    `json:"result"`
	Error  interface{} `json:"error"`
}

type NimbusJsonHttp

type NimbusJsonHttp struct {
	// contains filtered or unexported fields
}

func New

func New(httpClient *http.Client, baseURL string) *NimbusJsonHttp

func (*NimbusJsonHttp) GetAttestationsInPoolCount

func (s *NimbusJsonHttp) GetAttestationsInPoolCount() (int64, error)

func (*NimbusJsonHttp) GetChainHead

func (s *NimbusJsonHttp) GetChainHead() (*types.ChainHead, error)

func (*NimbusJsonHttp) GetGenesisTime

func (s *NimbusJsonHttp) GetGenesisTime() (int64, error)

func (*NimbusJsonHttp) GetPeerCount

func (s *NimbusJsonHttp) GetPeerCount() (int64, error)

func (*NimbusJsonHttp) GetSyncStatus

func (s *NimbusJsonHttp) GetSyncStatus() (bool, error)

func (*NimbusJsonHttp) GetVersion

func (s *NimbusJsonHttp) GetVersion() (string, error)

func (*NimbusJsonHttp) JsonReq

func (s *NimbusJsonHttp) JsonReq(dest interface{}, method string, params ...interface{}) error

func (*NimbusJsonHttp) SubscribeChainHeads

func (c *NimbusJsonHttp) SubscribeChainHeads() (beacon.ChainHeadSubscription, error)

type SyncingResp

type SyncingResp struct {
	Result bool        `json:"result"`
	Error  interface{} `json:"error"`
}

type VersionResp

type VersionResp struct {
	Result string      `json:"result"`
	Error  interface{} `json:"error"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL