endpoint

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BEACON_STATE_FORK = "/eth/v1/beacon/states/{state}/fork"
View Source
const GENESIS_ENPOINT = "/eth/v1/beacon/genesis"

Variables

This section is empty.

Functions

func ReplaceEndpointWithRequest

func ReplaceEndpointWithRequest(endpoint string, toBeReplaced string, item string) string

Types

type InfuraClient

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

func NewInfuraClient

func NewInfuraClient(infuraEndpoint string) (InfuraClient, error)

func (*InfuraClient) Default

func (c *InfuraClient) Default()

func (*InfuraClient) IsInitialized

func (c *InfuraClient) IsInitialized() bool

func (*InfuraClient) NewHttpsRequest

func (c *InfuraClient) NewHttpsRequest(ctx context.Context, request string, output interface{}) error

*** Make HTTPS requests to the endpoint ***

func (*InfuraClient) ReqGenesis

func (c *InfuraClient) ReqGenesis(ctx context.Context) (gen types.Genesis, err error)

func (*InfuraClient) ReqStateFork

func (c *InfuraClient) ReqStateFork(ctx context.Context, state string) (statefork types.StateFork, err error)

receives: state as string State identifier. Can be one of: "head" (canonical head in node's view), "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.

type ResponseData

type ResponseData struct {
	Content interface{} `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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