Documentation ¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: 35b728845b060bda9d981a0ca29f1602629802bf5e6ab14576244d963e35ad90 Version: 0.1.3
Code generated by fastssz. DO NOT EDIT. Hash: 78897c75db41c99d2a98ac3fbe573f969002de0ee429ca50b4ef7e46eb735fe3 Version: 0.1.3
Code generated by fastssz. DO NOT EDIT. Hash: 1751a6f0562963e421653d395e5ff2cf861a5a66368a1725ff298fe7a59c09fa Version: 0.1.3
Code generated by fastssz. DO NOT EDIT. Hash: c7a44f3e5fa5c31d87ad91f10a623314e5254d382a4ddb0b2644a236444cc17d Version: 0.1.3
Index ¶
- Constants
- Variables
- type BLSPubkey
- type BLSSignature
- type BeaconBlockHeader
- func (b *BeaconBlockHeader) GetTree() (*ssz.Node, error)
- func (b *BeaconBlockHeader) HashTreeRoot() ([32]byte, error)
- func (b *BeaconBlockHeader) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (b BeaconBlockHeader) MarshalJSON() ([]byte, error)
- func (b *BeaconBlockHeader) MarshalSSZ() ([]byte, error)
- func (b *BeaconBlockHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (b *BeaconBlockHeader) SizeSSZ() (size int)
- func (h *BeaconBlockHeader) String() string
- func (b *BeaconBlockHeader) UnmarshalJSON(input []byte) error
- func (b *BeaconBlockHeader) UnmarshalSSZ(buf []byte) error
- type Bytes32
- type Bytes4
- type Bytes48
- type Bytes96
- type CommitteeIndex
- type Domain
- type DomainType
- type Epoch
- type ExecutionAddress
- type ExecutionBlock
- type ExecutionHash
- type ExecutionHeader
- type Fork
- func (f *Fork) GetTree() (*ssz.Node, error)
- func (f *Fork) HashTreeRoot() ([32]byte, error)
- func (f *Fork) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (f *Fork) MarshalSSZ() ([]byte, error)
- func (f *Fork) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (f *Fork) SizeSSZ() (size int)
- func (f *Fork) String() string
- func (f *Fork) UnmarshalSSZ(buf []byte) error
- type ForkDigest
- type Gwei
- type Hash32
- type Root
- type SigningData
- func (s *SigningData) GetTree() (*ssz.Node, error)
- func (s *SigningData) HashTreeRoot() ([32]byte, error)
- func (s *SigningData) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (s *SigningData) MarshalSSZ() ([]byte, error)
- func (s *SigningData) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (s *SigningData) SizeSSZ() (size int)
- func (s *SigningData) UnmarshalSSZ(buf []byte) error
- type Slot
- type ValidatorIndex
- type Version
- type Wei
- type Withdrawal
- func (w *Withdrawal) Equals(other *Withdrawal) bool
- func (w *Withdrawal) GetTree() (*ssz.Node, error)
- func (w *Withdrawal) HashTreeRoot() ([32]byte, error)
- func (w *Withdrawal) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (w Withdrawal) MarshalJSON() ([]byte, error)
- func (w *Withdrawal) MarshalSSZ() ([]byte, error)
- func (w *Withdrawal) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (w *Withdrawal) SizeSSZ() (size int)
- func (w *Withdrawal) String() string
- func (w *Withdrawal) UnmarshalJSON(input []byte) error
- func (w *Withdrawal) UnmarshalSSZ(buf []byte) error
Constants ¶
const ( // WeiPerEther is the number of Wei in an Eth. WeiPerEther = 1e18 // GweiPerEther is the number of Gwei in an Eth. GweiPerEther = 1e9 // WeiPerGwei is the number of Wei in a Gwei. WeiPerGwei = 1e9 )
Variables ¶
var ( DomainTypeProposer = DomainType{0x00, 0x00, 0x00, 0x00} DomainTypeAttester = DomainType{0x01, 0x00, 0x00, 0x00} DomainTypeRandao = DomainType{0x02, 0x00, 0x00, 0x00} DomainTypeDeposit = DomainType{0x03, 0x00, 0x00, 0x00} DomainTypeVoluntaryExit = DomainType{0x04, 0x00, 0x00, 0x00} DomainTypeSelectionProof = DomainType{0x05, 0x00, 0x00, 0x00} DomainTypeAggregateAndProof = DomainType{0x06, 0x00, 0x00, 0x00} DomainTypeApplicationMask = DomainType{0x00, 0x00, 0x00, 0x01} )
Domain constants as defined in the Ethereum 2.0 specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#domain-types
var ErrInvalidBufferSize = errors.New("invalid buffer size")
ErrInvalidBufferSize indicates that the provided buffer size is invalid.
Functions ¶
This section is empty.
Types ¶
type BLSPubkey ¶
type BLSPubkey = Bytes48
ValidatorIndex as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type BLSSignature ¶
type BLSSignature = Bytes96
BLSSignature as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type BeaconBlockHeader ¶
type BeaconBlockHeader struct { // Slot is the slot number of the block. Slot Slot `json:"slot"` // ProposerIndex is the index of the proposer of the block. ProposerIndex ValidatorIndex `json:"proposerIndex"` // ParentRoot is the root of the parent block. ParentRoot Root `json:"parentRoot" ssz-size:"32"` // StateRoot is the root of the beacon state after executing // the block. Will be 0x00...00 prior to execution. StateRoot Root `json:"stateRoot" ssz-size:"32"` // // BodyRoot is the root of the block body. BodyRoot Root `json:"bodyRoot" ssz-size:"32"` }
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) MarshalJSON ¶
func (b BeaconBlockHeader) MarshalJSON() ([]byte, error)
MarshalJSON marshals as JSON.
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) String ¶
func (h *BeaconBlockHeader) String() string
String returns a string representation of the beacon block header.
func (*BeaconBlockHeader) UnmarshalJSON ¶
func (b *BeaconBlockHeader) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals from JSON.
func (*BeaconBlockHeader) UnmarshalSSZ ¶
func (b *BeaconBlockHeader) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the BeaconBlockHeader object
type Bytes32 ¶
type Bytes32 [32]byte
Bytes32 represents a 32-byte array.
func (Bytes32) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Bytes32.
func (*Bytes32) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Bytes32.
func (*Bytes32) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Bytes32.
type Bytes4 ¶
type Bytes4 [4]byte
Bytes4 represents a 4-byte array.
func (Bytes4) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Bytes4.
func (*Bytes4) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Bytes4.
func (*Bytes4) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Bytes4.
type Bytes48 ¶
type Bytes48 [48]byte
Bytes48 represents a 48-byte array.
func (Bytes48) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Bytes48.
func (*Bytes48) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Bytes48.
func (*Bytes48) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Bytes48.
type Bytes96 ¶
type Bytes96 [96]byte
Bytes96 represents a 96-byte array.
func (Bytes96) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface for Bytes96.
func (*Bytes96) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Bytes96.
func (*Bytes96) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface for Bytes96.
type CommitteeIndex ¶
type CommitteeIndex uint64
CommitteeIndex as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type Domain ¶
type Domain = Bytes32
Domain as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type DomainType ¶
type DomainType = Bytes4
DomainType as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type Epoch ¶
type Epoch uint64
Epoch as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type ExecutionAddress ¶
ExecutionAddress represents an address on the execution layer which is derived via secp256k1 w/recovery bit.
type ExecutionBlock ¶
ExecutionBlock represents a block on the execution layer.
type ExecutionHash ¶
ExecutionHash represents a hash on the execution layer which is currently a Keccak256 hash.
type ExecutionHeader ¶
ExecutionHeader represents a header on the execution layer.
type Fork ¶
type Fork struct { // PreviousVersion is the last version before the fork. PreviousVersion Version // CurrentVersion is the first version after the fork. CurrentVersion Version // Epoch is the epoch at which the fork occurred. Epoch Epoch }
Fork as defined in the Ethereum 2.0 specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#fork
func (*Fork) HashTreeRoot ¶
HashTreeRoot ssz hashes the Fork object
func (*Fork) HashTreeRootWith ¶
func (f *Fork) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the Fork object with a hasher
func (*Fork) MarshalSSZ ¶
MarshalSSZ ssz marshals the Fork object
func (*Fork) MarshalSSZTo ¶
MarshalSSZTo ssz marshals the Fork object to a target array
func (*Fork) UnmarshalSSZ ¶
UnmarshalSSZ ssz unmarshals the Fork object
type ForkDigest ¶
type ForkDigest = Bytes4
ForkDigest as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type Hash32 ¶
type Hash32 = Bytes32
Hash32 as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type Root ¶
type Root = Bytes32
Root as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
func ComputeSigningRoot ¶
func ComputeSigningRoot( sszObject interface{ HashTreeRoot() ([32]byte, error) }, domain Domain, ) (Root, error)
ComputeSigningRoot as defined in the Ethereum 2.0 specification. https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#compute_signing_root
type SigningData ¶
SigningData as defined in the Ethereum 2.0 specification. https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#signingdata
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 Slot ¶
type Slot uint64
Slot as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type ValidatorIndex ¶
type ValidatorIndex uint64
ValidatorIndex as per the Ethereum 2.0 Specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type Version ¶
type Version = Bytes4
Version as per the Ethereum 2.0 specification. https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types
type Wei ¶
Wei is the smallest unit of Ether, represented as a pointer to a Uint256.
type Withdrawal ¶
type Withdrawal struct { Index uint64 `json:"index" ssz-size:"8"` Validator ValidatorIndex `json:"validatorIndex" ssz-size:"8"` Address ExecutionAddress `json:"address" ssz-size:"20"` Amount Gwei `json:"amount" ssz-size:"8"` }
Withdrawal represents a validator withdrawal from the consensus layer.
func (*Withdrawal) Equals ¶
func (w *Withdrawal) Equals(other *Withdrawal) bool
Equals returns true if the Withdrawal is equal to the other.
func (*Withdrawal) GetTree ¶
func (w *Withdrawal) GetTree() (*ssz.Node, error)
GetTree ssz hashes the Withdrawal object
func (*Withdrawal) HashTreeRoot ¶
func (w *Withdrawal) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the Withdrawal object
func (*Withdrawal) HashTreeRootWith ¶
func (w *Withdrawal) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the Withdrawal object with a hasher
func (Withdrawal) MarshalJSON ¶
func (w Withdrawal) MarshalJSON() ([]byte, error)
MarshalJSON marshals as JSON.
func (*Withdrawal) MarshalSSZ ¶
func (w *Withdrawal) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the Withdrawal object
func (*Withdrawal) MarshalSSZTo ¶
func (w *Withdrawal) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the Withdrawal object to a target array
func (*Withdrawal) SizeSSZ ¶
func (w *Withdrawal) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the Withdrawal object
func (*Withdrawal) String ¶
func (w *Withdrawal) String() string
String returns a string representation of the Withdrawal.
func (*Withdrawal) UnmarshalJSON ¶
func (w *Withdrawal) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals from JSON.
func (*Withdrawal) UnmarshalSSZ ¶
func (w *Withdrawal) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the Withdrawal object