common

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KETHDecimals = 18

Functions

func CreateUrl

func CreateUrl(urlString string) (*url.URL, error)

func GetListOfBLSKeysFromSignedValidatorRegistration added in v0.0.3

func GetListOfBLSKeysFromSignedValidatorRegistration(payload []apiv1.SignedValidatorRegistration) (pubkeys []phase0.BLSPubKey, payloadMap map[string]apiv1.SignedValidatorRegistration)

Types

type ChangedK2PayoutRepresentative added in v0.5.0

type ChangedK2PayoutRepresentative struct {
	RepresentativeAddress common.Address `json:"representativeAddress"`
	PreviousFeeRecipient  common.Address `json:"previousFeeRecipient"`
	NewFeeRecipient       common.Address `json:"newFeeRecipient"`
	TxHash                common.Hash    `json:"txHash"`
	Success               bool           `json:"success"`
}

type CustomPayoutRepresentative added in v0.2.0

type CustomPayoutRepresentative struct {
	RepresentativeAddress common.Address   `json:"representativeAddress"`
	FeeRecipientAddress   common.Address   `json:"feeRecipientAddress,omitempty"`
	PublicKey             phase0.BLSPubKey `json:"publicKey,omitempty"`
}

type DelegatedValidator added in v0.4.0

type DelegatedValidator struct {
	ValidatorPubKey                 phase0.BLSPubKey `json:"validatorPubKey"`
	RepresentativeAddress           common.Address   `json:"representativeAddress"`
	EffectiveBalance                uint64           `json:"effectiveBalance"`
	EffectiveBalanceReportSignature EcdsaSignature   `json:"effectiveBalanceReportSignature"`
	IncludeBalance                  bool             `json:"-"`
	IncludeReportSignature          bool             `json:"-"`
}

func (DelegatedValidator) MarshalJSON added in v0.4.0

func (d DelegatedValidator) MarshalJSON() ([]byte, error)

create a marshalJSON method for the DelegateValidator struct that ignores the Effective Balance and EffectiveBalanceReportSignature field if it is just an empty signature

type EcdsaSignature added in v0.4.0

type EcdsaSignature struct {
	R string `json:"r"`
	S string `json:"s"`
	V uint8  `json:"v"`
}

type K2Claim added in v0.0.5

type K2Claim struct {
	RepresentativeAddress common.Address `json:"representativeAddress"`
	ClaimAmount           uint64         `json:"claimAmount"`

	// Data used internally to claim rewards
	// Reward claiming requires at least one validate balance report
	// to be submitted to the K2 contract to show use of the K2 protocol
	EffectiveBalanceReportSignature EcdsaSignature   `json:"-"`
	EffectiveBalance                uint64           `json:"-"`
	ValidatorPubKey                 phase0.BLSPubKey `json:"-"`
}

type K2Exit added in v0.0.5

type K2Exit struct {
	ValidatorPubKey       phase0.BLSPubKey `json:"validatorPubKey"`
	ECDSASignature        EcdsaSignature   `json:"ecdsaSignature"`
	EffectiveBalance      uint64           `json:"effectiveBalance"`
	ExitSuccess           bool             `json:"exitSuccess"`
	RepresentativeAddress common.Address   `json:"representativeAddress"`
}

type K2ValidatorRegistration

type K2ValidatorRegistration struct {
	ECDSASignature              EcdsaSignature                     `json:"ecdsaSignature"`
	RepresentativeAddress       common.Address                     `json:"representativeAddress"`
	SignedValidatorRegistration *apiv1.SignedValidatorRegistration `json:"signedValidatorRegistration"`
	ProposerRegistrySuccess     bool                               `json:"proposerRegistrySuccess"`
	K2Success                   bool                               `json:"k2Success"`
}

type NodeRunnerInfo added in v0.4.0

type NodeRunnerInfo struct {
	RepresentativeAddress common.Address       `json:"representativeAddress"`
	ClaimableRewards      uint64               `json:"claimableRewards"`
	DelegatedValidators   []DelegatedValidator `json:"delegatedValidators"`
	IncludeBalance        bool                 `json:"-"`
}

func (*NodeRunnerInfo) MarshalJSON added in v0.4.0

func (n *NodeRunnerInfo) MarshalJSON() ([]byte, error)

type ValidatorFilter added in v0.4.0

type ValidatorFilter struct {
	PublicKey            phase0.BLSPubKey `json:"publicKey,omitempty"`
	FeeRecipient         common.Address   `json:"feeRecipientAddress,omitempty"`
	ProposerRegistration bool             `json:"allowProposerRegistration"`
	NativeDelegation     bool             `json:"allowNativeDelegation"`
}

type ValidatorWallet added in v0.2.0

type ValidatorWallet struct {
	PrivateKey *ecdsa.PrivateKey `json:"-"`
	Address    common.Address    `json:"address"`
}

Jump to

Keyboard shortcuts

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