Documentation ¶
Index ¶
- Constants
- type BeaconClient
- func (bc *BeaconClient) GetBlobSidecarsByBlockroot(blockroot []byte) ([]*deneb.BlobSidecar, error)
- func (bc *BeaconClient) GetBlockBodyByBlockroot(blockroot []byte) (*spec.VersionedSignedBeaconBlock, error)
- func (bc *BeaconClient) GetBlockHeaderByBlockroot(blockroot []byte) (*v1.BeaconBlockHeader, error)
- func (bc *BeaconClient) GetBlockHeaderBySlot(slot uint64) (*v1.BeaconBlockHeader, error)
- func (bc *BeaconClient) GetCommitteeDuties(stateRef string, epoch uint64) ([]*v1.BeaconCommittee, error)
- func (bc *BeaconClient) GetEpochAssignments(epoch uint64, dependendRoot []byte) (*EpochAssignments, error)
- func (bc *BeaconClient) GetFinalityCheckpoints() (*v1.Finality, error)
- func (bc *BeaconClient) GetGenesis() (*v1.Genesis, error)
- func (bc *BeaconClient) GetLatestBlockHead() (*v1.BeaconBlockHeader, error)
- func (bc *BeaconClient) GetNodePeerId() (string, error)
- func (bc *BeaconClient) GetNodePeers() ([]*v1.Peer, error)
- func (bc *BeaconClient) GetNodeSyncing() (*v1.SyncState, error)
- func (bc *BeaconClient) GetNodeVersion() (string, error)
- func (bc *BeaconClient) GetProposerDuties(epoch uint64) (*ProposerDuties, error)
- func (bc *BeaconClient) GetSpecs() (map[string]any, error)
- func (bc *BeaconClient) GetState(stateRef string) (*spec.VersionedBeaconState, error)
- func (bc *BeaconClient) GetStateValidators(stateRef string) (map[phase0.ValidatorIndex]*v1.Validator, error)
- func (bc *BeaconClient) GetSyncCommitteeDuties(stateRef string, epoch uint64) (*v1.SyncCommittee, error)
- func (bc *BeaconClient) Initialize() error
- func (bc *BeaconClient) NewBlockStream(events uint16) *BeaconStream
- type BeaconStream
- type BeaconStreamEvent
- type EpochAssignments
- type ExecutionClient
- func (ec *ExecutionClient) GetAdminNodeInfo(ctx context.Context) (*p2p.NodeInfo, error)
- func (ec *ExecutionClient) GetAdminPeers(ctx context.Context) ([]*p2p.PeerInfo, error)
- func (ec *ExecutionClient) GetBalanceAt(ctx context.Context, wallet common.Address, blockNumber *big.Int) (*big.Int, error)
- func (ec *ExecutionClient) GetBlockByHash(ctx context.Context, hash common.Hash) (*ethtypes.Block, error)
- func (ec *ExecutionClient) GetBlockHeaderByNumber(ctx context.Context, number uint64) (*ethtypes.Header, error)
- func (ec *ExecutionClient) GetChainId(ctx context.Context) (*big.Int, error)
- func (ec *ExecutionClient) GetClientVersion(ctx context.Context) (string, error)
- func (ec *ExecutionClient) GetEthClient() *ethclient.Client
- func (ec *ExecutionClient) GetLatestBlockHeader(ctx context.Context) (*ethtypes.Header, error)
- func (ec *ExecutionClient) GetNodeSyncing(ctx context.Context) (*ExecutionSyncStatus, error)
- func (ec *ExecutionClient) GetNonceAt(ctx context.Context, wallet common.Address, blockNumber *big.Int) (uint64, error)
- func (ec *ExecutionClient) GetTransactionReceipt(ctx context.Context, txHash common.Hash) (*ethtypes.Receipt, error)
- func (ec *ExecutionClient) Initialize(ctx context.Context) error
- func (ec *ExecutionClient) SendTransaction(ctx context.Context, tx *ethtypes.Transaction) error
- type ExecutionSyncStatus
- type ProposerDuties
Constants ¶
View Source
const ( StreamBlockEvent uint16 = 0x01 StreamHeadEvent uint16 = 0x02 StreamFinalizedEvent uint16 = 0x04 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconClient ¶
type BeaconClient struct {
// contains filtered or unexported fields
}
func NewBeaconClient ¶
func NewBeaconClient(endpoint string, name string, headers map[string]string, sshcfg *types.EndpointSshConfig) (*BeaconClient, error)
NewBeaconClient is used to create a new beacon client
func (*BeaconClient) GetBlobSidecarsByBlockroot ¶
func (bc *BeaconClient) GetBlobSidecarsByBlockroot(blockroot []byte) ([]*deneb.BlobSidecar, error)
func (*BeaconClient) GetBlockBodyByBlockroot ¶
func (bc *BeaconClient) GetBlockBodyByBlockroot(blockroot []byte) (*spec.VersionedSignedBeaconBlock, error)
func (*BeaconClient) GetBlockHeaderByBlockroot ¶
func (bc *BeaconClient) GetBlockHeaderByBlockroot(blockroot []byte) (*v1.BeaconBlockHeader, error)
func (*BeaconClient) GetBlockHeaderBySlot ¶
func (bc *BeaconClient) GetBlockHeaderBySlot(slot uint64) (*v1.BeaconBlockHeader, error)
func (*BeaconClient) GetCommitteeDuties ¶
func (bc *BeaconClient) GetCommitteeDuties(stateRef string, epoch uint64) ([]*v1.BeaconCommittee, error)
func (*BeaconClient) GetEpochAssignments ¶
func (bc *BeaconClient) GetEpochAssignments(epoch uint64, dependendRoot []byte) (*EpochAssignments, error)
GetEpochAssignments will get the epoch assignments from Lighthouse RPC api
func (*BeaconClient) GetFinalityCheckpoints ¶
func (bc *BeaconClient) GetFinalityCheckpoints() (*v1.Finality, error)
func (*BeaconClient) GetGenesis ¶
func (bc *BeaconClient) GetGenesis() (*v1.Genesis, error)
func (*BeaconClient) GetLatestBlockHead ¶
func (bc *BeaconClient) GetLatestBlockHead() (*v1.BeaconBlockHeader, error)
func (*BeaconClient) GetNodePeerId ¶ added in v1.10.0
func (bc *BeaconClient) GetNodePeerId() (string, error)
func (*BeaconClient) GetNodePeers ¶ added in v1.10.0
func (bc *BeaconClient) GetNodePeers() ([]*v1.Peer, error)
func (*BeaconClient) GetNodeSyncing ¶
func (bc *BeaconClient) GetNodeSyncing() (*v1.SyncState, error)
func (*BeaconClient) GetNodeVersion ¶
func (bc *BeaconClient) GetNodeVersion() (string, error)
func (*BeaconClient) GetProposerDuties ¶
func (bc *BeaconClient) GetProposerDuties(epoch uint64) (*ProposerDuties, error)
func (*BeaconClient) GetState ¶
func (bc *BeaconClient) GetState(stateRef string) (*spec.VersionedBeaconState, error)
func (*BeaconClient) GetStateValidators ¶
func (bc *BeaconClient) GetStateValidators(stateRef string) (map[phase0.ValidatorIndex]*v1.Validator, error)
func (*BeaconClient) GetSyncCommitteeDuties ¶
func (bc *BeaconClient) GetSyncCommitteeDuties(stateRef string, epoch uint64) (*v1.SyncCommittee, error)
func (*BeaconClient) Initialize ¶
func (bc *BeaconClient) Initialize() error
func (*BeaconClient) NewBlockStream ¶
func (bc *BeaconClient) NewBlockStream(events uint16) *BeaconStream
type BeaconStream ¶
type BeaconStream struct { ReadyChan chan bool EventChan chan *BeaconStreamEvent // contains filtered or unexported fields }
func (*BeaconStream) Close ¶
func (bs *BeaconStream) Close()
func (*BeaconStream) Start ¶
func (bs *BeaconStream) Start()
type BeaconStreamEvent ¶
type BeaconStreamEvent struct { Event uint16 Data interface{} }
type EpochAssignments ¶
type ExecutionClient ¶
type ExecutionClient struct {
// contains filtered or unexported fields
}
func NewExecutionClient ¶
func NewExecutionClient(name, endpoint string, headers map[string]string, sshcfg *types.EndpointSshConfig) (*ExecutionClient, error)
NewExecutionClient is used to create a new execution client
func (*ExecutionClient) GetAdminNodeInfo ¶ added in v1.10.0
func (*ExecutionClient) GetAdminPeers ¶ added in v1.10.0
func (*ExecutionClient) GetBalanceAt ¶
func (*ExecutionClient) GetBlockByHash ¶
func (*ExecutionClient) GetBlockHeaderByNumber ¶
func (*ExecutionClient) GetChainId ¶
func (*ExecutionClient) GetClientVersion ¶
func (ec *ExecutionClient) GetClientVersion(ctx context.Context) (string, error)
func (*ExecutionClient) GetEthClient ¶
func (ec *ExecutionClient) GetEthClient() *ethclient.Client
func (*ExecutionClient) GetLatestBlockHeader ¶
func (*ExecutionClient) GetNodeSyncing ¶
func (ec *ExecutionClient) GetNodeSyncing(ctx context.Context) (*ExecutionSyncStatus, error)
func (*ExecutionClient) GetNonceAt ¶
func (*ExecutionClient) GetTransactionReceipt ¶
func (*ExecutionClient) Initialize ¶
func (ec *ExecutionClient) Initialize(ctx context.Context) error
func (*ExecutionClient) SendTransaction ¶
func (ec *ExecutionClient) SendTransaction(ctx context.Context, tx *ethtypes.Transaction) error
type ExecutionSyncStatus ¶
type ExecutionSyncStatus struct { IsSyncing bool StartingBlock uint64 CurrentBlock uint64 HighestBlock uint64 }
func (*ExecutionSyncStatus) Percent ¶
func (s *ExecutionSyncStatus) Percent() float64
type ProposerDuties ¶
type ProposerDuties struct { DependentRoot phase0.Root `json:"dependent_root"` Data []*v1.ProposerDuty `json:"data"` }
Click to show internal directories.
Click to hide internal directories.