types

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Code generated by fastssz. DO NOT EDIT. Hash: d1fe35ae1ab44365856903184e6aa983590a55d0579fe5f7ddcfc880405068c4

Code generated by fastssz. DO NOT EDIT. Hash: df71c3c8ba50391fbde221aa1571972be4dc214a4dd9bae00af6445efc38f540

Index

Constants

View Source
const (
	DepositContractTreeDepth = 32

	GenesisValidatorsRootKiln    = "0x99b09fcd43e5905236c370f184056bec6e6638cfc31a323b304fc4aa789cb4ad"
	GenesisValidatorsRootRopsten = "0x44f1e56283ca88b35c789f7f449e52339bc1fefe3a45913a43a6d16edcd33cf1"
	GenesisValidatorsRootSepolia = "0xd8ea171f3c94aea21ebc42a1ed61052acf3f9209c00e4efbaaddac09ed9b8078"
	GenesisValidatorsRootGoerli  = "0x043db0d9a83813551ee2f33450d23797757d430911a9320530ad8a0eabc43efb"
	GenesisValidatorsRootMainnet = "0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95"

	GenesisForkVersionKiln    = "0x70000069"
	GenesisForkVersionRopsten = "0x80000069"
	GenesisForkVersionSepolia = "0x90000069"
	GenesisForkVersionGoerli  = "0x00001020"
	GenesisForkVersionMainnet = "0x00000000"

	BellatrixForkVersionKiln    = "0x70000071"
	BellatrixForkVersionRopsten = "0x80000071"
	BellatrixForkVersionSepolia = "0x90000071"
	BellatrixForkVersionGoerli  = "0x02001020"
	BellatrixForkVersionMainnet = "0x02000000"
)

Variables

View Source
var (
	ErrLength = fmt.Errorf("incorrect byte length")
	ErrSign   = fmt.Errorf("negative value casted as unsigned int")
)
View Source
var (
	DomainBuilder Domain

	DomainTypeBeaconProposer = DomainType{0x00, 0x00, 0x00, 0x00}
	DomainTypeAppBuilder     = DomainType{0x00, 0x00, 0x00, 0x01}
)
View Source
var ErrInvalidTransaction = errors.New("invalid transaction")
View Source
var ErrNilPayload = errors.New("nil payload")

Functions

func ComputeDomain

func ComputeDomain(dt DomainType, forkVersion ForkVersion, genesisValidatorsRoot Root) [32]byte

func ComputeSigningRoot

func ComputeSigningRoot(obj HashTreeRoot, d Domain) ([32]byte, error)

func DecodeJSON

func DecodeJSON(r io.Reader, dst any) error

DecodeJSON decodes a JSON string into a struct while disallowing unknown fields

func ExecutionPayloadToHeader

func ExecutionPayloadToHeader(payload *ExecutionPayload) (*types.Header, error)

func VerifySignature

func VerifySignature(obj HashTreeRoot, d Domain, pkBytes, sigBytes []byte) (bool, error)

Types

type Address

type Address [20]byte

func HexToAddress

func HexToAddress(s string) (ret Address, err error)

HexToAddress takes a hex string and returns an Address

func (*Address) FromSlice

func (a *Address) FromSlice(x []byte) error

func (Address) MarshalText

func (a Address) MarshalText() ([]byte, error)

func (Address) String

func (a Address) String() string

func (*Address) UnmarshalJSON

func (a *Address) UnmarshalJSON(input []byte) error

func (*Address) UnmarshalText

func (a *Address) UnmarshalText(input []byte) error

type Attestation

type Attestation struct {
	AggregationBits hexutil.Bytes    `json:"aggregation_bits" ssz:"bitlist" ssz-max:"2048"` // MAX_VALIDATORS_PER_COMMITTEE
	Data            *AttestationData `json:"data"`
	Signature       Signature        `json:"signature" ssz-size:"96"`
}

Attestation https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#attestation

func (*Attestation) GetTree

func (a *Attestation) GetTree() (*ssz.Node, error)

GetTree ssz hashes the Attestation object

func (*Attestation) HashTreeRoot

func (a *Attestation) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the Attestation object

func (*Attestation) HashTreeRootWith

func (a *Attestation) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the Attestation object with a hasher

func (*Attestation) MarshalSSZ

func (a *Attestation) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the Attestation object

func (*Attestation) MarshalSSZTo

func (a *Attestation) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the Attestation object to a target array

func (*Attestation) SizeSSZ

func (a *Attestation) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the Attestation object

func (*Attestation) UnmarshalSSZ

func (a *Attestation) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the Attestation object

type AttestationData

type AttestationData struct {
	Slot      uint64      `json:"slot,string"`
	Index     uint64      `json:"index,string"`
	BlockRoot Root        `json:"beacon_block_root" ssz-size:"32"`
	Source    *Checkpoint `json:"source"`
	Target    *Checkpoint `json:"target"`
}

AttestationData https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#attestationdata

func (*AttestationData) GetTree

func (a *AttestationData) GetTree() (*ssz.Node, error)

GetTree ssz hashes the AttestationData object

func (*AttestationData) HashTreeRoot

func (a *AttestationData) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the AttestationData object

func (*AttestationData) HashTreeRootWith

func (a *AttestationData) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the AttestationData object with a hasher

func (*AttestationData) MarshalSSZ

func (a *AttestationData) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the AttestationData object

func (*AttestationData) MarshalSSZTo

