types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

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

Package types provides various types used by the boost service.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLength = fmt.Errorf("incorrect byte length")
)
View Source
var NilHash = Hash{}

NilHash is an empty hash.

Functions

func VerifySignature added in v0.4.0

func VerifySignature(obj HashTreeRoot, pk, s []byte) (bool, error)

VerifySignature verifies a signature against a message and public key.

Types

type Address added in v0.4.0

type Address [20]byte

func HexToAddress added in v0.4.0

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

HexToAddress takes a hex string and returns an Address

func (*Address) FromSlice added in v0.4.0

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

func (Address) MarshalText added in v0.4.0

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

func (Address) String added in v0.4.0

func (a Address) String() string

func (*Address) UnmarshalJSON added in v0.4.0

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

func (*Address) UnmarshalText added in v0.4.0

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

type Attestation added in v0.4.0

type Attestation struct {
	AggregationBits hexutil.Bytes    `json:"aggregation_bits" 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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the Attestation object

func (*Attestation) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the Attestation object with a hasher

func (*Attestation) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the Attestation object

func (*Attestation) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the Attestation object to a target array

func (*Attestation) SizeSSZ added in v0.4.0

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

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

func (*Attestation) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the Attestation object

type AttestationData added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the AttestationData object

func (*AttestationData) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the AttestationData object with a hasher

func (*AttestationData) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the AttestationData object

func (*AttestationData) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the AttestationData object to a target array

func (*AttestationData) SizeSSZ added in v0.4.0

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

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

func (*AttestationData) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the AttestationData object

type AttesterSlashing added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the AttesterSlashing object

func (*AttesterSlashing) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the AttesterSlashing object with a hasher

func (*AttesterSlashing) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the AttesterSlashing object

func (*AttesterSlashing) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the AttesterSlashing object to a target array

func (*AttesterSlashing) SizeSSZ added in v0.4.0

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

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

func (*AttesterSlashing) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the AttesterSlashing object

type BeaconBlockHeader added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the BeaconBlockHeader object

func (*BeaconBlockHeader) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the BeaconBlockHeader object with a hasher

func (*BeaconBlockHeader) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the BeaconBlockHeader object

func (*BeaconBlockHeader) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the BeaconBlockHeader object to a target array

func (*BeaconBlockHeader) SizeSSZ added in v0.4.0

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

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

func (*BeaconBlockHeader) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the BeaconBlockHeader object

type BlindedBeaconBlock added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the BlindedBeaconBlock object

func (*BlindedBeaconBlock) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the BlindedBeaconBlock object with a hasher

func (*BlindedBeaconBlock) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the BlindedBeaconBlock object

func (*BlindedBeaconBlock) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the BlindedBeaconBlock object to a target array

func (*BlindedBeaconBlock) SizeSSZ added in v0.4.0

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

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

func (*BlindedBeaconBlock) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the BlindedBeaconBlock object

type BlindedBeaconBlockBody added in v0.4.0

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:"4"`
	VoluntaryExits         []*VoluntaryExit        `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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the BlindedBeaconBlockBody object

func (*BlindedBeaconBlockBody) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the BlindedBeaconBlockBody object with a hasher

func (*BlindedBeaconBlockBody) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the BlindedBeaconBlockBody object

func (*BlindedBeaconBlockBody) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the BlindedBeaconBlockBody object to a target array

func (*BlindedBeaconBlockBody) SizeSSZ added in v0.4.0

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

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

func (*BlindedBeaconBlockBody) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the BlindedBeaconBlockBody object

type Bloom added in v0.4.0

type Bloom [256]byte

func (*Bloom) FromSlice added in v0.4.0

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

func (Bloom) MarshalText added in v0.4.0

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

func (Bloom) String added in v0.4.0

func (b Bloom) String() string

func (*Bloom) UnmarshalJSON added in v0.4.0

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

func (*Bloom) UnmarshalText added in v0.4.0

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

type BuilderBid added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the BuilderBid object

func (*BuilderBid) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the BuilderBid object with a hasher

func (*BuilderBid) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the BuilderBid object

func (*BuilderBid) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the BuilderBid object to a target array

func (*BuilderBid) SizeSSZ added in v0.4.0

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

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

func (*BuilderBid) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the BuilderBid object

type Checkpoint added in v0.4.0

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

Checkpoint ...

func (*Checkpoint) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the Checkpoint object

func (*Checkpoint) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the Checkpoint object with a hasher

func (*Checkpoint) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the Checkpoint object

func (*Checkpoint) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the Checkpoint object to a target array

func (*Checkpoint) SizeSSZ added in v0.4.0

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

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

func (*Checkpoint) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the Checkpoint object

type CommitteeBits added in v0.4.0

type CommitteeBits [64]byte

func (*CommitteeBits) FromSlice added in v0.4.0

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

func (CommitteeBits) MarshalText added in v0.4.0

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

func (CommitteeBits) String added in v0.4.0

func (c CommitteeBits) String() string

func (*CommitteeBits) UnmarshalJSON added in v0.4.0

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

func (*CommitteeBits) UnmarshalText added in v0.4.0

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

type Deposit added in v0.4.0

type Deposit 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"`
}

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

