Documentation ¶
Index ¶
- func JsonifySignedVoluntaryExits(voluntaryExits []*ethpb.SignedVoluntaryExit) []*structs.SignedVoluntaryExit
- func NewBeaconApiChainClientWithFallback(jsonRestHandler JsonRestHandler, fallbackClient iface.ChainClient) iface.ChainClient
- func NewBeaconApiValidatorClient(jsonRestHandler JsonRestHandler, opts ...ValidatorClientOpt) iface.ValidatorClient
- func NewNodeClientWithFallback(jsonRestHandler JsonRestHandler, fallbackClient iface.NodeClient) iface.NodeClient
- func NewPrysmChainClient(jsonRestHandler JsonRestHandler, nodeClient iface.NodeClient) iface.PrysmChainClient
- type BeaconApiJsonRestHandler
- func (c BeaconApiJsonRestHandler) Get(ctx context.Context, endpoint string, resp interface{}) error
- func (c BeaconApiJsonRestHandler) Host() string
- func (c BeaconApiJsonRestHandler) HttpClient() *http.Client
- func (c BeaconApiJsonRestHandler) Post(ctx context.Context, apiEndpoint string, headers map[string]string, ...) error
- type BeaconBlockConverter
- type DoppelGangerInfo
- type GenesisProvider
- type IndexNotFoundError
- type JsonRestHandler
- type StateValidatorsProvider
- type ValidatorClientOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JsonifySignedVoluntaryExits ¶
func JsonifySignedVoluntaryExits(voluntaryExits []*ethpb.SignedVoluntaryExit) []*structs.SignedVoluntaryExit
JsonifySignedVoluntaryExits converts an array of voluntary exit structs to a JSON hex string compatible format.
func NewBeaconApiChainClientWithFallback ¶ added in v5.0.4
func NewBeaconApiChainClientWithFallback(jsonRestHandler JsonRestHandler, fallbackClient iface.ChainClient) iface.ChainClient
func NewBeaconApiValidatorClient ¶
func NewBeaconApiValidatorClient(jsonRestHandler JsonRestHandler, opts ...ValidatorClientOpt) iface.ValidatorClient
func NewNodeClientWithFallback ¶
func NewNodeClientWithFallback(jsonRestHandler JsonRestHandler, fallbackClient iface.NodeClient) iface.NodeClient
func NewPrysmChainClient ¶ added in v5.0.4
func NewPrysmChainClient(jsonRestHandler JsonRestHandler, nodeClient iface.NodeClient) iface.PrysmChainClient
NewPrysmChainClient returns implementation of iface.PrysmChainClient.
Types ¶
type BeaconApiJsonRestHandler ¶
type BeaconApiJsonRestHandler struct {
// contains filtered or unexported fields
}
func (BeaconApiJsonRestHandler) Get ¶
func (c BeaconApiJsonRestHandler) Get(ctx context.Context, endpoint string, resp interface{}) error
Get sends a GET request and decodes the response body as a JSON object into the passed in object. If an HTTP error is returned, the body is decoded as a DefaultJsonError JSON object and returned as the first return value.
func (BeaconApiJsonRestHandler) Host ¶
func (c BeaconApiJsonRestHandler) Host() string
GetHost returns the underlying HTTP host
func (BeaconApiJsonRestHandler) HttpClient ¶
func (c BeaconApiJsonRestHandler) HttpClient() *http.Client
GetHttpClient returns the underlying HTTP client of the handler
func (BeaconApiJsonRestHandler) Post ¶
func (c BeaconApiJsonRestHandler) Post( ctx context.Context, apiEndpoint string, headers map[string]string, data *bytes.Buffer, resp interface{}, ) error
Post sends a POST request and decodes the response body as a JSON object into the passed in object. If an HTTP error is returned, the body is decoded as a DefaultJsonError JSON object and returned as the first return value.
type BeaconBlockConverter ¶
type BeaconBlockConverter interface { ConvertRESTPhase0BlockToProto(block *structs.BeaconBlock) (*ethpb.BeaconBlock, error) ConvertRESTAltairBlockToProto(block *structs.BeaconBlockAltair) (*ethpb.BeaconBlockAltair, error) ConvertRESTBellatrixBlockToProto(block *structs.BeaconBlockBellatrix) (*ethpb.BeaconBlockBellatrix, error) ConvertRESTCapellaBlockToProto(block *structs.BeaconBlockCapella) (*ethpb.BeaconBlockCapella, error) }
type DoppelGangerInfo ¶
type DoppelGangerInfo struct {
// contains filtered or unexported fields
}
type GenesisProvider ¶
type IndexNotFoundError ¶
type IndexNotFoundError struct {
// contains filtered or unexported fields
}
IndexNotFoundError represents an error scenario where no validator index matches a pubkey.
func NewIndexNotFoundError ¶
func NewIndexNotFoundError(pubkey string) IndexNotFoundError
NewIndexNotFoundError creates a new error instance.
func (*IndexNotFoundError) Error ¶
func (e *IndexNotFoundError) Error() string
Error returns the underlying error message.
type JsonRestHandler ¶
type JsonRestHandler interface { Get(ctx context.Context, endpoint string, resp interface{}) error Post(ctx context.Context, endpoint string, headers map[string]string, data *bytes.Buffer, resp interface{}) error HttpClient() *http.Client Host() string }
func NewBeaconApiJsonRestHandler ¶ added in v5.0.2
func NewBeaconApiJsonRestHandler(client http.Client, host string) JsonRestHandler
NewBeaconApiJsonRestHandler returns a JsonRestHandler
type StateValidatorsProvider ¶
type StateValidatorsProvider interface { GetStateValidators(context.Context, []string, []primitives.ValidatorIndex, []string) (*structs.GetValidatorsResponse, error) GetStateValidatorsForSlot(context.Context, primitives.Slot, []string, []primitives.ValidatorIndex, []string) (*structs.GetValidatorsResponse, error) GetStateValidatorsForHead(context.Context, []string, []primitives.ValidatorIndex, []string) (*structs.GetValidatorsResponse, error) }
type ValidatorClientOpt ¶
type ValidatorClientOpt func(*beaconApiValidatorClient)
Source Files ¶
- activation.go
- attestation_data.go
- beacon_api_beacon_chain_client.go
- beacon_api_helpers.go
- beacon_api_node_client.go
- beacon_api_validator_client.go
- beacon_block_converter.go
- beacon_block_json_helpers.go
- beacon_block_proto_helpers.go
- beacon_committee_selections.go
- domain_data.go
- doppelganger.go
- duties.go
- genesis.go
- get_beacon_block.go
- index.go
- json_rest_handler.go
- log.go
- metrics.go
- prepare_beacon_proposer.go
- propose_attestation.go
- propose_beacon_block.go
- propose_exit.go
- prysm_beacon_chain_client.go
- registration.go
- state_validators.go
- status.go
- stream_blocks.go
- submit_aggregate_selection_proof.go
- submit_signed_aggregate_proof.go
- submit_signed_contribution_and_proof.go
- subscribe_committee_subnets.go
- sync_committee.go
- sync_committee_selections.go
Directories ¶
Path | Synopsis |
---|---|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |