beacon

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconBlockHeader

type BeaconBlockHeader = ethpb.BeaconBlockHeader

type BlockRootResponse

type BlockRootResponse struct {
	Data struct {
		Root hexutil.Bytes `json:"root"`
	} `json:"data"`
	ExecutionOptimistic bool `json:"execution_optimistic"`
}

type Checkpoint

type Checkpoint struct {
	Epoch uint64
	Root  [32]byte
}

type Client

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

func NewClient

func NewClient(endpoint string) Client

func (Client) GetBlockRoot

func (cl Client) GetBlockRoot(slot uint64, allowOptimistic bool) (*BlockRootResponse, error)

func (Client) GetBootstrap

func (cl Client) GetBootstrap(finalizedRoot []byte) (*LightClientBootstrapResponse, error)

func (Client) GetFinalityCheckpoints

func (cl Client) GetFinalityCheckpoints() (*StateFinalityCheckpoints, error)

func (Client) GetGenesis

func (cl Client) GetGenesis() (*Genesis, error)

func (Client) GetLightClientFinalityUpdate

func (cl Client) GetLightClientFinalityUpdate() (*LightClientFinalityUpdateResponse, error)

func (Client) GetLightClientUpdate

func (cl Client) GetLightClientUpdate(period uint64) (*LightClientUpdateResponse, error)

func (Client) GetLightClientUpdates

func (cl Client) GetLightClientUpdates(period uint64, count uint64) (LightClientUpdatesResponse, error)

func (Client) SupportedVersion added in v0.2.5

func (Client) SupportedVersion() string

type ExecutionPayloadHeader

type ExecutionPayloadHeader = enginev1.ExecutionPayloadHeaderDeneb

type Genesis

type Genesis struct {
	GenesisTimeSeconds    uint64
	GenesisValidatorsRoot [32]byte
	GenesisForkVersion    [4]byte
}

func ToGenesis

func ToGenesis(res GenesisResponse) (*Genesis, error)

type GenesisResponse

type GenesisResponse = structs.GetGenesisResponse

type H256

type H256 = [32]byte

type LightClientBootstrap

type LightClientBootstrap struct {
	Header                     LightClientHeader `json:"header"`
	CurrentSyncCommittee       SyncCommittee     `json:"current_sync_committee"`
	CurrentSyncCommitteeBranch []hexutil.Bytes   `json:"current_sync_committee_branch"`
}

type LightClientBootstrapResponse

type LightClientBootstrapResponse struct {
	Data    LightClientBootstrap `json:"data"`
	Version string               `json:"version"`
}

type LightClientFinalityUpdate

type LightClientFinalityUpdate struct {
	AttestedHeader  LightClientHeader `json:"attested_header"`
	FinalizedHeader LightClientHeader `json:"finalized_header"`
	FinalityBranch  []hexutil.Bytes   `json:"finality_branch"`
	SyncAggregate   SyncAggregate     `json:"sync_aggregate"`
	SignatureSlot   Uint64            `json:"signature_slot"`
}

func (*LightClientFinalityUpdate) ToProto

type LightClientFinalityUpdateResponse

type LightClientFinalityUpdateResponse struct {
	Data    LightClientFinalityUpdate `json:"data"`
	Version string                    `json:"version"`
}

type LightClientHeader

type LightClientHeader struct {
	Beacon          BeaconBlockHeader
	Execution       ExecutionPayloadHeader
	ExecutionBranch []hexutil.Bytes
}

func (*LightClientHeader) ToProto

func (*LightClientHeader) UnmarshalJSON

func (h *LightClientHeader) UnmarshalJSON(bz []byte) error

type LightClientUpdate

type LightClientUpdate struct {
	AttestedHeader          BeaconBlockHeader
	NextSyncCommittee       SyncCommittee
	NextSyncCommitteeBranch []H256
	FinalizedHeader         BeaconBlockHeader
	FinalizedHeaderBranch   []H256
	SyncAggregate           SyncAggregate
	SignatureSlot           uint64
}

type LightClientUpdateData

type LightClientUpdateData struct {
	AttestedHeader          LightClientHeader `json:"attested_header"`
	NextSyncCommittee       SyncCommittee     `json:"next_sync_committee"`
	NextSyncCommitteeBranch []hexutil.Bytes   `json:"next_sync_committee_branch"`
	FinalizedHeader         LightClientHeader `json:"finalized_header"`
	FinalityBranch          []hexutil.Bytes   `json:"finality_branch"`
	SyncAggregate           SyncAggregate     `json:"sync_aggregate"`
	SignatureSlot           Uint64            `json:"signature_slot"`
}

func (*LightClientUpdateData) ToProto

type LightClientUpdateResponse

type LightClientUpdateResponse struct {
	Version string                `json:"version"`
	Data    LightClientUpdateData `json:"data"`
}

type LightClientUpdatesResponse

type LightClientUpdatesResponse = []LightClientUpdateResponse

type StateFinalityCheckpointResponse

type StateFinalityCheckpointResponse = structs.GetFinalityCheckpointsResponse

type StateFinalityCheckpoints

type StateFinalityCheckpoints struct {
	PreviousJustified Checkpoint
	CurrentJustified  Checkpoint
	Finalized         Checkpoint
}

type SyncAggregate

type SyncAggregate struct {
	SyncCommitteeBits      hexutil.Bytes `json:"sync_committee_bits"`
	SyncCommitteeSignature hexutil.Bytes `json:"sync_committee_signature"`
}

func (*SyncAggregate) ToProto

func (c *SyncAggregate) ToProto() *lctypes.SyncAggregate

type SyncCommittee

type SyncCommittee struct {
	PubKeys         []hexutil.Bytes `json:"pubkeys"`
	AggregatePubKey hexutil.Bytes   `json:"aggregate_pubkey"`
}

func (*SyncCommittee) ToProto

func (sc *SyncCommittee) ToProto() *lctypes.SyncCommittee

type Uint64

type Uint64 = builder.Uint64String

Jump to

Keyboard shortcuts

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