mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-18 15:54:13 +00:00
5aac06f04e
* begin move * use same import path * imports * regen protos * regen * no rename * generate ssz * gaz * fmt * edit build file * imports * modify * remove generated files * remove protos * edit imports in prysm * beacon chain all builds * edit script * add generated pbs * add replace rules * license for ethereumapis protos * change visibility * fmt * update build files to gaz ignore * use proper form * edit imports * wrap block * revert scripts * revert go mod
50 lines
1.3 KiB
Go
50 lines
1.3 KiB
Go
package interfaces
|
|
|
|
import (
|
|
types "github.com/prysmaticlabs/eth2-types"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
|
|
"google.golang.org/protobuf/proto"
|
|
)
|
|
|
|
// SignedBeaconBlock is an interface describing the method set of
|
|
// a signed beacon block.
|
|
type SignedBeaconBlock interface {
|
|
Block() BeaconBlock
|
|
Signature() []byte
|
|
IsNil() bool
|
|
Copy() SignedBeaconBlock
|
|
MarshalSSZ() ([]byte, error)
|
|
Proto() proto.Message
|
|
PbPhase0Block() (*ethpb.SignedBeaconBlock, error)
|
|
}
|
|
|
|
// BeaconBlock describes an interface which states the methods
|
|
// employed by an object that is a beacon block.
|
|
type BeaconBlock interface {
|
|
Slot() types.Slot
|
|
ProposerIndex() types.ValidatorIndex
|
|
ParentRoot() []byte
|
|
StateRoot() []byte
|
|
Body() BeaconBlockBody
|
|
IsNil() bool
|
|
HashTreeRoot() ([32]byte, error)
|
|
MarshalSSZ() ([]byte, error)
|
|
Proto() proto.Message
|
|
}
|
|
|
|
// BeaconBlockBody describes the method set employed by an object
|
|
// that is a beacon block body.
|
|
type BeaconBlockBody interface {
|
|
RandaoReveal() []byte
|
|
Eth1Data() *ethpb.Eth1Data
|
|
Graffiti() []byte
|
|
ProposerSlashings() []*ethpb.ProposerSlashing
|
|
AttesterSlashings() []*ethpb.AttesterSlashing
|
|
Attestations() []*ethpb.Attestation
|
|
Deposits() []*ethpb.Deposit
|
|
VoluntaryExits() []*ethpb.SignedVoluntaryExit
|
|
IsNil() bool
|
|
HashTreeRoot() ([32]byte, error)
|
|
Proto() proto.Message
|
|
}
|