func (*Deposit) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the Deposit object

func (*Deposit) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the Deposit object with a hasher

func (*Deposit) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the Deposit object

func (*Deposit) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the Deposit object to a target array

func (*Deposit) SizeSSZ added in v0.4.0

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

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

func (*Deposit) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the Deposit object

type Eth1Data added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the Eth1Data object

func (*Eth1Data) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the Eth1Data object with a hasher

func (*Eth1Data) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the Eth1Data object

func (*Eth1Data) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the Eth1Data object to a target array

func (*Eth1Data) SizeSSZ added in v0.4.0

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

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

func (*Eth1Data) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the Eth1Data object

type ExecutionPayload added in v0.4.0

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     hexutil.Bytes   `json:"extra_data" ssz-size:"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-size/ssz-max:"2048"?
}

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

type ExecutionPayloadHeader added in v0.4.0

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        hexutil.Bytes `json:"extra_data" ssz-size:"32"`
	BaseFeePerGas    U256Str       `json:"base_fee_per_gas" ssz-max:"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 (*ExecutionPayloadHeader) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the ExecutionPayloadHeader object

func (*ExecutionPayloadHeader) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the ExecutionPayloadHeader object with a hasher

func (*ExecutionPayloadHeader) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the ExecutionPayloadHeader object

func (*ExecutionPayloadHeader) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the ExecutionPayloadHeader object to a target array

func (*ExecutionPayloadHeader) SizeSSZ added in v0.4.0

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

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

func (*ExecutionPayloadHeader) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the ExecutionPayloadHeader object

type GetHeaderResponse