func (a *AttestationData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the AttestationData object to a target array

func (*AttestationData) SizeSSZ

func (a *AttestationData) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the AttestationData object

func (*AttestationData) UnmarshalSSZ

func (a *AttestationData) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the AttestationData object

type AttesterSlashing

type AttesterSlashing struct {
	A *IndexedAttestation `json:"attestation_1"`
	B *IndexedAttestation `json:"attestation_2"`
}

AttesterSlashing https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#attesterslashing

func (*AttesterSlashing) GetTree

func (a *AttesterSlashing) GetTree() (*ssz.Node, error)

GetTree ssz hashes the AttesterSlashing object

func (*AttesterSlashing) HashTreeRoot

func (a *AttesterSlashing) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the AttesterSlashing object

func (*AttesterSlashing) HashTreeRootWith

func (a *AttesterSlashing) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the AttesterSlashing object with a hasher

func (*AttesterSlashing) MarshalSSZ

func (a *AttesterSlashing) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the AttesterSlashing object

func (*AttesterSlashing) MarshalSSZTo

func (a *AttesterSlashing) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the AttesterSlashing object to a target array

func (*AttesterSlashing) SizeSSZ

func (a *AttesterSlashing) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the AttesterSlashing object

func (*AttesterSlashing) UnmarshalSSZ

func (a *AttesterSlashing) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the AttesterSlashing object

type BeaconBlock

type BeaconBlock struct {
	Slot          uint64           `json:"slot,string"`
	ProposerIndex uint64           `json:"proposer_index,string"`
	ParentRoot    Root             `json:"parent_root" ssz-size:"32"`
	StateRoot     Root             `json:"state_root" ssz-size:"32"`
	Body          *BeaconBlockBody `json:"body"`
}

BeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L46

type BeaconBlockBody

type BeaconBlockBody struct {
	RandaoReveal      Signature              `json:"randao_reveal" ssz-size:"96"`
	Eth1Data          *Eth1Data              `json:"eth1_data"`
	Graffiti          Hash                   `json:"graffiti" ssz-size:"32"`
	ProposerSlashings []*ProposerSlashing    `json:"proposer_slashings" ssz-max:"16"`
	AttesterSlashings []*AttesterSlashing    `json:"attester_slashings" ssz-max:"2"`
	Attestations      []*Attestation         `json:"attestations" ssz-max:"128"`
	Deposits          []*Deposit             `json:"deposits" ssz-max:"16"`
	VoluntaryExits    []*SignedVoluntaryExit `json:"voluntary_exits" ssz-max:"16"`
	SyncAggregate     *SyncAggregate         `json:"sync_aggregate"`
	ExecutionPayload  *ExecutionPayload      `json:"execution_payload"`
}

BeaconBlockBody https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L38

type BeaconBlockHeader

type BeaconBlockHeader struct {
	Slot          uint64 `json:"slot,string"`
	ProposerIndex uint64 `json:"proposer_index,string"`
	ParentRoot    Root   `json:"parent_root" ssz-size:"32"`
	StateRoot     Root   `json:"state_root" ssz-size:"32"`
	BodyRoot      Root   `json:"body_root" ssz-size:"32"`
}

BeaconBlockHeader https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#beaconblockheader

func (*BeaconBlockHeader) GetTree

func (b *BeaconBlockHeader) GetTree() (*ssz.Node, error)

GetTree ssz hashes the BeaconBlockHeader object

func (*BeaconBlockHeader) HashTreeRoot

func (b *BeaconBlockHeader) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BeaconBlockHeader object

func (*BeaconBlockHeader) HashTreeRootWith

func (b *BeaconBlockHeader) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BeaconBlockHeader object with a hasher

func (*BeaconBlockHeader) MarshalSSZ

func (b *BeaconBlockHeader) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the BeaconBlockHeader object

func (*BeaconBlockHeader) MarshalSSZTo

func (b *BeaconBlockHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the BeaconBlockHeader object to a target array

func (*BeaconBlockHeader) SizeSSZ

func (b *BeaconBlockHeader) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the BeaconBlockHeader object

func (*BeaconBlockHeader) UnmarshalSSZ

func (b *BeaconBlockHeader) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the BeaconBlockHeader object

type BidTrace

type BidTrace struct {
	Slot                 uint64    `json:"slot,string"`
	ParentHash           Hash      `json:"parent_hash" ssz-size:"32"`
	BlockHash            Hash      `json:"block_hash" ssz-size:"32"`
	BuilderPubkey        PublicKey `json:"builder_pubkey" ssz-size:"48"`
	ProposerPubkey       PublicKey `json:"proposer_pubkey" ssz-size:"48"`
	ProposerFeeRecipient Address   `json:"proposer_fee_recipient" ssz-size:"20"`
	GasLimit             uint64    `json:"gas_limit,string"`
	GasUsed              uint64    `json:"gas_used,string"`
	Value                U256Str   `json:"value" ssz-size:"32"`
}

BidTrace is public information about a bid: https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5#286c858c4ba24e58ada6348d8d4b71ec

func (*BidTrace) GetTree

func (b *BidTrace) GetTree() (*ssz.Node, error)

GetTree ssz hashes the BidTrace object

func (*BidTrace) HashTreeRoot

func (b *BidTrace) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BidTrace object

func (*BidTrace) HashTreeRootWith

func (b *BidTrace) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BidTrace object with a hasher

func (*BidTrace) MarshalSSZ

func (b *BidTrace) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the BidTrace object

func (*BidTrace) MarshalSSZTo

func (b *BidTrace) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the BidTrace object to a target array

func (*BidTrace) SizeSSZ

func (b *BidTrace) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the BidTrace object

func (*BidTrace) UnmarshalSSZ

func (b *BidTrace) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the BidTrace object

type BlindedBeaconBlock

type BlindedBeaconBlock struct {
	Slot          uint64                  `json:"slot,string"`
	ProposerIndex uint64                  `json:"proposer_index,string"`
	ParentRoot    Root                    `json:"parent_root" ssz-size:"32"`
	StateRoot     Root                    `json:"state_root" ssz-size:"32"`
	Body          *BlindedBeaconBlockBody `json:"body"`
}

BlindedBeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L74

func (*BlindedBeaconBlock) GetTree

func (b *BlindedBeaconBlock) GetTree() (*ssz.Node, error)

GetTree ssz hashes the BlindedBeaconBlock object

func (*BlindedBeaconBlock) HashTreeRoot

func (b *BlindedBeaconBlock) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BlindedBeaconBlock object

func (*BlindedBeaconBlock) HashTreeRootWith

func (b *BlindedBeaconBlock) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BlindedBeaconBlock object with a hasher

func (*BlindedBeaconBlock) MarshalSSZ

func (b *BlindedBeaconBlock) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the BlindedBeaconBlock object

func (*BlindedBeaconBlock) MarshalSSZTo

func (b *BlindedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the BlindedBeaconBlock object to a target array

func (*BlindedBeaconBlock) SizeSSZ

func (b *BlindedBeaconBlock) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the BlindedBeaconBlock object

func (*BlindedBeaconBlock) UnmarshalSSZ

func (b *BlindedBeaconBlock) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the BlindedBeaconBlock object

type BlindedBeaconBlockBody

type BlindedBeaconBlockBody struct {
	RandaoReveal           Signature               `json:"randao_reveal" ssz-size:"96"`
	Eth1Data               *Eth1Data               `json:"eth1_data"`
	Graffiti               Hash                    `json:"graffiti" ssz-size:"32"`
	ProposerSlashings      []*ProposerSlashing     `json:"proposer_slashings" ssz-max:"16"`
	AttesterSlashings      []*AttesterSlashing     `json:"attester_slashings" ssz-max:"2"`
	Attestations           []*Attestation          `json:"attestations" ssz-max:"128"`
	Deposits               []*Deposit              `json:"deposits" ssz-max:"16"`
	VoluntaryExits         []*SignedVoluntaryExit  `json:"voluntary_exits" ssz-max:"16"`
	SyncAggregate          *SyncAggregate          `json:"sync_aggregate"`
	ExecutionPayloadHeader *ExecutionPayloadHeader `json:"execution_payload_header"`
}

BlindedBeaconBlockBody https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L65

func (*BlindedBeaconBlockBody) GetTree

func (b *BlindedBeaconBlockBody) GetTree() (*ssz.Node, error)

GetTree ssz hashes the BlindedBeaconBlockBody object

func (*BlindedBeaconBlockBody) HashTreeRoot

func (b *BlindedBeaconBlockBody) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BlindedBeaconBlockBody object

func (*BlindedBeaconBlockBody) HashTreeRootWith

func (b *BlindedBeaconBlockBody) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BlindedBeaconBlockBody object with a hasher

func (*BlindedBeaconBlockBody) MarshalSSZ

func (b *BlindedBeaconBlockBody) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the BlindedBeaconBlockBody object

func (*BlindedBeaconBlockBody) MarshalSSZTo

func (b *BlindedBeaconBlockBody) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the BlindedBeaconBlockBody object to a target array

func (*BlindedBeaconBlockBody) SizeSSZ

func (b *BlindedBeaconBlockBody) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the BlindedBeaconBlockBody object

func (*BlindedBeaconBlockBody) UnmarshalSSZ

func (b *BlindedBeaconBlockBody) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the BlindedBeaconBlockBody object

type Bloom

type Bloom [256]byte

func (*Bloom) FromSlice

func (b *Bloom) FromSlice(x []byte) error

func (Bloom) MarshalText

func (b Bloom) MarshalText() ([]byte, error)

func (Bloom) String

func (b Bloom) String() string

func (*Bloom) UnmarshalJSON

func (b *Bloom) UnmarshalJSON(input []byte) error

func (*Bloom) UnmarshalText

func (b *Bloom) UnmarshalText(input []byte) error

type BuilderBid

type BuilderBid struct {
	Header *ExecutionPayloadHeader `json:"header"`
	Value  U256Str                 `json:"value" ssz-size:"32"`
	Pubkey PublicKey               `json:"pubkey" ssz-size:"48"`
}

BuilderBid https://github.com/ethereum/builder-specs/pull/2/files#diff-b37cbf48e8754483e30e7caaadc5defc8c3c6e1aaf3273ee188d787b7c75d993

func (*BuilderBid) GetTree

func (b *BuilderBid) GetTree() (*ssz.Node, error)

GetTree ssz hashes the BuilderBid object

func (*BuilderBid) HashTreeRoot

func (b *BuilderBid) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BuilderBid object

func (*BuilderBid) HashTreeRootWith

func (b *BuilderBid) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BuilderBid object with a hasher

func (*BuilderBid) MarshalSSZ

func (b *BuilderBid) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the BuilderBid object

func (*BuilderBid) MarshalSSZTo

func (b *BuilderBid) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the BuilderBid object to a target array

func (*BuilderBid) SizeSSZ

func (b *BuilderBid) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the BuilderBid object

func (*BuilderBid) UnmarshalSSZ

func (b *BuilderBid) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the BuilderBid object

type BuilderGetValidatorsResponseEntry

type BuilderGetValidatorsResponseEntry struct {
	Slot  uint64                       `json:"slot,string"`
	Entry *SignedValidatorRegistration `json:"entry"`
}

BuilderGetValidatorsResponseEntry is an entry of the response array for getValidators: https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5#ba12faa6e2714825af4aa883bdef6d81

type BuilderSubmitBlockRequest

type BuilderSubmitBlockRequest struct {
	Signature        Signature         `json:"signature" ssz-size:"96"`
	Message          *BidTrace         `json:"message"`
	ExecutionPayload *ExecutionPayload `json:"execution_payload"`
}

BuilderSubmitBlockRequest spec: https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5#fa719683d4ae4a57bc3bf60e138b0dc6

type BuilderSubmitBlockResponse

type BuilderSubmitBlockResponse struct {
	Signature Signature                          `json:"signature" ssz-size:"96"`
	Message   *BuilderSubmitBlockResponseMessage `json:"message"`
}

BuilderSubmitBlockResponse spec: https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5#fa719683d4ae4a57bc3bf60e138b0dc6

type BuilderSubmitBlockResponseMessage

type BuilderSubmitBlockResponseMessage struct {
	ReceiveTimestamp uint64    `json:"receive_timestamp,string"`
	BidUnverified    *BidTrace `json:"bid_unverified"`
}

BuilderSubmitBlockResponseMessage spec: https://flashbots.notion.site/Relay-API-Spec-5fb0819366954962bc02e81cb33840f5#fa719683d4ae4a57bc3bf60e138b0dc6

func (*BuilderSubmitBlockResponseMessage) GetTree

GetTree ssz hashes the BuilderSubmitBlockResponseMessage object

func (*BuilderSubmitBlockResponseMessage) HashTreeRoot

func (b *BuilderSubmitBlockResponseMessage) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the BuilderSubmitBlockResponseMessage object

func (*BuilderSubmitBlockResponseMessage) HashTreeRootWith

func (b *BuilderSubmitBlockResponseMessage) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the BuilderSubmitBlockResponseMessage object with a hasher

func (*BuilderSubmitBlockResponseMessage) MarshalSSZ

func (b *BuilderSubmitBlockResponseMessage) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the BuilderSubmitBlockResponseMessage object

func (*BuilderSubmitBlockResponseMessage) MarshalSSZTo

func (b *BuilderSubmitBlockResponseMessage) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the BuilderSubmitBlockResponseMessage object to a target array

func (*BuilderSubmitBlockResponseMessage) SizeSSZ

func (b *BuilderSubmitBlockResponseMessage) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the BuilderSubmitBlockResponseMessage object

func (*BuilderSubmitBlockResponseMessage) UnmarshalSSZ

func (b *BuilderSubmitBlockResponseMessage) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the BuilderSubmitBlockResponseMessage object

type Checkpoint

type Checkpoint struct {
	Epoch uint64 `json:"epoch,string"`
	Root  Root   `json:"root" ssz-size:"32"`
}

Checkpoint ...

func (*Checkpoint) GetTree

func (c *Checkpoint) GetTree() (*ssz.Node, error)

GetTree ssz hashes the Checkpoint object

func (*Checkpoint) HashTreeRoot

func (c *Checkpoint) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the Checkpoint object

func (*Checkpoint) HashTreeRootWith

func (c *Checkpoint) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the Checkpoint object with a hasher

func (*Checkpoint) MarshalSSZ

func (c *Checkpoint) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the Checkpoint object

func (*Checkpoint) MarshalSSZTo

func (c *Checkpoint) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the Checkpoint object to a target array

func (*Checkpoint) SizeSSZ

func (c *Checkpoint) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the Checkpoint object

func (*Checkpoint) UnmarshalSSZ

func (c *Checkpoint) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the Checkpoint object

type CommitteeBits

type CommitteeBits [64]byte

func (*CommitteeBits) FromSlice

func (c *CommitteeBits) FromSlice(x []byte) error

func (CommitteeBits) MarshalText

func (c CommitteeBits) MarshalText() ([]byte, error)

func (CommitteeBits) String

func (c CommitteeBits) String() string

func (*CommitteeBits) UnmarshalJSON

func (c *CommitteeBits) UnmarshalJSON(input []byte) error

func (*CommitteeBits) UnmarshalText

func (c *CommitteeBits) UnmarshalText(input []byte) error

type Deposit

type Deposit struct {
	Proof [][]byte     `json:"proof,omitempty" ssz-size:"33,32"`
	Data  *DepositData `json:"data"`
}

Deposit https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#deposit

func (*Deposit) GetTree

func (d *Deposit) GetTree() (*ssz.Node, error)

GetTree ssz hashes the Deposit object

func (*Deposit) HashTreeRoot

func (d *Deposit) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the Deposit object

func (*Deposit) HashTreeRootWith

func (d *Deposit) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the Deposit object with a hasher

func (*Deposit) MarshalJSON

func (d *Deposit) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Deposit) MarshalSSZ

func (d *Deposit) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the Deposit object

func (*Deposit) MarshalSSZTo

func (d *Deposit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the Deposit object to a target array

func (*Deposit) SizeSSZ

func (d *Deposit) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the Deposit object

func (*Deposit) UnmarshalJSON

func (d *Deposit) UnmarshalJSON(input []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*Deposit) UnmarshalSSZ

func (d *Deposit) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the Deposit object

type DepositData

type DepositData struct {
	Pubkey                PublicKey `json:"pubkey" ssz-size:"48"`
	WithdrawalCredentials Hash      `json:"withdrawal_credentials" ssz-size:"32"`
	Amount                uint64    `json:"amount,string"`
	Signature             Signature `json:"signature" ssz-size:"96"`
}

DepositData https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#depositdata

func (*DepositData) GetTree

func (d *DepositData) GetTree() (*ssz.Node, error)

GetTree ssz hashes the DepositData object

func (*DepositData) HashTreeRoot

func (d *DepositData) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the DepositData object

func (*DepositData) HashTreeRootWith

func (d *DepositData) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the DepositData object with a hasher

func (*DepositData) MarshalSSZ

func (d *DepositData) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the DepositData object

func (*DepositData) MarshalSSZTo

func (d *DepositData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the DepositData object to a target array

func (*DepositData) SizeSSZ

func (d *DepositData) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the DepositData object

func (*DepositData) UnmarshalSSZ

func (d *DepositData) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the DepositData object

type Domain

type Domain [32]byte

type DomainType

type DomainType [4]byte

type Eth1Data

type Eth1Data struct {
	DepositRoot  Root   `json:"deposit_root" ssz-size:"32"`
	DepositCount uint64 `json:"deposit_count,string"`
	BlockHash    Hash   `json:"block_hash" ssz-size:"32"`
}

Eth1Data https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#eth1data

func (*Eth1Data) GetTree

func (e *Eth1Data) GetTree() (*ssz.Node, error)

GetTree ssz hashes the Eth1Data object

func (*Eth1Data) HashTreeRoot

func (e *Eth1Data) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the Eth1Data object

func (*Eth1Data) HashTreeRootWith

func (e *Eth1Data) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the Eth1Data object with a hasher

func (*Eth1Data) MarshalSSZ

func (e *Eth1Data) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the Eth1Data object

func (*Eth1Data) MarshalSSZTo

func (e *Eth1Data) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the Eth1Data object to a target array

func (*Eth1Data) SizeSSZ

func (e *Eth1Data) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the Eth1Data object

func (*Eth1Data) UnmarshalSSZ

func (e *Eth1Data) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the Eth1Data object

type ExecutionPayload

type ExecutionPayload struct {
	ParentHash    Hash            `json:"parent_hash" ssz-size:"32"`
	FeeRecipient  Address         `json:"fee_recipient" ssz-size:"20"`
	StateRoot     Root            `json:"state_root" ssz-size:"32"`
	ReceiptsRoot  Root            `json:"receipts_root" ssz-size:"32"`
	LogsBloom     Bloom           `json:"logs_bloom" ssz-size:"256"`
	Random        Hash            `json:"prev_randao" ssz-size:"32"`
	BlockNumber   uint64          `json:"block_number,string"`
	GasLimit      uint64          `json:"gas_limit,string"`
	GasUsed       uint64          `json:"gas_used,string"`
	Timestamp     uint64          `json:"timestamp,string"`
	ExtraData     ExtraData       `json:"extra_data" ssz-max:"32"`
	BaseFeePerGas U256Str         `json:"base_fee_per_gas" ssz-max:"32"`
	BlockHash     Hash            `json:"block_hash" ssz-size:"32"`
	Transactions  []hexutil.Bytes `json:"transactions" ssz-max:"1048576,1073741824" ssz-size:"?,?"`
}

ExecutionPayload https://github.com/ethereum/consensus-specs/blob/dev/specs/bellatrix/beacon-chain.md#executionpayload

type ExecutionPayloadHeader

type ExecutionPayloadHeader struct {
	ParentHash       Hash      `json:"parent_hash" ssz-size:"32"`
	FeeRecipient     Address   `json:"fee_recipient" ssz-size:"20"`
	StateRoot        Root      `json:"state_root" ssz-size:"32"`
	ReceiptsRoot     Root      `json:"receipts_root" ssz-size:"32"`
	LogsBloom        Bloom     `json:"logs_bloom" ssz-size:"256"`
	Random           Hash      `json:"prev_randao" ssz-size:"32"`
	BlockNumber      uint64    `json:"block_number,string"`
	GasLimit         uint64    `json:"gas_limit,string"`
	GasUsed          uint64    `json:"gas_used,string"`
	Timestamp        uint64    `json:"timestamp,string"`
	ExtraData        ExtraData `json:"extra_data" ssz-max:"32"`
	BaseFeePerGas    U256Str   `json:"base_fee_per_gas" ssz-size:"32"`
	BlockHash        Hash      `json:"block_hash" ssz-size:"32"`
	TransactionsRoot Root      `json:"transactions_root" ssz-size:"32"`
}

ExecutionPayloadHeader https://github.com/ethereum/consensus-specs/blob/dev/specs/bellatrix/beacon-chain.md#executionpayloadheader

func PayloadToPayloadHeader

func PayloadToPayloadHeader(p *ExecutionPayload) (*ExecutionPayloadHeader, error)

PayloadToPayloadHeader converts an ExecutionPayload to ExecutionPayloadHeader

func (*ExecutionPayloadHeader) GetTree

func (e *ExecutionPayloadHeader) GetTree() (*ssz.Node, error)

GetTree ssz hashes the ExecutionPayloadHeader object

func (*ExecutionPayloadHeader) HashTreeRoot

func (e *ExecutionPayloadHeader) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the ExecutionPayloadHeader object

func (*ExecutionPayloadHeader) HashTreeRootWith

func (e *ExecutionPayloadHeader) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the ExecutionPayloadHeader object with a hasher

func (*ExecutionPayloadHeader) MarshalSSZ

func (e *ExecutionPayloadHeader) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the ExecutionPayloadHeader object

func (*ExecutionPayloadHeader) MarshalSSZTo

func (e *ExecutionPayloadHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the ExecutionPayloadHeader object to a target array

func (*ExecutionPayloadHeader) SizeSSZ

func (e *ExecutionPayloadHeader) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the ExecutionPayloadHeader object

func (*ExecutionPayloadHeader) UnmarshalSSZ

func (e *ExecutionPayloadHeader) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the ExecutionPayloadHeader object

type ExtraData

type ExtraData []byte

func (*ExtraData) FromSlice

func (e *ExtraData) FromSlice(x []byte) error

func (ExtraData) MarshalText

func (e ExtraData) MarshalText() ([]byte, error)

func (ExtraData) String

func (e ExtraData) String() string

func (*ExtraData) UnmarshalJSON

func (e *ExtraData) UnmarshalJSON(input []byte) error

func (*ExtraData) UnmarshalText

func (e *ExtraData) UnmarshalText(input []byte) error

type ForkData

type ForkData struct {
	CurrentVersion        ForkVersion `json:"current_version" ssz-size:"4"`
	GenesisValidatorsRoot Root        `json:"genesis_validators_root" ssz-size:"32"`
}

func (*ForkData) GetTree

func (f *ForkData) GetTree() (*ssz.Node, error)

GetTree ssz hashes the ForkData object

func (*ForkData) HashTreeRoot

func (f *ForkData) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the ForkData object

func (*ForkData) HashTreeRootWith

func (f *ForkData) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the ForkData object with a hasher

func (*ForkData) MarshalSSZ

func (f *ForkData) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the ForkData object

func (*ForkData) MarshalSSZTo

func (f *ForkData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the ForkData object to a target array

func (*ForkData) SizeSSZ

func (f *ForkData) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the ForkData object

func (*ForkData) UnmarshalSSZ

func (f *ForkData) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the ForkData object

type ForkVersion

type ForkVersion [4]byte

type GetHeaderResponse

type GetHeaderResponse struct {
	Version VersionString     `json:"version"`
	Data    *SignedBuilderBid `json:"data"`
}

GetHeaderResponse is the response payload from the getHeader request: https://github.com/ethereum/builder-specs/pull/2/files#diff-c80f52e38c99b1049252a99215450a29fd248d709ffd834a9480c98a233bf32c

type GetPayloadResponse

type GetPayloadResponse struct {
	Version VersionString     `json:"version"`
	Data    *ExecutionPayload `json:"data"`
}

GetPayloadResponse is the response payload from the getPayload request: https://github.com/ethereum/builder-specs/pull/2/files#diff-8446716b376f3ffe88737f9773ce2ff21adc2bc0f2c9a140dcc2e9d632091ba4

type Hash

type Hash [32]byte

func CalculateHash

func CalculateHash(payload *ExecutionPayload) (Hash, error)

func (*Hash) FromSlice

func (h *Hash) FromSlice(x []byte) error

func (Hash) MarshalText

func (h Hash) MarshalText() ([]byte, error)

func (Hash) String

func (h Hash) String() string

func (*Hash) UnmarshalJSON

func (h *Hash) UnmarshalJSON(input []byte) error

func (*Hash) UnmarshalText

func (h *Hash) UnmarshalText(input []byte) error

type HashTreeRoot

type HashTreeRoot interface {
	HashTreeRoot() ([32]byte, error)
}

type IndexedAttestation

type IndexedAttestation struct {
	AttestingIndices Uint64StringSlice `json:"attesting_indices" ssz-max:"2048"` // MAX_VALIDATORS_PER_COMMITTEE
	Data             *AttestationData  `json:"data"`
	Signature        Signature         `json:"signature" ssz-size:"96"`
}

IndexedAttestation https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#indexedattestation

func (*IndexedAttestation) GetTree

func (i *IndexedAttestation) GetTree() (*ssz.Node, error)

GetTree ssz hashes the IndexedAttestation object

func (*IndexedAttestation) HashTreeRoot

func (i *IndexedAttestation) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the IndexedAttestation object

func (*IndexedAttestation) HashTreeRootWith

func (i *IndexedAttestation) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the IndexedAttestation object with a hasher

func (*IndexedAttestation) MarshalSSZ

func (i *IndexedAttestation) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the IndexedAttestation object

func (*IndexedAttestation) MarshalSSZTo

func (i *IndexedAttestation) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the IndexedAttestation object to a target array

func (*IndexedAttestation) SizeSSZ

func (i *IndexedAttestation) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the IndexedAttestation object

func (*IndexedAttestation) UnmarshalSSZ

func (i *IndexedAttestation) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the IndexedAttestation object

type ProposerSlashing

type ProposerSlashing struct {
	A *SignedBeaconBlockHeader `json:"signed_header_1"`
	B *SignedBeaconBlockHeader `json:"signed_header_2"`
}

ProposerSlashing https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#proposerslashing

func (*ProposerSlashing) GetTree

func (p *ProposerSlashing) GetTree() (*ssz.Node, error)

GetTree ssz hashes the ProposerSlashing object

func (*ProposerSlashing) HashTreeRoot

func (p *ProposerSlashing) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the ProposerSlashing object

func (*ProposerSlashing) HashTreeRootWith

func (p *ProposerSlashing) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the ProposerSlashing object with a hasher

func (*ProposerSlashing) MarshalSSZ

func (p *ProposerSlashing) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the ProposerSlashing object

func (*ProposerSlashing) MarshalSSZTo

func (p *ProposerSlashing) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the ProposerSlashing object to a target array

func (*ProposerSlashing) SizeSSZ

func (p *ProposerSlashing) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the ProposerSlashing object

func (*ProposerSlashing) UnmarshalSSZ

func (p *ProposerSlashing) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the ProposerSlashing object

type PubkeyHex

type PubkeyHex string

func NewPubkeyHex

func NewPubkeyHex(pk string) PubkeyHex

func (PubkeyHex) String

func (p PubkeyHex) String() string

type PublicKey

type PublicKey [48]byte

func BlsPublicKeyToPublicKey

func BlsPublicKeyToPublicKey(blsPubKey *bls.PublicKey) (ret PublicKey, err error)

func HexToPubkey

func HexToPubkey(s string) (ret PublicKey, err error)

HexToPubkey takes a hex string and returns a PublicKey

func (*PublicKey) FromSlice

func (p *PublicKey) FromSlice(x []byte) error

func (PublicKey) MarshalText

func (p PublicKey) MarshalText() ([]byte, error)

func (PublicKey) PubkeyHex

func (p PublicKey) PubkeyHex() PubkeyHex

func (PublicKey) String

func (p PublicKey) String() string

func (*PublicKey) UnmarshalJSON

func (p *PublicKey) UnmarshalJSON(input []byte) error

func (*PublicKey) UnmarshalText

func (p *PublicKey) UnmarshalText(input []byte) error

type RegisterValidatorRequestMessage

type RegisterValidatorRequestMessage struct {
	FeeRecipient Address   `json:"fee_recipient" ssz-size:"20"` // type was Address
	GasLimit     uint64    `json:"gas_limit,string"`
	Timestamp    uint64    `json:"timestamp,string"`
	Pubkey       PublicKey `json:"pubkey" ssz-size:"48"` // type was PublicKey
}

RegisterValidatorRequestMessage https://github.com/ethereum/beacon-APIs/blob/master/types/registration.yaml

func (*RegisterValidatorRequestMessage) GetTree

func (r *RegisterValidatorRequestMessage) GetTree() (*ssz.Node, error)

GetTree ssz hashes the RegisterValidatorRequestMessage object

func (*RegisterValidatorRequestMessage) HashTreeRoot

func (r *RegisterValidatorRequestMessage) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the RegisterValidatorRequestMessage object

func (*RegisterValidatorRequestMessage) HashTreeRootWith

func (r *RegisterValidatorRequestMessage) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the RegisterValidatorRequestMessage object with a hasher

func (*RegisterValidatorRequestMessage) MarshalSSZ

func (r *RegisterValidatorRequestMessage) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the RegisterValidatorRequestMessage object

func (*RegisterValidatorRequestMessage) MarshalSSZTo

func (r *RegisterValidatorRequestMessage) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the RegisterValidatorRequestMessage object to a target array

func (*RegisterValidatorRequestMessage) SizeSSZ

func (r *RegisterValidatorRequestMessage) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the RegisterValidatorRequestMessage object

func (*RegisterValidatorRequestMessage) UnmarshalSSZ

func (r *RegisterValidatorRequestMessage) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the RegisterValidatorRequestMessage object

type Root

type Root = Hash

type Signature

type Signature [96]byte

func HexToSignature

func HexToSignature(s string) (ret Signature, err error)

HexToSignature takes a hex string and returns a Signature

func SignMessage

func SignMessage(obj HashTreeRoot, d Domain, sk *bls.SecretKey) (Signature, error)

func (*Signature) FromSlice

func (s *Signature) FromSlice(x []byte) error

func (Signature) MarshalText

func (s Signature) MarshalText() ([]byte, error)

func (Signature) String

func (s Signature) String() string

func (*Signature) UnmarshalJSON

func (s *Signature) UnmarshalJSON(input []byte) error

func (*Signature) UnmarshalText

func (s *Signature) UnmarshalText(input []byte) error

type SignedBeaconBlock

type SignedBeaconBlock struct {
	Message   *BeaconBlock `json:"message"`
	Signature Signature    `json:"signature" ssz-size:"96"`
}

SignedBeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L55

type SignedBeaconBlockHeader

type SignedBeaconBlockHeader struct {
	Header    *BeaconBlockHeader `json:"message"`
	Signature Signature          `json:"signature" ssz-size:"96"`
}

SignedBeaconBlockHeader https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#signedbeaconblockheader

func (*SignedBeaconBlockHeader) GetTree

func (s *SignedBeaconBlockHeader) GetTree() (*ssz.Node, error)

GetTree ssz hashes the SignedBeaconBlockHeader object

func (*SignedBeaconBlockHeader) HashTreeRoot

func (s *SignedBeaconBlockHeader) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SignedBeaconBlockHeader object

func (*SignedBeaconBlockHeader) HashTreeRootWith

func (s *SignedBeaconBlockHeader) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the SignedBeaconBlockHeader object with a hasher

func (*SignedBeaconBlockHeader) MarshalSSZ

func (s *SignedBeaconBlockHeader) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SignedBeaconBlockHeader object

func (*SignedBeaconBlockHeader) MarshalSSZTo

func (s *SignedBeaconBlockHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SignedBeaconBlockHeader object to a target array

func (*SignedBeaconBlockHeader) SizeSSZ

func (s *SignedBeaconBlockHeader) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SignedBeaconBlockHeader object

func (*SignedBeaconBlockHeader) UnmarshalSSZ

func (s *SignedBeaconBlockHeader) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SignedBeaconBlockHeader object

type SignedBidTrace

type SignedBidTrace struct {
	Signature Signature `json:"signature" ssz-size:"96"`
	Message   *BidTrace `json:"message"`
}

SignedBidTrace is a BidTrace with a signature

type SignedBlindedBeaconBlock

type SignedBlindedBeaconBlock struct {
	Message   *BlindedBeaconBlock `json:"message"`
	Signature Signature           `json:"signature" ssz-size:"96"`
}

SignedBlindedBeaconBlock https://github.com/ethereum/beacon-APIs/blob/master/types/bellatrix/block.yaml#L83

func (*SignedBlindedBeaconBlock) GetTree

func (s *SignedBlindedBeaconBlock) GetTree() (*ssz.Node, error)

GetTree ssz hashes the SignedBlindedBeaconBlock object

func (*SignedBlindedBeaconBlock) HashTreeRoot

func (s *SignedBlindedBeaconBlock) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SignedBlindedBeaconBlock object

func (*SignedBlindedBeaconBlock) HashTreeRootWith

func (s *SignedBlindedBeaconBlock) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the SignedBlindedBeaconBlock object with a hasher

func (*SignedBlindedBeaconBlock) MarshalSSZ

func (s *SignedBlindedBeaconBlock) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SignedBlindedBeaconBlock object

func (*SignedBlindedBeaconBlock) MarshalSSZTo

func (s *SignedBlindedBeaconBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SignedBlindedBeaconBlock object to a target array

func (*SignedBlindedBeaconBlock) SizeSSZ

func (s *SignedBlindedBeaconBlock) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SignedBlindedBeaconBlock object

func (*SignedBlindedBeaconBlock) UnmarshalSSZ

func (s *SignedBlindedBeaconBlock) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SignedBlindedBeaconBlock object

type SignedBuilderBid

type SignedBuilderBid struct {
	Message   *BuilderBid `json:"message"`
	Signature Signature   `json:"signature" ssz-size:"96"`
}

SignedBuilderBid https://github.com/ethereum/builder-specs/pull/2/files#diff-b37cbf48e8754483e30e7caaadc5defc8c3c6e1aaf3273ee188d787b7c75d993

func (*SignedBuilderBid) GetTree

func (s *SignedBuilderBid) GetTree() (*ssz.Node, error)

GetTree ssz hashes the SignedBuilderBid object

func (*SignedBuilderBid) HashTreeRoot

func (s *SignedBuilderBid) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SignedBuilderBid object

func (*SignedBuilderBid) HashTreeRootWith

func (s *SignedBuilderBid) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the SignedBuilderBid object with a hasher

func (*SignedBuilderBid) MarshalSSZ

func (s *SignedBuilderBid) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SignedBuilderBid object

func (*SignedBuilderBid) MarshalSSZTo

func (s *SignedBuilderBid) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SignedBuilderBid object to a target array

func (*SignedBuilderBid) SizeSSZ

func (s *SignedBuilderBid) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SignedBuilderBid object

func (*SignedBuilderBid) UnmarshalSSZ

func (s *SignedBuilderBid) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SignedBuilderBid object

type SignedValidatorRegistration

type SignedValidatorRegistration struct {
	Message   *RegisterValidatorRequestMessage `json:"message"`
	Signature Signature                        `json:"signature" ssz-size:"96"`
}

SignedValidatorRegistration https://github.com/ethereum/beacon-APIs/blob/master/types/registration.yaml#L18

type SignedVoluntaryExit

type SignedVoluntaryExit struct {
	Message   *VoluntaryExit `json:"message"`
	Signature Signature      `json:"signature" ssz-size:"96"`
}

SignedVoluntaryExit https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#voluntaryexit

func (*SignedVoluntaryExit) GetTree

func (s *SignedVoluntaryExit) GetTree() (*ssz.Node, error)

GetTree ssz hashes the SignedVoluntaryExit object

func (*SignedVoluntaryExit) HashTreeRoot

func (s *SignedVoluntaryExit) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SignedVoluntaryExit object

func (*SignedVoluntaryExit) HashTreeRootWith

func (s *SignedVoluntaryExit) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the SignedVoluntaryExit object with a hasher

func (*SignedVoluntaryExit) MarshalSSZ

func (s *SignedVoluntaryExit) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SignedVoluntaryExit object

func (*SignedVoluntaryExit) MarshalSSZTo

func (s *SignedVoluntaryExit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SignedVoluntaryExit object to a target array

func (*SignedVoluntaryExit) SizeSSZ

func (s *SignedVoluntaryExit) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SignedVoluntaryExit object

func (*SignedVoluntaryExit) UnmarshalSSZ

func (s *SignedVoluntaryExit) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SignedVoluntaryExit object

type SigningData

type SigningData struct {
	Root   Root   `json:"root" ssz-size:"32"`
	Domain Domain `json:"domain" ssz-size:"32"`
}

func (*SigningData) GetTree

func (s *SigningData) GetTree() (*ssz.Node, error)

GetTree ssz hashes the SigningData object

func (*SigningData) HashTreeRoot

func (s *SigningData) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SigningData object

func (*SigningData) HashTreeRootWith

func (s *SigningData) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the SigningData object with a hasher

func (*SigningData) MarshalSSZ

func (s *SigningData) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SigningData object

func (*SigningData) MarshalSSZTo

func (s *SigningData) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SigningData object to a target array

func (*SigningData) SizeSSZ

func (s *SigningData) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SigningData object

func (*SigningData) UnmarshalSSZ

func (s *SigningData) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SigningData object

type SyncAggregate

type SyncAggregate struct {
	CommitteeBits      CommitteeBits `json:"sync_committee_bits" ssz-size:"64"`
	CommitteeSignature Signature     `json:"sync_committee_signature" ssz-size:"96"`
}

SyncAggregate ...

func (*SyncAggregate) GetTree

func (s *SyncAggregate) GetTree() (*ssz.Node, error)

GetTree ssz hashes the SyncAggregate object

func (*SyncAggregate) HashTreeRoot

func (s *SyncAggregate) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SyncAggregate object

func (*SyncAggregate) HashTreeRootWith

func (s *SyncAggregate) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the SyncAggregate object with a hasher

func (*SyncAggregate) MarshalSSZ

func (s *SyncAggregate) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SyncAggregate object

func (*SyncAggregate) MarshalSSZTo

func (s *SyncAggregate) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SyncAggregate object to a target array

func (*SyncAggregate) SizeSSZ

func (s *SyncAggregate) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SyncAggregate object

func (*SyncAggregate) UnmarshalSSZ

func (s *SyncAggregate) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SyncAggregate object

type Transactions

type Transactions struct {
	Transactions [][]byte `json:"transactions" ssz-max:"1048576,1073741824" ssz-size:"?,?"`
}

func (*Transactions) GetTree

func (t *Transactions) GetTree() (*ssz.Node, error)

GetTree ssz hashes the Transactions object

func (*Transactions) HashTreeRoot

func (t *Transactions) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the Transactions object

func (*Transactions) HashTreeRootWith

func (t *Transactions) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the Transactions object with a hasher

func (*Transactions) MarshalSSZ

func (t *Transactions) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the Transactions object

func (*Transactions) MarshalSSZTo

func (t *Transactions) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the Transactions object to a target array

func (*Transactions) SizeSSZ

func (t *Transactions) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the Transactions object

func (*Transactions) UnmarshalSSZ

func (t *Transactions) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the Transactions object

type U256Str

type U256Str Hash // encodes/decodes to string, not hex

func IntToU256

func IntToU256(i uint64) (ret U256Str)

func (*U256Str) BigInt

func (n *U256Str) BigInt() *big.Int

func (*U256Str) Cmp

func (n *U256Str) Cmp(b *U256Str) int

Cmp compares one U256Str to another and returns an integer indicating whether a > b. The result will be 0 if a == b, -1 if a < b, and +1 if a > b.

func (*U256Str) FromBig

func (n *U256Str) FromBig(x *big.Int) error

func (*U256Str) FromSlice

func (n *U256Str) FromSlice(x []byte) error

func (U256Str) MarshalText

func (n U256Str) MarshalText() ([]byte, error)

func (*U256Str) String

func (n *U256Str) String() string

func (*U256Str) UnmarshalJSON

func (n *U256Str) UnmarshalJSON(input []byte) error

func (*U256Str) UnmarshalText

func (n *U256Str) UnmarshalText(input []byte) error

type Uint64StringSlice

type Uint64StringSlice []uint64

func (Uint64StringSlice) MarshalJSON

func (slice Uint64StringSlice) MarshalJSON() ([]byte, error)

func (*Uint64StringSlice) UnmarshalJSON

func (slice *Uint64StringSlice) UnmarshalJSON(b []byte) error

type VersionString

type VersionString string

func (VersionString) MarshalJSON

func (s VersionString) MarshalJSON() ([]byte, error)

func (*VersionString) UnmarshalJSON

func (s *VersionString) UnmarshalJSON(b []byte) error

type VoluntaryExit

type VoluntaryExit struct {
	Epoch          uint64 `json:"epoch,string"`
	ValidatorIndex uint64 `json:"validator_index,string"`
}

VoluntaryExit https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#voluntaryexit

func (*VoluntaryExit) GetTree

func (v *VoluntaryExit) GetTree() (*ssz.Node, error)

GetTree ssz hashes the VoluntaryExit object

func (*VoluntaryExit) HashTreeRoot

func (v *VoluntaryExit) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the VoluntaryExit object

func (*VoluntaryExit) HashTreeRootWith

func (v *VoluntaryExit) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the VoluntaryExit object with a hasher

func (*VoluntaryExit) MarshalSSZ

func (v *VoluntaryExit) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the VoluntaryExit object

func (*VoluntaryExit) MarshalSSZTo

func (v *VoluntaryExit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the VoluntaryExit object to a target array

func (*VoluntaryExit) SizeSSZ

func (v *VoluntaryExit) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the VoluntaryExit object

func (*VoluntaryExit) UnmarshalSSZ

func (v *VoluntaryExit) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the VoluntaryExit object

Jump to

Keyboard shortcuts

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