common

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 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

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

Types

type CustomPayoutRepresentative

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

type DelegatedValidator

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

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

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

type K2Claim

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

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

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

func (*NodeRunnerInfo) MarshalJSON

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

type ValidatorFilter

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

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