Versions in this module Expand all Collapse all v0 v0.0.4 Jan 15, 2025 v0.0.1 Jan 15, 2025 Changes in this version + func AttesterSlashingsToConsensus(src []*AttesterSlashing) ([]*eth.AttesterSlashing, error) + func AttsToConsensus(src []*Attestation) ([]*eth.Attestation, error) + func BlsChangesToConsensus(src []*SignedBlsToExecutionChange) ([]*eth.SignedBLSToExecutionChange, error) + func DecodeHexWithLength(s string, length int) ([]byte, error) + func DecodeHexWithMaxLength(s string, maxLength int) ([]byte, error) + func DepositsToConsensus(src []*Deposit) ([]*eth.Deposit, error) + func ExitsToConsensus(src []*SignedVoluntaryExit) ([]*eth.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) ([]*eth.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 struct + Aggregate *Attestation + AggregatorIndex string + SelectionProof string + func (a *AggregateAttestationAndProof) ToConsensus() (*eth.AggregateAttestationAndProof, error) + type Attestation struct + AggregationBits string + Data *AttestationData + Signature string + func AttestationFromConsensus(a *eth.Attestation) *Attestation + func AttsFromConsensus(src []*eth.Attestation) ([]*Attestation, error) + func (a *Attestation) ToConsensus() (*eth.Attestation, error) + type AttestationData struct + BeaconBlockRoot string + CommitteeIndex string + Slot string + Source *Checkpoint + Target *Checkpoint + func AttestationDataFromConsensus(a *eth.AttestationData) *AttestationData + func (a *AttestationData) ToConsensus() (*eth.AttestationData, error) + type AttesterSlashing struct + Attestation1 *IndexedAttestation + Attestation2 *IndexedAttestation + func AttesterSlashingsFromConsensus(src []*eth.AttesterSlashing) ([]*AttesterSlashing, error) + type BeaconBlock struct + Body *BeaconBlockBody + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BeaconBlockFromConsensus(b *eth.BeaconBlock) (*BeaconBlock, error) + func (b *BeaconBlock) ToConsensus() (*eth.BeaconBlock, error) + func (b *BeaconBlock) ToGeneric() (*eth.GenericBeaconBlock, error) + type BeaconBlockAltair struct + Body *BeaconBlockBodyAltair + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BeaconBlockAltairFromConsensus(b *eth.BeaconBlockAltair) (*BeaconBlockAltair, error) + func (b *BeaconBlockAltair) ToConsensus() (*eth.BeaconBlockAltair, error) + func (b *BeaconBlockAltair) ToGeneric() (*eth.GenericBeaconBlock, error) + type BeaconBlockBellatrix struct + Body *BeaconBlockBodyBellatrix + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BeaconBlockBellatrixFromConsensus(b *eth.BeaconBlockBellatrix) (*BeaconBlockBellatrix, error) + func (b *BeaconBlockBellatrix) ToConsensus() (*eth.BeaconBlockBellatrix, error) + func (b *BeaconBlockBellatrix) ToGeneric() (*eth.GenericBeaconBlock, error) + type BeaconBlockBody struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + Deposits []*Deposit + Eth1Data *Eth1Data + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + VoluntaryExits []*SignedVoluntaryExit + type BeaconBlockBodyAltair struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + Deposits []*Deposit + Eth1Data *Eth1Data + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BeaconBlockBodyBellatrix struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + Deposits []*Deposit + Eth1Data *Eth1Data + ExecutionPayload *ExecutionPayload + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BeaconBlockBodyCapella struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + BlsToExecutionChanges []*SignedBlsToExecutionChange + Deposits []*Deposit + Eth1Data *Eth1Data + ExecutionPayload *ExecutionPayloadCapella + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BeaconBlockBodyDeneb struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + BlobKzgCommitments []string + BlsToExecutionChanges []*SignedBlsToExecutionChange + Deposits []*Deposit + Eth1Data *Eth1Data + ExecutionPayload *ExecutionPayloadDeneb + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BeaconBlockCapella struct + Body *BeaconBlockBodyCapella + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BeaconBlockCapellaFromConsensus(b *eth.BeaconBlockCapella) (*BeaconBlockCapella, error) + func (b *BeaconBlockCapella) ToConsensus() (*eth.BeaconBlockCapella, error) + func (b *BeaconBlockCapella) ToGeneric() (*eth.GenericBeaconBlock, error) + type BeaconBlockContentsDeneb struct + BlobSidecars []*BlobSidecar + Block *BeaconBlockDeneb + func BeaconBlockContentsDenebFromConsensus(b *eth.BeaconBlockAndBlobsDeneb) (*BeaconBlockContentsDeneb, error) + func (b *BeaconBlockContentsDeneb) ToConsensus() (*eth.BeaconBlockAndBlobsDeneb, error) + func (b *BeaconBlockContentsDeneb) ToGeneric() (*eth.GenericBeaconBlock, error) + type BeaconBlockDeneb struct + Body *BeaconBlockBodyDeneb + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BeaconBlockDenebFromConsensus(b *eth.BeaconBlockDeneb) (*BeaconBlockDeneb, error) + func (b *BeaconBlockDeneb) ToConsensus() (*eth.BeaconBlockDeneb, error) + type BeaconBlockHeader struct + BodyRoot string + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BeaconBlockHeaderFromConsensus(h *eth.BeaconBlockHeader) *BeaconBlockHeader + type BeaconCommitteeSubscription struct + CommitteeIndex string + CommitteesAtSlot string + IsAggregator bool + Slot string + ValidatorIndex string + func (b *BeaconCommitteeSubscription) ToConsensus() (*validator.BeaconCommitteeSubscription, error) + type BlindedBeaconBlockBellatrix struct + Body *BlindedBeaconBlockBodyBellatrix + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BlindedBeaconBlockBellatrixFromConsensus(b *eth.BlindedBeaconBlockBellatrix) (*BlindedBeaconBlockBellatrix, error) + func (b *BlindedBeaconBlockBellatrix) ToConsensus() (*eth.BlindedBeaconBlockBellatrix, error) + func (b *BlindedBeaconBlockBellatrix) ToGeneric() (*eth.GenericBeaconBlock, error) + type BlindedBeaconBlockBodyBellatrix struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + Deposits []*Deposit + Eth1Data *Eth1Data + ExecutionPayloadHeader *ExecutionPayloadHeader + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BlindedBeaconBlockBodyCapella struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + BlsToExecutionChanges []*SignedBlsToExecutionChange + Deposits []*Deposit + Eth1Data *Eth1Data + ExecutionPayloadHeader *ExecutionPayloadHeaderCapella + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BlindedBeaconBlockBodyDeneb struct + Attestations []*Attestation + AttesterSlashings []*AttesterSlashing + BlobKzgCommitments []string + BlsToExecutionChanges []*SignedBlsToExecutionChange + Deposits []*Deposit + Eth1Data *Eth1Data + ExecutionPayloadHeader *ExecutionPayloadHeaderDeneb + Graffiti string + ProposerSlashings []*ProposerSlashing + RandaoReveal string + SyncAggregate *SyncAggregate + VoluntaryExits []*SignedVoluntaryExit + type BlindedBeaconBlockCapella struct + Body *BlindedBeaconBlockBodyCapella + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BlindedBeaconBlockCapellaFromConsensus(b *eth.BlindedBeaconBlockCapella) (*BlindedBeaconBlockCapella, error) + func (b *BlindedBeaconBlockCapella) ToConsensus() (*eth.BlindedBeaconBlockCapella, error) + func (b *BlindedBeaconBlockCapella) ToGeneric() (*eth.GenericBeaconBlock, error) + type BlindedBeaconBlockContentsDeneb struct + BlindedBlobSidecars []*BlindedBlobSidecar + BlindedBlock *BlindedBeaconBlockDeneb + func BlindedBeaconBlockContentsDenebFromConsensus(b *eth.BlindedBeaconBlockAndBlobsDeneb) (*BlindedBeaconBlockContentsDeneb, error) + func (b *BlindedBeaconBlockContentsDeneb) ToGeneric() (*eth.GenericBeaconBlock, error) + type BlindedBeaconBlockDeneb struct + Body *BlindedBeaconBlockBodyDeneb + ParentRoot string + ProposerIndex string + Slot string + StateRoot string + func BlindedBeaconBlockDenebFromConsensus(b *eth.BlindedBeaconBlockDeneb) (*BlindedBeaconBlockDeneb, error) + func (b *BlindedBeaconBlockDeneb) ToConsensus() (*eth.BlindedBeaconBlockDeneb, error) + type BlindedBlobSidecar struct + BlobRoot string + BlockParentRoot string + BlockRoot string + Index string + KzgCommitment string + KzgProof string + ProposerIndex string + Slot string + func BlindedBlobSidecarFromConsensus(b *eth.BlindedBlobSidecar) (*BlindedBlobSidecar, error) + func (s *BlindedBlobSidecar) ToConsensus() (*eth.BlindedBlobSidecar, error) + type BlobSidecar struct + Blob string + BlockParentRoot string + BlockRoot string + Index string + KzgCommitment string + KzgProof string + ProposerIndex string + Slot string + func BlobSidecarFromConsensus(b *eth.BlobSidecar) (*BlobSidecar, error) + func (s *BlobSidecar) ToConsensus() (*eth.BlobSidecar, error) + type BlsToExecutionChange struct + FromBlsPubkey string + ToExecutionAddress string + ValidatorIndex string + type Checkpoint struct + Epoch string + Root string + func CheckpointFromConsensus(c *eth.Checkpoint) *Checkpoint + func (c *Checkpoint) ToConsensus() (*eth.Checkpoint, error) + type Committee struct + Index string + Slot string + Validators []string + type ContributionAndProof struct + AggregatorIndex string + Contribution *SyncCommitteeContribution + SelectionProof string + func (c *ContributionAndProof) ToConsensus() (*eth.ContributionAndProof, error) + type DecodeError struct + func NewDecodeError(err error, field string) *DecodeError + func (e *DecodeError) Error() string + type Deposit struct + Data *DepositData + Proof []string + func DepositsFromConsensus(src []*eth.Deposit) ([]*Deposit, error) + type DepositData struct + Amount string + Pubkey string + Signature string + WithdrawalCredentials string + type Eth1Data struct + BlockHash string + DepositCount string + DepositRoot string + type ExecutionPayload struct + BaseFeePerGas string + BlockHash string + BlockNumber string + ExtraData string + FeeRecipient string + GasLimit string + GasUsed string + LogsBloom string + ParentHash string + PrevRandao string + ReceiptsRoot string + StateRoot string + Timestamp string + Transactions []string + type ExecutionPayloadCapella struct + BaseFeePerGas string + BlockHash string + BlockNumber string + ExtraData string + FeeRecipient string + GasLimit string + GasUsed string + LogsBloom string + ParentHash string + PrevRandao string + ReceiptsRoot string + StateRoot string + Timestamp string + Transactions []string + Withdrawals []*Withdrawal + type ExecutionPayloadDeneb struct + BaseFeePerGas string + BlobGasUsed string + BlockHash string + BlockNumber string + ExcessBlobGas string + ExtraData string + FeeRecipient string + GasLimit string + GasUsed string + LogsBloom string + ParentHash string + PrevRandao string + ReceiptsRoot string + StateRoot string + Timestamp string + Transactions []string + Withdrawals []*Withdrawal + type ExecutionPayloadHeader struct + BaseFeePerGas string + BlockHash string + BlockNumber string + ExtraData string + FeeRecipient string + GasLimit string + GasUsed string + LogsBloom string + ParentHash string + PrevRandao string + ReceiptsRoot string + StateRoot string + Timestamp string + TransactionsRoot string + type ExecutionPayloadHeaderCapella struct + BaseFeePerGas string + BlockHash string + BlockNumber string + ExtraData string + FeeRecipient string + GasLimit string + GasUsed string + LogsBloom string + ParentHash string + PrevRandao string + ReceiptsRoot string + StateRoot string + Timestamp string + TransactionsRoot string + WithdrawalsRoot string + type ExecutionPayloadHeaderDeneb struct + BaseFeePerGas string + BlobGasUsed string + BlockHash string + BlockNumber string + ExcessBlobGas string + ExtraData string + FeeRecipient string + GasLimit string + GasUsed string + LogsBloom string + ParentHash string + PrevRandao string + ReceiptsRoot string + StateRoot string + Timestamp string + TransactionsRoot string + WithdrawalsRoot string + type FeeRecipient struct + FeeRecipient string + ValidatorIndex string + type Fork struct + CurrentVersion string + Epoch string + PreviousVersion string + func (s *Fork) ToConsensus() (*eth.Fork, error) + type IndexedAttestation struct + AttestingIndices []string + Data *AttestationData + Signature string + type IndexedVerificationFailure struct + Index int + Message string + type IndexedVerificationFailureError struct + Code int + Failures []*IndexedVerificationFailure + Message string + func (e *IndexedVerificationFailureError) StatusCode() int + type ProposerSlashing struct + SignedHeader1 *SignedBeaconBlockHeader + SignedHeader2 *SignedBeaconBlockHeader + func ProposerSlashingsFromConsensus(src []*eth.ProposerSlashing) ([]*ProposerSlashing, error) + type SignedAggregateAttestationAndProof struct + Message *AggregateAttestationAndProof + Signature string + func (s *SignedAggregateAttestationAndProof) ToConsensus() (*eth.SignedAggregateAttestationAndProof, error) + type SignedBeaconBlock struct + Message *BeaconBlock + Signature string + func (b *SignedBeaconBlock) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + type SignedBeaconBlockAltair struct + Message *BeaconBlockAltair + Signature string + func (b *SignedBeaconBlockAltair) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + type SignedBeaconBlockBellatrix struct + Message *BeaconBlockBellatrix + Signature string + func (b *SignedBeaconBlockBellatrix) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + type SignedBeaconBlockCapella struct + Message *BeaconBlockCapella + Signature string + func (b *SignedBeaconBlockCapella) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + type SignedBeaconBlockContentsDeneb struct + SignedBlobSidecars []*SignedBlobSidecar + SignedBlock *SignedBeaconBlockDeneb + func SignedBeaconBlockContentsDenebFromConsensus(b *eth.SignedBeaconBlockAndBlobsDeneb) (*SignedBeaconBlockContentsDeneb, error) + func (b *SignedBeaconBlockContentsDeneb) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + func (b *SignedBeaconBlockContentsDeneb) ToUnsigned() *BeaconBlockContentsDeneb + type SignedBeaconBlockDeneb struct + Message *BeaconBlockDeneb + Signature string + func SignedBeaconBlockDenebFromConsensus(b *eth.SignedBeaconBlockDeneb) (*SignedBeaconBlockDeneb, error) + func (b *SignedBeaconBlockDeneb) ToConsensus() (*eth.SignedBeaconBlockDeneb, error) + type SignedBeaconBlockHeader struct + Message *BeaconBlockHeader + Signature string + type SignedBeaconBlockHeaderContainer struct + Canonical bool + Header *SignedBeaconBlockHeader + Root string + type SignedBlindedBeaconBlockBellatrix struct + Message *BlindedBeaconBlockBellatrix + Signature string + func SignedBlindedBeaconBlockBellatrixFromConsensus(b *eth.SignedBlindedBeaconBlockBellatrix) (*SignedBlindedBeaconBlockBellatrix, error) + func (b *SignedBlindedBeaconBlockBellatrix) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + type SignedBlindedBeaconBlockCapella struct + Message *BlindedBeaconBlockCapella + Signature string + func SignedBlindedBeaconBlockCapellaFromConsensus(b *eth.SignedBlindedBeaconBlockCapella) (*SignedBlindedBeaconBlockCapella, error) + func (b *SignedBlindedBeaconBlockCapella) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + type SignedBlindedBeaconBlockContentsDeneb struct + SignedBlindedBlobSidecars []*SignedBlindedBlobSidecar + SignedBlindedBlock *SignedBlindedBeaconBlockDeneb + func SignedBlindedBeaconBlockContentsDenebFromConsensus(b *eth.SignedBlindedBeaconBlockAndBlobsDeneb) (*SignedBlindedBeaconBlockContentsDeneb, error) + func (b *SignedBlindedBeaconBlockContentsDeneb) ToGeneric() (*eth.GenericSignedBeaconBlock, error) + func (b *SignedBlindedBeaconBlockContentsDeneb) ToUnsigned() *BlindedBeaconBlockContentsDeneb + type SignedBlindedBeaconBlockDeneb struct + Message *BlindedBeaconBlockDeneb + Signature string + func SignedBlindedBeaconBlockDenebFromConsensus(b *eth.SignedBlindedBeaconBlockDeneb) (*SignedBlindedBeaconBlockDeneb, error) + func (b *SignedBlindedBeaconBlockDeneb) ToConsensus() (*eth.SignedBlindedBeaconBlockDeneb, error) + type SignedBlindedBlobSidecar struct + Message *BlindedBlobSidecar + Signature string + func SignedBlindedBlobSidecarFromConsensus(b *eth.SignedBlindedBlobSidecar) (*SignedBlindedBlobSidecar, error) + func (s *SignedBlindedBlobSidecar) ToConensus(i int) (*eth.SignedBlindedBlobSidecar, error) + type SignedBlobSidecar struct + Message *BlobSidecar + Signature string + func SignedBlobSidecarFromConsensus(b *eth.SignedBlobSidecar) (*SignedBlobSidecar, error) + func (s *SignedBlobSidecar) ToConsensus() (*eth.SignedBlobSidecar, error) + type SignedBlsToExecutionChange struct + Message *BlsToExecutionChange + Signature string + func BlsChangesFromConsensus(src []*eth.SignedBLSToExecutionChange) ([]*SignedBlsToExecutionChange, error) + type SignedContributionAndProof struct + Message *ContributionAndProof + Signature string + func (s *SignedContributionAndProof) ToConsensus() (*eth.SignedContributionAndProof, error) + type SignedValidatorRegistration struct + Message *ValidatorRegistration + Signature string + func SignedValidatorRegistrationFromConsensus(vr *eth.SignedValidatorRegistrationV1) (*SignedValidatorRegistration, error) + func (s *SignedValidatorRegistration) ToConsensus() (*eth.SignedValidatorRegistrationV1, error) + type SignedVoluntaryExit struct + Message *VoluntaryExit + Signature string + func ExitsFromConsensus(src []*eth.SignedVoluntaryExit) ([]*SignedVoluntaryExit, error) + func SignedVoluntaryExitFromConsensus(e *eth.SignedVoluntaryExit) *SignedVoluntaryExit + func (e *SignedVoluntaryExit) ToConsensus() (*eth.SignedVoluntaryExit, error) + type SyncAggregate struct + SyncCommitteeBits string + SyncCommitteeSignature string + type SyncCommitteeContribution struct + AggregationBits string + BeaconBlockRoot string + Signature string + Slot string + SubcommitteeIndex string + func (s *SyncCommitteeContribution) ToConsensus() (*eth.SyncCommitteeContribution, error) + type SyncCommitteeMessage struct + BeaconBlockRoot string + Signature string + Slot string + ValidatorIndex string + func (m *SyncCommitteeMessage) ToConsensus() (*eth.SyncCommitteeMessage, error) + type SyncCommitteeSubscription struct + SyncCommitteeIndices []string + UntilEpoch string + ValidatorIndex string + func (s *SyncCommitteeSubscription) ToConsensus() (*validator.SyncCommitteeSubscription, error) + type SyncDetails struct + ElOffline bool + HeadSlot string + IsOptimistic bool + IsSyncing bool + SyncDistance string + type SyncDetailsContainer struct + Data *SyncDetails + type ValidatorRegistration struct + FeeRecipient string + GasLimit string + Pubkey string + Timestamp string + func ValidatorRegistrationFromConsensus(vr *eth.ValidatorRegistrationV1) (*ValidatorRegistration, error) + func (s *ValidatorRegistration) ToConsensus() (*eth.ValidatorRegistrationV1, error) + type VoluntaryExit struct + Epoch string + ValidatorIndex string + func VoluntaryExitFromConsensus(e *eth.VoluntaryExit) *VoluntaryExit + func (e *VoluntaryExit) ToConsensus() (*eth.VoluntaryExit, error) + type Withdrawal struct + Amount string + ExecutionAddress string + ValidatorIndex string + WithdrawalIndex string