Documentation
¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: de1de6c602b97e33f12faec5f30221b3b10016d756604ad75f71674ad81d10d0 Version: 0.1.2
Index ¶
- Constants
- type AttestationInfo
- type BeaconBlock
- type BeaconHead
- type ByteArray
- type DepositData
- func (d *DepositData) GetTree() (*ssz.Node, error)
- func (d *DepositData) HashTreeRoot() ([32]byte, error)
- func (d *DepositData) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (d *DepositData) MarshalSSZ() ([]byte, error)
- func (d *DepositData) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (d *DepositData) SizeSSZ() (size int)
- func (d *DepositData) UnmarshalSSZ(buf []byte) error
- type DepositDataNoSignature
- func (d *DepositDataNoSignature) GetTree() (*ssz.Node, error)
- func (d *DepositDataNoSignature) HashTreeRoot() ([32]byte, error)
- func (d *DepositDataNoSignature) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (d *DepositDataNoSignature) MarshalSSZ() ([]byte, error)
- func (d *DepositDataNoSignature) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (d *DepositDataNoSignature) SizeSSZ() (size int)
- func (d *DepositDataNoSignature) UnmarshalSSZ(buf []byte) error
- type Eth1Data
- type Eth2Config
- type Eth2DepositContract
- type ExtendedDepositData
- type IBeaconClient
- type SigningRoot
- func (s *SigningRoot) GetTree() (*ssz.Node, error)
- func (s *SigningRoot) HashTreeRoot() ([32]byte, error)
- func (s *SigningRoot) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (s *SigningRoot) MarshalSSZ() ([]byte, error)
- func (s *SigningRoot) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (s *SigningRoot) SizeSSZ() (size int)
- func (s *SigningRoot) UnmarshalSSZ(buf []byte) error
- type SyncStatus
- type ValidatorKeystore
- type ValidatorPubkey
- func (v ValidatorPubkey) Hex() string
- func (v ValidatorPubkey) HexWithPrefix() string
- func (v ValidatorPubkey) MarshalJSON() ([]byte, error)
- func (v ValidatorPubkey) MarshalYAML() ([]byte, error)
- func (v ValidatorPubkey) String() string
- func (v *ValidatorPubkey) UnmarshalJSON(data []byte) error
- func (v *ValidatorPubkey) UnmarshalYAML(data []byte) error
- type ValidatorSignature
- func (v ValidatorSignature) Hex() string
- func (v ValidatorSignature) HexWithPrefix() string
- func (v ValidatorSignature) MarshalJSON() ([]byte, error)
- func (v ValidatorSignature) MarshalYAML() ([]byte, error)
- func (v ValidatorSignature) String() string
- func (v *ValidatorSignature) UnmarshalJSON(data []byte) error
- func (v *ValidatorSignature) UnmarshalYAML(data []byte) error
- type ValidatorState
- type ValidatorStatus
- type ValidatorStatusOptions
- type VoluntaryExit
- func (v *VoluntaryExit) GetTree() (*ssz.Node, error)
- func (v *VoluntaryExit) HashTreeRoot() ([32]byte, error)
- func (v *VoluntaryExit) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (v *VoluntaryExit) MarshalSSZ() ([]byte, error)
- func (v *VoluntaryExit) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (v *VoluntaryExit) SizeSSZ() (size int)
- func (v *VoluntaryExit) UnmarshalSSZ(buf []byte) error
- type WithdrawalCredentialsChange
- func (w *WithdrawalCredentialsChange) GetTree() (*ssz.Node, error)
- func (w *WithdrawalCredentialsChange) HashTreeRoot() ([32]byte, error)
- func (w *WithdrawalCredentialsChange) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (w *WithdrawalCredentialsChange) MarshalSSZ() ([]byte, error)
- func (w *WithdrawalCredentialsChange) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (w *WithdrawalCredentialsChange) SizeSSZ() (size int)
- func (w *WithdrawalCredentialsChange) UnmarshalSSZ(buf []byte) error
Constants ¶
const (
ValidatorPubkeyLength int = 48
)
const (
ValidatorSignatureLength int = 96
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationInfo ¶
type BeaconBlock ¶
type BeaconHead ¶
type ByteArray ¶
type ByteArray []byte
Byte array type
func (ByteArray) MarshalJSON ¶
func (*ByteArray) UnmarshalJSON ¶
type DepositData ¶
type DepositData struct {
PublicKey []byte `json:"pubkey" ssz-size:"48"`
WithdrawalCredentials []byte `json:"withdrawal_credentials" ssz-size:"32"`
Amount uint64 `json:"amount"`
Signature []byte `json:"signature" ssz-size:"96"`
}
Deposit data (including signature)
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 DepositDataNoSignature ¶
type DepositDataNoSignature struct {
PublicKey []byte `json:"pubkey" ssz-size:"48"`
WithdrawalCredentials []byte `json:"withdrawal_credentials" ssz-size:"32"`
Amount uint64 `json:"amount"`
}
Deposit data (with no signature field)
func (*DepositDataNoSignature) GetTree ¶
func (d *DepositDataNoSignature) GetTree() (*ssz.Node, error)
GetTree ssz hashes the DepositDataNoSignature object
func (*DepositDataNoSignature) HashTreeRoot ¶
func (d *DepositDataNoSignature) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the DepositDataNoSignature object
func (*DepositDataNoSignature) HashTreeRootWith ¶
func (d *DepositDataNoSignature) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the DepositDataNoSignature object with a hasher
func (*DepositDataNoSignature) MarshalSSZ ¶
func (d *DepositDataNoSignature) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the DepositDataNoSignature object
func (*DepositDataNoSignature) MarshalSSZTo ¶
func (d *DepositDataNoSignature) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the DepositDataNoSignature object to a target array
func (*DepositDataNoSignature) SizeSSZ ¶
func (d *DepositDataNoSignature) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the DepositDataNoSignature object
func (*DepositDataNoSignature) UnmarshalSSZ ¶
func (d *DepositDataNoSignature) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the DepositDataNoSignature object
type Eth2Config ¶
type Eth2DepositContract ¶
type ExtendedDepositData ¶
type ExtendedDepositData struct {
PublicKey ByteArray `json:"pubkey"`
WithdrawalCredentials ByteArray `json:"withdrawal_credentials"`
Amount uint64 `json:"amount"`
Signature ByteArray `json:"signature"`
DepositMessageRoot ByteArray `json:"deposit_message_root"`
DepositDataRoot ByteArray `json:"deposit_data_root"`
ForkVersion ByteArray `json:"fork_version"`
NetworkName string `json:"network_name"`
}
Extended deposit data beyond what is required in an actual deposit message to Beacon, emulating what the deposit CLI produces
type IBeaconClient ¶
type IBeaconClient interface {
GetSyncStatus(ctx context.Context) (SyncStatus, error)
GetEth2Config(ctx context.Context) (Eth2Config, error)
GetEth2DepositContract(ctx context.Context) (Eth2DepositContract, error)
GetAttestations(ctx context.Context, blockId string) ([]AttestationInfo, bool, error)
GetBeaconBlock(ctx context.Context, blockId string) (BeaconBlock, bool, error)
GetBeaconHead(ctx context.Context) (BeaconHead, error)
GetValidatorStatusByIndex(ctx context.Context, index string, opts *ValidatorStatusOptions) (ValidatorStatus, error)
GetValidatorStatus(ctx context.Context, pubkey ValidatorPubkey, opts *ValidatorStatusOptions) (ValidatorStatus, error)
GetValidatorStatuses(ctx context.Context, pubkeys []ValidatorPubkey, opts *ValidatorStatusOptions) (map[ValidatorPubkey]ValidatorStatus, error)
GetValidatorIndex(ctx context.Context, pubkey ValidatorPubkey) (string, error)
GetValidatorSyncDuties(ctx context.Context, indices []string, epoch uint64) (map[string]bool, error)
GetValidatorProposerDuties(ctx context.Context, indices []string, epoch uint64) (map[string]uint64, error)
GetDomainData(ctx context.Context, domainType []byte, epoch uint64, useGenesisFork bool) ([]byte, error)
ExitValidator(ctx context.Context, validatorIndex string, epoch uint64, signature ValidatorSignature) error
Close(ctx context.Context) error
GetEth1DataForEth2Block(ctx context.Context, blockId string) (Eth1Data, bool, error)
ChangeWithdrawalCredentials(ctx context.Context, validatorIndex string, fromBlsPubkey ValidatorPubkey, toExecutionAddress common.Address, signature ValidatorSignature) error
}
Beacon Node interface
type SigningRoot ¶
type SigningRoot struct {
ObjectRoot []byte `json:"object_root" ssz-size:"32"`
Domain []byte `json:"domain" ssz-size:"32"`
}
BLS signing root with domain
func (*SigningRoot) GetTree ¶
func (s *SigningRoot) GetTree() (*ssz.Node, error)
GetTree ssz hashes the SigningRoot object
func (*SigningRoot) HashTreeRoot ¶
func (s *SigningRoot) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the SigningRoot object
func (*SigningRoot) HashTreeRootWith ¶
func (s *SigningRoot) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the SigningRoot object with a hasher
func (*SigningRoot) MarshalSSZ ¶
func (s *SigningRoot) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the SigningRoot object
func (*SigningRoot) MarshalSSZTo ¶
func (s *SigningRoot) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the SigningRoot object to a target array
func (*SigningRoot) SizeSSZ ¶
func (s *SigningRoot) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the SigningRoot object
func (*SigningRoot) UnmarshalSSZ ¶
func (s *SigningRoot) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the SigningRoot object
type ValidatorKeystore ¶
type ValidatorKeystore struct {
Crypto map[string]interface{} `json:"crypto"`
Name string `json:"name,omitempty"` // Technically not part of the spec but Prysm needs it
Version uint `json:"version"`
UUID uuid.UUID `json:"uuid"`
Path string `json:"path"`
Pubkey ValidatorPubkey `json:"pubkey,omitempty"`
}
Encrypted validator keystore following the EIP-2335 standard (https://eips.ethereum.org/EIPS/eip-2335)
type ValidatorPubkey ¶
type ValidatorPubkey [ValidatorPubkeyLength]byte
A validator's pubkey key
func HexToValidatorPubkey ¶
func HexToValidatorPubkey(value string) (ValidatorPubkey, error)
Converts a hex-encoded validator pubkey (with an optional 0x prefix) to a validator pubkey.
func (ValidatorPubkey) Hex ¶
func (v ValidatorPubkey) Hex() string
Gets the string representation of the pubkey without a 0x prefix.
func (ValidatorPubkey) HexWithPrefix ¶
func (v ValidatorPubkey) HexWithPrefix() string
Gets the string representation of the pubkey with a 0x prefix.
func (ValidatorPubkey) MarshalJSON ¶
func (v ValidatorPubkey) MarshalJSON() ([]byte, error)
Serializes the pubkey to JSON.
func (ValidatorPubkey) MarshalYAML ¶
func (v ValidatorPubkey) MarshalYAML() ([]byte, error)
Serializes the pubkey to YAML.
func (ValidatorPubkey) String ¶
func (v ValidatorPubkey) String() string
Gets the string representation of the pubkey without a 0x prefix.
func (*ValidatorPubkey) UnmarshalJSON ¶
func (v *ValidatorPubkey) UnmarshalJSON(data []byte) error
Deserializes the pubkey from JSON.
func (*ValidatorPubkey) UnmarshalYAML ¶
func (v *ValidatorPubkey) UnmarshalYAML(data []byte) error
Deserializes the pubkey from YAML.
type ValidatorSignature ¶
type ValidatorSignature [ValidatorSignatureLength]byte
A signature produced by a validator's private key.
func HexToValidatorSignature ¶
func HexToValidatorSignature(value string) (ValidatorSignature, error)
Converts a hex-encoded validator signature (with an optional 0x prefix) to a validator signature.
func (ValidatorSignature) Hex ¶
func (v ValidatorSignature) Hex() string
Gets the string representation of the signature without a 0x prefix.
func (ValidatorSignature) HexWithPrefix ¶
func (v ValidatorSignature) HexWithPrefix() string
Gets the string representation of the signature with a 0x prefix.
func (ValidatorSignature) MarshalJSON ¶
func (v ValidatorSignature) MarshalJSON() ([]byte, error)
Serializes the signature to JSON.
func (ValidatorSignature) MarshalYAML ¶
func (v ValidatorSignature) MarshalYAML() ([]byte, error)
Serializes the signature to YAML.
func (ValidatorSignature) String ¶
func (v ValidatorSignature) String() string
Gets the string representation of the signature without a 0x prefix.
func (*ValidatorSignature) UnmarshalJSON ¶
func (v *ValidatorSignature) UnmarshalJSON(data []byte) error
Deserializes the signature from JSON.
func (*ValidatorSignature) UnmarshalYAML ¶
func (v *ValidatorSignature) UnmarshalYAML(data []byte) error
Deserializes the signature from YAML.
type ValidatorState ¶
type ValidatorState string
const ( ValidatorState_PendingInitialized ValidatorState = "pending_initialized" ValidatorState_PendingQueued ValidatorState = "pending_queued" ValidatorState_ActiveOngoing ValidatorState = "active_ongoing" ValidatorState_ActiveExiting ValidatorState = "active_exiting" ValidatorState_ActiveSlashed ValidatorState = "active_slashed" ValidatorState_ExitedUnslashed ValidatorState = "exited_unslashed" ValidatorState_ExitedSlashed ValidatorState = "exited_slashed" ValidatorState_WithdrawalPossible ValidatorState = "withdrawal_possible" ValidatorState_WithdrawalDone ValidatorState = "withdrawal_done" )
type ValidatorStatus ¶
type ValidatorStatusOptions ¶
API request options
type VoluntaryExit ¶
type VoluntaryExit struct {
Epoch uint64 `json:"epoch"`
ValidatorIndex uint64 `json:"validator_index"`
}
Voluntary exit transaction
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
type WithdrawalCredentialsChange ¶
type WithdrawalCredentialsChange struct {
ValidatorIndex uint64 `json:"validator_index"`
FromBLSPubkey [48]byte `json:"from_bls_pubkey" ssz-size:"48"`
ToExecutionAddress [20]byte `json:"to_execution_address" ssz-size:"20"`
}
Withdrawal creds change message
func (*WithdrawalCredentialsChange) GetTree ¶
func (w *WithdrawalCredentialsChange) GetTree() (*ssz.Node, error)
GetTree ssz hashes the WithdrawalCredentialsChange object
func (*WithdrawalCredentialsChange) HashTreeRoot ¶
func (w *WithdrawalCredentialsChange) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the WithdrawalCredentialsChange object
func (*WithdrawalCredentialsChange) HashTreeRootWith ¶
func (w *WithdrawalCredentialsChange) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the WithdrawalCredentialsChange object with a hasher
func (*WithdrawalCredentialsChange) MarshalSSZ ¶
func (w *WithdrawalCredentialsChange) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the WithdrawalCredentialsChange object
func (*WithdrawalCredentialsChange) MarshalSSZTo ¶
func (w *WithdrawalCredentialsChange) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the WithdrawalCredentialsChange object to a target array
func (*WithdrawalCredentialsChange) SizeSSZ ¶
func (w *WithdrawalCredentialsChange) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the WithdrawalCredentialsChange object
func (*WithdrawalCredentialsChange) UnmarshalSSZ ¶
func (w *WithdrawalCredentialsChange) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the WithdrawalCredentialsChange object