Documentation
¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: 60c1a274a556ac9f9ed1cc9e50fdb5cf4e6c97d297106e385648c8306d4cb095 Version: 0.1.3-dev
Index ¶
- Constants
- Variables
- func Marshal(obj interface{}) ([]byte, error)
- func Unmarshal(data []byte, obj interface{}, trackUnusedKeys bool) error
- type AttesterDuty
- type BeaconCommitteeSubscription
- type BeaconEndpoint
- func (b *BeaconEndpoint) Genesis() (*GenesisInfo, error)
- func (b *BeaconEndpoint) GetBlock(id BlockId, block consensus.BeaconBlock) (*Block, error)
- func (b *BeaconEndpoint) GetBlockAttestations(id BlockId) ([]*consensus.Attestation, error)
- func (b *BeaconEndpoint) GetBlockHeader(id BlockId) (*BlockHeaderResponse, error)
- func (b *BeaconEndpoint) GetBlockRoot(id BlockId) ([32]byte, error)
- func (b *BeaconEndpoint) GetFinalityCheckpoints(id StateId) (*FinalizedCheckpoints, error)
- func (b *BeaconEndpoint) GetFork(id StateId) (*consensus.Fork, error)
- func (b *BeaconEndpoint) GetRoot(id StateId) ([32]byte, error)
- func (b *BeaconEndpoint) GetValidatorByPubKey(pub string, id StateId) (*Validator, error)
- func (b *BeaconEndpoint) GetValidators(id StateId) ([]*Validator, error)
- func (b *BeaconEndpoint) PublishAttestations(data []*consensus.Attestation) error
- func (b *BeaconEndpoint) PublishSignedBlock(block consensus.SignedBeaconBlock) error
- func (b *BeaconEndpoint) SubmitCommitteeDuties(duties []*consensus.SyncCommitteeMessage) error
- type Block
- type BlockEvent
- type BlockHeader
- type BlockHeaderResponse
- type BlockId
- type BuilderBid
- type BuilderEndpoint
- func (b *BuilderEndpoint) GetExecutionPayload(slot uint64, parentHash [32]byte, pubKey [48]byte) (*SignedBuilderBid, error)
- func (b *BuilderEndpoint) RegisterValidator(msg []*SignedValidatorRegistration) error
- func (b *BuilderEndpoint) Status() (bool, error)
- func (b *BuilderEndpoint) SubmitBlindedBlock(msg *consensus.SignedBlindedBeaconBlock) (*consensus.ExecutionPayload, error)
- type ChainReorgEvent
- type Client
- func (c *Client) Beacon() *BeaconEndpoint
- func (c *Client) Builder() *BuilderEndpoint
- func (c *Client) Config() *ConfigEndpoint
- func (c *Client) Events(ctx context.Context, topics []string, handler func(obj interface{})) error
- func (c *Client) Get(path string, out interface{}) error
- func (c *Client) Node() *NodeEndpoint
- func (c *Client) Post(path string, input interface{}, out interface{}) error
- func (c *Client) SetLogger(logger *log.Logger)
- func (c *Client) Status(path string) (bool, error)
- func (c *Client) Validator() *ValidatorEndpoint
- type CommitteeSyncDuty
- type Config
- type ConfigEndpoint
- type ConfigOption
- type DepositContract
- type FinalizedCheckpointEvent
- type FinalizedCheckpoints
- type GenesisInfo
- type HeadEvent
- type Identity
- type IdentityMetadata
- type NodeEndpoint
- func (n *NodeEndpoint) GetPeer(peerID string) (*Peer, error)
- func (n *NodeEndpoint) Health() (bool, error)
- func (n *NodeEndpoint) Identity() (*Identity, error)
- func (n *NodeEndpoint) PeerCount() (*PeerCount, error)
- func (n *NodeEndpoint) Peers() ([]*Peer, error)
- func (n *NodeEndpoint) Syncing() (*Syncing, error)
- func (n *NodeEndpoint) Version() (string, error)
- type Peer
- type PeerCount
- type ProposalPreparation
- type ProposerDuty
- type RegisterValidatorRequest
- func (r *RegisterValidatorRequest) GetTree() (*ssz.Node, error)
- func (r *RegisterValidatorRequest) HashTreeRoot() ([32]byte, error)
- func (r *RegisterValidatorRequest) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (r *RegisterValidatorRequest) MarshalSSZ() ([]byte, error)
- func (r *RegisterValidatorRequest) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (r *RegisterValidatorRequest) SizeSSZ() (size int)
- func (r *RegisterValidatorRequest) UnmarshalSSZ(buf []byte) error
- type SignedBuilderBid
- type SignedValidatorRegistration
- type Slot
- type StateId
- type SyncCommitteeSubscription
- type Syncing
- type Validator
- type ValidatorEndpoint
- func (v *ValidatorEndpoint) AggregateAttestation(slot uint64, root [32]byte) (*consensus.Attestation, error)
- func (v *ValidatorEndpoint) BeaconCommitteeSubscriptions(subs []*BeaconCommitteeSubscription) error
- func (v *ValidatorEndpoint) GetAttesterDuties(epoch uint64, indexes []string) ([]*AttesterDuty, error)
- func (v *ValidatorEndpoint) GetBlock(out consensus.BeaconBlock, slot uint64, randao [96]byte) error
- func (v *ValidatorEndpoint) GetCommitteeSyncDuties(epoch uint64, indexes []string) ([]*CommitteeSyncDuty, error)
- func (v *ValidatorEndpoint) GetProposerDuties(epoch uint64) ([]*ProposerDuty, error)
- func (v *ValidatorEndpoint) PrepareBeaconProposer(input []*ProposalPreparation) error
- func (v *ValidatorEndpoint) PublishAggregateAndProof(data []*consensus.SignedAggregateAndProof) error
- func (v *ValidatorEndpoint) RegisterValidator(msg []*SignedValidatorRegistration) error
- func (v *ValidatorEndpoint) RequestAttestationData(slot uint64, committeeIndex uint64) (*consensus.AttestationData, error)
- func (v *ValidatorEndpoint) SubmitSignedContributionAndProof(signedContribution []*consensus.SignedContributionAndProof) error
- func (v *ValidatorEndpoint) SyncCommitteeContribution(slot uint64, subCommitteeIndex uint64, root [32]byte) (*consensus.SyncCommitteeContribution, error)
- func (v *ValidatorEndpoint) SyncCommitteeSubscriptions(subs []*SyncCommitteeSubscription) error
- type ValidatorMetadata
- type ValidatorStatus
Constants ¶
const ( Head plainStateId = "head" Genesis plainStateId = "genesis" Finalized plainStateId = "finalized" )
Variables ¶
Functions ¶
Types ¶
type AttesterDuty ¶
type AttesterDuty struct {
PubKey string `json:"pubkey"`
ValidatorIndex uint `json:"validator_index"`
Slot uint64 `json:"slot"`
CommitteeIndex uint64 `json:"committee_index"`
CommitteeLength uint64 `json:"committee_length"`
CommitteeAtSlot uint64 `json:"committees_at_slot"`
ValidatorCommitteeIndex uint64 `json:"validator_committee_index"`
}
type BeaconCommitteeSubscription ¶ added in v0.1.1
type BeaconEndpoint ¶
type BeaconEndpoint struct {
// contains filtered or unexported fields
}
func (*BeaconEndpoint) Genesis ¶
func (b *BeaconEndpoint) Genesis() (*GenesisInfo, error)
func (*BeaconEndpoint) GetBlock ¶ added in v0.1.1
func (b *BeaconEndpoint) GetBlock(id BlockId, block consensus.BeaconBlock) (*Block, error)
func (*BeaconEndpoint) GetBlockAttestations ¶ added in v0.1.1
func (b *BeaconEndpoint) GetBlockAttestations(id BlockId) ([]*consensus.Attestation, error)
func (*BeaconEndpoint) GetBlockHeader ¶ added in v0.1.1
func (b *BeaconEndpoint) GetBlockHeader(id BlockId) (*BlockHeaderResponse, error)
func (*BeaconEndpoint) GetBlockRoot ¶ added in v0.1.1
func (b *BeaconEndpoint) GetBlockRoot(id BlockId) ([32]byte, error)
func (*BeaconEndpoint) GetFinalityCheckpoints ¶ added in v0.1.1
func (b *BeaconEndpoint) GetFinalityCheckpoints(id StateId) (*FinalizedCheckpoints, error)
func (*BeaconEndpoint) GetFork ¶ added in v0.1.1
func (b *BeaconEndpoint) GetFork(id StateId) (*consensus.Fork, error)
func (*BeaconEndpoint) GetRoot ¶ added in v0.1.1
func (b *BeaconEndpoint) GetRoot(id StateId) ([32]byte, error)
func (*BeaconEndpoint) GetValidatorByPubKey ¶
func (b *BeaconEndpoint) GetValidatorByPubKey(pub string, id StateId) (*Validator, error)
func (*BeaconEndpoint) GetValidators ¶ added in v0.1.1
func (b *BeaconEndpoint) GetValidators(id StateId) ([]*Validator, error)
func (*BeaconEndpoint) PublishAttestations ¶
func (b *BeaconEndpoint) PublishAttestations(data []*consensus.Attestation) error
func (*BeaconEndpoint) PublishSignedBlock ¶
func (b *BeaconEndpoint) PublishSignedBlock(block consensus.SignedBeaconBlock) error
func (*BeaconEndpoint) SubmitCommitteeDuties ¶
func (b *BeaconEndpoint) SubmitCommitteeDuties(duties []*consensus.SyncCommitteeMessage) error
type Block ¶ added in v0.1.1
type Block struct {
Message consensus.BeaconBlock
Signature [96]byte
}
type BlockEvent ¶ added in v0.1.1
type BlockHeader ¶ added in v0.1.1
type BlockHeader struct {
Message *consensus.BeaconBlockHeader `json:"message"`
Signature [96]byte `json:"signature"`
}
type BlockHeaderResponse ¶ added in v0.1.1
type BlockHeaderResponse struct {
Root [32]byte `json:"root"`
Canonical bool `json:"canonical"`
Header *BlockHeader `json:"header"`
}
type BuilderBid ¶ added in v0.1.1
type BuilderBid struct {
Header *consensus.ExecutionPayloadHeader `json:"header"`
Value consensus.Uint256 `json:"value" ssz-size:"32"`
Pubkey [48]byte `json:"pubkey" ssz-size:"48"`
}
type BuilderEndpoint ¶ added in v0.1.1
type BuilderEndpoint struct {
// contains filtered or unexported fields
}
func (*BuilderEndpoint) GetExecutionPayload ¶ added in v0.1.1
func (b *BuilderEndpoint) GetExecutionPayload(slot uint64, parentHash [32]byte, pubKey [48]byte) (*SignedBuilderBid, error)
func (*BuilderEndpoint) RegisterValidator ¶ added in v0.1.1
func (b *BuilderEndpoint) RegisterValidator(msg []*SignedValidatorRegistration) error
func (*BuilderEndpoint) Status ¶ added in v0.1.1
func (b *BuilderEndpoint) Status() (bool, error)
func (*BuilderEndpoint) SubmitBlindedBlock ¶ added in v0.1.1
func (b *BuilderEndpoint) SubmitBlindedBlock(msg *consensus.SignedBlindedBeaconBlock) (*consensus.ExecutionPayload, error)
type ChainReorgEvent ¶ added in v0.1.1
type ChainReorgEvent struct {
Slot uint64 `json:"slot"`
Depth uint64 `json:"depth"`
OldHeadBlock [32]byte `json:"old_head_block"`
NewHeadBlock [32]byte `json:"new_head_block"`
OldHeadState [32]byte `json:"old_head_state"`
NewHeadState [32]byte `json:"new_head_state"`
Epoch uint64 `json:"epoch"`
ExecutionOptimistic bool `json:"execution_optimistic"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(url string, opts ...ConfigOption) *Client
func (*Client) Beacon ¶
func (c *Client) Beacon() *BeaconEndpoint
func (*Client) Builder ¶ added in v0.1.1
func (c *Client) Builder() *BuilderEndpoint
func (*Client) Config ¶
func (c *Client) Config() *ConfigEndpoint
func (*Client) Node ¶
func (c *Client) Node() *NodeEndpoint
func (*Client) Validator ¶
func (c *Client) Validator() *ValidatorEndpoint
type CommitteeSyncDuty ¶
type ConfigEndpoint ¶
type ConfigEndpoint struct {
// contains filtered or unexported fields
}
func (*ConfigEndpoint) DepositContract ¶
func (c *ConfigEndpoint) DepositContract() (*DepositContract, error)
func (*ConfigEndpoint) ForkSchedule ¶ added in v0.1.1
func (c *ConfigEndpoint) ForkSchedule() ([]*consensus.Fork, error)
type ConfigOption ¶ added in v0.1.1
type ConfigOption func(*Config)
func WithLogger ¶ added in v0.1.1
func WithLogger(logger *log.Logger) ConfigOption
func WithUntrackedKeys ¶ added in v0.1.1
func WithUntrackedKeys() ConfigOption
type DepositContract ¶
type FinalizedCheckpointEvent ¶ added in v0.1.1
type FinalizedCheckpoints ¶ added in v0.1.1
type FinalizedCheckpoints struct {
PreviousJustifiedCheckpoint *consensus.Checkpoint `json:"previous_justified"`
CurrentJustifiedCheckpoint *consensus.Checkpoint `json:"current_justified"`
FinalizedCheckpoint *consensus.Checkpoint `json:"finalized"`
}
type GenesisInfo ¶ added in v0.1.1
type HeadEvent ¶
type HeadEvent struct {
Slot uint64 `json:"slot"`
Block [32]byte `json:"block"`
State [32]byte `json:"state"`
EpochTransition bool `json:"epoch_transition"`
CurrentDutyDependentRoot [32]byte `json:"current_duty_dependent_root"`
PreviousDutyDependentRoot [32]byte `json:"previous_duty_dependent_root"`
ExecutionOptimistic bool `json:"execution_optimistic"`
}
type Identity ¶
type Identity struct {
PeerID string `json:"peer_id"`
ENR string `json:"enr"`
P2PAddresses []string `json:"p2p_addresses"`
DiscoveryAddresses []string `json:"discovery_addresses"`
Metadata *IdentityMetadata `json:"metadata"`
}
type IdentityMetadata ¶ added in v0.1.1
type NodeEndpoint ¶
type NodeEndpoint struct {
// contains filtered or unexported fields
}
func (*NodeEndpoint) Health ¶ added in v0.1.1
func (n *NodeEndpoint) Health() (bool, error)
func (*NodeEndpoint) Identity ¶
func (n *NodeEndpoint) Identity() (*Identity, error)
Identity returns the node network identity
func (*NodeEndpoint) PeerCount ¶
func (n *NodeEndpoint) PeerCount() (*PeerCount, error)
func (*NodeEndpoint) Peers ¶
func (n *NodeEndpoint) Peers() ([]*Peer, error)
func (*NodeEndpoint) Syncing ¶
func (n *NodeEndpoint) Syncing() (*Syncing, error)
func (*NodeEndpoint) Version ¶
func (n *NodeEndpoint) Version() (string, error)
type ProposalPreparation ¶ added in v0.1.1
type ProposerDuty ¶
type RegisterValidatorRequest ¶ added in v0.1.1
type RegisterValidatorRequest struct {
FeeRecipient [20]byte `json:"fee_recipient" ssz-size:"20"`
GasLimit uint64 `json:"gas_limit,string"`
Timestamp uint64 `json:"timestamp,string"`
Pubkey [48]byte `json:"pubkey" ssz-size:"48"`
}
func (*RegisterValidatorRequest) GetTree ¶ added in v0.1.1
func (r *RegisterValidatorRequest) GetTree() (*ssz.Node, error)
GetTree ssz hashes the RegisterValidatorRequest object
func (*RegisterValidatorRequest) HashTreeRoot ¶ added in v0.1.1
func (r *RegisterValidatorRequest) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the RegisterValidatorRequest object
func (*RegisterValidatorRequest) HashTreeRootWith ¶ added in v0.1.1
func (r *RegisterValidatorRequest) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the RegisterValidatorRequest object with a hasher
func (*RegisterValidatorRequest) MarshalSSZ ¶ added in v0.1.1
func (r *RegisterValidatorRequest) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the RegisterValidatorRequest object
func (*RegisterValidatorRequest) MarshalSSZTo ¶ added in v0.1.1
func (r *RegisterValidatorRequest) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the RegisterValidatorRequest object to a target array
func (*RegisterValidatorRequest) SizeSSZ ¶ added in v0.1.1
func (r *RegisterValidatorRequest) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the RegisterValidatorRequest object
func (*RegisterValidatorRequest) UnmarshalSSZ ¶ added in v0.1.1
func (r *RegisterValidatorRequest) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the RegisterValidatorRequest object
type SignedBuilderBid ¶ added in v0.1.1
type SignedBuilderBid struct {
Message *BuilderBid `json:"message"`
Signature [96]byte `json:"signature" ssz-size:"96"`
}
type SignedValidatorRegistration ¶ added in v0.1.1
type SignedValidatorRegistration struct {
Message *RegisterValidatorRequest `json:"message"`
Signature [96]byte `json:"signature" ssz-size:"96"`
}
type SyncCommitteeSubscription ¶ added in v0.1.1
type Validator ¶
type Validator struct {
Index uint64 `json:"index"`
Balance uint64 `json:"balance"`
Status ValidatorStatus `json:"status"`
Validator *ValidatorMetadata `json:"validator"`
}
type ValidatorEndpoint ¶
type ValidatorEndpoint struct {
// contains filtered or unexported fields
}
func (*ValidatorEndpoint) AggregateAttestation ¶
func (v *ValidatorEndpoint) AggregateAttestation(slot uint64, root [32]byte) (*consensus.Attestation, error)
func (*ValidatorEndpoint) BeaconCommitteeSubscriptions ¶ added in v0.1.1
func (v *ValidatorEndpoint) BeaconCommitteeSubscriptions(subs []*BeaconCommitteeSubscription) error
func (*ValidatorEndpoint) GetAttesterDuties ¶
func (v *ValidatorEndpoint) GetAttesterDuties(epoch uint64, indexes []string) ([]*AttesterDuty, error)
func (*ValidatorEndpoint) GetBlock ¶
func (v *ValidatorEndpoint) GetBlock(out consensus.BeaconBlock, slot uint64, randao [96]byte) error
func (*ValidatorEndpoint) GetCommitteeSyncDuties ¶
func (v *ValidatorEndpoint) GetCommitteeSyncDuties(epoch uint64, indexes []string) ([]*CommitteeSyncDuty, error)
func (*ValidatorEndpoint) GetProposerDuties ¶
func (v *ValidatorEndpoint) GetProposerDuties(epoch uint64) ([]*ProposerDuty, error)
func (*ValidatorEndpoint) PrepareBeaconProposer ¶ added in v0.1.1
func (v *ValidatorEndpoint) PrepareBeaconProposer(input []*ProposalPreparation) error
func (*ValidatorEndpoint) PublishAggregateAndProof ¶
func (v *ValidatorEndpoint) PublishAggregateAndProof(data []*consensus.SignedAggregateAndProof) error
func (*ValidatorEndpoint) RegisterValidator ¶ added in v0.1.1
func (v *ValidatorEndpoint) RegisterValidator(msg []*SignedValidatorRegistration) error
func (*ValidatorEndpoint) RequestAttestationData ¶
func (v *ValidatorEndpoint) RequestAttestationData(slot uint64, committeeIndex uint64) (*consensus.AttestationData, error)
func (*ValidatorEndpoint) SubmitSignedContributionAndProof ¶
func (v *ValidatorEndpoint) SubmitSignedContributionAndProof(signedContribution []*consensus.SignedContributionAndProof) error
func (*ValidatorEndpoint) SyncCommitteeContribution ¶
func (v *ValidatorEndpoint) SyncCommitteeContribution(slot uint64, subCommitteeIndex uint64, root [32]byte) (*consensus.SyncCommitteeContribution, error)
produces a sync committee contribution
func (*ValidatorEndpoint) SyncCommitteeSubscriptions ¶ added in v0.1.1
func (v *ValidatorEndpoint) SyncCommitteeSubscriptions(subs []*SyncCommitteeSubscription) error
type ValidatorMetadata ¶
type ValidatorMetadata struct {
PubKey string `json:"pubkey"`
WithdrawalCredentials string `json:"withdrawal_credentials"`
EffectiveBalance uint64 `json:"effective_balance"`
Slashed bool `json:"slashed"`
ActivationElegibilityEpoch uint64 `json:"activation_eligibility_epoch"`
ActivationEpoch uint64 `json:"activation_epoch"`
ExitEpoch uint64 `json:"exit_epoch"`
WithdrawableEpoch uint64 `json:"withdrawable_epoch"`
}
type ValidatorStatus ¶ added in v0.1.1
type ValidatorStatus string
const ( ValidatorStatusUnknown ValidatorStatus = "unknown" ValidatorStatusActive ValidatorStatus = "active" ValidatorStatusPending ValidatorStatus = "pending" ValidatorStatusExited ValidatorStatus = "exited" )