type GetHeaderResponse struct {
	Version string            `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 added in v0.4.0

type GetPayloadResponse struct {
	Version string            `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 added in v0.4.0

type Hash [32]byte

func (*Hash) FromSlice added in v0.4.0

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

func (Hash) MarshalText added in v0.4.0

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

func (Hash) String added in v0.4.0

func (h Hash) String() string

func (*Hash) UnmarshalJSON added in v0.4.0

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

func (*Hash) UnmarshalText added in v0.4.0

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

type HashTreeRoot added in v0.4.0

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

HashTreeRoot is an interface for SSZ-encodable objects

type IndexedAttestation added in v0.4.0

type IndexedAttestation struct {
	AttestingIndices []uint64         `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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the IndexedAttestation object

func (*IndexedAttestation) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the IndexedAttestation object with a hasher

func (*IndexedAttestation) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the IndexedAttestation object

func (*IndexedAttestation) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the IndexedAttestation object to a target array

func (*IndexedAttestation) SizeSSZ added in v0.4.0

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

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

func (*IndexedAttestation) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the IndexedAttestation object

type ProposerSlashing added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the ProposerSlashing object

func (*ProposerSlashing) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the ProposerSlashing object with a hasher

func (*ProposerSlashing) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the ProposerSlashing object

func (*ProposerSlashing) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the ProposerSlashing object to a target array

func (*ProposerSlashing) SizeSSZ added in v0.4.0

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

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

func (*ProposerSlashing) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the ProposerSlashing object

type PublicKey added in v0.4.0

type PublicKey [48]byte

func HexToPubkey added in v0.4.0

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

HexToPubkey takes a hex string and returns a PublicKey

func (*PublicKey) FromSlice added in v0.4.0

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

func (PublicKey) MarshalText added in v0.4.0

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

func (PublicKey) String added in v0.4.0

func (p PublicKey) String() string

func (*PublicKey) UnmarshalJSON added in v0.4.0

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

func (*PublicKey) UnmarshalText added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the RegisterValidatorRequestMessage object

func (*RegisterValidatorRequestMessage) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the RegisterValidatorRequestMessage object with a hasher

func (*RegisterValidatorRequestMessage) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the RegisterValidatorRequestMessage object

func (*RegisterValidatorRequestMessage) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the RegisterValidatorRequestMessage object to a target array

func (*RegisterValidatorRequestMessage) SizeSSZ added in v0.4.0

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

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

func (*RegisterValidatorRequestMessage) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the RegisterValidatorRequestMessage object

type RelayEntry added in v0.4.0

type RelayEntry struct {
	Address string
	Pubkey  hexutil.Bytes
}

RelayEntry represents a relay that mev-boost connects to

type Root added in v0.4.0

type Root Hash

func (*Root) FromSlice added in v0.4.0

func (r *Root) FromSlice(x []byte)

func (Root) MarshalText added in v0.4.0

func (r Root) MarshalText() ([]byte, error)

func (Root) String added in v0.4.0

func (r Root) String() string

func (*Root) UnmarshalJSON added in v0.4.0

func (r *Root) UnmarshalJSON(input []byte) error

func (*Root) UnmarshalText added in v0.4.0

func (r *Root) UnmarshalText(input []byte) error

type Signature added in v0.4.0

type Signature [96]byte

func HexToSignature added in v0.4.0

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

HexToSignature takes a hex string and returns a Signature

func (*Signature) FromSlice added in v0.4.0

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

func (Signature) MarshalText added in v0.4.0

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

func (Signature) String added in v0.4.0

func (s Signature) String() string

func (*Signature) UnmarshalJSON added in v0.4.0

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

func (*Signature) UnmarshalText added in v0.4.0

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

type SignedBeaconBlockHeader added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the SignedBeaconBlockHeader object

func (*SignedBeaconBlockHeader) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the SignedBeaconBlockHeader object with a hasher

func (*SignedBeaconBlockHeader) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the SignedBeaconBlockHeader object

func (*SignedBeaconBlockHeader) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the SignedBeaconBlockHeader object to a target array

func (*SignedBeaconBlockHeader) SizeSSZ added in v0.4.0

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

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

func (*SignedBeaconBlockHeader) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the SignedBeaconBlockHeader object

type SignedBlindedBeaconBlock added in v0.4.0

type SignedBlindedBeaconBlock struct {
	Message   *BlindedBeaconBlock `json:"message"`
	Signature Signature           `json:"signature"`
}

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

type SignedBuilderBid added in v0.4.0

type SignedBuilderBid struct {
	Message   *BuilderBid `json:"message"`
	Signature Signature   `json:"signature"`
}

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

func (*SignedBuilderBid) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the SignedBuilderBid object

func (*SignedBuilderBid) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the SignedBuilderBid object with a hasher

func (*SignedBuilderBid) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the SignedBuilderBid object

func (*SignedBuilderBid) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the SignedBuilderBid object to a target array

func (*SignedBuilderBid) SizeSSZ added in v0.4.0

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

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

func (*SignedBuilderBid) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the SignedBuilderBid object

type SignedValidatorRegistration added in v0.4.0

type SignedValidatorRegistration struct {
	Message   *RegisterValidatorRequestMessage `json:"message"`
	Signature Signature                        `json:"signature"`
}

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

type SyncAggregate added in v0.4.0

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

SyncAggregate ...

func (*SyncAggregate) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the SyncAggregate object

func (*SyncAggregate) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the SyncAggregate object with a hasher

func (*SyncAggregate) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the SyncAggregate object

func (*SyncAggregate) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the SyncAggregate object to a target array

func (*SyncAggregate) SizeSSZ added in v0.4.0

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

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

func (*SyncAggregate) UnmarshalSSZ added in v0.4.0

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

UnmarshalSSZ ssz unmarshals the SyncAggregate object

type U256Str added in v0.4.0

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

func IntToU256 added in v0.4.0

func IntToU256(i uint64) (ret U256Str)

IntToU256 takes a uint64 and returns a U256 type

func (*U256Str) Cmp added in v0.4.0

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

Cmp 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) FromSlice added in v0.4.0

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

func (U256Str) MarshalText added in v0.4.0

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

func (*U256Str) String added in v0.4.0

func (n *U256Str) String() string

func (*U256Str) UnmarshalJSON added in v0.4.0

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

func (*U256Str) UnmarshalText added in v0.4.0

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

type VoluntaryExit added in v0.4.0

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) HashTreeRoot added in v0.4.0

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

HashTreeRoot ssz hashes the VoluntaryExit object

func (*VoluntaryExit) HashTreeRootWith added in v0.4.0

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

HashTreeRootWith ssz hashes the VoluntaryExit object with a hasher

func (*VoluntaryExit) MarshalSSZ added in v0.4.0

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

MarshalSSZ ssz marshals the VoluntaryExit object

func (*VoluntaryExit) MarshalSSZTo added in v0.4.0

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

MarshalSSZTo ssz marshals the VoluntaryExit object to a target array

func (*VoluntaryExit) SizeSSZ added in v0.4.0

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

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

func (*VoluntaryExit) UnmarshalSSZ added in v0.4.0

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