Documentation ¶
Index ¶
- func AttesterSlashingsToConsensus(src []*AttesterSlashing) ([]*zond.AttesterSlashing, error)
- func AttsToConsensus(src []*Attestation) ([]*zond.Attestation, error)
- func DecodeHexWithLength(s string, length int) ([]byte, error)
- func DecodeHexWithMaxLength(s string, maxLength int) ([]byte, error)
- func DepositsToConsensus(src []*Deposit) ([]*zond.Deposit, error)
- func DilithiumChangesToConsensus(src []*SignedDilithiumToExecutionChange) ([]*zond.SignedDilithiumToExecutionChange, error)
- func ExitsToConsensus(src []*SignedVoluntaryExit) ([]*zond.SignedVoluntaryExit, error)
- func IsOptimistic(ctx context.Context, w http.ResponseWriter, ...) (bool, error)
- func IsSyncing(ctx context.Context, w http.ResponseWriter, syncChecker sync.Checker, ...) bool
- func ProposerSlashingsToConsensus(src []*ProposerSlashing) ([]*zond.ProposerSlashing, error)
- func Uint256ToSSZBytes(num string) ([]byte, error)
- func UintFromQuery(w http.ResponseWriter, r *http.Request, name string) (bool, string, uint64)
- func ValidateHex(w http.ResponseWriter, name string, s string, length int) ([]byte, bool)
- func ValidateUint(w http.ResponseWriter, name string, s string) (uint64, bool)
- func VerifyMaxLength[T any](v []T, max int) error
- func WriteBlockFetchError(w http.ResponseWriter, blk interfaces.ReadOnlySignedBeaconBlock, err error) bool
- func WriteStateFetchError(w http.ResponseWriter, err error)
- type AggregateAttestationAndProof
- type Attestation
- type AttestationData
- type AttesterSlashing
- type BeaconBlock
- type BeaconBlockAltair
- type BeaconBlockBellatrix
- type BeaconBlockBody
- type BeaconBlockBodyAltair
- type BeaconBlockBodyBellatrix
- type BeaconBlockBodyCapella
- type BeaconBlockBodyDeneb
- type BeaconBlockCapella
- type BeaconBlockContentsDeneb
- type BeaconBlockDeneb
- type BeaconBlockHeader
- type BeaconCommitteeSubscription
- type BlindedBeaconBlockBellatrix
- type BlindedBeaconBlockBodyBellatrix
- type BlindedBeaconBlockBodyCapella
- type BlindedBeaconBlockBodyDeneb
- type BlindedBeaconBlockCapella
- type BlindedBeaconBlockContentsDeneb
- type BlindedBeaconBlockDeneb
- type BlindedBlobSidecar
- type BlobSidecar
- type Checkpoint
- type Committee
- type ContributionAndProof
- type DecodeError
- type Deposit
- type DepositData
- type DilithiumToExecutionChange
- type Eth1Data
- type ExecutionPayload
- type ExecutionPayloadCapella
- type ExecutionPayloadDeneb
- type ExecutionPayloadHeader
- type ExecutionPayloadHeaderCapella
- type ExecutionPayloadHeaderDeneb
- type FeeRecipient
- type Fork
- type IndexedAttestation
- type IndexedVerificationFailure
- type IndexedVerificationFailureError
- type ProposerSlashing
- type SignedAggregateAttestationAndProof
- type SignedBeaconBlock
- type SignedBeaconBlockAltair
- type SignedBeaconBlockBellatrix
- type SignedBeaconBlockCapella
- type SignedBeaconBlockContentsDeneb
- type SignedBeaconBlockDeneb
- type SignedBeaconBlockHeader
- type SignedBeaconBlockHeaderContainer
- type SignedBlindedBeaconBlockBellatrix
- type SignedBlindedBeaconBlockCapella
- type SignedBlindedBeaconBlockContentsDeneb
- type SignedBlindedBeaconBlockDeneb
- type SignedBlindedBlobSidecar
- type SignedBlobSidecar
- type SignedContributionAndProof
- type SignedDilithiumToExecutionChange
- type SignedValidatorRegistration
- type SignedVoluntaryExit
- type SyncAggregate
- type SyncCommitteeContribution
- type SyncCommitteeMessage
- type SyncCommitteeSubscription
- type SyncDetails
- type SyncDetailsContainer
- type ValidatorRegistration
- type VoluntaryExit
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttesterSlashingsToConsensus ¶
func AttesterSlashingsToConsensus(src []*AttesterSlashing) ([]*zond.AttesterSlashing, error)
func AttsToConsensus ¶
func AttsToConsensus(src []*Attestation) ([]*zond.Attestation, error)
func DecodeHexWithLength ¶
DecodeHexWithLength takes a string and a length in bytes, and validates whether the string is a hex and has the correct length.
func DecodeHexWithMaxLength ¶
DecodeHexWithMaxLength takes a string and a length in bytes, and validates whether the string is a hex and has the correct length.
func DilithiumChangesToConsensus ¶
func DilithiumChangesToConsensus(src []*SignedDilithiumToExecutionChange) ([]*zond.SignedDilithiumToExecutionChange, error)
func ExitsToConsensus ¶
func ExitsToConsensus(src []*SignedVoluntaryExit) ([]*zond.SignedVoluntaryExit, error)
func IsOptimistic ¶
func IsOptimistic( ctx context.Context, w http.ResponseWriter, optimisticModeFetcher blockchain.OptimisticModeFetcher, ) (bool, error)
IsOptimistic checks whether the beacon node is currently optimistic and writes it to the response.
func IsSyncing ¶
func IsSyncing( ctx context.Context, w http.ResponseWriter, syncChecker sync.Checker, headFetcher blockchain.HeadFetcher, timeFetcher blockchain.TimeFetcher, optimisticModeFetcher blockchain.OptimisticModeFetcher, ) bool
IsSyncing checks whether the beacon node is currently syncing and writes out the sync status.
func ProposerSlashingsToConsensus ¶
func ProposerSlashingsToConsensus(src []*ProposerSlashing) ([]*zond.ProposerSlashing, error)
func Uint256ToSSZBytes ¶
func UintFromQuery ¶
func ValidateHex ¶
func ValidateUint ¶
func VerifyMaxLength ¶
VerifyMaxLength takes a slice and a maximum length and validates the length.
func WriteBlockFetchError ¶
func WriteBlockFetchError(w http.ResponseWriter, blk interfaces.ReadOnlySignedBeaconBlock, err error) bool
WriteBlockFetchError writes an appropriate error based on the supplied argument. The argument error should be a result of fetching block.
func WriteStateFetchError ¶
func WriteStateFetchError(w http.ResponseWriter, err error)
WriteStateFetchError writes an appropriate error based on the supplied argument. The argument error should be a result of fetching state.
Types ¶
type AggregateAttestationAndProof ¶
type AggregateAttestationAndProof struct { AggregatorIndex string `json:"aggregator_index"` Aggregate *Attestation `json:"aggregate"` SelectionProof string `json:"selection_proof"` }
func (*AggregateAttestationAndProof) ToConsensus ¶
func (a *AggregateAttestationAndProof) ToConsensus() (*zond.AggregateAttestationAndProof, error)
type Attestation ¶
type Attestation struct { AggregationBits string `json:"aggregation_bits"` Data *AttestationData `json:"data"` Signature string `json:"signature"` }
func AttestationFromConsensus ¶
func AttestationFromConsensus(a *zond.Attestation) *Attestation
func AttsFromConsensus ¶
func AttsFromConsensus(src []*zond.Attestation) ([]*Attestation, error)
func (*Attestation) ToConsensus ¶
func (a *Attestation) ToConsensus() (*zond.Attestation, error)
type AttestationData ¶
type AttestationData struct { Slot string `json:"slot"` CommitteeIndex string `json:"index"` BeaconBlockRoot string `json:"beacon_block_root"` Source *Checkpoint `json:"source"` Target *Checkpoint `json:"target"` }
func AttestationDataFromConsensus ¶
func AttestationDataFromConsensus(a *zond.AttestationData) *AttestationData
func (*AttestationData) ToConsensus ¶
func (a *AttestationData) ToConsensus() (*zond.AttestationData, error)
type AttesterSlashing ¶
type AttesterSlashing struct { Attestation1 *IndexedAttestation `json:"attestation_1" validate:"required"` Attestation2 *IndexedAttestation `json:"attestation_2" validate:"required"` }
func AttesterSlashingsFromConsensus ¶
func AttesterSlashingsFromConsensus(src []*zond.AttesterSlashing) ([]*AttesterSlashing, error)
type BeaconBlock ¶
type BeaconBlock struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BeaconBlockBody `json:"body" validate:"required"` }
func BeaconBlockFromConsensus ¶
func BeaconBlockFromConsensus(b *zond.BeaconBlock) (*BeaconBlock, error)
func (*BeaconBlock) ToConsensus ¶
func (b *BeaconBlock) ToConsensus() (*zond.BeaconBlock, error)
func (*BeaconBlock) ToGeneric ¶
func (b *BeaconBlock) ToGeneric() (*zond.GenericBeaconBlock, error)
type BeaconBlockAltair ¶
type BeaconBlockAltair struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BeaconBlockBodyAltair `json:"body" validate:"required"` }
func BeaconBlockAltairFromConsensus ¶
func BeaconBlockAltairFromConsensus(b *zond.BeaconBlockAltair) (*BeaconBlockAltair, error)
func (*BeaconBlockAltair) ToConsensus ¶
func (b *BeaconBlockAltair) ToConsensus() (*zond.BeaconBlockAltair, error)
func (*BeaconBlockAltair) ToGeneric ¶
func (b *BeaconBlockAltair) ToGeneric() (*zond.GenericBeaconBlock, error)
type BeaconBlockBellatrix ¶
type BeaconBlockBellatrix struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BeaconBlockBodyBellatrix `json:"body" validate:"required"` }
func BeaconBlockBellatrixFromConsensus ¶
func BeaconBlockBellatrixFromConsensus(b *zond.BeaconBlockBellatrix) (*BeaconBlockBellatrix, error)
func (*BeaconBlockBellatrix) ToConsensus ¶
func (b *BeaconBlockBellatrix) ToConsensus() (*zond.BeaconBlockBellatrix, error)
func (*BeaconBlockBellatrix) ToGeneric ¶
func (b *BeaconBlockBellatrix) ToGeneric() (*zond.GenericBeaconBlock, error)
type BeaconBlockBody ¶
type BeaconBlockBody struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required"` Attestations []*Attestation `json:"attestations" validate:"required"` Deposits []*Deposit `json:"deposits" validate:"required"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required"` }
type BeaconBlockBodyAltair ¶
type BeaconBlockBodyAltair struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` }
type BeaconBlockBodyBellatrix ¶
type BeaconBlockBodyBellatrix struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` ExecutionPayload *ExecutionPayload `json:"execution_payload" validate:"required"` }
type BeaconBlockBodyCapella ¶
type BeaconBlockBodyCapella struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` ExecutionPayload *ExecutionPayloadCapella `json:"execution_payload" validate:"required"` DilithiumToExecutionChanges []*SignedDilithiumToExecutionChange `json:"dilithium_to_execution_changes" validate:"required,dive"` }
type BeaconBlockBodyDeneb ¶
type BeaconBlockBodyDeneb struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` ExecutionPayload *ExecutionPayloadDeneb `json:"execution_payload" validate:"required"` DilithiumToExecutionChanges []*SignedDilithiumToExecutionChange `json:"dilithium_to_execution_changes" validate:"required,dive"` BlobKzgCommitments []string `json:"blob_kzg_commitments" validate:"required,dive"` }
type BeaconBlockCapella ¶
type BeaconBlockCapella struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BeaconBlockBodyCapella `json:"body" validate:"required"` }
func BeaconBlockCapellaFromConsensus ¶
func BeaconBlockCapellaFromConsensus(b *zond.BeaconBlockCapella) (*BeaconBlockCapella, error)
func (*BeaconBlockCapella) ToConsensus ¶
func (b *BeaconBlockCapella) ToConsensus() (*zond.BeaconBlockCapella, error)
func (*BeaconBlockCapella) ToGeneric ¶
func (b *BeaconBlockCapella) ToGeneric() (*zond.GenericBeaconBlock, error)
type BeaconBlockContentsDeneb ¶
type BeaconBlockContentsDeneb struct { Block *BeaconBlockDeneb `json:"block" validate:"required"` BlobSidecars []*BlobSidecar `json:"blob_sidecars" validate:"dive"` }
func BeaconBlockContentsDenebFromConsensus ¶
func BeaconBlockContentsDenebFromConsensus(b *zond.BeaconBlockAndBlobsDeneb) (*BeaconBlockContentsDeneb, error)
func (*BeaconBlockContentsDeneb) ToConsensus ¶
func (b *BeaconBlockContentsDeneb) ToConsensus() (*zond.BeaconBlockAndBlobsDeneb, error)
func (*BeaconBlockContentsDeneb) ToGeneric ¶
func (b *BeaconBlockContentsDeneb) ToGeneric() (*zond.GenericBeaconBlock, error)
type BeaconBlockDeneb ¶
type BeaconBlockDeneb struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BeaconBlockBodyDeneb `json:"body" validate:"required"` }
func BeaconBlockDenebFromConsensus ¶
func BeaconBlockDenebFromConsensus(b *zond.BeaconBlockDeneb) (*BeaconBlockDeneb, error)
func (*BeaconBlockDeneb) ToConsensus ¶
func (b *BeaconBlockDeneb) ToConsensus() (*zond.BeaconBlockDeneb, error)
type BeaconBlockHeader ¶
type BeaconBlockHeader struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` BodyRoot string `json:"body_root" validate:"required"` }
func BeaconBlockHeaderFromConsensus ¶
func BeaconBlockHeaderFromConsensus(h *zond.BeaconBlockHeader) *BeaconBlockHeader
type BeaconCommitteeSubscription ¶
type BeaconCommitteeSubscription struct { ValidatorIndex string `json:"validator_index"` CommitteeIndex string `json:"committee_index"` CommitteesAtSlot string `json:"committees_at_slot"` Slot string `json:"slot"` IsAggregator bool `json:"is_aggregator"` }
func (*BeaconCommitteeSubscription) ToConsensus ¶
func (b *BeaconCommitteeSubscription) ToConsensus() (*validator.BeaconCommitteeSubscription, error)
type BlindedBeaconBlockBellatrix ¶
type BlindedBeaconBlockBellatrix struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BlindedBeaconBlockBodyBellatrix `json:"body" validate:"required"` }
func BlindedBeaconBlockBellatrixFromConsensus ¶
func BlindedBeaconBlockBellatrixFromConsensus(b *zond.BlindedBeaconBlockBellatrix) (*BlindedBeaconBlockBellatrix, error)
func (*BlindedBeaconBlockBellatrix) ToConsensus ¶
func (b *BlindedBeaconBlockBellatrix) ToConsensus() (*zond.BlindedBeaconBlockBellatrix, error)
func (*BlindedBeaconBlockBellatrix) ToGeneric ¶
func (b *BlindedBeaconBlockBellatrix) ToGeneric() (*zond.GenericBeaconBlock, error)
type BlindedBeaconBlockBodyBellatrix ¶
type BlindedBeaconBlockBodyBellatrix struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` ExecutionPayloadHeader *ExecutionPayloadHeader `json:"execution_payload_header" validate:"required"` }
type BlindedBeaconBlockBodyCapella ¶
type BlindedBeaconBlockBodyCapella struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` ExecutionPayloadHeader *ExecutionPayloadHeaderCapella `json:"execution_payload_header" validate:"required"` DilithiumToExecutionChanges []*SignedDilithiumToExecutionChange `json:"dilithium_to_execution_changes" validate:"required,dive"` }
type BlindedBeaconBlockBodyDeneb ¶
type BlindedBeaconBlockBodyDeneb struct { RandaoReveal string `json:"randao_reveal" validate:"required"` Eth1Data *Eth1Data `json:"eth1_data" validate:"required"` Graffiti string `json:"graffiti" validate:"required"` ProposerSlashings []*ProposerSlashing `json:"proposer_slashings" validate:"required,dive"` AttesterSlashings []*AttesterSlashing `json:"attester_slashings" validate:"required,dive"` Attestations []*Attestation `json:"attestations" validate:"required,dive"` Deposits []*Deposit `json:"deposits" validate:"required,dive"` VoluntaryExits []*SignedVoluntaryExit `json:"voluntary_exits" validate:"required,dive"` SyncAggregate *SyncAggregate `json:"sync_aggregate" validate:"required"` ExecutionPayloadHeader *ExecutionPayloadHeaderDeneb `json:"execution_payload_header" validate:"required"` DilithiumToExecutionChanges []*SignedDilithiumToExecutionChange `json:"dilithium_to_execution_changes" validate:"required,dive"` BlobKzgCommitments []string `json:"blob_kzg_commitments" validate:"required,dive,hexadecimal"` }
type BlindedBeaconBlockCapella ¶
type BlindedBeaconBlockCapella struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BlindedBeaconBlockBodyCapella `json:"body" validate:"required"` }
func BlindedBeaconBlockCapellaFromConsensus ¶
func BlindedBeaconBlockCapellaFromConsensus(b *zond.BlindedBeaconBlockCapella) (*BlindedBeaconBlockCapella, error)
func (*BlindedBeaconBlockCapella) ToConsensus ¶
func (b *BlindedBeaconBlockCapella) ToConsensus() (*zond.BlindedBeaconBlockCapella, error)
func (*BlindedBeaconBlockCapella) ToGeneric ¶
func (b *BlindedBeaconBlockCapella) ToGeneric() (*zond.GenericBeaconBlock, error)
type BlindedBeaconBlockContentsDeneb ¶
type BlindedBeaconBlockContentsDeneb struct { BlindedBlock *BlindedBeaconBlockDeneb `json:"blinded_block" validate:"required"` BlindedBlobSidecars []*BlindedBlobSidecar `json:"blinded_blob_sidecars" validate:"dive"` }
func BlindedBeaconBlockContentsDenebFromConsensus ¶
func BlindedBeaconBlockContentsDenebFromConsensus(b *zond.BlindedBeaconBlockAndBlobsDeneb) (*BlindedBeaconBlockContentsDeneb, error)
func (*BlindedBeaconBlockContentsDeneb) ToGeneric ¶
func (b *BlindedBeaconBlockContentsDeneb) ToGeneric() (*zond.GenericBeaconBlock, error)
type BlindedBeaconBlockDeneb ¶
type BlindedBeaconBlockDeneb struct { Slot string `json:"slot" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` ParentRoot string `json:"parent_root" validate:"required"` StateRoot string `json:"state_root" validate:"required"` Body *BlindedBeaconBlockBodyDeneb `json:"body" validate:"required"` }
func BlindedBeaconBlockDenebFromConsensus ¶
func BlindedBeaconBlockDenebFromConsensus(b *zond.BlindedBeaconBlockDeneb) (*BlindedBeaconBlockDeneb, error)
func (*BlindedBeaconBlockDeneb) ToConsensus ¶
func (b *BlindedBeaconBlockDeneb) ToConsensus() (*zond.BlindedBeaconBlockDeneb, error)
type BlindedBlobSidecar ¶
type BlindedBlobSidecar struct { BlockRoot string `json:"block_root" validate:"required"` Index string `json:"index" validate:"required"` Slot string `json:"slot" validate:"required"` BlockParentRoot string `json:"block_parent_root" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` BlobRoot string `json:"blob_root" validate:"required"` KzgCommitment string `json:"kzg_commitment" validate:"required"` // pattern: "^0x[a-fA-F0-9]{96}$" ssz-size:"48" KzgProof string `json:"kzg_proof" validate:"required"` // pattern: "^0x[a-fA-F0-9]{96}$" ssz-size:"48" }
func BlindedBlobSidecarFromConsensus ¶
func BlindedBlobSidecarFromConsensus(b *zond.BlindedBlobSidecar) (*BlindedBlobSidecar, error)
func (*BlindedBlobSidecar) ToConsensus ¶
func (s *BlindedBlobSidecar) ToConsensus() (*zond.BlindedBlobSidecar, error)
type BlobSidecar ¶
type BlobSidecar struct { BlockRoot string `json:"block_root" validate:"required"` Index string `json:"index" validate:"required"` Slot string `json:"slot" validate:"required"` BlockParentRoot string `json:"block_parent_root" validate:"required"` ProposerIndex string `json:"proposer_index" validate:"required"` Blob string `json:"blob" validate:"required"` // pattern: "^0x[a-fA-F0-9]{262144}$" KzgCommitment string `json:"kzg_commitment" validate:"required"` // pattern: "^0x[a-fA-F0-9]{96}$" ssz-size:"48" KzgProof string `json:"kzg_proof" validate:"required"` // pattern: "^0x[a-fA-F0-9]{96}$" ssz-size:"48" }
func BlobSidecarFromConsensus ¶
func BlobSidecarFromConsensus(b *zond.BlobSidecar) (*BlobSidecar, error)
func (*BlobSidecar) ToConsensus ¶
func (s *BlobSidecar) ToConsensus() (*zond.BlobSidecar, error)
type Checkpoint ¶
func CheckpointFromConsensus ¶
func CheckpointFromConsensus(c *zond.Checkpoint) *Checkpoint
func (*Checkpoint) ToConsensus ¶
func (c *Checkpoint) ToConsensus() (*zond.Checkpoint, error)
type ContributionAndProof ¶
type ContributionAndProof struct { AggregatorIndex string `json:"aggregator_index"` Contribution *SyncCommitteeContribution `json:"contribution"` SelectionProof string `json:"selection_proof"` }
func (*ContributionAndProof) ToConsensus ¶
func (c *ContributionAndProof) ToConsensus() (*zond.ContributionAndProof, error)
type DecodeError ¶
type DecodeError struct {
// contains filtered or unexported fields
}
DecodeError represents an error resulting from trying to decode an HTTP request. It tracks the full field name for which decoding failed.
func NewDecodeError ¶
func NewDecodeError(err error, field string) *DecodeError
NewDecodeError wraps an error (either the initial decoding error or another DecodeError). The current field that failed decoding must be passed in.
func (*DecodeError) Error ¶
func (e *DecodeError) Error() string
Error returns the formatted error message which contains the full field name and the actual decoding error.
type Deposit ¶
type Deposit struct { Proof []string `json:"proof" validate:"required,dive,hexadecimal"` Data *DepositData `json:"data" validate:"required"` }
type DepositData ¶
type ExecutionPayload ¶
type ExecutionPayload struct { ParentHash string `json:"parent_hash" validate:"required"` FeeRecipient string `json:"fee_recipient" validate:"required"` StateRoot string `json:"state_root" validate:"required"` ReceiptsRoot string `json:"receipts_root" validate:"required"` LogsBloom string `json:"logs_bloom" validate:"required"` PrevRandao string `json:"prev_randao" validate:"required"` BlockNumber string `json:"block_number" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` GasUsed string `json:"gas_used" validate:"required"` Timestamp string `json:"timestamp" validate:"required"` ExtraData string `json:"extra_data" validate:"required"` BaseFeePerGas string `json:"base_fee_per_gas" validate:"required"` BlockHash string `json:"block_hash" validate:"required"` Transactions []string `json:"transactions" validate:"required,dive,hexadecimal"` }
type ExecutionPayloadCapella ¶
type ExecutionPayloadCapella struct { ParentHash string `json:"parent_hash" validate:"required"` FeeRecipient string `json:"fee_recipient" validate:"required"` StateRoot string `json:"state_root" validate:"required"` ReceiptsRoot string `json:"receipts_root" validate:"required"` LogsBloom string `json:"logs_bloom" validate:"required"` PrevRandao string `json:"prev_randao" validate:"required"` BlockNumber string `json:"block_number" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` GasUsed string `json:"gas_used" validate:"required"` Timestamp string `json:"timestamp" validate:"required"` ExtraData string `json:"extra_data" validate:"required"` BaseFeePerGas string `json:"base_fee_per_gas" validate:"required"` BlockHash string `json:"block_hash" validate:"required"` Transactions []string `json:"transactions" validate:"required,dive"` Withdrawals []*Withdrawal `json:"withdrawals" validate:"required,dive"` }
type ExecutionPayloadDeneb ¶
type ExecutionPayloadDeneb struct { ParentHash string `json:"parent_hash" validate:"required"` FeeRecipient string `json:"fee_recipient" validate:"required"` StateRoot string `json:"state_root" validate:"required"` ReceiptsRoot string `json:"receipts_root" validate:"required"` LogsBloom string `json:"logs_bloom" validate:"required"` PrevRandao string `json:"prev_randao" validate:"required"` BlockNumber string `json:"block_number" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` GasUsed string `json:"gas_used" validate:"required"` Timestamp string `json:"timestamp" validate:"required"` ExtraData string `json:"extra_data" validate:"required"` BaseFeePerGas string `json:"base_fee_per_gas" validate:"required"` BlobGasUsed string `json:"blob_gas_used" validate:"required"` // new in deneb ExcessBlobGas string `json:"excess_blob_gas" validate:"required"` // new in deneb BlockHash string `json:"block_hash" validate:"required"` Transactions []string `json:"transactions" validate:"required,dive,hexadecimal"` Withdrawals []*Withdrawal `json:"withdrawals" validate:"required,dive"` }
type ExecutionPayloadHeader ¶
type ExecutionPayloadHeader struct { ParentHash string `json:"parent_hash" validate:"required"` FeeRecipient string `json:"fee_recipient" validate:"required"` StateRoot string `json:"state_root" validate:"required"` ReceiptsRoot string `json:"receipts_root" validate:"required"` LogsBloom string `json:"logs_bloom" validate:"required"` PrevRandao string `json:"prev_randao" validate:"required"` BlockNumber string `json:"block_number" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` GasUsed string `json:"gas_used" validate:"required"` Timestamp string `json:"timestamp" validate:"required"` ExtraData string `json:"extra_data" validate:"required"` BaseFeePerGas string `json:"base_fee_per_gas" validate:"required"` BlockHash string `json:"block_hash" validate:"required"` TransactionsRoot string `json:"transactions_root" validate:"required"` }
type ExecutionPayloadHeaderCapella ¶
type ExecutionPayloadHeaderCapella struct { ParentHash string `json:"parent_hash" validate:"required"` FeeRecipient string `json:"fee_recipient" validate:"required"` StateRoot string `json:"state_root" validate:"required"` ReceiptsRoot string `json:"receipts_root" validate:"required"` LogsBloom string `json:"logs_bloom" validate:"required"` PrevRandao string `json:"prev_randao" validate:"required"` BlockNumber string `json:"block_number" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` GasUsed string `json:"gas_used" validate:"required"` Timestamp string `json:"timestamp" validate:"required"` ExtraData string `json:"extra_data" validate:"required"` BaseFeePerGas string `json:"base_fee_per_gas" validate:"required"` BlockHash string `json:"block_hash" validate:"required"` TransactionsRoot string `json:"transactions_root" validate:"required"` WithdrawalsRoot string `json:"withdrawals_root" validate:"required"` }
type ExecutionPayloadHeaderDeneb ¶
type ExecutionPayloadHeaderDeneb struct { ParentHash string `json:"parent_hash" validate:"required"` FeeRecipient string `json:"fee_recipient" validate:"required"` StateRoot string `json:"state_root" validate:"required"` ReceiptsRoot string `json:"receipts_root" validate:"required"` LogsBloom string `json:"logs_bloom" validate:"required"` PrevRandao string `json:"prev_randao" validate:"required"` BlockNumber string `json:"block_number" validate:"required"` GasLimit string `json:"gas_limit" validate:"required"` GasUsed string `json:"gas_used" validate:"required"` Timestamp string `json:"timestamp" validate:"required"` ExtraData string `json:"extra_data" validate:"required"` BaseFeePerGas string `json:"base_fee_per_gas" validate:"required"` BlobGasUsed string `json:"blob_gas_used" validate:"required"` // new in deneb ExcessBlobGas string `json:"excess_blob_gas" validate:"required"` // new in deneb BlockHash string `json:"block_hash" validate:"required"` TransactionsRoot string `json:"transactions_root" validate:"required"` WithdrawalsRoot string `json:"withdrawals_root" validate:"required"` }
type FeeRecipient ¶
type Fork ¶
type IndexedAttestation ¶
type IndexedAttestation struct { AttestingIndices []string `json:"attesting_indices" validate:"required,dive"` Data *AttestationData `json:"data" validate:"required"` Signature string `json:"signature" validate:"required"` }
type IndexedVerificationFailure ¶
IndexedVerificationFailure represents an issue when verifying a single indexed object e.g. an item in an array.
type IndexedVerificationFailureError ¶
type IndexedVerificationFailureError struct { Message string `json:"message"` Code int `json:"code"` Failures []*IndexedVerificationFailure `json:"failures"` }
IndexedVerificationFailureError wraps a collection of verification failures.
func (*IndexedVerificationFailureError) StatusCode ¶
func (e *IndexedVerificationFailureError) StatusCode() int
type ProposerSlashing ¶
type ProposerSlashing struct { SignedHeader1 *SignedBeaconBlockHeader `json:"signed_header_1" validate:"required"` SignedHeader2 *SignedBeaconBlockHeader `json:"signed_header_2" validate:"required"` }
func ProposerSlashingsFromConsensus ¶
func ProposerSlashingsFromConsensus(src []*zond.ProposerSlashing) ([]*ProposerSlashing, error)
type SignedAggregateAttestationAndProof ¶
type SignedAggregateAttestationAndProof struct { Message *AggregateAttestationAndProof `json:"message"` Signature string `json:"signature"` }
func (*SignedAggregateAttestationAndProof) ToConsensus ¶
func (s *SignedAggregateAttestationAndProof) ToConsensus() (*zond.SignedAggregateAttestationAndProof, error)
type SignedBeaconBlock ¶
type SignedBeaconBlock struct { Message *BeaconBlock `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func (*SignedBeaconBlock) ToGeneric ¶
func (b *SignedBeaconBlock) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
type SignedBeaconBlockAltair ¶
type SignedBeaconBlockAltair struct { Message *BeaconBlockAltair `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func (*SignedBeaconBlockAltair) ToGeneric ¶
func (b *SignedBeaconBlockAltair) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
type SignedBeaconBlockBellatrix ¶
type SignedBeaconBlockBellatrix struct { Message *BeaconBlockBellatrix `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func (*SignedBeaconBlockBellatrix) ToGeneric ¶
func (b *SignedBeaconBlockBellatrix) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
type SignedBeaconBlockCapella ¶
type SignedBeaconBlockCapella struct { Message *BeaconBlockCapella `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func (*SignedBeaconBlockCapella) ToGeneric ¶
func (b *SignedBeaconBlockCapella) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
type SignedBeaconBlockContentsDeneb ¶
type SignedBeaconBlockContentsDeneb struct { SignedBlock *SignedBeaconBlockDeneb `json:"signed_block" validate:"required"` SignedBlobSidecars []*SignedBlobSidecar `json:"signed_blob_sidecars" validate:"dive"` }
func SignedBeaconBlockContentsDenebFromConsensus ¶
func SignedBeaconBlockContentsDenebFromConsensus(b *zond.SignedBeaconBlockAndBlobsDeneb) (*SignedBeaconBlockContentsDeneb, error)
func (*SignedBeaconBlockContentsDeneb) ToGeneric ¶
func (b *SignedBeaconBlockContentsDeneb) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
func (*SignedBeaconBlockContentsDeneb) ToUnsigned ¶
func (b *SignedBeaconBlockContentsDeneb) ToUnsigned() *BeaconBlockContentsDeneb
type SignedBeaconBlockDeneb ¶
type SignedBeaconBlockDeneb struct { Message *BeaconBlockDeneb `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func SignedBeaconBlockDenebFromConsensus ¶
func SignedBeaconBlockDenebFromConsensus(b *zond.SignedBeaconBlockDeneb) (*SignedBeaconBlockDeneb, error)
func (*SignedBeaconBlockDeneb) ToConsensus ¶
func (b *SignedBeaconBlockDeneb) ToConsensus() (*zond.SignedBeaconBlockDeneb, error)
type SignedBeaconBlockHeader ¶
type SignedBeaconBlockHeader struct { Message *BeaconBlockHeader `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
type SignedBeaconBlockHeaderContainer ¶
type SignedBeaconBlockHeaderContainer struct { Header *SignedBeaconBlockHeader `json:"header"` Root string `json:"root"` Canonical bool `json:"canonical"` }
type SignedBlindedBeaconBlockBellatrix ¶
type SignedBlindedBeaconBlockBellatrix struct { Message *BlindedBeaconBlockBellatrix `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func SignedBlindedBeaconBlockBellatrixFromConsensus ¶
func SignedBlindedBeaconBlockBellatrixFromConsensus(b *zond.SignedBlindedBeaconBlockBellatrix) (*SignedBlindedBeaconBlockBellatrix, error)
func (*SignedBlindedBeaconBlockBellatrix) ToGeneric ¶
func (b *SignedBlindedBeaconBlockBellatrix) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
type SignedBlindedBeaconBlockCapella ¶
type SignedBlindedBeaconBlockCapella struct { Message *BlindedBeaconBlockCapella `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func SignedBlindedBeaconBlockCapellaFromConsensus ¶
func SignedBlindedBeaconBlockCapellaFromConsensus(b *zond.SignedBlindedBeaconBlockCapella) (*SignedBlindedBeaconBlockCapella, error)
func (*SignedBlindedBeaconBlockCapella) ToGeneric ¶
func (b *SignedBlindedBeaconBlockCapella) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
type SignedBlindedBeaconBlockContentsDeneb ¶
type SignedBlindedBeaconBlockContentsDeneb struct { SignedBlindedBlock *SignedBlindedBeaconBlockDeneb `json:"signed_blinded_block" validate:"required"` SignedBlindedBlobSidecars []*SignedBlindedBlobSidecar `json:"signed_blinded_blob_sidecars" validate:"dive"` }
func SignedBlindedBeaconBlockContentsDenebFromConsensus ¶
func SignedBlindedBeaconBlockContentsDenebFromConsensus(b *zond.SignedBlindedBeaconBlockAndBlobsDeneb) (*SignedBlindedBeaconBlockContentsDeneb, error)
func (*SignedBlindedBeaconBlockContentsDeneb) ToGeneric ¶
func (b *SignedBlindedBeaconBlockContentsDeneb) ToGeneric() (*zond.GenericSignedBeaconBlock, error)
func (*SignedBlindedBeaconBlockContentsDeneb) ToUnsigned ¶
func (b *SignedBlindedBeaconBlockContentsDeneb) ToUnsigned() *BlindedBeaconBlockContentsDeneb
type SignedBlindedBeaconBlockDeneb ¶
type SignedBlindedBeaconBlockDeneb struct { Message *BlindedBeaconBlockDeneb `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func SignedBlindedBeaconBlockDenebFromConsensus ¶
func SignedBlindedBeaconBlockDenebFromConsensus(b *zond.SignedBlindedBeaconBlockDeneb) (*SignedBlindedBeaconBlockDeneb, error)
func (*SignedBlindedBeaconBlockDeneb) ToConsensus ¶
func (b *SignedBlindedBeaconBlockDeneb) ToConsensus() (*zond.SignedBlindedBeaconBlockDeneb, error)
type SignedBlindedBlobSidecar ¶
type SignedBlindedBlobSidecar struct { Message *BlindedBlobSidecar `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func SignedBlindedBlobSidecarFromConsensus ¶
func SignedBlindedBlobSidecarFromConsensus(b *zond.SignedBlindedBlobSidecar) (*SignedBlindedBlobSidecar, error)
func (*SignedBlindedBlobSidecar) ToConensus ¶
func (s *SignedBlindedBlobSidecar) ToConensus(i int) (*zond.SignedBlindedBlobSidecar, error)
type SignedBlobSidecar ¶
type SignedBlobSidecar struct { Message *BlobSidecar `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func SignedBlobSidecarFromConsensus ¶
func SignedBlobSidecarFromConsensus(b *zond.SignedBlobSidecar) (*SignedBlobSidecar, error)
func (*SignedBlobSidecar) ToConsensus ¶
func (s *SignedBlobSidecar) ToConsensus() (*zond.SignedBlobSidecar, error)
type SignedContributionAndProof ¶
type SignedContributionAndProof struct { Message *ContributionAndProof `json:"message"` Signature string `json:"signature"` }
func (*SignedContributionAndProof) ToConsensus ¶
func (s *SignedContributionAndProof) ToConsensus() (*zond.SignedContributionAndProof, error)
type SignedDilithiumToExecutionChange ¶
type SignedDilithiumToExecutionChange struct { Message *DilithiumToExecutionChange `json:"message" validate:"required"` Signature string `json:"signature" validate:"required"` }
func DilithiumChangesFromConsensus ¶
func DilithiumChangesFromConsensus(src []*zond.SignedDilithiumToExecutionChange) ([]*SignedDilithiumToExecutionChange, error)
type SignedValidatorRegistration ¶
type SignedValidatorRegistration struct { Message *ValidatorRegistration `json:"message"` Signature string `json:"signature"` }
func SignedValidatorRegistrationFromConsensus ¶
func SignedValidatorRegistrationFromConsensus(vr *zond.SignedValidatorRegistrationV1) (*SignedValidatorRegistration, error)
func (*SignedValidatorRegistration) ToConsensus ¶
func (s *SignedValidatorRegistration) ToConsensus() (*zond.SignedValidatorRegistrationV1, error)
type SignedVoluntaryExit ¶
type SignedVoluntaryExit struct { Message *VoluntaryExit `json:"message"` Signature string `json:"signature"` }
func ExitsFromConsensus ¶
func ExitsFromConsensus(src []*zond.SignedVoluntaryExit) ([]*SignedVoluntaryExit, error)
func SignedVoluntaryExitFromConsensus ¶
func SignedVoluntaryExitFromConsensus(e *zond.SignedVoluntaryExit) *SignedVoluntaryExit
func (*SignedVoluntaryExit) ToConsensus ¶
func (e *SignedVoluntaryExit) ToConsensus() (*zond.SignedVoluntaryExit, error)
type SyncAggregate ¶
type SyncCommitteeContribution ¶
type SyncCommitteeContribution struct { Slot string `json:"slot"` BeaconBlockRoot string `json:"beacon_block_root"` SubcommitteeIndex string `json:"subcommittee_index"` AggregationBits string `json:"aggregation_bits"` Signature string `json:"signature"` }
func (*SyncCommitteeContribution) ToConsensus ¶
func (s *SyncCommitteeContribution) ToConsensus() (*zond.SyncCommitteeContribution, error)
type SyncCommitteeMessage ¶
type SyncCommitteeMessage struct { Slot string `json:"slot"` BeaconBlockRoot string `json:"beacon_block_root"` ValidatorIndex string `json:"validator_index"` Signature string `json:"signature"` }
func (*SyncCommitteeMessage) ToConsensus ¶
func (m *SyncCommitteeMessage) ToConsensus() (*zond.SyncCommitteeMessage, error)
type SyncCommitteeSubscription ¶
type SyncCommitteeSubscription struct { ValidatorIndex string `json:"validator_index"` SyncCommitteeIndices []string `json:"sync_committee_indices"` UntilEpoch string `json:"until_epoch"` }
func (*SyncCommitteeSubscription) ToConsensus ¶
func (s *SyncCommitteeSubscription) ToConsensus() (*validator.SyncCommitteeSubscription, error)
type SyncDetails ¶
type SyncDetails struct { HeadSlot string `json:"head_slot"` SyncDistance string `json:"sync_distance"` IsSyncing bool `json:"is_syncing"` IsOptimistic bool `json:"is_optimistic"` ElOffline bool `json:"el_offline"` }
SyncDetails contains information about node sync status.
type SyncDetailsContainer ¶
type SyncDetailsContainer struct {
Data *SyncDetails `json:"data"`
}
SyncDetailsContainer is a wrapper for Data.
type ValidatorRegistration ¶
type ValidatorRegistration struct { FeeRecipient string `json:"fee_recipient"` GasLimit string `json:"gas_limit"` Timestamp string `json:"timestamp"` Pubkey string `json:"pubkey"` }
func ValidatorRegistrationFromConsensus ¶
func ValidatorRegistrationFromConsensus(vr *zond.ValidatorRegistrationV1) (*ValidatorRegistration, error)
func (*ValidatorRegistration) ToConsensus ¶
func (s *ValidatorRegistration) ToConsensus() (*zond.ValidatorRegistrationV1, error)
type VoluntaryExit ¶
type VoluntaryExit struct { Epoch string `json:"epoch"` ValidatorIndex string `json:"validator_index"` }
func VoluntaryExitFromConsensus ¶
func VoluntaryExitFromConsensus(e *zond.VoluntaryExit) *VoluntaryExit
func (*VoluntaryExit) ToConsensus ¶
func (e *VoluntaryExit) ToConsensus() (*zond.VoluntaryExit, error)