beaconapi

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SLOTS_PER_EPOCH  = "SLOTS_PER_EPOCH"
	SECONDS_PER_SLOT = "SECONDS_PER_SLOT"
)

Variables

This section is empty.

Functions

func ConstructDialOptions

func ConstructDialOptions(
	maxCallRecvMsgSize int,
	withCert string,
	grpcRetries uint,
	grpcRetryDelay time.Duration,
	extraOpts ...grpc.DialOption,
) []grpc.DialOption

ConstructDialOptions constructs a list of grpc dial options

func GetValidators

func GetValidators(grpcEndpoint string) ([]string, error)

default grpc port is 4000

func NewGrpcBeaconChainClient

func NewGrpcBeaconChainClient(endpoint string) ethpb.BeaconChainClient

Types

type BeaconGwClient

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

func NewBeaconGwClient

func NewBeaconGwClient(endpoint string) *BeaconGwClient

func (*BeaconGwClient) GetAllValReward

func (b *BeaconGwClient) GetAllValReward(epoch int) ([]types.TotalReward, error)

default grpc-gateway port is 3500

func (*BeaconGwClient) GetAttesterDuties

func (b *BeaconGwClient) GetAttesterDuties(epoch int, vals []int) ([]types.AttestDuty, error)

POST /eth/v1/validator/duties/attester/:epoch

func (*BeaconGwClient) GetBeaconConfig

func (b *BeaconGwClient) GetBeaconConfig() map[string]string

func (*BeaconGwClient) GetCurrentEpochAttestDuties

func (b *BeaconGwClient) GetCurrentEpochAttestDuties() ([]types.AttestDuty, error)

func (*BeaconGwClient) GetCurrentEpochProposerDuties

func (b *BeaconGwClient) GetCurrentEpochProposerDuties() ([]types.ProposerDuty, error)

func (*BeaconGwClient) GetIntConfig

func (b *BeaconGwClient) GetIntConfig(key string) (int, error)

func (*BeaconGwClient) GetLatestBeaconHeader

func (b *BeaconGwClient) GetLatestBeaconHeader() (types.BeaconHeaderInfo, error)

func (*BeaconGwClient) GetNextEpochAttestDuties

func (b *BeaconGwClient) GetNextEpochAttestDuties() ([]types.AttestDuty, error)

func (*BeaconGwClient) GetNextEpochProposerDuties

func (b *BeaconGwClient) GetNextEpochProposerDuties() ([]types.ProposerDuty, error)

func (*BeaconGwClient) GetProposerDuties

func (b *BeaconGwClient) GetProposerDuties(epoch int) ([]types.ProposerDuty, error)

/eth/v1/validator/duties/proposer/:epoch

func (*BeaconGwClient) GetValReward

func (b *BeaconGwClient) GetValReward(epoch int, valIdxs []int) (types.BeaconResponse, error)

Jump to

Keyboard shortcuts

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