Documentation ¶
Index ¶
- Constants
- func ReplaceEndpointWithRequest(endpoint string, toBeReplaced string, item string) string
- type InfuraClient
- func (c *InfuraClient) Default()
- func (c *InfuraClient) IsInitialized() bool
- func (c *InfuraClient) NewHttpsRequest(ctx context.Context, request string, output interface{}) error
- func (c *InfuraClient) ReqGenesis(ctx context.Context) (gen types.Genesis, err error)
- func (c *InfuraClient) ReqStateFork(ctx context.Context, state string) (statefork types.StateFork, err error)
- type ResponseData
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 ¶
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 (*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"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.