common

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilObject              = errors.New("nil object")
	ErrUnsupportedBeaconBlock = errors.New("unsupported beacon block")
)

Functions

func AttestationDataToBase64

func AttestationDataToBase64(attestation *ethpb.AttestationData) (string, error)

func Base64ToAttestationData

func Base64ToAttestationData(attestDataBase64 string) (*ethpb.AttestationData, error)

func Base64ToGenericSignedBlock

func Base64ToGenericSignedBlock(signedBlockBase64 string) (*ethpb.GenericSignedBeaconBlock, error)

func Base64ToSignedAttestation

func Base64ToSignedAttestation(signedAttestDataBase64 string) (*ethpb.Attestation, error)

func Base64ToSignedDenebBlock added in v0.0.25

func Base64ToSignedDenebBlock(signedBlockBase64 string) (*ethpb.SignedBeaconBlockDeneb, error)

func GenericSignedBlockToBase64

func GenericSignedBlockToBase64(signedBlock *ethpb.GenericSignedBeaconBlock) (string, error)

func GetCapellaBlockFromGenericSignedBlock

func GetCapellaBlockFromGenericSignedBlock(signedBlock *ethpb.GenericSignedBeaconBlock) (*ethpb.SignedBeaconBlockCapella, error)

func GetDenebBlockFromGenericSignedBlock added in v0.0.24

func GetDenebBlockFromGenericSignedBlock(signedBlock *ethpb.GenericSignedBeaconBlock) (*ethpb.SignedBeaconBlockDeneb, error)

func SignedAttestationToBase64

func SignedAttestationToBase64(signedAttestation *ethpb.Attestation) (string, error)

func SignedDenebBlockToBase64 added in v0.0.25

func SignedDenebBlockToBase64(signedBlock *ethpb.SignedBeaconBlockDeneb) (string, error)

Types

type SlotTool

type SlotTool struct {
	SlotsPerEpoch int
}

func (SlotTool) EpochEnd

func (s SlotTool) EpochEnd(epoch int64) int64

func (SlotTool) EpochStart

func (s SlotTool) EpochStart(epoch int64) int64

func (SlotTool) SlotToEpoch

func (s SlotTool) SlotToEpoch(slot int64) int64

Jump to

Keyboard shortcuts

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